@topconsultnpm/sdkui-react-beta 6.14.57 → 6.14.59
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/base/TMFileManager.d.ts +2 -0
- package/lib/components/base/TMFileManager.js +7 -2
- package/lib/components/features/search/TMSearchResult.d.ts +1 -0
- package/lib/components/features/search/TMSearchResult.js +4 -4
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +1 -1
- package/lib/components/features/search/TMSearchResultsMenuItems.js +10 -2
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +14 -14
- package/lib/components/grids/TMBlogs.js +1 -1
- package/lib/helper/SDKUI_Localizator.d.ts +1 -0
- package/lib/helper/SDKUI_Localizator.js +10 -0
- package/package.json +1 -1
|
@@ -80,6 +80,8 @@ export interface TMFileManagerProps {
|
|
|
80
80
|
folderContextMenuItems: Array<TMFileManagerContextMenuItem>;
|
|
81
81
|
/** Context menu items for files */
|
|
82
82
|
fileContextMenuItems: Array<TMFileManagerContextMenuItem>;
|
|
83
|
+
/** Callback to refresh the file manager */
|
|
84
|
+
refreshCallback: () => Promise<void>;
|
|
83
85
|
}
|
|
84
86
|
declare const TMFileManager: (props: TMFileManagerProps) => import("react/jsx-runtime").JSX.Element;
|
|
85
87
|
export default TMFileManager;
|
|
@@ -4,7 +4,7 @@ import Toolbar, { Item as ToolbarItem } from 'devextreme-react/cjs/toolbar';
|
|
|
4
4
|
import TreeView from 'devextreme-react/cjs/tree-view';
|
|
5
5
|
import ScrollView from 'devextreme-react/cjs/scroll-view';
|
|
6
6
|
import { ContextMenu, Pagination } from 'devextreme-react';
|
|
7
|
-
import { IconFolder, SDKUI_Localizator, IconHide, IconShow, IconDashboard, IconList, getFileIcon, formatBytes, Globalization, IconMenuVertical } from '../../helper';
|
|
7
|
+
import { IconFolder, SDKUI_Localizator, IconHide, IconShow, IconDashboard, IconList, getFileIcon, formatBytes, Globalization, IconMenuVertical, svgToString, IconRefresh } from '../../helper';
|
|
8
8
|
import { TMSearchBar } from '../sidebar/TMHeader';
|
|
9
9
|
import TMButton from './TMButton';
|
|
10
10
|
import TMDataGrid from './TMDataGrid';
|
|
@@ -23,7 +23,7 @@ export var TMFileManagerPageSize;
|
|
|
23
23
|
})(TMFileManagerPageSize || (TMFileManagerPageSize = {}));
|
|
24
24
|
const TMFileManager = (props) => {
|
|
25
25
|
// Destructure the treeFs prop to get the root file system
|
|
26
|
-
const { treeFs, selectedFolder, selectedFiles, focusedFile, userID, handleSelectedFiles, handleFocusedFile, handleFocusedFolder, handleSelectedFolder, viewMode: initialViewMode, onDoubleClickHandler, handleDropFileCallback, dcmtsFound, folderContextMenuItems, fileContextMenuItems, showPanel = false, onClosePanel, allowMaximize = true, onMaximizePanel } = props;
|
|
26
|
+
const { treeFs, selectedFolder, selectedFiles, focusedFile, userID, handleSelectedFiles, handleFocusedFile, handleFocusedFolder, handleSelectedFolder, viewMode: initialViewMode, onDoubleClickHandler, handleDropFileCallback, dcmtsFound, folderContextMenuItems, fileContextMenuItems, showPanel = false, onClosePanel, allowMaximize = true, onMaximizePanel, refreshCallback } = props;
|
|
27
27
|
// State to manage the current view mode ('thumbnails' or 'details')
|
|
28
28
|
const [viewMode, setViewMode] = useState(initialViewMode ?? 'thumbnails');
|
|
29
29
|
// State to store the search text entered by the user
|
|
@@ -188,6 +188,11 @@ const TMFileManager = (props) => {
|
|
|
188
188
|
onClick: () => setIsLeftPanelCollapsed(prev => !prev),
|
|
189
189
|
text: isLeftPanelCollapsed ? SDKUI_Localizator.ShowLeftPanel : SDKUI_Localizator.HideLeftPanel,
|
|
190
190
|
},
|
|
191
|
+
{
|
|
192
|
+
icon: svgToString(_jsx(IconRefresh, {})),
|
|
193
|
+
onClick: async () => await refreshCallback(),
|
|
194
|
+
text: SDKUI_Localizator.Refresh,
|
|
195
|
+
},
|
|
191
196
|
], target: '#TMPanel-Draft-Commands-Header' })] }), children: _jsx("div", { style: { flexDirection: "column", height: "100%", width: "100%", }, children: _jsx("div", { style: { display: "flex", flexGrow: 1, height: "100%" }, children: _jsxs(TMSplitterLayout, { direction: 'horizontal', showSeparator: true, separatorColor: 'transparent', separatorActiveColor: 'transparent', min: ['0', '0'], start: [isLeftPanelCollapsed ? '0%' : "50%", isLeftPanelCollapsed ? '100%' : "50%"], children: [_jsxs("div", { style: { height: "100%", width: "100%" }, onContextMenu: onTreeViewContextMenu, children: [_jsx(TreeView, { style: { marginTop: "10px" }, dataSource: treeViewData, displayExpr: "text", itemRender: renderTreeViewItem, onItemClick: handleTreeViewItemClick, onItemContextMenu: handleTreeViewContextMenu }), treeViewAnchor && _jsx(ContextMenu, { id: 'treeViewContextMenuDesktop', dataSource: folderContextMenuItems, target: treeViewAnchor, onHiding: closeTreeViewContextMenu })] }), _jsxs("div", { style: { backgroundColor: "#fff", width: "100%", height: "100%" }, children: [_jsxs(Toolbar, { style: { backgroundColor: '#f4f4f4', height: "40px", paddingLeft: "5px", paddingRight: '5px' }, children: [!showPanel && _jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: isLeftPanelCollapsed ? SDKUI_Localizator.ShowLeftPanel : SDKUI_Localizator.HideLeftPanel, btnStyle: 'toolbar', color: 'primaryOutline', icon: isLeftPanelCollapsed ? _jsx(IconHide, {}) : _jsx(IconShow, {}), onClick: () => setIsLeftPanelCollapsed(prev => !prev) }) }), _jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: viewMode === 'details' ? SDKUI_Localizator.PreviewView : SDKUI_Localizator.DetailsView, btnStyle: 'toolbar', color: 'primaryOutline', icon: viewMode === 'details' ? _jsx(IconDashboard, {}) : _jsx(IconList, {}), onClick: toggleViewMode }) }), _jsx(ToolbarItem, { location: "before", children: _jsx(TMSearchBar, { marginLeft: '0px', maxWidth: '160px', searchValue: searchText, onSearchValueChanged: (e) => handleSearchChange(e) }) })] }), _jsxs("div", { onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onContextMenu: onContextMenu, style: { width: "100%", height: "calc(100% - 40px)", border: isDragging ? '2px solid red' : '2px solid transparent' }, children: [viewMode === 'thumbnails' && _jsx(ThumbnailsView, { userID: userID, items: filteredFileItems, focusedFile: focusedFile, selectedFiles: selectedFiles, searchText: searchText, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler, setViewAnchor: setViewAnchor }), viewMode === 'details' && _jsx(DetailsView, { userID: userID, items: filteredFileItems, selectedFiles: selectedFiles, searchText: searchText, focusedFile: focusedFile, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler, fileContextMenuItems: fileContextMenuItems }), viewAnchor && _jsx(ContextMenu, { id: 'fileContextMenuDesktop', dataSource: fileContextMenuItems, target: viewAnchor, onHiding: closeViewContextMenu })] })] })] }, "TMWGs-panels-treeView") }) }) }), isMobile && _jsx("div", { style: { height: "100%", width: "100%" }, children: _jsxs(TMPanel, { onBack: openDraftList ? onBackCallback : undefined, title: SDKUI_Localizator.Drafts, allowMaximize: false, totalItems: dcmtsFound ?? 0, onClose: onClosePanel, children: [_jsxs("div", { style: { display: openDraftList ? 'none' : 'block', transition: 'opacity 0.3s ease-in-out', width: "100%", height: "100%" }, children: [_jsx(TreeView, { style: { marginTop: "10px", }, dataSource: treeViewData, displayExpr: "text", itemRender: renderTreeViewItem, onItemClick: handleTreeViewItemClick }), treeViewAnchor && _jsx(ContextMenu, { id: 'treeViewContextMenuMobile', dataSource: folderContextMenuItems, target: treeViewAnchor, onHiding: closeTreeViewContextMenu })] }), _jsxs("div", { style: { backgroundColor: "#fff", width: "100%", height: "100%", display: openDraftList ? 'block' : 'none', transition: 'opacity 0.3s ease-in-out' }, children: [_jsxs(Toolbar, { style: { backgroundColor: '#f4f4f4', height: "40px", paddingLeft: "5px", paddingRight: '5px' }, children: [_jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: viewMode === 'details' ? SDKUI_Localizator.PreviewView : SDKUI_Localizator.DetailsView, btnStyle: 'toolbar', color: 'primaryOutline', icon: viewMode === 'details' ? _jsx(IconDashboard, {}) : _jsx(IconList, {}), onClick: toggleViewMode }) }), _jsx(ToolbarItem, { location: "before", children: _jsx(TMSearchBar, { marginLeft: '0px', maxWidth: '160px', searchValue: searchText, onSearchValueChanged: (e) => handleSearchChange(e) }) })] }), _jsxs("div", { onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, style: { width: "100%", height: "calc(100% - 40px)", border: isDragging ? '2px solid red' : '2px solid transparent' }, children: [viewMode === 'thumbnails' && _jsx(ThumbnailsView, { userID: userID, items: filteredFileItems, focusedFile: focusedFile, selectedFiles: selectedFiles, searchText: searchText, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler, setViewAnchor: setViewAnchor }), viewMode === 'details' && _jsx(DetailsView, { items: filteredFileItems, selectedFiles: selectedFiles, searchText: searchText, focusedFile: focusedFile, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler }), viewAnchor && _jsx(ContextMenu, { id: 'fileViewContextMenuMobile', dataSource: fileContextMenuItems, target: viewAnchor, onHiding: closeViewContextMenu })] })] })] }) })] });
|
|
192
197
|
};
|
|
193
198
|
export default TMFileManager;
|
|
@@ -15,6 +15,7 @@ interface ITMSearchResultProps {
|
|
|
15
15
|
showToolbarHeader?: boolean;
|
|
16
16
|
groupId?: string;
|
|
17
17
|
selectedSearchResultTID?: number;
|
|
18
|
+
fromWorkingGroup?: boolean;
|
|
18
19
|
onClose?: () => void;
|
|
19
20
|
onWFOperationCompleted?: () => Promise<void>;
|
|
20
21
|
onSelectedTIDChanged?: (TID: number) => void;
|
|
@@ -50,7 +50,7 @@ const orderByName = (array) => {
|
|
|
50
50
|
return 1;
|
|
51
51
|
} return 0; });
|
|
52
52
|
};
|
|
53
|
-
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, onRefreshAfterAddDcmtToFavs, onRefreshSearchAsync, onSelectedTIDChanged, onWFOperationCompleted, onClose, onTaskCreateRequest, onFileOpened }) => {
|
|
53
|
+
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, fromWorkingGroup = false, onRefreshAfterAddDcmtToFavs, onRefreshSearchAsync, onSelectedTIDChanged, onWFOperationCompleted, onClose, onTaskCreateRequest, onFileOpened }) => {
|
|
54
54
|
const [id, setID] = useState('');
|
|
55
55
|
const [showApprovePopup, setShowApprovePopup] = useState(false);
|
|
56
56
|
const [showRejectPopup, setShowRejectPopup] = useState(false);
|
|
@@ -205,7 +205,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
205
205
|
return;
|
|
206
206
|
if (e.target === 'content') {
|
|
207
207
|
e.items = e.items || [];
|
|
208
|
-
const menuItems = getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, showCopyMoveFormCallback);
|
|
208
|
+
const menuItems = getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, fromWorkingGroup, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, showCopyMoveFormCallback);
|
|
209
209
|
e.items.push(...menuItems);
|
|
210
210
|
}
|
|
211
211
|
};
|
|
@@ -332,7 +332,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
334
|
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 &&
|
|
335
|
-
_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(CommandsContextMenu, { target: `#commands-header-${id}`, menuItems: getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, showCopyMoveFormCallback) })] });
|
|
335
|
+
_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(CommandsContextMenu, { target: `#commands-header-${id}`, menuItems: getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, fromWorkingGroup, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, showCopyMoveFormCallback) })] });
|
|
336
336
|
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') })] });
|
|
337
337
|
const handleAddItem = (tid, did) => {
|
|
338
338
|
let newItem = { TID: tid ?? 0, DID: did ?? 0 };
|
|
@@ -349,7 +349,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
|
349
349
|
_jsx(TMLayoutItem, { children: _jsx(TMSearchResultSelector, { searchResults: currentSearchResults, selectedTID: selectedSearchResultTID, onSelectionChanged: onSearchResultSelectionChanged }) })
|
|
350
350
|
:
|
|
351
351
|
_jsx(_Fragment, {}), _jsxs(TMLayoutItem, { children: [_jsx(TMSearchResultGrid, { inputFocusedItem: focusedItem, inputSelectedItems: selectedItems, searchResult: searchResults.length > 1 ? selectedSearchResult : searchResults[0], lastUpdateSearchTime: lastUpdateSearchTime, 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) }), allowFloatingBar && showFloatingBar && deviceType !== DeviceType.MOBILE &&
|
|
352
|
-
_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(CommandsContextMenu, { target: `#commands-floating-${id}`, menuItems: getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, showCopyMoveFormCallback) })] })] })] }), 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) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: SDKUI_Localizator.BatchUpdate, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
|
|
352
|
+
_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(CommandsContextMenu, { target: `#commands-floating-${id}`, menuItems: getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, fromWorkingGroup, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, showCopyMoveFormCallback) })] })] })] }), 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) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: SDKUI_Localizator.BatchUpdate, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
|
|
353
353
|
setIsOpenBatchUpdate(false);
|
|
354
354
|
}, onSavedCallbackAsync: async () => {
|
|
355
355
|
setIsOpenBatchUpdate(false);
|
|
@@ -3,4 +3,4 @@ import { DcmtTypeDescriptor, FileDescriptor, FileFormats, LayoutModes } from '@t
|
|
|
3
3
|
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
|
-
export declare const getCommandsMenuItems: (dtd: DcmtTypeDescriptor | undefined, selectedItems: Array<any>, focusedItem: any, context: SearchResultContext, showFloatingBar: boolean, setShowFloatingBar: React.Dispatch<React.SetStateAction<boolean>>, openFormHandler: (layoutMode: LayoutModes) => 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, showCopyMoveFormCallback: (mode: "copyToWgDraft" | "copyToWgArchivedDoc") => void) => Array<TMDataGridContextMenuItem>;
|
|
6
|
+
export declare const getCommandsMenuItems: (dtd: DcmtTypeDescriptor | undefined, selectedItems: Array<any>, focusedItem: any, context: SearchResultContext, showFloatingBar: boolean, fromWorkingGroup: boolean, setShowFloatingBar: React.Dispatch<React.SetStateAction<boolean>>, openFormHandler: (layoutMode: LayoutModes) => 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, showCopyMoveFormCallback: (mode: "copyToWgDraft" | "copyToWgArchivedDoc") => void) => Array<TMDataGridContextMenuItem>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { AccessLevels, AccessLevelsEx, AppModules, FileFormats, LayoutModes, SDK_Globals } from '@topconsultnpm/sdk-ts-beta';
|
|
3
|
-
import { IconActivity, IconAdd, IconArchiveDoc, IconBatchUpdate, IconCheckFile, IconCloseCircle, IconConvertFilePdf, IconDelete, IconDotsVerticalCircleOutline, IconDownload, IconExportTo, IconFileDots, IconFolder, IconHide, IconInfo, IconPlatform, IconPreview, IconRelation, IconSearch, IconShow, IconSignature, IconStar, IconSubstFile, IconUndo, SDKUI_Localizator, svgToString } from '../../../helper';
|
|
3
|
+
import { IconActivity, IconAdd, IconArchiveDoc, IconBatchUpdate, IconCheckFile, IconCloseCircle, IconCloseOutline, IconConvertFilePdf, IconDelete, IconDotsVerticalCircleOutline, IconDownload, IconExportTo, IconFileDots, IconFolder, IconHide, IconInfo, IconPlatform, IconPreview, IconRelation, IconSearch, IconShow, IconSignature, IconStar, IconSubstFile, IconUndo, SDKUI_Localizator, svgToString } from '../../../helper';
|
|
4
4
|
import ShowAlert from '../../base/TMAlert';
|
|
5
5
|
import { TMMessageBoxManager, ButtonNames, TMExceptionBoxManager } from '../../base/TMPopUp';
|
|
6
6
|
import TMSpinner from '../../base/TMSpinner';
|
|
@@ -24,7 +24,7 @@ export const getSelectedDcmtsOrFocused = (selectedItems, focusedItem, fileFormat
|
|
|
24
24
|
}
|
|
25
25
|
return [];
|
|
26
26
|
};
|
|
27
|
-
export const getCommandsMenuItems = (dtd, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, confirmAttachments, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, showCopyMoveFormCallback) => {
|
|
27
|
+
export const getCommandsMenuItems = (dtd, selectedItems, focusedItem, context, showFloatingBar, fromWorkingGroup, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, confirmAttachments, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, showCopyMoveFormCallback) => {
|
|
28
28
|
// let ftExplanations = focusedItem?.FTExplanations;
|
|
29
29
|
return [
|
|
30
30
|
{
|
|
@@ -81,11 +81,19 @@ export const getCommandsMenuItems = (dtd, selectedItems, focusedItem, context, s
|
|
|
81
81
|
operationType: 'multiRow',
|
|
82
82
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
83
83
|
items: [
|
|
84
|
+
{
|
|
85
|
+
icon: svgToString(_jsx(IconCloseOutline, {})),
|
|
86
|
+
text: SDKUI_Localizator.RemoveFromWorkgroup,
|
|
87
|
+
operationType: 'multiRow',
|
|
88
|
+
visible: fromWorkingGroup,
|
|
89
|
+
disabled: !fromWorkingGroup,
|
|
90
|
+
},
|
|
84
91
|
{
|
|
85
92
|
icon: svgToString(_jsx(IconDelete, {})),
|
|
86
93
|
text: SDKUI_Localizator.LogDelete,
|
|
87
94
|
operationType: 'multiRow',
|
|
88
95
|
disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
96
|
+
beginGroup: true,
|
|
89
97
|
onClick: async () => {
|
|
90
98
|
let dcmts = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
|
|
91
99
|
await runOperationAsync(dcmts, DcmtOperationTypes.LogDelete, dcmts.length <= MAX_DCMTS_FOR_SELECTION_REFRESH ? onRefreshDataRowsAsync : onRefreshSearchAsync);
|
|
@@ -218,6 +218,19 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
218
218
|
return false;
|
|
219
219
|
};
|
|
220
220
|
const { validationItems, exception } = useSaveForm(FormModes.Update, 0, new SaveFormOptions(), validator);
|
|
221
|
+
const getTitle = () => {
|
|
222
|
+
if (context.engine === 'WorkingGroupEngine') {
|
|
223
|
+
return (mode === 'copy' ? SDKUI_Localizator.Copy : SDKUI_Localizator.Move) + (context.selectedDrafts.length === 1
|
|
224
|
+
? ': ' + context.selectedDrafts[0].name
|
|
225
|
+
: ' (' + context.selectedDrafts.length + ')');
|
|
226
|
+
}
|
|
227
|
+
else if (context.engine === 'SearchEngine' && currentDcmtTypeDescriptor) {
|
|
228
|
+
return SDKUI_Localizator.Copy + (context.selectedDrafts.length === 1
|
|
229
|
+
? ': ' + getDocumentDisplayInfo(currentDcmtTypeDescriptor, context.selectedDrafts[0]).name
|
|
230
|
+
: ' (' + context.selectedDrafts.length + ')');
|
|
231
|
+
}
|
|
232
|
+
return '-';
|
|
233
|
+
};
|
|
221
234
|
const onSaveAsync = async () => {
|
|
222
235
|
if (isDisabled)
|
|
223
236
|
return;
|
|
@@ -296,7 +309,7 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
296
309
|
setWaitPanelMaxValuePrimary(0);
|
|
297
310
|
setWaitPanelValuePrimary(0);
|
|
298
311
|
setShowWaitPanel(false);
|
|
299
|
-
TMResultManager.show(result,
|
|
312
|
+
TMResultManager.show(result, getTitle(), "ID", undefined);
|
|
300
313
|
refreshCallback?.();
|
|
301
314
|
onClose();
|
|
302
315
|
}
|
|
@@ -331,19 +344,6 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
331
344
|
const tooltipContent = _jsxs("div", { style: { textAlign: "center" }, children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID" }), ": ", itemData.id] });
|
|
332
345
|
return (_jsxs("div", { style: { whiteSpace: "nowrap", display: "flex", alignItems: "center" }, className: isSelected ? 'treeview-selected-item-manager' : '', children: [_jsx(TMTooltip, { content: tooltipContent, children: _jsx(IconFolder, { style: { marginRight: 5, color: '#e6c200' } }) }), itemData.text] }));
|
|
333
346
|
};
|
|
334
|
-
const getTitle = () => {
|
|
335
|
-
if (context.engine === 'WorkingGroupEngine') {
|
|
336
|
-
return (mode === 'copy' ? SDKUI_Localizator.Copy : SDKUI_Localizator.Move) + (context.selectedDrafts.length === 1
|
|
337
|
-
? ': ' + context.selectedDrafts[0].name
|
|
338
|
-
: ' (' + context.selectedDrafts.length + ')');
|
|
339
|
-
}
|
|
340
|
-
else if (context.engine === 'SearchEngine' && currentDcmtTypeDescriptor) {
|
|
341
|
-
return SDKUI_Localizator.Copy + (context.selectedDrafts.length === 1
|
|
342
|
-
? ': ' + getDocumentDisplayInfo(currentDcmtTypeDescriptor, context.selectedDrafts[0]).name
|
|
343
|
-
: ' (' + context.selectedDrafts.length + ')');
|
|
344
|
-
}
|
|
345
|
-
return '-';
|
|
346
|
-
};
|
|
347
347
|
return _jsx(TMSaveForm, { title: getTitle(), showTitleFormMode: false, showErrorCount: false, showUndoButton: false, hasNavigation: false, skipIsModifiedCheck: true, isModal: true, width: calcResponsiveSizes(deviceType, '800px', '800px', '95%'), height: '550px', validationItems: validationItems, exception: exception, isModified: isLocalSelectionModified(), showToolbar: false, showSaveButton: false, onClose: onClose, children: _jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, isCancelable: true, abortController: abortController, children: [_jsx("div", { style: { width: "100%", height: '48px' }, children: _jsx(TMStepNavigator, { steps: steps, currentStep: adjustedCurrentStep, onStepChange: (stepIndex) => { setCurrentStep(stepIndex); } }) }), _jsxs("div", { style: {
|
|
348
348
|
marginTop: '10px',
|
|
349
349
|
padding: '10px',
|
|
@@ -330,7 +330,7 @@ const TMBlogs = (props) => {
|
|
|
330
330
|
const descriptors = await getDcmtTypeDescriptor(blogPosts);
|
|
331
331
|
setDcmtTypeDescriptors(descriptors);
|
|
332
332
|
};
|
|
333
|
-
fetchDcmtTypeDescriptor();
|
|
333
|
+
showExtendedAttachments && fetchDcmtTypeDescriptor();
|
|
334
334
|
if (updateVisualizedBlogCallback)
|
|
335
335
|
updateVisualizedBlogCallback(blogPosts);
|
|
336
336
|
}, [blogPosts]);
|
|
@@ -341,6 +341,7 @@ export declare class SDKUI_Localizator {
|
|
|
341
341
|
static get Relations(): "Korrelationen" | "Correlations" | "Correlaciones" | "Relations" | "Correlacionados" | "Correlazioni";
|
|
342
342
|
static get RelationManyToMany(): "Folge viele mit vielen" | "Relation many to many" | "Correlación muchos a muchos" | "Corrélation plusieurs à plusieurs" | "Muitos para muitos relação" | "Correlazione molti a molti";
|
|
343
343
|
static get RelationType(): "Art der Beziehung" | "Relation type" | "Tipo de relación" | "Type de relation" | "Tipo de relacionamento" | "Tipo di relazione";
|
|
344
|
+
static get RemoveFromWorkgroup(): string;
|
|
344
345
|
static get RemoveNamedPreferredCredentials(): "Möchten Sie die Anmeldedaten '{{0}}' entfernen, die als bevorzugt festgelegt wurden?" | "Do you want to remove the '{{0}}' credentials set as preferred?" | "¿Quieres eliminar las credenciales '{{0}}' configuradas como preferidas?" | "Voulez-vous supprimer les identifiants '{{0}}' définis comme préférés ?" | "Deseja remover as credenciais '{{0}}' definidas como preferidas?" | "Vuoi rimuovere le credenziali '{{0}}' impostate come preferite?";
|
|
345
346
|
static get RememberCredentials(): "Anmeldedaten merken" | "Remember credentials" | "Recordar credenciales" | "Se souvenir des identifiants" | "Lembrar credenciais" | "Ricorda credenziali";
|
|
346
347
|
static get Required(): "Obligatorisch" | "Required" | "Obligatorio" | "Obbligatoire" | "Obrigatório" | "Obbligatorio";
|
|
@@ -3362,6 +3362,16 @@ export class SDKUI_Localizator {
|
|
|
3362
3362
|
default: return "Tipo di relazione";
|
|
3363
3363
|
}
|
|
3364
3364
|
}
|
|
3365
|
+
static get RemoveFromWorkgroup() {
|
|
3366
|
+
switch (this._cultureID) {
|
|
3367
|
+
case CultureIDs.De_DE: return "Aus der Arbeitsgruppe entfernen";
|
|
3368
|
+
case CultureIDs.En_US: return "Remove from workgroup";
|
|
3369
|
+
case CultureIDs.Es_ES: return "Eliminar del grupo de trabajo";
|
|
3370
|
+
case CultureIDs.Fr_FR: return "Supprimer du groupe de travail";
|
|
3371
|
+
case CultureIDs.Pt_PT: return "Remover do grupo de trabalho";
|
|
3372
|
+
default: return "Rimuovi dal Gruppo di lavoro";
|
|
3373
|
+
}
|
|
3374
|
+
}
|
|
3365
3375
|
static get RemoveNamedPreferredCredentials() {
|
|
3366
3376
|
switch (this._cultureID) {
|
|
3367
3377
|
case CultureIDs.De_DE:
|