@topconsultnpm/sdkui-react 6.20.0-dev2.54 → 6.20.0-dev2.56
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/editors/TMHtmlEditor.js +1 -1
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +3 -0
- package/lib/components/features/blog/TMBlogCommentForm.js +42 -36
- package/lib/components/features/documents/TMDcmtForm.js +7 -3
- package/lib/components/features/documents/TMFileUploader.js +5 -2
- package/lib/components/features/tasks/TMTaskFormUtils.js +6 -5
- package/lib/components/features/workflow/diagram/WFDiagram.js +3 -3
- package/lib/helper/TMIcons.d.ts +2 -1
- package/lib/helper/TMIcons.js +4 -1
- package/package.json +1 -1
|
@@ -158,7 +158,7 @@ const TMHtmlEditor = (props) => {
|
|
|
158
158
|
borderStyle: 'solid',
|
|
159
159
|
borderColor: hasValidationErrors ? "red" : "#e0e0e0 #e0e0e0 #616161",
|
|
160
160
|
width: "100%",
|
|
161
|
-
height: `calc(100% - ${showCount ? 15 : 0}px - ${validationItems.length > 0 ?
|
|
161
|
+
height: `calc(100% - ${showCount ? 15 : 0}px - ${validationItems.length > 0 ? 25 : 0}px)`,
|
|
162
162
|
}, children: _jsx(HtmlEditor, { ref: editorRef, placeholder: SDKUI_Localizator.TypeAMessage + "...", width: "100%", height: "100%", value: markup, onValueChange: onValueChangeCallback, mentions: mentionsConfig, style: { overflow: 'hidden', outline: "none", fontSize: '1rem' }, children: isEditorEnabled && (toolbarMode === 'compact' ?
|
|
163
163
|
_jsxs(Toolbar, { multiline: false, children: [_jsx(Item, { name: "undo" }), _jsx(Item, { name: "redo" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "bold" }), _jsx(Item, { name: "italic" }), _jsx(Item, { name: "strike" }), _jsx(Item, { name: "underline" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "orderedList" }), _jsx(Item, { name: "bulletList" })] }) :
|
|
164
164
|
_jsxs(Toolbar, { children: [_jsx(Item, { name: "undo" }), _jsx(Item, { name: "redo" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "bold" }), _jsx(Item, { name: "italic" }), _jsx(Item, { name: "strike" }), _jsx(Item, { name: "underline" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "alignLeft" }), _jsx(Item, { name: "alignCenter" }), _jsx(Item, { name: "alignRight" }), _jsx(Item, { name: "alignJustify" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "color" }), _jsx(Item, { name: "background" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "link" }), _jsx(Item, { name: "image" }), _jsx(Item, { name: "separator" })] })) }) }), showCount ? ((() => {
|
|
@@ -14,6 +14,9 @@ interface TMBlogCommentFormProps {
|
|
|
14
14
|
onFilterCreated?: (predicate: (post: BlogPost) => boolean) => void;
|
|
15
15
|
refreshCallback?: () => Promise<void>;
|
|
16
16
|
isCommentRequired?: boolean;
|
|
17
|
+
maxLength?: number;
|
|
18
|
+
/** External save handler - when provided, bypasses internal engine logic */
|
|
19
|
+
onCustomSave?: (blogPost: BlogPost) => Promise<void>;
|
|
17
20
|
}
|
|
18
21
|
declare const TMBlogCommentForm: (props: TMBlogCommentFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
22
|
export default TMBlogCommentForm;
|
|
@@ -28,8 +28,7 @@ const getNonDirectoryFiles = (items, exclude) => {
|
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
const TMBlogCommentForm = (props) => {
|
|
31
|
-
const maxLength = 1000;
|
|
32
|
-
const { participants, selectedAttachments, selectedAttachmentDid, allFileItems, allArchivedDocumentsFileItems = [], onClose, context, showAttachmentsSection = true, removeAndEditAttachment = true, onFilterCreated, refreshCallback, isCommentRequired = false } = props;
|
|
31
|
+
const { participants, selectedAttachments, selectedAttachmentDid, allFileItems, allArchivedDocumentsFileItems = [], onClose, context, showAttachmentsSection = true, removeAndEditAttachment = true, onFilterCreated, refreshCallback, isCommentRequired = false, maxLength = 1000, onCustomSave } = props;
|
|
33
32
|
// Initialize state with combined array
|
|
34
33
|
const [dataSource, setDataSource] = useState(() => [...getNonDirectoryFiles(allFileItems?.items || [], []), ...allArchivedDocumentsFileItems]);
|
|
35
34
|
const [isEditorEnabled, setIsEditorEnabled] = useState(true);
|
|
@@ -101,14 +100,6 @@ const TMBlogCommentForm = (props) => {
|
|
|
101
100
|
try {
|
|
102
101
|
// Show a loading spinner with a localized description
|
|
103
102
|
TMSpinner.show({ description: SDKUI_Localizator.Comment });
|
|
104
|
-
// Exit early if the engine or its required identifiers are undefined
|
|
105
|
-
if (context.object === undefined
|
|
106
|
-
|| (context.engine === 'WorkingGroupEngine' && !context.object.id)
|
|
107
|
-
|| (context.engine === 'SearchEngine' && (!context.object.tid || !context.object.did))
|
|
108
|
-
|| (context.engine === 'DossierEngine' && !context.object.id)) {
|
|
109
|
-
TMSpinner.hide();
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
103
|
// Create a new BlogPost object
|
|
113
104
|
const blogPost = new BlogPost();
|
|
114
105
|
// Retrieve the comment from formData, or use an empty string if undefined
|
|
@@ -132,36 +123,51 @@ const TMBlogCommentForm = (props) => {
|
|
|
132
123
|
});
|
|
133
124
|
blogPost.attachments = attachment;
|
|
134
125
|
}
|
|
135
|
-
if (
|
|
136
|
-
//
|
|
137
|
-
|
|
138
|
-
// Call the BlogPostAddAsync method to add the blog post to the working group
|
|
139
|
-
const newBlogPostId = await workingGroupEngine.BlogPostAddAsync(context.object.id, blogPost);
|
|
126
|
+
if (onCustomSave) {
|
|
127
|
+
// Use the external save handler - logic is managed externally
|
|
128
|
+
await onCustomSave(blogPost);
|
|
140
129
|
await refreshCallback?.();
|
|
141
|
-
if (newBlogPostId && onFilterCreated) {
|
|
142
|
-
onFilterCreated(post => post.id === newBlogPostId);
|
|
143
|
-
}
|
|
144
|
-
;
|
|
145
130
|
}
|
|
146
|
-
else
|
|
147
|
-
//
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
131
|
+
else {
|
|
132
|
+
// Validate context only when using internal engine logic
|
|
133
|
+
if (context.object === undefined
|
|
134
|
+
|| (context.engine === 'WorkingGroupEngine' && !context.object.id)
|
|
135
|
+
|| (context.engine === 'SearchEngine' && (!context.object.tid || !context.object.did))
|
|
136
|
+
|| (context.engine === 'DossierEngine' && !context.object.id)) {
|
|
137
|
+
TMSpinner.hide();
|
|
138
|
+
return;
|
|
153
139
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
140
|
+
if (context.engine === 'WorkingGroupEngine' && context.object && context.object.id) {
|
|
141
|
+
// Create an instance of WorkingGroupEngine to interact with the working group
|
|
142
|
+
const workingGroupEngine = new WorkingGroupEngine(SDK_Globals.tmSession);
|
|
143
|
+
// Call the BlogPostAddAsync method to add the blog post to the working group
|
|
144
|
+
const newBlogPostId = await workingGroupEngine.BlogPostAddAsync(context.object.id, blogPost);
|
|
145
|
+
await refreshCallback?.();
|
|
146
|
+
if (newBlogPostId && onFilterCreated) {
|
|
147
|
+
onFilterCreated(post => post.id === newBlogPostId);
|
|
148
|
+
}
|
|
149
|
+
;
|
|
150
|
+
}
|
|
151
|
+
else if (context.engine === 'SearchEngine') {
|
|
152
|
+
// Create an instance of SearchEngine
|
|
153
|
+
const searchEngine = SDK_Globals.tmSession?.NewSearchEngine();
|
|
154
|
+
const newBlogPostId = await searchEngine.BlogPostAddAsync(context.object.tid, context.object.did, cleanComment);
|
|
155
|
+
await refreshCallback?.();
|
|
156
|
+
if (newBlogPostId && onFilterCreated) {
|
|
157
|
+
onFilterCreated(post => post.id === newBlogPostId);
|
|
158
|
+
}
|
|
159
|
+
;
|
|
160
|
+
}
|
|
161
|
+
else if (context.engine === 'DossierEngine' && context.object && context.object.id) {
|
|
162
|
+
// Create an instance of DossierEngine
|
|
163
|
+
const dossierEngine = SDK_Globals.tmSession?.NewDossierEngine();
|
|
164
|
+
const newBlogPostId = await dossierEngine.BlogPostAddAsync(context.object.id, blogPost);
|
|
165
|
+
await refreshCallback?.();
|
|
166
|
+
if (newBlogPostId && onFilterCreated) {
|
|
167
|
+
onFilterCreated(post => post.id === newBlogPostId);
|
|
168
|
+
}
|
|
169
|
+
;
|
|
163
170
|
}
|
|
164
|
-
;
|
|
165
171
|
}
|
|
166
172
|
}
|
|
167
173
|
catch (e) {
|
|
@@ -1530,7 +1530,7 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
1530
1530
|
// Return the appropriate layout based on context
|
|
1531
1531
|
return invocationContext === InvocationContext.Todo ? settings?.layoutToDo : settings?.layout;
|
|
1532
1532
|
};
|
|
1533
|
-
const
|
|
1533
|
+
const onBlogCommentFormCustomSave = useCallback(async (blogPost) => {
|
|
1534
1534
|
try {
|
|
1535
1535
|
if (!moreInfoTasks || moreInfoTasks.length === 0) {
|
|
1536
1536
|
ShowAlert({
|
|
@@ -1544,7 +1544,11 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
1544
1544
|
;
|
|
1545
1545
|
const firstTask = moreInfoTasks[0];
|
|
1546
1546
|
TMSpinner.show();
|
|
1547
|
-
const newTask = {
|
|
1547
|
+
const newTask = {
|
|
1548
|
+
...firstTask,
|
|
1549
|
+
state: Task_States.Completed,
|
|
1550
|
+
response: blogPost.description,
|
|
1551
|
+
};
|
|
1548
1552
|
await SDK_Globals.tmSession?.NewTaskEngine().UpdateAsync(newTask);
|
|
1549
1553
|
onTaskCompleted?.(newTask);
|
|
1550
1554
|
onClose?.();
|
|
@@ -1633,7 +1637,7 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
1633
1637
|
value: FormulaHelper.addFormulaTag(newFormula.expression)
|
|
1634
1638
|
}));
|
|
1635
1639
|
} }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, isReject: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, isReject: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, onClose: () => setShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, onClose: () => setShowMoreInfoPopup(false), getAllTasks: getAllTasks }), (isModal && onClose) && _jsx("div", { id: "TMDcmtFormShowConfirmForClose-" + id })] }) }), _jsx(TMToppyDraggableHelpCenter, { isVisible: isToppyVisible, content: _jsx(TMDcmtFormActionButtons, { showToppyForApprove: showToppyForApprove, workItems: workItems, deviceType: deviceType, isMobile: isMobile, handleSignApprove: handleSignApprove, setShowApprovePopup: setShowApprovePopup, setShowRejectPopup: setShowRejectPopup, setShowReAssignPopup: setShowReAssignPopup, setShowMoreInfoPopup: setShowMoreInfoPopup, fromDTD: fromDTD, showToppyForCompleteMoreInfo: showToppyForCompleteMoreInfo, moreInfoTasks: moreInfoTasks, setShowCommentForm: setShowCommentForm, showToppyForReferences: showToppyForReferences, dcmtReferences: dcmtReferences, referenceActionMap: referenceActionMap, handleNavigateToReference: handleNavigateToReference, setShowMoreInfoTaskPopup: setShowMoreInfoTaskPopup, setShowMoreInfoTaskTask: setShowMoreInfoTaskTask }) })] }), (showCommentForm && TID && DID) &&
|
|
1636
|
-
_jsx(TMBlogCommentForm, { context: { engine: 'SearchEngine', object: { tid: TID, did: DID } }, onClose: () => setShowCommentForm(false),
|
|
1640
|
+
_jsx(TMBlogCommentForm, { maxLength: 500, context: { engine: 'SearchEngine', object: { tid: TID, did: DID } }, onClose: () => setShowCommentForm(false), onCustomSave: onBlogCommentFormCustomSave, participants: [], showAttachmentsSection: false, allArchivedDocumentsFileItems: [] }), isOpenDetails &&
|
|
1637
1641
|
_jsx(StyledModalContainer, { children: _jsx(TMMasterDetailDcmts, { deviceType: deviceType, isForMaster: false, inputDcmts: getSelectionDcmtInfo(), allowNavigation: allowNavigation, canNext: canNext, canPrev: canPrev, onNext: onNext, onPrev: onPrev, onBack: () => setIsOpenDetails(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), isOpenMaster &&
|
|
1638
1642
|
_jsxs(StyledModalContainer, { children: [_jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: getSelectionDcmtInfo(), isForMaster: true, allowNavigation: allowNavigation, canNext: canNext, canPrev: canPrev, onNext: onNext, onPrev: onPrev, onBack: () => setIsOpenMaster(false), appendMasterDcmts: handleAddItem, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), secondaryMasterDcmts.length > 0 && secondaryMasterDcmts.map((dcmt, index) => {
|
|
1639
1643
|
return (_jsx(StyledModalContainer, { children: _jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: [dcmt], isForMaster: true, allowNavigation: false, onBack: () => handleRemoveItem(dcmt.TID, dcmt.DID), appendMasterDcmts: handleAddItem, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }, `${index}-${dcmt.DID}`));
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { IconFolderOpen, SDKUI_Localizator, formatBytes, IconClear, extensionHandler, IconCloseOutline } from '../../../helper';
|
|
4
|
+
import { IconFolderOpen, IconScanner, SDKUI_Localizator, formatBytes, IconClear, extensionHandler, IconCloseOutline } from '../../../helper';
|
|
5
|
+
import { useBetaFeatures } from '../../../hooks/useBetaFeatures';
|
|
5
6
|
import usePreventFileDrop from '../../../hooks/usePreventFileDrop';
|
|
6
7
|
import { FileExtensionHandler } from '../../../ts';
|
|
7
8
|
import { TMColors } from '../../../utils/theme';
|
|
8
9
|
import TMButton from '../../base/TMButton';
|
|
10
|
+
import ShowAlert from '../../base/TMAlert';
|
|
9
11
|
import { DeviceType } from '../../base/TMDeviceProvider';
|
|
10
12
|
import TMTooltip from '../../base/TMTooltip';
|
|
11
13
|
import { TMFileViewer, StyledHeaderIcon } from './TMDcmtPreview';
|
|
12
14
|
import TMPanel from '../../base/TMPanel';
|
|
13
15
|
import TMDragDropOverlay from './TMDragDropOverlay';
|
|
14
16
|
const TMFileUploader = ({ deviceType = DeviceType.DESKTOP, onClose, onFileUpload, isRequired = false, defaultBlob = null, isResizingActive, showTMPanel = true, enableDragDropOverlay = false }) => {
|
|
17
|
+
const isBetaFeaturesEnabled = useBetaFeatures();
|
|
15
18
|
const [dragOver, setDragOver] = useState(false);
|
|
16
19
|
const [uploadedFile, setUploadedFile] = useState(defaultBlob);
|
|
17
20
|
const [fileName, setFileName] = useState('');
|
|
@@ -83,7 +86,7 @@ const TMFileUploader = ({ deviceType = DeviceType.DESKTOP, onClose, onFileUpload
|
|
|
83
86
|
document.getElementById('fileInput')?.click();
|
|
84
87
|
}, []);
|
|
85
88
|
let content = !uploadedFile ?
|
|
86
|
-
_jsxs("div", { style: { display: 'flex', gap: 10, width: '100%', height: '100%' }, children: [_jsx(HiddenInput, { id: "fileInput", type: "file", onChange: handleInputChange }), _jsxs(UploadContainer, { ref: uploaderRef, tabIndex: 0, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, style: { backgroundColor: dragOver ? '#76b1e6' : 'white' }, onDoubleClick: browseHandler, "$isRequired": isRequired, children: [
|
|
89
|
+
_jsxs("div", { style: { display: 'flex', gap: 10, width: '100%', height: '100%' }, children: [_jsx(HiddenInput, { id: "fileInput", type: "file", onChange: handleInputChange }), _jsxs(UploadContainer, { ref: uploaderRef, tabIndex: 0, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, style: { backgroundColor: dragOver ? '#76b1e6' : 'white' }, onDoubleClick: browseHandler, "$isRequired": isRequired, children: [_jsxs("div", { style: { display: 'flex', gap: '10px', flexDirection: 'column', position: 'absolute', right: 5, top: 5 }, children: [_jsx(TMButton, { btnStyle: 'icon', caption: 'Sfoglia', color: isRequired && !uploadedFile ? 'error' : 'primary', onClick: browseHandler, icon: _jsx(IconFolderOpen, { fontSize: 22 }) }), isBetaFeaturesEnabled && _jsx(TMButton, { btnStyle: 'icon', caption: 'Scanner', color: 'primary', onClick: () => { ShowAlert({ message: 'Funzionalità scanner in fase di sviluppo.', mode: 'info', duration: 3000, title: 'Work in progress' }); }, icon: _jsx(IconScanner, { fontSize: 22 }) })] }), _jsx("p", { style: { fontSize: '1.2rem', fontWeight: 'bold' }, children: deviceType === DeviceType.MOBILE ? 'Clicca per sfogliare il tuo file' : 'Trascina il tuo file o fai doppio click per sfogliarlo' }), isRequired && _jsxs("p", { style: { fontWeight: 'bold' }, children: [" ", SDKUI_Localizator.RequiredField, " "] })] })] }) :
|
|
87
90
|
_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 10, width: '100%', height: '100%' }, children: [_jsxs("div", { style: { backgroundColor: 'white', padding: '5px 10px', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'space-between', color: TMColors.primaryColor }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 5 }, children: [_jsx("p", { children: "File name:" }), _jsxs("div", { style: { fontWeight: 'bold' }, children: [fileName, " ", _jsxs("span", { children: [" ", ` (${formatBytes(fileSize)})`, " "] })] })] }), uploadedFile && _jsx(TMButton, { btnStyle: 'icon', color: 'error', caption: 'Pulisci', onClick: () => clearFile(true), icon: _jsx(IconClear, { fontSize: 22 }) })] }), extensionHandler(fileExt) === FileExtensionHandler.READY_TO_SHOW ? _jsx(TMFileViewer, { fileBlob: uploadedFile, isResizingActive: isResizingActive }) :
|
|
88
91
|
_jsx("div", { style: { backgroundColor: '#f6dbdb', padding: '5px 10px', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'space-between', color: TMColors.error }, children: _jsxs("div", { children: [" ", 'Anteprima non disponibile.', fileExt && _jsx("b", { children: ` (*.${fileExt})` })] }) })] });
|
|
89
92
|
const innerContent = (_jsxs("div", { style: { width: '100%', height: '100%', padding: '2px', display: 'flex', flexDirection: 'column', gap: 10 }, children: [enableDragDropOverlay && _jsx(TMDragDropOverlay, { handleFile: handleFile, refocusAfterFileInput: refocusAfterFileInput }), content] }));
|
|
@@ -18,6 +18,7 @@ import TMButton from "../../base/TMButton";
|
|
|
18
18
|
import { ButtonNames, TMExceptionBoxManager, TMMessageBoxManager } from "../../base/TMPopUp";
|
|
19
19
|
import TMSpinner from "../../base/TMSpinner";
|
|
20
20
|
import { taskStateIconMap } from "./TMTasksUtilsView";
|
|
21
|
+
import TMHtmlContentDisplay from "../../editors/TMHtmlContentDisplay";
|
|
21
22
|
export const getCurrentUserTaskRole = (task) => {
|
|
22
23
|
if (!task)
|
|
23
24
|
return "personal";
|
|
@@ -286,7 +287,7 @@ const ResponseCommentTextArea = styled.textarea.attrs({
|
|
|
286
287
|
outline: none;
|
|
287
288
|
border-bottom: 4px solid ${props => props.$isValid ? TMColors.primaryColor : TMColors.error};
|
|
288
289
|
}
|
|
289
|
-
color: ${props => props.$isModifiedWhen ? '#E29000' : '
|
|
290
|
+
color: ${props => props.$isModifiedWhen ? '#E29000' : '#000000'};
|
|
290
291
|
`;
|
|
291
292
|
const ResponseCommentCharacterCounter = styled.div `
|
|
292
293
|
text-align: right;
|
|
@@ -324,7 +325,7 @@ const TaskFormResponseComment = (props) => {
|
|
|
324
325
|
lineHeight: '1.6rem',
|
|
325
326
|
paddingRight: 20,
|
|
326
327
|
}, children: currentResponse && currentResponse.length > 0
|
|
327
|
-
? currentResponse
|
|
328
|
+
? _jsx(TMHtmlContentDisplay, { markup: currentResponse ?? '-', isSelected: false })
|
|
328
329
|
: _jsx("span", { style: { color: '#6c757d', fontStyle: 'italic' }, children: SDKUI_Localizator.NoAnswerProvided }) })] }), showFullscreen && (_jsx(TMModal, { title: SDKUI_Localizator.Answer, width: calcResponsiveSizes(deviceType, '600px', '600px', '95%'), height: calcResponsiveSizes(deviceType, '400px', '400px', '80%'), isModal: true, resizable: true, onClose: () => setShowFullscreen(false), children: _jsx("div", { style: {
|
|
329
330
|
padding: 16,
|
|
330
331
|
fontSize: '1rem',
|
|
@@ -335,7 +336,7 @@ const TaskFormResponseComment = (props) => {
|
|
|
335
336
|
height: '100%',
|
|
336
337
|
boxSizing: 'border-box',
|
|
337
338
|
}, children: currentResponse && currentResponse.length > 0
|
|
338
|
-
? currentResponse
|
|
339
|
+
? _jsx(TMHtmlContentDisplay, { markup: currentResponse ?? '-', isSelected: false })
|
|
339
340
|
: _jsx("span", { style: { color: '#6c757d', fontStyle: 'italic' }, children: SDKUI_Localizator.NoAnswerProvided }) }) }))] })
|
|
340
341
|
: (_jsxs(ResponseCommentWrapper, { children: [_jsx(ResponseCommentTextArea, { id: "responseId", name: "response", "$isValid": true, value: currentResponse ?? '', onChange: onAnswerChange ? onAnswerChange : undefined, "$isModifiedWhen": currentResponse !== originalResponse }), _jsx(ResponseCommentLabel, { htmlFor: "responseId", "$isModifiedWhen": currentResponse !== originalResponse, children: SDKUI_Localizator.Answer }), _jsx(ResponseCommentCharacterCounter, { children: `${500 - (currentResponse ?? '').length} ${SDKUI_Localizator.CharactersRemaining}` })] })) }));
|
|
341
342
|
};
|
|
@@ -493,7 +494,7 @@ export const STATUS_TRANSITIONS = {
|
|
|
493
494
|
[Task_States.InProgress]: [Task_States.NotStarted, Task_States.InProgress, Task_States.Waiting, Task_States.Deferred, Task_States.Completed],
|
|
494
495
|
[Task_States.Waiting]: [Task_States.NotStarted, Task_States.InProgress, Task_States.Waiting, Task_States.Deferred, Task_States.Completed],
|
|
495
496
|
[Task_States.Deferred]: [Task_States.NotStarted, Task_States.InProgress, Task_States.Waiting, Task_States.Deferred, Task_States.Completed],
|
|
496
|
-
[Task_States.Completed]: [Task_States.Closed, Task_States.InProgress],
|
|
497
|
+
[Task_States.Completed]: [Task_States.Completed, Task_States.Closed, Task_States.InProgress],
|
|
497
498
|
[Task_States.Closed]: [Task_States.NotStarted, Task_States.InProgress, Task_States.Waiting, Task_States.Deferred, Task_States.Completed, Task_States.Closed]
|
|
498
499
|
},
|
|
499
500
|
// Destinatario del task: può modificare lo stato liberamente, ma solo riaprire o chiudere se completato
|
|
@@ -502,7 +503,7 @@ export const STATUS_TRANSITIONS = {
|
|
|
502
503
|
[Task_States.InProgress]: [Task_States.NotStarted, Task_States.InProgress, Task_States.Waiting, Task_States.Deferred, Task_States.Completed],
|
|
503
504
|
[Task_States.Waiting]: [Task_States.NotStarted, Task_States.InProgress, Task_States.Waiting, Task_States.Deferred, Task_States.Completed],
|
|
504
505
|
[Task_States.Deferred]: [Task_States.NotStarted, Task_States.InProgress, Task_States.Waiting, Task_States.Deferred, Task_States.Completed],
|
|
505
|
-
[Task_States.Completed]: [Task_States.Closed, Task_States.InProgress],
|
|
506
|
+
[Task_States.Completed]: [Task_States.Completed, Task_States.Closed, Task_States.InProgress],
|
|
506
507
|
[Task_States.Closed]: [Task_States.NotStarted, Task_States.InProgress, Task_States.Waiting, Task_States.Deferred, Task_States.Completed, Task_States.Closed]
|
|
507
508
|
}
|
|
508
509
|
};
|
|
@@ -1366,8 +1366,8 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, allowEdit = true, onDiagram
|
|
|
1366
1366
|
: SDKUI_Localizator.WorkItemStatus_Completed;
|
|
1367
1367
|
return [{
|
|
1368
1368
|
icon: connection.OutputStatus === WorkItemStatus.Completed
|
|
1369
|
-
? _jsx(IconCloseCircle, { color: TMColors.
|
|
1370
|
-
: _jsx(IconSuccess, { color: TMColors.
|
|
1369
|
+
? _jsx(IconCloseCircle, { color: TMColors.error, fontSize: 16 })
|
|
1370
|
+
: _jsx(IconSuccess, { color: TMColors.success, fontSize: 16 }),
|
|
1371
1371
|
name: SDKUI_Localizator.ChangeStatusTo.replaceParams(targetStatus),
|
|
1372
1372
|
onClick: () => handleChangeConnectionOutputStatus(contextMenuConnectionId)
|
|
1373
1373
|
}];
|
|
@@ -1886,7 +1886,7 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, allowEdit = true, onDiagram
|
|
|
1886
1886
|
fullScreenRef.current.focus();
|
|
1887
1887
|
}
|
|
1888
1888
|
}, [isFullScreen]);
|
|
1889
|
-
const diagramContent = (_jsxs(CanvasContainer, { onDoubleClick: handleCanvasDoubleClick, children: [_jsx("input", { ref: fileInputRef, type: "file", accept: ".xml" // Filtra per file XML
|
|
1889
|
+
const diagramContent = (_jsxs(CanvasContainer, { onDoubleClick: handleCanvasDoubleClick, onContextMenu: (e) => e.preventDefault(), children: [_jsx("input", { ref: fileInputRef, type: "file", accept: ".xml" // Filtra per file XML
|
|
1890
1890
|
, onChange: handleFileChange, style: { display: 'none' } }), SDK_Globals.tmSession?.SessionDescr?.appModuleID === AppModules.SURFER ?
|
|
1891
1891
|
_jsx(TMFloatingMenuBar, { containerRef: diagramRef, defaultPosition: { x: 45, y: 85 }, enableConfigMode: false, fixedItems: [
|
|
1892
1892
|
{ icon: _jsx(IconZoomIn, {}), name: SDKUI_Localizator.ZoomIn, disabled: isAutoZoomEnabled, onClick: () => { handleZoomIn(); }, id: 'zoom-in', isPinned: true },
|
package/lib/helper/TMIcons.d.ts
CHANGED
|
@@ -279,4 +279,5 @@ export declare function IconMoveToFolder(props: React.SVGProps<SVGSVGElement>):
|
|
|
279
279
|
export declare function IconCustom(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
280
280
|
export declare function IconSeparator(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
281
281
|
export declare function IconCache(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
282
|
-
|
|
282
|
+
declare function IconScanner(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
283
|
+
export { Icon123, IconABC, IconAccessPoint, IconAddressBook, IconSignCert, IconServerService, IconActivity, IconActivityLog, IconAdd, IconAddCircleOutline, IconAll, IconApply, IconApplyAndClose, IconArchive, IconArchiveDoc, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconAtSign, IconAttachment, IconAutoConfig, IconBackward, IconBasket, IconBoard, IconBoxArchiveIn, IconBxInfo, IconBxLock, IconCalendar, IconCloseCircle, IconCloseOutline, IconCloud, IconCircleInfo, IconClear, IconColumns, IconCommand, IconCopy, IconCount, IconCrown, IconDashboard, IconDcmtType, IconDcmtTypeOnlyMetadata, IconDcmtTypeSys, IconDelete, IconDetails, IconDown, IconDownload, IconDotsVerticalCircleOutline, IconDuplicate, IconEdit, IconEqual, IconEqualNot, IconEraser, IconExpandRight, IconExport, IconFastBackward, IconFoldeAdd, IconFolderSearch, IconFolderZip, IconFastForward, IconFastSearch, IconFileDots, IconFilter, IconForceStop, IconForward, IconFreeze, IconFreeSearch, IconGreaterThan, IconGreaterThanOrEqual, IconHistory, IconImport, IconTag, IconInfo, IconInsertAbove, IconInsertBelow, IconHeart, IconHide, IconLanguage, IconLeft, IconLessThan, IconLessThanOrEqual, IconLock, IconLockClosed, IconLogin, IconLink, IconLogout, IconMail, IconMapping, IconMic, IconMenuHorizontal, IconMenuKebab, IconMenuVertical, IconMetadata, IconMetadata_Computed, IconMetadata_DataList, IconMetadata_Date, IconMetadata_DynamicDataList, IconMetadata_Numerator, IconMetadata_Numeric, IconMetadata_Special, IconMetadata_Text, IconMetadata_User, IconMonitor, IconOpenInNew, IconNotification, IconPassword, IconPencil, IconPlatform, IconPlay, IconPreview, IconPrinter, IconPrintOutline, IconProcess, IconProgressAbortRequested, IconProgressCompleted, IconProgressNotCompleted, IconProgressReady, IconProgressRunning, IconProgressStarted, IconRefresh, IconReset, IconRecentlyViewed, IconRight, IconSave, IconSearch, IconSelected, IconSettings, IconShow, IconSort, IconStop, IconStopwatch, IconSuccess, IconAlarmPlus, IconHourglass, IconNone, IconNotStarted, IconProgress, IconSuccessCirlce, IconSuitcase, IconSupport, IconUndo, IconUnFreeze, IconUp, IconUpdate, IconUpload, IconUser, IconUserProfile, IconVisible, IconWarning, IconWeb, IconWifi, IconWindowMaximize, IconWindowMinimize, IconWorkflow, IconWorkspace, IconUserGroup, IconUserGroupOutline, IconUserLevelMember, IconUserLevelAdministrator, IconUserLevelSystemAdministrator, IconUserLevelAutonomousAdministrator, IconDraggabledots, IconRelation, IconEasy, IconSum, IconDisk, IconDataList, IconPalette, IconFormatPageSplit, IconPaste, IconFileSearch, IconStar, IconStarRemove, IconSearchCheck, IconLightningFill, IconArrowUnsorted, IconArrowSortedUp, IconArrowSortedDown, IconConvertFilePdf, IconExportTo, IconSharedDcmt, IconShare, IconBatchUpdate, IconCheckFile, IconStatistics, IconSubstFile, IconAdvanced, IconSync, IconSavedQuery, IconSignature, IconSignaturePencil, IconRecursiveOps, IconCheckIn, IconTree, IconGrid, IconList, IconFolder, IconFolderOpen, IconFactory, IconTest, IconCheck, IconUncheck, IconSortAsc, IconSortDesc, IconRoundFileUpload, IconSortAscLetters, IconSortDescLetters, IconRotate, IconSortAscNumbers, IconSortDescNumbers, IconSortAscClock, IconSortDescClock, IconLayerGroup, IconBell, IconBellCheck, IconBellOutline, IconBellCheckOutline, IconEnvelopeOpenText, IconChangeUser, IconUserCheck, IconRelationManyToMany, IconRelationOneToMany, IconUserExpired, IconKey, IconZoomInLinear, IconZoomOutLinear, IconMenuCAWorkingGroups, IconCADossier, IconMenuCACaseflow, IconMenuDashboard, IconMenuCAAreas, IconMenuTask, IconMenuSearch, IconMenuFullTextSearch, IconMenuFavourite, IconSAPLogin, IconSAPLogin2, IconView, IconNewSignature, IconScanner };
|
package/lib/helper/TMIcons.js
CHANGED
|
@@ -697,4 +697,7 @@ export function IconSeparator(props) {
|
|
|
697
697
|
export function IconCache(props) {
|
|
698
698
|
return (_jsx("svg", { fontSize: props.fontSize ?? FONTSIZE, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "1em", height: "1em", ...props, children: _jsxs("g", { fill: "none", children: [" ", _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6 8a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V8zm-2 .17A3.001 3.001 0 0 0 2 11v7a3 3 0 0 0 3 3h10a3.001 3.001 0 0 0 2.83-2H9a5 5 0 0 1-5-5V8.17zM14 3a1 1 0 0 1 1 1v5.586l1.293-1.293a1 1 0 1 1 1.414 1.414l-3 3a1 1 0 0 1-1.414 0l-3-3a1 1 0 1 1 1.414-1.414L13 9.586V4a1 1 0 0 1 1-1z", fill: "currentColor" }), " "] }) }));
|
|
699
699
|
}
|
|
700
|
-
|
|
700
|
+
function IconScanner(props) {
|
|
701
|
+
return (_jsxs("svg", { fontSize: props.fontSize ? props.fontSize : FONTSIZE, viewBox: "0 0 24 24", fill: "currentColor", height: "1em", width: "1em", ...props, children: [_jsx("path", { d: "M4 3.5 L20 3.5 L21 9 L3 9 Z", opacity: "0.5" }), _jsx("rect", { x: "2", y: "10", width: "20", height: "7", rx: "1.5" }), _jsx("rect", { x: "4", y: "11.5", width: "16", height: "4", rx: "0.5", opacity: "0.25", fill: "white" }), _jsx("rect", { x: "4", y: "13", width: "16", height: "0.8", fill: "white", opacity: "0.7" }), _jsx("rect", { x: "4", y: "18", width: "16", height: "1.5", rx: "0.5" }), _jsx("circle", { cx: "5", cy: "9.5", r: "0.7" }), _jsx("circle", { cx: "19", cy: "9.5", r: "0.7" })] }));
|
|
702
|
+
}
|
|
703
|
+
export { Icon123, IconABC, IconAccessPoint, IconAddressBook, IconSignCert, IconServerService, IconActivity, IconActivityLog, IconAdd, IconAddCircleOutline, IconAll, IconApply, IconApplyAndClose, IconArchive, IconArchiveDoc, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconAtSign, IconAttachment, IconAutoConfig, IconBackward, IconBasket, IconBoard, IconBoxArchiveIn, IconBxInfo, IconBxLock, IconCalendar, IconCloseCircle, IconCloseOutline, IconCloud, IconCircleInfo, IconClear, IconColumns, IconCommand, IconCopy, IconCount, IconCrown, IconDashboard, IconDcmtType, IconDcmtTypeOnlyMetadata, IconDcmtTypeSys, IconDelete, IconDetails, IconDown, IconDownload, IconDotsVerticalCircleOutline, IconDuplicate, IconEdit, IconEqual, IconEqualNot, IconEraser, IconExpandRight, IconExport, IconFastBackward, IconFoldeAdd, IconFolderSearch, IconFolderZip, IconFastForward, IconFastSearch, IconFileDots, IconFilter, IconForceStop, IconForward, IconFreeze, IconFreeSearch, IconGreaterThan, IconGreaterThanOrEqual, IconHistory, IconImport, IconTag, IconInfo, IconInsertAbove, IconInsertBelow, IconHeart, IconHide, IconLanguage, IconLeft, IconLessThan, IconLessThanOrEqual, IconLock, IconLockClosed, IconLogin, IconLink, IconLogout, IconMail, IconMapping, IconMic, IconMenuHorizontal, IconMenuKebab, IconMenuVertical, IconMetadata, IconMetadata_Computed, IconMetadata_DataList, IconMetadata_Date, IconMetadata_DynamicDataList, IconMetadata_Numerator, IconMetadata_Numeric, IconMetadata_Special, IconMetadata_Text, IconMetadata_User, IconMonitor, IconOpenInNew, IconNotification, IconPassword, IconPencil, IconPlatform, IconPlay, IconPreview, IconPrinter, IconPrintOutline, IconProcess, IconProgressAbortRequested, IconProgressCompleted, IconProgressNotCompleted, IconProgressReady, IconProgressRunning, IconProgressStarted, IconRefresh, IconReset, IconRecentlyViewed, IconRight, IconSave, IconSearch, IconSelected, IconSettings, IconShow, IconSort, IconStop, IconStopwatch, IconSuccess, IconAlarmPlus, IconHourglass, IconNone, IconNotStarted, IconProgress, IconSuccessCirlce, IconSuitcase, IconSupport, IconUndo, IconUnFreeze, IconUp, IconUpdate, IconUpload, IconUser, IconUserProfile, IconVisible, IconWarning, IconWeb, IconWifi, IconWindowMaximize, IconWindowMinimize, IconWorkflow, IconWorkspace, IconUserGroup, IconUserGroupOutline, IconUserLevelMember, IconUserLevelAdministrator, IconUserLevelSystemAdministrator, IconUserLevelAutonomousAdministrator, IconDraggabledots, IconRelation, IconEasy, IconSum, IconDisk, IconDataList, IconPalette, IconFormatPageSplit, IconPaste, IconFileSearch, IconStar, IconStarRemove, IconSearchCheck, IconLightningFill, IconArrowUnsorted, IconArrowSortedUp, IconArrowSortedDown, IconConvertFilePdf, IconExportTo, IconSharedDcmt, IconShare, IconBatchUpdate, IconCheckFile, IconStatistics, IconSubstFile, IconAdvanced, IconSync, IconSavedQuery, IconSignature, IconSignaturePencil, IconRecursiveOps, IconCheckIn, IconTree, IconGrid, IconList, IconFolder, IconFolderOpen, IconFactory, IconTest, IconCheck, IconUncheck, IconSortAsc, IconSortDesc, IconRoundFileUpload, IconSortAscLetters, IconSortDescLetters, IconRotate, IconSortAscNumbers, IconSortDescNumbers, IconSortAscClock, IconSortDescClock, IconLayerGroup, IconBell, IconBellCheck, IconBellOutline, IconBellCheckOutline, IconEnvelopeOpenText, IconChangeUser, IconUserCheck, IconRelationManyToMany, IconRelationOneToMany, IconUserExpired, IconKey, IconZoomInLinear, IconZoomOutLinear, IconMenuCAWorkingGroups, IconCADossier, IconMenuCACaseflow, IconMenuDashboard, IconMenuCAAreas, IconMenuTask, IconMenuSearch, IconMenuFullTextSearch, IconMenuFavourite, IconSAPLogin, IconSAPLogin2, IconView, IconNewSignature, IconScanner };
|