@topconsultnpm/sdkui-react 6.20.0-dev1.13 → 6.20.0-dev1.131
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/assets/Toppy-help-center.png +0 -0
- package/lib/assets/headergradient.svg +87 -0
- package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +322 -30
- package/lib/components/NewComponents/ContextMenu/hooks.d.ts +8 -1
- package/lib/components/NewComponents/ContextMenu/hooks.js +80 -8
- package/lib/components/NewComponents/ContextMenu/index.d.ts +3 -0
- package/lib/components/NewComponents/ContextMenu/index.js +2 -0
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +9 -1
- package/lib/components/NewComponents/ContextMenu/styles.js +146 -47
- package/lib/components/NewComponents/ContextMenu/types.d.ts +22 -3
- package/lib/components/NewComponents/ContextMenu/useLongPress.d.ts +21 -0
- package/lib/components/NewComponents/ContextMenu/useLongPress.js +112 -0
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +620 -125
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +25 -5
- package/lib/components/NewComponents/FloatingMenuBar/styles.js +215 -59
- package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +12 -3
- package/lib/components/base/TMAccordionNew.js +35 -14
- package/lib/components/base/TMButton.js +6 -0
- package/lib/components/base/TMClosableList.js +4 -0
- package/lib/components/base/TMCustomButton.js +61 -17
- package/lib/components/base/TMDataGrid.d.ts +7 -4
- package/lib/components/base/TMDataGrid.js +153 -11
- package/lib/components/base/TMDropDownMenu.js +21 -18
- package/lib/components/base/TMFileManager.d.ts +4 -3
- package/lib/components/base/TMFileManager.js +32 -24
- package/lib/components/base/TMFileManagerDataGridView.d.ts +3 -2
- package/lib/components/base/TMFileManagerDataGridView.js +1 -11
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +7 -1
- package/lib/components/base/TMFileManagerThumbnailItems.js +5 -2
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +17 -4
- package/lib/components/base/TMFileManagerThumbnailsView.js +18 -6
- package/lib/components/base/TMFileManagerUtils.d.ts +0 -12
- package/lib/components/base/TMListView.js +33 -15
- package/lib/components/base/TMPanel.d.ts +1 -1
- package/lib/components/base/TMPanel.js +4 -2
- package/lib/components/base/TMPopUp.js +6 -0
- package/lib/components/base/TMToolbarCard.js +2 -0
- package/lib/components/base/TMTreeView.d.ts +2 -1
- package/lib/components/base/TMTreeView.js +33 -26
- package/lib/components/choosers/TMDataListItemChooser.d.ts +2 -0
- package/lib/components/choosers/TMDataListItemChooser.js +8 -2
- package/lib/components/choosers/TMDcmtTypeChooser.d.ts +1 -0
- package/lib/components/choosers/TMDcmtTypeChooser.js +11 -3
- package/lib/components/choosers/TMDistinctValues.js +2 -2
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +2 -0
- package/lib/components/choosers/TMDynDataListItemChooser.js +8 -2
- package/lib/components/choosers/TMInvoiceRetrieveFormats.js +1 -1
- package/lib/components/choosers/TMMetadataChooser.d.ts +2 -0
- package/lib/components/choosers/TMMetadataChooser.js +19 -4
- package/lib/components/choosers/TMOrderRetrieveFormats.js +1 -1
- package/lib/components/choosers/TMUserChooser.d.ts +2 -5
- package/lib/components/choosers/TMUserChooser.js +33 -47
- package/lib/components/editors/TMCheckBox.js +2 -0
- package/lib/components/editors/TMDateBox.js +18 -9
- package/lib/components/editors/TMEditorStyled.js +7 -0
- package/lib/components/editors/TMLocalizedTextBox.d.ts +3 -1
- package/lib/components/editors/TMLocalizedTextBox.js +16 -14
- package/lib/components/editors/TMMetadataEditor.d.ts +1 -0
- package/lib/components/editors/TMMetadataEditor.js +4 -4
- package/lib/components/editors/TMMetadataTextBox.d.ts +9 -0
- package/lib/components/editors/TMMetadataTextBox.js +92 -0
- package/lib/components/editors/TMMetadataValues.d.ts +2 -0
- package/lib/components/editors/TMMetadataValues.js +26 -8
- package/lib/components/editors/TMRadioButton.js +2 -0
- package/lib/components/editors/TMTextArea.js +18 -30
- package/lib/components/editors/TMTextBox.d.ts +1 -1
- package/lib/components/editors/TMTextBox.js +29 -4
- package/lib/components/editors/TMTextExpression.js +6 -91
- package/lib/components/features/archive/TMArchive.js +2 -2
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +15 -0
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +462 -0
- package/lib/components/features/assistant/TMToppySpeechBubble.d.ts +11 -0
- package/lib/components/features/assistant/TMToppySpeechBubble.js +126 -0
- package/lib/components/features/documents/TMDcmtBlog.js +1 -1
- package/lib/components/features/documents/TMDcmtForm.d.ts +14 -2
- package/lib/components/features/documents/TMDcmtForm.js +576 -292
- package/lib/components/features/documents/TMDcmtPreview.js +42 -155
- package/lib/components/features/documents/TMDcmtTasks.js +9 -9
- package/lib/components/features/documents/TMMasterDetailDcmts.js +38 -53
- package/lib/components/features/documents/TMRelationViewer.d.ts +1 -1
- package/lib/components/features/documents/TMRelationViewer.js +2 -2
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +8 -0
- package/lib/components/features/search/{TMSearchResultCheckoutInfoForm.js → TMDcmtCheckoutInfoForm.js} +2 -2
- package/lib/components/features/search/TMSavedQuerySelector.js +72 -67
- package/lib/components/features/search/TMSearch.d.ts +3 -0
- package/lib/components/features/search/TMSearch.js +50 -11
- package/lib/components/features/search/TMSearchQueryEditor.d.ts +1 -0
- package/lib/components/features/search/TMSearchQueryEditor.js +10 -10
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +1 -0
- package/lib/components/features/search/TMSearchQueryPanel.js +40 -25
- package/lib/components/features/search/TMSearchResult.d.ts +3 -0
- package/lib/components/features/search/TMSearchResult.js +370 -252
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +3 -3
- package/lib/components/features/search/TMSearchResultsMenuItems.js +227 -171
- package/lib/components/features/search/TMSignSettingsForm.js +1 -1
- package/lib/components/features/search/TMSignatureInfoContent.d.ts +6 -0
- package/lib/components/features/search/TMSignatureInfoContent.js +140 -0
- package/lib/components/features/search/TMViewHistoryDcmt.js +47 -52
- package/lib/components/features/tasks/TMTaskForm.js +75 -25
- package/lib/components/features/tasks/TMTasksAgenda.d.ts +3 -1
- package/lib/components/features/tasks/TMTasksAgenda.js +48 -9
- package/lib/components/features/tasks/TMTasksCalendar.d.ts +2 -0
- package/lib/components/features/tasks/TMTasksCalendar.js +19 -7
- package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -2
- package/lib/components/features/tasks/TMTasksUtils.js +57 -37
- package/lib/components/features/tasks/TMTasksView.js +28 -19
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +33 -2
- package/lib/components/features/workflow/TMWorkflowPopup.js +140 -34
- package/lib/components/features/workflow/diagram/DiagramItemComponent.d.ts +2 -0
- package/lib/components/features/workflow/diagram/DiagramItemComponent.js +14 -7
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
- package/lib/components/features/workflow/diagram/RecipientList.js +3 -2
- package/lib/components/features/workflow/diagram/WFDiagram.d.ts +4 -0
- package/lib/components/features/workflow/diagram/WFDiagram.js +164 -13
- package/lib/components/forms/Login/LoginValidatorService.d.ts +2 -0
- package/lib/components/forms/Login/LoginValidatorService.js +7 -2
- package/lib/components/forms/Login/TMLoginForm.js +35 -7
- package/lib/components/forms/TMChooserForm.js +1 -1
- package/lib/components/grids/TMBlogsPost.js +56 -31
- package/lib/components/grids/TMRecentsManager.js +20 -10
- package/lib/components/grids/TMValidationItemsList.js +6 -0
- package/lib/components/index.d.ts +6 -3
- package/lib/components/index.js +6 -3
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +13 -5
- package/lib/components/query/TMQueryEditor.d.ts +6 -1
- package/lib/components/query/TMQueryEditor.js +105 -101
- package/lib/components/settings/SettingsAppearance.d.ts +2 -1
- package/lib/components/settings/SettingsAppearance.js +99 -30
- package/lib/components/sidebar/TMHeader.js +11 -7
- package/lib/components/sidebar/TMSidebar.d.ts +0 -1
- package/lib/components/sidebar/TMSidebar.js +16 -44
- package/lib/components/sidebar/TMSidebarItem.js +36 -17
- package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -1
- package/lib/components/viewers/TMDataListItemViewer.js +35 -71
- package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +8 -0
- package/lib/components/viewers/TMDataUserIdItemViewer.js +39 -0
- package/lib/css/tm-sdkui.css +1 -1
- package/lib/helper/SDKUI_Globals.d.ts +22 -0
- package/lib/helper/SDKUI_Globals.js +10 -1
- package/lib/helper/SDKUI_Localizator.d.ts +21 -3
- package/lib/helper/SDKUI_Localizator.js +196 -10
- package/lib/helper/TMCommandsContextMenu.d.ts +4 -2
- package/lib/helper/TMCommandsContextMenu.js +15 -4
- package/lib/helper/TMIcons.d.ts +4 -0
- package/lib/helper/TMIcons.js +13 -3
- package/lib/helper/TMPdfViewer.d.ts +8 -0
- package/lib/helper/TMPdfViewer.js +373 -0
- package/lib/helper/TMToppyMessage.js +4 -0
- package/lib/helper/checkinCheckoutManager.d.ts +31 -1
- package/lib/helper/checkinCheckoutManager.js +112 -30
- package/lib/helper/devextremeCustomMessages.d.ts +30 -0
- package/lib/helper/devextremeCustomMessages.js +30 -0
- package/lib/helper/helpers.d.ts +30 -2
- package/lib/helper/helpers.js +132 -4
- package/lib/helper/index.d.ts +2 -0
- package/lib/helper/index.js +2 -0
- package/lib/helper/queryHelper.d.ts +2 -2
- package/lib/helper/queryHelper.js +80 -24
- package/lib/helper/workItemsHelper.d.ts +6 -0
- package/lib/helper/workItemsHelper.js +230 -0
- package/lib/hooks/useCheckInOutOperations.d.ts +28 -0
- package/lib/hooks/useCheckInOutOperations.js +223 -0
- package/lib/hooks/useDataListItem.d.ts +12 -0
- package/lib/hooks/useDataListItem.js +132 -0
- package/lib/hooks/useDataUserIdItem.d.ts +10 -0
- package/lib/hooks/useDataUserIdItem.js +96 -0
- package/lib/hooks/useFloatingBarPinnedItems.d.ts +11 -0
- package/lib/hooks/useFloatingBarPinnedItems.js +54 -0
- package/lib/hooks/useMetadataExpression.d.ts +19 -0
- package/lib/hooks/useMetadataExpression.js +99 -0
- package/lib/hooks/useSettingsFeedback.d.ts +11 -0
- package/lib/hooks/useSettingsFeedback.js +38 -0
- package/lib/hooks/useWorkflowApprove.d.ts +4 -0
- package/lib/hooks/useWorkflowApprove.js +14 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -2
- package/lib/services/platform_services.d.ts +3 -3
- package/lib/ts/types.d.ts +61 -1
- package/lib/utils/theme.d.ts +1 -1
- package/lib/utils/theme.js +1 -1
- package/package.json +8 -6
- package/lib/components/NewComponents/Notification/Notification.d.ts +0 -4
- package/lib/components/NewComponents/Notification/Notification.js +0 -60
- package/lib/components/NewComponents/Notification/NotificationContainer.d.ts +0 -8
- package/lib/components/NewComponents/Notification/NotificationContainer.js +0 -33
- package/lib/components/NewComponents/Notification/index.d.ts +0 -2
- package/lib/components/NewComponents/Notification/index.js +0 -2
- package/lib/components/NewComponents/Notification/styles.d.ts +0 -21
- package/lib/components/NewComponents/Notification/styles.js +0 -180
- package/lib/components/NewComponents/Notification/types.d.ts +0 -18
- package/lib/components/NewComponents/Notification/types.js +0 -1
- package/lib/components/base/TMContextMenu.d.ts +0 -25
- package/lib/components/base/TMContextMenu.js +0 -109
- package/lib/components/base/TMContextMenuOLD.d.ts +0 -26
- package/lib/components/base/TMContextMenuOLD.js +0 -56
- package/lib/components/base/TMFloatingToolbar.d.ts +0 -9
- package/lib/components/base/TMFloatingToolbar.js +0 -101
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.d.ts +0 -30
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.js +0 -482
- package/lib/components/features/assistant/ToppySpeechBubble.d.ts +0 -9
- package/lib/components/features/assistant/ToppySpeechBubble.js +0 -117
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +0 -8
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { AccessLevels, AccessLevelsEx, AppModules, FileFormats, LayoutModes, SDK_Globals, DcmtTypeListCacheService, LicenseModuleStatus } from '@topconsultnpm/sdk-ts';
|
|
3
|
-
import { IconActivity, IconArchiveDoc, IconBatchUpdate, IconCheckFile, IconCheckIn, IconCircleInfo, IconCloseCircle, IconConvertFilePdf, IconDelete, IconDotsVerticalCircleOutline, IconDownload, IconEdit, IconExportTo, IconFileDots, IconHide, IconInfo, IconMenuCAArchive, IconPlatform, IconPreview, IconRelation, IconSearch, IconShow, IconStar, IconSubstFile, IconUndo, IconUserGroupOutline, SDKUI_Localizator,
|
|
3
|
+
import { IconActivity, IconArchiveDoc, IconBatchUpdate, IconCheckFile, IconCheckIn, IconCircleInfo, IconCloseCircle, IconConvertFilePdf, IconDelete, IconDotsVerticalCircleOutline, IconDownload, IconEdit, IconExportTo, IconFileDots, IconHide, IconInfo, IconMenuCAArchive, IconPlatform, IconPreview, IconRelation, IconSearch, IconShow, IconStar, IconSubstFile, IconUndo, IconUserGroupOutline, SDKUI_Localizator, searchResultToMetadataValues, IconSignaturePencil, IconArchiveMaster, IconArchiveDetail, IconDetailDcmts, isPdfEditorEnabled, IconPair, IconUnpair, IconSharedDcmt, IconShare, IconCopy, IconMoveToFolder, IconPin } 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';
|
|
7
7
|
import { DcmtOperationTypes, DownloadTypes, SearchResultContext } from '../../../ts';
|
|
8
8
|
import { isXMLFileExt } from '../../../helper/dcmtsHelper';
|
|
9
9
|
import { getDcmtCicoStatus } from '../../../helper/checkinCheckoutManager';
|
|
10
|
+
import TMSignatureInfoContent from './TMSignatureInfoContent';
|
|
10
11
|
const disabledForSingleRow = (selectedItems, focusedItem) => {
|
|
11
12
|
// Disabilita se ci sono più item selezionati o se focusedItem non ha TID/DID validi
|
|
12
13
|
return selectedItems.length > 1 || focusedItem === undefined || focusedItem.TID === undefined || focusedItem.DID === undefined;
|
|
@@ -62,31 +63,14 @@ export const signatureInformationCallback = async (isMobile, inputDcmts) => {
|
|
|
62
63
|
});
|
|
63
64
|
return;
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
TMMessageBoxManager.show({
|
|
75
|
-
title: SDKUI_Localizator.SignatureInformation,
|
|
76
|
-
buttons: [ButtonNames.OK],
|
|
77
|
-
showToppy: false,
|
|
78
|
-
resizable: true,
|
|
79
|
-
initialWidth: !isMobile ? '500px' : undefined,
|
|
80
|
-
message: (_jsx("div", { style: { lineHeight: "1.4em", overflowY: "auto", maxHeight: "400px", paddingRight: "8px", boxSizing: "border-box" }, children: res.signers && res.signers.length > 0 ? (res.signers.map((signer, idx) => (_jsxs("div", { style: {
|
|
81
|
-
border: "1px solid #ccc",
|
|
82
|
-
borderRadius: "10px",
|
|
83
|
-
padding: "12px",
|
|
84
|
-
marginBottom: "12px",
|
|
85
|
-
background: "#f9f9f9",
|
|
86
|
-
boxShadow: "0 1px 3px rgba(0,0,0,0.1)"
|
|
87
|
-
}, children: [_jsxs("h3", { style: { margin: "0 0 8px", color: "#333" }, children: ["Firma ", signer.levelAndIndex] }), _jsxs("p", { style: { margin: "4px 0" }, children: [_jsx("strong", { children: "Intestatario:" }), _jsx("br", {}), signer.info1 ?? '-'] }), _jsxs("p", { style: { margin: "4px 0" }, children: [_jsx("strong", { children: "Riferimento temporale:" }), _jsx("br", {}), signer.info2 ?? '-'] }), _jsxs("p", { style: { margin: "4px 0" }, children: [_jsx("strong", { children: "Dettagli:" }), _jsx("br", {}), signer.info3 ?? '-'] })] }, idx)))) : (_jsx("p", { children: "Nessuna firma trovata" })) }))
|
|
88
|
-
});
|
|
89
|
-
}
|
|
66
|
+
TMMessageBoxManager.show({
|
|
67
|
+
title: SDKUI_Localizator.SignatureInformation,
|
|
68
|
+
buttons: [ButtonNames.OK],
|
|
69
|
+
showToppy: false,
|
|
70
|
+
resizable: true,
|
|
71
|
+
initialWidth: !isMobile ? '700px' : undefined,
|
|
72
|
+
message: _jsx(TMSignatureInfoContent, { inputDcmt: inputDcmts[0] })
|
|
73
|
+
});
|
|
90
74
|
}
|
|
91
75
|
catch (error) {
|
|
92
76
|
console.error(error);
|
|
@@ -96,16 +80,37 @@ export const signatureInformationCallback = async (isMobile, inputDcmts) => {
|
|
|
96
80
|
TMSpinner.hide();
|
|
97
81
|
}
|
|
98
82
|
};
|
|
99
|
-
export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, confirmAttachments, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback,
|
|
83
|
+
export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, confirmAttachments, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, copyCheckoutPathToClipboardOperationCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, hasMasterRelation, hasDetailRelation, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToManyDocuments, hasManyToManyRelation, pinnedItemIds, onTogglePin) => {
|
|
100
84
|
const isPdfEditorLicensed = SDK_Globals?.license?.dcmtArchiveLicenses?.[0]?.siX_60007?.status === LicenseModuleStatus.Licensed;
|
|
85
|
+
const addPinIconToItems = (items) => {
|
|
86
|
+
if (isMobile || !onTogglePin)
|
|
87
|
+
return items;
|
|
88
|
+
return items.map(item => {
|
|
89
|
+
const newItem = { ...item };
|
|
90
|
+
if (item.id && item.onClick && !item.submenu) {
|
|
91
|
+
newItem.rightIconProps = {
|
|
92
|
+
icon: _jsx(IconPin, {}),
|
|
93
|
+
activeColor: 'red',
|
|
94
|
+
inactiveColor: 'black',
|
|
95
|
+
isActive: pinnedItemIds?.includes(item.id) ?? false,
|
|
96
|
+
onClick: () => onTogglePin(item.id),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
if (item.submenu && item.submenu.length > 0) {
|
|
100
|
+
newItem.submenu = addPinIconToItems(item.submenu);
|
|
101
|
+
}
|
|
102
|
+
return newItem;
|
|
103
|
+
});
|
|
104
|
+
};
|
|
101
105
|
let pdfEditorAvailable = false;
|
|
102
106
|
if (dtd && dtd.widgets && dtd.widgets.length > 0) {
|
|
103
107
|
pdfEditorAvailable = isPdfEditorEnabled(dtd.widgets);
|
|
104
108
|
}
|
|
105
109
|
const addToFavoriteMenuItem = () => {
|
|
106
110
|
return {
|
|
107
|
-
|
|
108
|
-
|
|
111
|
+
id: 'fav',
|
|
112
|
+
icon: _jsx(IconStar, {}),
|
|
113
|
+
name: SDKUI_Localizator.AddTo + ' ' + SDKUI_Localizator.Favorites,
|
|
109
114
|
operationType: 'multiRow',
|
|
110
115
|
disabled: context === SearchResultContext.FAVORITES_AND_RECENTS || disabledForMultiRow(selectedItems, focusedItem),
|
|
111
116
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.AddToFavs); onRefreshAfterAddDcmtToFavs?.(); },
|
|
@@ -113,8 +118,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
113
118
|
};
|
|
114
119
|
const addReplaceFileMenuItem = () => {
|
|
115
120
|
return {
|
|
116
|
-
|
|
117
|
-
|
|
121
|
+
id: 'repl',
|
|
122
|
+
icon: _jsx(IconSubstFile, {}),
|
|
123
|
+
name: SDKUI_Localizator.AddOrSubstFile,
|
|
118
124
|
operationType: 'singleRow',
|
|
119
125
|
disabled: dtd?.perm?.canSubstFile !== AccessLevels.Yes ? true : disabledForSingleRow(selectedItems, focusedItem),
|
|
120
126
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.SubstituteFile, onRefreshDataRowsAsync); }
|
|
@@ -122,8 +128,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
122
128
|
};
|
|
123
129
|
const openFormMenuItem = () => {
|
|
124
130
|
return {
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
id: 'open-form',
|
|
132
|
+
icon: _jsx(IconPreview, {}),
|
|
133
|
+
name: SDKUI_Localizator.OpenForm,
|
|
127
134
|
operationType: 'singleRow',
|
|
128
135
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
129
136
|
onClick: () => openFormHandler?.(LayoutModes.Update)
|
|
@@ -131,25 +138,27 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
131
138
|
};
|
|
132
139
|
const deletetionMenuItem = () => {
|
|
133
140
|
return {
|
|
134
|
-
|
|
135
|
-
|
|
141
|
+
id: 'del',
|
|
142
|
+
icon: _jsx(IconDelete, {}),
|
|
143
|
+
name: SDKUI_Localizator.Deletion,
|
|
136
144
|
operationType: 'multiRow',
|
|
137
145
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
138
|
-
|
|
146
|
+
submenu: [
|
|
139
147
|
{
|
|
140
|
-
|
|
141
|
-
|
|
148
|
+
id: 'del-log',
|
|
149
|
+
icon: _jsx(IconDelete, {}),
|
|
150
|
+
name: SDKUI_Localizator.LogDelete,
|
|
142
151
|
operationType: 'multiRow',
|
|
143
152
|
disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
144
|
-
beginGroup: true,
|
|
145
153
|
onClick: async () => {
|
|
146
154
|
let dcmts = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
|
|
147
155
|
await runOperationAsync(dcmts, DcmtOperationTypes.LogDelete, dcmts.length <= MAX_DCMTS_FOR_SELECTION_REFRESH ? onRefreshDataRowsAsync : onRefreshSearchAsync);
|
|
148
156
|
}
|
|
149
157
|
},
|
|
150
158
|
{
|
|
151
|
-
|
|
152
|
-
|
|
159
|
+
id: 'del-rest',
|
|
160
|
+
icon: _jsx(IconUndo, {}),
|
|
161
|
+
name: SDKUI_Localizator.Restore,
|
|
153
162
|
operationType: 'multiRow',
|
|
154
163
|
disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
155
164
|
onClick: async () => {
|
|
@@ -158,8 +167,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
158
167
|
}
|
|
159
168
|
},
|
|
160
169
|
{
|
|
161
|
-
|
|
162
|
-
|
|
170
|
+
id: 'del-phys',
|
|
171
|
+
icon: _jsx(IconCloseCircle, {}),
|
|
172
|
+
name: SDKUI_Localizator.PhysDelete,
|
|
163
173
|
operationType: 'multiRow',
|
|
164
174
|
disabled: dtd?.perm?.canPhysicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
165
175
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.PhysDelete, onRefreshSearchAsync); }
|
|
@@ -169,8 +179,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
169
179
|
};
|
|
170
180
|
const fileCheckMenuItem = () => {
|
|
171
181
|
return {
|
|
172
|
-
|
|
173
|
-
|
|
182
|
+
id: 'chk',
|
|
183
|
+
icon: _jsx(IconCheckFile, {}),
|
|
184
|
+
name: SDKUI_Localizator.FileCheck,
|
|
174
185
|
operationType: 'multiRow',
|
|
175
186
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
176
187
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.CheckFile); }
|
|
@@ -178,8 +189,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
178
189
|
};
|
|
179
190
|
const fileConversionsMenuItem = () => {
|
|
180
191
|
return {
|
|
181
|
-
|
|
182
|
-
|
|
192
|
+
id: 'conv',
|
|
193
|
+
icon: _jsx(IconConvertFilePdf, {}),
|
|
194
|
+
name: SDKUI_Localizator.FileConversion,
|
|
183
195
|
operationType: 'multiRow',
|
|
184
196
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
185
197
|
onClick: async () => {
|
|
@@ -193,8 +205,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
193
205
|
};
|
|
194
206
|
const createContextualTaskMenuItem = () => {
|
|
195
207
|
return {
|
|
196
|
-
|
|
197
|
-
|
|
208
|
+
id: 'task',
|
|
209
|
+
icon: _jsx(IconActivity, {}),
|
|
210
|
+
name: SDKUI_Localizator.CreateContextualTask,
|
|
198
211
|
operationType: 'singleRow',
|
|
199
212
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
200
213
|
onClick: () => { openTaskFormHandler(); }
|
|
@@ -202,24 +215,27 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
202
215
|
};
|
|
203
216
|
const downloadFileMenuItem = () => {
|
|
204
217
|
return {
|
|
205
|
-
|
|
218
|
+
id: 'dl',
|
|
219
|
+
icon: _jsx(IconDownload, {}),
|
|
206
220
|
operationType: 'multiRow',
|
|
207
221
|
disabled: dtd?.perm?.canRetrieveFile !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
208
|
-
|
|
222
|
+
name: SDKUI_Localizator.DownloadFile, onClick: () => downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt, "download", undefined, undefined, true)
|
|
209
223
|
};
|
|
210
224
|
};
|
|
211
225
|
const downloadXMLAttachmentsMenuItem = () => {
|
|
212
226
|
return {
|
|
213
|
-
|
|
227
|
+
id: 'dl-xml',
|
|
228
|
+
icon: _jsx(IconDownload, {}),
|
|
214
229
|
operationType: 'singleRow',
|
|
215
230
|
disabled: !isXMLFileExt(getSelectedDcmtsOrFocused(selectedItems, focusedItem)?.[0]?.FILEEXT) ? true : disabledForSingleRow(selectedItems, focusedItem),
|
|
216
|
-
|
|
231
|
+
name: SDKUI_Localizator.DownloadXMLAttachments, onClick: () => downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Attachment, "download", undefined, confirmAttachments, true)
|
|
217
232
|
};
|
|
218
233
|
};
|
|
219
234
|
const duplicateDocumentMenuItem = () => {
|
|
220
235
|
return {
|
|
221
|
-
|
|
222
|
-
|
|
236
|
+
id: 'dup',
|
|
237
|
+
icon: _jsx(IconArchiveDoc, {}),
|
|
238
|
+
name: SDKUI_Localizator.DuplicateDocument,
|
|
223
239
|
operationType: 'singleRow',
|
|
224
240
|
disabled: dtd?.perm?.canArchive !== AccessLevelsEx.Yes && dtd?.perm?.canArchive !== AccessLevelsEx.Mixed ? true : disabledForSingleRow(selectedItems, focusedItem),
|
|
225
241
|
onClick: () => { openFormHandler?.(LayoutModes.Ark); }
|
|
@@ -227,8 +243,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
227
243
|
};
|
|
228
244
|
const batchUpdateMenuItem = () => {
|
|
229
245
|
return {
|
|
230
|
-
|
|
231
|
-
|
|
246
|
+
id: 'batch',
|
|
247
|
+
icon: _jsx(IconBatchUpdate, {}),
|
|
248
|
+
name: SDKUI_Localizator.BatchUpdate,
|
|
232
249
|
operationType: 'multiRow',
|
|
233
250
|
disabled: dtd?.perm?.canUpdate !== AccessLevelsEx.Yes && dtd?.perm?.canUpdate !== AccessLevelsEx.Mixed ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
234
251
|
onClick: () => openBatchUpdateFormHandler?.(true)
|
|
@@ -236,8 +253,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
236
253
|
};
|
|
237
254
|
const passToArchive = () => {
|
|
238
255
|
return {
|
|
239
|
-
|
|
240
|
-
|
|
256
|
+
id: 'p2a',
|
|
257
|
+
icon: _jsx(IconMenuCAArchive, { fontSize: 16, viewBox: '11 11.5 26 27', strokeWidth: 2, color: 'black' }),
|
|
258
|
+
name: SDKUI_Localizator.PassToArchive,
|
|
241
259
|
operationType: 'singleRow',
|
|
242
260
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
243
261
|
onClick: async () => {
|
|
@@ -279,8 +297,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
279
297
|
// Determine whether the menu item should be disabled
|
|
280
298
|
const isDisabled = !canSubstitute || disabledForSingleRow(selectedItems, focusedItem) || !isPdf || isSigned;
|
|
281
299
|
return {
|
|
282
|
-
|
|
283
|
-
|
|
300
|
+
id: 'pdf-ed',
|
|
301
|
+
icon: _jsx(IconEdit, {}),
|
|
302
|
+
name: "PDF Editor",
|
|
284
303
|
operationType: 'singleRow',
|
|
285
304
|
disabled: isDisabled,
|
|
286
305
|
onClick: () => openEditPdfCallback(getSelectedDcmtsOrFocused(selectedItems, focusedItem)),
|
|
@@ -288,34 +307,38 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
288
307
|
};
|
|
289
308
|
const signatureMenuItem = () => {
|
|
290
309
|
return {
|
|
291
|
-
|
|
292
|
-
|
|
310
|
+
id: 'sign',
|
|
311
|
+
icon: _jsx(IconSignaturePencil, {}),
|
|
312
|
+
name: SDKUI_Localizator.Signature,
|
|
293
313
|
disabled: disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem),
|
|
294
|
-
|
|
314
|
+
submenu: [
|
|
295
315
|
{
|
|
296
|
-
|
|
316
|
+
id: 'sign-do',
|
|
317
|
+
icon: _jsx(IconSignaturePencil, {}),
|
|
297
318
|
operationType: 'singleRow',
|
|
298
319
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
299
|
-
|
|
320
|
+
name: SDKUI_Localizator.Signature,
|
|
300
321
|
onClick: handleSignApprove
|
|
301
322
|
},
|
|
302
323
|
/* {
|
|
303
|
-
icon:
|
|
324
|
+
icon: <IconSettings />,
|
|
304
325
|
operationType: 'singleRow',
|
|
305
326
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
306
|
-
|
|
327
|
+
name: SDKUI_Localizator.SignatureSettings,
|
|
307
328
|
onClick: openSignSettingsForm
|
|
308
329
|
}, */
|
|
309
330
|
{
|
|
310
|
-
|
|
311
|
-
|
|
331
|
+
id: 'sign-info',
|
|
332
|
+
icon: _jsx(IconCircleInfo, {}),
|
|
333
|
+
name: SDKUI_Localizator.SignatureInformation,
|
|
312
334
|
operationType: 'singleRow',
|
|
313
335
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
314
336
|
onClick: () => signatureInformationCallback(isMobile, getSelectedDcmtsOrFocused(selectedItems, focusedItem))
|
|
315
337
|
},
|
|
316
338
|
{
|
|
317
|
-
|
|
318
|
-
|
|
339
|
+
id: 'sign-verify',
|
|
340
|
+
icon: _jsx(IconCheckIn, {}),
|
|
341
|
+
name: SDKUI_Localizator.VerifySignature,
|
|
319
342
|
operationType: 'multiRow',
|
|
320
343
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
321
344
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.VerifySign); }
|
|
@@ -330,44 +353,51 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
330
353
|
const firstDoc = selectedDocs?.[0];
|
|
331
354
|
const { cicoEnabled, checkoutStatus } = getDcmtCicoStatus(firstDoc, allUsers, dtd);
|
|
332
355
|
return {
|
|
333
|
-
|
|
334
|
-
|
|
356
|
+
id: 'cico',
|
|
357
|
+
icon: _jsx(IconFileDots, {}),
|
|
358
|
+
name: "Check in/Check out",
|
|
335
359
|
disabled: firstDoc === undefined || disabledForSingleRow(selectedItems, focusedItem),
|
|
336
|
-
|
|
360
|
+
submenu: [
|
|
337
361
|
{
|
|
338
|
-
|
|
339
|
-
|
|
362
|
+
id: 'co',
|
|
363
|
+
icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-edit" }),
|
|
364
|
+
name: 'Check out',
|
|
340
365
|
disabled: !cicoEnabled || checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem),
|
|
341
366
|
onClick: () => handleCheckOutOperationCallback(true),
|
|
342
367
|
},
|
|
343
368
|
{
|
|
344
|
-
|
|
345
|
-
|
|
369
|
+
id: 'ci',
|
|
370
|
+
icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-unlock" }),
|
|
371
|
+
name: 'Check in',
|
|
346
372
|
onClick: () => handleCheckInOperationCallback(),
|
|
347
373
|
disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem)
|
|
348
374
|
},
|
|
349
375
|
{
|
|
350
|
-
|
|
351
|
-
|
|
376
|
+
id: 'co-cancel',
|
|
377
|
+
icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-remove" }),
|
|
378
|
+
name: SDKUI_Localizator.CancelCheckOut,
|
|
352
379
|
disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem),
|
|
353
380
|
onClick: () => handleCheckOutOperationCallback(false),
|
|
354
381
|
},
|
|
355
382
|
{
|
|
356
|
-
|
|
357
|
-
|
|
383
|
+
id: 'co-info',
|
|
384
|
+
icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-info" }),
|
|
385
|
+
name: SDKUI_Localizator.CheckoutInfo,
|
|
358
386
|
onClick: showCheckoutInformationFormCallback,
|
|
359
387
|
disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
|
|
360
388
|
},
|
|
361
389
|
{
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
390
|
+
id: 'co-path',
|
|
391
|
+
icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-copy" }),
|
|
392
|
+
name: SDKUI_Localizator.CopyCheckoutPath,
|
|
393
|
+
onClick: copyCheckoutPathToClipboardOperationCallback,
|
|
365
394
|
disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
|
|
366
395
|
},
|
|
367
396
|
{
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
397
|
+
id: 'co-hist',
|
|
398
|
+
icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-clock" }),
|
|
399
|
+
name: SDKUI_Localizator.History,
|
|
400
|
+
disabled: !cicoEnabled || disabledForSingleRow(selectedItems, focusedItem),
|
|
371
401
|
onClick: viewHistoryCallback,
|
|
372
402
|
},
|
|
373
403
|
]
|
|
@@ -375,43 +405,49 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
375
405
|
};
|
|
376
406
|
const relationsMenuItem = () => {
|
|
377
407
|
return {
|
|
378
|
-
|
|
379
|
-
|
|
408
|
+
id: 'rel',
|
|
409
|
+
icon: _jsx(IconRelation, {}),
|
|
410
|
+
name: SDKUI_Localizator.Relations,
|
|
380
411
|
operationType: 'multiRow',
|
|
381
412
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
382
|
-
|
|
413
|
+
submenu: [
|
|
383
414
|
{
|
|
384
|
-
|
|
385
|
-
|
|
415
|
+
id: 'rel-pair',
|
|
416
|
+
icon: _jsx(IconPair, {}),
|
|
417
|
+
name: SDKUI_Localizator.MatchManyDocumentsManyToMany,
|
|
386
418
|
operationType: 'multiRow',
|
|
387
419
|
disabled: !hasManyToManyRelation || disabledForMultiRow(selectedItems, focusedItem),
|
|
388
420
|
onClick: async () => await pairManyToManyDocuments?.(true)
|
|
389
421
|
},
|
|
390
422
|
{
|
|
391
|
-
|
|
392
|
-
|
|
423
|
+
id: 'rel-unpair',
|
|
424
|
+
icon: _jsx(IconUnpair, {}),
|
|
425
|
+
name: SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
|
|
393
426
|
operationType: 'multiRow',
|
|
394
427
|
disabled: !hasManyToManyRelation || disabledForMultiRow(selectedItems, focusedItem),
|
|
395
428
|
onClick: async () => await pairManyToManyDocuments?.(false)
|
|
396
429
|
},
|
|
397
430
|
{
|
|
398
|
-
|
|
399
|
-
|
|
431
|
+
id: 'rel-ark-mst',
|
|
432
|
+
icon: _jsx(IconArchiveMaster, {}),
|
|
433
|
+
name: SDKUI_Localizator.ArchiveMasterDocument,
|
|
400
434
|
operationType: 'multiRow',
|
|
401
435
|
beginGroup: true,
|
|
402
436
|
disabled: canArchiveMasterRelation !== true,
|
|
403
437
|
onClick: async () => await archiveMasterDocuments?.(focusedItem?.TID)
|
|
404
438
|
},
|
|
405
439
|
{
|
|
406
|
-
|
|
407
|
-
|
|
440
|
+
id: 'rel-ark-det',
|
|
441
|
+
icon: _jsx(IconArchiveDetail, {}),
|
|
442
|
+
name: SDKUI_Localizator.ArchiveDetailDocument,
|
|
408
443
|
operationType: 'multiRow',
|
|
409
444
|
disabled: canArchiveDetailRelation !== true,
|
|
410
445
|
onClick: async () => await archiveDetailDocuments?.(focusedItem?.TID)
|
|
411
446
|
},
|
|
412
447
|
{
|
|
413
|
-
|
|
414
|
-
|
|
448
|
+
id: 'rel-mst',
|
|
449
|
+
icon: _jsx(IconDetailDcmts, { transform: 'scale(-1, 1)' }),
|
|
450
|
+
name: SDKUI_Localizator.DcmtsMaster,
|
|
415
451
|
operationType: 'singleRow',
|
|
416
452
|
visible: true,
|
|
417
453
|
beginGroup: true,
|
|
@@ -419,8 +455,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
419
455
|
onClick: () => openMasterDcmtsFormHandler?.(true)
|
|
420
456
|
},
|
|
421
457
|
{
|
|
422
|
-
|
|
423
|
-
|
|
458
|
+
id: 'rel-det',
|
|
459
|
+
icon: _jsx(IconDetailDcmts, {}),
|
|
460
|
+
name: SDKUI_Localizator.DcmtsDetail,
|
|
424
461
|
operationType: 'multiRow',
|
|
425
462
|
disabled: !hasDetailRelation || disabledForMultiRow(selectedItems, focusedItem),
|
|
426
463
|
visible: true,
|
|
@@ -431,21 +468,24 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
431
468
|
};
|
|
432
469
|
const sharedDcmtsMenuItem = () => {
|
|
433
470
|
return {
|
|
434
|
-
|
|
435
|
-
|
|
471
|
+
id: 'shr',
|
|
472
|
+
icon: _jsx(IconSharedDcmt, {}),
|
|
473
|
+
name: SDKUI_Localizator.SharedDocuments,
|
|
436
474
|
operationType: 'multiRow',
|
|
437
475
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
438
|
-
|
|
476
|
+
submenu: [
|
|
439
477
|
{
|
|
440
|
-
|
|
441
|
-
|
|
478
|
+
id: 'shr-ark',
|
|
479
|
+
icon: _jsx(IconSharedDcmt, {}),
|
|
480
|
+
name: SDKUI_Localizator.SharedArchiving,
|
|
442
481
|
operationType: 'singleRow',
|
|
443
482
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
444
483
|
onClick: async () => { await openSharedArchiveHandler(); }
|
|
445
484
|
},
|
|
446
485
|
{
|
|
447
|
-
|
|
448
|
-
|
|
486
|
+
id: 'shr-show',
|
|
487
|
+
icon: _jsx(IconSharedDcmt, {}),
|
|
488
|
+
name: SDKUI_Localizator.ShowSharedDocuments,
|
|
449
489
|
operationType: 'multiRow',
|
|
450
490
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
451
491
|
onClick: async () => { await showSharedDcmtsHandler(); }
|
|
@@ -453,23 +493,23 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
453
493
|
]
|
|
454
494
|
};
|
|
455
495
|
};
|
|
456
|
-
/* const shareMenuItem = ():
|
|
496
|
+
/* const shareMenuItem = (): TMContextMenuItemProps => {
|
|
457
497
|
return {
|
|
458
|
-
icon:
|
|
459
|
-
|
|
498
|
+
icon: <IconShare />,
|
|
499
|
+
name: "Condivisione",
|
|
460
500
|
operationType: 'multiRow',
|
|
461
501
|
disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
|
462
|
-
|
|
502
|
+
submenu: [
|
|
463
503
|
{
|
|
464
|
-
icon:
|
|
465
|
-
|
|
504
|
+
icon: <IconShare />,
|
|
505
|
+
name: "Archiviazione condivisa",
|
|
466
506
|
operationType: 'multiRow',
|
|
467
507
|
disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
|
468
508
|
onClick: () => ShowAlert({ message: "TODO Archiviazione condivisa", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
469
509
|
},
|
|
470
510
|
{
|
|
471
|
-
icon:
|
|
472
|
-
|
|
511
|
+
icon: <IconSharedDcmt />,
|
|
512
|
+
name: "Documenti condivisi",
|
|
473
513
|
operationType: 'multiRow',
|
|
474
514
|
disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
|
475
515
|
onClick: () => ShowAlert({ message: "TODO Documenti condivisi", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
@@ -479,14 +519,16 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
479
519
|
} */
|
|
480
520
|
const fullTextSearchMenuItem = () => {
|
|
481
521
|
return {
|
|
482
|
-
|
|
483
|
-
|
|
522
|
+
id: 'ft',
|
|
523
|
+
icon: _jsx(IconSearch, {}),
|
|
524
|
+
name: SDKUI_Localizator.FullTextSearch,
|
|
484
525
|
operationType: 'multiRow',
|
|
485
526
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
486
|
-
|
|
527
|
+
submenu: [
|
|
487
528
|
{
|
|
488
|
-
|
|
489
|
-
|
|
529
|
+
id: 'ft-info',
|
|
530
|
+
icon: _jsx(IconInfo, {}),
|
|
531
|
+
name: SDKUI_Localizator.IndexingInformation,
|
|
490
532
|
operationType: 'singleRow',
|
|
491
533
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
492
534
|
onClick: async () => {
|
|
@@ -505,23 +547,26 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
505
547
|
}
|
|
506
548
|
},
|
|
507
549
|
{
|
|
508
|
-
|
|
509
|
-
|
|
550
|
+
id: 'ft-idx',
|
|
551
|
+
icon: _jsx(IconArchiveDoc, {}),
|
|
552
|
+
name: SDKUI_Localizator.IndexOrReindex,
|
|
510
553
|
operationType: 'multiRow',
|
|
511
554
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
512
555
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.FreeSearchReindex); }
|
|
513
556
|
},
|
|
514
557
|
{
|
|
515
|
-
|
|
516
|
-
|
|
558
|
+
id: 'ft-del',
|
|
559
|
+
icon: _jsx(IconDelete, {}),
|
|
560
|
+
name: SDKUI_Localizator.IndexingDelete,
|
|
517
561
|
operationType: 'multiRow',
|
|
518
562
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
519
563
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.FreeSearchPurge); }
|
|
520
564
|
},
|
|
521
565
|
...(focusedItem?.FTExplanations !== undefined
|
|
522
566
|
? [{
|
|
523
|
-
|
|
524
|
-
|
|
567
|
+
id: 'ft-det',
|
|
568
|
+
icon: _jsx(IconPlatform, {}),
|
|
569
|
+
name: SDKUI_Localizator.ResultDetails,
|
|
525
570
|
operationType: 'singleRow',
|
|
526
571
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
527
572
|
onClick: () => {
|
|
@@ -533,53 +578,57 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
533
578
|
};
|
|
534
579
|
const otherMenuItem = () => {
|
|
535
580
|
return {
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
581
|
+
id: 'oth',
|
|
582
|
+
icon: _jsx(IconDotsVerticalCircleOutline, {}),
|
|
583
|
+
name: SDKUI_Localizator.Other,
|
|
584
|
+
submenu: [
|
|
539
585
|
{
|
|
540
|
-
|
|
541
|
-
|
|
586
|
+
id: 'oth-search',
|
|
587
|
+
icon: _jsx(IconSearch, {}),
|
|
588
|
+
name: showSearch ? SDKUI_Localizator.HideSearch : SDKUI_Localizator.ShowSearch,
|
|
542
589
|
disabled: false,
|
|
543
590
|
onClick: handleToggleSearch
|
|
544
591
|
},
|
|
545
592
|
{
|
|
546
|
-
|
|
547
|
-
|
|
593
|
+
id: 'oth-exp',
|
|
594
|
+
icon: _jsx(IconExportTo, {}),
|
|
595
|
+
name: SDKUI_Localizator.ExportTo,
|
|
548
596
|
operationType: 'multiRow',
|
|
549
597
|
disabled: false,
|
|
550
598
|
onClick: openExportForm
|
|
551
599
|
},
|
|
552
600
|
// {
|
|
553
|
-
// icon:
|
|
554
|
-
//
|
|
601
|
+
// icon: <IconShow />,
|
|
602
|
+
// name: "Mostra footer",
|
|
555
603
|
// disabled: false,
|
|
556
604
|
// onClick: () => ShowAlert({ message: "TODO Mostra footer", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
557
605
|
// },
|
|
558
606
|
{
|
|
559
|
-
|
|
560
|
-
|
|
607
|
+
id: 'oth-float',
|
|
608
|
+
icon: showFloatingBar ? _jsx(IconHide, {}) : _jsx(IconShow, {}),
|
|
609
|
+
name: showFloatingBar ? SDKUI_Localizator.HideFloatingBar : SDKUI_Localizator.ShowFloatingBar,
|
|
561
610
|
disabled: false,
|
|
562
611
|
onClick: () => setShowFloatingBar(!showFloatingBar)
|
|
563
612
|
},
|
|
564
613
|
// {
|
|
565
|
-
// icon:
|
|
566
|
-
//
|
|
614
|
+
// icon: <IconSave />,
|
|
615
|
+
// name: "Salva layout",
|
|
567
616
|
// disabled: false,
|
|
568
617
|
// onClick: () => ShowAlert({ message: "TODO Salva layout", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
569
618
|
// },
|
|
570
619
|
// {
|
|
571
|
-
// icon:
|
|
572
|
-
//
|
|
573
|
-
//
|
|
620
|
+
// icon: <IconSearch />,
|
|
621
|
+
// name: "Trova tutti i riferimenti",
|
|
622
|
+
// submenu: [
|
|
574
623
|
// {
|
|
575
|
-
// icon:
|
|
576
|
-
//
|
|
624
|
+
// icon: <IconSearch />,
|
|
625
|
+
// name: "Trova tutti i riferimenti",
|
|
577
626
|
// disabled: false,
|
|
578
627
|
// onClick: () => ShowAlert({ message: "TODO Trova tutti i riferimenti", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
579
628
|
// },
|
|
580
629
|
// {
|
|
581
|
-
// icon:
|
|
582
|
-
//
|
|
630
|
+
// icon: <IconSearch />,
|
|
631
|
+
// name: "Trova tutti i riferimenti (anche nello storico)",
|
|
583
632
|
// disabled: false,
|
|
584
633
|
// onClick: () => ShowAlert({ message: "TODO Trova tutti i riferimenti (anche nello storico)", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
585
634
|
// },
|
|
@@ -590,8 +639,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
590
639
|
};
|
|
591
640
|
const shareFromWgMenuItem = () => {
|
|
592
641
|
return {
|
|
593
|
-
|
|
594
|
-
|
|
642
|
+
id: 'wg-share',
|
|
643
|
+
icon: _jsx(IconShare, {}),
|
|
644
|
+
name: SDKUI_Localizator.Share,
|
|
595
645
|
visible: workingGroupContext !== undefined && openAddDocumentForm !== undefined,
|
|
596
646
|
disabled: workingGroupContext === undefined,
|
|
597
647
|
onClick: () => openAddDocumentForm && openAddDocumentForm(),
|
|
@@ -599,8 +649,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
599
649
|
};
|
|
600
650
|
const copyFromWgMenuItem = () => {
|
|
601
651
|
return {
|
|
602
|
-
|
|
603
|
-
|
|
652
|
+
id: 'wg-copy',
|
|
653
|
+
icon: _jsx(IconCopy, {}),
|
|
654
|
+
name: SDKUI_Localizator.CopyToDrafts,
|
|
604
655
|
operationType: 'multiRow',
|
|
605
656
|
visible: openWGsCopyMoveForm !== undefined,
|
|
606
657
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
@@ -609,8 +660,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
609
660
|
};
|
|
610
661
|
const movetofolderFromWgMenuItem = () => {
|
|
611
662
|
return {
|
|
612
|
-
|
|
613
|
-
|
|
663
|
+
id: 'wg-move',
|
|
664
|
+
icon: _jsx(IconMoveToFolder, {}),
|
|
665
|
+
name: !isMobile ? SDKUI_Localizator.CopyToArchivedDocuments : SDKUI_Localizator.CopyToArchived,
|
|
614
666
|
operationType: 'multiRow',
|
|
615
667
|
visible: openWGsCopyMoveForm !== undefined,
|
|
616
668
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
@@ -619,8 +671,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
619
671
|
};
|
|
620
672
|
const commentFromWgMenuItem = (beginGroup) => {
|
|
621
673
|
return {
|
|
622
|
-
|
|
623
|
-
|
|
674
|
+
id: 'wg-cmt',
|
|
675
|
+
icon: _jsx("span", { className: "dx-icon-chat" }),
|
|
676
|
+
name: SDKUI_Localizator.Comment,
|
|
624
677
|
operationType: 'multiRow',
|
|
625
678
|
visible: workingGroupContext !== undefined && openCommentFormCallback !== undefined,
|
|
626
679
|
disabled: workingGroupContext === undefined || disabledForMultiRow(selectedItems, focusedItem),
|
|
@@ -628,10 +681,11 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
628
681
|
beginGroup: beginGroup,
|
|
629
682
|
};
|
|
630
683
|
};
|
|
631
|
-
const removeFromWgMenuItem = (
|
|
684
|
+
const removeFromWgMenuItem = (name) => {
|
|
632
685
|
return {
|
|
633
|
-
|
|
634
|
-
|
|
686
|
+
id: 'wg-rm',
|
|
687
|
+
icon: _jsx(IconDelete, {}),
|
|
688
|
+
name: name,
|
|
635
689
|
operationType: 'multiRow',
|
|
636
690
|
visible: workingGroupContext !== undefined,
|
|
637
691
|
disabled: workingGroupContext === undefined || disabledForMultiRow(selectedItems, focusedItem),
|
|
@@ -658,16 +712,17 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
658
712
|
commentFromWgMenuItem(false),
|
|
659
713
|
removeFromWgMenuItem(SDKUI_Localizator.RemoveFromWorkgroup),
|
|
660
714
|
];
|
|
661
|
-
return items.sort((a, b) => a.
|
|
715
|
+
return items.sort((a, b) => a.name.localeCompare(b.name));
|
|
662
716
|
};
|
|
663
717
|
// MENU STANDARD
|
|
664
718
|
const getDefaultMenuItems = () => {
|
|
665
719
|
return [
|
|
666
720
|
{
|
|
667
|
-
|
|
668
|
-
|
|
721
|
+
id: 'doc',
|
|
722
|
+
icon: _jsx(IconFileDots, {}),
|
|
723
|
+
name: !isMobile ? SDKUI_Localizator.DocumentOperations : SDKUI_Localizator.Documents,
|
|
669
724
|
disabled: disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem),
|
|
670
|
-
|
|
725
|
+
submenu: [
|
|
671
726
|
addToFavoriteMenuItem(),
|
|
672
727
|
addReplaceFileMenuItem(),
|
|
673
728
|
openFormMenuItem(),
|
|
@@ -691,13 +746,14 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
691
746
|
fullTextSearchMenuItem(),
|
|
692
747
|
otherMenuItem(),
|
|
693
748
|
{
|
|
694
|
-
|
|
695
|
-
|
|
749
|
+
id: 'wg',
|
|
750
|
+
icon: _jsx(IconUserGroupOutline, {}),
|
|
751
|
+
name: !isMobile ? SDKUI_Localizator.WorkgroupOperations : SDKUI_Localizator.WorkingGroups,
|
|
696
752
|
operationType: 'multiRow',
|
|
697
753
|
visible: openWGsCopyMoveForm !== undefined || workingGroupContext !== undefined,
|
|
698
754
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
699
755
|
beginGroup: true,
|
|
700
|
-
|
|
756
|
+
submenu: [
|
|
701
757
|
shareFromWgMenuItem(),
|
|
702
758
|
copyFromWgMenuItem(),
|
|
703
759
|
movetofolderFromWgMenuItem(),
|
|
@@ -708,7 +764,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
708
764
|
];
|
|
709
765
|
};
|
|
710
766
|
if (context === SearchResultContext.ARCHIVED_WORKGROUP) {
|
|
711
|
-
return getArchivedWorkgroupMenuItems();
|
|
767
|
+
return addPinIconToItems(getArchivedWorkgroupMenuItems());
|
|
712
768
|
}
|
|
713
|
-
return getDefaultMenuItems();
|
|
769
|
+
return addPinIconToItems(getDefaultMenuItems());
|
|
714
770
|
};
|