@topconsultnpm/sdkui-react 6.20.0-dev1.30 → 6.20.0-dev1.32
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.js +27 -9
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +1 -0
- package/lib/components/NewComponents/ContextMenu/styles.js +15 -20
- package/lib/components/NewComponents/ContextMenu/types.d.ts +9 -0
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +65 -37
- package/lib/components/NewComponents/FloatingMenuBar/styles.js +0 -1
- package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +0 -1
- package/lib/components/base/TMCustomButton.js +20 -12
- package/lib/components/base/TMDataGrid.d.ts +3 -0
- package/lib/components/base/TMDataGrid.js +85 -5
- package/lib/components/features/search/TMSearchResult.js +10 -24
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +2 -2
- package/lib/components/features/search/TMSearchResultsMenuItems.js +139 -139
- package/lib/helper/SDKUI_Globals.d.ts +0 -1
- package/lib/helper/SDKUI_Globals.js +0 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
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';
|
|
@@ -88,8 +88,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
88
88
|
}
|
|
89
89
|
const addToFavoriteMenuItem = () => {
|
|
90
90
|
return {
|
|
91
|
-
icon:
|
|
92
|
-
|
|
91
|
+
icon: _jsx(IconStar, {}),
|
|
92
|
+
name: SDKUI_Localizator.AddTo + ' ' + SDKUI_Localizator.Favorites,
|
|
93
93
|
operationType: 'multiRow',
|
|
94
94
|
disabled: context === SearchResultContext.FAVORITES_AND_RECENTS || disabledForMultiRow(selectedItems, focusedItem),
|
|
95
95
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.AddToFavs); onRefreshAfterAddDcmtToFavs?.(); },
|
|
@@ -97,8 +97,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
97
97
|
};
|
|
98
98
|
const addReplaceFileMenuItem = () => {
|
|
99
99
|
return {
|
|
100
|
-
icon:
|
|
101
|
-
|
|
100
|
+
icon: _jsx(IconSubstFile, {}),
|
|
101
|
+
name: SDKUI_Localizator.AddOrSubstFile,
|
|
102
102
|
operationType: 'singleRow',
|
|
103
103
|
disabled: dtd?.perm?.canSubstFile !== AccessLevels.Yes ? true : disabledForSingleRow(selectedItems, focusedItem),
|
|
104
104
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.SubstituteFile, onRefreshDataRowsAsync); }
|
|
@@ -106,8 +106,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
106
106
|
};
|
|
107
107
|
const openFormMenuItem = () => {
|
|
108
108
|
return {
|
|
109
|
-
icon:
|
|
110
|
-
|
|
109
|
+
icon: _jsx(IconPreview, {}),
|
|
110
|
+
name: SDKUI_Localizator.OpenForm,
|
|
111
111
|
operationType: 'singleRow',
|
|
112
112
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
113
113
|
onClick: () => openFormHandler?.(LayoutModes.Update)
|
|
@@ -115,14 +115,14 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
115
115
|
};
|
|
116
116
|
const deletetionMenuItem = () => {
|
|
117
117
|
return {
|
|
118
|
-
icon:
|
|
119
|
-
|
|
118
|
+
icon: _jsx(IconDelete, {}),
|
|
119
|
+
name: SDKUI_Localizator.Deletion,
|
|
120
120
|
operationType: 'multiRow',
|
|
121
121
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
122
|
-
|
|
122
|
+
submenu: [
|
|
123
123
|
{
|
|
124
|
-
icon:
|
|
125
|
-
|
|
124
|
+
icon: _jsx(IconDelete, {}),
|
|
125
|
+
name: SDKUI_Localizator.LogDelete,
|
|
126
126
|
operationType: 'multiRow',
|
|
127
127
|
disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
128
128
|
onClick: async () => {
|
|
@@ -131,8 +131,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
|
-
icon:
|
|
135
|
-
|
|
134
|
+
icon: _jsx(IconUndo, {}),
|
|
135
|
+
name: SDKUI_Localizator.Restore,
|
|
136
136
|
operationType: 'multiRow',
|
|
137
137
|
disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
138
138
|
onClick: async () => {
|
|
@@ -141,8 +141,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
|
-
icon:
|
|
145
|
-
|
|
144
|
+
icon: _jsx(IconCloseCircle, {}),
|
|
145
|
+
name: SDKUI_Localizator.PhysDelete,
|
|
146
146
|
operationType: 'multiRow',
|
|
147
147
|
disabled: dtd?.perm?.canPhysicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
148
148
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.PhysDelete, onRefreshSearchAsync); }
|
|
@@ -152,8 +152,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
152
152
|
};
|
|
153
153
|
const fileCheckMenuItem = () => {
|
|
154
154
|
return {
|
|
155
|
-
icon:
|
|
156
|
-
|
|
155
|
+
icon: _jsx(IconCheckFile, {}),
|
|
156
|
+
name: SDKUI_Localizator.FileCheck,
|
|
157
157
|
operationType: 'multiRow',
|
|
158
158
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
159
159
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.CheckFile); }
|
|
@@ -161,8 +161,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
161
161
|
};
|
|
162
162
|
const fileConversionsMenuItem = () => {
|
|
163
163
|
return {
|
|
164
|
-
icon:
|
|
165
|
-
|
|
164
|
+
icon: _jsx(IconConvertFilePdf, {}),
|
|
165
|
+
name: SDKUI_Localizator.FileConversion,
|
|
166
166
|
operationType: 'multiRow',
|
|
167
167
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
168
168
|
onClick: async () => {
|
|
@@ -176,8 +176,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
176
176
|
};
|
|
177
177
|
const createContextualTaskMenuItem = () => {
|
|
178
178
|
return {
|
|
179
|
-
icon:
|
|
180
|
-
|
|
179
|
+
icon: _jsx(IconActivity, {}),
|
|
180
|
+
name: SDKUI_Localizator.CreateContextualTask,
|
|
181
181
|
operationType: 'singleRow',
|
|
182
182
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
183
183
|
onClick: () => { openTaskFormHandler(); }
|
|
@@ -185,24 +185,24 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
185
185
|
};
|
|
186
186
|
const downloadFileMenuItem = () => {
|
|
187
187
|
return {
|
|
188
|
-
icon:
|
|
188
|
+
icon: _jsx(IconDownload, {}),
|
|
189
189
|
operationType: 'multiRow',
|
|
190
190
|
disabled: dtd?.perm?.canRetrieveFile !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
191
|
-
|
|
191
|
+
name: SDKUI_Localizator.DownloadFile, onClick: () => downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt, "download", undefined, undefined, true)
|
|
192
192
|
};
|
|
193
193
|
};
|
|
194
194
|
const downloadXMLAttachmentsMenuItem = () => {
|
|
195
195
|
return {
|
|
196
|
-
icon:
|
|
196
|
+
icon: _jsx(IconDownload, {}),
|
|
197
197
|
operationType: 'singleRow',
|
|
198
198
|
disabled: !isXMLFileExt(getSelectedDcmtsOrFocused(selectedItems, focusedItem)?.[0]?.FILEEXT) ? true : disabledForSingleRow(selectedItems, focusedItem),
|
|
199
|
-
|
|
199
|
+
name: SDKUI_Localizator.DownloadXMLAttachments, onClick: () => downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Attachment, "download", undefined, confirmAttachments, true)
|
|
200
200
|
};
|
|
201
201
|
};
|
|
202
202
|
const duplicateDocumentMenuItem = () => {
|
|
203
203
|
return {
|
|
204
|
-
icon:
|
|
205
|
-
|
|
204
|
+
icon: _jsx(IconArchiveDoc, {}),
|
|
205
|
+
name: SDKUI_Localizator.DuplicateDocument,
|
|
206
206
|
operationType: 'singleRow',
|
|
207
207
|
disabled: dtd?.perm?.canArchive !== AccessLevelsEx.Yes && dtd?.perm?.canArchive !== AccessLevelsEx.Mixed ? true : disabledForSingleRow(selectedItems, focusedItem),
|
|
208
208
|
onClick: () => { openFormHandler?.(LayoutModes.Ark); }
|
|
@@ -210,8 +210,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
210
210
|
};
|
|
211
211
|
const batchUpdateMenuItem = () => {
|
|
212
212
|
return {
|
|
213
|
-
icon:
|
|
214
|
-
|
|
213
|
+
icon: _jsx(IconBatchUpdate, {}),
|
|
214
|
+
name: SDKUI_Localizator.BatchUpdate,
|
|
215
215
|
operationType: 'multiRow',
|
|
216
216
|
disabled: dtd?.perm?.canUpdate !== AccessLevelsEx.Yes && dtd?.perm?.canUpdate !== AccessLevelsEx.Mixed ? true : disabledForMultiRow(selectedItems, focusedItem),
|
|
217
217
|
onClick: () => openBatchUpdateFormHandler?.(true)
|
|
@@ -219,8 +219,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
219
219
|
};
|
|
220
220
|
const passToArchive = () => {
|
|
221
221
|
return {
|
|
222
|
-
icon:
|
|
223
|
-
|
|
222
|
+
icon: _jsx(IconMenuCAArchive, { fontSize: 16, viewBox: '11 11.5 26 27', strokeWidth: 2, color: 'black' }),
|
|
223
|
+
name: SDKUI_Localizator.PassToArchive,
|
|
224
224
|
operationType: 'singleRow',
|
|
225
225
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
226
226
|
onClick: async () => {
|
|
@@ -262,8 +262,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
262
262
|
// Determine whether the menu item should be disabled
|
|
263
263
|
const isDisabled = !canSubstitute || disabledForSingleRow(selectedItems, focusedItem) || !isPdf || isSigned;
|
|
264
264
|
return {
|
|
265
|
-
icon:
|
|
266
|
-
|
|
265
|
+
icon: _jsx(IconEdit, {}),
|
|
266
|
+
name: "PDF Editor",
|
|
267
267
|
operationType: 'singleRow',
|
|
268
268
|
disabled: isDisabled,
|
|
269
269
|
onClick: () => openEditPdfCallback(getSelectedDcmtsOrFocused(selectedItems, focusedItem)),
|
|
@@ -271,34 +271,34 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
271
271
|
};
|
|
272
272
|
const signatureMenuItem = () => {
|
|
273
273
|
return {
|
|
274
|
-
icon:
|
|
275
|
-
|
|
274
|
+
icon: _jsx(IconSignaturePencil, {}),
|
|
275
|
+
name: SDKUI_Localizator.Signature,
|
|
276
276
|
disabled: disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem),
|
|
277
|
-
|
|
277
|
+
submenu: [
|
|
278
278
|
{
|
|
279
|
-
icon:
|
|
279
|
+
icon: _jsx(IconSignaturePencil, {}),
|
|
280
280
|
operationType: 'singleRow',
|
|
281
281
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
282
|
-
|
|
282
|
+
name: SDKUI_Localizator.Signature,
|
|
283
283
|
onClick: handleSignApprove
|
|
284
284
|
},
|
|
285
285
|
/* {
|
|
286
|
-
icon:
|
|
286
|
+
icon: <IconSettings />,
|
|
287
287
|
operationType: 'singleRow',
|
|
288
288
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
289
|
-
|
|
289
|
+
name: SDKUI_Localizator.SignatureSettings,
|
|
290
290
|
onClick: openSignSettingsForm
|
|
291
291
|
}, */
|
|
292
292
|
{
|
|
293
|
-
icon:
|
|
294
|
-
|
|
293
|
+
icon: _jsx(IconCircleInfo, {}),
|
|
294
|
+
name: SDKUI_Localizator.SignatureInformation,
|
|
295
295
|
operationType: 'singleRow',
|
|
296
296
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
297
297
|
onClick: () => signatureInformationCallback(isMobile, getSelectedDcmtsOrFocused(selectedItems, focusedItem))
|
|
298
298
|
},
|
|
299
299
|
{
|
|
300
|
-
icon:
|
|
301
|
-
|
|
300
|
+
icon: _jsx(IconCheckIn, {}),
|
|
301
|
+
name: SDKUI_Localizator.VerifySignature,
|
|
302
302
|
operationType: 'multiRow',
|
|
303
303
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
304
304
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.VerifySign); }
|
|
@@ -313,43 +313,43 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
313
313
|
const firstDoc = selectedDocs?.[0];
|
|
314
314
|
const { cicoEnabled, checkoutStatus } = getDcmtCicoStatus(firstDoc, allUsers, dtd);
|
|
315
315
|
return {
|
|
316
|
-
icon:
|
|
317
|
-
|
|
316
|
+
icon: _jsx(IconFileDots, {}),
|
|
317
|
+
name: "Check in/Check out",
|
|
318
318
|
disabled: firstDoc === undefined || disabledForSingleRow(selectedItems, focusedItem),
|
|
319
|
-
|
|
319
|
+
submenu: [
|
|
320
320
|
{
|
|
321
|
-
icon: "edit",
|
|
322
|
-
|
|
321
|
+
icon: _jsx("span", { className: "dx-icon-edit" }),
|
|
322
|
+
name: 'Check out',
|
|
323
323
|
disabled: !cicoEnabled || checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem),
|
|
324
324
|
onClick: () => handleCheckOutOperationCallback(true),
|
|
325
325
|
},
|
|
326
326
|
{
|
|
327
|
-
icon: "unlock",
|
|
328
|
-
|
|
327
|
+
icon: _jsx("span", { className: "dx-icon-unlock" }),
|
|
328
|
+
name: 'Check in',
|
|
329
329
|
onClick: () => handleCheckInOperationCallback(),
|
|
330
330
|
disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem)
|
|
331
331
|
},
|
|
332
332
|
{
|
|
333
|
-
icon: "remove",
|
|
334
|
-
|
|
333
|
+
icon: _jsx("span", { className: "dx-icon-remove" }),
|
|
334
|
+
name: SDKUI_Localizator.CancelCheckOut,
|
|
335
335
|
disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem),
|
|
336
336
|
onClick: () => handleCheckOutOperationCallback(false),
|
|
337
337
|
},
|
|
338
338
|
{
|
|
339
|
-
icon: "info",
|
|
340
|
-
|
|
339
|
+
icon: _jsx("span", { className: "dx-icon-info" }),
|
|
340
|
+
name: SDKUI_Localizator.CheckoutInfo,
|
|
341
341
|
onClick: showCheckoutInformationFormCallback,
|
|
342
342
|
disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
|
-
icon: "copy",
|
|
346
|
-
|
|
345
|
+
icon: _jsx("span", { className: "dx-icon-copy" }),
|
|
346
|
+
name: SDKUI_Localizator.CopyCheckoutPath,
|
|
347
347
|
onClick: copyCheckoutPathToClipboardOperationCallback,
|
|
348
348
|
disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
|
|
349
349
|
},
|
|
350
350
|
{
|
|
351
|
-
icon: "clock",
|
|
352
|
-
|
|
351
|
+
icon: _jsx("span", { className: "dx-icon-clock" }),
|
|
352
|
+
name: SDKUI_Localizator.History,
|
|
353
353
|
disabled: !cicoEnabled || disabledForSingleRow(selectedItems, focusedItem),
|
|
354
354
|
onClick: viewHistoryCallback,
|
|
355
355
|
},
|
|
@@ -358,43 +358,43 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
358
358
|
};
|
|
359
359
|
const relationsMenuItem = () => {
|
|
360
360
|
return {
|
|
361
|
-
icon:
|
|
362
|
-
|
|
361
|
+
icon: _jsx(IconRelation, {}),
|
|
362
|
+
name: SDKUI_Localizator.Relations,
|
|
363
363
|
operationType: 'multiRow',
|
|
364
364
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
365
|
-
|
|
365
|
+
submenu: [
|
|
366
366
|
{
|
|
367
|
-
icon:
|
|
368
|
-
|
|
367
|
+
icon: _jsx(IconPair, {}),
|
|
368
|
+
name: SDKUI_Localizator.MatchManyDocumentsManyToMany,
|
|
369
369
|
operationType: 'multiRow',
|
|
370
370
|
disabled: !hasManyToManyRelation || disabledForMultiRow(selectedItems, focusedItem),
|
|
371
371
|
onClick: async () => await pairManyToManyDocuments?.(true)
|
|
372
372
|
},
|
|
373
373
|
{
|
|
374
|
-
icon:
|
|
375
|
-
|
|
374
|
+
icon: _jsx(IconUnpair, {}),
|
|
375
|
+
name: SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
|
|
376
376
|
operationType: 'multiRow',
|
|
377
377
|
disabled: !hasManyToManyRelation || disabledForMultiRow(selectedItems, focusedItem),
|
|
378
378
|
onClick: async () => await pairManyToManyDocuments?.(false)
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
|
-
icon:
|
|
382
|
-
|
|
381
|
+
icon: _jsx(IconArchiveMaster, {}),
|
|
382
|
+
name: SDKUI_Localizator.ArchiveMasterDocument,
|
|
383
383
|
operationType: 'multiRow',
|
|
384
384
|
beginGroup: true,
|
|
385
385
|
disabled: canArchiveMasterRelation !== true,
|
|
386
386
|
onClick: async () => await archiveMasterDocuments?.(focusedItem?.TID)
|
|
387
387
|
},
|
|
388
388
|
{
|
|
389
|
-
icon:
|
|
390
|
-
|
|
389
|
+
icon: _jsx(IconArchiveDetail, {}),
|
|
390
|
+
name: SDKUI_Localizator.ArchiveDetailDocument,
|
|
391
391
|
operationType: 'multiRow',
|
|
392
392
|
disabled: canArchiveDetailRelation !== true,
|
|
393
393
|
onClick: async () => await archiveDetailDocuments?.(focusedItem?.TID)
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
|
-
icon:
|
|
397
|
-
|
|
396
|
+
icon: _jsx(IconDetailDcmts, { transform: 'scale(-1, 1)' }),
|
|
397
|
+
name: SDKUI_Localizator.DcmtsMaster,
|
|
398
398
|
operationType: 'singleRow',
|
|
399
399
|
visible: true,
|
|
400
400
|
beginGroup: true,
|
|
@@ -402,8 +402,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
402
402
|
onClick: () => openMasterDcmtsFormHandler?.(true)
|
|
403
403
|
},
|
|
404
404
|
{
|
|
405
|
-
icon:
|
|
406
|
-
|
|
405
|
+
icon: _jsx(IconDetailDcmts, {}),
|
|
406
|
+
name: SDKUI_Localizator.DcmtsDetail,
|
|
407
407
|
operationType: 'multiRow',
|
|
408
408
|
disabled: !hasDetailRelation || disabledForMultiRow(selectedItems, focusedItem),
|
|
409
409
|
visible: true,
|
|
@@ -414,21 +414,21 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
414
414
|
};
|
|
415
415
|
const sharedDcmtsMenuItem = () => {
|
|
416
416
|
return {
|
|
417
|
-
icon:
|
|
418
|
-
|
|
417
|
+
icon: _jsx(IconSharedDcmt, {}),
|
|
418
|
+
name: SDKUI_Localizator.SharedDocuments,
|
|
419
419
|
operationType: 'multiRow',
|
|
420
420
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
421
|
-
|
|
421
|
+
submenu: [
|
|
422
422
|
{
|
|
423
|
-
icon:
|
|
424
|
-
|
|
423
|
+
icon: _jsx(IconSharedDcmt, {}),
|
|
424
|
+
name: SDKUI_Localizator.SharedArchiving,
|
|
425
425
|
operationType: 'singleRow',
|
|
426
426
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
427
427
|
onClick: async () => { await openSharedArchiveHandler(); }
|
|
428
428
|
},
|
|
429
429
|
{
|
|
430
|
-
icon:
|
|
431
|
-
|
|
430
|
+
icon: _jsx(IconSharedDcmt, {}),
|
|
431
|
+
name: SDKUI_Localizator.ShowSharedDocuments,
|
|
432
432
|
operationType: 'multiRow',
|
|
433
433
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
434
434
|
onClick: async () => { await showSharedDcmtsHandler(); }
|
|
@@ -436,23 +436,23 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
436
436
|
]
|
|
437
437
|
};
|
|
438
438
|
};
|
|
439
|
-
/* const shareMenuItem = ():
|
|
439
|
+
/* const shareMenuItem = (): TMContextMenuItemProps => {
|
|
440
440
|
return {
|
|
441
|
-
icon:
|
|
442
|
-
|
|
441
|
+
icon: <IconShare />,
|
|
442
|
+
name: "Condivisione",
|
|
443
443
|
operationType: 'multiRow',
|
|
444
444
|
disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
|
445
|
-
|
|
445
|
+
submenu: [
|
|
446
446
|
{
|
|
447
|
-
icon:
|
|
448
|
-
|
|
447
|
+
icon: <IconShare />,
|
|
448
|
+
name: "Archiviazione condivisa",
|
|
449
449
|
operationType: 'multiRow',
|
|
450
450
|
disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
|
451
451
|
onClick: () => ShowAlert({ message: "TODO Archiviazione condivisa", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
452
452
|
},
|
|
453
453
|
{
|
|
454
|
-
icon:
|
|
455
|
-
|
|
454
|
+
icon: <IconSharedDcmt />,
|
|
455
|
+
name: "Documenti condivisi",
|
|
456
456
|
operationType: 'multiRow',
|
|
457
457
|
disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
|
458
458
|
onClick: () => ShowAlert({ message: "TODO Documenti condivisi", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
@@ -462,14 +462,14 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
462
462
|
} */
|
|
463
463
|
const fullTextSearchMenuItem = () => {
|
|
464
464
|
return {
|
|
465
|
-
icon:
|
|
466
|
-
|
|
465
|
+
icon: _jsx(IconSearch, {}),
|
|
466
|
+
name: SDKUI_Localizator.FullTextSearch,
|
|
467
467
|
operationType: 'multiRow',
|
|
468
468
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
469
|
-
|
|
469
|
+
submenu: [
|
|
470
470
|
{
|
|
471
|
-
icon:
|
|
472
|
-
|
|
471
|
+
icon: _jsx(IconInfo, {}),
|
|
472
|
+
name: SDKUI_Localizator.IndexingInformation,
|
|
473
473
|
operationType: 'singleRow',
|
|
474
474
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
475
475
|
onClick: async () => {
|
|
@@ -488,23 +488,23 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
488
488
|
}
|
|
489
489
|
},
|
|
490
490
|
{
|
|
491
|
-
icon:
|
|
492
|
-
|
|
491
|
+
icon: _jsx(IconArchiveDoc, {}),
|
|
492
|
+
name: SDKUI_Localizator.IndexOrReindex,
|
|
493
493
|
operationType: 'multiRow',
|
|
494
494
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
495
495
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.FreeSearchReindex); }
|
|
496
496
|
},
|
|
497
497
|
{
|
|
498
|
-
icon:
|
|
499
|
-
|
|
498
|
+
icon: _jsx(IconDelete, {}),
|
|
499
|
+
name: SDKUI_Localizator.IndexingDelete,
|
|
500
500
|
operationType: 'multiRow',
|
|
501
501
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
502
502
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.FreeSearchPurge); }
|
|
503
503
|
},
|
|
504
504
|
...(focusedItem?.FTExplanations !== undefined
|
|
505
505
|
? [{
|
|
506
|
-
icon:
|
|
507
|
-
|
|
506
|
+
icon: _jsx(IconPlatform, {}),
|
|
507
|
+
name: SDKUI_Localizator.ResultDetails,
|
|
508
508
|
operationType: 'singleRow',
|
|
509
509
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
|
510
510
|
onClick: () => {
|
|
@@ -516,53 +516,53 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
516
516
|
};
|
|
517
517
|
const otherMenuItem = () => {
|
|
518
518
|
return {
|
|
519
|
-
icon:
|
|
520
|
-
|
|
521
|
-
|
|
519
|
+
icon: _jsx(IconDotsVerticalCircleOutline, {}),
|
|
520
|
+
name: SDKUI_Localizator.Other,
|
|
521
|
+
submenu: [
|
|
522
522
|
{
|
|
523
|
-
icon:
|
|
524
|
-
|
|
523
|
+
icon: _jsx(IconSearch, {}),
|
|
524
|
+
name: showSearch ? SDKUI_Localizator.HideSearch : SDKUI_Localizator.ShowSearch,
|
|
525
525
|
disabled: false,
|
|
526
526
|
onClick: handleToggleSearch
|
|
527
527
|
},
|
|
528
528
|
{
|
|
529
|
-
icon:
|
|
530
|
-
|
|
529
|
+
icon: _jsx(IconExportTo, {}),
|
|
530
|
+
name: SDKUI_Localizator.ExportTo,
|
|
531
531
|
operationType: 'multiRow',
|
|
532
532
|
disabled: false,
|
|
533
533
|
onClick: openExportForm
|
|
534
534
|
},
|
|
535
535
|
// {
|
|
536
|
-
// icon:
|
|
537
|
-
//
|
|
536
|
+
// icon: <IconShow />,
|
|
537
|
+
// name: "Mostra footer",
|
|
538
538
|
// disabled: false,
|
|
539
539
|
// onClick: () => ShowAlert({ message: "TODO Mostra footer", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
540
540
|
// },
|
|
541
541
|
{
|
|
542
|
-
icon:
|
|
543
|
-
|
|
542
|
+
icon: showFloatingBar ? _jsx(IconHide, {}) : _jsx(IconShow, {}),
|
|
543
|
+
name: showFloatingBar ? SDKUI_Localizator.HideFloatingBar : SDKUI_Localizator.ShowFloatingBar,
|
|
544
544
|
disabled: false,
|
|
545
545
|
onClick: () => setShowFloatingBar(!showFloatingBar)
|
|
546
546
|
},
|
|
547
547
|
// {
|
|
548
|
-
// icon:
|
|
549
|
-
//
|
|
548
|
+
// icon: <IconSave />,
|
|
549
|
+
// name: "Salva layout",
|
|
550
550
|
// disabled: false,
|
|
551
551
|
// onClick: () => ShowAlert({ message: "TODO Salva layout", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
552
552
|
// },
|
|
553
553
|
// {
|
|
554
|
-
// icon:
|
|
555
|
-
//
|
|
556
|
-
//
|
|
554
|
+
// icon: <IconSearch />,
|
|
555
|
+
// name: "Trova tutti i riferimenti",
|
|
556
|
+
// submenu: [
|
|
557
557
|
// {
|
|
558
|
-
// icon:
|
|
559
|
-
//
|
|
558
|
+
// icon: <IconSearch />,
|
|
559
|
+
// name: "Trova tutti i riferimenti",
|
|
560
560
|
// disabled: false,
|
|
561
561
|
// onClick: () => ShowAlert({ message: "TODO Trova tutti i riferimenti", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
562
562
|
// },
|
|
563
563
|
// {
|
|
564
|
-
// icon:
|
|
565
|
-
//
|
|
564
|
+
// icon: <IconSearch />,
|
|
565
|
+
// name: "Trova tutti i riferimenti (anche nello storico)",
|
|
566
566
|
// disabled: false,
|
|
567
567
|
// onClick: () => ShowAlert({ message: "TODO Trova tutti i riferimenti (anche nello storico)", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
568
568
|
// },
|
|
@@ -573,8 +573,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
573
573
|
};
|
|
574
574
|
const shareFromWgMenuItem = () => {
|
|
575
575
|
return {
|
|
576
|
-
icon:
|
|
577
|
-
|
|
576
|
+
icon: _jsx(IconShare, {}),
|
|
577
|
+
name: SDKUI_Localizator.Share,
|
|
578
578
|
visible: workingGroupContext !== undefined && openAddDocumentForm !== undefined,
|
|
579
579
|
disabled: workingGroupContext === undefined,
|
|
580
580
|
onClick: () => openAddDocumentForm && openAddDocumentForm(),
|
|
@@ -582,8 +582,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
582
582
|
};
|
|
583
583
|
const copyFromWgMenuItem = () => {
|
|
584
584
|
return {
|
|
585
|
-
icon:
|
|
586
|
-
|
|
585
|
+
icon: _jsx(IconCopy, {}),
|
|
586
|
+
name: SDKUI_Localizator.CopyToDrafts,
|
|
587
587
|
operationType: 'multiRow',
|
|
588
588
|
visible: openWGsCopyMoveForm !== undefined,
|
|
589
589
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
@@ -592,8 +592,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
592
592
|
};
|
|
593
593
|
const movetofolderFromWgMenuItem = () => {
|
|
594
594
|
return {
|
|
595
|
-
icon:
|
|
596
|
-
|
|
595
|
+
icon: _jsx(IconMoveToFolder, {}),
|
|
596
|
+
name: !isMobile ? SDKUI_Localizator.CopyToArchivedDocuments : SDKUI_Localizator.CopyToArchived,
|
|
597
597
|
operationType: 'multiRow',
|
|
598
598
|
visible: openWGsCopyMoveForm !== undefined,
|
|
599
599
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
@@ -602,8 +602,8 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
602
602
|
};
|
|
603
603
|
const commentFromWgMenuItem = (beginGroup) => {
|
|
604
604
|
return {
|
|
605
|
-
icon: "chat",
|
|
606
|
-
|
|
605
|
+
icon: _jsx("span", { className: "dx-icon-chat" }),
|
|
606
|
+
name: SDKUI_Localizator.Comment,
|
|
607
607
|
operationType: 'multiRow',
|
|
608
608
|
visible: workingGroupContext !== undefined && openCommentFormCallback !== undefined,
|
|
609
609
|
disabled: workingGroupContext === undefined || disabledForMultiRow(selectedItems, focusedItem),
|
|
@@ -611,10 +611,10 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
611
611
|
beginGroup: beginGroup,
|
|
612
612
|
};
|
|
613
613
|
};
|
|
614
|
-
const removeFromWgMenuItem = (
|
|
614
|
+
const removeFromWgMenuItem = (name) => {
|
|
615
615
|
return {
|
|
616
|
-
icon:
|
|
617
|
-
|
|
616
|
+
icon: _jsx(IconDelete, {}),
|
|
617
|
+
name: name,
|
|
618
618
|
operationType: 'multiRow',
|
|
619
619
|
visible: workingGroupContext !== undefined,
|
|
620
620
|
disabled: workingGroupContext === undefined || disabledForMultiRow(selectedItems, focusedItem),
|
|
@@ -641,16 +641,16 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
641
641
|
commentFromWgMenuItem(false),
|
|
642
642
|
removeFromWgMenuItem(SDKUI_Localizator.RemoveFromWorkgroup),
|
|
643
643
|
];
|
|
644
|
-
return items.sort((a, b) => a.
|
|
644
|
+
return items.sort((a, b) => a.name.localeCompare(b.name));
|
|
645
645
|
};
|
|
646
646
|
// MENU STANDARD
|
|
647
647
|
const getDefaultMenuItems = () => {
|
|
648
648
|
return [
|
|
649
649
|
{
|
|
650
|
-
icon:
|
|
651
|
-
|
|
650
|
+
icon: _jsx(IconFileDots, {}),
|
|
651
|
+
name: !isMobile ? SDKUI_Localizator.DocumentOperations : SDKUI_Localizator.Documents,
|
|
652
652
|
disabled: disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem),
|
|
653
|
-
|
|
653
|
+
submenu: [
|
|
654
654
|
addToFavoriteMenuItem(),
|
|
655
655
|
addReplaceFileMenuItem(),
|
|
656
656
|
openFormMenuItem(),
|
|
@@ -674,13 +674,13 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
674
674
|
fullTextSearchMenuItem(),
|
|
675
675
|
otherMenuItem(),
|
|
676
676
|
{
|
|
677
|
-
icon:
|
|
678
|
-
|
|
677
|
+
icon: _jsx(IconUserGroupOutline, {}),
|
|
678
|
+
name: !isMobile ? SDKUI_Localizator.WorkgroupOperations : SDKUI_Localizator.WorkingGroups,
|
|
679
679
|
operationType: 'multiRow',
|
|
680
680
|
visible: openWGsCopyMoveForm !== undefined || workingGroupContext !== undefined,
|
|
681
681
|
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
|
682
682
|
beginGroup: true,
|
|
683
|
-
|
|
683
|
+
submenu: [
|
|
684
684
|
shareFromWgMenuItem(),
|
|
685
685
|
copyFromWgMenuItem(),
|
|
686
686
|
movetofolderFromWgMenuItem(),
|
|
@@ -104,7 +104,6 @@ export class SearchSettings {
|
|
|
104
104
|
export class FloatingMenuBarSettings {
|
|
105
105
|
constructor() {
|
|
106
106
|
this.orientation = 'horizontal';
|
|
107
|
-
this.pinnedItemIds = [];
|
|
108
107
|
this.itemIds = [];
|
|
109
108
|
this.position = { x: 10, y: globalThis.window?.innerHeight ? globalThis.window.innerHeight - 215 : 100 };
|
|
110
109
|
}
|