@topconsultnpm/sdkui-react 6.20.0-dev1.6 → 6.20.0-dev1.60

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 (84) hide show
  1. package/lib/components/NewComponents/ContextMenu/TMContextMenu.d.ts +4 -0
  2. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +416 -0
  3. package/lib/components/NewComponents/ContextMenu/hooks.d.ts +13 -0
  4. package/lib/components/NewComponents/ContextMenu/hooks.js +61 -0
  5. package/lib/components/NewComponents/ContextMenu/index.d.ts +5 -0
  6. package/lib/components/NewComponents/ContextMenu/index.js +3 -0
  7. package/lib/components/NewComponents/ContextMenu/styles.d.ts +31 -0
  8. package/lib/components/NewComponents/ContextMenu/styles.js +336 -0
  9. package/lib/components/NewComponents/ContextMenu/types.d.ts +39 -0
  10. package/lib/components/NewComponents/ContextMenu/types.js +1 -0
  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.d.ts +4 -0
  14. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +745 -0
  15. package/lib/components/NewComponents/FloatingMenuBar/index.d.ts +2 -0
  16. package/lib/components/NewComponents/FloatingMenuBar/index.js +2 -0
  17. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +51 -0
  18. package/lib/components/NewComponents/FloatingMenuBar/styles.js +385 -0
  19. package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +29 -0
  20. package/lib/components/NewComponents/FloatingMenuBar/types.js +1 -0
  21. package/lib/components/base/TMAccordionNew.js +35 -14
  22. package/lib/components/base/TMCustomButton.js +61 -17
  23. package/lib/components/base/TMDataGrid.d.ts +7 -4
  24. package/lib/components/base/TMDataGrid.js +142 -11
  25. package/lib/components/choosers/TMMetadataChooser.js +8 -1
  26. package/lib/components/editors/TMMetadataValues.js +23 -5
  27. package/lib/components/editors/TMTextBox.js +6 -3
  28. package/lib/components/features/documents/TMDcmtForm.d.ts +13 -1
  29. package/lib/components/features/documents/TMDcmtForm.js +386 -194
  30. package/lib/components/features/documents/TMDcmtPreview.js +40 -69
  31. package/lib/components/features/documents/TMMasterDetailDcmts.js +37 -52
  32. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +8 -0
  33. package/lib/components/features/search/{TMSearchResultCheckoutInfoForm.js → TMDcmtCheckoutInfoForm.js} +5 -10
  34. package/lib/components/features/search/TMSavedQuerySelector.js +72 -67
  35. package/lib/components/features/search/TMSearch.js +30 -5
  36. package/lib/components/features/search/TMSearchQueryPanel.js +13 -12
  37. package/lib/components/features/search/TMSearchResult.js +57 -216
  38. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +3 -3
  39. package/lib/components/features/search/TMSearchResultsMenuItems.js +205 -169
  40. package/lib/components/features/search/TMSignSettingsForm.js +1 -1
  41. package/lib/components/features/search/TMSignatureInfoContent.d.ts +6 -0
  42. package/lib/components/features/search/TMSignatureInfoContent.js +140 -0
  43. package/lib/components/features/search/TMViewHistoryDcmt.js +1 -1
  44. package/lib/components/features/tasks/TMTaskForm.js +20 -1
  45. package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -2
  46. package/lib/components/features/tasks/TMTasksUtils.js +62 -52
  47. package/lib/components/features/tasks/TMTasksView.js +6 -6
  48. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +32 -2
  49. package/lib/components/features/workflow/TMWorkflowPopup.js +112 -14
  50. package/lib/components/features/workflow/diagram/WFDiagram.js +2 -2
  51. package/lib/components/forms/Login/LoginValidatorService.d.ts +2 -0
  52. package/lib/components/forms/Login/LoginValidatorService.js +7 -2
  53. package/lib/components/forms/Login/TMLoginForm.js +34 -6
  54. package/lib/components/forms/TMChooserForm.js +1 -1
  55. package/lib/components/grids/TMBlogsPost.js +55 -30
  56. package/lib/components/index.d.ts +2 -0
  57. package/lib/components/index.js +2 -0
  58. package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -1
  59. package/lib/components/viewers/TMDataListItemViewer.js +12 -11
  60. package/lib/css/tm-sdkui.css +1 -1
  61. package/lib/helper/SDKUI_Globals.d.ts +17 -0
  62. package/lib/helper/SDKUI_Globals.js +9 -0
  63. package/lib/helper/SDKUI_Localizator.d.ts +9 -1
  64. package/lib/helper/SDKUI_Localizator.js +87 -1
  65. package/lib/helper/TMIcons.d.ts +2 -0
  66. package/lib/helper/TMIcons.js +6 -0
  67. package/lib/helper/TMPdfViewer.d.ts +8 -0
  68. package/lib/helper/TMPdfViewer.js +368 -0
  69. package/lib/helper/checkinCheckoutManager.d.ts +32 -2
  70. package/lib/helper/checkinCheckoutManager.js +115 -38
  71. package/lib/helper/devextremeCustomMessages.d.ts +30 -0
  72. package/lib/helper/devextremeCustomMessages.js +30 -0
  73. package/lib/helper/helpers.d.ts +2 -1
  74. package/lib/helper/helpers.js +14 -3
  75. package/lib/helper/index.d.ts +1 -0
  76. package/lib/helper/index.js +1 -0
  77. package/lib/helper/queryHelper.js +29 -0
  78. package/lib/hooks/useCheckInOutOperations.d.ts +28 -0
  79. package/lib/hooks/useCheckInOutOperations.js +223 -0
  80. package/lib/hooks/useWorkflowApprove.d.ts +4 -0
  81. package/lib/hooks/useWorkflowApprove.js +14 -1
  82. package/lib/ts/types.d.ts +56 -1
  83. package/package.json +5 -2
  84. package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +0 -8
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
3
- import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, MetadataFormats, LayoutModes, TemplateTIDs, DcmtTypeListCacheService, AccessLevels, SystemMIDsAsNumber, RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats, AccessLevelsEx, ResultTypes, LayoutCacheService, UserListCacheService } from '@topconsultnpm/sdk-ts';
2
+ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
3
+ import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, MetadataFormats, LayoutModes, DcmtTypeListCacheService, SystemMIDsAsNumber, RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats, AccessLevelsEx, LayoutCacheService, UserListCacheService } from '@topconsultnpm/sdk-ts';
4
4
  import styled from 'styled-components';
5
5
  import { getAllFieldSelectedDcmtsOrFocused, getCommandsMenuItems, getSelectedDcmtsOrFocused } from './TMSearchResultsMenuItems';
6
- import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, IconDownload, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, TMCommandsContextMenu, getExceptionMessage, IconCheck, svgToString, TMImageLibrary, SDKUI_Globals, convertSearchResultDescriptorToFileItems, dcmtsFileCachePreview, removeDcmtsFileCache } from '../../../helper';
6
+ import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, TMImageLibrary, convertSearchResultDescriptorToFileItems, IconCustom, isApprovalWorkflowView } from '../../../helper';
7
7
  import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
8
8
  import { useInputAttachmentsDialog, useInputCvtFormatDialog } from '../../../hooks/useInputDialog';
9
9
  import { useRelatedDocuments } from '../../../hooks/useRelatedDocuments';
10
- import { DcmtOperationTypes, SearchResultContext, DownloadTypes } from '../../../ts';
10
+ import { DcmtOperationTypes, SearchResultContext } from '../../../ts';
11
11
  import { Gutters, TMColors } from '../../../utils/theme';
12
12
  import { StyledModalContainer, StyledMultiViewPanel } from '../../base/Styled';
13
13
  import TMButton from '../../base/TMButton';
@@ -21,7 +21,8 @@ import TMMetadataValues from '../../editors/TMMetadataValues';
21
21
  import TMDataListItemViewer from '../../viewers/TMDataListItemViewer';
22
22
  import TMTidViewer from '../../viewers/TMTidViewer';
23
23
  import TMDcmtPreview from '../documents/TMDcmtPreview';
24
- import TMFloatingToolbar from '../../base/TMFloatingToolbar';
24
+ import TMFloatingMenuBar from '../../NewComponents/FloatingMenuBar/TMFloatingMenuBar';
25
+ import TMContextMenu from '../../NewComponents/ContextMenu/TMContextMenu';
25
26
  import { WorkFlowApproveRejectPopUp, WorkFlowMoreInfoPopUp, WorkFlowOperationButtons, WorkFlowReAssignPopUp } from '../workflow/TMWorkflowPopup';
26
27
  import TMMasterDetailDcmts from '../documents/TMMasterDetailDcmts';
27
28
  import TMBatchUpdateForm from '../../features/documents/TMBatchUpdateForm';
@@ -39,14 +40,14 @@ import TMChooserForm from '../../forms/TMChooserForm';
39
40
  import TMModal from '../../base/TMModal';
40
41
  import TMSearch from './TMSearch';
41
42
  import TMArchive from '../archive/TMArchive';
42
- import { TMResultManager } from '../../forms/TMResultDialog';
43
43
  import TMCustomButton from '../../base/TMCustomButton';
44
44
  import ToppyDraggableHelpCenter from '../assistant/ToppyDraggableHelpCenter';
45
45
  import TMSignSettingsForm from './TMSignSettingsForm';
46
- import { getDcmtCicoStatus, cicoDownloadFilesCallback, getCicoDownloadFileName, renderCicoCheckInContent, validateCicoFileName, updateCheckoutItem } from '../../../helper/checkinCheckoutManager';
47
- import TMSearchResultCheckoutInfoForm from './TMSearchResultCheckoutInfoForm';
46
+ import { getDcmtCicoStatus } from '../../../helper/checkinCheckoutManager';
48
47
  import TMViewHistoryDcmt from './TMViewHistoryDcmt';
49
48
  import TMBlogCommentForm from '../blog/TMBlogCommentForm';
49
+ import { useCheckInOutOperations } from '../../../hooks/useCheckInOutOperations';
50
+ import TMDcmtCheckoutInfoForm from './TMDcmtCheckoutInfoForm';
50
51
  let abortControllerLocal = new AbortController();
51
52
  //#region Helper Methods
52
53
  export const getSearchResultCountersSingleCategory = (searchResults) => {
@@ -94,9 +95,11 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
94
95
  // State to control whether the export form (for exporting to Excel/CSV/txt and others) should be shown
95
96
  const [showExportForm, setShowExportForm] = useState(false);
96
97
  const [showSignSettingsForm, setShowSignSettingsForm] = useState(false);
98
+ const floatingBarContainerRef = useRef(null);
97
99
  const [confirmFormat, ConfirmFormatDialog] = useInputCvtFormatDialog();
98
100
  const { openConfirmAttachmentsDialog, ConfirmAttachmentsDialog } = useInputAttachmentsDialog();
99
101
  const { abortController, showWaitPanel, waitPanelTitle, showPrimary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, downloadDcmtsAsync, runOperationAsync, getDcmtFileAsync } = useDcmtOperations();
102
+ const { showHistory, showHistoryCallback, hideHistoryCallback, showCheckoutInformationForm, commentFormState, hideCommentFormCallback, showCheckoutInformationFormCallback, hideCheckoutInformationFormCallback, copyCheckoutPathToClipboardCallback, handleCheckOutCallback, handleCheckInCallback, refreshPreviewTrigger, showCicoWaitPanel, cicoWaitPanelTitle, showCicoPrimaryProgress, cicoPrimaryProgressText, cicoPrimaryProgressValue, cicoPrimaryProgressMax, } = useCheckInOutOperations();
100
103
  const relatedDocuments = useRelatedDocuments({ selectedSearchResult, focusedItem, currentSearchResults });
101
104
  const { relatedDcmts, showRelatedDcmtsChooser, archiveType, isOpenDetails, isOpenMaster, isOpenArchiveRelationForm, archiveRelatedDcmtFormTID, archiveRelatedDcmtFormMids, relatedDcmtsChooserDataSource, showPairDcmtsModal, isPairingManyToMany, pairedSearchResults, manyToManyRelations, selectedManyToManyRelation, showManyToManyChooser, manyToManyChooserDataSource, showPairSearchModal, pairSearchModalTargetTID, pairSearchModalParentTID, pairSearchModalParentDID, pairSearchModalRelation, pairSearchModalInputMids, currentTIDHasDetailRelations, currentTIDHasMasterRelations, canArchiveMasterRelation, canArchiveDetailRelation, hasManyToManyRelation, setIsOpenDetails, setIsOpenMaster, setShowRelatedDcmtsChooser, setShowManyToManyChooser, setShowPairDcmtsModal, setShowPairSearchModal, setIsOpenArchiveRelationForm, setArchiveType, setArchiveRelatedDcmtFormTID, setArchiveRelatedDcmtFormMids, pairFloatingActionConfig, pairSearchModalFloatingActionConfig, archiveMasterDocuments, archiveDetailDocuments, pairManyToMany, checkRelatedDcmtsArchiveCapability, checkManyToManyCapability, archiveRelatedDcmtHandler, executeManyToManyPairing, } = relatedDocuments;
102
105
  const [customButtonsLayout, setCustomButtonsLayout] = useState();
@@ -111,39 +114,12 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
111
114
  const disableSignApproveDisable = selectedDocs.length !== 1 || (selectedDocs.length === 1 && selectedDocs[0].FILEEXT === null);
112
115
  const dcmtsReturned = (searchResults?.length > 1 ? selectedSearchResult?.dcmtsReturned : searchResults[0]?.dcmtsReturned ?? 0);
113
116
  const dcmtsFound = (searchResults?.length > 1 ? selectedSearchResult?.dcmtsFound : searchResults[0]?.dcmtsFound ?? 0);
114
- // State to manage show history selected file
115
- const [showHistory, setShowHistory] = useState(false);
116
117
  const [allUsers, setAllUsers] = useState([]);
117
- // State to manage show history selected file
118
- const [showCheckoutInformationForm, setShowCheckoutInformationForm] = useState(false);
119
- // State variable to control the visibility of the wait panel
120
- const [showLocalWaitPanel, setShowLocalWaitPanel] = useState(false);
121
- // State variable to store the title of the wait panel
122
- const [localWaitPanelTitle, setLocalWaitPanelTitle] = useState('');
123
- // State variable to control the visibility of the primary section of the wait panel
124
- const [localShowPrimary, setLocalShowPrimary] = useState(false);
125
- // State variable to store the primary text of the wait panel
126
- const [localWaitPanelTextPrimary, setLocalWaitPanelTextPrimary] = useState('');
127
- // State variable to track the current value of the primary progress indicator in the wait panel
128
- const [localWaitPanelValuePrimary, setLocalWaitPanelValuePrimary] = useState(0);
129
- // State variable to define the maximum value for the primary progress indicator in the wait panel
130
- const [localWaitPanelMaxValuePrimary, setLocalWaitPanelMaxValuePrimary] = useState(0);
131
- /* State to manage show attachment badge on comment form */
132
- const [removeAndEditAttachmentCommentForm, setRemoveAndEditAttachmentCommentForm] = useState(true);
133
- // State to manage show comment form selected file
134
- const [showCommentForm, setShowCommentForm] = useState(false);
135
- // State to manage show comment form close button
136
- const [isCommentRequired, setIsCommentRequired] = useState(false);
137
118
  // Stato per triggerare il refresh del blog dall'esterno
138
119
  const [refreshBlogTrigger, setRefreshBlogTrigger] = useState(0);
139
- // Stato per triggerare il refresh della preview dall'esterno
140
- const [refreshPreviewTrigger, setRefreshPreviewTrigger] = useState(0);
141
120
  const triggerBlogRefresh = useCallback(async () => {
142
121
  setRefreshBlogTrigger(prev => prev + 1);
143
122
  }, []);
144
- const triggerPreviewRefresh = useCallback(() => {
145
- setRefreshPreviewTrigger(prev => prev + 1);
146
- }, []);
147
123
  useEffect(() => {
148
124
  const fetchAllUsers = async () => {
149
125
  const users = await UserListCacheService.GetAllAsync();
@@ -285,7 +261,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
285
261
  try {
286
262
  const dtd = await DcmtTypeListCacheService.GetWithNotGrantedAsync(item.TID, item?.DID);
287
263
  if (dtd) {
288
- const isWorkItem = dtd?.templateTID === TemplateTIDs.WF_WIApprView;
264
+ const isWorkItem = isApprovalWorkflowView(dtd);
289
265
  const name = `${dtd.name ?? '-'} (DID: ${item.DID})`;
290
266
  onTaskCreateRequest?.(isWorkItem
291
267
  ? { workItem: { tid: item.TID, did: item.DID, name } }
@@ -317,33 +293,12 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
317
293
  const closeSignSettingsForm = useCallback(() => {
318
294
  setShowSignSettingsForm(false);
319
295
  }, []);
320
- const viewHistoryCallback = useCallback(() => {
321
- setShowHistory(true);
322
- }, []);
323
- const showCheckoutInformationFormCallback = useCallback(() => {
324
- setShowCheckoutInformationForm(true);
325
- }, []);
326
- const showCommentFormCallback = useCallback(() => {
327
- setShowCommentForm(true);
328
- }, []);
329
- const infoCheckCopyToClipboard = () => {
296
+ const copyCheckoutPathToClipboardOperationCallback = () => {
330
297
  const selectedDocs = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
331
298
  const firstDoc = selectedDocs?.[0];
332
299
  if (!firstDoc)
333
300
  return;
334
- const defaultCheckInOutFolder = SDKUI_Globals.userSettings.defaultCheckInOutFolder ?? "Download";
335
- const wGSDraftCheckoutItemCurrentItems = [...SDKUI_Globals.userSettings.dcmtCheckoutInfo];
336
- const existingItem = wGSDraftCheckoutItemCurrentItems.find((item) => item.TID === firstDoc.TID.toString() && item.DID === firstDoc.DID.toString());
337
- const folder = existingItem && existingItem.checkoutFolder && existingItem.checkoutFolder !== "" ? existingItem.checkoutFolder : defaultCheckInOutFolder;
338
- const name = existingItem?.checkoutName ?? getCicoDownloadFileName({ type: 'dcmtInfo', dcmtInfo: firstDoc, originalFileName: fromDTD?.name ?? SDKUI_Localizator.SearchResult }, true, false);
339
- const textToCopy = folder ? `${folder}\\${name}` : name;
340
- navigator.clipboard.writeText(textToCopy)
341
- .then(() => {
342
- ShowAlert({ message: SDKUI_Localizator.OperationSuccess, mode: 'success', duration: 5000, title: SDKUI_Localizator.CopyToClipboard });
343
- })
344
- .catch(err => {
345
- ShowAlert({ message: err, mode: 'error', duration: 5000, title: SDKUI_Localizator.OperationResult });
346
- });
301
+ copyCheckoutPathToClipboardCallback(firstDoc, fromDTD?.name ?? SDKUI_Localizator.SearchResult);
347
302
  };
348
303
  const getTitleHeader = () => {
349
304
  let counters = (showSelector && disableAccordionIfSingleCategory && searchResults.length > 1) ? getSearchResultCountersSingleCategory(searchResults) : "";
@@ -405,22 +360,22 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
405
360
  const customButtonMenuItems = () => {
406
361
  const customButtonsItems = customButtonsLayout?.customButtons?.filter((customButton) => customButton.isForSearchResult && customButton.isForSearchResult > 0)
407
362
  .map((customButton) => ({
408
- icon: svgToString(TMImageLibrary({ imageID: customButton.glyphID, showPath: true })),
409
- text: customButton.title || 'Bottone personalizzato',
363
+ icon: TMImageLibrary({ imageID: customButton.glyphID }),
364
+ name: customButton.title || 'Bottone personalizzato',
410
365
  onClick: () => setCustomButton(customButton)
411
366
  }));
412
- return {
413
- icon: svgToString(_jsx(IconCheck, {})),
414
- text: SDKUI_Localizator.CustomButtons,
415
- items: customButtonsItems
416
- };
367
+ return customButtonsItems && customButtonsItems.length > 0 ? {
368
+ icon: _jsx(IconCustom, {}),
369
+ name: SDKUI_Localizator.CustomButtons,
370
+ submenu: customButtonsItems
371
+ } : {};
417
372
  };
418
373
  const onContextMenuPreparing = (e) => {
419
374
  if (e === undefined)
420
375
  return;
421
376
  if (e.target === 'content') {
422
377
  e.items = e.items || [];
423
- const menuItems = getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, infoCheckCopyToClipboard, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation);
378
+ const menuItems = getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, showHistoryCallback, copyCheckoutPathToClipboardOperationCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation);
424
379
  e.items.push(...menuItems);
425
380
  e.items.push(customButtonMenuItems());
426
381
  }
@@ -430,143 +385,16 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
430
385
  const firstDoc = selectedDocs?.[0];
431
386
  if (!firstDoc)
432
387
  return;
433
- const title = checkout ? 'Check out' : SDKUI_Localizator.CancelCheckOut;
434
- const msg = checkout ? SDKUI_Localizator.ExecuteCheckOutQuestion : SDKUI_Localizator.ExecuteCancelCheckOutQuestion;
435
- TMMessageBoxManager.show({
436
- title: title,
437
- message: msg,
438
- buttons: [ButtonNames.YES, ButtonNames.NO],
439
- onButtonClick: async (e) => {
440
- if (e !== ButtonNames.YES)
441
- return;
442
- let result = [];
443
- try {
444
- setLocalWaitPanelTitle(title);
445
- setShowLocalWaitPanel(true);
446
- setLocalShowPrimary(true);
447
- abortControllerLocal = new AbortController();
448
- let i = 0;
449
- const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
450
- if (ue) {
451
- ue.TID = firstDoc.TID;
452
- ue.DID = firstDoc.DID;
453
- if (checkout) {
454
- await ue.CheckOutAsync()
455
- .then(async () => {
456
- const filename = fromDTD?.nameLoc || SDKUI_Localizator.SearchResult;
457
- await cicoDownloadFilesCallback([{ type: 'dcmtInfo', dcmtInfo: firstDoc, originalFileName: filename }], true, downloadDcmtsAsync);
458
- result.push({ rowIndex: i, id1: firstDoc.TID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
459
- await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
460
- })
461
- .catch((error) => {
462
- result.push({ rowIndex: i, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
463
- throw error;
464
- });
465
- }
466
- else {
467
- await ue.UndoCheckOutAsync()
468
- .then(async () => {
469
- result.push({ rowIndex: i, id1: firstDoc.TID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
470
- // Remove the corresponding draft checkout item
471
- updateCheckoutItem({ TID: firstDoc.TID.toString(), DID: firstDoc.DID.toString(), checkoutFolder: "", checkoutName: "" }, "dcmtInfo", "remove");
472
- await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
473
- })
474
- .catch((error) => {
475
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
476
- throw error;
477
- });
478
- }
479
- }
480
- }
481
- catch (error) {
482
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
483
- }
484
- finally {
485
- setLocalWaitPanelTextPrimary('');
486
- setLocalWaitPanelMaxValuePrimary(0);
487
- setLocalWaitPanelValuePrimary(0);
488
- setShowLocalWaitPanel(false);
489
- TMResultManager.show(result, title, "ID", undefined);
490
- }
491
- }
492
- });
388
+ await handleCheckOutCallback(firstDoc, checkout, fromDTD?.name ?? SDKUI_Localizator.SearchResult, downloadDcmtsAsync, undefined, refreshFocusedDataRowAsync);
493
389
  };
494
- const triggerCommentOnFileAdd = (addedFiles) => {
495
- if (addedFiles.length > 0) {
496
- showCommentFormCallback();
497
- setIsCommentRequired(true);
498
- setRemoveAndEditAttachmentCommentForm(false);
499
- }
500
- };
501
- const handleCheckInOperationCallback = useCallback(() => {
390
+ const handleCheckInOperationCallback = async () => {
502
391
  const selectedDocs = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
503
392
  const firstDoc = selectedDocs?.[0];
504
393
  if (!firstDoc)
505
394
  return;
506
- // Create a new file input element
507
- const input = document.createElement("input");
508
- // Set the input type to "file" to allow file selection
509
- input.type = "file";
510
- // Set the accepted file types (e.g., images, PDFs, etc.)
511
- input.accept = "*/*";
512
- // Enable the input to accept one file at once
513
- input.multiple = false;
514
- // Add an event listener for when the file selection changes
515
- input.addEventListener('change', async (event) => {
516
- const fileInput = event.target;
517
- if (!fileInput.files || fileInput.files.length === 0)
518
- return;
519
- const file = fileInput.files[0];
520
- firstDoc.fileName = fromDTD?.name ?? SDKUI_Localizator.SearchResult;
521
- const validateFileName = validateCicoFileName({ type: 'dcmtInfo', dcmtInfo: firstDoc, originalFileName: firstDoc.fileName }, file.name);
522
- TMMessageBoxManager.show({
523
- resizable: true,
524
- buttons: [ButtonNames.YES, ButtonNames.NO],
525
- message: renderCicoCheckInContent({ type: 'dcmtInfo', dcmtInfo: firstDoc, originalFileName: firstDoc.fileName }, file, validateFileName.isValid, validateFileName.validationResults),
526
- title: "Check in",
527
- onButtonClick: async (e) => {
528
- if (e !== ButtonNames.YES)
529
- return;
530
- setLocalWaitPanelTitle('Check in');
531
- setShowLocalWaitPanel(true);
532
- setLocalShowPrimary(true);
533
- abortControllerLocal = new AbortController();
534
- let result = [];
535
- let i = 0;
536
- if (firstDoc.TID && firstDoc.DID) {
537
- try {
538
- const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
539
- if (ue) {
540
- ue.TID = firstDoc.TID;
541
- ue.DID = firstDoc.DID;
542
- await ue.CheckInAsync(file, "", abortControllerLocal.signal);
543
- // Remove the corresponding draft checkout item
544
- updateCheckoutItem({ TID: firstDoc.TID.toString(), DID: firstDoc.DID.toString(), checkoutFolder: "", checkoutName: "" }, "dcmtInfo", "remove");
545
- result.push({ rowIndex: i, id1: firstDoc.DID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
546
- await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
547
- const cacheKey = `${firstDoc.TID}-${firstDoc.DID}`;
548
- if (dcmtsFileCachePreview.has(cacheKey))
549
- removeDcmtsFileCache(cacheKey);
550
- triggerPreviewRefresh();
551
- triggerCommentOnFileAdd([firstDoc.DID]);
552
- }
553
- }
554
- catch (err) {
555
- result.push({ rowIndex: i, id1: i, id2: i, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
556
- }
557
- finally {
558
- setLocalWaitPanelTextPrimary('');
559
- setLocalWaitPanelMaxValuePrimary(0);
560
- setLocalWaitPanelValuePrimary(0);
561
- setShowLocalWaitPanel(false);
562
- TMResultManager.show(result, 'Check in', "ID", undefined, SDKUI_Localizator.CheckInSuccessMessage, 6000);
563
- }
564
- }
565
- },
566
- });
567
- });
568
- input.click();
569
- }, [selectedItems, focusedItem, getSelectedDcmtsOrFocused]);
395
+ firstDoc.fileName = fromDTD?.name ?? SDKUI_Localizator.SearchResult;
396
+ await handleCheckInCallback(firstDoc, undefined, refreshFocusedDataRowAsync);
397
+ };
570
398
  const refreshDataGridAfterRemoveAsync = async () => {
571
399
  let index = selectedSearchResult?.dtdResult?.columns?.findIndex(col => col.caption === 'DID');
572
400
  let selectedRows = [];
@@ -744,8 +572,6 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
744
572
  break;
745
573
  }
746
574
  };
747
- const searchResutlToolbar = _jsxs(_Fragment, { children: [(dcmtsReturned != dcmtsFound) && _jsx("p", { style: { backgroundColor: `white`, color: TMColors.primaryColor, textAlign: 'center', padding: '1px 4px', borderRadius: '3px', display: 'flex' }, children: `${dcmtsReturned}/${dcmtsFound} restituiti` }), context === SearchResultContext.FAVORITES_AND_RECENTS &&
748
- _jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '5px' }, children: _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconDelete, { color: 'white' }), caption: "Rimuovi da " + (selectedSearchResult?.category === "Favorites" ? '"Preferiti"' : '"Recenti"'), disabled: getSelectedDcmtsOrFocused(selectedItems, focusedItem).length <= 0, onClick: removeDcmtFromFavsOrRecents }) }), _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconRefresh, { color: 'white' }), caption: SDKUI_Localizator.Refresh, onClick: onRefreshSearchAsync }), _jsx(IconMenuVertical, { id: `commands-header-${id}`, color: 'white', cursor: 'pointer' }), _jsx(TMCommandsContextMenu, { target: `#commands-header-${id}`, showEvent: "click", menuItems: getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, infoCheckCopyToClipboard, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation).concat([customButtonMenuItems()]) })] });
749
575
  const handleAddItem = (tid, did) => {
750
576
  let newItem = { TID: tid ?? 0, DID: did ?? 0 };
751
577
  setSecondaryMasterDcmts((prevItems) => [...prevItems, newItem]);
@@ -755,16 +581,28 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
755
581
  };
756
582
  const handleSavedAsyncCallback = useCallback(async (tid, did, metadataResult) => {
757
583
  await refreshFocusedDataRowAsync(tid, did, true, metadataResult);
758
- }, []);
759
- const showToppyForApprove = (isVisible && fromDTD?.templateTID === TemplateTIDs.WF_WIApprView && !isOpenDcmtForm && !isOpenDetails && !isOpenMaster);
584
+ }, [refreshFocusedDataRowAsync]);
585
+ const showToppyForApprove = useMemo(() => {
586
+ return Boolean(isVisible && fromDTD && isApprovalWorkflowView(fromDTD) && !isOpenDcmtForm && !isOpenDetails && !isOpenMaster);
587
+ }, [isVisible, fromDTD, isOpenDcmtForm, isOpenDetails, isOpenMaster]);
588
+ const floatingMenuItems = useMemo(() => {
589
+ return getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, showHistoryCallback, copyCheckoutPathToClipboardOperationCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation).concat([customButtonMenuItems()]);
590
+ }, [
591
+ isMobile, fromDTD, allUsers, selectedItems, focusedItem, context,
592
+ showFloatingBar, workingGroupContext, showSearch, currentTIDHasMasterRelations,
593
+ currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation,
594
+ hasManyToManyRelation, customButtonsLayout
595
+ ]);
596
+ const searchResutlToolbar = _jsxs(_Fragment, { children: [(dcmtsReturned != dcmtsFound) && _jsx("p", { style: { backgroundColor: `white`, color: TMColors.primaryColor, textAlign: 'center', padding: '1px 4px', borderRadius: '3px', display: 'flex' }, children: `${dcmtsReturned}/${dcmtsFound} restituiti` }), context === SearchResultContext.FAVORITES_AND_RECENTS &&
597
+ _jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '5px' }, children: _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconDelete, { color: 'white' }), caption: "Rimuovi da " + (selectedSearchResult?.category === "Favorites" ? '"Preferiti"' : '"Recenti"'), disabled: getSelectedDcmtsOrFocused(selectedItems, focusedItem).length <= 0, onClick: removeDcmtFromFavsOrRecents }) }), _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconRefresh, { color: 'white' }), caption: SDKUI_Localizator.Refresh, onClick: onRefreshSearchAsync }), _jsx(TMContextMenu, { items: floatingMenuItems, trigger: "left", children: _jsx(IconMenuVertical, { color: 'white', cursor: 'pointer' }) })] });
760
598
  const tmSearchResult = useMemo(() => (!searchResults || searchResults.length <= 0)
761
599
  ? _jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '100%', width: '100%' }, children: [_jsx(IconBoard, { fontSize: 96 }), _jsx("div", { style: { fontSize: "15px", marginTop: "10px" }, children: SDKUI_Localizator.NoDcmtFound }), openAddDocumentForm && _jsx("div", { style: { marginTop: "10px" }, children: _jsx(TMButton, { fontSize: "15px", icon: _jsx("i", { className: 'dx-icon-share' }), caption: SDKUI_Localizator.Share, onClick: openAddDocumentForm }) })] })
762
600
  :
763
- _jsxs(_Fragment, { children: [_jsxs(TMLayoutItem, { height: '100%', children: [_jsxs(TMSplitterLayout, { direction: 'horizontal', overflow: 'visible', separatorSize: Gutters.getGutters(), separatorActiveColor: 'transparent', separatorColor: 'transparent', min: ['0', '0'], showSeparator: showSelector && deviceType !== DeviceType.MOBILE, start: showSelector ? deviceType !== DeviceType.MOBILE ? ['30%', '70%'] : splitterSize : ['0%', '100%'], children: [showSelector ?
764
- _jsx(TMLayoutItem, { children: _jsx(TMSearchResultSelector, { searchResults: currentSearchResults, disableAccordionIfSingleCategory: disableAccordionIfSingleCategory, selectedTID: selectedSearchResultTID, selectedSearchResult: selectedSearchResult, autoSelectFirst: !isMobile || currentSearchResults.length === 1, onSelectionChanged: onSearchResultSelectionChanged }) })
765
- :
766
- _jsx(_Fragment, {}), _jsxs(TMLayoutItem, { children: [_jsx(TMSearchResultGrid, { showSearch: showSearch, fromDTD: fromDTD, allUsers: allUsers, inputFocusedItem: focusedItem, inputSelectedItems: selectedItems, searchResult: searchResults.length > 1 ? selectedSearchResult : searchResults[0], lastUpdateSearchTime: lastUpdateSearchTime, openInOffice: openInOffice, onDblClick: () => openFormHandler(LayoutModes.Update), onContextMenuPreparing: onContextMenuPreparing, onSelectionChanged: (items) => { setSelectedItems(items); }, onVisibleItemChanged: setVisibleItems, onFocusedItemChanged: setFocusedItem, onDownloadDcmtsAsync: async (inputDcmts, downloadType, downloadMode, _y, confirmAttachments) => await downloadDcmtsAsync(inputDcmts, downloadType, downloadMode, onFileOpened, confirmAttachments), showExportForm: showExportForm, onCloseExportForm: onCloseExportForm }), allowFloatingBar && showFloatingBar && deviceType !== DeviceType.MOBILE &&
767
- _jsxs(TMFloatingToolbar, { backgroundColor: TMColors.primaryColor, initialLeft: '10px', initialTop: 'calc(100% - 75px)', children: [fromDTD?.perm?.canRetrieveFile === AccessLevels.Yes && _jsx(TMButton, { btnStyle: 'icon', caption: "Download file", disabled: fromDTD?.perm?.canRetrieveFile !== AccessLevels.Yes || !focusedItem?.DID, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt, "download"); } }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasDetailRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white' }), caption: SDKUI_Localizator.DcmtsDetail, onClick: () => setIsOpenDetails(true) }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasMasterRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white', transform: 'scale(-1, 1)' }), caption: SDKUI_Localizator.DcmtsMaster, onClick: () => setIsOpenMaster(true) }), _jsx(IconMenuVertical, { id: `commands-floating-${id}`, color: 'white', cursor: 'pointer' }), _jsx(TMCommandsContextMenu, { target: `#commands-floating-${id}`, showEvent: "click", menuItems: getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, infoCheckCopyToClipboard, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation).concat([customButtonMenuItems()]) })] })] })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { TID: focusedItem?.TID, DID: focusedItem?.DID, deviceType: deviceType, onCompleted: onWFOperationCompleted, onClose: () => setShowMoreInfoPopup(false) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: `${SDKUI_Localizator.BatchUpdate} (${getSelectionDcmtInfo().length} documenti selezionati)`, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
601
+ _jsxs(_Fragment, { children: [_jsxs(TMLayoutItem, { height: '100%', children: [_jsxs("div", { ref: floatingBarContainerRef, style: { position: 'relative', height: '100%', width: '100%' }, children: [_jsxs(TMSplitterLayout, { direction: 'horizontal', overflow: 'visible', separatorSize: Gutters.getGutters(), separatorActiveColor: 'transparent', separatorColor: 'transparent', min: ['0', '0'], showSeparator: showSelector && deviceType !== DeviceType.MOBILE, start: showSelector ? deviceType !== DeviceType.MOBILE ? ['30%', '70%'] : splitterSize : ['0%', '100%'], children: [showSelector ?
602
+ _jsx(TMLayoutItem, { children: _jsx(TMSearchResultSelector, { searchResults: currentSearchResults, disableAccordionIfSingleCategory: disableAccordionIfSingleCategory, selectedTID: selectedSearchResultTID, selectedSearchResult: selectedSearchResult, autoSelectFirst: !isMobile || currentSearchResults.length === 1, onSelectionChanged: onSearchResultSelectionChanged }) })
603
+ :
604
+ _jsx(_Fragment, {}), _jsx(TMLayoutItem, { children: _jsx(TMSearchResultGrid, { showSearch: showSearch, fromDTD: fromDTD, allUsers: allUsers, inputFocusedItem: focusedItem, inputSelectedItems: selectedItems, searchResult: searchResults.length > 1 ? selectedSearchResult : searchResults[0], lastUpdateSearchTime: lastUpdateSearchTime, openInOffice: openInOffice, onDblClick: () => openFormHandler(LayoutModes.Update), floatingMenuItems: floatingMenuItems, onSelectionChanged: (items) => { setSelectedItems(items); }, onVisibleItemChanged: setVisibleItems, onFocusedItemChanged: setFocusedItem, onDownloadDcmtsAsync: async (inputDcmts, downloadType, downloadMode, _y, confirmAttachments) => await downloadDcmtsAsync(inputDcmts, downloadType, downloadMode, onFileOpened, confirmAttachments), showExportForm: showExportForm, onCloseExportForm: onCloseExportForm }) })] }), allowFloatingBar && showFloatingBar && deviceType !== DeviceType.MOBILE &&
605
+ _jsx(TMFloatingMenuBar, { containerRef: floatingBarContainerRef, contextMenuItems: floatingMenuItems, isConstrained: true, defaultPosition: { x: 10, y: window.innerHeight - 215 } })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { TID: focusedItem?.TID, DID: focusedItem?.DID, deviceType: deviceType, onCompleted: onWFOperationCompleted, onClose: () => setShowMoreInfoPopup(false) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: `${SDKUI_Localizator.BatchUpdate} (${getSelectionDcmtInfo().length} documenti selezionati)`, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
768
606
  setIsOpenBatchUpdate(false);
769
607
  }, onSavedCallbackAsync: async () => {
770
608
  setIsOpenBatchUpdate(false);
@@ -823,7 +661,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
823
661
  _jsx(TMModal, { title: "Documenti condivisi", onClose: () => {
824
662
  setSharedDcmtSearchResults([]);
825
663
  }, width: isMobile ? '90%' : '60%', height: isMobile ? '90%' : '80%', children: _jsx(TMSearchResult, { searchResults: sharedDcmtSearchResults, allowFloatingBar: false, showSelector: true, disableAccordionIfSingleCategory: true, showBackButton: isMobile, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), (showCheckoutInformationForm && fromDTD && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) &&
826
- _jsx(TMSearchResultCheckoutInfoForm, { dtdName: fromDTD.name ?? SDKUI_Localizator.SearchResult, selectedDcmtOrFocused: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0], onClose: () => setShowCheckoutInformationForm(false) }), (floatingActionConfig && floatingActionConfig.isVisible) && _jsx(TMSearchResultFloatingActionButton, { selectedDcmtsOrFocused: getSelectedDcmtsOrFocused(selectedItems, focusedItem), config: floatingActionConfig })] }), [
664
+ _jsx(TMDcmtCheckoutInfoForm, { dtdName: fromDTD.name ?? SDKUI_Localizator.SearchResult, selectedDcmtOrFocused: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0], onClose: hideCheckoutInformationFormCallback }), (floatingActionConfig && floatingActionConfig.isVisible) && _jsx(TMSearchResultFloatingActionButton, { selectedDcmtsOrFocused: getSelectedDcmtsOrFocused(selectedItems, focusedItem), config: floatingActionConfig })] }), [
827
665
  searchResults,
828
666
  selectedSearchResult,
829
667
  lastUpdateSearchTime,
@@ -874,9 +712,11 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
874
712
  isMobile,
875
713
  currentMetadataValues,
876
714
  sharedDcmtFile,
877
- onRefreshSearchAsync
715
+ onRefreshSearchAsync,
716
+ handleNavigateToWGs,
717
+ handleNavigateToDossiers,
878
718
  ]);
879
- const tmBlog = useMemo(() => _jsx(TMDcmtBlog, { tid: focusedItem?.TID, did: focusedItem?.DID, fetchBlogDataTrigger: refreshBlogTrigger, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), [focusedItem, allTasks, refreshBlogTrigger]);
719
+ const tmBlog = useMemo(() => _jsx(TMDcmtBlog, { tid: focusedItem?.TID, did: focusedItem?.DID, fetchBlogDataTrigger: refreshBlogTrigger, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), [focusedItem, allTasks, refreshBlogTrigger, handleNavigateToWGs, handleNavigateToDossiers]);
880
720
  const tmSysMetadata = useMemo(() => _jsx(TMMetadataValues, { layoutMode: LayoutModes.Update, openChooserBySingleClick: true, TID: focusedItem?.TID, isReadOnly: true, deviceType: deviceType, metadataValues: currentMetadataValues.filter(o => (o.mid != undefined && o.mid <= 100)), metadataValuesOrig: currentMetadataValues.filter(o => (o.mid != undefined && o.mid <= 100)), validationItems: [] }), [focusedItem, currentMetadataValues, deviceType]);
881
721
  const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt }, refreshPreviewTrigger), [currentDcmt, refreshPreviewTrigger]);
882
722
  const allInitialPanelVisibility = {
@@ -936,7 +776,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
936
776
  gap: Gutters.getGutters(),
937
777
  width: '100%',
938
778
  height: '100%',
939
- }, children: _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(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showLocalWaitPanel, showWaitPanelPrimary: localShowPrimary, waitPanelTitle: localWaitPanelTitle, waitPanelTextPrimary: localWaitPanelTextPrimary, waitPanelValuePrimary: localWaitPanelValuePrimary, waitPanelMaxValuePrimary: localWaitPanelMaxValuePrimary, isCancelable: true, abortController: abortControllerLocal, children: (groupId && groupId.length > 0) ?
779
+ }, children: _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(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showCicoWaitPanel, showWaitPanelPrimary: showCicoPrimaryProgress, waitPanelTitle: cicoWaitPanelTitle, waitPanelTextPrimary: cicoPrimaryProgressText, waitPanelValuePrimary: cicoPrimaryProgressValue, waitPanelMaxValuePrimary: cicoPrimaryProgressMax, isCancelable: true, abortController: abortControllerLocal, children: (groupId && groupId.length > 0) ?
940
780
  _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar })
941
781
  :
942
782
  _jsx(TMPanelManagerProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'tmSearchResult', children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar }) }) }) }) }), _jsx(StyledMultiViewPanel, { "$isVisible": isOpenDetails, children: isOpenDetails && _jsx(TMMasterDetailDcmts, { deviceType: deviceType, isForMaster: false, inputDcmts: getSelectionDcmtInfo(), allowNavigation: focusedItem && selectedItems.length <= 0, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), onBack: () => setIsOpenDetails(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), _jsxs(StyledMultiViewPanel, { "$isVisible": isOpenMaster, children: [isOpenMaster && _jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: getSelectionDcmtInfo(), isForMaster: true, allowNavigation: focusedItem && selectedItems.length <= 0, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), onBack: () => setIsOpenMaster(false), appendMasterDcmts: handleAddItem, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), secondaryMasterDcmts.length > 0 && secondaryMasterDcmts.map((dcmt, index) => {
@@ -952,13 +792,13 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
952
792
  setArchiveRelatedDcmtFormTID(undefined);
953
793
  setArchiveRelatedDcmtFormMids([]);
954
794
  await onRefreshSearchAsync?.();
955
- }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (showSignSettingsForm && fromDTD) && _jsx(TMSignSettingsForm, { fromDTD: fromDTD, inputDcmts: allFieldSelectedDocs, onCloseSignSettingsForm: closeSignSettingsForm, onSavedAsyncCallback: handleSavedAsyncCallback }), (showHistory && fromDTD && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) && _jsx(TMViewHistoryDcmt, { fromDTD: fromDTD, deviceType: deviceType, inputDcmt: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0], onClose: () => setShowHistory(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (showCommentForm && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) && _jsx(TMBlogCommentForm, { context: { engine: 'SearchEngine', object: { tid: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].TID, did: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].DID } }, onClose: () => setShowCommentForm(false), refreshCallback: triggerBlogRefresh, participants: [], showAttachmentsSection: true, allArchivedDocumentsFileItems: convertSearchResultDescriptorToFileItems(currentSearchResults ?? []), isCommentRequired: isCommentRequired, removeAndEditAttachment: removeAndEditAttachmentCommentForm, selectedAttachmentDid: [Number(getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].DID)] })] }));
795
+ }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (showSignSettingsForm && fromDTD) && _jsx(TMSignSettingsForm, { fromDTD: fromDTD, inputDcmts: allFieldSelectedDocs, onCloseSignSettingsForm: closeSignSettingsForm, onSavedAsyncCallback: handleSavedAsyncCallback }), (showHistory && fromDTD && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) && _jsx(TMViewHistoryDcmt, { fromDTD: fromDTD, deviceType: deviceType, inputDcmt: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0], onClose: hideHistoryCallback, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (commentFormState.show && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) && _jsx(TMBlogCommentForm, { context: { engine: 'SearchEngine', object: { tid: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].TID, did: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].DID } }, onClose: hideCommentFormCallback, refreshCallback: triggerBlogRefresh, participants: [], showAttachmentsSection: true, allArchivedDocumentsFileItems: convertSearchResultDescriptorToFileItems(currentSearchResults ?? []), isCommentRequired: commentFormState.isRequired, removeAndEditAttachment: commentFormState.removeAndEditAttachment, selectedAttachmentDid: [Number(getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].DID)] })] }));
956
796
  };
957
797
  export default TMSearchResult;
958
798
  const renderDcmtIcon = (cellData, onDownloadDcmtsAsync, openInOffice) => {
959
799
  return _jsx(TMDcmtIcon, { tid: cellData.data.TID, did: cellData.data.DID, fileExtension: cellData.data.FILEEXT, fileCount: cellData.data.FILECOUNT, isLexProt: cellData.data.IsLexProt, isMail: cellData.data.ISMAIL, isShared: cellData.data.ISSHARED, isSigned: cellData.data.ISSIGNED, downloadMode: 'openInNewWindow', onDownloadDcmtsAsync: onDownloadDcmtsAsync, openInOffice: openInOffice });
960
800
  };
961
- const TMSearchResultGrid = ({ openInOffice, fromDTD, allUsers, inputFocusedItem, showSearch, allowMultipleSelection = true, showExportForm = false, onCloseExportForm, onFocusedItemChanged, onDownloadDcmtsAsync, onVisibleItemChanged, inputSelectedItems = [], lastUpdateSearchTime, searchResult, onContextMenuPreparing, onSelectionChanged, onDblClick }) => {
801
+ const TMSearchResultGrid = ({ openInOffice, fromDTD, allUsers, inputFocusedItem, showSearch, allowMultipleSelection = true, showExportForm = false, onCloseExportForm, onFocusedItemChanged, onDownloadDcmtsAsync, onVisibleItemChanged, inputSelectedItems = [], lastUpdateSearchTime, searchResult, floatingMenuItems, onSelectionChanged, onDblClick }) => {
962
802
  const [dataSource, setDataSource] = useState();
963
803
  const [columns, setColumns] = useState([]);
964
804
  // State to store selected row keys
@@ -1192,7 +1032,8 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, allUsers, inputFocusedItem,
1192
1032
  width: 50,
1193
1033
  cellRender: (cellData) => renderDcmtIcon(cellData, onDownloadDcmtsAsync, openInOffice),
1194
1034
  allowResizing: false,
1195
- filterOperations: ['=', "anyof"]
1035
+ filterOperations: ['=', "anyof"],
1036
+ allowHiding: false,
1196
1037
  },
1197
1038
  ...columns.filter(col => col.dataField !== 'FILEEXT')
1198
1039
  ];
@@ -1206,7 +1047,7 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, allUsers, inputFocusedItem,
1206
1047
  setVisibleItems(visibleRows.map((row) => { return row.data; }));
1207
1048
  }, []);
1208
1049
  useEffect(() => { onVisibleItemChanged?.(visibleItems); }, [visibleItems]);
1209
- return _jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsx(TMDataGrid, { id: "tm-search-result", keyExpr: "rowIndex", dataColumns: dataColumns, dataSource: dataSource, repaintChangesOnly: true, selectedRowKeys: selectedRowKeys, focusedRowKey: Number(focusedItem?.rowIndex ?? 0), showSearchPanel: showSearch, showFilterPanel: true, sorting: { mode: "multiple" }, selection: { mode: allowMultipleSelection ? 'multiple' : 'single' }, pageSize: TMDataGridPageSize.Small, onSelectionChanged: handleSelectionChange, onFocusedRowChanged: handleFocusedRowChange, onRowDblClick: onRowDblClick, onContentReady: onContentReady, onContextMenuPreparing: onContextMenuPreparing, onKeyDown: onKeyDown, counterConfig: { show: true } }), (showExportForm && searchResult && onCloseExportForm) && _jsx(TMDataGridExportForm, { dataColumns: dataColumns, dataSource: dataSource, selectedRowKeys: selectedRowKeys, onCloseExportForm: onCloseExportForm, searchResult: searchResult })] });
1050
+ return _jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsx(TMDataGrid, { id: "tm-search-result", keyExpr: "rowIndex", dataColumns: dataColumns, dataSource: dataSource, repaintChangesOnly: true, selectedRowKeys: selectedRowKeys, focusedRowKey: Number(focusedItem?.rowIndex ?? 0), showSearchPanel: showSearch, showFilterPanel: true, sorting: { mode: "multiple" }, selection: { mode: allowMultipleSelection ? 'multiple' : 'single' }, pageSize: TMDataGridPageSize.Small, onSelectionChanged: handleSelectionChange, onFocusedRowChanged: handleFocusedRowChange, onRowDblClick: onRowDblClick, onContentReady: onContentReady, showHeaderColumnChooser: true, onKeyDown: onKeyDown, customContextMenuItems: floatingMenuItems, counterConfig: { show: true } }), (showExportForm && searchResult && onCloseExportForm) && _jsx(TMDataGridExportForm, { dataColumns: dataColumns, dataSource: dataSource, selectedRowKeys: selectedRowKeys, onCloseExportForm: onCloseExportForm, searchResult: searchResult })] });
1210
1051
  };
1211
1052
  //#region TMSearchResultSelector
1212
1053
  const StyledItemTemplate = styled.div `
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { DcmtTypeDescriptor, FileDescriptor, FileFormats, LayoutModes, WorkingGroupDescriptor, UserDescriptor } from '@topconsultnpm/sdk-ts';
3
- import { TMDataGridContextMenuItem } from '../../base/TMDataGrid';
3
+ import { TMContextMenuItemProps } from '../../NewComponents/ContextMenu/types';
4
4
  import { DcmtInfo, DcmtOperationTypes, DownloadModes, DownloadTypes, SearchResultContext } from '../../../ts';
5
5
  export declare const getSelectedDcmtsOrFocused: (selectedItems: Array<any>, focusedItem: any, fileFormat?: FileFormats) => DcmtInfo[];
6
6
  export declare const getAllFieldSelectedDcmtsOrFocused: (selectedItems: Array<any>, focusedItem: any, fileFormat?: FileFormats) => any[];
7
7
  export declare const signatureInformationCallback: (isMobile: boolean, inputDcmts: DcmtInfo[] | undefined) => Promise<void>;
8
- export declare const getCommandsMenuItems: (isMobile: boolean, dtd: DcmtTypeDescriptor | undefined, allUsers: Array<UserDescriptor>, selectedItems: Array<any>, focusedItem: any, context: SearchResultContext, showFloatingBar: boolean, workingGroupContext: WorkingGroupDescriptor | undefined, showSearch: boolean, setShowFloatingBar: React.Dispatch<React.SetStateAction<boolean>>, openFormHandler: (layoutMode: LayoutModes) => void, openSharedArchiveHandler: () => Promise<void>, showSharedDcmtsHandler: () => Promise<void>, downloadDcmtsAsync: (inputDcmts: DcmtInfo[] | undefined, downloadType: DownloadTypes, downloadMode: DownloadModes, onFileDownloaded?: (dcmtFile: File | undefined) => void, confirmAttachments?: (list: FileDescriptor[]) => Promise<string[] | undefined>, skipConfirmation?: boolean) => Promise<void>, runOperationAsync: (inputDcmts: DcmtInfo[] | undefined, dcmtOperationType: DcmtOperationTypes, actionAfterOperationAsync?: () => Promise<void>) => Promise<void>, onRefreshSearchAsync: (() => Promise<void>) | undefined, onRefreshDataRowsAsync: (() => Promise<void>) | undefined, onRefreshAfterAddDcmtToFavs: (() => void) | undefined, confirmFormat: () => Promise<FileFormats>, confirmAttachments: (list: FileDescriptor[]) => Promise<string[] | undefined>, openTaskFormHandler: () => void, openDetailDcmtsFormHandler: (value: boolean) => void, openMasterDcmtsFormHandler: (value: boolean) => void, openBatchUpdateFormHandler: (value: boolean) => void, openExportForm: () => void, handleToggleSearch: () => void, handleSignApprove: () => void, openSignSettingsForm: () => void, handleCheckOutOperationCallback: (checkout: boolean) => Promise<void>, handleCheckInOperationCallback: () => void, showCheckoutInformationFormCallback: () => void, viewHistoryCallback: () => void, infoCheckCopyToClipboard: () => void, openWGsCopyMoveForm?: ((mode: "copyToWgDraft" | "copyToWgArchivedDoc", dcmtTypeDescriptor: DcmtTypeDescriptor, documents: Array<DcmtInfo>) => void), openCommentFormCallback?: ((documents: Array<DcmtInfo>) => void), openEditPdf?: ((documents: Array<DcmtInfo>) => void), openAddDocumentForm?: () => void, passToArchiveCallback?: (outputMids: Array<{
8
+ export declare const getCommandsMenuItems: (isMobile: boolean, dtd: DcmtTypeDescriptor | undefined, allUsers: Array<UserDescriptor>, selectedItems: Array<any>, focusedItem: any, context: SearchResultContext, showFloatingBar: boolean, workingGroupContext: WorkingGroupDescriptor | undefined, showSearch: boolean, setShowFloatingBar: React.Dispatch<React.SetStateAction<boolean>>, openFormHandler: (layoutMode: LayoutModes) => void, openSharedArchiveHandler: () => Promise<void>, showSharedDcmtsHandler: () => Promise<void>, downloadDcmtsAsync: (inputDcmts: DcmtInfo[] | undefined, downloadType: DownloadTypes, downloadMode: DownloadModes, onFileDownloaded?: (dcmtFile: File | undefined) => void, confirmAttachments?: (list: FileDescriptor[]) => Promise<string[] | undefined>, skipConfirmation?: boolean) => Promise<void>, runOperationAsync: (inputDcmts: DcmtInfo[] | undefined, dcmtOperationType: DcmtOperationTypes, actionAfterOperationAsync?: () => Promise<void>) => Promise<void>, onRefreshSearchAsync: (() => Promise<void>) | undefined, onRefreshDataRowsAsync: (() => Promise<void>) | undefined, onRefreshAfterAddDcmtToFavs: (() => void) | undefined, confirmFormat: () => Promise<FileFormats>, confirmAttachments: (list: FileDescriptor[]) => Promise<string[] | undefined>, openTaskFormHandler: () => void, openDetailDcmtsFormHandler: (value: boolean) => void, openMasterDcmtsFormHandler: (value: boolean) => void, openBatchUpdateFormHandler: (value: boolean) => void, openExportForm: () => void, handleToggleSearch: () => void, handleSignApprove: () => void, openSignSettingsForm: () => void, handleCheckOutOperationCallback: (checkout: boolean) => Promise<void>, handleCheckInOperationCallback: () => void, showCheckoutInformationFormCallback: () => void, viewHistoryCallback: () => void, copyCheckoutPathToClipboardOperationCallback: () => void, openWGsCopyMoveForm?: ((mode: "copyToWgDraft" | "copyToWgArchivedDoc", dcmtTypeDescriptor: DcmtTypeDescriptor, documents: Array<DcmtInfo>) => void), openCommentFormCallback?: ((documents: Array<DcmtInfo>) => void), openEditPdf?: ((documents: Array<DcmtInfo>) => void), openAddDocumentForm?: () => void, passToArchiveCallback?: (outputMids: Array<{
9
9
  mid: number;
10
10
  value: string;
11
- }>, tid?: number) => void, archiveMasterDocuments?: (tid: number | undefined) => Promise<void>, archiveDetailDocuments?: (tid: number | undefined) => Promise<void>, hasMasterRelation?: boolean, hasDetailRelation?: boolean, canArchiveMasterRelation?: boolean, canArchiveDetailRelation?: boolean, pairManyToManyDocuments?: (isPairing: boolean) => Promise<void>, hasManyToManyRelation?: boolean) => Array<TMDataGridContextMenuItem>;
11
+ }>, tid?: number) => void, archiveMasterDocuments?: (tid: number | undefined) => Promise<void>, archiveDetailDocuments?: (tid: number | undefined) => Promise<void>, hasMasterRelation?: boolean, hasDetailRelation?: boolean, canArchiveMasterRelation?: boolean, canArchiveDetailRelation?: boolean, pairManyToManyDocuments?: (isPairing: boolean) => Promise<void>, hasManyToManyRelation?: boolean) => Array<TMContextMenuItemProps>;