@topconsultnpm/sdkui-react 6.20.0-dev1.3 → 6.20.0-dev1.30

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 (64) hide show
  1. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +3 -3
  2. package/lib/components/NewComponents/ContextMenu/hooks.d.ts +1 -0
  3. package/lib/components/NewComponents/ContextMenu/hooks.js +8 -4
  4. package/lib/components/NewComponents/ContextMenu/styles.d.ts +4 -1
  5. package/lib/components/NewComponents/ContextMenu/styles.js +41 -8
  6. package/lib/components/NewComponents/ContextMenu/types.d.ts +1 -0
  7. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +38 -30
  8. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +8 -0
  9. package/lib/components/NewComponents/FloatingMenuBar/styles.js +30 -19
  10. package/lib/components/base/TMAccordion.js +2 -2
  11. package/lib/components/base/TMCustomButton.js +41 -5
  12. package/lib/components/base/TMDataGrid.d.ts +2 -2
  13. package/lib/components/base/TMDataGrid.js +16 -5
  14. package/lib/components/editors/TMHtmlEditor.js +1 -1
  15. package/lib/components/editors/TMMetadataValues.js +20 -2
  16. package/lib/components/features/documents/TMDcmtBlog.d.ts +1 -7
  17. package/lib/components/features/documents/TMDcmtBlog.js +29 -2
  18. package/lib/components/features/documents/TMDcmtForm.js +268 -168
  19. package/lib/components/features/documents/TMDcmtPreview.js +37 -66
  20. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +8 -0
  21. package/lib/components/features/search/{TMSearchResultCheckoutInfoForm.js → TMDcmtCheckoutInfoForm.js} +6 -11
  22. package/lib/components/features/search/TMSearchQueryPanel.js +13 -12
  23. package/lib/components/features/search/TMSearchResult.js +74 -111
  24. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +1 -1
  25. package/lib/components/features/search/TMSearchResultsMenuItems.js +26 -43
  26. package/lib/components/features/search/TMSignatureInfoContent.d.ts +6 -0
  27. package/lib/components/features/search/TMSignatureInfoContent.js +140 -0
  28. package/lib/components/forms/Login/LoginValidatorService.d.ts +2 -0
  29. package/lib/components/forms/Login/LoginValidatorService.js +7 -2
  30. package/lib/components/forms/Login/TMLoginForm.js +34 -6
  31. package/lib/css/tm-sdkui.css +1 -1
  32. package/lib/helper/SDKUI_Globals.d.ts +13 -14
  33. package/lib/helper/SDKUI_Globals.js +9 -0
  34. package/lib/helper/SDKUI_Localizator.d.ts +8 -0
  35. package/lib/helper/SDKUI_Localizator.js +98 -0
  36. package/lib/helper/TMPdfViewer.d.ts +8 -0
  37. package/lib/helper/TMPdfViewer.js +187 -0
  38. package/lib/helper/TMUtils.d.ts +3 -1
  39. package/lib/helper/TMUtils.js +51 -0
  40. package/lib/helper/checkinCheckoutManager.d.ts +85 -0
  41. package/lib/helper/checkinCheckoutManager.js +348 -0
  42. package/lib/helper/devextremeCustomMessages.d.ts +30 -0
  43. package/lib/helper/devextremeCustomMessages.js +30 -0
  44. package/lib/helper/helpers.js +7 -1
  45. package/lib/helper/index.d.ts +2 -0
  46. package/lib/helper/index.js +2 -0
  47. package/lib/helper/queryHelper.js +29 -0
  48. package/lib/hooks/useCheckInOutOperations.d.ts +28 -0
  49. package/lib/hooks/useCheckInOutOperations.js +223 -0
  50. package/lib/services/platform_services.d.ts +1 -1
  51. package/package.json +5 -2
  52. package/lib/components/NewComponents/Notification/Notification.d.ts +0 -4
  53. package/lib/components/NewComponents/Notification/Notification.js +0 -60
  54. package/lib/components/NewComponents/Notification/NotificationContainer.d.ts +0 -8
  55. package/lib/components/NewComponents/Notification/NotificationContainer.js +0 -33
  56. package/lib/components/NewComponents/Notification/index.d.ts +0 -2
  57. package/lib/components/NewComponents/Notification/index.js +0 -2
  58. package/lib/components/NewComponents/Notification/styles.d.ts +0 -21
  59. package/lib/components/NewComponents/Notification/styles.js +0 -180
  60. package/lib/components/NewComponents/Notification/types.d.ts +0 -18
  61. package/lib/components/NewComponents/Notification/types.js +0 -1
  62. package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +0 -8
  63. package/lib/helper/cicoHelper.d.ts +0 -31
  64. package/lib/helper/cicoHelper.js +0 -155
@@ -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, TemplateTIDs, 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 } from '../../../helper';
6
+ import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, IconCheck, svgToString, TMImageLibrary, convertSearchResultDescriptorToFileItems } 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,13 +40,15 @@ 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 { cicoIsEnabled, downloadFilesCallback, updateDcmtCheckoutItem } from '../../../helper/cicoHelper';
47
- import TMSearchResultCheckoutInfoForm from './TMSearchResultCheckoutInfoForm';
46
+ import { getDcmtCicoStatus } from '../../../helper/checkinCheckoutManager';
48
47
  import TMViewHistoryDcmt from './TMViewHistoryDcmt';
48
+ import TMBlogCommentForm from '../blog/TMBlogCommentForm';
49
+ import { useCheckInOutOperations } from '../../../hooks/useCheckInOutOperations';
50
+ import TMDcmtCheckoutInfoForm from './TMDcmtCheckoutInfoForm';
51
+ let abortControllerLocal = new AbortController();
49
52
  //#region Helper Methods
50
53
  export const getSearchResultCountersSingleCategory = (searchResults) => {
51
54
  // let totDcmtTypes = searchResults.length;
@@ -92,9 +95,11 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
92
95
  // State to control whether the export form (for exporting to Excel/CSV/txt and others) should be shown
93
96
  const [showExportForm, setShowExportForm] = useState(false);
94
97
  const [showSignSettingsForm, setShowSignSettingsForm] = useState(false);
98
+ const floatingBarContainerRef = useRef(null);
95
99
  const [confirmFormat, ConfirmFormatDialog] = useInputCvtFormatDialog();
96
100
  const { openConfirmAttachmentsDialog, ConfirmAttachmentsDialog } = useInputAttachmentsDialog();
97
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();
98
103
  const relatedDocuments = useRelatedDocuments({ selectedSearchResult, focusedItem, currentSearchResults });
99
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;
100
105
  const [customButtonsLayout, setCustomButtonsLayout] = useState();
@@ -109,15 +114,12 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
109
114
  const disableSignApproveDisable = selectedDocs.length !== 1 || (selectedDocs.length === 1 && selectedDocs[0].FILEEXT === null);
110
115
  const dcmtsReturned = (searchResults?.length > 1 ? selectedSearchResult?.dcmtsReturned : searchResults[0]?.dcmtsReturned ?? 0);
111
116
  const dcmtsFound = (searchResults?.length > 1 ? selectedSearchResult?.dcmtsFound : searchResults[0]?.dcmtsFound ?? 0);
112
- // Dcmt Blog states
113
- const [blogsDatasource, setBlogsDatasource] = useState([]);
114
- const [hasLoadedDataOnce, setHasLoadedDataOnce] = useState(false); //traccia se *qualsiasi* dato è stato caricato per la prima volta
115
- const [lastLoadedDid, setLastLoadedDid] = useState(undefined); // `lastLoadedDid` tiene traccia dell'ultimo `did` per cui abbiamo caricato i dati
116
- // State to manage show history selected file
117
- const [showHistory, setShowHistory] = useState(false);
118
117
  const [allUsers, setAllUsers] = useState([]);
119
- // State to manage show history selected file
120
- const [showCheckoutInformationForm, setShowCheckoutInformationForm] = useState(false);
118
+ // Stato per triggerare il refresh del blog dall'esterno
119
+ const [refreshBlogTrigger, setRefreshBlogTrigger] = useState(0);
120
+ const triggerBlogRefresh = useCallback(async () => {
121
+ setRefreshBlogTrigger(prev => prev + 1);
122
+ }, []);
121
123
  useEffect(() => {
122
124
  const fetchAllUsers = async () => {
123
125
  const users = await UserListCacheService.GetAllAsync();
@@ -291,12 +293,13 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
291
293
  const closeSignSettingsForm = useCallback(() => {
292
294
  setShowSignSettingsForm(false);
293
295
  }, []);
294
- const viewHistoryCallback = useCallback(() => {
295
- setShowHistory(true);
296
- }, []);
297
- const showCheckoutInformationFormCallback = useCallback(() => {
298
- setShowCheckoutInformationForm(true);
299
- }, []);
296
+ const copyCheckoutPathToClipboardOperationCallback = () => {
297
+ const selectedDocs = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
298
+ const firstDoc = selectedDocs?.[0];
299
+ if (!firstDoc)
300
+ return;
301
+ copyCheckoutPathToClipboardCallback(firstDoc, fromDTD?.name ?? SDKUI_Localizator.SearchResult);
302
+ };
300
303
  const getTitleHeader = () => {
301
304
  let counters = (showSelector && disableAccordionIfSingleCategory && searchResults.length > 1) ? getSearchResultCountersSingleCategory(searchResults) : "";
302
305
  if (title)
@@ -372,7 +375,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
372
375
  return;
373
376
  if (e.target === 'content') {
374
377
  e.items = e.items || [];
375
- 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, showCheckoutInformationFormCallback, viewHistoryCallback, 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);
376
379
  e.items.push(...menuItems);
377
380
  e.items.push(customButtonMenuItems());
378
381
  }
@@ -382,62 +385,15 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
382
385
  const firstDoc = selectedDocs?.[0];
383
386
  if (!firstDoc)
384
387
  return;
385
- const title = checkout ? 'Check out' : SDKUI_Localizator.CancelCheckOut;
386
- const msg = checkout ? SDKUI_Localizator.ExecuteCheckOutQuestion : SDKUI_Localizator.ExecuteCancelCheckOutQuestion;
387
- TMMessageBoxManager.show({
388
- title: title,
389
- message: msg,
390
- buttons: [ButtonNames.YES, ButtonNames.NO],
391
- onButtonClick: async (e) => {
392
- let result = [];
393
- if (e !== ButtonNames.YES)
394
- return;
395
- try {
396
- const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
397
- if (ue) {
398
- ue.TID = firstDoc.TID;
399
- ue.DID = firstDoc.DID;
400
- if (checkout) {
401
- await ue.CheckOutAsync()
402
- .then(async () => {
403
- const filename = fromDTD?.nameLoc || SDKUI_Localizator.SearchResult;
404
- await downloadFilesCallback(filename, [firstDoc], true, downloadDcmtsAsync);
405
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
406
- await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
407
- })
408
- .catch((error) => {
409
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
410
- throw error;
411
- });
412
- }
413
- else {
414
- await ue.UndoCheckOutAsync()
415
- .then(async () => {
416
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
417
- // Remove the corresponding draft checkout item
418
- updateDcmtCheckoutItem({
419
- TID: firstDoc.TID.toString(),
420
- DID: firstDoc.DID.toString(),
421
- checkoutFolder: "",
422
- checkoutName: ""
423
- }, "remove");
424
- await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
425
- })
426
- .catch((error) => {
427
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
428
- throw error;
429
- });
430
- }
431
- }
432
- }
433
- catch (error) {
434
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
435
- }
436
- finally {
437
- TMResultManager.show(result, title, "ID", undefined);
438
- }
439
- }
440
- });
388
+ await handleCheckOutCallback(firstDoc, checkout, fromDTD?.name ?? SDKUI_Localizator.SearchResult, downloadDcmtsAsync, undefined, refreshFocusedDataRowAsync);
389
+ };
390
+ const handleCheckInOperationCallback = async () => {
391
+ const selectedDocs = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
392
+ const firstDoc = selectedDocs?.[0];
393
+ if (!firstDoc)
394
+ return;
395
+ firstDoc.fileName = fromDTD?.name ?? SDKUI_Localizator.SearchResult;
396
+ await handleCheckInCallback(firstDoc, undefined, refreshFocusedDataRowAsync);
441
397
  };
442
398
  const refreshDataGridAfterRemoveAsync = async () => {
443
399
  let index = selectedSearchResult?.dtdResult?.columns?.findIndex(col => col.caption === 'DID');
@@ -616,8 +572,6 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
616
572
  break;
617
573
  }
618
574
  };
619
- 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 &&
620
- _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, showCheckoutInformationFormCallback, viewHistoryCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation).concat([customButtonMenuItems()]) })] });
621
575
  const handleAddItem = (tid, did) => {
622
576
  let newItem = { TID: tid ?? 0, DID: did ?? 0 };
623
577
  setSecondaryMasterDcmts((prevItems) => [...prevItems, newItem]);
@@ -625,34 +579,42 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
625
579
  const handleRemoveItem = (tid, did) => {
626
580
  setSecondaryMasterDcmts((prevItems) => prevItems.filter(item => item.TID !== tid && item.DID !== did));
627
581
  };
628
- const fetchBlogDataAsync = useCallback(async (tid, did) => {
629
- try {
630
- TMSpinner.show({ description: 'Caricamento - Bacheca...' });
631
- const res = await SDK_Globals.tmSession?.NewSearchEngine().BlogRetrieveAsync(tid, did);
632
- setBlogsDatasource(res ?? []);
633
- setHasLoadedDataOnce(true);
634
- setLastLoadedDid(did);
635
- }
636
- catch (e) {
637
- let err = e;
638
- TMExceptionBoxManager.show({ exception: err });
639
- }
640
- finally {
641
- TMSpinner.hide();
642
- }
643
- }, []);
644
582
  const handleSavedAsyncCallback = useCallback(async (tid, did, metadataResult) => {
645
583
  await refreshFocusedDataRowAsync(tid, did, true, metadataResult);
646
- }, []);
584
+ }, [refreshFocusedDataRowAsync]);
647
585
  const showToppyForApprove = (isVisible && fromDTD?.templateTID === TemplateTIDs.WF_WIApprView && !isOpenDcmtForm && !isOpenDetails && !isOpenMaster);
586
+ // Convert TMDataGridContextMenuItem to TMContextMenuItemProps for the floating menu bar
587
+ const convertToContextMenuItems = (items) => {
588
+ return items
589
+ .filter(item => item.visible !== false)
590
+ .map(item => ({
591
+ name: item.text,
592
+ icon: item.icon ? _jsx("div", { dangerouslySetInnerHTML: { __html: item.icon } }) : undefined,
593
+ disabled: item.disabled,
594
+ onClick: item.onClick,
595
+ submenu: item.items ? convertToContextMenuItems(item.items) : undefined,
596
+ beginGroup: item.beginGroup,
597
+ }));
598
+ };
599
+ const floatingMenuItems = useMemo(() => {
600
+ 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).concat([customButtonMenuItems()]);
601
+ return convertToContextMenuItems(menuItems);
602
+ }, [
603
+ isMobile, fromDTD, allUsers, selectedItems, focusedItem, context,
604
+ showFloatingBar, workingGroupContext, showSearch, currentTIDHasMasterRelations,
605
+ currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation,
606
+ hasManyToManyRelation, customButtonsLayout
607
+ ]);
608
+ 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 &&
609
+ _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' }) })] });
648
610
  const tmSearchResult = useMemo(() => (!searchResults || searchResults.length <= 0)
649
611
  ? _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 }) })] })
650
612
  :
651
613
  _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 ?
652
614
  _jsx(TMLayoutItem, { children: _jsx(TMSearchResultSelector, { searchResults: currentSearchResults, disableAccordionIfSingleCategory: disableAccordionIfSingleCategory, selectedTID: selectedSearchResultTID, selectedSearchResult: selectedSearchResult, autoSelectFirst: !isMobile || currentSearchResults.length === 1, onSelectionChanged: onSearchResultSelectionChanged }) })
653
615
  :
654
- _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 &&
655
- _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, showCheckoutInformationFormCallback, viewHistoryCallback, 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: () => {
616
+ _jsx(_Fragment, {}), _jsx(TMLayoutItem, { children: _jsxs("div", { ref: floatingBarContainerRef, style: { position: 'relative', height: '100%', width: '100%' }, 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 &&
617
+ _jsx(TMFloatingMenuBar, { containerRef: floatingBarContainerRef, contextMenuItems: floatingMenuItems, storageKey: `floatingMenuBar-search-${groupId || 'default'}`, isConstrained: true, defaultPosition: { x: 10, y: window.innerHeight - 215 }, maxItems: 8 })] }) })] }), 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: () => {
656
618
  setIsOpenBatchUpdate(false);
657
619
  }, onSavedCallbackAsync: async () => {
658
620
  setIsOpenBatchUpdate(false);
@@ -711,7 +673,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
711
673
  _jsx(TMModal, { title: "Documenti condivisi", onClose: () => {
712
674
  setSharedDcmtSearchResults([]);
713
675
  }, 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) &&
714
- _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 })] }), [
676
+ _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 })] }), [
715
677
  searchResults,
716
678
  selectedSearchResult,
717
679
  lastUpdateSearchTime,
@@ -764,9 +726,9 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
764
726
  sharedDcmtFile,
765
727
  onRefreshSearchAsync
766
728
  ]);
767
- const tmBlog = useMemo(() => _jsx(TMDcmtBlog, { blogsDatasource: blogsDatasource, hasLoadedDataOnce: hasLoadedDataOnce, lastLoadedDid: lastLoadedDid, setBlogsDatasource: setBlogsDatasource, setHasLoadedDataOnce: setHasLoadedDataOnce, setLastLoadedDid: setLastLoadedDid, fetchBlogDataAsync: fetchBlogDataAsync, tid: focusedItem?.TID, did: focusedItem?.DID, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), [focusedItem, allTasks]);
729
+ 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]);
768
730
  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]);
769
- const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt }), [currentDcmt]);
731
+ const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt }, refreshPreviewTrigger), [currentDcmt, refreshPreviewTrigger]);
770
732
  const allInitialPanelVisibility = {
771
733
  'tmSearchResult': true,
772
734
  'tmBlog': false,
@@ -824,10 +786,10 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
824
786
  gap: Gutters.getGutters(),
825
787
  width: '100%',
826
788
  height: '100%',
827
- }, 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: (groupId && groupId.length > 0) ?
828
- _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar })
829
- :
830
- _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) => {
789
+ }, 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) ?
790
+ _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar })
791
+ :
792
+ _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) => {
831
793
  return (_jsx(StyledModalContainer, { style: { backgroundColor: 'white' }, children: _jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: [dcmt], isForMaster: true, allowNavigation: false, onBack: () => handleRemoveItem(dcmt.TID, dcmt.DID), appendMasterDcmts: handleAddItem, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }, `${index}-${dcmt.DID}`));
832
794
  })] }), _jsx(StyledMultiViewPanel, { "$isVisible": isOpenDcmtForm, children: isOpenDcmtForm && focusedItem?.TID !== undefined && focusedItem?.DID !== undefined && _jsx(TMDcmtForm, { isModal: openDcmtFormAsModal || (dcmtFormLayoutMode === LayoutModes.Ark && focusedItem?.DID), titleModal: fromDTD?.name ?? '', TID: focusedItem.TID, DID: focusedItem.DID, allowButtonsRefs: true, layoutMode: dcmtFormLayoutMode, count: visibleItems.length, itemIndex: visibleItems.findIndex(o => o.rowIndex === focusedItem?.rowIndex) + 1, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), onClose: () => { setIsOpenDcmtForm(false); }, onWFOperationCompleted: onWFOperationCompleted, onTaskCreateRequest: onTaskCreateRequest, onSavedAsyncCallback: handleSavedAsyncCallback, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, onReferenceClick: onReferenceClick, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), isOpenArchiveRelationForm && _jsx(TMDcmtForm, { isModal: true, titleModal: SDKUI_Localizator.Archive + ' - ' + (archiveType === 'detail' ? SDKUI_Localizator.DcmtsDetail : SDKUI_Localizator.DcmtsMaster), TID: archiveRelatedDcmtFormTID, layoutMode: LayoutModes.Ark, inputMids: archiveRelatedDcmtFormMids, showBackButton: false, allowButtonsRefs: false, onClose: () => {
833
795
  setIsOpenArchiveRelationForm(false);
@@ -840,7 +802,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
840
802
  setArchiveRelatedDcmtFormTID(undefined);
841
803
  setArchiveRelatedDcmtFormMids([]);
842
804
  await onRefreshSearchAsync?.();
843
- }, 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 })] }));
805
+ }, 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)] })] }));
844
806
  };
845
807
  export default TMSearchResult;
846
808
  const renderDcmtIcon = (cellData, onDownloadDcmtsAsync, openInOffice) => {
@@ -928,7 +890,7 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, allUsers, inputFocusedItem,
928
890
  const isLexProt = cellData.data.IsLexProt == 1;
929
891
  // Prima colonna: la colonna numero 2 (dopo icona e selezione)
930
892
  const isFirstColumn = cellData.columnIndex === 2;
931
- const { checkoutStatus } = cicoIsEnabled(cellData.data, allUsers, fromDTD);
893
+ const { checkoutStatus } = getDcmtCicoStatus(cellData.data, allUsers, fromDTD);
932
894
  const shouldShowCheckoutIcon = isFirstColumn && checkoutStatus.isCheckedOut && checkoutStatus.icon;
933
895
  let style = {};
934
896
  if (isLogDel) {
@@ -1080,7 +1042,8 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, allUsers, inputFocusedItem,
1080
1042
  width: 50,
1081
1043
  cellRender: (cellData) => renderDcmtIcon(cellData, onDownloadDcmtsAsync, openInOffice),
1082
1044
  allowResizing: false,
1083
- filterOperations: ['=', "anyof"]
1045
+ filterOperations: ['=', "anyof"],
1046
+ allowHiding: false,
1084
1047
  },
1085
1048
  ...columns.filter(col => col.dataField !== 'FILEEXT')
1086
1049
  ];
@@ -1094,7 +1057,7 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, allUsers, inputFocusedItem,
1094
1057
  setVisibleItems(visibleRows.map((row) => { return row.data; }));
1095
1058
  }, []);
1096
1059
  useEffect(() => { onVisibleItemChanged?.(visibleItems); }, [visibleItems]);
1097
- 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 })] });
1060
+ 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, onContextMenuPreparing: onContextMenuPreparing, counterConfig: { show: true } }), (showExportForm && searchResult && onCloseExportForm) && _jsx(TMDataGridExportForm, { dataColumns: dataColumns, dataSource: dataSource, selectedRowKeys: selectedRowKeys, onCloseExportForm: onCloseExportForm, searchResult: searchResult })] });
1098
1061
  };
1099
1062
  //#region TMSearchResultSelector
1100
1063
  const StyledItemTemplate = styled.div `
@@ -5,7 +5,7 @@ import { DcmtInfo, DcmtOperationTypes, DownloadModes, DownloadTypes, SearchResul
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>, showCheckoutInformationFormCallback: () => void, viewHistoryCallback: () => 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
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>;
@@ -1,4 +1,4 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { AccessLevels, AccessLevelsEx, AppModules, FileFormats, LayoutModes, SDK_Globals, DcmtTypeListCacheService, LicenseModuleStatus } from '@topconsultnpm/sdk-ts';
3
3
  import { IconActivity, IconArchiveDoc, IconBatchUpdate, IconCheckFile, IconCheckIn, IconCircleInfo, IconCloseCircle, IconConvertFilePdf, IconDelete, IconDotsVerticalCircleOutline, IconDownload, IconEdit, IconExportTo, IconFileDots, IconHide, IconInfo, IconMenuCAArchive, IconPlatform, IconPreview, IconRelation, IconSearch, IconShow, IconStar, IconSubstFile, IconUndo, IconUserGroupOutline, SDKUI_Localizator, svgToString, searchResultToMetadataValues, IconSignaturePencil, IconArchiveMaster, IconArchiveDetail, IconDetailDcmts, isPdfEditorEnabled, IconPair, IconUnpair, IconSharedDcmt, IconShare, IconCopy, IconMoveToFolder } from '../../../helper';
4
4
  import ShowAlert from '../../base/TMAlert';
@@ -6,7 +6,8 @@ import { TMMessageBoxManager, ButtonNames, TMExceptionBoxManager } from '../../b
6
6
  import TMSpinner from '../../base/TMSpinner';
7
7
  import { DcmtOperationTypes, DownloadTypes, SearchResultContext } from '../../../ts';
8
8
  import { isXMLFileExt } from '../../../helper/dcmtsHelper';
9
- import { cicoIsEnabled } from '../../../helper/cicoHelper';
9
+ import { getDcmtCicoStatus } from '../../../helper/checkinCheckoutManager';
10
+ import TMSignatureInfoContent from './TMSignatureInfoContent';
10
11
  const disabledForSingleRow = (selectedItems, focusedItem) => {
11
12
  // Disabilita se ci sono più item selezionati o se focusedItem non ha TID/DID validi
12
13
  return selectedItems.length > 1 || focusedItem === undefined || focusedItem.TID === undefined || focusedItem.DID === undefined;
@@ -62,31 +63,14 @@ export const signatureInformationCallback = async (isMobile, inputDcmts) => {
62
63
  });
63
64
  return;
64
65
  }
65
- const [inputDcmt] = inputDcmts;
66
- let ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
67
- if (ue) {
68
- ue.TID = inputDcmt.TID;
69
- ue.DID = inputDcmt.DID;
70
- const res = await ue.GetSignersAsync().catch((error) => { throw error; });
71
- if (!res) {
72
- throw new Error("Informazioni di firma non disponibili");
73
- }
74
- TMMessageBoxManager.show({
75
- title: SDKUI_Localizator.SignatureInformation,
76
- buttons: [ButtonNames.OK],
77
- showToppy: false,
78
- resizable: true,
79
- initialWidth: !isMobile ? '500px' : undefined,
80
- message: (_jsx("div", { style: { lineHeight: "1.4em", overflowY: "auto", maxHeight: "400px", paddingRight: "8px", boxSizing: "border-box" }, children: res.signers && res.signers.length > 0 ? (res.signers.map((signer, idx) => (_jsxs("div", { style: {
81
- border: "1px solid #ccc",
82
- borderRadius: "10px",
83
- padding: "12px",
84
- marginBottom: "12px",
85
- background: "#f9f9f9",
86
- boxShadow: "0 1px 3px rgba(0,0,0,0.1)"
87
- }, children: [_jsxs("h3", { style: { margin: "0 0 8px", color: "#333" }, children: ["Firma ", signer.levelAndIndex] }), _jsxs("p", { style: { margin: "4px 0" }, children: [_jsx("strong", { children: "Intestatario:" }), _jsx("br", {}), signer.info1 ?? '-'] }), _jsxs("p", { style: { margin: "4px 0" }, children: [_jsx("strong", { children: "Riferimento temporale:" }), _jsx("br", {}), signer.info2 ?? '-'] }), _jsxs("p", { style: { margin: "4px 0" }, children: [_jsx("strong", { children: "Dettagli:" }), _jsx("br", {}), signer.info3 ?? '-'] })] }, idx)))) : (_jsx("p", { children: "Nessuna firma trovata" })) }))
88
- });
89
- }
66
+ TMMessageBoxManager.show({
67
+ title: SDKUI_Localizator.SignatureInformation,
68
+ buttons: [ButtonNames.OK],
69
+ showToppy: false,
70
+ resizable: true,
71
+ initialWidth: !isMobile ? '700px' : undefined,
72
+ message: _jsx(TMSignatureInfoContent, { inputDcmt: inputDcmts[0] })
73
+ });
90
74
  }
91
75
  catch (error) {
92
76
  console.error(error);
@@ -96,7 +80,7 @@ export const signatureInformationCallback = async (isMobile, inputDcmts) => {
96
80
  TMSpinner.hide();
97
81
  }
98
82
  };
99
- export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, confirmAttachments, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, hasMasterRelation, hasDetailRelation, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToManyDocuments, hasManyToManyRelation) => {
83
+ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, confirmAttachments, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, copyCheckoutPathToClipboardOperationCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, hasMasterRelation, hasDetailRelation, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToManyDocuments, hasManyToManyRelation) => {
100
84
  const isPdfEditorLicensed = SDK_Globals?.license?.dcmtArchiveLicenses?.[0]?.siX_60007?.status === LicenseModuleStatus.Licensed;
101
85
  let pdfEditorAvailable = false;
102
86
  if (dtd && dtd.widgets && dtd.widgets.length > 0) {
@@ -141,7 +125,6 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
141
125
  text: SDKUI_Localizator.LogDelete,
142
126
  operationType: 'multiRow',
143
127
  disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
144
- beginGroup: true,
145
128
  onClick: async () => {
146
129
  let dcmts = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
147
130
  await runOperationAsync(dcmts, DcmtOperationTypes.LogDelete, dcmts.length <= MAX_DCMTS_FOR_SELECTION_REFRESH ? onRefreshDataRowsAsync : onRefreshSearchAsync);
@@ -328,7 +311,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
328
311
  const selectedDocs = getAllFieldSelectedDcmtsOrFocused(selectedItems, focusedItem);
329
312
  // Take the first document (used for validation checks)
330
313
  const firstDoc = selectedDocs?.[0];
331
- const { cicoEnabled, checkoutStatus } = cicoIsEnabled(firstDoc, allUsers, dtd);
314
+ const { cicoEnabled, checkoutStatus } = getDcmtCicoStatus(firstDoc, allUsers, dtd);
332
315
  return {
333
316
  icon: svgToString(_jsx(IconFileDots, {})),
334
317
  text: "Check in/Check out",
@@ -340,36 +323,36 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
340
323
  disabled: !cicoEnabled || checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem),
341
324
  onClick: () => handleCheckOutOperationCallback(true),
342
325
  },
343
- /* {
326
+ {
344
327
  icon: "unlock",
345
328
  text: 'Check in',
346
- // onClick: () => handleCheckInOperationCallback(),
329
+ onClick: () => handleCheckInOperationCallback(),
347
330
  disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem)
348
- }, */
331
+ },
349
332
  {
350
333
  icon: "remove",
351
334
  text: SDKUI_Localizator.CancelCheckOut,
352
335
  disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem),
353
336
  onClick: () => handleCheckOutOperationCallback(false),
354
337
  },
355
- {
356
- icon: "clock",
357
- text: SDKUI_Localizator.History,
358
- disabled: checkoutStatus.version === 1 || disabledForSingleRow(selectedItems, focusedItem),
359
- onClick: viewHistoryCallback,
360
- },
361
338
  {
362
339
  icon: "info",
363
340
  text: SDKUI_Localizator.CheckoutInfo,
364
341
  onClick: showCheckoutInformationFormCallback,
365
342
  disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
366
343
  },
367
- /* {
344
+ {
368
345
  icon: "copy",
369
346
  text: SDKUI_Localizator.CopyCheckoutPath,
370
- // onClick: infoCheckCopyToClipboard,
347
+ onClick: copyCheckoutPathToClipboardOperationCallback,
371
348
  disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
372
- }, */
349
+ },
350
+ {
351
+ icon: "clock",
352
+ text: SDKUI_Localizator.History,
353
+ disabled: !cicoEnabled || disabledForSingleRow(selectedItems, focusedItem),
354
+ onClick: viewHistoryCallback,
355
+ },
373
356
  ]
374
357
  };
375
358
  };
@@ -684,7 +667,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
684
667
  ]
685
668
  },
686
669
  signatureMenuItem(),
687
- // checkinMenuItem(),
670
+ checkinMenuItem(),
688
671
  relationsMenuItem(),
689
672
  sharedDcmtsMenuItem(),
690
673
  // shareMenuItem(),
@@ -0,0 +1,6 @@
1
+ import { DcmtInfo } from "../../../ts";
2
+ interface TMSignatureInfoContentProps {
3
+ inputDcmt: DcmtInfo;
4
+ }
5
+ declare const TMSignatureInfoContent: (props: TMSignatureInfoContentProps) => import("react/jsx-runtime").JSX.Element | null;
6
+ export default TMSignatureInfoContent;