@topconsultnpm/sdkui-react 6.20.0-dev1.2 → 6.20.0-dev1.21

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 (49) 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 +0 -1
  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 +270 -173
  19. package/lib/components/features/documents/TMDcmtPreview.js +100 -33
  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 +76 -114
  24. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +1 -1
  25. package/lib/components/features/search/TMSearchResultsMenuItems.js +16 -17
  26. package/lib/components/features/search/TMViewHistoryDcmt.js +1 -1
  27. package/lib/components/forms/Login/TMLoginForm.js +2 -0
  28. package/lib/css/tm-sdkui.css +1 -1
  29. package/lib/helper/SDKUI_Globals.d.ts +13 -14
  30. package/lib/helper/SDKUI_Globals.js +9 -0
  31. package/lib/helper/SDKUI_Localizator.d.ts +8 -0
  32. package/lib/helper/SDKUI_Localizator.js +98 -0
  33. package/lib/helper/TMUtils.d.ts +3 -1
  34. package/lib/helper/TMUtils.js +51 -0
  35. package/lib/helper/checkinCheckoutManager.d.ts +85 -0
  36. package/lib/helper/checkinCheckoutManager.js +348 -0
  37. package/lib/helper/devextremeCustomMessages.d.ts +30 -0
  38. package/lib/helper/devextremeCustomMessages.js +30 -0
  39. package/lib/helper/helpers.js +7 -1
  40. package/lib/helper/index.d.ts +1 -0
  41. package/lib/helper/index.js +1 -0
  42. package/lib/helper/queryHelper.js +29 -0
  43. package/lib/hooks/useCheckInOutOperations.d.ts +28 -0
  44. package/lib/hooks/useCheckInOutOperations.js +223 -0
  45. package/lib/services/platform_services.d.ts +1 -1
  46. package/package.json +12 -10
  47. package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +0 -8
  48. package/lib/helper/cicoHelper.d.ts +0 -31
  49. 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)
@@ -357,7 +360,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
357
360
  const customButtonMenuItems = () => {
358
361
  const customButtonsItems = customButtonsLayout?.customButtons?.filter((customButton) => customButton.isForSearchResult && customButton.isForSearchResult > 0)
359
362
  .map((customButton) => ({
360
- icon: svgToString(TMImageLibrary({ imageID: customButton.glyphID, showPath: true })),
363
+ icon: svgToString(TMImageLibrary({ imageID: customButton.glyphID, showPath: false })),
361
364
  text: customButton.title || 'Bottone personalizzato',
362
365
  onClick: () => setCustomButton(customButton)
363
366
  }));
@@ -372,10 +375,9 @@ 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
- //disabilitato per ora
378
- //e.items.push(customButtonMenuItems());
380
+ e.items.push(customButtonMenuItems());
379
381
  }
380
382
  };
381
383
  const handleCheckOutOperationCallback = async (checkout) => {
@@ -383,62 +385,15 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
383
385
  const firstDoc = selectedDocs?.[0];
384
386
  if (!firstDoc)
385
387
  return;
386
- const title = checkout ? 'Check out' : SDKUI_Localizator.CancelCheckOut;
387
- const msg = checkout ? SDKUI_Localizator.ExecuteCheckOutQuestion : SDKUI_Localizator.ExecuteCancelCheckOutQuestion;
388
- TMMessageBoxManager.show({
389
- title: title,
390
- message: msg,
391
- buttons: [ButtonNames.YES, ButtonNames.NO],
392
- onButtonClick: async (e) => {
393
- let result = [];
394
- if (e !== ButtonNames.YES)
395
- return;
396
- try {
397
- const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
398
- if (ue) {
399
- ue.TID = firstDoc.TID;
400
- ue.DID = firstDoc.DID;
401
- if (checkout) {
402
- await ue.CheckOutAsync()
403
- .then(async () => {
404
- const filename = fromDTD?.nameLoc || SDKUI_Localizator.SearchResult;
405
- await downloadFilesCallback(filename, [firstDoc], true, downloadDcmtsAsync);
406
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
407
- await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
408
- })
409
- .catch((error) => {
410
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
411
- throw error;
412
- });
413
- }
414
- else {
415
- await ue.UndoCheckOutAsync()
416
- .then(async () => {
417
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
418
- // Remove the corresponding draft checkout item
419
- updateDcmtCheckoutItem({
420
- TID: firstDoc.TID.toString(),
421
- DID: firstDoc.DID.toString(),
422
- checkoutFolder: "",
423
- checkoutName: ""
424
- }, "remove");
425
- await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
426
- })
427
- .catch((error) => {
428
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
429
- throw error;
430
- });
431
- }
432
- }
433
- }
434
- catch (error) {
435
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
436
- }
437
- finally {
438
- TMResultManager.show(result, title, "ID", undefined);
439
- }
440
- }
441
- });
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);
442
397
  };
443
398
  const refreshDataGridAfterRemoveAsync = async () => {
444
399
  let index = selectedSearchResult?.dtdResult?.columns?.findIndex(col => col.caption === 'DID');
@@ -617,8 +572,6 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
617
572
  break;
618
573
  }
619
574
  };
620
- 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 &&
621
- _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()])*/ })] });
622
575
  const handleAddItem = (tid, did) => {
623
576
  let newItem = { TID: tid ?? 0, DID: did ?? 0 };
624
577
  setSecondaryMasterDcmts((prevItems) => [...prevItems, newItem]);
@@ -626,34 +579,42 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
626
579
  const handleRemoveItem = (tid, did) => {
627
580
  setSecondaryMasterDcmts((prevItems) => prevItems.filter(item => item.TID !== tid && item.DID !== did));
628
581
  };
629
- const fetchBlogDataAsync = useCallback(async (tid, did) => {
630
- try {
631
- TMSpinner.show({ description: 'Caricamento - Bacheca...' });
632
- const res = await SDK_Globals.tmSession?.NewSearchEngine().BlogRetrieveAsync(tid, did);
633
- setBlogsDatasource(res ?? []);
634
- setHasLoadedDataOnce(true);
635
- setLastLoadedDid(did);
636
- }
637
- catch (e) {
638
- let err = e;
639
- TMExceptionBoxManager.show({ exception: err });
640
- }
641
- finally {
642
- TMSpinner.hide();
643
- }
644
- }, []);
645
582
  const handleSavedAsyncCallback = useCallback(async (tid, did, metadataResult) => {
646
583
  await refreshFocusedDataRowAsync(tid, did, true, metadataResult);
647
- }, []);
584
+ }, [refreshFocusedDataRowAsync]);
648
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' }) })] });
649
610
  const tmSearchResult = useMemo(() => (!searchResults || searchResults.length <= 0)
650
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 }) })] })
651
612
  :
652
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 ?
653
614
  _jsx(TMLayoutItem, { children: _jsx(TMSearchResultSelector, { searchResults: currentSearchResults, disableAccordionIfSingleCategory: disableAccordionIfSingleCategory, selectedTID: selectedSearchResultTID, selectedSearchResult: selectedSearchResult, autoSelectFirst: !isMobile || currentSearchResults.length === 1, onSelectionChanged: onSearchResultSelectionChanged }) })
654
615
  :
655
- _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 &&
656
- _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: () => {
657
618
  setIsOpenBatchUpdate(false);
658
619
  }, onSavedCallbackAsync: async () => {
659
620
  setIsOpenBatchUpdate(false);
@@ -712,7 +673,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
712
673
  _jsx(TMModal, { title: "Documenti condivisi", onClose: () => {
713
674
  setSharedDcmtSearchResults([]);
714
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) &&
715
- _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 })] }), [
716
677
  searchResults,
717
678
  selectedSearchResult,
718
679
  lastUpdateSearchTime,
@@ -765,9 +726,9 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
765
726
  sharedDcmtFile,
766
727
  onRefreshSearchAsync
767
728
  ]);
768
- 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]);
769
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]);
770
- const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt }), [currentDcmt]);
731
+ const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt }, refreshPreviewTrigger), [currentDcmt, refreshPreviewTrigger]);
771
732
  const allInitialPanelVisibility = {
772
733
  'tmSearchResult': true,
773
734
  'tmBlog': false,
@@ -825,10 +786,10 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
825
786
  gap: Gutters.getGutters(),
826
787
  width: '100%',
827
788
  height: '100%',
828
- }, 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) ?
829
- _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar })
830
- :
831
- _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) => {
832
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}`));
833
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: () => {
834
795
  setIsOpenArchiveRelationForm(false);
@@ -841,7 +802,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
841
802
  setArchiveRelatedDcmtFormTID(undefined);
842
803
  setArchiveRelatedDcmtFormMids([]);
843
804
  await onRefreshSearchAsync?.();
844
- }, 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)] })] }));
845
806
  };
846
807
  export default TMSearchResult;
847
808
  const renderDcmtIcon = (cellData, onDownloadDcmtsAsync, openInOffice) => {
@@ -929,7 +890,7 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, allUsers, inputFocusedItem,
929
890
  const isLexProt = cellData.data.IsLexProt == 1;
930
891
  // Prima colonna: la colonna numero 2 (dopo icona e selezione)
931
892
  const isFirstColumn = cellData.columnIndex === 2;
932
- const { checkoutStatus } = cicoIsEnabled(cellData.data, allUsers, fromDTD);
893
+ const { checkoutStatus } = getDcmtCicoStatus(cellData.data, allUsers, fromDTD);
933
894
  const shouldShowCheckoutIcon = isFirstColumn && checkoutStatus.isCheckedOut && checkoutStatus.icon;
934
895
  let style = {};
935
896
  if (isLogDel) {
@@ -1081,7 +1042,8 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, allUsers, inputFocusedItem,
1081
1042
  width: 50,
1082
1043
  cellRender: (cellData) => renderDcmtIcon(cellData, onDownloadDcmtsAsync, openInOffice),
1083
1044
  allowResizing: false,
1084
- filterOperations: ['=', "anyof"]
1045
+ filterOperations: ['=', "anyof"],
1046
+ allowHiding: false,
1085
1047
  },
1086
1048
  ...columns.filter(col => col.dataField !== 'FILEEXT')
1087
1049
  ];
@@ -1095,7 +1057,7 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, allUsers, inputFocusedItem,
1095
1057
  setVisibleItems(visibleRows.map((row) => { return row.data; }));
1096
1058
  }, []);
1097
1059
  useEffect(() => { onVisibleItemChanged?.(visibleItems); }, [visibleItems]);
1098
- 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 })] });
1099
1061
  };
1100
1062
  //#region TMSearchResultSelector
1101
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>;
@@ -6,7 +6,7 @@ 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
10
  const disabledForSingleRow = (selectedItems, focusedItem) => {
11
11
  // Disabilita se ci sono più item selezionati o se focusedItem non ha TID/DID validi
12
12
  return selectedItems.length > 1 || focusedItem === undefined || focusedItem.TID === undefined || focusedItem.DID === undefined;
@@ -96,7 +96,7 @@ export const signatureInformationCallback = async (isMobile, inputDcmts) => {
96
96
  TMSpinner.hide();
97
97
  }
98
98
  };
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) => {
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, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, copyCheckoutPathToClipboardOperationCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, hasMasterRelation, hasDetailRelation, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToManyDocuments, hasManyToManyRelation) => {
100
100
  const isPdfEditorLicensed = SDK_Globals?.license?.dcmtArchiveLicenses?.[0]?.siX_60007?.status === LicenseModuleStatus.Licensed;
101
101
  let pdfEditorAvailable = false;
102
102
  if (dtd && dtd.widgets && dtd.widgets.length > 0) {
@@ -141,7 +141,6 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
141
141
  text: SDKUI_Localizator.LogDelete,
142
142
  operationType: 'multiRow',
143
143
  disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
144
- beginGroup: true,
145
144
  onClick: async () => {
146
145
  let dcmts = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
147
146
  await runOperationAsync(dcmts, DcmtOperationTypes.LogDelete, dcmts.length <= MAX_DCMTS_FOR_SELECTION_REFRESH ? onRefreshDataRowsAsync : onRefreshSearchAsync);
@@ -328,7 +327,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
328
327
  const selectedDocs = getAllFieldSelectedDcmtsOrFocused(selectedItems, focusedItem);
329
328
  // Take the first document (used for validation checks)
330
329
  const firstDoc = selectedDocs?.[0];
331
- const { cicoEnabled, checkoutStatus } = cicoIsEnabled(firstDoc, allUsers, dtd);
330
+ const { cicoEnabled, checkoutStatus } = getDcmtCicoStatus(firstDoc, allUsers, dtd);
332
331
  return {
333
332
  icon: svgToString(_jsx(IconFileDots, {})),
334
333
  text: "Check in/Check out",
@@ -340,36 +339,36 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
340
339
  disabled: !cicoEnabled || checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem),
341
340
  onClick: () => handleCheckOutOperationCallback(true),
342
341
  },
343
- /* {
342
+ {
344
343
  icon: "unlock",
345
344
  text: 'Check in',
346
- // onClick: () => handleCheckInOperationCallback(),
345
+ onClick: () => handleCheckInOperationCallback(),
347
346
  disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem)
348
- }, */
347
+ },
349
348
  {
350
349
  icon: "remove",
351
350
  text: SDKUI_Localizator.CancelCheckOut,
352
351
  disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem),
353
352
  onClick: () => handleCheckOutOperationCallback(false),
354
353
  },
355
- {
356
- icon: "clock",
357
- text: SDKUI_Localizator.History,
358
- disabled: checkoutStatus.version === 1 || disabledForSingleRow(selectedItems, focusedItem),
359
- onClick: viewHistoryCallback,
360
- },
361
354
  {
362
355
  icon: "info",
363
356
  text: SDKUI_Localizator.CheckoutInfo,
364
357
  onClick: showCheckoutInformationFormCallback,
365
358
  disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
366
359
  },
367
- /* {
360
+ {
368
361
  icon: "copy",
369
362
  text: SDKUI_Localizator.CopyCheckoutPath,
370
- // onClick: infoCheckCopyToClipboard,
363
+ onClick: copyCheckoutPathToClipboardOperationCallback,
371
364
  disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
372
- }, */
365
+ },
366
+ {
367
+ icon: "clock",
368
+ text: SDKUI_Localizator.History,
369
+ disabled: !cicoEnabled || disabledForSingleRow(selectedItems, focusedItem),
370
+ onClick: viewHistoryCallback,
371
+ },
373
372
  ]
374
373
  };
375
374
  };
@@ -684,7 +683,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
684
683
  ]
685
684
  },
686
685
  signatureMenuItem(),
687
- // checkinMenuItem(),
686
+ checkinMenuItem(),
688
687
  relationsMenuItem(),
689
688
  sharedDcmtsMenuItem(),
690
689
  // shareMenuItem(),
@@ -140,7 +140,7 @@ const TMViewHistoryDcmt = (props) => {
140
140
  await downloadDcmtsAsync(files, DownloadTypes.Dcmt, "download");
141
141
  };
142
142
  const deleteFilesCallback = () => {
143
- if (!inputDcmt || !focusedRowKey)
143
+ if (!focusedRowKey)
144
144
  return;
145
145
  const currentDcmt = dcmtHistory.find(dcmt => dcmt.id === focusedRowKey);
146
146
  if (currentDcmt && currentDcmt.id) {
@@ -8,6 +8,7 @@ import frMessages from "devextreme/localization/messages/fr.json";
8
8
  import itMessages from "devextreme/localization/messages/it.json";
9
9
  import ptMessages from "devextreme/localization/messages/pt.json";
10
10
  import { locale as dxlocale, loadMessages } from "devextreme/localization";
11
+ import { devextremeCustomMessages } from "../../../helper/devextremeCustomMessages";
11
12
  import styled from "styled-components";
12
13
  import Menu from "./Menu";
13
14
  import TextBox from "./TextBox";
@@ -81,6 +82,7 @@ export const useCultureID = ({ cultureID = CultureIDs.It_IT }) => {
81
82
  loadMessages(frMessages);
82
83
  loadMessages(itMessages);
83
84
  loadMessages(ptMessages);
85
+ loadMessages(devextremeCustomMessages); // Fix traduzioni mancanti in DevExtreme
84
86
  }, []);
85
87
  return (currentCultureID);
86
88
  };
@@ -1 +1 @@
1
- @import"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap";@import"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap";*{margin:0;padding:0;box-sizing:border-box;font-family:"Open Sans",sans-serif}.tm-tooltip-container-base,.tm-tooltip-container-base-right,.tm-tooltip-container-base-bottom,.tm-tooltip-container-base-left,.tm-tooltip-container-base-top{position:absolute;width:max-content;height:max-content;border-radius:5px;user-select:none;z-index:20000070}.tm-tooltip-container-base-top{top:-0.8rem;left:0;transform:translateY(-100%)}.tm-tooltip-container-base-left{left:-0.8rem;top:0;transform:translateX(-100%)}.tm-tooltip-container-base-bottom{bottom:-0.8rem;left:0;transform:translateY(100%)}.tm-tooltip-container-base-right{right:-0.8rem;top:0;transform:translateX(100%)}.tm-tooltip-arrow,.tm-tooltip-arrow-right,.tm-tooltip-arrow-left,.tm-tooltip-arrow-top,.tm-tooltip-arrow-bottom{position:absolute;width:0;height:0;z-index:50000}.tm-tooltip-arrow-bottom{top:-8px;left:8px;border-bottom:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-top{bottom:-8px;left:8px;border-top:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-left{top:8px;right:-8px;border-left:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-right{top:8px;left:-8px;border-right:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}#user-credentials-popup .dx-accordion-item-title::before{content:none !important}*{margin:0;padding:0;box-sizing:border-box;font-family:"Open Sans",sans-serif}.tm-tooltip-container-base,.tm-tooltip-container-base-top,.tm-tooltip-container-base-left,.tm-tooltip-container-base-bottom,.tm-tooltip-container-base-right{position:absolute;width:max-content;height:max-content;border-radius:5px;user-select:none;z-index:20000070}.tm-tooltip-container-base-top{top:-0.8rem;left:0;transform:translateY(-100%)}.tm-tooltip-container-base-left{left:-0.8rem;top:0;transform:translateX(-100%)}.tm-tooltip-container-base-bottom{bottom:-0.8rem;left:0;transform:translateY(100%)}.tm-tooltip-container-base-right{right:-0.8rem;top:0;transform:translateX(100%)}.tm-tooltip-arrow,.tm-tooltip-arrow-bottom,.tm-tooltip-arrow-top,.tm-tooltip-arrow-left,.tm-tooltip-arrow-right{position:absolute;width:0;height:0;z-index:50000}.tm-tooltip-arrow-bottom{top:-8px;left:8px;border-bottom:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-top{bottom:-8px;left:8px;border-top:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-left{top:8px;right:-8px;border-left:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-right{top:8px;left:-8px;border-right:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}#user-credentials-popup .dx-accordion-item-title::before{content:none !important}@keyframes show-error{0%{display:none;opacity:0;z-index:20000999}5%{display:block;opacity:1;z-index:20000999}95%{display:block;opacity:1;z-index:20000999}100%{opacity:0;display:none;z-index:20000999}}.tm-alert-animation-style{animation:show-error both;animation-timing-function:linear;animation-iteration-count:none;z-index:20000999}.tm-alert-container{position:absolute;width:100%;height:100%;z-index:20000999}@keyframes loading{from{width:0}to{width:100%}}.tm-alert-loading{width:100%;height:5px;position:absolute;bottom:0;left:0;animation:loading;animation-duration:5000ms}.tm-alert-icon{position:absolute;width:22px;height:22px;background-color:#fff;top:"20px";left:"20px";border-radius:50%;display:flex;align-items:center;justify-content:center}.dx-context-menu.dx-overlay-content{height:auto !important;max-height:none !important}.dx-context-menu .dx-menu-items-container{max-height:none !important}.custom-mentions-wrapper span.dx-mention span[contenteditable=false]>span:first-child{font-size:0;width:0;display:inline-block;overflow:hidden}.custom-mentions-wrapper span.dx-mention{color:#2559a5;font-weight:bold;background-color:rgba(0,0,0,0)}
1
+ @import"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap";@import"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap";*{margin:0;padding:0;box-sizing:border-box;font-family:"Open Sans",sans-serif}.tm-tooltip-container-base,.tm-tooltip-container-base-right,.tm-tooltip-container-base-bottom,.tm-tooltip-container-base-left,.tm-tooltip-container-base-top{position:absolute;width:max-content;height:max-content;border-radius:5px;user-select:none;z-index:20000070}.tm-tooltip-container-base-top{top:-0.8rem;left:0;transform:translateY(-100%)}.tm-tooltip-container-base-left{left:-0.8rem;top:0;transform:translateX(-100%)}.tm-tooltip-container-base-bottom{bottom:-0.8rem;left:0;transform:translateY(100%)}.tm-tooltip-container-base-right{right:-0.8rem;top:0;transform:translateX(100%)}.tm-tooltip-arrow,.tm-tooltip-arrow-right,.tm-tooltip-arrow-left,.tm-tooltip-arrow-top,.tm-tooltip-arrow-bottom{position:absolute;width:0;height:0;z-index:50000}.tm-tooltip-arrow-bottom{top:-8px;left:8px;border-bottom:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-top{bottom:-8px;left:8px;border-top:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-left{top:8px;right:-8px;border-left:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-right{top:8px;left:-8px;border-right:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}#user-credentials-popup .dx-accordion-item-title::before{content:none !important}*{margin:0;padding:0;box-sizing:border-box;font-family:"Open Sans",sans-serif}.tm-tooltip-container-base,.tm-tooltip-container-base-top,.tm-tooltip-container-base-left,.tm-tooltip-container-base-bottom,.tm-tooltip-container-base-right{position:absolute;width:max-content;height:max-content;border-radius:5px;user-select:none;z-index:20000070}.tm-tooltip-container-base-top{top:-0.8rem;left:0;transform:translateY(-100%)}.tm-tooltip-container-base-left{left:-0.8rem;top:0;transform:translateX(-100%)}.tm-tooltip-container-base-bottom{bottom:-0.8rem;left:0;transform:translateY(100%)}.tm-tooltip-container-base-right{right:-0.8rem;top:0;transform:translateX(100%)}.tm-tooltip-arrow,.tm-tooltip-arrow-bottom,.tm-tooltip-arrow-top,.tm-tooltip-arrow-left,.tm-tooltip-arrow-right{position:absolute;width:0;height:0;z-index:50000}.tm-tooltip-arrow-bottom{top:-8px;left:8px;border-bottom:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-top{bottom:-8px;left:8px;border-top:9px solid #fff;border-left:9px solid rgba(0,0,0,0);border-right:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-left{top:8px;right:-8px;border-left:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}.tm-tooltip-arrow-right{top:8px;left:-8px;border-right:9px solid #fff;border-top:9px solid rgba(0,0,0,0);border-bottom:9px solid rgba(0,0,0,0)}#user-credentials-popup .dx-accordion-item-title::before{content:none !important}@keyframes show-error{0%{display:none;opacity:0;z-index:20000999}5%{display:block;opacity:1;z-index:20000999}95%{display:block;opacity:1;z-index:20000999}100%{opacity:0;display:none;z-index:20000999}}.tm-alert-animation-style{animation:show-error both;animation-timing-function:linear;animation-iteration-count:none;z-index:20000999}.tm-alert-container{position:absolute;width:100%;height:100%;z-index:20000999}@keyframes loading{from{width:0}to{width:100%}}.tm-alert-loading{width:100%;height:5px;position:absolute;bottom:0;left:0;animation:loading;animation-duration:5000ms}.tm-alert-icon{position:absolute;width:22px;height:22px;background-color:#fff;top:"20px";left:"20px";border-radius:50%;display:flex;align-items:center;justify-content:center}.dx-context-menu.dx-overlay-content{height:auto !important;max-height:none !important}.dx-context-menu .dx-menu-items-container{max-height:none !important}.custom-mentions-wrapper span.dx-mention span[contenteditable=false]>span:first-child{font-size:0;width:0;display:inline-block;overflow:hidden}.custom-mentions-wrapper span.dx-mention{color:#2559a5;font-weight:bold;background-color:rgba(0,0,0,0)}.dx-treeview-node.dx-treeview-item-with-checkbox.dx-state-selected.dx-treeview-root-node.dx-treeview-node-is-leaf[aria-disabled=true]{display:none !important}
@@ -1,4 +1,5 @@
1
1
  import { InvoiceRetrieveFormats, ObjectClasses, OrderRetrieveFormats } from "@topconsultnpm/sdk-ts";
2
+ import { CheckoutInfo } from "./checkinCheckoutManager";
2
3
  export declare const dcmtsFileCacheDownload: Map<string, File>;
3
4
  export declare const dcmtsFileCachePreview: Map<string, File>;
4
5
  export declare const CACHE_SIZE_LIMIT = 10;
@@ -16,8 +17,8 @@ export declare class UserSettings {
16
17
  searchSettings: SearchSettings;
17
18
  themeSettings: ThemeSettings;
18
19
  dcmtFormSettings: DcmtFormSettings[];
19
- wgDraftCheckoutInfo: WgDraftCheckoutInfo[];
20
- dcmtCheckoutInfo: DcmtCheckoutInfo[];
20
+ wgDraftCheckoutInfo: CheckoutInfo[];
21
+ dcmtCheckoutInfo: CheckoutInfo[];
21
22
  defaultCheckInOutFolder: string;
22
23
  constructor(skipCssUpdate?: boolean);
23
24
  /** Load settings from local storage or other sources */
@@ -53,6 +54,16 @@ export declare class SearchSettings {
53
54
  mruTIDs: number[];
54
55
  defaultTree: number;
55
56
  previewThreshold: number;
57
+ floatingMenuBar: FloatingMenuBarSettings;
58
+ }
59
+ export declare class FloatingMenuBarSettings {
60
+ orientation: 'horizontal' | 'vertical';
61
+ pinnedItemIds: string[];
62
+ itemIds: string[];
63
+ position: {
64
+ x: number;
65
+ y: number;
66
+ };
56
67
  }
57
68
  export declare class ArchivingSettings {
58
69
  mruTIDs: number[];
@@ -86,18 +97,6 @@ export declare class DcmtFormSettings {
86
97
  };
87
98
  };
88
99
  }
89
- export interface WgDraftCheckoutInfo {
90
- DID: string;
91
- TID: string;
92
- checkoutFolder: string;
93
- checkoutName: string;
94
- }
95
- export interface DcmtCheckoutInfo {
96
- DID: string;
97
- TID: string;
98
- checkoutFolder: string;
99
- checkoutName: string;
100
- }
101
100
  export declare class SDKUI_Globals {
102
101
  static userSettings: UserSettings;
103
102
  }