@topconsultnpm/sdkui-react 6.19.0-test.1 → 6.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/assets/IconsS4t/add.svg +12 -12
- package/lib/assets/IconsS4t/aggiorna.svg +18 -18
- package/lib/assets/IconsS4t/bookmark.svg +42 -42
- package/lib/assets/IconsS4t/cancella.svg +15 -15
- package/lib/assets/IconsS4t/check-box.svg +19 -19
- package/lib/assets/IconsS4t/down-arrow-signBook.svg +40 -40
- package/lib/assets/IconsS4t/down.svg +28 -28
- package/lib/assets/IconsS4t/edit-file.svg +19 -19
- package/lib/assets/IconsS4t/edita.svg +32 -32
- package/lib/assets/IconsS4t/firma.svg +19 -19
- package/lib/assets/IconsS4t/icona_download.svg +16 -16
- package/lib/assets/IconsS4t/info.svg +51 -51
- package/lib/assets/IconsS4t/left.svg +20 -20
- package/lib/assets/IconsS4t/line.svg +40 -40
- package/lib/assets/IconsS4t/more.svg +19 -19
- package/lib/assets/IconsS4t/plus.svg +23 -23
- package/lib/assets/IconsS4t/printer.svg +49 -49
- package/lib/assets/IconsS4t/radio-on-button.svg +25 -25
- package/lib/assets/IconsS4t/rectangle.svg +41 -41
- package/lib/assets/IconsS4t/redo.svg +19 -19
- package/lib/assets/IconsS4t/right-arrow-signBook-finish.svg +40 -40
- package/lib/assets/IconsS4t/right-arrow-signBook.svg +40 -40
- package/lib/assets/IconsS4t/right.svg +22 -22
- package/lib/assets/IconsS4t/searchbar.svg +21 -21
- package/lib/assets/IconsS4t/text-box.svg +36 -36
- package/lib/assets/IconsS4t/tick.svg +8 -8
- package/lib/assets/IconsS4t/trash-white.svg +10 -10
- package/lib/assets/IconsS4t/undo.svg +19 -19
- package/lib/assets/IconsS4t/up.svg +32 -32
- package/lib/assets/IconsS4t/video-streaming.svg +2 -2
- package/lib/assets/IconsS4t/zoom-in.svg +58 -58
- package/lib/assets/IconsS4t/zoom-out.svg +56 -56
- package/lib/assets/icomoon.svg +96 -96
- package/lib/assets/italy.svg +16 -16
- package/lib/assets/six.svg +3 -3
- package/lib/assets/thumbnails/index.ts +39 -39
- package/lib/assets/topmedia-six.svg +65 -65
- package/lib/assets/topmeida-six-bianco.svg +65 -65
- package/lib/components/base/Styled.js +302 -302
- package/lib/components/base/TMAccordion.js +43 -43
- package/lib/components/base/TMAccordionNew.d.ts +28 -0
- package/lib/components/base/TMAccordionNew.js +326 -0
- package/lib/components/base/TMAreaManager.js +23 -23
- package/lib/components/base/TMButton.d.ts +1 -0
- package/lib/components/base/TMButton.js +136 -136
- package/lib/components/base/TMClosableList.js +46 -46
- package/lib/components/base/TMConfirm.js +20 -20
- package/lib/components/base/TMContextMenu.js +4 -4
- package/lib/components/base/TMContextMenuOLD.js +25 -25
- package/lib/components/base/TMCounterBar.js +32 -32
- package/lib/components/base/TMCounterContainer.js +30 -30
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMCustomButton.js +90 -35
- package/lib/components/base/TMDataGridExportForm.d.ts +1 -1
- package/lib/components/base/TMDataGridExportForm.js +9 -3
- package/lib/components/base/TMDropDownMenu.js +24 -24
- package/lib/components/base/TMFileManager.js +12 -3
- package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -0
- package/lib/components/base/TMFileManagerDataGridView.js +12 -3
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +2 -0
- package/lib/components/base/TMFileManagerThumbnailItems.js +12 -2
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +2 -0
- package/lib/components/base/TMFileManagerThumbnailsView.js +2 -2
- package/lib/components/base/TMFileManagerUtils.js +19 -19
- package/lib/components/base/TMFloatingToolbar.js +34 -34
- package/lib/components/base/TMLayout.js +44 -44
- package/lib/components/base/TMList.js +34 -34
- package/lib/components/base/TMModal.d.ts +2 -0
- package/lib/components/base/TMModal.js +79 -34
- package/lib/components/base/TMPanel.js +57 -57
- package/lib/components/base/TMPopUp.js +186 -117
- package/lib/components/base/TMProgressBar.js +20 -20
- package/lib/components/base/TMResizableMenu.js +28 -28
- package/lib/components/base/TMRightSidebar.js +40 -40
- package/lib/components/base/TMSpinner.js +121 -121
- package/lib/components/base/TMTab.js +11 -11
- package/lib/components/base/TMToggleButton.js +36 -36
- package/lib/components/base/TMToolbarCard.js +35 -35
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTooltip.js +1 -1
- package/lib/components/base/TMTreeView.js +16 -16
- package/lib/components/base/TMUserAvatar.js +7 -7
- package/lib/components/base/TMWaitPanel.js +30 -24
- package/lib/components/choosers/TMCultureIDPicker.js +35 -35
- package/lib/components/choosers/TMDataListItemChooser.js +1 -1
- package/lib/components/choosers/TMDataListItemPicker.js +54 -54
- package/lib/components/choosers/TMDcmtTypeChooser.js +2 -2
- package/lib/components/choosers/TMDynDataListItemChooser.js +5 -4
- package/lib/components/choosers/TMMetadataChooser.d.ts +4 -1
- package/lib/components/choosers/TMMetadataChooser.js +31 -8
- package/lib/components/choosers/TMUserChooser.d.ts +4 -0
- package/lib/components/choosers/TMUserChooser.js +21 -5
- package/lib/components/editors/TMCheckBox.js +24 -24
- package/lib/components/editors/TMDateBox.d.ts +1 -1
- package/lib/components/editors/TMDropDown.js +43 -43
- package/lib/components/editors/TMEditorStyled.js +71 -71
- package/lib/components/editors/TMHtmlContentDisplay.js +16 -16
- package/lib/components/editors/TMLocalizedTextBox.js +31 -31
- package/lib/components/editors/TMMetadataValues.js +71 -22
- package/lib/components/editors/TMRadioButton.js +39 -39
- package/lib/components/editors/TMSummary.js +39 -39
- package/lib/components/editors/TMTextArea.d.ts +1 -0
- package/lib/components/editors/TMTextArea.js +56 -22
- package/lib/components/editors/TMTextBox.js +53 -23
- package/lib/components/editors/TMTextExpression.js +36 -28
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.d.ts +30 -0
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.js +482 -0
- package/lib/components/features/assistant/ToppySpeechBubble.d.ts +9 -0
- package/lib/components/features/assistant/ToppySpeechBubble.js +117 -0
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -0
- package/lib/components/features/blog/TMBlogCommentForm.js +21 -9
- package/lib/components/features/documents/TMDcmtBlog.js +1 -1
- package/lib/components/features/documents/TMDcmtForm.d.ts +1 -0
- package/lib/components/features/documents/TMDcmtForm.js +331 -65
- package/lib/components/features/documents/TMDcmtIcon.js +17 -12
- package/lib/components/features/documents/TMDcmtPreview.js +75 -38
- package/lib/components/features/documents/TMFileUploader.js +21 -21
- package/lib/components/features/documents/TMRelationViewer.js +56 -23
- package/lib/components/features/search/TMSavedQuerySelector.js +53 -53
- package/lib/components/features/search/TMSearch.js +2 -2
- package/lib/components/features/search/TMSearchQueryEditor.js +14 -14
- package/lib/components/features/search/TMSearchQueryPanel.js +41 -59
- package/lib/components/features/search/TMSearchResult.js +256 -51
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +8 -0
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.js +134 -0
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +3 -2
- package/lib/components/features/search/TMSearchResultsMenuItems.js +94 -59
- package/lib/components/features/search/TMSignSettingsForm.d.ts +9 -0
- package/lib/components/features/search/TMSignSettingsForm.js +621 -0
- package/lib/components/features/search/TMTreeSelector.js +67 -67
- package/lib/components/features/search/TMViewHistoryDcmtForm.d.ts +18 -0
- package/lib/components/features/search/TMViewHistoryDcmtForm.js +215 -0
- package/lib/components/features/tasks/TMTaskForm.js +42 -36
- package/lib/components/features/tasks/TMTasksAgenda.js +4 -4
- package/lib/components/features/tasks/TMTasksCalendar.js +2 -2
- package/lib/components/features/tasks/TMTasksHeader.js +1 -1
- package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -1
- package/lib/components/features/tasks/TMTasksUtils.js +18 -3
- package/lib/components/features/tasks/TMTasksUtilsView.js +26 -4
- package/lib/components/features/tasks/TMTasksView.js +12 -6
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +9 -9
- package/lib/components/features/workflow/TMWorkflowPopup.js +44 -44
- package/lib/components/features/workflow/diagram/ConnectionComponent.js +29 -29
- package/lib/components/features/workflow/diagram/ConnectionForm.js +10 -10
- package/lib/components/features/workflow/diagram/DiagramItemComponent.js +57 -57
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +40 -35
- package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +12 -12
- package/lib/components/features/workflow/diagram/RecipientList.js +39 -39
- package/lib/components/features/workflow/diagram/WFDiagram.js +317 -285
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.js +4 -4
- package/lib/components/forms/Login/Chooser.js +35 -35
- package/lib/components/forms/Login/Menu.js +22 -22
- package/lib/components/forms/Login/SelectBox.js +46 -46
- package/lib/components/forms/Login/TMLoginForm.js +14 -14
- package/lib/components/forms/Login/TextBox.js +57 -57
- package/lib/components/forms/TMResultDialog.js +8 -2
- package/lib/components/forms/TMSaveForm.js +3 -11
- package/lib/components/grids/TMBlogAttachments.d.ts +0 -14
- package/lib/components/grids/TMBlogAttachments.js +10 -5
- package/lib/components/grids/TMBlogsPost.d.ts +8 -3
- package/lib/components/grids/TMBlogsPost.js +100 -39
- package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
- package/lib/components/grids/TMBlogsPostUtils.js +32 -11
- package/lib/components/grids/TMRecentsManager.js +52 -52
- package/lib/components/grids/TMValidationItemsList.js +48 -48
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +2 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +14 -14
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +0 -1
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +36 -35
- package/lib/components/layout/panelManager/types.d.ts +1 -0
- package/lib/components/pages/TMPage.js +1 -1
- package/lib/components/query/TMQueryEditor.js +17 -17
- package/lib/components/query/TMQuerySummary.d.ts +1 -0
- package/lib/components/query/TMQuerySummary.js +15 -15
- package/lib/components/settings/SettingsAppearance.js +9 -1
- package/lib/components/sidebar/TMCommandsPanel.js +10 -10
- package/lib/components/sidebar/TMHeader.js +307 -307
- package/lib/components/sidebar/TMSidebar.js +24 -24
- package/lib/components/sidebar/TMSidebarItem.js +21 -21
- package/lib/components/viewers/TMDataListItemViewer.d.ts +1 -1
- package/lib/components/viewers/TMMidViewer.d.ts +1 -1
- package/lib/components/viewers/TMTidViewer.d.ts +1 -1
- package/lib/components/wizard/TMStepIndicator.js +102 -102
- package/lib/components/wizard/TMWizard.js +29 -29
- package/lib/helper/GlobalStyles.d.ts +2 -0
- package/lib/helper/GlobalStyles.js +10 -0
- package/lib/helper/Globalization.d.ts +1 -0
- package/lib/helper/Globalization.js +30 -0
- package/lib/helper/SDKUI_Globals.d.ts +9 -0
- package/lib/helper/SDKUI_Globals.js +10 -1
- package/lib/helper/SDKUI_Localizator.d.ts +59 -2
- package/lib/helper/SDKUI_Localizator.js +617 -22
- package/lib/helper/TMCustomSearchBar.js +1 -1
- package/lib/helper/TMIcons.d.ts +6 -1
- package/lib/helper/TMIcons.js +22 -2
- package/lib/helper/TMToppyMessage.d.ts +1 -0
- package/lib/helper/TMToppyMessage.js +33 -32
- package/lib/helper/TMUtils.d.ts +42 -4
- package/lib/helper/TMUtils.js +227 -60
- package/lib/helper/cicoHelper.d.ts +31 -0
- package/lib/helper/cicoHelper.js +155 -0
- package/lib/helper/dcmtsHelper.d.ts +2 -1
- package/lib/helper/dcmtsHelper.js +56 -17
- package/lib/helper/helpers.d.ts +8 -1
- package/lib/helper/helpers.js +43 -21
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/hooks/useDcmtOperations.d.ts +1 -1
- package/lib/hooks/useDcmtOperations.js +10 -6
- package/lib/hooks/useRelatedDocuments.js +35 -26
- package/lib/ts/types.d.ts +3 -1
- package/package.json +54 -54
- package/lib/components/features/assistant/ToppyHelpCenter.d.ts +0 -12
- package/lib/components/features/assistant/ToppyHelpCenter.js +0 -173
|
@@ -210,6 +210,21 @@ export const getTaskAssignedByMe = (tasks) => {
|
|
|
210
210
|
const userID = SDK_Globals.tmSession?.SessionDescr?.userID;
|
|
211
211
|
return tasks.filter((task) => task.toID !== undefined && task.toID !== userID);
|
|
212
212
|
};
|
|
213
|
+
export const getTaskNotCompletedAssignedByMe = (tasks) => {
|
|
214
|
+
const userID = SDK_Globals.tmSession?.SessionDescr?.userID;
|
|
215
|
+
return tasks
|
|
216
|
+
.filter((task) => task.toID !== undefined &&
|
|
217
|
+
task.toID !== userID &&
|
|
218
|
+
task.state !== Task_States.Completed).sort((a, b) => {
|
|
219
|
+
if (!a.endTime && !b.endTime)
|
|
220
|
+
return 0;
|
|
221
|
+
if (!a.endTime)
|
|
222
|
+
return 1;
|
|
223
|
+
if (!b.endTime)
|
|
224
|
+
return -1;
|
|
225
|
+
return a.endTime.getTime() - b.endTime.getTime();
|
|
226
|
+
});
|
|
227
|
+
};
|
|
213
228
|
export const getHeaderStatusFilterConfig = () => ({
|
|
214
229
|
enabled: true,
|
|
215
230
|
dataSource: getStatusLocalizatorValues().map(item => ({
|
|
@@ -298,7 +313,7 @@ export const taskValidatorAsync = async (taskDescriptor) => {
|
|
|
298
313
|
}
|
|
299
314
|
// Validate toID
|
|
300
315
|
if (!taskDescriptor.toID || taskDescriptor.toID <= 0)
|
|
301
|
-
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.
|
|
316
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.AssignedTo_Female, `${SDK_Localizator.RequiredField}`));
|
|
302
317
|
// Validate that startTime is less than or equal to endTime
|
|
303
318
|
if (taskDescriptor.startTime && taskDescriptor.endTime) {
|
|
304
319
|
if (taskDescriptor.startTime > taskDescriptor.endTime) {
|
|
@@ -318,7 +333,7 @@ const getPDGExtended = (pdg) => {
|
|
|
318
333
|
case PdGs.WG:
|
|
319
334
|
return SDKUI_Localizator.WorkGroup;
|
|
320
335
|
case PdGs.CF:
|
|
321
|
-
return SDKUI_Localizator.
|
|
336
|
+
return SDKUI_Localizator.Dossier;
|
|
322
337
|
case PdGs.DT:
|
|
323
338
|
return SDKUI_Localizator.Document;
|
|
324
339
|
case PdGs.WF:
|
|
@@ -426,7 +441,7 @@ export const createTasksMenuItems = (taskDescriptor, showId, setShowId, showSear
|
|
|
426
441
|
operationType: 'multiRow',
|
|
427
442
|
disabled: fromDatagrid ? false : !isTaskDescriptorDefined,
|
|
428
443
|
items: [
|
|
429
|
-
{ icon: '
|
|
444
|
+
{ icon: 'product', text: SDKUI_Localizator.NewFemale, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.NotStarted) },
|
|
430
445
|
{ icon: 'refresh', text: SDKUI_Localizator.InProgress, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.InProgress) },
|
|
431
446
|
{ icon: 'check', text: SDKUI_Localizator.Completed, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.Completed) },
|
|
432
447
|
{ icon: 'taskstop', text: SDKUI_Localizator.Pending, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.Waiting) },
|
|
@@ -7,8 +7,8 @@ import { FormModes } from "../../../ts";
|
|
|
7
7
|
import TMTooltip from "../../base/TMTooltip";
|
|
8
8
|
const taskStateIconClassMap = () => {
|
|
9
9
|
return new Map([
|
|
10
|
-
[Task_States.None, "dx-icon-
|
|
11
|
-
[Task_States.NotStarted, "dx-icon-
|
|
10
|
+
[Task_States.None, "dx-icon-product"],
|
|
11
|
+
[Task_States.NotStarted, "dx-icon-product"],
|
|
12
12
|
[Task_States.InProgress, "dx-icon-refresh"],
|
|
13
13
|
[Task_States.Completed, "dx-icon-check"],
|
|
14
14
|
[Task_States.Waiting, "dx-icon-taskstop"],
|
|
@@ -35,7 +35,28 @@ export const calculateNumberOfDays = (startTime, endTime) => {
|
|
|
35
35
|
};
|
|
36
36
|
export const renderTaskIcons = (taskData) => {
|
|
37
37
|
const { stateLabel, stateTooltipLabel, pdg, ID1Name, endTime, remTime, isNew, numberOfDays } = taskData;
|
|
38
|
-
return (_jsxs(
|
|
38
|
+
return (_jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [_jsx(TMTooltip, { content: stateTooltipLabel, children: _jsx("div", { className: "task-icon", children: taskStateIconMap().get(stateLabel) }) }), (stateLabel !== Task_States.Completed && endTime && taskIsExpiringSoon(endTime, remTime)) &&
|
|
39
|
+
_jsx(TMTooltip, { content: SDKUI_Localizator.Expiring, children: _jsx("i", { className: "dx-icon-warning task-icon" }) }), _jsx(TMTooltip, { content: gotoPDGExtendedLabel(false, pdg ?? PdGs.None, ID1Name), children: _jsx("div", { className: "task-icon", style: {
|
|
40
|
+
marginLeft: pdg === PdGs.CF || pdg === PdGs.WG ? "-4px" : undefined,
|
|
41
|
+
marginRight: pdg === PdGs.CF || pdg === PdGs.WG ? "-4px" : undefined,
|
|
42
|
+
}, children: getPdgsIconMap().get(pdg) }) }), numberOfDays > 1 &&
|
|
43
|
+
_jsx(TMTooltip, { content: SDKUI_Localizator.ActivityOverMultipleDays.replaceParams(numberOfDays), children: _jsx("div", { className: "task-icon", style: {
|
|
44
|
+
display: "inline-flex",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
justifyContent: "center",
|
|
47
|
+
minWidth: "20px",
|
|
48
|
+
height: "20px",
|
|
49
|
+
padding: "0 4px",
|
|
50
|
+
borderRadius: "12px",
|
|
51
|
+
border: "1px solid #0078d4",
|
|
52
|
+
backgroundColor: "rgba(0, 120, 212, 0.08)",
|
|
53
|
+
color: "#0078d4",
|
|
54
|
+
fontSize: "11px",
|
|
55
|
+
fontWeight: 600,
|
|
56
|
+
lineHeight: 1,
|
|
57
|
+
boxSizing: "border-box"
|
|
58
|
+
}, children: numberOfDays > 99 ? "99+" : numberOfDays }) }), isNew &&
|
|
59
|
+
_jsx(TMTooltip, { content: SDKUI_Localizator.NewAssignedActivity, children: _jsx("i", { className: "dx-icon-bell task-icon" }) })] }));
|
|
39
60
|
};
|
|
40
61
|
export const TMActionCalendar = (props) => {
|
|
41
62
|
const { currentTask, openTaskForm, onDeleteCallback } = props;
|
|
@@ -72,7 +93,8 @@ export const priorityLegend = () => _jsx("div", { style: { display: 'flex', alig
|
|
|
72
93
|
export const highlightTaskText = (text, search, taskId) => {
|
|
73
94
|
if (!search)
|
|
74
95
|
return text;
|
|
75
|
-
const
|
|
96
|
+
const escapedSearchText = search.trim().replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
97
|
+
const regex = new RegExp(`(${escapedSearchText})`, 'gi');
|
|
76
98
|
const parts = text.split(regex);
|
|
77
99
|
return parts.map((part, index) => part.toLowerCase() === search.toLowerCase() ? (_jsx("span", { style: { color: "#fff", backgroundColor: '#0f6cbd' }, children: part }, taskId + "-" + index)) : (part));
|
|
78
100
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useState } from "react";
|
|
3
|
-
import { AssignedTab, checkIfNew, createTasksMenuItems, getHeaderPriorityFilterConfig, getHeaderStatusFilterConfig, getMondayOfCurrentWeek, getNewTaskCount, getStatusLocalizatorValue, isTaskAssignedToAnotherUser, TaskView, TEXT_NOT_SELECTED_COLOR } from "./TMTasksUtils";
|
|
3
|
+
import { AssignedTab, checkIfNew, createTasksMenuItems, getHeaderPriorityFilterConfig, getHeaderStatusFilterConfig, getMondayOfCurrentWeek, getNewTaskCount, getStatusLocalizatorValue, isTaskAssignedToAnotherUser, LIGTH_CYAN, LIGTH_RED_ORGANGE, TaskView, TEXT_NOT_SELECTED_COLOR } from "./TMTasksUtils";
|
|
4
4
|
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/
|
|
8
|
+
import ContextMenu from 'devextreme-react/context-menu';
|
|
9
9
|
import { calcResponsiveSizes, getExceptionMessage, SDKUI_Localizator, StyledTabItem, TMCountBadge } from "../../../helper";
|
|
10
10
|
import { useDeviceType } from "../../base/TMDeviceProvider";
|
|
11
11
|
import { FormModes } from "../../../ts";
|
|
@@ -362,11 +362,17 @@ const TMTasksView = (props) => {
|
|
|
362
362
|
const isCompleted = state === Task_States.Completed;
|
|
363
363
|
const isExpired = endTime && endTime < new Date();
|
|
364
364
|
const isNewTask = checkIfNew(fromID, isNew);
|
|
365
|
-
|
|
365
|
+
const priorityColor = cellData.value === Priorities.High ? LIGTH_RED_ORGANGE : LIGTH_CYAN;
|
|
366
|
+
return (_jsx("div", { style: {
|
|
367
|
+
display: 'flex',
|
|
368
|
+
alignItems: 'center',
|
|
369
|
+
borderLeft: `4px solid ${priorityColor}`,
|
|
370
|
+
paddingLeft: '8px',
|
|
366
371
|
color: isCompleted ? '#000' : (isExpired ? 'red' : '#000'),
|
|
367
372
|
textDecoration: isCompleted ? 'line-through' : 'none',
|
|
368
|
-
fontWeight: isNewTask ? 'bold' : 'normal'
|
|
369
|
-
|
|
373
|
+
fontWeight: isNewTask ? 'bold' : 'normal',
|
|
374
|
+
height: '100%'
|
|
375
|
+
}, children: priorityLabel }));
|
|
370
376
|
}, []);
|
|
371
377
|
const cellDatetimeRender = useCallback((cellData) => {
|
|
372
378
|
const data = cellData.data;
|
|
@@ -503,7 +509,7 @@ const TMTasksView = (props) => {
|
|
|
503
509
|
},
|
|
504
510
|
{
|
|
505
511
|
dataField: "toName",
|
|
506
|
-
caption: SDKUI_Localizator.
|
|
512
|
+
caption: SDKUI_Localizator.AssignedTo_Female,
|
|
507
513
|
dataType: 'string',
|
|
508
514
|
cellRender: cellToRender,
|
|
509
515
|
headerCellRender: (e) => _jsx(RenderCustomHeader, { data: e }),
|
|
@@ -419,15 +419,15 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
419
419
|
}, children: SDKUI_Localizator.Cancel })] })] }) });
|
|
420
420
|
};
|
|
421
421
|
export default TMWGsCopyMoveForm;
|
|
422
|
-
const StepSpan = styled.span `
|
|
423
|
-
color: ${({ $isCurrent, $isPast }) => ($isCurrent ? TMColors.primary : $isPast ? '#555' : '#888')};
|
|
424
|
-
font-weight: ${({ $isCurrent }) => ($isCurrent ? 600 : 400)};
|
|
425
|
-
cursor: ${({ $isPast }) => ($isPast ? 'pointer' : 'default')};
|
|
426
|
-
transition: color 0.3s ease;
|
|
427
|
-
&:hover {
|
|
428
|
-
color: ${({ $isPast }) => ($isPast ? '#007bff' : undefined)};
|
|
429
|
-
text-decoration: ${({ $isPast }) => ($isPast ? 'underline' : 'none')};
|
|
430
|
-
}
|
|
422
|
+
const StepSpan = styled.span `
|
|
423
|
+
color: ${({ $isCurrent, $isPast }) => ($isCurrent ? TMColors.primary : $isPast ? '#555' : '#888')};
|
|
424
|
+
font-weight: ${({ $isCurrent }) => ($isCurrent ? 600 : 400)};
|
|
425
|
+
cursor: ${({ $isPast }) => ($isPast ? 'pointer' : 'default')};
|
|
426
|
+
transition: color 0.3s ease;
|
|
427
|
+
&:hover {
|
|
428
|
+
color: ${({ $isPast }) => ($isPast ? '#007bff' : undefined)};
|
|
429
|
+
text-decoration: ${({ $isPast }) => ($isPast ? 'underline' : 'none')};
|
|
430
|
+
}
|
|
431
431
|
`;
|
|
432
432
|
export const TMStepNavigator = (props) => {
|
|
433
433
|
const { steps, currentStep, onStepChange } = props;
|
|
@@ -15,55 +15,55 @@ import TMTextArea from "../../editors/TMTextArea";
|
|
|
15
15
|
import TMDropDown from "../../editors/TMDropDown";
|
|
16
16
|
import TMDateBox from "../../editors/TMDateBox";
|
|
17
17
|
import ShowAlert from "../../base/TMAlert";
|
|
18
|
-
const StyledWorkFlowOperationButtonsContainer = styled.div `
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
gap: 10px;
|
|
22
|
-
flex-direction: column;
|
|
18
|
+
const StyledWorkFlowOperationButtonsContainer = styled.div `
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 10px;
|
|
22
|
+
flex-direction: column;
|
|
23
23
|
`;
|
|
24
24
|
const StyledTextArea = styled.textarea.attrs({
|
|
25
25
|
maxLength: 200
|
|
26
|
-
}) `
|
|
27
|
-
width: 100%;
|
|
28
|
-
height: 100%;
|
|
29
|
-
border: 1px solid ${props => props.$isValid ? '#b4b4b4' : TMColors.error};
|
|
30
|
-
border-radius: 10px;
|
|
31
|
-
padding: 10px;
|
|
32
|
-
&:focus{
|
|
33
|
-
outline: none;
|
|
34
|
-
border-bottom: 4px solid ${props => props.$isValid ? TMColors.primaryColor : TMColors.error};
|
|
35
|
-
}
|
|
26
|
+
}) `
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
border: 1px solid ${props => props.$isValid ? '#b4b4b4' : TMColors.error};
|
|
30
|
+
border-radius: 10px;
|
|
31
|
+
padding: 10px;
|
|
32
|
+
&:focus{
|
|
33
|
+
outline: none;
|
|
34
|
+
border-bottom: 4px solid ${props => props.$isValid ? TMColors.primaryColor : TMColors.error};
|
|
35
|
+
}
|
|
36
36
|
`;
|
|
37
|
-
const CharacterCounter = styled.div `
|
|
38
|
-
text-align: right;
|
|
39
|
-
font-size: 0.8rem;
|
|
40
|
-
color: #6c757d;
|
|
41
|
-
margin-top: 2px;
|
|
37
|
+
const CharacterCounter = styled.div `
|
|
38
|
+
text-align: right;
|
|
39
|
+
font-size: 0.8rem;
|
|
40
|
+
color: #6c757d;
|
|
41
|
+
margin-top: 2px;
|
|
42
42
|
`;
|
|
43
|
-
const StyledModalBodyWrapper = styled.div `
|
|
44
|
-
display: flex;
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
height: 100%;
|
|
43
|
+
const StyledModalBodyWrapper = styled.div `
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
height: 100%;
|
|
47
47
|
`;
|
|
48
|
-
const StyledModalFooter = styled.div `
|
|
49
|
-
padding: 16px 0 12px 0;
|
|
50
|
-
height: 60px;
|
|
51
|
-
display: flex;
|
|
52
|
-
justify-content: center;
|
|
48
|
+
const StyledModalFooter = styled.div `
|
|
49
|
+
padding: 16px 0 12px 0;
|
|
50
|
+
height: 60px;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
53
|
`;
|
|
54
|
-
const StyledModalContentContainer = styled.div `
|
|
55
|
-
width: 100%;
|
|
56
|
-
padding: 10px;
|
|
57
|
-
flex: 1; /* Questo fa sì che prenda tutto lo spazio verticale disponibile */
|
|
58
|
-
overflow-y: auto;
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
gap: 5px;
|
|
54
|
+
const StyledModalContentContainer = styled.div `
|
|
55
|
+
width: 100%;
|
|
56
|
+
padding: 10px;
|
|
57
|
+
flex: 1; /* Questo fa sì che prenda tutto lo spazio verticale disponibile */
|
|
58
|
+
overflow-y: auto;
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
gap: 5px;
|
|
62
62
|
`;
|
|
63
|
-
const StyledHorizontalContainer = styled.div `
|
|
64
|
-
display: flex;
|
|
65
|
-
gap: 10px;
|
|
66
|
-
/* align-items: flex-end; */
|
|
63
|
+
const StyledHorizontalContainer = styled.div `
|
|
64
|
+
display: flex;
|
|
65
|
+
gap: 10px;
|
|
66
|
+
/* align-items: flex-end; */
|
|
67
67
|
`;
|
|
68
68
|
export const WorkFlowOperationButtons = (props) => {
|
|
69
69
|
const { dtd = undefined, deviceType = DeviceType.DESKTOP, approveDisable = false, signApproveDisable = false, rejectDisable = false, reassignDisable = false, infoDisable = false, onApprove, onSignApprove, onReject, onReAssign, onMoreInfo } = props;
|
|
@@ -80,7 +80,7 @@ export const WorkFlowOperationButtons = (props) => {
|
|
|
80
80
|
setIsSignWorkflow(false);
|
|
81
81
|
}
|
|
82
82
|
}, [dtd]);
|
|
83
|
-
return (_jsx(StyledWorkFlowOperationButtonsContainer, { "$isMobile": isMobile, children: isSignWorkflow ? (_jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconSignaturePencil, {}), caption: SDKUI_Localizator.SignatureAndApprove, width: "160px", disabled: signApproveDisable, onClick: () => !signApproveDisable && onSignApprove?.(),
|
|
83
|
+
return (_jsx(StyledWorkFlowOperationButtonsContainer, { "$isMobile": isMobile, children: isSignWorkflow ? (_jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconSignaturePencil, {}), caption: SDKUI_Localizator.SignatureAndApprove, width: "160px", disabled: signApproveDisable, onClick: () => !signApproveDisable && onSignApprove?.(), onMouseDown: e => e.stopPropagation(), advancedColor: "#1a9a49", color: "success" }), _jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconCloseOutline, {}), caption: SDKUI_Localizator.Reject, disabled: rejectDisable, onClick: () => !rejectDisable && onReject?.(), onMouseDown: e => e.stopPropagation(), advancedColor: TMColors.error, color: "error" }), _jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconInfo, { fontSize: 16 }), caption: SDKUI_Localizator.MoreInformation, width: "180px", disabled: infoDisable, onClick: () => !infoDisable && onMoreInfo?.(), onMouseDown: e => e.stopPropagation(), advancedColor: TMColors.info, color: "info" })] })) : (_jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconApply, {}), caption: SDKUI_Localizator.Approve, disabled: approveDisable, onClick: () => !approveDisable && onApprove?.(), advancedColor: "#1a9a49", color: "success" }), _jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconCloseOutline, {}), caption: SDKUI_Localizator.Reject, disabled: rejectDisable, onClick: () => !rejectDisable && onReject?.(), advancedColor: TMColors.error, color: "error" }), _jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconUser, { fontSize: 16 }), caption: SDKUI_Localizator.Reassign, disabled: reassignDisable, onClick: () => !reassignDisable && onReAssign?.(), advancedColor: TMColors.tertiary, color: "tertiary" }), _jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconInfo, { fontSize: 16 }), caption: SDKUI_Localizator.MoreInformation, width: "180px", disabled: infoDisable, onClick: () => !infoDisable && onMoreInfo?.(), advancedColor: TMColors.info, color: "info" })] })) }));
|
|
84
84
|
};
|
|
85
85
|
export const WorkFlowApproveRejectPopUp = ({ TID = 0, DID = 0, deviceType = DeviceType.DESKTOP, isReject, selectedItems = [], onClose, onCompleted }) => {
|
|
86
86
|
const [commentValue, setCommentValue] = useState('');
|
|
@@ -198,7 +198,7 @@ export const WorkFlowMoreInfoPopUp = ({ DID = 0, TID = 0, deviceType = DeviceTyp
|
|
|
198
198
|
}
|
|
199
199
|
// Validate toID
|
|
200
200
|
if (!taskDescriptor.toID || taskDescriptor.toID <= 0)
|
|
201
|
-
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.
|
|
201
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.AssignedTo_Female, `${SDK_Localizator.RequiredField}`));
|
|
202
202
|
return vil;
|
|
203
203
|
};
|
|
204
204
|
const requestMoreInfoAsync = async () => {
|
|
@@ -271,7 +271,7 @@ export const WorkFlowMoreInfoPopUp = ({ DID = 0, TID = 0, deviceType = DeviceTyp
|
|
|
271
271
|
}
|
|
272
272
|
});
|
|
273
273
|
};
|
|
274
|
-
return (_jsx(TMModal, { title: SDKUI_Localizator.MoreInformation, onClose: onClose, width: deviceType === DeviceType.MOBILE ? '95%' : '640px', height: deviceType === DeviceType.MOBILE ? '60%' : '440px', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsx(TMUserChooser, { width: "250px", label: SDKUI_Localizator.RequestTo, dataSource: users, values: task?.toID ? [task.toID] : [], validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.
|
|
274
|
+
return (_jsx(TMModal, { title: SDKUI_Localizator.MoreInformation, onClose: onClose, width: deviceType === DeviceType.MOBILE ? '95%' : '640px', height: deviceType === DeviceType.MOBILE ? '60%' : '440px', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsx(TMUserChooser, { width: "250px", label: SDKUI_Localizator.RequestTo, dataSource: users, values: task?.toID ? [task.toID] : [], validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.AssignedTo_Female), onValueChanged: (IDs) => {
|
|
275
275
|
if (IDs === undefined)
|
|
276
276
|
return;
|
|
277
277
|
setTask({ ...task ?? {}, toID: IDs?.[0] });
|
|
@@ -3,39 +3,39 @@ import React, { useCallback } from 'react';
|
|
|
3
3
|
import { ArrowSymbol } from './interfaces';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
5
|
import { getConnectionColor } from './workflowHelpers';
|
|
6
|
-
const StyledPath = styled.path ` // Aggiungi $isTemporary
|
|
7
|
-
fill: none;
|
|
8
|
-
stroke: ${props => getConnectionColor(props.$outputStatus)};
|
|
9
|
-
stroke-width: ${props => props.$isSelected ? 3 : 1};
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
transition: stroke-width 0.1s ease-in-out;
|
|
12
|
-
pointer-events: stroke;
|
|
13
|
-
|
|
14
|
-
${props => props.$isTemporary && css `
|
|
15
|
-
stroke: #888;
|
|
16
|
-
stroke-dasharray: 5 5;
|
|
17
|
-
opacity: 0.5;
|
|
18
|
-
`}
|
|
6
|
+
const StyledPath = styled.path ` // Aggiungi $isTemporary
|
|
7
|
+
fill: none;
|
|
8
|
+
stroke: ${props => getConnectionColor(props.$outputStatus)};
|
|
9
|
+
stroke-width: ${props => props.$isSelected ? 3 : 1};
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
transition: stroke-width 0.1s ease-in-out;
|
|
12
|
+
pointer-events: stroke;
|
|
13
|
+
|
|
14
|
+
${props => props.$isTemporary && css `
|
|
15
|
+
stroke: #888;
|
|
16
|
+
stroke-dasharray: 5 5;
|
|
17
|
+
opacity: 0.5;
|
|
18
|
+
`}
|
|
19
19
|
`;
|
|
20
20
|
// Path invisibile e più spesso per migliorare l'area di click
|
|
21
|
-
const StyledPathHitArea = styled.path `
|
|
22
|
-
fill: none;
|
|
23
|
-
stroke: transparent;
|
|
24
|
-
stroke-width: 10;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
pointer-events: stroke;
|
|
21
|
+
const StyledPathHitArea = styled.path `
|
|
22
|
+
fill: none;
|
|
23
|
+
stroke: transparent;
|
|
24
|
+
stroke-width: 10;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
pointer-events: stroke;
|
|
27
27
|
`;
|
|
28
|
-
const StyledArrow = styled.path `
|
|
29
|
-
fill: ${props => props.$color};
|
|
30
|
-
stroke: ${props => props.$color};
|
|
31
|
-
stroke-width: 1;
|
|
32
|
-
pointer-events: none;
|
|
28
|
+
const StyledArrow = styled.path `
|
|
29
|
+
fill: ${props => props.$color};
|
|
30
|
+
stroke: ${props => props.$color};
|
|
31
|
+
stroke-width: 1;
|
|
32
|
+
pointer-events: none;
|
|
33
33
|
`;
|
|
34
|
-
const StyledSquareConnector = styled.rect `
|
|
35
|
-
fill: #007bff;
|
|
36
|
-
stroke: #007bff;
|
|
37
|
-
stroke-width: 1;
|
|
38
|
-
pointer-events: all;
|
|
34
|
+
const StyledSquareConnector = styled.rect `
|
|
35
|
+
fill: #007bff;
|
|
36
|
+
stroke: #007bff;
|
|
37
|
+
stroke-width: 1;
|
|
38
|
+
pointer-events: all;
|
|
39
39
|
`;
|
|
40
40
|
const ConnectionComponent = ({ connection, isSelected, sourcePoint, sinkPoint, isTemporary, onClick, onDoubleClick, onConnectionEndpointMouseDown }) => {
|
|
41
41
|
const connectionColor = getConnectionColor(connection.OutputStatus);
|
|
@@ -7,17 +7,17 @@ import TMModal from '../../../base/TMModal';
|
|
|
7
7
|
import { TMColors } from '../../../../utils/theme';
|
|
8
8
|
import { CultureIDs, WorkItemStatus } from '@topconsultnpm/sdk-ts';
|
|
9
9
|
import TMLocalizedTextBox from '../../../editors/TMLocalizedTextBox';
|
|
10
|
-
const FormContainer = styled.div `
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
gap: 5px;
|
|
14
|
-
padding: 10px;
|
|
10
|
+
const FormContainer = styled.div `
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: 5px;
|
|
14
|
+
padding: 10px;
|
|
15
15
|
`;
|
|
16
|
-
const ModalFooter = styled.div `
|
|
17
|
-
display: flex;
|
|
18
|
-
justify-content: flex-end;
|
|
19
|
-
gap: 10px;
|
|
20
|
-
margin-top: 20px;
|
|
16
|
+
const ModalFooter = styled.div `
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: flex-end;
|
|
19
|
+
gap: 10px;
|
|
20
|
+
margin-top: 20px;
|
|
21
21
|
`;
|
|
22
22
|
const WORKITEMSTATUS_DATASOURCE = [
|
|
23
23
|
{ value: WorkItemStatus.New, display: SDKUI_Localizator.WorkItemStatus_New },
|
|
@@ -5,82 +5,82 @@ import styled, { keyframes, css } from 'styled-components';
|
|
|
5
5
|
import DiagramItemSvgContent from './DiagramItemSvgContent';
|
|
6
6
|
import { calculateDiagramItemFullDimensions, FONT_SIZE, MAX_ITEM_WIDTH, MAX_LINES, PADDING_HORIZONTAL, PADDING_TOP, SPACING_SVG_TEXT, SVG_ICON_SIZE, wrapText } from './workflowHelpers';
|
|
7
7
|
import { DataListCacheService } from '@topconsultnpm/sdk-ts';
|
|
8
|
-
const blink = keyframes `
|
|
9
|
-
0%, 100% { opacity: 1; }
|
|
10
|
-
50% { opacity: 0.4; }
|
|
8
|
+
const blink = keyframes `
|
|
9
|
+
0%, 100% { opacity: 1; }
|
|
10
|
+
50% { opacity: 0.4; }
|
|
11
11
|
`;
|
|
12
|
-
const pulseAnimation = keyframes `
|
|
13
|
-
0% {
|
|
14
|
-
transform: scale(1);
|
|
15
|
-
}
|
|
16
|
-
50% {
|
|
17
|
-
transform: scale(1.1);
|
|
18
|
-
}
|
|
19
|
-
100% {
|
|
20
|
-
transform: scale(1);
|
|
21
|
-
}
|
|
12
|
+
const pulseAnimation = keyframes `
|
|
13
|
+
0% {
|
|
14
|
+
transform: scale(1);
|
|
15
|
+
}
|
|
16
|
+
50% {
|
|
17
|
+
transform: scale(1.1);
|
|
18
|
+
}
|
|
19
|
+
100% {
|
|
20
|
+
transform: scale(1);
|
|
21
|
+
}
|
|
22
22
|
`;
|
|
23
|
-
const bounceAnimation = keyframes `
|
|
24
|
-
0%, 20%, 50%, 80%, 100% {
|
|
25
|
-
transform: translateY(0);
|
|
26
|
-
}
|
|
27
|
-
40% {
|
|
28
|
-
transform: translateY(-10px);
|
|
29
|
-
}
|
|
30
|
-
60% {
|
|
31
|
-
transform: translateY(-5px);
|
|
32
|
-
}
|
|
23
|
+
const bounceAnimation = keyframes `
|
|
24
|
+
0%, 20%, 50%, 80%, 100% {
|
|
25
|
+
transform: translateY(0);
|
|
26
|
+
}
|
|
27
|
+
40% {
|
|
28
|
+
transform: translateY(-10px);
|
|
29
|
+
}
|
|
30
|
+
60% {
|
|
31
|
+
transform: translateY(-5px);
|
|
32
|
+
}
|
|
33
33
|
`;
|
|
34
|
-
const AnimatingGroup = styled.g `
|
|
34
|
+
const AnimatingGroup = styled.g `
|
|
35
35
|
${({ $isCurrent }) => $isCurrent &&
|
|
36
|
-
css `
|
|
37
|
-
animation: ${pulseAnimation} 1.5s infinite;
|
|
38
|
-
`}
|
|
36
|
+
css `
|
|
37
|
+
animation: ${pulseAnimation} 1.5s infinite;
|
|
38
|
+
`}
|
|
39
39
|
`;
|
|
40
|
-
const StyledDiagramItem = styled.g `
|
|
41
|
-
cursor: ${props => (props.$isReadOnly ? 'default' : (props.$isDragging ? 'grabbing' : 'grab'))};
|
|
42
|
-
filter: ${props => (props.$isSelected || props.$isDragging || props.$isHovered ? 'drop-shadow(2px 4px 6px rgba(0,0,0,0.4))' : 'none')};
|
|
43
|
-
|
|
44
|
-
& .item-main-shape {
|
|
45
|
-
fill: transparent;
|
|
40
|
+
const StyledDiagramItem = styled.g `
|
|
41
|
+
cursor: ${props => (props.$isReadOnly ? 'default' : (props.$isDragging ? 'grabbing' : 'grab'))};
|
|
42
|
+
filter: ${props => (props.$isSelected || props.$isDragging || props.$isHovered ? 'drop-shadow(2px 4px 6px rgba(0,0,0,0.4))' : 'none')};
|
|
43
|
+
|
|
44
|
+
& .item-main-shape {
|
|
45
|
+
fill: transparent;
|
|
46
46
|
stroke: ${props => {
|
|
47
47
|
if (props.$isDragging)
|
|
48
48
|
return '#ffc107';
|
|
49
49
|
if (props.$isSelected)
|
|
50
50
|
return '#007bff';
|
|
51
51
|
return 'none';
|
|
52
|
-
}};
|
|
52
|
+
}};
|
|
53
53
|
stroke-width: ${props => {
|
|
54
54
|
if (props.$isDragging)
|
|
55
55
|
return 2;
|
|
56
56
|
if (props.$isSelected)
|
|
57
57
|
return 2;
|
|
58
58
|
return 1;
|
|
59
|
-
}};
|
|
60
|
-
transition: stroke 0.2s ease-in-out, stroke-width 0.2s ease-in-out;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
& .item-text {
|
|
64
|
-
font-size: 11px;
|
|
65
|
-
fill: #333;
|
|
66
|
-
text-anchor: middle;
|
|
67
|
-
user-select: none;
|
|
68
|
-
pointer-events: none;
|
|
69
|
-
}
|
|
59
|
+
}};
|
|
60
|
+
transition: stroke 0.2s ease-in-out, stroke-width 0.2s ease-in-out;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& .item-text {
|
|
64
|
+
font-size: 11px;
|
|
65
|
+
fill: #333;
|
|
66
|
+
text-anchor: middle;
|
|
67
|
+
user-select: none;
|
|
68
|
+
pointer-events: none;
|
|
69
|
+
}
|
|
70
70
|
`;
|
|
71
|
-
const Connector = styled.circle `
|
|
72
|
-
fill: transparent;
|
|
73
|
-
stroke: blue;
|
|
74
|
-
stroke-width: 1;
|
|
75
|
-
cursor: ${props => (props.$isReadOnly ? 'default' : 'crosshair')};
|
|
76
|
-
opacity: ${props => (props.$isVisible ? 1 : 0)};
|
|
77
|
-
transition: opacity 0.2s ease-in-out;
|
|
71
|
+
const Connector = styled.circle `
|
|
72
|
+
fill: transparent;
|
|
73
|
+
stroke: blue;
|
|
74
|
+
stroke-width: 1;
|
|
75
|
+
cursor: ${props => (props.$isReadOnly ? 'default' : 'crosshair')};
|
|
76
|
+
opacity: ${props => (props.$isVisible ? 1 : 0)};
|
|
77
|
+
transition: opacity 0.2s ease-in-out;
|
|
78
78
|
`;
|
|
79
|
-
const ConnectorHitArea = styled.circle `
|
|
80
|
-
fill: transparent;
|
|
81
|
-
cursor: ${props => (props.$isReadOnly ? 'default' : 'crosshair')};
|
|
82
|
-
opacity: 0;
|
|
83
|
-
pointer-events: all;
|
|
79
|
+
const ConnectorHitArea = styled.circle `
|
|
80
|
+
fill: transparent;
|
|
81
|
+
cursor: ${props => (props.$isReadOnly ? 'default' : 'crosshair')};
|
|
82
|
+
opacity: 0;
|
|
83
|
+
pointer-events: all;
|
|
84
84
|
`;
|
|
85
85
|
const DiagramItemComponent = ({ wf, item, isSelected, isCurrent, readOnly, onClick, onDrag, onDragEnd, onConnectorMouseDown, onConnectorMouseUp, onDimensionsChange, onDoubleClick, }) => {
|
|
86
86
|
const diagramItemRef = useRef(null);
|