@topconsultnpm/sdkui-react 6.19.0-dev1.45 → 6.19.0-dev1.47
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.
- package/lib/components/editors/TMMetadataValues.js +32 -11
- package/lib/components/features/documents/TMDcmtForm.d.ts +1 -0
- package/lib/components/features/documents/TMDcmtForm.js +3 -3
- package/lib/components/features/search/TMSearchResult.d.ts +1 -0
- package/lib/components/features/search/TMSearchResult.js +50 -17
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +1 -1
- package/lib/components/features/search/TMSearchResultsMenuItems.js +2 -2
- package/package.json +2 -2
|
@@ -402,38 +402,56 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
|
|
|
402
402
|
return (_jsx("div", { style: { width: '100%' }, children: dsAttachsData.length > 0 && _jsx(TMAccordion, { title: SDKUI_Localizator.Attachment, children: dsAttachsData.map(item => renderMetadataItem(item, isReadOnly)) }) }));
|
|
403
403
|
}, [metadataValues, showCheckBoxes, showNullValueCheckBoxes, isReadOnly, dynDataListsToBeRefreshed, validationItems, selectedMID, isOpenDistinctValues, openChooserBySingleClick, metadataValuesOrig]);
|
|
404
404
|
const layoutCustom = useMemo(() => {
|
|
405
|
+
console.log('Rendering custom layout with layout:', layout);
|
|
405
406
|
if (!layout || !layout.items || layout.items.length === 0) {
|
|
406
407
|
return metadataValues.map((item) => renderMetadataItem(item));
|
|
407
408
|
}
|
|
408
|
-
// Build a map of items by ID for quick lookup
|
|
409
|
+
// Build a map of items by ID for quick lookup (include negative/zero IDs)
|
|
409
410
|
const itemsById = new Map();
|
|
410
411
|
layout.items.forEach(item => {
|
|
411
|
-
if (item.layoutItemID) {
|
|
412
|
+
if (item.layoutItemID !== undefined && item.layoutItemID !== null) {
|
|
412
413
|
itemsById.set(item.layoutItemID, item);
|
|
413
414
|
}
|
|
414
415
|
});
|
|
415
|
-
//
|
|
416
|
-
|
|
417
|
-
|
|
416
|
+
// Determine root items. Prefer explicit LayoutRoot items if present;
|
|
417
|
+
// otherwise fall back to items with no parent (parentID undefined or -1).
|
|
418
|
+
const hasExplicitRoot = layout.items.some(item => item.type === LayoutItemTypes.LayoutRoot);
|
|
419
|
+
const rootItems = hasExplicitRoot
|
|
420
|
+
? layout.items.filter(item => item.type === LayoutItemTypes.LayoutRoot)
|
|
421
|
+
: layout.items.filter(item => item.parentID === undefined || item.parentID === -1);
|
|
422
|
+
// Recursive function to get children of an item. Handle parentID === -1 and undefined
|
|
423
|
+
// because some layouts use -1 for root while children use undefined.
|
|
418
424
|
const getChildren = (parentID) => {
|
|
425
|
+
if (parentID === -1) {
|
|
426
|
+
return layout.items?.filter(item => item.parentID === -1 || item.parentID === undefined) || [];
|
|
427
|
+
}
|
|
428
|
+
if (parentID === undefined) {
|
|
429
|
+
return layout.items?.filter(item => item.parentID === undefined) || [];
|
|
430
|
+
}
|
|
419
431
|
return layout.items?.filter(item => item.parentID === parentID) || [];
|
|
420
432
|
};
|
|
421
433
|
// Recursive function to render layout items with depth tracking for indentation
|
|
422
|
-
|
|
434
|
+
// Prevent infinite recursion by tracking visited layoutItemIDs (handles malformed layouts where an item
|
|
435
|
+
// may reference itself as a child or cycles exist).
|
|
436
|
+
const renderLayoutItem = (layoutItem, depth = 0, visited = new Set()) => {
|
|
437
|
+
const id = layoutItem.layoutItemID ?? 0;
|
|
438
|
+
if (visited.has(id))
|
|
439
|
+
return null;
|
|
440
|
+
visited.add(id);
|
|
423
441
|
// Check if this is a LayoutRoot - just render its children
|
|
424
442
|
if (layoutItem.type === LayoutItemTypes.LayoutRoot) {
|
|
425
|
-
const children = getChildren(layoutItem.layoutItemID
|
|
426
|
-
return (_jsx(React.Fragment, { children: children.map(child => renderLayoutItem(child, depth)) }, `root-${layoutItem.layoutItemID}`));
|
|
443
|
+
const children = getChildren(layoutItem.layoutItemID);
|
|
444
|
+
return (_jsx(React.Fragment, { children: children.map(child => renderLayoutItem(child, depth, visited)) }, `root-${layoutItem.layoutItemID}`));
|
|
427
445
|
}
|
|
428
446
|
// Check if this is a LayoutGroup
|
|
429
447
|
else if (layoutItem.type === LayoutItemTypes.LayoutGroup && layoutItem.lgd) {
|
|
430
|
-
const children = getChildren(layoutItem.layoutItemID
|
|
448
|
+
const children = getChildren(layoutItem.layoutItemID);
|
|
431
449
|
const groupDescriptor = layoutItem.lgd;
|
|
432
450
|
const groupTitle = groupDescriptor.caption || `Group ${layoutItem.layoutItemID}`;
|
|
433
451
|
const isCollapsed = false; // LayoutGroupDescriptor doesn't have collapsed property
|
|
434
452
|
// Apply indentation only to subgroups (depth > 0), not to root groups
|
|
435
453
|
const indentationPx = depth > 0 ? depth * 10 : 0;
|
|
436
|
-
return (_jsx("div", { style: { paddingLeft: `${indentationPx}px` }, children: _jsx(TMAccordion, { title: groupTitle, defaultCollapsed: isCollapsed, children: children.map(child => renderLayoutItem(child, depth + 1)) }) }, `group-wrapper-${layoutItem.layoutItemID}`));
|
|
454
|
+
return (_jsx("div", { style: { paddingLeft: `${indentationPx}px` }, children: _jsx(TMAccordion, { title: groupTitle, defaultCollapsed: isCollapsed, children: children.map(child => renderLayoutItem(child, depth + 1, visited)) }) }, `group-wrapper-${layoutItem.layoutItemID}`));
|
|
437
455
|
}
|
|
438
456
|
// Check if this is a LayoutControlItem (metadata field)
|
|
439
457
|
else if (layoutItem.type === LayoutItemTypes.LayoutControlItem && layoutItem.lcid) {
|
|
@@ -455,7 +473,10 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
|
|
|
455
473
|
}
|
|
456
474
|
return null;
|
|
457
475
|
};
|
|
458
|
-
return (_jsx("div", { style: { width: '100%' }, children:
|
|
476
|
+
return (_jsx("div", { style: { width: '100%' }, children: (() => {
|
|
477
|
+
const visited = new Set();
|
|
478
|
+
return rootItems.map(item => renderLayoutItem(item, 0, visited));
|
|
479
|
+
})() }));
|
|
459
480
|
}, [layout, metadataValues, showCheckBoxes, showNullValueCheckBoxes, isReadOnly, dynDataListsToBeRefreshed, validationItems, selectedMID, isOpenDistinctValues, openChooserBySingleClick, metadataValuesOrig]);
|
|
460
481
|
const renderForm = useMemo(() => {
|
|
461
482
|
// Se currentDTD non è ancora stato caricato, non renderizzare nulla
|
|
@@ -37,7 +37,7 @@ import WFDiagram from '../workflow/diagram/WFDiagram';
|
|
|
37
37
|
import TMTooltip from '../../base/TMTooltip';
|
|
38
38
|
let abortControllerLocal = new AbortController();
|
|
39
39
|
//#endregion
|
|
40
|
-
const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes.Update, onClose, onSavedAsyncCallback, TID, DID, formMode = FormModes.Update, canNext, canPrev, count, itemIndex, onNext, onPrev, allowNavigation = true, allowRelations = true, isClosable = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, showDcmtFormSidebar = true, invokedByTodo = false, titleModal, isModal = false, widthModal = "100%", heightModal = "100%", groupId, onWFOperationCompleted, onTaskCompleted, inputFile = null, taskFormDialogComponent, taskMoreInfo, connectorFileSave = undefined, inputMids = [], onOpenS4TViewerRequest, s4TViewerDialogComponent, enableDragDropOverlay = false, passToSearch, isSharedDcmt = false, sharedSourceTID, sharedSourceDID }) => {
|
|
40
|
+
const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes.Update, showBackButton = true, onClose, onSavedAsyncCallback, TID, DID, formMode = FormModes.Update, canNext, canPrev, count, itemIndex, onNext, onPrev, allowNavigation = true, allowRelations = true, isClosable = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, showDcmtFormSidebar = true, invokedByTodo = false, titleModal, isModal = false, widthModal = "100%", heightModal = "100%", groupId, onWFOperationCompleted, onTaskCompleted, inputFile = null, taskFormDialogComponent, taskMoreInfo, connectorFileSave = undefined, inputMids = [], onOpenS4TViewerRequest, s4TViewerDialogComponent, enableDragDropOverlay = false, passToSearch, isSharedDcmt = false, sharedSourceTID, sharedSourceDID }) => {
|
|
41
41
|
const [id, setID] = useState('');
|
|
42
42
|
const [showWaitPanelLocal, setShowWaitPanelLocal] = useState(false);
|
|
43
43
|
const [waitPanelTitleLocal, setWaitPanelTitleLocal] = useState('');
|
|
@@ -878,7 +878,7 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
878
878
|
showHeader: showHeader,
|
|
879
879
|
title: fromDTD?.nameLoc,
|
|
880
880
|
allowMaximize: !isMobile,
|
|
881
|
-
onBack: (isClosable && deviceType !== DeviceType.MOBILE) ? undefined : handleClose,
|
|
881
|
+
onBack: showBackButton ? (isClosable && deviceType !== DeviceType.MOBILE) ? undefined : handleClose : undefined,
|
|
882
882
|
onClose: isClosable ? () => { } : undefined,
|
|
883
883
|
toolbar: allowNavigation ? formToolbar : _jsx(_Fragment, {})
|
|
884
884
|
},
|
|
@@ -931,7 +931,7 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
931
931
|
isActive: allInitialPanelVisibility['tmWF']
|
|
932
932
|
}
|
|
933
933
|
},
|
|
934
|
-
], [fromDTD, tmDcmtForm, tmBlog, tmSysMetadata, tmDcmtPreview, tmWF, isPreviewDisabled, isSysMetadataDisabled, isBoardDisabled, isWFDisabled, inputFile, isClosable]);
|
|
934
|
+
], [fromDTD, showBackButton, tmDcmtForm, tmBlog, tmSysMetadata, tmDcmtPreview, tmWF, isPreviewDisabled, isSysMetadataDisabled, isBoardDisabled, isWFDisabled, inputFile, isClosable]);
|
|
935
935
|
// Retrieves the current document form setting based on the normalized TID
|
|
936
936
|
const getCurrentDcmtFormSetting = () => {
|
|
937
937
|
const settings = SDKUI_Globals.userSettings.dcmtFormSettings;
|
|
@@ -15,6 +15,7 @@ interface ITMSearchResultProps {
|
|
|
15
15
|
showSearchResultSidebar?: boolean;
|
|
16
16
|
showSelector?: boolean;
|
|
17
17
|
showToolbarHeader?: boolean;
|
|
18
|
+
showBackButton?: boolean;
|
|
18
19
|
groupId?: string;
|
|
19
20
|
selectedSearchResultTID?: number;
|
|
20
21
|
workingGroupContext?: WorkingGroupDescriptor;
|
|
@@ -59,7 +59,7 @@ const orderByName = (array) => {
|
|
|
59
59
|
return 1;
|
|
60
60
|
} return 0; });
|
|
61
61
|
};
|
|
62
|
-
const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisible = true, allowRelations = true, openDcmtFormAsModal = false, searchResults = [], showSearchResultSidebar = true, showSelector = false, groupId, title, isClosable = false, allowFloatingBar = true, showToolbarHeader = true, selectedSearchResultTID, workingGroupContext = undefined, disableAccordionIfSingleCategory = false, floatingActionConfig, openInOffice, onRefreshAfterAddDcmtToFavs, onRefreshSearchAsync, onSelectedTIDChanged, onWFOperationCompleted, onClose, onFileOpened, onTaskCreateRequest, openWGsCopyMoveForm, openEditPdf, openCommentFormCallback, openAddDocumentForm, openS4TViewer = false, onOpenS4TViewerRequest, passToArchiveCallback, showTodoDcmtForm = false }) => {
|
|
62
|
+
const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisible = true, allowRelations = true, openDcmtFormAsModal = false, searchResults = [], showSearchResultSidebar = true, showSelector = false, groupId, title, isClosable = false, allowFloatingBar = true, showToolbarHeader = true, showBackButton = true, selectedSearchResultTID, workingGroupContext = undefined, disableAccordionIfSingleCategory = false, floatingActionConfig, openInOffice, onRefreshAfterAddDcmtToFavs, onRefreshSearchAsync, onSelectedTIDChanged, onWFOperationCompleted, onClose, onFileOpened, onTaskCreateRequest, openWGsCopyMoveForm, openEditPdf, openCommentFormCallback, openAddDocumentForm, openS4TViewer = false, onOpenS4TViewerRequest, passToArchiveCallback, showTodoDcmtForm = false }) => {
|
|
63
63
|
const [id, setID] = useState('');
|
|
64
64
|
const [showApprovePopup, setShowApprovePopup] = useState(false);
|
|
65
65
|
const [showRejectPopup, setShowRejectPopup] = useState(false);
|
|
@@ -72,6 +72,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
72
72
|
const [selectedSearchResult, setSelectedSearchResult] = useState();
|
|
73
73
|
const [currentSearchResults, setCurrentSearchResults] = useState(searchResults || []);
|
|
74
74
|
const [showSearch, setShowSearch] = useState(false);
|
|
75
|
+
const [sharedDcmtSearchResults, setSharedDcmtSearchResults] = useState([]);
|
|
75
76
|
const [secondaryMasterDcmts, setSecondaryMasterDcmts] = useState([]);
|
|
76
77
|
const [isOpenDcmtForm, setIsOpenDcmtForm] = useState(false);
|
|
77
78
|
const [isOpenBatchUpdate, setIsOpenBatchUpdate] = useState(false);
|
|
@@ -164,11 +165,31 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
164
165
|
if (dcmtFile) {
|
|
165
166
|
setSharedDcmtFile(dcmtFile?.file);
|
|
166
167
|
}
|
|
168
|
+
setIsOpenSharedArchive(true);
|
|
167
169
|
}
|
|
168
|
-
catch {
|
|
169
|
-
|
|
170
|
+
catch (e) {
|
|
171
|
+
TMExceptionBoxManager.show({ exception: e });
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
const showSharedDcmtsHandler = async () => {
|
|
175
|
+
try {
|
|
176
|
+
TMSpinner.show({ description: "Caricamento documenti condivisi..." });
|
|
177
|
+
const se = SDK_Globals.tmSession?.NewSearchEngine();
|
|
178
|
+
const sharedDcmts = await se?.GetSharedDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].TID, getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].DID);
|
|
179
|
+
if (sharedDcmts && sharedDcmts.length > 0) {
|
|
180
|
+
console.log(sharedDcmts);
|
|
181
|
+
setSharedDcmtSearchResults(sharedDcmts);
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
ShowAlert({ message: "Nessun documento condiviso trovato.", mode: "info", title: 'Documenti Condivisi', duration: 5000 });
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
catch (e) {
|
|
188
|
+
TMExceptionBoxManager.show({ exception: e });
|
|
189
|
+
}
|
|
190
|
+
finally {
|
|
191
|
+
TMSpinner.hide();
|
|
170
192
|
}
|
|
171
|
-
setIsOpenSharedArchive(true);
|
|
172
193
|
};
|
|
173
194
|
const openTaskFormHandler = (onTaskCreated) => {
|
|
174
195
|
if (selectedItems.length > 1)
|
|
@@ -264,7 +285,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
264
285
|
return;
|
|
265
286
|
if (e.target === 'content') {
|
|
266
287
|
e.items = e.items || [];
|
|
267
|
-
const menuItems = getCommandsMenuItems(isMobile, fromDTD, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation);
|
|
288
|
+
const menuItems = getCommandsMenuItems(isMobile, fromDTD, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation);
|
|
268
289
|
e.items.push(...menuItems);
|
|
269
290
|
}
|
|
270
291
|
};
|
|
@@ -429,7 +450,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
429
450
|
}
|
|
430
451
|
};
|
|
431
452
|
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 &&
|
|
432
|
-
_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, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation) })] });
|
|
453
|
+
_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, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation) })] });
|
|
433
454
|
const middlePanelToolbar = _jsxs("div", { style: { width: 'max-content', display: 'flex', alignItems: 'center', gap: '10px' }, children: [_jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', isModified: false, iconColor: TMColors.default_background, formMode: FormModes.ReadOnly, canPrev: canNavigateHandler('prev'), onPrev: () => onNavigateHandler('prev') }), _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', isModified: false, iconColor: TMColors.default_background, formMode: FormModes.ReadOnly, canNext: canNavigateHandler('next'), onNext: () => onNavigateHandler('next') })] });
|
|
434
455
|
const handleAddItem = (tid, did) => {
|
|
435
456
|
let newItem = { TID: tid ?? 0, DID: did ?? 0 };
|
|
@@ -446,7 +467,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
446
467
|
_jsx(TMLayoutItem, { children: _jsx(TMSearchResultSelector, { searchResults: currentSearchResults, disableAccordionIfSingleCategory: disableAccordionIfSingleCategory, selectedTID: selectedSearchResultTID, onSelectionChanged: onSearchResultSelectionChanged }) })
|
|
447
468
|
:
|
|
448
469
|
_jsx(_Fragment, {}), _jsxs(TMLayoutItem, { children: [_jsx(TMSearchResultGrid, { showSearch: showSearch, 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 &&
|
|
449
|
-
_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, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation) })] })] })] }), 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: () => {
|
|
470
|
+
_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, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation) })] })] })] }), 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: () => {
|
|
450
471
|
setIsOpenBatchUpdate(false);
|
|
451
472
|
}, onSavedCallbackAsync: async () => {
|
|
452
473
|
setIsOpenBatchUpdate(false);
|
|
@@ -496,8 +517,16 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
496
517
|
TMSpinner.hide();
|
|
497
518
|
}
|
|
498
519
|
}, onClose: () => setShowManyToManyChooser(false), manageUseLocalizedName: false }), showPairDcmtsModal &&
|
|
499
|
-
_jsx(TMModal, { title: (isPairingManyToMany ? "Abbina" : "Disabbina") + " documenti", onClose: () => setShowPairDcmtsModal(false), width: isMobile ? '90%' : '50%', height: isMobile ? '90%' : '70%', children: _jsx(TMSearchResult, { searchResults: pairedSearchResults, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, onRefreshSearchAsync: onRefreshSearchAsync, onFileOpened: onFileOpened, onTaskCreateRequest: onTaskCreateRequest, openWGsCopyMoveForm: openWGsCopyMoveForm, openEditPdf: openEditPdf, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, passToArchiveCallback: passToArchiveCallback, showTodoDcmtForm: showTodoDcmtForm, floatingActionConfig: pairFloatingActionConfig }) }), showPairSearchModal &&
|
|
500
|
-
_jsx(TMModal, { title: "Ricerca documenti", onClose: () => setShowPairSearchModal(false), width: isMobile ? '90%' : '50%', height: isMobile ? '90%' : '70%', children: _jsx(TMSearch, { onlyShowSearchQueryPanel: true, inputTID: pairSearchModalTargetTID, inputMids: pairSearchModalInputMids, floatingActionConfig: pairSearchModalFloatingActionConfig }) }),
|
|
520
|
+
_jsx(TMModal, { title: (isPairingManyToMany ? "Abbina" : "Disabbina") + " documenti", onClose: () => setShowPairDcmtsModal(false), width: isMobile ? '90%' : '50%', height: isMobile ? '90%' : '70%', children: _jsx(TMSearchResult, { searchResults: pairedSearchResults, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, onRefreshSearchAsync: onRefreshSearchAsync, onFileOpened: onFileOpened, onTaskCreateRequest: onTaskCreateRequest, openWGsCopyMoveForm: openWGsCopyMoveForm, openEditPdf: openEditPdf, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, passToArchiveCallback: passToArchiveCallback, showTodoDcmtForm: showTodoDcmtForm, allowFloatingBar: false, floatingActionConfig: pairFloatingActionConfig, showBackButton: false }) }), showPairSearchModal &&
|
|
521
|
+
_jsx(TMModal, { title: "Ricerca documenti", onClose: () => setShowPairSearchModal(false), width: isMobile ? '90%' : '50%', height: isMobile ? '90%' : '70%', children: _jsx(TMSearch, { onlyShowSearchQueryPanel: true, inputTID: pairSearchModalTargetTID, inputMids: pairSearchModalInputMids, floatingActionConfig: pairSearchModalFloatingActionConfig }) }), isOpenSharedArchive && _jsx(TMModal, { title: "Archiviazione condivisa", onClose: () => {
|
|
522
|
+
setIsOpenSharedArchive(false);
|
|
523
|
+
}, width: isMobile ? '90%' : '60%', height: isMobile ? '90%' : '80%', children: _jsx(TMArchive, { inputDID: focusedItem?.DID, inputTID: focusedItem?.TID, inputMids: currentMetadataValues.filter(md => md.mid && md.mid > 100).map(md => ({ mid: md.mid, value: md.value ?? '' })), isSharedArchive: true, inputFile: sharedDcmtFile, onSavedAsyncCallback: async (tid, did) => {
|
|
524
|
+
setIsOpenSharedArchive(false);
|
|
525
|
+
await onRefreshSearchAsync?.();
|
|
526
|
+
} }) }), sharedDcmtSearchResults.length > 0 &&
|
|
527
|
+
_jsx(TMModal, { title: "Documenti condivisi", onClose: () => {
|
|
528
|
+
setSharedDcmtSearchResults([]);
|
|
529
|
+
}, width: isMobile ? '90%' : '60%', height: isMobile ? '90%' : '80%', children: _jsx(TMSearchResult, { searchResults: sharedDcmtSearchResults, allowFloatingBar: false, showSelector: true, showBackButton: false }) }), (floatingActionConfig && floatingActionConfig.isVisible) && _jsx(TMSearchResultFloatingActionButton, { selectedDcmtsOrFocused: getSelectedDcmtsOrFocused(selectedItems, focusedItem), config: floatingActionConfig })] }), [
|
|
501
530
|
searchResults,
|
|
502
531
|
selectedSearchResult,
|
|
503
532
|
lastUpdateSearchTime,
|
|
@@ -542,6 +571,13 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
542
571
|
pairSearchModalParentDID,
|
|
543
572
|
pairSearchModalRelation,
|
|
544
573
|
pairSearchModalInputMids,
|
|
574
|
+
isOpenSharedArchive,
|
|
575
|
+
sharedDcmtSearchResults,
|
|
576
|
+
showBackButton,
|
|
577
|
+
isMobile,
|
|
578
|
+
currentMetadataValues,
|
|
579
|
+
sharedDcmtFile,
|
|
580
|
+
onRefreshSearchAsync
|
|
545
581
|
]);
|
|
546
582
|
const tmBlog = useMemo(() => _jsx(TMDcmtBlog, { tid: focusedItem?.TID, did: focusedItem?.DID }), [focusedItem]);
|
|
547
583
|
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]);
|
|
@@ -568,7 +604,9 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
568
604
|
title: getTitleHeader(),
|
|
569
605
|
showHeader: showToolbarHeader,
|
|
570
606
|
allowMaximize: !isMobile,
|
|
571
|
-
onBack:
|
|
607
|
+
onBack: showBackButton !== undefined
|
|
608
|
+
? (showBackButton ? onBack : undefined)
|
|
609
|
+
: ((!isClosable && context === SearchResultContext.METADATA_SEARCH) || (isMobile && context !== SearchResultContext.METADATA_SEARCH && splitterSize[1] === '100%') ? onBack : undefined),
|
|
572
610
|
onClose: isClosable ? onBack : undefined,
|
|
573
611
|
toolbar: searchResutlToolbar
|
|
574
612
|
},
|
|
@@ -608,7 +646,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
608
646
|
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 }) }, `${index}-${dcmt.DID}`));
|
|
609
647
|
})] }), _jsx(StyledMultiViewPanel, { "$isVisible": isOpenDcmtForm, children: isOpenDcmtForm && _jsx(TMDcmtForm, { isModal: openDcmtFormAsModal || (dcmtFormLayoutMode === LayoutModes.Ark && focusedItem?.DID), titleModal: fromDTD?.name ?? '', TID: focusedItem?.TID, DID: focusedItem?.DID, 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: async (tid, did, metadataResult) => {
|
|
610
648
|
await refreshFocusedDataRowAsync(tid, did, true, metadataResult);
|
|
611
|
-
}, onOpenS4TViewerRequest: onOpenS4TViewerRequest }) }), isOpenArchiveRelationForm && _jsx(TMDcmtForm, { isModal: true, titleModal: SDKUI_Localizator.Archive + ' - ' + (archiveType === 'detail' ? SDKUI_Localizator.DcmtsDetail : SDKUI_Localizator.DcmtsMaster), TID: archiveRelatedDcmtFormTID, layoutMode: LayoutModes.Ark, inputMids: archiveRelatedDcmtFormMids, onClose: () => {
|
|
649
|
+
}, onOpenS4TViewerRequest: onOpenS4TViewerRequest }) }), 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, onClose: () => {
|
|
612
650
|
setIsOpenArchiveRelationForm(false);
|
|
613
651
|
setArchiveType(undefined);
|
|
614
652
|
setArchiveRelatedDcmtFormTID(undefined);
|
|
@@ -619,12 +657,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
619
657
|
setArchiveRelatedDcmtFormTID(undefined);
|
|
620
658
|
setArchiveRelatedDcmtFormMids([]);
|
|
621
659
|
await onRefreshSearchAsync?.();
|
|
622
|
-
} })
|
|
623
|
-
setIsOpenSharedArchive(false);
|
|
624
|
-
}, width: isMobile ? '90%' : '60%', height: isMobile ? '90%' : '80%', children: _jsx(TMArchive, { inputDID: focusedItem?.DID, inputTID: focusedItem?.TID, inputMids: currentMetadataValues.filter(md => md.mid && md.mid > 100).map(md => ({ mid: md.mid, value: md.value ?? '' })), isSharedArchive: true, inputFile: sharedDcmtFile, onSavedAsyncCallback: async (tid, did) => {
|
|
625
|
-
setIsOpenSharedArchive(false);
|
|
626
|
-
await onRefreshSearchAsync?.();
|
|
627
|
-
} }) })] }));
|
|
660
|
+
} })] }));
|
|
628
661
|
};
|
|
629
662
|
export default TMSearchResult;
|
|
630
663
|
const renderDcmtIcon = (cellData, onDownloadDcmtsAsync, openInOffice) => _jsx(TMDcmtIcon, { tid: cellData.data.TID, did: cellData.data.DID, fileExtension: cellData.data.FILEEXT, fileCount: cellData.data.FILECOUNT, isLexProt: cellData.data.IsLexProt, isMail: cellData.data.ISMAIL, isShared: cellData.data.ISSHARED, isSigned: cellData.data.ISSIGNED, downloadMode: 'openInNewWindow', onDownloadDcmtsAsync: onDownloadDcmtsAsync, openInOffice: openInOffice });
|
|
@@ -4,7 +4,7 @@ import { TMDataGridContextMenuItem } from '../../base/TMDataGrid';
|
|
|
4
4
|
import { DcmtInfo, DcmtOperationTypes, DownloadModes, DownloadTypes, SearchResultContext } from '../../../ts';
|
|
5
5
|
export declare const getSelectedDcmtsOrFocused: (selectedItems: Array<any>, focusedItem: any, fileFormat?: FileFormats) => DcmtInfo[];
|
|
6
6
|
export declare const signatureInformationCallback: (isMobile: boolean, inputDcmts: DcmtInfo[] | undefined) => Promise<void>;
|
|
7
|
-
export declare const getCommandsMenuItems: (isMobile: boolean, dtd: DcmtTypeDescriptor | undefined, 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>, downloadDcmtsAsync: (inputDcmts: DcmtInfo[] | undefined, downloadType: DownloadTypes, downloadMode: DownloadModes, onFileDownloaded?: (dcmtFile: File | undefined) => void, confirmAttachments?: (list: FileDescriptor[]) => Promise<string[] | undefined>) => 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, 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<{
|
|
7
|
+
export declare const getCommandsMenuItems: (isMobile: boolean, dtd: DcmtTypeDescriptor | undefined, 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>) => 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, 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
8
|
mid: number;
|
|
9
9
|
value: string;
|
|
10
10
|
}>, 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>;
|
|
@@ -75,7 +75,7 @@ export const signatureInformationCallback = async (isMobile, inputDcmts) => {
|
|
|
75
75
|
TMExceptionBoxManager.show({ exception: error });
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, confirmAttachments, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, hasMasterRelation, hasDetailRelation, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToManyDocuments, hasManyToManyRelation) => {
|
|
78
|
+
export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, confirmAttachments, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, hasMasterRelation, hasDetailRelation, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToManyDocuments, hasManyToManyRelation) => {
|
|
79
79
|
const isPdfEditorLicensed = SDK_Globals?.license?.dcmtArchiveLicenses?.[0]?.siX_60007?.status === LicenseModuleStatus.Licensed;
|
|
80
80
|
let pdfEditorAvailable = false;
|
|
81
81
|
if (dtd && dtd.widgets && dtd.widgets.length > 0) {
|
|
@@ -413,7 +413,7 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
|
|
|
413
413
|
text: "Mostra documenti condivisi",
|
|
414
414
|
operationType: 'multiRow',
|
|
415
415
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
416
|
-
onClick: () =>
|
|
416
|
+
onClick: async () => { await showSharedDcmtsHandler(); }
|
|
417
417
|
}
|
|
418
418
|
]
|
|
419
419
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react",
|
|
3
|
-
"version": "6.19.0-dev1.
|
|
3
|
+
"version": "6.19.0-dev1.47",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"lib"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@topconsultnpm/sdk-ts": "6.19.0-dev1.
|
|
42
|
+
"@topconsultnpm/sdk-ts": "6.19.0-dev1.10",
|
|
43
43
|
"buffer": "^6.0.3",
|
|
44
44
|
"devextreme": "25.1.4",
|
|
45
45
|
"devextreme-react": "25.1.4",
|