@topconsultnpm/sdkui-react 6.20.0-dev1.6 → 6.20.0-dev1.60
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/NewComponents/ContextMenu/TMContextMenu.d.ts +4 -0
- package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +416 -0
- package/lib/components/NewComponents/ContextMenu/hooks.d.ts +13 -0
- package/lib/components/NewComponents/ContextMenu/hooks.js +61 -0
- package/lib/components/NewComponents/ContextMenu/index.d.ts +5 -0
- package/lib/components/NewComponents/ContextMenu/index.js +3 -0
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +31 -0
- package/lib/components/NewComponents/ContextMenu/styles.js +336 -0
- package/lib/components/NewComponents/ContextMenu/types.d.ts +39 -0
- package/lib/components/NewComponents/ContextMenu/types.js +1 -0
- 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.d.ts +4 -0
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +745 -0
- package/lib/components/NewComponents/FloatingMenuBar/index.d.ts +2 -0
- package/lib/components/NewComponents/FloatingMenuBar/index.js +2 -0
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +51 -0
- package/lib/components/NewComponents/FloatingMenuBar/styles.js +385 -0
- package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +29 -0
- package/lib/components/NewComponents/FloatingMenuBar/types.js +1 -0
- package/lib/components/base/TMAccordionNew.js +35 -14
- package/lib/components/base/TMCustomButton.js +61 -17
- package/lib/components/base/TMDataGrid.d.ts +7 -4
- package/lib/components/base/TMDataGrid.js +142 -11
- package/lib/components/choosers/TMMetadataChooser.js +8 -1
- package/lib/components/editors/TMMetadataValues.js +23 -5
- package/lib/components/editors/TMTextBox.js +6 -3
- package/lib/components/features/documents/TMDcmtForm.d.ts +13 -1
- package/lib/components/features/documents/TMDcmtForm.js +386 -194
- package/lib/components/features/documents/TMDcmtPreview.js +40 -69
- package/lib/components/features/documents/TMMasterDetailDcmts.js +37 -52
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +8 -0
- package/lib/components/features/search/{TMSearchResultCheckoutInfoForm.js → TMDcmtCheckoutInfoForm.js} +5 -10
- package/lib/components/features/search/TMSavedQuerySelector.js +72 -67
- package/lib/components/features/search/TMSearch.js +30 -5
- package/lib/components/features/search/TMSearchQueryPanel.js +13 -12
- package/lib/components/features/search/TMSearchResult.js +57 -216
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +3 -3
- package/lib/components/features/search/TMSearchResultsMenuItems.js +205 -169
- 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 +1 -1
- package/lib/components/features/tasks/TMTaskForm.js +20 -1
- package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -2
- package/lib/components/features/tasks/TMTasksUtils.js +62 -52
- package/lib/components/features/tasks/TMTasksView.js +6 -6
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +32 -2
- package/lib/components/features/workflow/TMWorkflowPopup.js +112 -14
- package/lib/components/features/workflow/diagram/WFDiagram.js +2 -2
- 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 +34 -6
- package/lib/components/forms/TMChooserForm.js +1 -1
- package/lib/components/grids/TMBlogsPost.js +55 -30
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +2 -0
- package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -1
- package/lib/components/viewers/TMDataListItemViewer.js +12 -11
- package/lib/css/tm-sdkui.css +1 -1
- package/lib/helper/SDKUI_Globals.d.ts +17 -0
- package/lib/helper/SDKUI_Globals.js +9 -0
- package/lib/helper/SDKUI_Localizator.d.ts +9 -1
- package/lib/helper/SDKUI_Localizator.js +87 -1
- package/lib/helper/TMIcons.d.ts +2 -0
- package/lib/helper/TMIcons.js +6 -0
- package/lib/helper/TMPdfViewer.d.ts +8 -0
- package/lib/helper/TMPdfViewer.js +368 -0
- package/lib/helper/checkinCheckoutManager.d.ts +32 -2
- package/lib/helper/checkinCheckoutManager.js +115 -38
- package/lib/helper/devextremeCustomMessages.d.ts +30 -0
- package/lib/helper/devextremeCustomMessages.js +30 -0
- package/lib/helper/helpers.d.ts +2 -1
- package/lib/helper/helpers.js +14 -3
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/helper/queryHelper.js +29 -0
- package/lib/hooks/useCheckInOutOperations.d.ts +28 -0
- package/lib/hooks/useCheckInOutOperations.js +223 -0
- package/lib/hooks/useWorkflowApprove.d.ts +4 -0
- package/lib/hooks/useWorkflowApprove.js +14 -1
- package/lib/ts/types.d.ts +56 -1
- package/package.json +5 -2
- 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 } 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,7 +80,7 @@ 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) => {
|
|
100
84
|
const isPdfEditorLicensed = SDK_Globals?.license?.dcmtArchiveLicenses?.[0]?.siX_60007?.status === LicenseModuleStatus.Licensed;
|
|
101
85
|
let pdfEditorAvailable = false;
|
|
102
86
|
if (dtd && dtd.widgets && dtd.widgets.length > 0) {
|
|
@@ -104,8 +88,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
104
88
|
}
|
|
105
89
|
const addToFavoriteMenuItem = () => {
|
|
106
90
|
return {
|
|
107
|
-
|
|
108
|
-
|
|
91
|
+
id: 'fav',
|
|
92
|
+
icon: _jsx(IconStar, {}),
|
|
93
|
+
name: SDKUI_Localizator.AddTo + ' ' + SDKUI_Localizator.Favorites,
|
|
109
94
|
operationType: 'multiRow',
|
|
110
95
|
disabled: context === SearchResultContext.FAVORITES_AND_RECENTS || disabledForMultiRow(selectedItems, focusedItem),
|
|
111
96
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.AddToFavs); onRefreshAfterAddDcmtToFavs?.(); },
|
|
@@ -113,8 +98,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
113
98
|
};
|
|
114
99
|
const addReplaceFileMenuItem = () => {
|
|
115
100
|
return {
|
|
116
|
-
|
|
117
|
-
|
|
101
|
+
id: 'repl',
|
|
102
|
+
icon: _jsx(IconSubstFile, {}),
|
|
103
|
+
name: SDKUI_Localizator.AddOrSubstFile,
|
|
118
104
|
operationType: 'singleRow',
|
|
119
105
|
disabled: dtd?.perm?.canSubstFile !== AccessLevels.Yes ? true : disabledForSingleRow(selectedItems, focusedItem),
|
|
120
106
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.SubstituteFile, onRefreshDataRowsAsync); }
|
|
@@ -122,8 +108,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
122
108
|
};
|
|
123
109
|
const openFormMenuItem = () => {
|
|
124
110
|
return {
|
|
125
|
-
|
|
126
|
-
|
|
111
|
+
id: 'open-form',
|
|
112
|
+
icon: _jsx(IconPreview, {}),
|
|
113
|
+
name: SDKUI_Localizator.OpenForm,
|
|
127
114
|
operationType: 'singleRow',
|
|
128
115
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
129
116
|
onClick: () => openFormHandler?.(LayoutModes.Update)
|
|
@@ -131,25 +118,27 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
131
118
|
};
|
|
132
119
|
const deletetionMenuItem = () => {
|
|
133
120
|
return {
|
|
134
|
-
|
|
135
|
-
|
|
121
|
+
id: 'del',
|
|
122
|
+
icon: _jsx(IconDelete, {}),
|
|
123
|
+
name: SDKUI_Localizator.Deletion,
|
|
136
124
|
operationType: 'multiRow',
|
|
137
125
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
138
|
-
|
|
126
|
+
submenu: [
|
|
139
127
|
{
|
|
140
|
-
|
|
141
|
-
|
|
128
|
+
id: 'del-log',
|
|
129
|
+
icon: _jsx(IconDelete, {}),
|
|
130
|
+
name: SDKUI_Localizator.LogDelete,
|
|
142
131
|
operationType: 'multiRow',
|
|
143
132
|
disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
144
|
-
beginGroup: true,
|
|
145
133
|
onClick: async () => {
|
|
146
134
|
let dcmts = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
|
|
147
135
|
await runOperationAsync(dcmts, DcmtOperationTypes.LogDelete, dcmts.length <= MAX_DCMTS_FOR_SELECTION_REFRESH ? onRefreshDataRowsAsync : onRefreshSearchAsync);
|
|
148
136
|
}
|
|
149
137
|
},
|
|
150
138
|
{
|
|
151
|
-
|
|
152
|
-
|
|
139
|
+
id: 'del-rest',
|
|
140
|
+
icon: _jsx(IconUndo, {}),
|
|
141
|
+
name: SDKUI_Localizator.Restore,
|
|
153
142
|
operationType: 'multiRow',
|
|
154
143
|
disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
155
144
|
onClick: async () => {
|
|
@@ -158,8 +147,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
158
147
|
}
|
|
159
148
|
},
|
|
160
149
|
{
|
|
161
|
-
|
|
162
|
-
|
|
150
|
+
id: 'del-phys',
|
|
151
|
+
icon: _jsx(IconCloseCircle, {}),
|
|
152
|
+
name: SDKUI_Localizator.PhysDelete,
|
|
163
153
|
operationType: 'multiRow',
|
|
164
154
|
disabled: dtd?.perm?.canPhysicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
165
155
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.PhysDelete, onRefreshSearchAsync); }
|
|
@@ -169,8 +159,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
169
159
|
};
|
|
170
160
|
const fileCheckMenuItem = () => {
|
|
171
161
|
return {
|
|
172
|
-
|
|
173
|
-
|
|
162
|
+
id: 'chk',
|
|
163
|
+
icon: _jsx(IconCheckFile, {}),
|
|
164
|
+
name: SDKUI_Localizator.FileCheck,
|
|
174
165
|
operationType: 'multiRow',
|
|
175
166
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
176
167
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.CheckFile); }
|
|
@@ -178,8 +169,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
178
169
|
};
|
|
179
170
|
const fileConversionsMenuItem = () => {
|
|
180
171
|
return {
|
|
181
|
-
|
|
182
|
-
|
|
172
|
+
id: 'conv',
|
|
173
|
+
icon: _jsx(IconConvertFilePdf, {}),
|
|
174
|
+
name: SDKUI_Localizator.FileConversion,
|
|
183
175
|
operationType: 'multiRow',
|
|
184
176
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
185
177
|
onClick: async () => {
|
|
@@ -193,8 +185,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
193
185
|
};
|
|
194
186
|
const createContextualTaskMenuItem = () => {
|
|
195
187
|
return {
|
|
196
|
-
|
|
197
|
-
|
|
188
|
+
id: 'task',
|
|
189
|
+
icon: _jsx(IconActivity, {}),
|
|
190
|
+
name: SDKUI_Localizator.CreateContextualTask,
|
|
198
191
|
operationType: 'singleRow',
|
|
199
192
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
200
193
|
onClick: () => { openTaskFormHandler(); }
|
|
@@ -202,24 +195,27 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
202
195
|
};
|
|
203
196
|
const downloadFileMenuItem = () => {
|
|
204
197
|
return {
|
|
205
|
-
|
|
198
|
+
id: 'dl',
|
|
199
|
+
icon: _jsx(IconDownload, {}),
|
|
206
200
|
operationType: 'multiRow',
|
|
207
201
|
disabled: dtd?.perm?.canRetrieveFile !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
208
|
-
|
|
202
|
+
name: SDKUI_Localizator.DownloadFile, onClick: () => downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt, "download", undefined, undefined, true)
|
|
209
203
|
};
|
|
210
204
|
};
|
|
211
205
|
const downloadXMLAttachmentsMenuItem = () => {
|
|
212
206
|
return {
|
|
213
|
-
|
|
207
|
+
id: 'dl-xml',
|
|
208
|
+
icon: _jsx(IconDownload, {}),
|
|
214
209
|
operationType: 'singleRow',
|
|
215
210
|
disabled: !isXMLFileExt(getSelectedDcmtsOrFocused(selectedItems, focusedItem)?.[0]?.FILEEXT) ? true : disabledForSingleRow(selectedItems, focusedItem),
|
|
216
|
-
|
|
211
|
+
name: SDKUI_Localizator.DownloadXMLAttachments, onClick: () => downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Attachment, "download", undefined, confirmAttachments, true)
|
|
217
212
|
};
|
|
218
213
|
};
|
|
219
214
|
const duplicateDocumentMenuItem = () => {
|
|
220
215
|
return {
|
|
221
|
-
|
|
222
|
-
|
|
216
|
+
id: 'dup',
|
|
217
|
+
icon: _jsx(IconArchiveDoc, {}),
|
|
218
|
+
name: SDKUI_Localizator.DuplicateDocument,
|
|
223
219
|
operationType: 'singleRow',
|
|
224
220
|
disabled: dtd?.perm?.canArchive !== AccessLevelsEx.Yes && dtd?.perm?.canArchive !== AccessLevelsEx.Mixed ? true : disabledForSingleRow(selectedItems, focusedItem),
|
|
225
221
|
onClick: () => { openFormHandler?.(LayoutModes.Ark); }
|
|
@@ -227,8 +223,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
227
223
|
};
|
|
228
224
|
const batchUpdateMenuItem = () => {
|
|
229
225
|
return {
|
|
230
|
-
|
|
231
|
-
|
|
226
|
+
id: 'batch',
|
|
227
|
+
icon: _jsx(IconBatchUpdate, {}),
|
|
228
|
+
name: SDKUI_Localizator.BatchUpdate,
|
|
232
229
|
operationType: 'multiRow',
|
|
233
230
|
disabled: dtd?.perm?.canUpdate !== AccessLevelsEx.Yes && dtd?.perm?.canUpdate !== AccessLevelsEx.Mixed ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
234
231
|
onClick: () => openBatchUpdateFormHandler?.(true)
|
|
@@ -236,8 +233,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
236
233
|
};
|
|
237
234
|
const passToArchive = () => {
|
|
238
235
|
return {
|
|
239
|
-
|
|
240
|
-
|
|
236
|
+
id: 'p2a',
|
|
237
|
+
icon: _jsx(IconMenuCAArchive, { fontSize: 16, viewBox: '11 11.5 26 27', strokeWidth: 2, color: 'black' }),
|
|
238
|
+
name: SDKUI_Localizator.PassToArchive,
|
|
241
239
|
operationType: 'singleRow',
|
|
242
240
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
243
241
|
onClick: async () => {
|
|
@@ -279,8 +277,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
279
277
|
// Determine whether the menu item should be disabled
|
|
280
278
|
const isDisabled = !canSubstitute || disabledForSingleRow(selectedItems, focusedItem) || !isPdf || isSigned;
|
|
281
279
|
return {
|
|
282
|
-
|
|
283
|
-
|
|
280
|
+
id: 'pdf-ed',
|
|
281
|
+
icon: _jsx(IconEdit, {}),
|
|
282
|
+
name: "PDF Editor",
|
|
284
283
|
operationType: 'singleRow',
|
|
285
284
|
disabled: isDisabled,
|
|
286
285
|
onClick: () => openEditPdfCallback(getSelectedDcmtsOrFocused(selectedItems, focusedItem)),
|
|
@@ -288,34 +287,38 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
288
287
|
};
|
|
289
288
|
const signatureMenuItem = () => {
|
|
290
289
|
return {
|
|
291
|
-
|
|
292
|
-
|
|
290
|
+
id: 'sign',
|
|
291
|
+
icon: _jsx(IconSignaturePencil, {}),
|
|
292
|
+
name: SDKUI_Localizator.Signature,
|
|
293
293
|
disabled: disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem),
|
|
294
|
-
|
|
294
|
+
submenu: [
|
|
295
295
|
{
|
|
296
|
-
|
|
296
|
+
id: 'sign-do',
|
|
297
|
+
icon: _jsx(IconSignaturePencil, {}),
|
|
297
298
|
operationType: 'singleRow',
|
|
298
299
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
299
|
-
|
|
300
|
+
name: SDKUI_Localizator.Signature,
|
|
300
301
|
onClick: handleSignApprove
|
|
301
302
|
},
|
|
302
303
|
/* {
|
|
303
|
-
icon:
|
|
304
|
+
icon: <IconSettings />,
|
|
304
305
|
operationType: 'singleRow',
|
|
305
306
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
306
|
-
|
|
307
|
+
name: SDKUI_Localizator.SignatureSettings,
|
|
307
308
|
onClick: openSignSettingsForm
|
|
308
309
|
}, */
|
|
309
310
|
{
|
|
310
|
-
|
|
311
|
-
|
|
311
|
+
id: 'sign-info',
|
|
312
|
+
icon: _jsx(IconCircleInfo, {}),
|
|
313
|
+
name: SDKUI_Localizator.SignatureInformation,
|
|
312
314
|
operationType: 'singleRow',
|
|
313
315
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
314
316
|
onClick: () => signatureInformationCallback(isMobile, getSelectedDcmtsOrFocused(selectedItems, focusedItem))
|
|
315
317
|
},
|
|
316
318
|
{
|
|
317
|
-
|
|
318
|
-
|
|
319
|
+
id: 'sign-verify',
|
|
320
|
+
icon: _jsx(IconCheckIn, {}),
|
|
321
|
+
name: SDKUI_Localizator.VerifySignature,
|
|
319
322
|
operationType: 'multiRow',
|
|
320
323
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
321
324
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.VerifySign); }
|
|
@@ -330,44 +333,51 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
330
333
|
const firstDoc = selectedDocs?.[0];
|
|
331
334
|
const { cicoEnabled, checkoutStatus } = getDcmtCicoStatus(firstDoc, allUsers, dtd);
|
|
332
335
|
return {
|
|
333
|
-
|
|
334
|
-
|
|
336
|
+
id: 'cico',
|
|
337
|
+
icon: _jsx(IconFileDots, {}),
|
|
338
|
+
name: "Check in/Check out",
|
|
335
339
|
disabled: firstDoc === undefined || disabledForSingleRow(selectedItems, focusedItem),
|
|
336
|
-
|
|
340
|
+
submenu: [
|
|
337
341
|
{
|
|
338
|
-
|
|
339
|
-
|
|
342
|
+
id: 'co',
|
|
343
|
+
icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-edit" }),
|
|
344
|
+
name: 'Check out',
|
|
340
345
|
disabled: !cicoEnabled || checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem),
|
|
341
346
|
onClick: () => handleCheckOutOperationCallback(true),
|
|
342
347
|
},
|
|
343
348
|
{
|
|
344
|
-
|
|
345
|
-
|
|
349
|
+
id: 'ci',
|
|
350
|
+
icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-unlock" }),
|
|
351
|
+
name: 'Check in',
|
|
346
352
|
onClick: () => handleCheckInOperationCallback(),
|
|
347
353
|
disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem)
|
|
348
354
|
},
|
|
349
355
|
{
|
|
350
|
-
|
|
351
|
-
|
|
356
|
+
id: 'co-cancel',
|
|
357
|
+
icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-remove" }),
|
|
358
|
+
name: SDKUI_Localizator.CancelCheckOut,
|
|
352
359
|
disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem),
|
|
353
360
|
onClick: () => handleCheckOutOperationCallback(false),
|
|
354
361
|
},
|
|
355
362
|
{
|
|
356
|
-
|
|
357
|
-
|
|
363
|
+
id: 'co-info',
|
|
364
|
+
icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-info" }),
|
|
365
|
+
name: SDKUI_Localizator.CheckoutInfo,
|
|
358
366
|
onClick: showCheckoutInformationFormCallback,
|
|
359
367
|
disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
|
|
360
368
|
},
|
|
361
369
|
{
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
370
|
+
id: 'co-path',
|
|
371
|
+
icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-copy" }),
|
|
372
|
+
name: SDKUI_Localizator.CopyCheckoutPath,
|
|
373
|
+
onClick: copyCheckoutPathToClipboardOperationCallback,
|
|
365
374
|
disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
|
|
366
375
|
},
|
|
367
376
|
{
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
377
|
+
id: 'co-hist',
|
|
378
|
+
icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-clock" }),
|
|
379
|
+
name: SDKUI_Localizator.History,
|
|
380
|
+
disabled: !cicoEnabled || disabledForSingleRow(selectedItems, focusedItem),
|
|
371
381
|
onClick: viewHistoryCallback,
|
|
372
382
|
},
|
|
373
383
|
]
|
|
@@ -375,43 +385,49 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
375
385
|
};
|
|
376
386
|
const relationsMenuItem = () => {
|
|
377
387
|
return {
|
|
378
|
-
|
|
379
|
-
|
|
388
|
+
id: 'rel',
|
|
389
|
+
icon: _jsx(IconRelation, {}),
|
|
390
|
+
name: SDKUI_Localizator.Relations,
|
|
380
391
|
operationType: 'multiRow',
|
|
381
392
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
382
|
-
|
|
393
|
+
submenu: [
|
|
383
394
|
{
|
|
384
|
-
|
|
385
|
-
|
|
395
|
+
id: 'rel-pair',
|
|
396
|
+
icon: _jsx(IconPair, {}),
|
|
397
|
+
name: SDKUI_Localizator.MatchManyDocumentsManyToMany,
|
|
386
398
|
operationType: 'multiRow',
|
|
387
399
|
disabled: !hasManyToManyRelation || disabledForMultiRow(selectedItems, focusedItem),
|
|
388
400
|
onClick: async () => await pairManyToManyDocuments?.(true)
|
|
389
401
|
},
|
|
390
402
|
{
|
|
391
|
-
|
|
392
|
-
|
|
403
|
+
id: 'rel-unpair',
|
|
404
|
+
icon: _jsx(IconUnpair, {}),
|
|
405
|
+
name: SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
|
|
393
406
|
operationType: 'multiRow',
|
|
394
407
|
disabled: !hasManyToManyRelation || disabledForMultiRow(selectedItems, focusedItem),
|
|
395
408
|
onClick: async () => await pairManyToManyDocuments?.(false)
|
|
396
409
|
},
|
|
397
410
|
{
|
|
398
|
-
|
|
399
|
-
|
|
411
|
+
id: 'rel-ark-mst',
|
|
412
|
+
icon: _jsx(IconArchiveMaster, {}),
|
|
413
|
+
name: SDKUI_Localizator.ArchiveMasterDocument,
|
|
400
414
|
operationType: 'multiRow',
|
|
401
415
|
beginGroup: true,
|
|
402
416
|
disabled: canArchiveMasterRelation !== true,
|
|
403
417
|
onClick: async () => await archiveMasterDocuments?.(focusedItem?.TID)
|
|
404
418
|
},
|
|
405
419
|
{
|
|
406
|
-
|
|
407
|
-
|
|
420
|
+
id: 'rel-ark-det',
|
|
421
|
+
icon: _jsx(IconArchiveDetail, {}),
|
|
422
|
+
name: SDKUI_Localizator.ArchiveDetailDocument,
|
|
408
423
|
operationType: 'multiRow',
|
|
409
424
|
disabled: canArchiveDetailRelation !== true,
|
|
410
425
|
onClick: async () => await archiveDetailDocuments?.(focusedItem?.TID)
|
|
411
426
|
},
|
|
412
427
|
{
|
|
413
|
-
|
|
414
|
-
|
|
428
|
+
id: 'rel-mst',
|
|
429
|
+
icon: _jsx(IconDetailDcmts, { transform: 'scale(-1, 1)' }),
|
|
430
|
+
name: SDKUI_Localizator.DcmtsMaster,
|
|
415
431
|
operationType: 'singleRow',
|
|
416
432
|
visible: true,
|
|
417
433
|
beginGroup: true,
|
|
@@ -419,8 +435,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
419
435
|
onClick: () => openMasterDcmtsFormHandler?.(true)
|
|
420
436
|
},
|
|
421
437
|
{
|
|
422
|
-
|
|
423
|
-
|
|
438
|
+
id: 'rel-det',
|
|
439
|
+
icon: _jsx(IconDetailDcmts, {}),
|
|
440
|
+
name: SDKUI_Localizator.DcmtsDetail,
|
|
424
441
|
operationType: 'multiRow',
|
|
425
442
|
disabled: !hasDetailRelation || disabledForMultiRow(selectedItems, focusedItem),
|
|
426
443
|
visible: true,
|
|
@@ -431,21 +448,24 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
431
448
|
};
|
|
432
449
|
const sharedDcmtsMenuItem = () => {
|
|
433
450
|
return {
|
|
434
|
-
|
|
435
|
-
|
|
451
|
+
id: 'shr',
|
|
452
|
+
icon: _jsx(IconSharedDcmt, {}),
|
|
453
|
+
name: SDKUI_Localizator.SharedDocuments,
|
|
436
454
|
operationType: 'multiRow',
|
|
437
455
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
438
|
-
|
|
456
|
+
submenu: [
|
|
439
457
|
{
|
|
440
|
-
|
|
441
|
-
|
|
458
|
+
id: 'shr-ark',
|
|
459
|
+
icon: _jsx(IconSharedDcmt, {}),
|
|
460
|
+
name: SDKUI_Localizator.SharedArchiving,
|
|
442
461
|
operationType: 'singleRow',
|
|
443
462
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
444
463
|
onClick: async () => { await openSharedArchiveHandler(); }
|
|
445
464
|
},
|
|
446
465
|
{
|
|
447
|
-
|
|
448
|
-
|
|
466
|
+
id: 'shr-show',
|
|
467
|
+
icon: _jsx(IconSharedDcmt, {}),
|
|
468
|
+
name: SDKUI_Localizator.ShowSharedDocuments,
|
|
449
469
|
operationType: 'multiRow',
|
|
450
470
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
451
471
|
onClick: async () => { await showSharedDcmtsHandler(); }
|
|
@@ -453,23 +473,23 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
453
473
|
]
|
|
454
474
|
};
|
|
455
475
|
};
|
|
456
|
-
/* const shareMenuItem = ():
|
|
476
|
+
/* const shareMenuItem = (): TMContextMenuItemProps => {
|
|
457
477
|
return {
|
|
458
|
-
icon:
|
|
459
|
-
|
|
478
|
+
icon: <IconShare />,
|
|
479
|
+
name: "Condivisione",
|
|
460
480
|
operationType: 'multiRow',
|
|
461
481
|
disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
|
462
|
-
|
|
482
|
+
submenu: [
|
|
463
483
|
{
|
|
464
|
-
icon:
|
|
465
|
-
|
|
484
|
+
icon: <IconShare />,
|
|
485
|
+
name: "Archiviazione condivisa",
|
|
466
486
|
operationType: 'multiRow',
|
|
467
487
|
disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
|
468
488
|
onClick: () => ShowAlert({ message: "TODO Archiviazione condivisa", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
469
489
|
},
|
|
470
490
|
{
|
|
471
|
-
icon:
|
|
472
|
-
|
|
491
|
+
icon: <IconSharedDcmt />,
|
|
492
|
+
name: "Documenti condivisi",
|
|
473
493
|
operationType: 'multiRow',
|
|
474
494
|
disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
|
475
495
|
onClick: () => ShowAlert({ message: "TODO Documenti condivisi", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
@@ -479,14 +499,16 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
479
499
|
} */
|
|
480
500
|
const fullTextSearchMenuItem = () => {
|
|
481
501
|
return {
|
|
482
|
-
|
|
483
|
-
|
|
502
|
+
id: 'ft',
|
|
503
|
+
icon: _jsx(IconSearch, {}),
|
|
504
|
+
name: SDKUI_Localizator.FullTextSearch,
|
|
484
505
|
operationType: 'multiRow',
|
|
485
506
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
486
|
-
|
|
507
|
+
submenu: [
|
|
487
508
|
{
|
|
488
|
-
|
|
489
|
-
|
|
509
|
+
id: 'ft-info',
|
|
510
|
+
icon: _jsx(IconInfo, {}),
|
|
511
|
+
name: SDKUI_Localizator.IndexingInformation,
|
|
490
512
|
operationType: 'singleRow',
|
|
491
513
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
492
514
|
onClick: async () => {
|
|
@@ -505,23 +527,26 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
505
527
|
}
|
|
506
528
|
},
|
|
507
529
|
{
|
|
508
|
-
|
|
509
|
-
|
|
530
|
+
id: 'ft-idx',
|
|
531
|
+
icon: _jsx(IconArchiveDoc, {}),
|
|
532
|
+
name: SDKUI_Localizator.IndexOrReindex,
|
|
510
533
|
operationType: 'multiRow',
|
|
511
534
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
512
535
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.FreeSearchReindex); }
|
|
513
536
|
},
|
|
514
537
|
{
|
|
515
|
-
|
|
516
|
-
|
|
538
|
+
id: 'ft-del',
|
|
539
|
+
icon: _jsx(IconDelete, {}),
|
|
540
|
+
name: SDKUI_Localizator.IndexingDelete,
|
|
517
541
|
operationType: 'multiRow',
|
|
518
542
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
519
543
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.FreeSearchPurge); }
|
|
520
544
|
},
|
|
521
545
|
...(focusedItem?.FTExplanations !== undefined
|
|
522
546
|
? [{
|
|
523
|
-
|
|
524
|
-
|
|
547
|
+
id: 'ft-det',
|
|
548
|
+
icon: _jsx(IconPlatform, {}),
|
|
549
|
+
name: SDKUI_Localizator.ResultDetails,
|
|
525
550
|
operationType: 'singleRow',
|
|
526
551
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
527
552
|
onClick: () => {
|
|
@@ -533,53 +558,57 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
533
558
|
};
|
|
534
559
|
const otherMenuItem = () => {
|
|
535
560
|
return {
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
561
|
+
id: 'oth',
|
|
562
|
+
icon: _jsx(IconDotsVerticalCircleOutline, {}),
|
|
563
|
+
name: SDKUI_Localizator.Other,
|
|
564
|
+
submenu: [
|
|
539
565
|
{
|
|
540
|
-
|
|
541
|
-
|
|
566
|
+
id: 'oth-search',
|
|
567
|
+
icon: _jsx(IconSearch, {}),
|
|
568
|
+
name: showSearch ? SDKUI_Localizator.HideSearch : SDKUI_Localizator.ShowSearch,
|
|
542
569
|
disabled: false,
|
|
543
570
|
onClick: handleToggleSearch
|
|
544
571
|
},
|
|
545
572
|
{
|
|
546
|
-
|
|
547
|
-
|
|
573
|
+
id: 'oth-exp',
|
|
574
|
+
icon: _jsx(IconExportTo, {}),
|
|
575
|
+
name: SDKUI_Localizator.ExportTo,
|
|
548
576
|
operationType: 'multiRow',
|
|
549
577
|
disabled: false,
|
|
550
578
|
onClick: openExportForm
|
|
551
579
|
},
|
|
552
580
|
// {
|
|
553
|
-
// icon:
|
|
554
|
-
//
|
|
581
|
+
// icon: <IconShow />,
|
|
582
|
+
// name: "Mostra footer",
|
|
555
583
|
// disabled: false,
|
|
556
584
|
// onClick: () => ShowAlert({ message: "TODO Mostra footer", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
557
585
|
// },
|
|
558
586
|
{
|
|
559
|
-
|
|
560
|
-
|
|
587
|
+
id: 'oth-float',
|
|
588
|
+
icon: showFloatingBar ? _jsx(IconHide, {}) : _jsx(IconShow, {}),
|
|
589
|
+
name: showFloatingBar ? SDKUI_Localizator.HideFloatingBar : SDKUI_Localizator.ShowFloatingBar,
|
|
561
590
|
disabled: false,
|
|
562
591
|
onClick: () => setShowFloatingBar(!showFloatingBar)
|
|
563
592
|
},
|
|
564
593
|
// {
|
|
565
|
-
// icon:
|
|
566
|
-
//
|
|
594
|
+
// icon: <IconSave />,
|
|
595
|
+
// name: "Salva layout",
|
|
567
596
|
// disabled: false,
|
|
568
597
|
// onClick: () => ShowAlert({ message: "TODO Salva layout", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
569
598
|
// },
|
|
570
599
|
// {
|
|
571
|
-
// icon:
|
|
572
|
-
//
|
|
573
|
-
//
|
|
600
|
+
// icon: <IconSearch />,
|
|
601
|
+
// name: "Trova tutti i riferimenti",
|
|
602
|
+
// submenu: [
|
|
574
603
|
// {
|
|
575
|
-
// icon:
|
|
576
|
-
//
|
|
604
|
+
// icon: <IconSearch />,
|
|
605
|
+
// name: "Trova tutti i riferimenti",
|
|
577
606
|
// disabled: false,
|
|
578
607
|
// onClick: () => ShowAlert({ message: "TODO Trova tutti i riferimenti", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
579
608
|
// },
|
|
580
609
|
// {
|
|
581
|
-
// icon:
|
|
582
|
-
//
|
|
610
|
+
// icon: <IconSearch />,
|
|
611
|
+
// name: "Trova tutti i riferimenti (anche nello storico)",
|
|
583
612
|
// disabled: false,
|
|
584
613
|
// onClick: () => ShowAlert({ message: "TODO Trova tutti i riferimenti (anche nello storico)", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
585
614
|
// },
|
|
@@ -590,8 +619,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
590
619
|
};
|
|
591
620
|
const shareFromWgMenuItem = () => {
|
|
592
621
|
return {
|
|
593
|
-
|
|
594
|
-
|
|
622
|
+
id: 'wg-share',
|
|
623
|
+
icon: _jsx(IconShare, {}),
|
|
624
|
+
name: SDKUI_Localizator.Share,
|
|
595
625
|
visible: workingGroupContext !== undefined && openAddDocumentForm !== undefined,
|
|
596
626
|
disabled: workingGroupContext === undefined,
|
|
597
627
|
onClick: () => openAddDocumentForm && openAddDocumentForm(),
|
|
@@ -599,8 +629,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
599
629
|
};
|
|
600
630
|
const copyFromWgMenuItem = () => {
|
|
601
631
|
return {
|
|
602
|
-
|
|
603
|
-
|
|
632
|
+
id: 'wg-copy',
|
|
633
|
+
icon: _jsx(IconCopy, {}),
|
|
634
|
+
name: SDKUI_Localizator.CopyToDrafts,
|
|
604
635
|
operationType: 'multiRow',
|
|
605
636
|
visible: openWGsCopyMoveForm !== undefined,
|
|
606
637
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
@@ -609,8 +640,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
609
640
|
};
|
|
610
641
|
const movetofolderFromWgMenuItem = () => {
|
|
611
642
|
return {
|
|
612
|
-
|
|
613
|
-
|
|
643
|
+
id: 'wg-move',
|
|
644
|
+
icon: _jsx(IconMoveToFolder, {}),
|
|
645
|
+
name: !isMobile ? SDKUI_Localizator.CopyToArchivedDocuments : SDKUI_Localizator.CopyToArchived,
|
|
614
646
|
operationType: 'multiRow',
|
|
615
647
|
visible: openWGsCopyMoveForm !== undefined,
|
|
616
648
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
@@ -619,8 +651,9 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
619
651
|
};
|
|
620
652
|
const commentFromWgMenuItem = (beginGroup) => {
|
|
621
653
|
return {
|
|
622
|
-
|
|
623
|
-
|
|
654
|
+
id: 'wg-cmt',
|
|
655
|
+
icon: _jsx("span", { className: "dx-icon-chat" }),
|
|
656
|
+
name: SDKUI_Localizator.Comment,
|
|
624
657
|
operationType: 'multiRow',
|
|
625
658
|
visible: workingGroupContext !== undefined && openCommentFormCallback !== undefined,
|
|
626
659
|
disabled: workingGroupContext === undefined || disabledForMultiRow(selectedItems, focusedItem),
|
|
@@ -628,10 +661,11 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
628
661
|
beginGroup: beginGroup,
|
|
629
662
|
};
|
|
630
663
|
};
|
|
631
|
-
const removeFromWgMenuItem = (
|
|
664
|
+
const removeFromWgMenuItem = (name) => {
|
|
632
665
|
return {
|
|
633
|
-
|
|
634
|
-
|
|
666
|
+
id: 'wg-rm',
|
|
667
|
+
icon: _jsx(IconDelete, {}),
|
|
668
|
+
name: name,
|
|
635
669
|
operationType: 'multiRow',
|
|
636
670
|
visible: workingGroupContext !== undefined,
|
|
637
671
|
disabled: workingGroupContext === undefined || disabledForMultiRow(selectedItems, focusedItem),
|
|
@@ -658,16 +692,17 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
658
692
|
commentFromWgMenuItem(false),
|
|
659
693
|
removeFromWgMenuItem(SDKUI_Localizator.RemoveFromWorkgroup),
|
|
660
694
|
];
|
|
661
|
-
return items.sort((a, b) => a.
|
|
695
|
+
return items.sort((a, b) => a.name.localeCompare(b.name));
|
|
662
696
|
};
|
|
663
697
|
// MENU STANDARD
|
|
664
698
|
const getDefaultMenuItems = () => {
|
|
665
699
|
return [
|
|
666
700
|
{
|
|
667
|
-
|
|
668
|
-
|
|
701
|
+
id: 'doc',
|
|
702
|
+
icon: _jsx(IconFileDots, {}),
|
|
703
|
+
name: !isMobile ? SDKUI_Localizator.DocumentOperations : SDKUI_Localizator.Documents,
|
|
669
704
|
disabled: disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem),
|
|
670
|
-
|
|
705
|
+
submenu: [
|
|
671
706
|
addToFavoriteMenuItem(),
|
|
672
707
|
addReplaceFileMenuItem(),
|
|
673
708
|
openFormMenuItem(),
|
|
@@ -691,13 +726,14 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
691
726
|
fullTextSearchMenuItem(),
|
|
692
727
|
otherMenuItem(),
|
|
693
728
|
{
|
|
694
|
-
|
|
695
|
-
|
|
729
|
+
id: 'wg',
|
|
730
|
+
icon: _jsx(IconUserGroupOutline, {}),
|
|
731
|
+
name: !isMobile ? SDKUI_Localizator.WorkgroupOperations : SDKUI_Localizator.WorkingGroups,
|
|
696
732
|
operationType: 'multiRow',
|
|
697
733
|
visible: openWGsCopyMoveForm !== undefined || workingGroupContext !== undefined,
|
|
698
734
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
699
735
|
beginGroup: true,
|
|
700
|
-
|
|
736
|
+
submenu: [
|
|
701
737
|
shareFromWgMenuItem(),
|
|
702
738
|
copyFromWgMenuItem(),
|
|
703
739
|
movetofolderFromWgMenuItem(),
|