@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.
Files changed (84) hide show
  1. package/lib/components/NewComponents/ContextMenu/TMContextMenu.d.ts +4 -0
  2. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +416 -0
  3. package/lib/components/NewComponents/ContextMenu/hooks.d.ts +13 -0
  4. package/lib/components/NewComponents/ContextMenu/hooks.js +61 -0
  5. package/lib/components/NewComponents/ContextMenu/index.d.ts +5 -0
  6. package/lib/components/NewComponents/ContextMenu/index.js +3 -0
  7. package/lib/components/NewComponents/ContextMenu/styles.d.ts +31 -0
  8. package/lib/components/NewComponents/ContextMenu/styles.js +336 -0
  9. package/lib/components/NewComponents/ContextMenu/types.d.ts +39 -0
  10. package/lib/components/NewComponents/ContextMenu/types.js +1 -0
  11. package/lib/components/NewComponents/ContextMenu/useLongPress.d.ts +21 -0
  12. package/lib/components/NewComponents/ContextMenu/useLongPress.js +112 -0
  13. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.d.ts +4 -0
  14. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +745 -0
  15. package/lib/components/NewComponents/FloatingMenuBar/index.d.ts +2 -0
  16. package/lib/components/NewComponents/FloatingMenuBar/index.js +2 -0
  17. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +51 -0
  18. package/lib/components/NewComponents/FloatingMenuBar/styles.js +385 -0
  19. package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +29 -0
  20. package/lib/components/NewComponents/FloatingMenuBar/types.js +1 -0
  21. package/lib/components/base/TMAccordionNew.js +35 -14
  22. package/lib/components/base/TMCustomButton.js +61 -17
  23. package/lib/components/base/TMDataGrid.d.ts +7 -4
  24. package/lib/components/base/TMDataGrid.js +142 -11
  25. package/lib/components/choosers/TMMetadataChooser.js +8 -1
  26. package/lib/components/editors/TMMetadataValues.js +23 -5
  27. package/lib/components/editors/TMTextBox.js +6 -3
  28. package/lib/components/features/documents/TMDcmtForm.d.ts +13 -1
  29. package/lib/components/features/documents/TMDcmtForm.js +386 -194
  30. package/lib/components/features/documents/TMDcmtPreview.js +40 -69
  31. package/lib/components/features/documents/TMMasterDetailDcmts.js +37 -52
  32. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +8 -0
  33. package/lib/components/features/search/{TMSearchResultCheckoutInfoForm.js → TMDcmtCheckoutInfoForm.js} +5 -10
  34. package/lib/components/features/search/TMSavedQuerySelector.js +72 -67
  35. package/lib/components/features/search/TMSearch.js +30 -5
  36. package/lib/components/features/search/TMSearchQueryPanel.js +13 -12
  37. package/lib/components/features/search/TMSearchResult.js +57 -216
  38. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +3 -3
  39. package/lib/components/features/search/TMSearchResultsMenuItems.js +205 -169
  40. package/lib/components/features/search/TMSignSettingsForm.js +1 -1
  41. package/lib/components/features/search/TMSignatureInfoContent.d.ts +6 -0
  42. package/lib/components/features/search/TMSignatureInfoContent.js +140 -0
  43. package/lib/components/features/search/TMViewHistoryDcmt.js +1 -1
  44. package/lib/components/features/tasks/TMTaskForm.js +20 -1
  45. package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -2
  46. package/lib/components/features/tasks/TMTasksUtils.js +62 -52
  47. package/lib/components/features/tasks/TMTasksView.js +6 -6
  48. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +32 -2
  49. package/lib/components/features/workflow/TMWorkflowPopup.js +112 -14
  50. package/lib/components/features/workflow/diagram/WFDiagram.js +2 -2
  51. package/lib/components/forms/Login/LoginValidatorService.d.ts +2 -0
  52. package/lib/components/forms/Login/LoginValidatorService.js +7 -2
  53. package/lib/components/forms/Login/TMLoginForm.js +34 -6
  54. package/lib/components/forms/TMChooserForm.js +1 -1
  55. package/lib/components/grids/TMBlogsPost.js +55 -30
  56. package/lib/components/index.d.ts +2 -0
  57. package/lib/components/index.js +2 -0
  58. package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -1
  59. package/lib/components/viewers/TMDataListItemViewer.js +12 -11
  60. package/lib/css/tm-sdkui.css +1 -1
  61. package/lib/helper/SDKUI_Globals.d.ts +17 -0
  62. package/lib/helper/SDKUI_Globals.js +9 -0
  63. package/lib/helper/SDKUI_Localizator.d.ts +9 -1
  64. package/lib/helper/SDKUI_Localizator.js +87 -1
  65. package/lib/helper/TMIcons.d.ts +2 -0
  66. package/lib/helper/TMIcons.js +6 -0
  67. package/lib/helper/TMPdfViewer.d.ts +8 -0
  68. package/lib/helper/TMPdfViewer.js +368 -0
  69. package/lib/helper/checkinCheckoutManager.d.ts +32 -2
  70. package/lib/helper/checkinCheckoutManager.js +115 -38
  71. package/lib/helper/devextremeCustomMessages.d.ts +30 -0
  72. package/lib/helper/devextremeCustomMessages.js +30 -0
  73. package/lib/helper/helpers.d.ts +2 -1
  74. package/lib/helper/helpers.js +14 -3
  75. package/lib/helper/index.d.ts +1 -0
  76. package/lib/helper/index.js +1 -0
  77. package/lib/helper/queryHelper.js +29 -0
  78. package/lib/hooks/useCheckInOutOperations.d.ts +28 -0
  79. package/lib/hooks/useCheckInOutOperations.js +223 -0
  80. package/lib/hooks/useWorkflowApprove.d.ts +4 -0
  81. package/lib/hooks/useWorkflowApprove.js +14 -1
  82. package/lib/ts/types.d.ts +56 -1
  83. package/package.json +5 -2
  84. package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +0 -8
@@ -333,7 +333,7 @@ const TMSignSettingsForm = (props) => {
333
333
  fontWeight: 'bold',
334
334
  color: isModified ? MODIFIED_COLOR : '#777',
335
335
  transition: 'opacity 0.2s ease'
336
- }, onMouseEnter: (e) => { e.currentTarget.style.opacity = '0.9'; }, onMouseLeave: (e) => { e.currentTarget.style.opacity = '0.5'; }, children: "\u00D7" })] }));
336
+ }, onMouseEnter: (e) => { e.currentTarget.style.opacity = '0.9'; }, onMouseLeave: (e) => { e.currentTarget.style.opacity = '0.5'; }, children: _jsx("i", { className: "dx-icon-close" }) })] }));
337
337
  };
338
338
  const renderMultiSignerTag = (tagData) => {
339
339
  const handleRemoveTag = () => {
@@ -0,0 +1,6 @@
1
+ import { DcmtInfo } from "../../../ts";
2
+ interface TMSignatureInfoContentProps {
3
+ inputDcmt: DcmtInfo;
4
+ }
5
+ declare const TMSignatureInfoContent: (props: TMSignatureInfoContentProps) => import("react/jsx-runtime").JSX.Element | null;
6
+ export default TMSignatureInfoContent;
@@ -0,0 +1,140 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import { SDK_Globals } from "@topconsultnpm/sdk-ts";
4
+ import { IconCopy, getExceptionMessage } from "../../../helper";
5
+ import TMSpinner from "../../base/TMSpinner";
6
+ const TMSignatureInfoContent = (props) => {
7
+ const { inputDcmt } = props;
8
+ const [selectedHash, setSelectedHash] = useState('sha256');
9
+ const [signerInfo, setSignerInfo] = useState(undefined);
10
+ const [error, setError] = useState(undefined);
11
+ const [copiedHash, setCopiedHash] = useState(false);
12
+ useEffect(() => {
13
+ const fetchSignerInfo = async () => {
14
+ TMSpinner.show();
15
+ try {
16
+ const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
17
+ if (!ue) {
18
+ setError("Sessione non disponibile");
19
+ TMSpinner.hide();
20
+ return;
21
+ }
22
+ ue.TID = inputDcmt.TID;
23
+ ue.DID = inputDcmt.DID;
24
+ const signerInfoDescriptor = await ue.GetSignersAsync();
25
+ if (!signerInfoDescriptor) {
26
+ setError("Informazioni di firma non disponibili");
27
+ TMSpinner.hide();
28
+ return;
29
+ }
30
+ setSignerInfo(signerInfoDescriptor);
31
+ setError(undefined);
32
+ TMSpinner.hide();
33
+ }
34
+ catch (err) {
35
+ setError(getExceptionMessage(err));
36
+ TMSpinner.hide();
37
+ }
38
+ };
39
+ fetchSignerInfo();
40
+ }, [inputDcmt]);
41
+ const hashButtonStyle = (isActive) => ({
42
+ padding: '8px 16px',
43
+ margin: '0 2px',
44
+ border: isActive ? '2px solid #0078d4' : '1px solid #ccc',
45
+ borderRadius: '6px',
46
+ background: isActive ? '#e6f2ff' : '#fff',
47
+ color: isActive ? '#0078d4' : '#333',
48
+ cursor: 'pointer',
49
+ fontSize: '13px',
50
+ fontWeight: isActive ? '600' : '400',
51
+ transition: 'all 0.2s ease',
52
+ outline: 'none',
53
+ userSelect: 'none',
54
+ whiteSpace: 'nowrap'
55
+ });
56
+ const getHashValue = () => {
57
+ switch (selectedHash) {
58
+ case 'sha256': return signerInfo?.shA256;
59
+ case 'sha1': return signerInfo?.shA1;
60
+ case 'sha256base64': return signerInfo?.shA256Base64;
61
+ }
62
+ };
63
+ const getHashLabel = () => {
64
+ switch (selectedHash) {
65
+ case 'sha256': return 'SHA-256';
66
+ case 'sha1': return 'SHA-1';
67
+ case 'sha256base64': return 'SHA-256 (Base64)';
68
+ }
69
+ };
70
+ const copyToClipboard = async () => {
71
+ const value = getHashValue();
72
+ if (value) {
73
+ try {
74
+ await navigator.clipboard.writeText(value);
75
+ setCopiedHash(true);
76
+ setTimeout(() => setCopiedHash(false), 2000);
77
+ }
78
+ catch (err) {
79
+ console.error('Failed to copy:', err);
80
+ }
81
+ }
82
+ };
83
+ if (error) {
84
+ return (_jsx("div", { style: {
85
+ padding: '20px',
86
+ textAlign: 'center',
87
+ color: '#d32f2f',
88
+ background: '#ffebee',
89
+ borderRadius: '8px'
90
+ }, children: error }));
91
+ }
92
+ if (!signerInfo) {
93
+ return null;
94
+ }
95
+ return (_jsxs("div", { style: { lineHeight: "1.5em", overflowY: "auto", maxHeight: "500px", paddingRight: "8px", boxSizing: "border-box", userSelect: 'text' }, children: [signerInfo.signers && signerInfo.signers.length > 0 ? (_jsxs("div", { children: [_jsxs("h4", { style: { margin: '0 0 12px 0', color: '#0078d4', fontSize: '16px' }, children: ["Firme digitali (", signerInfo.signers.length, ")"] }), signerInfo.signers.map((signer, idx) => (_jsxs("div", { style: {
96
+ border: "1px solid #d0d0d0",
97
+ borderRadius: "8px",
98
+ padding: "16px",
99
+ marginBottom: "12px",
100
+ background: "linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%)",
101
+ boxShadow: "0 2px 4px rgba(0,0,0,0.08)",
102
+ userSelect: 'text',
103
+ }, children: [_jsxs("h3", { style: { margin: "0 0 12px", color: "#0078d4", fontSize: '15px', fontWeight: '600' }, children: ["Firma ", signer.levelAndIndex] }), _jsxs("div", { style: {
104
+ display: 'grid',
105
+ gap: '10px',
106
+ fontSize: '13px'
107
+ }, children: [_jsxs("div", { children: [_jsx("strong", { style: { color: '#555' }, children: "Intestatario:" }), _jsx("div", { style: { marginTop: '4px', color: '#333' }, children: signer.info1 ?? '-' })] }), _jsxs("div", { children: [_jsx("strong", { style: { color: '#555' }, children: "Riferimento temporale:" }), _jsx("div", { style: { marginTop: '4px', color: '#333' }, children: signer.info2 ?? '-' })] }), _jsxs("div", { children: [_jsx("strong", { style: { color: '#555' }, children: "Dettagli:" }), _jsx("div", { style: { marginTop: '4px', color: '#333' }, children: signer.info3 ?? '-' })] })] })] }, idx)))] })) : (_jsx("div", { style: {
108
+ padding: '20px',
109
+ textAlign: 'center',
110
+ color: '#666',
111
+ background: '#f5f5f5',
112
+ borderRadius: '8px'
113
+ }, children: "Nessuna firma trovata" })), signerInfo.shA256 && (_jsxs("div", { style: {
114
+ marginBottom: '12px',
115
+ padding: '16px',
116
+ background: '#f5f5f5',
117
+ borderRadius: '8px',
118
+ border: '1px solid #e0e0e0'
119
+ }, children: [_jsxs("div", { style: { marginBottom: '12px', display: 'flex', gap: '4px', flexWrap: 'wrap' }, children: [signerInfo.shA256 && (_jsx("button", { onClick: () => setSelectedHash('sha256'), style: hashButtonStyle(selectedHash === 'sha256'), children: "SHA-256" })), signerInfo.shA1 && (_jsx("button", { onClick: () => setSelectedHash('sha1'), style: hashButtonStyle(selectedHash === 'sha1'), children: "SHA-1" })), signerInfo.shA256Base64 && (_jsx("button", { onClick: () => setSelectedHash('sha256base64'), style: hashButtonStyle(selectedHash === 'sha256base64'), children: "Base64" }))] }), _jsxs("div", { style: {
120
+ background: '#fff',
121
+ padding: '12px',
122
+ borderRadius: '6px',
123
+ wordBreak: 'break-all',
124
+ fontSize: '12px',
125
+ border: '1px solid #d0d0d0',
126
+ userSelect: 'text',
127
+ }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: '6px' }, children: [_jsxs("strong", { style: { color: '#0078d4', fontSize: '14px' }, children: [getHashLabel(), ":"] }), _jsxs("button", { onClick: copyToClipboard, style: {
128
+ background: copiedHash ? '#d4edda' : 'transparent',
129
+ border: 'none',
130
+ cursor: 'pointer',
131
+ padding: '4px 8px',
132
+ borderRadius: '4px',
133
+ display: 'flex',
134
+ alignItems: 'center',
135
+ gap: '4px',
136
+ transition: 'all 0.2s ease',
137
+ color: copiedHash ? '#155724' : '#666'
138
+ }, title: "Copia", children: [_jsx(IconCopy, { width: 16, height: 16 }), copiedHash && _jsx("span", { style: { fontSize: '11px' }, children: "Copiato" })] })] }), _jsx("div", { style: { color: '#333' }, children: getHashValue() })] })] }))] }));
139
+ };
140
+ export default TMSignatureInfoContent;
@@ -280,6 +280,6 @@ const TMViewHistoryDcmt = (props) => {
280
280
  ]);
281
281
  }, [showId]);
282
282
  return _jsx(TMModal, { title: `${SDKUI_Localizator.SearchResult} \u2014 ${SDKUI_Localizator.History + ": " + (fromDTD.nameLoc ?? SDKUI_Localizator.Document) + " (DID:" + inputDcmt.DID})`, width: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: calcResponsiveSizes(deviceType, '80%', '80%', '95%'), onClose: onClose, children: _jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showLocalWaitPanel, showWaitPanelPrimary: showLocalPrimary, waitPanelTitle: waitLocalPanelTitle, waitPanelTextPrimary: waitLocalPanelTextPrimary, waitPanelValuePrimary: waitLocalPanelValuePrimary, waitPanelMaxValuePrimary: waitLocalPanelMaxValuePrimary, isCancelable: true, abortController: abortLocalController, children: [_jsx(TMDataGrid, { dataSource: dcmtHistory, dataColumns: dataColumns, focusedRowKey: focusedRowKey, selection: selection, onContextMenuPreparing: onContextMenuPreparing, onFocusedRowChanged: onFocusedRowChanged, onCellDblClick: onCellDblClick, noDataText: SDKUI_Localizator.NoDataToDisplay, showSearchPanel: showSearch }), (showDcmtForm && selectedDcmt !== undefined) &&
283
- _jsx(TMDcmtForm, { TID: Number(selectedDcmt.TID), DID: Number(selectedDcmt.DID), formMode: FormModes.ReadOnly, isModal: true, widthModal: "95%", heightModal: "95%", titleModal: fromDTD.name ?? SDKUI_Localizator.SearchResult, allowNavigation: dcmtHistory.length > 0, itemIndex: selectedIndex + 1, count: dcmtHistory.length, onClose: () => { setShowDcmtForm(false); }, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback })] }) }) });
283
+ _jsx(TMDcmtForm, { TID: Number(selectedDcmt.TID), DID: Number(selectedDcmt.DID), formMode: FormModes.ReadOnly, isModal: true, widthModal: "95%", heightModal: "95%", titleModal: fromDTD.name ?? SDKUI_Localizator.SearchResult, allowNavigation: dcmtHistory.length > 0, itemIndex: selectedIndex + 1, count: dcmtHistory.length, onClose: () => { setShowDcmtForm(false); }, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers })] }) }) });
284
284
  };
285
285
  export default TMViewHistoryDcmt;
@@ -325,6 +325,25 @@ const TMTaskForm = (props) => {
325
325
  await editTaskCallback(task);
326
326
  onClose?.();
327
327
  };
328
+ const handleNavigateToReference = (ref) => {
329
+ switch (ref.objClass) {
330
+ case ObjectClasses.Dossier:
331
+ if (ref.objID)
332
+ handleNavigateToDossiers(ref.objID);
333
+ else
334
+ console.log("Dossier reference missing objID");
335
+ break;
336
+ case ObjectClasses.WorkingGroup:
337
+ if (ref.objID)
338
+ handleNavigateToWGs(ref.objID);
339
+ else
340
+ console.log("Working Group reference missing objID");
341
+ break;
342
+ // Handle other object types as needed
343
+ default:
344
+ console.warn(`Unhandled object type: ${ref.objClass}`);
345
+ }
346
+ };
328
347
  return (_jsx("div", { style: { width: "100%", height: "100%", overflow: "auto" }, ref: containerRef, children: _jsx(TMSaveForm, { width: width, height: height, id: id, title: title, isModal: isModal, formMode: formMode, onSaveAsync: saveDataAsync, onClose: onCloseCallback, onUndo: onUndoCallback, exception: exception, isModified: calcIsModified(formData, formDataOrig), validationItems: validationItems, showBackButton: showBackButton, hasNavigation: (hasNavigation && formMode !== FormModes.Create), canNext: canNext(), onNext: onNextCallback, canPrev: canPrev(), onPrev: onPrevCallback, showToolbar: !(showDcmtForm && formData?.iD1 && formData?.iD2), children: _jsxs(_Fragment, { children: [_jsx(ScrollView, { direction: "vertical", useNative: true, height: "calc(100% - 35px)", children: _jsx("div", { style: { marginRight: "5px" }, children: _jsxs(TMLayoutContainer, { direction: 'vertical', gap: 2, children: [(formMode === FormModes.Update && areDifferentIDs(formDataOrig?.fromID, SDK_Globals.tmSession?.SessionDescr?.userID)) && _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 10 }, children: children }), children: _jsxs("div", { style: { width: '100%', display: 'flex', alignItems: 'center', color: "#E29000" }, children: [_jsx("i", { className: "dx-icon-info", style: { fontSize: 20 } }), "\u00A0", _jsx("span", { children: SDKUI_Localizator.TaskAssignedMessage.replaceParams(formDataOrig?.fromName ?? '') })] }) }), taskContext?.workItem === undefined && (!areDifferentIDs(formData?.fromID, SDK_Globals.tmSession?.SessionDescr?.userID)
329
348
  && !areDifferentIDs(formData?.toID, SDK_Globals.tmSession?.SessionDescr?.userID))
330
349
  && _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 10 }, children: children }), children: _jsxs("div", { style: { width: '100%', display: 'flex', alignItems: 'center', color: "#2559A5" }, children: [_jsx("i", { className: "dx-icon-info", style: { fontSize: 20 } }), "\u00A0", _jsx("span", { children: SDKUI_Localizator.PersonalTaskAssignmentMessage })] }) }), (!areDifferentIDs(formData?.fromID, SDK_Globals.tmSession?.SessionDescr?.userID)
@@ -387,6 +406,6 @@ const TMTaskForm = (props) => {
387
406
  : _jsx(TMTextBox, { label: SDKUI_Localizator.Priority, value: getPriorityLocalizatorValue(formData?.priority ?? Priorities.Low), readOnly: true }) })] }) }), _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 10 }, children: children }), children: _jsxs(_Fragment, { children: [_jsx("div", { style: { width: isMobile ? '100%' : '50%', marginTop: 10 }, children: !fieldsReadOnly.startDate ? _jsx(TMDateBox, { id: "start-date", resetTimeToZeroOnKeyPress: false, label: SDKUI_Localizator.StartDate, dateDisplayType: DateDisplayTypes.DateTime, value: formData?.startTime, isModifiedWhen: formData?.startTime !== formDataOrig?.startTime, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.ErrorStartEndDate), onContentReady: handleStartTimeContentReady, onValueChange: (value) => { setFormData({ ...formData ?? {}, startTime: value }); }, showClearButton: true }) : _jsx(TMTextBox, { label: SDKUI_Localizator.StartDate, value: formData?.startTime ? formatDate(formData?.startTime) : '', readOnly: true }) }), _jsx("div", { style: { width: isMobile ? '100%' : '50%', marginTop: 10 }, children: !fieldsReadOnly.startDate ? _jsx(TMDateBox, { id: "end-date", resetTimeToZeroOnKeyPress: false, label: SDKUI_Localizator.Expiration, dateDisplayType: DateDisplayTypes.DateTime, value: formData?.endTime, isModifiedWhen: formData?.endTime !== formDataOrig?.endTime, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.ErrorStartEndDate || o.PropertyName === SDKUI_Localizator.ErrorEndRemDate), onContentReady: handleEndTimeContentReady, onValueChange: (value) => { setFormData({ ...formData ?? {}, endTime: value }); }, showClearButton: true, readOnly: fieldsReadOnly.endDate }) : _jsx(TMTextBox, { label: SDKUI_Localizator.Expiration, value: formData?.endTime ? formatDate(formData?.endTime) : '', readOnly: true }) })] }) }), _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 3 }, children: children }), children: _jsx("div", { style: { width: isMobile ? '100%' : '50%', marginTop: 10 }, children: _jsx(TMDateBox, { id: "alert-time", resetTimeToZeroOnKeyPress: false, label: SDKUI_Localizator.Reminder, dateDisplayType: DateDisplayTypes.DateTime, value: formData?.remTime ?? undefined, isModifiedWhen: formData?.remTime !== formDataOrig?.remTime, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.ErrorEndRemDate), onValueChange: (value) => { setFormData({ ...formData ?? {}, remTime: value }); }, showClearButton: true, readOnly: fieldsReadOnly.remTime }) }) }), (formData?.state && [Task_States.Completed, Task_States.Waiting, Task_States.Deferred].includes(formData?.state) ||
388
407
  (formData?.response ?? "") !== "") && _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 3 }, children: children }), children: _jsx("div", { style: { width: isMobile ? '100%' : '50%', marginTop: 10 }, children: _jsxs(ResponseCommentWrapper, { children: [_jsx(ResponseCommentTextArea, { id: "responseId", name: "response", "$isValid": true, value: formData?.response ?? '', onChange: onAnswerChange, "$isModifiedWhen": formData?.response !== formDataOrig?.response, disabled: (formData?.response ?? "") !== "" &&
389
408
  (formData?.state && ![Task_States.Completed, Task_States.Waiting, Task_States.Deferred].includes(formData?.state)) }), _jsxs(ResponseCommentLabel, { htmlFor: "responseId", children: [SDKUI_Localizator.Answer, _jsxs(TMTooltip, { content: SDKUI_Localizator.AnswerTooltip, children: [" ", _jsx("i", { className: 'dx-icon-info' }), " "] })] }), _jsx(ResponseCommentCharacterCounter, { children: `${500 - (formData?.response ?? '').length} ${SDKUI_Localizator.CharactersRemaining}` })] }) }) })] }) }) }), (showDcmtForm && formData?.iD1 && formData?.iD2) &&
390
- _jsx(TMDcmtForm, { titleModal: formData.iD1Name ?? '-', isModal: true, TID: formData.iD1, DID: formData.iD2, allowButtonsRefs: true, taskMoreInfo: formData, onWFOperationCompleted: refreshWorkflowApprove, onTaskCompleted: onTaskCompleted, onClose: () => { setShowDcmtForm(false); }, onOpenS4TViewerRequest: onOpenS4TViewerRequest, s4TViewerDialogComponent: s4TViewerDialogComponent, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers })] }) }) }));
409
+ _jsx(TMDcmtForm, { titleModal: formData.iD1Name ?? '-', isModal: true, TID: formData.iD1, DID: formData.iD2, allowButtonsRefs: true, taskMoreInfo: formData, onWFOperationCompleted: refreshWorkflowApprove, onTaskCompleted: onTaskCompleted, onClose: () => { setShowDcmtForm(false); }, onOpenS4TViewerRequest: onOpenS4TViewerRequest, s4TViewerDialogComponent: s4TViewerDialogComponent, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, onReferenceClick: handleNavigateToReference })] }) }) }));
391
410
  };
392
411
  export default TMTaskForm;
@@ -2,7 +2,7 @@ import { Appointment } from 'devextreme/ui/scheduler';
2
2
  import { ContextMenuTypes } from 'devextreme-react/context-menu';
3
3
  import { TaskDescriptor, Task_States, PdGs, Priorities, ValidationItem } from '@topconsultnpm/sdk-ts';
4
4
  import { FormModes, TaskContext } from '../../../ts';
5
- import { TMDataGridContextMenuItem } from '../../base/TMDataGrid';
5
+ import { TMContextMenuItemProps } from '../../NewComponents/ContextMenu';
6
6
  export declare const TEXT_SELECTED_COLOR = "#ff5e1a";
7
7
  export declare const BG_COLOR_INACTIVE_WIDGET = "#fff";
8
8
  export declare const BG_COLOR_ACTIVE_WIDGET = "#fff0b7";
@@ -100,7 +100,7 @@ export declare const gotoPDGExtendedLabel: (gotoVisible: boolean, pdg: PdGs, iD1
100
100
  export declare const convertToSchedulerAppointments: (tasks: Array<TaskDescriptor>) => Array<Appointment>;
101
101
  export declare const formatDate: (date: Date) => string;
102
102
  export declare const areDifferentIDs: (fromID: number | undefined, userID: number | undefined) => boolean;
103
- export declare const createTasksMenuItems: (taskDescriptor: TaskDescriptor | undefined, showId: boolean, setShowId: React.Dispatch<React.SetStateAction<boolean>>, showSearch: boolean, setShowSearch: React.Dispatch<React.SetStateAction<boolean>>, openTaskForm: (formMode: FormModes, task?: TaskDescriptor, isContextual?: boolean) => void, openEditTaskForm: (rowId: number | undefined) => void, openDuplicateTaskForm: (rowId: number | undefined) => void, onDeleteCallback: (rowIds: Array<number>) => void, markAsStatus: (rowIds: Array<number>, status: Task_States) => void, getAllTasks: () => Promise<void>, fromWG: boolean, showContextualWG: boolean, setShowContextualWG: React.Dispatch<React.SetStateAction<boolean>>, fromDossier: boolean, showContextualDossier: boolean, setShowContextualDossier: React.Dispatch<React.SetStateAction<boolean>>, fromDocument: boolean, showContextualDocument: boolean, setShowContextualDocument: React.Dispatch<React.SetStateAction<boolean>>, showGoToToday: boolean, handleGoToToday?: () => void, fromDatagrid?: boolean) => Array<TMDataGridContextMenuItem>;
103
+ export declare const createTasksMenuItems: (taskDescriptor: TaskDescriptor | undefined, showId: boolean, setShowId: React.Dispatch<React.SetStateAction<boolean>>, showSearch: boolean, setShowSearch: React.Dispatch<React.SetStateAction<boolean>>, openTaskForm: (formMode: FormModes, task?: TaskDescriptor, isContextual?: boolean) => void, openEditTaskForm: (rowId: number | undefined) => void, openDuplicateTaskForm: (rowId: number | undefined) => void, onDeleteCallback: (rowIds: Array<number>) => void, markAsStatus: (rowIds: Array<number>, status: Task_States) => void, getAllTasks: () => Promise<void>, fromWG: boolean, showContextualWG: boolean, setShowContextualWG: React.Dispatch<React.SetStateAction<boolean>>, fromDossier: boolean, showContextualDossier: boolean, setShowContextualDossier: React.Dispatch<React.SetStateAction<boolean>>, fromDocument: boolean, showContextualDocument: boolean, setShowContextualDocument: React.Dispatch<React.SetStateAction<boolean>>, showGoToToday: boolean, handleGoToToday?: () => void, fromDatagrid?: boolean) => TMContextMenuItemProps[];
104
104
  export declare const checkIfNew: (fromId: number | undefined, isNew: number | undefined) => boolean;
105
105
  export declare const getNewTaskCount: (tasks: Array<TaskDescriptor>) => number;
106
106
  export declare const isTaskAssignedToAnotherUser: (task: TaskDescriptor) => boolean;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { Task_States, PdGs, Priorities, ValidationItem, SDK_Localizator, ResultTypes, SDK_Globals } from '@topconsultnpm/sdk-ts';
2
3
  import { TMColors } from '../../../utils/theme';
3
4
  import { SDKUI_Localizator } from '../../../helper';
@@ -401,107 +402,116 @@ export const createTasksMenuItems = (taskDescriptor, showId, setShowId, showSear
401
402
  const isTaskFromAnotherUser = isTaskDescriptorDefined && areDifferentIDs(taskDescriptor.fromID, SDK_Globals.tmSession?.SessionDescr?.userID);
402
403
  const menuItems = [
403
404
  {
404
- id: 'createContextualTask',
405
- text: SDKUI_Localizator.CreateContextualTask,
406
- icon: 'plus',
405
+ name: SDKUI_Localizator.CreateContextualTask,
406
+ icon: _jsx("span", { className: "dx-icon-plus" }),
407
407
  onClick: () => { openTaskForm(FormModes.Create, undefined, true); },
408
- disabled: false
408
+ disabled: false,
409
+ id: 'createContextualTask',
410
+ operationType: 'singleRow'
409
411
  },
410
412
  {
411
- text: SDKUI_Localizator.Create,
412
- icon: 'plus',
413
+ name: SDKUI_Localizator.Create,
414
+ icon: _jsx("span", { className: "dx-icon-plus" }),
413
415
  onClick: () => { openTaskForm(FormModes.Create, undefined, false); },
414
- disabled: false
416
+ disabled: false,
417
+ operationType: 'singleRow'
415
418
  },
416
419
  {
417
- text: SDKUI_Localizator.Update,
418
- icon: 'edit',
420
+ name: SDKUI_Localizator.Update,
421
+ icon: _jsx("span", { className: "dx-icon-edit" }),
419
422
  onClick: openEditTaskForm,
420
- operationType: 'singleRow',
421
- disabled: fromDatagrid ? false : !isTaskDescriptorDefined
423
+ disabled: fromDatagrid ? false : !isTaskDescriptorDefined,
424
+ operationType: 'singleRow'
422
425
  },
423
426
  {
424
- text: SDKUI_Localizator.Duplicate,
425
- icon: 'copy',
427
+ name: SDKUI_Localizator.Duplicate,
428
+ icon: _jsx("span", { className: "dx-icon-copy" }),
426
429
  onClick: openDuplicateTaskForm,
427
- operationType: 'singleRow',
428
- disabled: fromDatagrid ? isTaskFromAnotherUser : !isTaskDescriptorDefined || isTaskFromAnotherUser
430
+ disabled: fromDatagrid ? isTaskFromAnotherUser : !isTaskDescriptorDefined || isTaskFromAnotherUser,
431
+ operationType: 'singleRow'
429
432
  },
430
433
  {
431
- text: SDKUI_Localizator.Delete,
432
- icon: 'trash',
434
+ name: SDKUI_Localizator.Delete,
435
+ icon: _jsx("span", { className: "dx-icon-trash" }),
433
436
  onClick: onDeleteCallback,
434
- operationType: 'multiRow',
435
- disabled: fromDatagrid ? isTaskFromAnotherUser : !isTaskDescriptorDefined || isTaskFromAnotherUser
437
+ disabled: fromDatagrid ? isTaskFromAnotherUser : !isTaskDescriptorDefined || isTaskFromAnotherUser,
438
+ operationType: 'multiRow'
436
439
  },
437
440
  {
438
- icon: 'optionsgear',
439
- text: SDKUI_Localizator.MarkAs,
441
+ name: SDKUI_Localizator.MarkAs,
442
+ icon: _jsx("span", { className: "dx-icon-optionsgear" }),
443
+ disabled: fromDatagrid ? false : !isTaskDescriptorDefined,
440
444
  id: "markAs",
441
445
  operationType: 'multiRow',
442
- disabled: fromDatagrid ? false : !isTaskDescriptorDefined,
443
- items: [
444
- { icon: 'product', text: SDKUI_Localizator.NewFemale, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.NotStarted) },
445
- { icon: 'refresh', text: SDKUI_Localizator.InProgress, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.InProgress) },
446
- { icon: 'check', text: SDKUI_Localizator.Completed, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.Completed) },
447
- { icon: 'taskstop', text: SDKUI_Localizator.Pending, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.Waiting) },
448
- { icon: 'clock', text: SDKUI_Localizator.Postponed, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.Deferred) }
446
+ submenu: [
447
+ { name: SDKUI_Localizator.NewFemale, icon: _jsx("span", { className: "dx-icon-product" }), onClick: ((rowIds) => markAsStatus(rowIds, Task_States.NotStarted)), operationType: 'multiRow' },
448
+ { name: SDKUI_Localizator.InProgress, icon: _jsx("span", { className: "dx-icon-refresh" }), onClick: ((rowIds) => markAsStatus(rowIds, Task_States.InProgress)), operationType: 'multiRow' },
449
+ { name: SDKUI_Localizator.Completed, icon: _jsx("span", { className: "dx-icon-check" }), onClick: ((rowIds) => markAsStatus(rowIds, Task_States.Completed)), operationType: 'multiRow' },
450
+ { name: SDKUI_Localizator.Pending, icon: _jsx("span", { className: "dx-icon-taskstop" }), onClick: ((rowIds) => markAsStatus(rowIds, Task_States.Waiting)), operationType: 'multiRow' },
451
+ { name: SDKUI_Localizator.Postponed, icon: _jsx("span", { className: "dx-icon-clock" }), onClick: ((rowIds) => markAsStatus(rowIds, Task_States.Deferred)), operationType: 'multiRow' }
449
452
  ]
450
453
  },
451
454
  {
452
- id: 'wgContextFilter',
453
- text: showContextualWG ? SDKUI_Localizator.RemoveContextualFilter : SDKUI_Localizator.ApplyContextualFilter,
454
- icon: 'filter',
455
+ name: showContextualWG ? SDKUI_Localizator.RemoveContextualFilter : SDKUI_Localizator.ApplyContextualFilter,
456
+ icon: _jsx("span", { className: "dx-icon-filter" }),
455
457
  onClick: () => { setShowContextualWG(prev => !prev); },
456
458
  disabled: false,
457
459
  beginGroup: true,
458
- visible: fromWG
460
+ visible: fromWG,
461
+ id: 'wgContextFilter',
462
+ operationType: 'singleRow'
459
463
  },
460
464
  {
461
- id: 'dossierContextFilter',
462
- text: showContextualDossier ? SDKUI_Localizator.RemoveContextualFilter : SDKUI_Localizator.ApplyContextualFilter,
463
- icon: 'filter',
465
+ name: showContextualDossier ? SDKUI_Localizator.RemoveContextualFilter : SDKUI_Localizator.ApplyContextualFilter,
466
+ icon: _jsx("span", { className: "dx-icon-filter" }),
464
467
  onClick: () => { setShowContextualDossier(prev => !prev); },
465
468
  disabled: false,
466
469
  beginGroup: !fromWG && !fromDocument,
467
- visible: fromDossier
470
+ visible: fromDossier,
471
+ id: 'dossierContextFilter',
472
+ operationType: 'singleRow'
468
473
  },
469
474
  {
470
- id: 'documentContextFilter',
471
- text: showContextualDocument ? SDKUI_Localizator.RemoveContextualFilter : SDKUI_Localizator.ApplyContextualFilter,
472
- icon: 'filter',
475
+ name: showContextualDocument ? SDKUI_Localizator.RemoveContextualFilter : SDKUI_Localizator.ApplyContextualFilter,
476
+ icon: _jsx("span", { className: "dx-icon-filter" }),
473
477
  onClick: () => { setShowContextualDocument(prev => !prev); },
474
478
  disabled: false,
475
479
  beginGroup: !fromDossier && !fromWG,
476
- visible: fromDocument
480
+ visible: fromDocument,
481
+ id: 'documentContextFilter',
482
+ operationType: 'singleRow'
477
483
  },
478
484
  {
479
- icon: "event",
485
+ name: SDKUI_Localizator.GoToToday,
486
+ icon: _jsx("span", { className: "dx-icon-event" }),
480
487
  onClick: () => { if (handleGoToToday) {
481
488
  handleGoToToday();
482
489
  } },
483
- text: SDKUI_Localizator.GoToToday,
484
490
  disabled: false,
485
491
  beginGroup: true,
492
+ operationType: 'singleRow'
486
493
  },
487
494
  {
488
- beginGroup: true,
489
- icon: showSearch ? "eyeclose" : "eyeopen",
495
+ name: showSearch ? SDKUI_Localizator.HideSearch : SDKUI_Localizator.ShowSearch,
496
+ icon: _jsx("span", { className: showSearch ? "dx-icon-eyeclose" : "dx-icon-eyeopen" }),
490
497
  onClick: () => setShowSearch(prevShowSearch => !prevShowSearch),
491
- text: showSearch ? SDKUI_Localizator.HideSearch : SDKUI_Localizator.ShowSearch,
492
- disabled: false
498
+ disabled: false,
499
+ beginGroup: true,
500
+ operationType: 'singleRow'
493
501
  },
494
502
  {
495
- icon: showId ? "eyeclose" : "eyeopen",
503
+ name: showId ? SDKUI_Localizator.ID_Hide : SDKUI_Localizator.ID_Show,
504
+ icon: _jsx("span", { className: showId ? "dx-icon-eyeclose" : "dx-icon-eyeopen" }),
496
505
  onClick: () => setShowId(prevShowId => !prevShowId),
497
- text: showId ? SDKUI_Localizator.ID_Hide : SDKUI_Localizator.ID_Show,
498
- disabled: false
506
+ disabled: false,
507
+ operationType: 'singleRow'
499
508
  },
500
509
  {
501
- text: SDKUI_Localizator.Refresh,
502
- icon: 'refresh',
510
+ name: SDKUI_Localizator.Refresh,
511
+ icon: _jsx("span", { className: "dx-icon-refresh" }),
503
512
  onClick: () => getAllTasks(),
504
513
  disabled: false,
514
+ operationType: 'singleRow'
505
515
  },
506
516
  ];
507
517
  // Apply filters
@@ -529,7 +539,7 @@ export const createTasksMenuItems = (taskDescriptor, showId, setShowId, showSear
529
539
  item.visible === undefined);
530
540
  }
531
541
  if (showGoToToday === false) {
532
- filteredMenuItems = filteredMenuItems.filter(item => item.text !== SDKUI_Localizator.GoToToday);
542
+ filteredMenuItems = filteredMenuItems.filter(item => item.name !== SDKUI_Localizator.GoToToday);
533
543
  }
534
544
  return filteredMenuItems;
535
545
  };
@@ -5,7 +5,6 @@ import { TabPanel, Item } from 'devextreme-react/tab-panel';
5
5
  import { Priorities, ResultTypes, SDK_Globals, Task_States } from "@topconsultnpm/sdk-ts";
6
6
  import { calculateNumberOfDays, renderTaskIcons } from "./TMTasksUtilsView";
7
7
  import { getPriorityLocalizatorValue } from "../tasks/TMTasksUtils";
8
- import ContextMenu from 'devextreme-react/context-menu';
9
8
  import { calcResponsiveSizes, getExceptionMessage, SDKUI_Localizator, StyledTabItem, TMCountBadge } from "../../../helper";
10
9
  import { useDeviceType } from "../../base/TMDeviceProvider";
11
10
  import { FormModes } from "../../../ts";
@@ -17,6 +16,7 @@ import { TMResultManager } from "../../forms/TMResultDialog";
17
16
  import TMTasksCalendar from "./TMTasksCalendar";
18
17
  import TMTasksAgenda from "./TMTasksAgenda";
19
18
  import TMTaskForm from "./TMTaskForm";
19
+ import { ContextMenu as TMContextMenu } from "../../NewComponents/ContextMenu";
20
20
  let abortController = new AbortController();
21
21
  const TMTasksView = (props) => {
22
22
  const { id, allTasks, getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, visualizedTasks, activeComponent, activeTabIndex, setActiveTabIndex, currentTask, setCurrentTask, assignedToMeCount, assignedByMeCount, allTasksFilteredCount, showId, setShowId, showSearch, setShowSearch, showContextualWG, setShowContextualWG, showContextualDossier, setShowContextualDossier, showContextualDocument, setShowContextualDocument, handleNavigateToWGs, handleNavigateToDossiers, taskContext, usersList, onOpenS4TViewerRequest, s4TViewerDialogComponent, afterTaskSaved, } = props;
@@ -298,11 +298,11 @@ const TMTasksView = (props) => {
298
298
  const handleNavigateToDossiersWrapper = useCallback(async (dossierId) => {
299
299
  setShowTaskForm(false);
300
300
  await handleNavigateToDossiers(dossierId);
301
- }, []);
301
+ }, [handleNavigateToDossiers]);
302
302
  const handleNavigateToWGsWrapper = useCallback(async (workGroupId) => {
303
303
  setShowTaskForm(false);
304
304
  await handleNavigateToWGs(workGroupId);
305
- }, []);
305
+ }, [handleNavigateToWGs]);
306
306
  const onContextMenuPreparing = (e) => {
307
307
  if (e === undefined)
308
308
  return;
@@ -519,13 +519,13 @@ const TMTasksView = (props) => {
519
519
  ];
520
520
  }, [showId]);
521
521
  const getFromOrToDatagridElement = (fromOrToDataSource, fromCell = false, toCell = false) => {
522
- return _jsx(TMDataGrid, { dataSource: fromOrToDataSource, dataColumns: getDataColumns(fromCell, toCell), selection: { mode: 'multiple', showCheckBoxesMode: "always" }, focusedRowKey: focusedRowKey, selectedRowKeys: [...selectedRowKeys], onFocusedRowChanged: onFocusedRowChanged, onSelectionChanged: onSelectionChanged, onRowDblClick: onRowDblClick, onContextMenuPreparing: onContextMenuPreparing, showSearchPanel: showSearch, noDataText: SDKUI_Localizator.TasksEmpty, counterConfig: { show: true }, onHasFiltersChange: (active) => setHasFilters(active) });
522
+ return _jsx(TMDataGrid, { dataSource: fromOrToDataSource, dataColumns: getDataColumns(fromCell, toCell), selection: { mode: 'multiple', showCheckBoxesMode: "always" }, focusedRowKey: focusedRowKey, selectedRowKeys: [...selectedRowKeys], onFocusedRowChanged: onFocusedRowChanged, onSelectionChanged: onSelectionChanged, onRowDblClick: onRowDblClick, customContextMenuItems: menuItems, showSearchPanel: showSearch, noDataText: SDKUI_Localizator.TasksEmpty, counterConfig: { show: true }, onHasFiltersChange: (active) => setHasFilters(active) });
523
523
  };
524
524
  const getFromOrToAgendaElement = (fromOrToDataSource, fromCell = false, toCell = false) => {
525
- return _jsxs("div", { style: { width: '100%', height: '100%', display: 'flex', flexDirection: 'column', overflow: "auto" }, children: [_jsx(ContextMenu, { dataSource: menuItems, target: `#tasks-agenda-wrapper-${id}` }), _jsx("div", { style: { width: "100%", height: "100%" }, children: _jsx(TMTasksAgenda, { id: id, showId: showId, showSearch: showSearch, visualizedTasks: fromOrToDataSource, fromCell: fromCell, toCell: toCell, currentAgendaDate: currentAgendaDate, setCurrentAgendaDate: setCurrentAgendaDate, openTaskForm: openTaskFormCallback, handleFocusedRowChange: handleFocusedRowChange }) })] });
525
+ return _jsx("div", { style: { width: '100%', height: '100%', display: 'flex', flexDirection: 'column', overflow: "auto" }, children: _jsxs("div", { style: { width: "100%", height: "100%" }, id: `agenda-container-${id}`, children: [_jsx(TMTasksAgenda, { id: id, showId: showId, showSearch: showSearch, visualizedTasks: fromOrToDataSource, fromCell: fromCell, toCell: toCell, currentAgendaDate: currentAgendaDate, setCurrentAgendaDate: setCurrentAgendaDate, openTaskForm: openTaskFormCallback, handleFocusedRowChange: handleFocusedRowChange }), _jsx(TMContextMenu, { items: menuItems, target: `#agenda-container-${id}` })] }) });
526
526
  };
527
527
  const getFromOrToCalendarElement = (fromOrToDataSource, fromCell = false, toCell = false) => {
528
- return _jsxs("div", { style: { width: '100%', height: '100%', display: 'flex', flexDirection: 'column', overflow: "auto" }, children: [_jsx(ContextMenu, { dataSource: menuItems, target: `#tasks-calendar-wrapper-${id}` }), _jsx("div", { style: { width: "100%", height: "100%" }, children: _jsx(TMTasksCalendar, { id: id, visualizedTasks: fromOrToDataSource, showId: showId, fromCell: fromCell, toCell: toCell, showSearch: showSearch, currentCalendarDate: currentCalendarDate, setCurrentCalendarDate: setCurrentCalendarDate, openTaskForm: openTaskFormCallback, onDeleteCallback: onDeleteCallback, setCalendarStartDate: setCalendarStartDate, setCalendarEndDate: setCalendarEndDate, focusedRowKey: focusedRowKey, handleFocusedRowChange: handleFocusedRowChange }) })] });
528
+ return _jsx("div", { style: { width: '100%', height: '100%', display: 'flex', flexDirection: 'column', overflow: "auto" }, children: _jsx("div", { style: { width: "100%", height: "100%" }, children: _jsx(TMTasksCalendar, { id: id, visualizedTasks: fromOrToDataSource, showId: showId, fromCell: fromCell, toCell: toCell, showSearch: showSearch, currentCalendarDate: currentCalendarDate, setCurrentCalendarDate: setCurrentCalendarDate, openTaskForm: openTaskFormCallback, onDeleteCallback: onDeleteCallback, setCalendarStartDate: setCalendarStartDate, setCalendarEndDate: setCalendarEndDate, focusedRowKey: focusedRowKey, handleFocusedRowChange: handleFocusedRowChange }) }) });
529
529
  };
530
530
  return _jsxs("div", { style: { width: '100%', height: '100%' }, onContextMenu: (e) => e.preventDefault(), children: [_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, isCancelable: true, abortController: abortController, children: _jsxs(TabPanel, { width: "100%", height: "100%", animationEnabled: false, swipeEnabled: false, loop: false, showNavButtons: true, repaintChangesOnly: true, stylingMode: "primary", iconPosition: 'start', tabsPosition: 'top', selectedIndex: activeTabIndex, onSelectedIndexChange: onSelectedIndexChange, id: "task-centered-tab-title", children: [_jsx(Item, { title: SDKUI_Localizator.AssignedToMe, icon: "user", tabRender: (params) => {
531
531
  return _jsxs(StyledTabItem, { "$isSelected": activeTabIndex === AssignedTab.AssignedToMe, children: [_jsxs(TMTooltip, { content: SDKUI_Localizator.AssignedToMe, children: [_jsx("i", { className: `dx-icon-${params.icon}` }), "\u00A0", params.title, " ", (assignedToMeCount > 0) ? `(${assignedToMeCount})` : ''] }), newTaskCount > 0 && (_jsx(TMTooltip, { content: SDKUI_Localizator.NewAssignedActivitiesNumber + ": " + newTaskCount, children: _jsx(TMCountBadge, { children: newTaskCount }) }))] });
@@ -1,5 +1,6 @@
1
- import { DcmtTypeDescriptor } from '@topconsultnpm/sdk-ts';
1
+ import { DcmtTypeDescriptor, WFDescriptor } from '@topconsultnpm/sdk-ts';
2
2
  import { DeviceType } from "../../base/TMDeviceProvider";
3
+ import { WorkItemDetail } from "../../../ts";
3
4
  interface IWorkflowOperationButtonsProps {
4
5
  dtd: DcmtTypeDescriptor | undefined;
5
6
  approveDisable?: boolean;
@@ -24,13 +25,42 @@ export declare const WorkFlowApproveRejectPopUp: ({ TID, DID, deviceType, isReje
24
25
  onClose?: () => void;
25
26
  onCompleted?: () => Promise<void>;
26
27
  }) => import("react/jsx-runtime").JSX.Element;
27
- export declare const WorkFlowReAssignPopUp: ({ DID, TID, deviceType, onClose, selectedItems, onCompleted }: {
28
+ export declare const WorkFlowReAssignPopUp: ({ DID, TID, deviceType, onClose, selectedItems, onCompleted, wf }: {
28
29
  TID?: number;
29
30
  DID?: number;
30
31
  deviceType?: DeviceType;
31
32
  onClose?: () => void;
32
33
  selectedItems?: any[];
33
34
  onCompleted?: () => Promise<void>;
35
+ wf?: WFDescriptor;
36
+ }) => import("react/jsx-runtime").JSX.Element;
37
+ /**
38
+ * Modal per forzare l'approvazione di un work item
39
+ */
40
+ export declare const WorkflowForceApproveModal: ({ detail, onClose, onCompleted }: {
41
+ detail: WorkItemDetail;
42
+ onClose?: () => void;
43
+ onCompleted?: () => Promise<void>;
44
+ }) => import("react/jsx-runtime").JSX.Element;
45
+ /**
46
+ * Modal per forzare il rifiuto di un work item
47
+ */
48
+ export declare const WorkflowForceRejectModal: ({ detail, onClose, onCompleted }: {
49
+ detail: WorkItemDetail;
50
+ onClose?: () => void;
51
+ onCompleted?: () => Promise<void>;
52
+ }) => import("react/jsx-runtime").JSX.Element;
53
+ /**
54
+ * Modal per terminare le istanze workflow selezionate
55
+ */
56
+ export declare const WorkflowEndInstanceModal: ({ selectedInstances, onClose, onCompleted }: {
57
+ selectedInstances: Array<{
58
+ wfid?: number;
59
+ tid?: number;
60
+ did?: number;
61
+ }>;
62
+ onClose?: () => void;
63
+ onCompleted?: () => Promise<void>;
34
64
  }) => import("react/jsx-runtime").JSX.Element;
35
65
  export declare const WorkFlowMoreInfoPopUp: ({ DID, TID, deviceType, onClose, onCompleted }: {
36
66
  TID?: number;