@topconsultnpm/sdkui-react 6.20.0-dev1.14 → 6.20.0-dev1.16

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 (50) hide show
  1. package/lib/components/base/TMCustomButton.js +0 -1
  2. package/lib/components/base/TMDataGrid.d.ts +2 -2
  3. package/lib/components/base/TMDataGrid.js +15 -4
  4. package/lib/components/features/documents/TMDcmtForm.js +146 -63
  5. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +8 -0
  6. package/lib/components/features/search/{TMSearchResultCheckoutInfoForm.js → TMDcmtCheckoutInfoForm.js} +2 -2
  7. package/lib/components/features/search/TMSearchResult.js +21 -195
  8. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +1 -1
  9. package/lib/components/features/search/TMSearchResultsMenuItems.js +3 -3
  10. package/lib/components/forms/Login/TMLoginForm.js +2 -0
  11. package/lib/helper/SDKUI_Localizator.d.ts +1 -0
  12. package/lib/helper/SDKUI_Localizator.js +10 -0
  13. package/lib/helper/checkinCheckoutManager.d.ts +30 -1
  14. package/lib/helper/checkinCheckoutManager.js +109 -29
  15. package/lib/helper/devextremeCustomMessages.d.ts +30 -0
  16. package/lib/helper/devextremeCustomMessages.js +30 -0
  17. package/lib/helper/helpers.js +7 -1
  18. package/lib/helper/queryHelper.js +17 -0
  19. package/lib/hooks/useCheckInOutOperations.d.ts +28 -0
  20. package/lib/hooks/useCheckInOutOperations.js +223 -0
  21. package/package.json +1 -1
  22. package/lib/components/NewComponents/ContextMenu/TMContextMenu.d.ts +0 -4
  23. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +0 -187
  24. package/lib/components/NewComponents/ContextMenu/hooks.d.ts +0 -11
  25. package/lib/components/NewComponents/ContextMenu/hooks.js +0 -48
  26. package/lib/components/NewComponents/ContextMenu/index.d.ts +0 -2
  27. package/lib/components/NewComponents/ContextMenu/index.js +0 -1
  28. package/lib/components/NewComponents/ContextMenu/styles.d.ts +0 -27
  29. package/lib/components/NewComponents/ContextMenu/styles.js +0 -308
  30. package/lib/components/NewComponents/ContextMenu/types.d.ts +0 -26
  31. package/lib/components/NewComponents/ContextMenu/types.js +0 -1
  32. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.d.ts +0 -4
  33. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +0 -370
  34. package/lib/components/NewComponents/FloatingMenuBar/index.d.ts +0 -2
  35. package/lib/components/NewComponents/FloatingMenuBar/index.js +0 -2
  36. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +0 -38
  37. package/lib/components/NewComponents/FloatingMenuBar/styles.js +0 -267
  38. package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +0 -30
  39. package/lib/components/NewComponents/FloatingMenuBar/types.js +0 -1
  40. package/lib/components/NewComponents/Notification/Notification.d.ts +0 -4
  41. package/lib/components/NewComponents/Notification/Notification.js +0 -60
  42. package/lib/components/NewComponents/Notification/NotificationContainer.d.ts +0 -8
  43. package/lib/components/NewComponents/Notification/NotificationContainer.js +0 -33
  44. package/lib/components/NewComponents/Notification/index.d.ts +0 -2
  45. package/lib/components/NewComponents/Notification/index.js +0 -2
  46. package/lib/components/NewComponents/Notification/styles.d.ts +0 -21
  47. package/lib/components/NewComponents/Notification/styles.js +0 -180
  48. package/lib/components/NewComponents/Notification/types.d.ts +0 -18
  49. package/lib/components/NewComponents/Notification/types.js +0 -1
  50. package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +0 -8
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
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';
3
+ import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, MetadataFormats, LayoutModes, TemplateTIDs, DcmtTypeListCacheService, AccessLevels, SystemMIDsAsNumber, RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats, AccessLevelsEx, LayoutCacheService, UserListCacheService } from '@topconsultnpm/sdk-ts';
4
4
  import styled from 'styled-components';
5
5
  import { getAllFieldSelectedDcmtsOrFocused, getCommandsMenuItems, getSelectedDcmtsOrFocused } from './TMSearchResultsMenuItems';
6
- import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, IconDownload, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, TMCommandsContextMenu, getExceptionMessage, IconCheck, svgToString, TMImageLibrary, SDKUI_Globals, convertSearchResultDescriptorToFileItems, dcmtsFileCachePreview, removeDcmtsFileCache } from '../../../helper';
6
+ import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, IconDownload, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, TMCommandsContextMenu, 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';
@@ -39,14 +39,14 @@ import TMChooserForm from '../../forms/TMChooserForm';
39
39
  import TMModal from '../../base/TMModal';
40
40
  import TMSearch from './TMSearch';
41
41
  import TMArchive from '../archive/TMArchive';
42
- import { TMResultManager } from '../../forms/TMResultDialog';
43
42
  import TMCustomButton from '../../base/TMCustomButton';
44
43
  import ToppyDraggableHelpCenter from '../assistant/ToppyDraggableHelpCenter';
45
44
  import TMSignSettingsForm from './TMSignSettingsForm';
46
- import { getDcmtCicoStatus, cicoDownloadFilesCallback, getCicoDownloadFileName, renderCicoCheckInContent, validateCicoFileName, updateCicoCheckoutStorageItem } from '../../../helper/checkinCheckoutManager';
47
- import TMSearchResultCheckoutInfoForm from './TMSearchResultCheckoutInfoForm';
45
+ import { getDcmtCicoStatus } from '../../../helper/checkinCheckoutManager';
48
46
  import TMViewHistoryDcmt from './TMViewHistoryDcmt';
49
47
  import TMBlogCommentForm from '../blog/TMBlogCommentForm';
48
+ import { useCheckInOutOperations } from '../../../hooks/useCheckInOutOperations';
49
+ import TMDcmtCheckoutInfoForm from './TMDcmtCheckoutInfoForm';
50
50
  let abortControllerLocal = new AbortController();
51
51
  //#region Helper Methods
52
52
  export const getSearchResultCountersSingleCategory = (searchResults) => {
@@ -97,6 +97,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
97
97
  const [confirmFormat, ConfirmFormatDialog] = useInputCvtFormatDialog();
98
98
  const { openConfirmAttachmentsDialog, ConfirmAttachmentsDialog } = useInputAttachmentsDialog();
99
99
  const { abortController, showWaitPanel, waitPanelTitle, showPrimary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, downloadDcmtsAsync, runOperationAsync, getDcmtFileAsync } = useDcmtOperations();
100
+ const { showHistory, showHistoryCallback, hideHistoryCallback, showCheckoutInformationForm, commentFormState, hideCommentFormCallback, showCheckoutInformationFormCallback, hideCheckoutInformationFormCallback, copyCheckoutPathToClipboardCallback, handleCheckOutCallback, handleCheckInCallback, refreshPreviewTrigger, showCicoWaitPanel, cicoWaitPanelTitle, showCicoPrimaryProgress, cicoPrimaryProgressText, cicoPrimaryProgressValue, cicoPrimaryProgressMax, } = useCheckInOutOperations();
100
101
  const relatedDocuments = useRelatedDocuments({ selectedSearchResult, focusedItem, currentSearchResults });
101
102
  const { relatedDcmts, showRelatedDcmtsChooser, archiveType, isOpenDetails, isOpenMaster, isOpenArchiveRelationForm, archiveRelatedDcmtFormTID, archiveRelatedDcmtFormMids, relatedDcmtsChooserDataSource, showPairDcmtsModal, isPairingManyToMany, pairedSearchResults, manyToManyRelations, selectedManyToManyRelation, showManyToManyChooser, manyToManyChooserDataSource, showPairSearchModal, pairSearchModalTargetTID, pairSearchModalParentTID, pairSearchModalParentDID, pairSearchModalRelation, pairSearchModalInputMids, currentTIDHasDetailRelations, currentTIDHasMasterRelations, canArchiveMasterRelation, canArchiveDetailRelation, hasManyToManyRelation, setIsOpenDetails, setIsOpenMaster, setShowRelatedDcmtsChooser, setShowManyToManyChooser, setShowPairDcmtsModal, setShowPairSearchModal, setIsOpenArchiveRelationForm, setArchiveType, setArchiveRelatedDcmtFormTID, setArchiveRelatedDcmtFormMids, pairFloatingActionConfig, pairSearchModalFloatingActionConfig, archiveMasterDocuments, archiveDetailDocuments, pairManyToMany, checkRelatedDcmtsArchiveCapability, checkManyToManyCapability, archiveRelatedDcmtHandler, executeManyToManyPairing, } = relatedDocuments;
102
103
  const [customButtonsLayout, setCustomButtonsLayout] = useState();
@@ -111,39 +112,12 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
111
112
  const disableSignApproveDisable = selectedDocs.length !== 1 || (selectedDocs.length === 1 && selectedDocs[0].FILEEXT === null);
112
113
  const dcmtsReturned = (searchResults?.length > 1 ? selectedSearchResult?.dcmtsReturned : searchResults[0]?.dcmtsReturned ?? 0);
113
114
  const dcmtsFound = (searchResults?.length > 1 ? selectedSearchResult?.dcmtsFound : searchResults[0]?.dcmtsFound ?? 0);
114
- // State to manage show history selected file
115
- const [showHistory, setShowHistory] = useState(false);
116
115
  const [allUsers, setAllUsers] = useState([]);
117
- // State to manage show history selected file
118
- const [showCheckoutInformationForm, setShowCheckoutInformationForm] = useState(false);
119
- // State variable to control the visibility of the wait panel
120
- const [showLocalWaitPanel, setShowLocalWaitPanel] = useState(false);
121
- // State variable to store the title of the wait panel
122
- const [localWaitPanelTitle, setLocalWaitPanelTitle] = useState('');
123
- // State variable to control the visibility of the primary section of the wait panel
124
- const [localShowPrimary, setLocalShowPrimary] = useState(false);
125
- // State variable to store the primary text of the wait panel
126
- const [localWaitPanelTextPrimary, setLocalWaitPanelTextPrimary] = useState('');
127
- // State variable to track the current value of the primary progress indicator in the wait panel
128
- const [localWaitPanelValuePrimary, setLocalWaitPanelValuePrimary] = useState(0);
129
- // State variable to define the maximum value for the primary progress indicator in the wait panel
130
- const [localWaitPanelMaxValuePrimary, setLocalWaitPanelMaxValuePrimary] = useState(0);
131
- /* State to manage show attachment badge on comment form */
132
- const [removeAndEditAttachmentCommentForm, setRemoveAndEditAttachmentCommentForm] = useState(true);
133
- // State to manage show comment form selected file
134
- const [showCommentForm, setShowCommentForm] = useState(false);
135
- // State to manage show comment form close button
136
- const [isCommentRequired, setIsCommentRequired] = useState(false);
137
116
  // Stato per triggerare il refresh del blog dall'esterno
138
117
  const [refreshBlogTrigger, setRefreshBlogTrigger] = useState(0);
139
- // Stato per triggerare il refresh della preview dall'esterno
140
- const [refreshPreviewTrigger, setRefreshPreviewTrigger] = useState(0);
141
118
  const triggerBlogRefresh = useCallback(async () => {
142
119
  setRefreshBlogTrigger(prev => prev + 1);
143
120
  }, []);
144
- const triggerPreviewRefresh = useCallback(() => {
145
- setRefreshPreviewTrigger(prev => prev + 1);
146
- }, []);
147
121
  useEffect(() => {
148
122
  const fetchAllUsers = async () => {
149
123
  const users = await UserListCacheService.GetAllAsync();
@@ -317,33 +291,12 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
317
291
  const closeSignSettingsForm = useCallback(() => {
318
292
  setShowSignSettingsForm(false);
319
293
  }, []);
320
- const viewHistoryCallback = useCallback(() => {
321
- setShowHistory(true);
322
- }, []);
323
- const showCheckoutInformationFormCallback = useCallback(() => {
324
- setShowCheckoutInformationForm(true);
325
- }, []);
326
- const showCommentFormCallback = useCallback(() => {
327
- setShowCommentForm(true);
328
- }, []);
329
- const infoCheckCopyToClipboard = () => {
294
+ const copyCheckoutPathToClipboardOperationCallback = () => {
330
295
  const selectedDocs = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
331
296
  const firstDoc = selectedDocs?.[0];
332
297
  if (!firstDoc)
333
298
  return;
334
- const defaultCheckInOutFolder = SDKUI_Globals.userSettings.defaultCheckInOutFolder ?? "Download";
335
- const wGSDraftCheckoutItemCurrentItems = [...SDKUI_Globals.userSettings.dcmtCheckoutInfo];
336
- const existingItem = wGSDraftCheckoutItemCurrentItems.find((item) => item.TID === firstDoc.TID.toString() && item.DID === firstDoc.DID.toString());
337
- const folder = existingItem && existingItem.checkoutFolder && existingItem.checkoutFolder !== "" ? existingItem.checkoutFolder : defaultCheckInOutFolder;
338
- const name = existingItem?.checkoutName ?? getCicoDownloadFileName({ type: 'dcmtInfo', dcmtInfo: firstDoc, originalFileName: fromDTD?.name ?? SDKUI_Localizator.SearchResult }, true, false);
339
- const textToCopy = folder ? `${folder}\\${name}` : name;
340
- navigator.clipboard.writeText(textToCopy)
341
- .then(() => {
342
- ShowAlert({ message: SDKUI_Localizator.OperationSuccess, mode: 'success', duration: 5000, title: SDKUI_Localizator.CopyToClipboard });
343
- })
344
- .catch(err => {
345
- ShowAlert({ message: err, mode: 'error', duration: 5000, title: SDKUI_Localizator.OperationResult });
346
- });
299
+ copyCheckoutPathToClipboardCallback(firstDoc, fromDTD?.name ?? SDKUI_Localizator.SearchResult);
347
300
  };
348
301
  const getTitleHeader = () => {
349
302
  let counters = (showSelector && disableAccordionIfSingleCategory && searchResults.length > 1) ? getSearchResultCountersSingleCategory(searchResults) : "";
@@ -420,7 +373,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
420
373
  return;
421
374
  if (e.target === 'content') {
422
375
  e.items = e.items || [];
423
- const menuItems = getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, infoCheckCopyToClipboard, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation);
376
+ const menuItems = getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, showHistoryCallback, copyCheckoutPathToClipboardOperationCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation);
424
377
  e.items.push(...menuItems);
425
378
  e.items.push(customButtonMenuItems());
426
379
  }
@@ -430,143 +383,16 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
430
383
  const firstDoc = selectedDocs?.[0];
431
384
  if (!firstDoc)
432
385
  return;
433
- const title = checkout ? 'Check out' : SDKUI_Localizator.CancelCheckOut;
434
- const msg = checkout ? SDKUI_Localizator.ExecuteCheckOutQuestion : SDKUI_Localizator.ExecuteCancelCheckOutQuestion;
435
- TMMessageBoxManager.show({
436
- title: title,
437
- message: msg,
438
- buttons: [ButtonNames.YES, ButtonNames.NO],
439
- onButtonClick: async (e) => {
440
- if (e !== ButtonNames.YES)
441
- return;
442
- let result = [];
443
- try {
444
- setLocalWaitPanelTitle(title);
445
- setShowLocalWaitPanel(true);
446
- setLocalShowPrimary(true);
447
- abortControllerLocal = new AbortController();
448
- let i = 0;
449
- const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
450
- if (ue) {
451
- ue.TID = firstDoc.TID;
452
- ue.DID = firstDoc.DID;
453
- if (checkout) {
454
- await ue.CheckOutAsync()
455
- .then(async () => {
456
- const filename = fromDTD?.nameLoc || SDKUI_Localizator.SearchResult;
457
- await cicoDownloadFilesCallback([{ type: 'dcmtInfo', dcmtInfo: firstDoc, originalFileName: filename }], true, downloadDcmtsAsync);
458
- result.push({ rowIndex: i, id1: firstDoc.TID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
459
- await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
460
- })
461
- .catch((error) => {
462
- result.push({ rowIndex: i, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
463
- throw error;
464
- });
465
- }
466
- else {
467
- await ue.UndoCheckOutAsync()
468
- .then(async () => {
469
- result.push({ rowIndex: i, id1: firstDoc.TID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
470
- // Remove the corresponding draft checkout item
471
- updateCicoCheckoutStorageItem({ TID: firstDoc.TID.toString(), DID: firstDoc.DID.toString(), checkoutFolder: "", checkoutName: "" }, "dcmtInfo", "remove");
472
- await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
473
- })
474
- .catch((error) => {
475
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
476
- throw error;
477
- });
478
- }
479
- }
480
- }
481
- catch (error) {
482
- result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
483
- }
484
- finally {
485
- setLocalWaitPanelTextPrimary('');
486
- setLocalWaitPanelMaxValuePrimary(0);
487
- setLocalWaitPanelValuePrimary(0);
488
- setShowLocalWaitPanel(false);
489
- TMResultManager.show(result, title, "ID", undefined);
490
- }
491
- }
492
- });
386
+ await handleCheckOutCallback(firstDoc, checkout, fromDTD?.name ?? SDKUI_Localizator.SearchResult, downloadDcmtsAsync, undefined, refreshFocusedDataRowAsync);
493
387
  };
494
- const triggerCommentOnFileAdd = (addedFiles) => {
495
- if (addedFiles.length > 0) {
496
- showCommentFormCallback();
497
- setIsCommentRequired(true);
498
- setRemoveAndEditAttachmentCommentForm(false);
499
- }
500
- };
501
- const handleCheckInOperationCallback = useCallback(() => {
388
+ const handleCheckInOperationCallback = async () => {
502
389
  const selectedDocs = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
503
390
  const firstDoc = selectedDocs?.[0];
504
391
  if (!firstDoc)
505
392
  return;
506
- // Create a new file input element
507
- const input = document.createElement("input");
508
- // Set the input type to "file" to allow file selection
509
- input.type = "file";
510
- // Set the accepted file types (e.g., images, PDFs, etc.)
511
- input.accept = "*/*";
512
- // Enable the input to accept one file at once
513
- input.multiple = false;
514
- // Add an event listener for when the file selection changes
515
- input.addEventListener('change', async (event) => {
516
- const fileInput = event.target;
517
- if (!fileInput.files || fileInput.files.length === 0)
518
- return;
519
- const file = fileInput.files[0];
520
- firstDoc.fileName = fromDTD?.name ?? SDKUI_Localizator.SearchResult;
521
- const validateFileName = validateCicoFileName({ type: 'dcmtInfo', dcmtInfo: firstDoc, originalFileName: firstDoc.fileName }, file.name);
522
- TMMessageBoxManager.show({
523
- resizable: true,
524
- buttons: [ButtonNames.YES, ButtonNames.NO],
525
- message: renderCicoCheckInContent({ type: 'dcmtInfo', dcmtInfo: firstDoc, originalFileName: firstDoc.fileName }, file, validateFileName.isValid, validateFileName.validationResults),
526
- title: "Check in",
527
- onButtonClick: async (e) => {
528
- if (e !== ButtonNames.YES)
529
- return;
530
- setLocalWaitPanelTitle('Check in');
531
- setShowLocalWaitPanel(true);
532
- setLocalShowPrimary(true);
533
- abortControllerLocal = new AbortController();
534
- let result = [];
535
- let i = 0;
536
- if (firstDoc.TID && firstDoc.DID) {
537
- try {
538
- const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
539
- if (ue) {
540
- ue.TID = firstDoc.TID;
541
- ue.DID = firstDoc.DID;
542
- await ue.CheckInAsync(file, "", abortControllerLocal.signal);
543
- // Remove the corresponding draft checkout item
544
- updateCicoCheckoutStorageItem({ TID: firstDoc.TID.toString(), DID: firstDoc.DID.toString(), checkoutFolder: "", checkoutName: "" }, "dcmtInfo", "remove");
545
- result.push({ rowIndex: i, id1: firstDoc.DID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
546
- await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
547
- const cacheKey = `${firstDoc.TID}-${firstDoc.DID}`;
548
- if (dcmtsFileCachePreview.has(cacheKey))
549
- removeDcmtsFileCache(cacheKey);
550
- triggerPreviewRefresh();
551
- triggerCommentOnFileAdd([firstDoc.DID]);
552
- }
553
- }
554
- catch (err) {
555
- result.push({ rowIndex: i, id1: i, id2: i, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
556
- }
557
- finally {
558
- setLocalWaitPanelTextPrimary('');
559
- setLocalWaitPanelMaxValuePrimary(0);
560
- setLocalWaitPanelValuePrimary(0);
561
- setShowLocalWaitPanel(false);
562
- TMResultManager.show(result, 'Check in', "ID", undefined, SDKUI_Localizator.CheckInSuccessMessage, 6000);
563
- }
564
- }
565
- },
566
- });
567
- });
568
- input.click();
569
- }, [selectedItems, focusedItem, getSelectedDcmtsOrFocused]);
393
+ firstDoc.fileName = fromDTD?.name ?? SDKUI_Localizator.SearchResult;
394
+ await handleCheckInCallback(firstDoc, undefined, refreshFocusedDataRowAsync);
395
+ };
570
396
  const refreshDataGridAfterRemoveAsync = async () => {
571
397
  let index = selectedSearchResult?.dtdResult?.columns?.findIndex(col => col.caption === 'DID');
572
398
  let selectedRows = [];
@@ -745,7 +571,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
745
571
  }
746
572
  };
747
573
  const searchResutlToolbar = _jsxs(_Fragment, { children: [(dcmtsReturned != dcmtsFound) && _jsx("p", { style: { backgroundColor: `white`, color: TMColors.primaryColor, textAlign: 'center', padding: '1px 4px', borderRadius: '3px', display: 'flex' }, children: `${dcmtsReturned}/${dcmtsFound} restituiti` }), context === SearchResultContext.FAVORITES_AND_RECENTS &&
748
- _jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '5px' }, children: _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconDelete, { color: 'white' }), caption: "Rimuovi da " + (selectedSearchResult?.category === "Favorites" ? '"Preferiti"' : '"Recenti"'), disabled: getSelectedDcmtsOrFocused(selectedItems, focusedItem).length <= 0, onClick: removeDcmtFromFavsOrRecents }) }), _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconRefresh, { color: 'white' }), caption: SDKUI_Localizator.Refresh, onClick: onRefreshSearchAsync }), _jsx(IconMenuVertical, { id: `commands-header-${id}`, color: 'white', cursor: 'pointer' }), _jsx(TMCommandsContextMenu, { target: `#commands-header-${id}`, showEvent: "click", menuItems: getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, infoCheckCopyToClipboard, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation).concat([customButtonMenuItems()]) })] });
574
+ _jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '5px' }, children: _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconDelete, { color: 'white' }), caption: "Rimuovi da " + (selectedSearchResult?.category === "Favorites" ? '"Preferiti"' : '"Recenti"'), disabled: getSelectedDcmtsOrFocused(selectedItems, focusedItem).length <= 0, onClick: removeDcmtFromFavsOrRecents }) }), _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconRefresh, { color: 'white' }), caption: SDKUI_Localizator.Refresh, onClick: onRefreshSearchAsync }), _jsx(IconMenuVertical, { id: `commands-header-${id}`, color: 'white', cursor: 'pointer' }), _jsx(TMCommandsContextMenu, { target: `#commands-header-${id}`, showEvent: "click", menuItems: getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, showHistoryCallback, copyCheckoutPathToClipboardOperationCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation).concat([customButtonMenuItems()]) })] });
749
575
  const handleAddItem = (tid, did) => {
750
576
  let newItem = { TID: tid ?? 0, DID: did ?? 0 };
751
577
  setSecondaryMasterDcmts((prevItems) => [...prevItems, newItem]);
@@ -755,7 +581,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
755
581
  };
756
582
  const handleSavedAsyncCallback = useCallback(async (tid, did, metadataResult) => {
757
583
  await refreshFocusedDataRowAsync(tid, did, true, metadataResult);
758
- }, []);
584
+ }, [refreshFocusedDataRowAsync]);
759
585
  const showToppyForApprove = (isVisible && fromDTD?.templateTID === TemplateTIDs.WF_WIApprView && !isOpenDcmtForm && !isOpenDetails && !isOpenMaster);
760
586
  const tmSearchResult = useMemo(() => (!searchResults || searchResults.length <= 0)
761
587
  ? _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 }) })] })
@@ -764,7 +590,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
764
590
  _jsx(TMLayoutItem, { children: _jsx(TMSearchResultSelector, { searchResults: currentSearchResults, disableAccordionIfSingleCategory: disableAccordionIfSingleCategory, selectedTID: selectedSearchResultTID, selectedSearchResult: selectedSearchResult, autoSelectFirst: !isMobile || currentSearchResults.length === 1, onSelectionChanged: onSearchResultSelectionChanged }) })
765
591
  :
766
592
  _jsx(_Fragment, {}), _jsxs(TMLayoutItem, { children: [_jsx(TMSearchResultGrid, { showSearch: showSearch, fromDTD: fromDTD, allUsers: allUsers, inputFocusedItem: focusedItem, inputSelectedItems: selectedItems, searchResult: searchResults.length > 1 ? selectedSearchResult : searchResults[0], lastUpdateSearchTime: lastUpdateSearchTime, openInOffice: openInOffice, onDblClick: () => openFormHandler(LayoutModes.Update), onContextMenuPreparing: onContextMenuPreparing, onSelectionChanged: (items) => { setSelectedItems(items); }, onVisibleItemChanged: setVisibleItems, onFocusedItemChanged: setFocusedItem, onDownloadDcmtsAsync: async (inputDcmts, downloadType, downloadMode, _y, confirmAttachments) => await downloadDcmtsAsync(inputDcmts, downloadType, downloadMode, onFileOpened, confirmAttachments), showExportForm: showExportForm, onCloseExportForm: onCloseExportForm }), allowFloatingBar && showFloatingBar && deviceType !== DeviceType.MOBILE &&
767
- _jsxs(TMFloatingToolbar, { backgroundColor: TMColors.primaryColor, initialLeft: '10px', initialTop: 'calc(100% - 75px)', children: [fromDTD?.perm?.canRetrieveFile === AccessLevels.Yes && _jsx(TMButton, { btnStyle: 'icon', caption: "Download file", disabled: fromDTD?.perm?.canRetrieveFile !== AccessLevels.Yes || !focusedItem?.DID, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt, "download"); } }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasDetailRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white' }), caption: SDKUI_Localizator.DcmtsDetail, onClick: () => setIsOpenDetails(true) }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasMasterRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white', transform: 'scale(-1, 1)' }), caption: SDKUI_Localizator.DcmtsMaster, onClick: () => setIsOpenMaster(true) }), _jsx(IconMenuVertical, { id: `commands-floating-${id}`, color: 'white', cursor: 'pointer' }), _jsx(TMCommandsContextMenu, { target: `#commands-floating-${id}`, showEvent: "click", menuItems: getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, infoCheckCopyToClipboard, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation).concat([customButtonMenuItems()]) })] })] })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { TID: focusedItem?.TID, DID: focusedItem?.DID, deviceType: deviceType, onCompleted: onWFOperationCompleted, onClose: () => setShowMoreInfoPopup(false) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: `${SDKUI_Localizator.BatchUpdate} (${getSelectionDcmtInfo().length} documenti selezionati)`, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
593
+ _jsxs(TMFloatingToolbar, { backgroundColor: TMColors.primaryColor, initialLeft: '10px', initialTop: 'calc(100% - 75px)', children: [fromDTD?.perm?.canRetrieveFile === AccessLevels.Yes && _jsx(TMButton, { btnStyle: 'icon', caption: "Download file", disabled: fromDTD?.perm?.canRetrieveFile !== AccessLevels.Yes || !focusedItem?.DID, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt, "download"); } }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasDetailRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white' }), caption: SDKUI_Localizator.DcmtsDetail, onClick: () => setIsOpenDetails(true) }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasMasterRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white', transform: 'scale(-1, 1)' }), caption: SDKUI_Localizator.DcmtsMaster, onClick: () => setIsOpenMaster(true) }), _jsx(IconMenuVertical, { id: `commands-floating-${id}`, color: 'white', cursor: 'pointer' }), _jsx(TMCommandsContextMenu, { target: `#commands-floating-${id}`, showEvent: "click", menuItems: getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, showHistoryCallback, copyCheckoutPathToClipboardOperationCallback, 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: () => {
768
594
  setIsOpenBatchUpdate(false);
769
595
  }, onSavedCallbackAsync: async () => {
770
596
  setIsOpenBatchUpdate(false);
@@ -823,7 +649,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
823
649
  _jsx(TMModal, { title: "Documenti condivisi", onClose: () => {
824
650
  setSharedDcmtSearchResults([]);
825
651
  }, width: isMobile ? '90%' : '60%', height: isMobile ? '90%' : '80%', children: _jsx(TMSearchResult, { searchResults: sharedDcmtSearchResults, allowFloatingBar: false, showSelector: true, disableAccordionIfSingleCategory: true, showBackButton: isMobile, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), (showCheckoutInformationForm && fromDTD && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) &&
826
- _jsx(TMSearchResultCheckoutInfoForm, { dtdName: fromDTD.name ?? SDKUI_Localizator.SearchResult, selectedDcmtOrFocused: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0], onClose: () => setShowCheckoutInformationForm(false) }), (floatingActionConfig && floatingActionConfig.isVisible) && _jsx(TMSearchResultFloatingActionButton, { selectedDcmtsOrFocused: getSelectedDcmtsOrFocused(selectedItems, focusedItem), config: floatingActionConfig })] }), [
652
+ _jsx(TMDcmtCheckoutInfoForm, { dtdName: fromDTD.name ?? SDKUI_Localizator.SearchResult, selectedDcmtOrFocused: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0], onClose: hideCheckoutInformationFormCallback }), (floatingActionConfig && floatingActionConfig.isVisible) && _jsx(TMSearchResultFloatingActionButton, { selectedDcmtsOrFocused: getSelectedDcmtsOrFocused(selectedItems, focusedItem), config: floatingActionConfig })] }), [
827
653
  searchResults,
828
654
  selectedSearchResult,
829
655
  lastUpdateSearchTime,
@@ -936,7 +762,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
936
762
  gap: Gutters.getGutters(),
937
763
  width: '100%',
938
764
  height: '100%',
939
- }, children: _jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showLocalWaitPanel, showWaitPanelPrimary: localShowPrimary, waitPanelTitle: localWaitPanelTitle, waitPanelTextPrimary: localWaitPanelTextPrimary, waitPanelValuePrimary: localWaitPanelValuePrimary, waitPanelMaxValuePrimary: localWaitPanelMaxValuePrimary, isCancelable: true, abortController: abortControllerLocal, children: (groupId && groupId.length > 0) ?
765
+ }, children: _jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showCicoWaitPanel, showWaitPanelPrimary: showCicoPrimaryProgress, waitPanelTitle: cicoWaitPanelTitle, waitPanelTextPrimary: cicoPrimaryProgressText, waitPanelValuePrimary: cicoPrimaryProgressValue, waitPanelMaxValuePrimary: cicoPrimaryProgressMax, isCancelable: true, abortController: abortControllerLocal, children: (groupId && groupId.length > 0) ?
940
766
  _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar })
941
767
  :
942
768
  _jsx(TMPanelManagerProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'tmSearchResult', children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar }) }) }) }) }), _jsx(StyledMultiViewPanel, { "$isVisible": isOpenDetails, children: isOpenDetails && _jsx(TMMasterDetailDcmts, { deviceType: deviceType, isForMaster: false, inputDcmts: getSelectionDcmtInfo(), allowNavigation: focusedItem && selectedItems.length <= 0, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), onBack: () => setIsOpenDetails(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), _jsxs(StyledMultiViewPanel, { "$isVisible": isOpenMaster, children: [isOpenMaster && _jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: getSelectionDcmtInfo(), isForMaster: true, allowNavigation: focusedItem && selectedItems.length <= 0, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), onBack: () => setIsOpenMaster(false), appendMasterDcmts: handleAddItem, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), secondaryMasterDcmts.length > 0 && secondaryMasterDcmts.map((dcmt, index) => {
@@ -952,7 +778,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
952
778
  setArchiveRelatedDcmtFormTID(undefined);
953
779
  setArchiveRelatedDcmtFormMids([]);
954
780
  await onRefreshSearchAsync?.();
955
- }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (showSignSettingsForm && fromDTD) && _jsx(TMSignSettingsForm, { fromDTD: fromDTD, inputDcmts: allFieldSelectedDocs, onCloseSignSettingsForm: closeSignSettingsForm, onSavedAsyncCallback: handleSavedAsyncCallback }), (showHistory && fromDTD && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) && _jsx(TMViewHistoryDcmt, { fromDTD: fromDTD, deviceType: deviceType, inputDcmt: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0], onClose: () => setShowHistory(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (showCommentForm && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) && _jsx(TMBlogCommentForm, { context: { engine: 'SearchEngine', object: { tid: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].TID, did: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].DID } }, onClose: () => setShowCommentForm(false), refreshCallback: triggerBlogRefresh, participants: [], showAttachmentsSection: true, allArchivedDocumentsFileItems: convertSearchResultDescriptorToFileItems(currentSearchResults ?? []), isCommentRequired: isCommentRequired, removeAndEditAttachment: removeAndEditAttachmentCommentForm, selectedAttachmentDid: [Number(getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].DID)] })] }));
781
+ }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (showSignSettingsForm && fromDTD) && _jsx(TMSignSettingsForm, { fromDTD: fromDTD, inputDcmts: allFieldSelectedDocs, onCloseSignSettingsForm: closeSignSettingsForm, onSavedAsyncCallback: handleSavedAsyncCallback }), (showHistory && fromDTD && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) && _jsx(TMViewHistoryDcmt, { fromDTD: fromDTD, deviceType: deviceType, inputDcmt: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0], onClose: hideHistoryCallback, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (commentFormState.show && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) && _jsx(TMBlogCommentForm, { context: { engine: 'SearchEngine', object: { tid: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].TID, did: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].DID } }, onClose: hideCommentFormCallback, refreshCallback: triggerBlogRefresh, participants: [], showAttachmentsSection: true, allArchivedDocumentsFileItems: convertSearchResultDescriptorToFileItems(currentSearchResults ?? []), isCommentRequired: commentFormState.isRequired, removeAndEditAttachment: commentFormState.removeAndEditAttachment, selectedAttachmentDid: [Number(getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].DID)] })] }));
956
782
  };
957
783
  export default TMSearchResult;
958
784
  const renderDcmtIcon = (cellData, onDownloadDcmtsAsync, openInOffice) => {
@@ -1206,7 +1032,7 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, allUsers, inputFocusedItem,
1206
1032
  setVisibleItems(visibleRows.map((row) => { return row.data; }));
1207
1033
  }, []);
1208
1034
  useEffect(() => { onVisibleItemChanged?.(visibleItems); }, [visibleItems]);
1209
- return _jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsx(TMDataGrid, { id: "tm-search-result", keyExpr: "rowIndex", dataColumns: dataColumns, dataSource: dataSource, repaintChangesOnly: true, selectedRowKeys: selectedRowKeys, focusedRowKey: Number(focusedItem?.rowIndex ?? 0), showSearchPanel: showSearch, showFilterPanel: true, sorting: { mode: "multiple" }, selection: { mode: allowMultipleSelection ? 'multiple' : 'single' }, pageSize: TMDataGridPageSize.Small, onSelectionChanged: handleSelectionChange, onFocusedRowChanged: handleFocusedRowChange, onRowDblClick: onRowDblClick, onContentReady: onContentReady, onContextMenuPreparing: onContextMenuPreparing, onKeyDown: onKeyDown, counterConfig: { show: true } }), (showExportForm && searchResult && onCloseExportForm) && _jsx(TMDataGridExportForm, { dataColumns: dataColumns, dataSource: dataSource, selectedRowKeys: selectedRowKeys, onCloseExportForm: onCloseExportForm, searchResult: searchResult })] });
1035
+ 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, showHeaderColumnChooser: true, onKeyDown: onKeyDown, counterConfig: { show: true } }), (showExportForm && searchResult && onCloseExportForm) && _jsx(TMDataGridExportForm, { dataColumns: dataColumns, dataSource: dataSource, selectedRowKeys: selectedRowKeys, onCloseExportForm: onCloseExportForm, searchResult: searchResult })] });
1210
1036
  };
1211
1037
  //#region TMSearchResultSelector
1212
1038
  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>, handleCheckInOperationCallback: () => void, showCheckoutInformationFormCallback: () => void, viewHistoryCallback: () => void, infoCheckCopyToClipboard: () => void, openWGsCopyMoveForm?: ((mode: "copyToWgDraft" | "copyToWgArchivedDoc", dcmtTypeDescriptor: DcmtTypeDescriptor, documents: Array<DcmtInfo>) => void), openCommentFormCallback?: ((documents: Array<DcmtInfo>) => void), openEditPdf?: ((documents: Array<DcmtInfo>) => void), openAddDocumentForm?: () => void, passToArchiveCallback?: (outputMids: Array<{
8
+ export declare const getCommandsMenuItems: (isMobile: boolean, dtd: DcmtTypeDescriptor | undefined, allUsers: Array<UserDescriptor>, selectedItems: Array<any>, focusedItem: any, context: SearchResultContext, showFloatingBar: boolean, workingGroupContext: WorkingGroupDescriptor | undefined, showSearch: boolean, setShowFloatingBar: React.Dispatch<React.SetStateAction<boolean>>, openFormHandler: (layoutMode: LayoutModes) => void, openSharedArchiveHandler: () => Promise<void>, showSharedDcmtsHandler: () => Promise<void>, downloadDcmtsAsync: (inputDcmts: DcmtInfo[] | undefined, downloadType: DownloadTypes, downloadMode: DownloadModes, onFileDownloaded?: (dcmtFile: File | undefined) => void, confirmAttachments?: (list: FileDescriptor[]) => Promise<string[] | undefined>, skipConfirmation?: boolean) => Promise<void>, runOperationAsync: (inputDcmts: DcmtInfo[] | undefined, dcmtOperationType: DcmtOperationTypes, actionAfterOperationAsync?: () => Promise<void>) => Promise<void>, onRefreshSearchAsync: (() => Promise<void>) | undefined, onRefreshDataRowsAsync: (() => Promise<void>) | undefined, onRefreshAfterAddDcmtToFavs: (() => void) | undefined, confirmFormat: () => Promise<FileFormats>, confirmAttachments: (list: FileDescriptor[]) => Promise<string[] | undefined>, openTaskFormHandler: () => void, openDetailDcmtsFormHandler: (value: boolean) => void, openMasterDcmtsFormHandler: (value: boolean) => void, openBatchUpdateFormHandler: (value: boolean) => void, openExportForm: () => void, handleToggleSearch: () => void, handleSignApprove: () => void, openSignSettingsForm: () => void, handleCheckOutOperationCallback: (checkout: boolean) => Promise<void>, handleCheckInOperationCallback: () => void, showCheckoutInformationFormCallback: () => void, viewHistoryCallback: () => void, copyCheckoutPathToClipboardOperationCallback: () => void, openWGsCopyMoveForm?: ((mode: "copyToWgDraft" | "copyToWgArchivedDoc", dcmtTypeDescriptor: DcmtTypeDescriptor, documents: Array<DcmtInfo>) => void), openCommentFormCallback?: ((documents: Array<DcmtInfo>) => void), openEditPdf?: ((documents: Array<DcmtInfo>) => void), openAddDocumentForm?: () => void, passToArchiveCallback?: (outputMids: Array<{
9
9
  mid: number;
10
10
  value: string;
11
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>;
@@ -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, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, infoCheckCopyToClipboard, 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) {
@@ -361,13 +361,13 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
361
361
  {
362
362
  icon: "copy",
363
363
  text: SDKUI_Localizator.CopyCheckoutPath,
364
- onClick: infoCheckCopyToClipboard,
364
+ onClick: copyCheckoutPathToClipboardOperationCallback,
365
365
  disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
366
366
  },
367
367
  {
368
368
  icon: "clock",
369
369
  text: SDKUI_Localizator.History,
370
- disabled: checkoutStatus.version === 1 || disabledForSingleRow(selectedItems, focusedItem),
370
+ disabled: !cicoEnabled || disabledForSingleRow(selectedItems, focusedItem),
371
371
  onClick: viewHistoryCallback,
372
372
  },
373
373
  ]
@@ -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
  };
@@ -592,6 +592,7 @@ export declare class SDKUI_Localizator {
592
592
  static get SharedDocuments(): "Gemeinsame Dokumente" | "Shared documents" | "Documentos compartidos" | "Documents partagés" | "Documentos compartilhados" | "Documenti condivisi";
593
593
  static get Shortcuts(): "Tastenkombinationen" | "Shortcuts" | "Atajos" | "Raccourcis" | "Atalhos" | "Scorciatoie";
594
594
  static get ShowAll(): "Alle anzeigen" | "Show all" | "Mostrar todo" | "Tout afficher" | "Mostrar tudo" | "Mostra tutti";
595
+ static get ShowColumnSelection(): string;
595
596
  static get ShowFloatingBar(): string;
596
597
  static get ShowLess(): "Weniger anzeigen" | "Show less" | "Mostrar menos" | "Afficher moins" | "Mostra meno";
597
598
  static get Show_CompleteName(): "Vollständigen Namen anzeigen" | "View full name" | "Mostrar nombre completo" | "Afficher le nom complet" | "Mostrar nome completo" | "Visualizza nome completo";
@@ -5886,6 +5886,16 @@ export class SDKUI_Localizator {
5886
5886
  default: return "Mostra tutti";
5887
5887
  }
5888
5888
  }
5889
+ static get ShowColumnSelection() {
5890
+ switch (this._cultureID) {
5891
+ case CultureIDs.De_DE: return "Spaltenauswahl anzeigen";
5892
+ case CultureIDs.En_US: return "Show column selection";
5893
+ case CultureIDs.Es_ES: return "Mostrar selección de columnas";
5894
+ case CultureIDs.Fr_FR: return "Afficher la sélection de colonnes";
5895
+ case CultureIDs.Pt_PT: return "Mostrar seleção de colunas";
5896
+ default: return "Mostra selezione colonne";
5897
+ }
5898
+ }
5889
5899
  static get ShowFloatingBar() {
5890
5900
  switch (this._cultureID) {
5891
5901
  case CultureIDs.De_DE: return "Floating-Leiste anzeigen";
@@ -1,11 +1,20 @@
1
1
  import React from "react";
2
- import { DcmtTypeDescriptor, FileDescriptor, UserDescriptor } from "@topconsultnpm/sdk-ts";
2
+ import { AccessLevels, DcmtTypeDescriptor, FileDescriptor, UserDescriptor } from "@topconsultnpm/sdk-ts";
3
3
  import { DcmtInfo, DownloadModes, DownloadTypes } from "../ts/types";
4
4
  import { FileItem } from "../components";
5
5
  /**
6
6
  * Check-in/Check-out Manager
7
7
  * Questo modulo gestisce tutte le operazioni di check-in e check-out
8
8
  * dei documenti e delle bozze dei gruppi di lavoro.
9
+ *
10
+ * Operazioni gestite:
11
+ * - Generazione nomi file per download e checkout con timestamp e identificatori univoci
12
+ * - Download di documenti in modalità checkout
13
+ * - Gestione dello storage locale delle informazioni di checkout (aggiunta, aggiornamento, rimozione)
14
+ * - Validazione dei nomi file secondo le convenzioni di naming CICO
15
+ * - Rendering dell'interfaccia utente per conferma check-in con visualizzazione anomalie
16
+ * - Determinazione dello stato di check-out dei documenti (editMode/lockMode)
17
+ * - Verifica permessi e abilitazione funzionalità CICO per tipo documento
9
18
  */
10
19
  export interface CheckoutInfo {
11
20
  DID: string;
@@ -48,6 +57,26 @@ type FileNameValidation = {
48
57
  validationResults?: FileNameValidationItems;
49
58
  };
50
59
  export declare const renderCicoCheckInContent: (source: DownloadSource, selectedFilename: File, isValid: boolean, validationItems: FileNameValidationItems | undefined, color?: string) => React.ReactNode;
60
+ interface CheckInCheckOutDcmtInfo {
61
+ CICO: number;
62
+ CanCICO: AccessLevels;
63
+ CanDelChronology: AccessLevels;
64
+ UserID_MID: number;
65
+ Date_MID: number;
66
+ Ver_MID: number;
67
+ UserID_CanViewOrUpdate: AccessLevels;
68
+ Date_CanViewOrUpdate: AccessLevels;
69
+ Ver_CanViewOrUpdate: AccessLevels;
70
+ }
71
+ export declare const getDcmtCicoInfo: (dtd: DcmtTypeDescriptor | undefined) => CheckInCheckOutDcmtInfo;
72
+ /**
73
+ * Determina lo stato di check-in/check-out di un documento
74
+ *
75
+ * @param dcmt - Il documento in formato array (MetadataValueDescriptorEx[]) o oggetto piatto
76
+ * @param allUsers - Lista di tutti gli utenti per risolvere i nomi
77
+ * @param dtd - Descrittore del tipo documento contenente le definizioni dei metadati CICO
78
+ * @returns Oggetto con cicoEnabled (se CICO è abilitato) e checkoutStatus (dettagli dello stato)
79
+ */
51
80
  export declare const getDcmtCicoStatus: (dcmt: any, allUsers: Array<UserDescriptor>, dtd: DcmtTypeDescriptor | undefined) => {
52
81
  cicoEnabled: boolean;
53
82
  checkoutStatus: CheckoutStatusResult;