@topconsultnpm/sdkui-react 6.19.0-dev2.3 → 6.19.0-dev2.31

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 (72) hide show
  1. package/lib/components/base/TMCustomButton.js +79 -26
  2. package/lib/components/base/TMDataGridExportForm.d.ts +1 -1
  3. package/lib/components/base/TMDataGridExportForm.js +9 -3
  4. package/lib/components/base/TMFileManager.js +12 -3
  5. package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -0
  6. package/lib/components/base/TMFileManagerDataGridView.js +11 -2
  7. package/lib/components/base/TMFileManagerThumbnailItems.d.ts +2 -0
  8. package/lib/components/base/TMFileManagerThumbnailItems.js +12 -2
  9. package/lib/components/base/TMFileManagerThumbnailsView.d.ts +2 -0
  10. package/lib/components/base/TMFileManagerThumbnailsView.js +2 -2
  11. package/lib/components/base/TMTooltip.d.ts +1 -1
  12. package/lib/components/base/TMTooltip.js +1 -1
  13. package/lib/components/choosers/TMDcmtTypeChooser.js +2 -2
  14. package/lib/components/choosers/TMMetadataChooser.d.ts +4 -1
  15. package/lib/components/choosers/TMMetadataChooser.js +28 -7
  16. package/lib/components/editors/TMDateBox.d.ts +1 -1
  17. package/lib/components/features/documents/TMDcmtForm.js +312 -56
  18. package/lib/components/features/documents/TMRelationViewer.js +56 -23
  19. package/lib/components/features/search/TMSavedQuerySelector.js +1 -1
  20. package/lib/components/features/search/TMSearch.js +2 -2
  21. package/lib/components/features/search/TMSearchQueryEditor.js +1 -1
  22. package/lib/components/features/search/TMSearchQueryPanel.js +8 -25
  23. package/lib/components/features/search/TMSearchResult.js +91 -10
  24. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +2 -1
  25. package/lib/components/features/search/TMSearchResultsMenuItems.js +97 -51
  26. package/lib/components/features/tasks/TMTaskForm.js +10 -4
  27. package/lib/components/features/tasks/TMTasksAgenda.js +4 -4
  28. package/lib/components/features/tasks/TMTasksCalendar.js +2 -2
  29. package/lib/components/features/tasks/TMTasksHeader.js +1 -1
  30. package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -1
  31. package/lib/components/features/tasks/TMTasksUtils.js +18 -3
  32. package/lib/components/features/tasks/TMTasksUtilsView.js +26 -4
  33. package/lib/components/features/tasks/TMTasksView.js +12 -6
  34. package/lib/components/features/workflow/TMWorkflowPopup.js +3 -3
  35. package/lib/components/features/workflow/diagram/DiagramItemForm.js +11 -6
  36. package/lib/components/features/workflow/diagram/RecipientList.js +1 -1
  37. package/lib/components/forms/TMResultDialog.js +8 -2
  38. package/lib/components/grids/TMBlogsPost.d.ts +1 -0
  39. package/lib/components/grids/TMBlogsPost.js +19 -4
  40. package/lib/components/grids/TMBlogsPostUtils.js +5 -3
  41. package/lib/components/grids/TMRecentsManager.js +1 -1
  42. package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
  43. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +2 -2
  44. package/lib/components/layout/panelManager/TMPanelManagerContext.js +0 -1
  45. package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +2 -1
  46. package/lib/components/layout/panelManager/types.d.ts +1 -0
  47. package/lib/components/pages/TMPage.js +1 -1
  48. package/lib/components/query/TMQuerySummary.d.ts +1 -0
  49. package/lib/components/query/TMQuerySummary.js +3 -3
  50. package/lib/components/settings/SettingsAppearance.js +5 -5
  51. package/lib/components/viewers/TMDataListItemViewer.d.ts +1 -1
  52. package/lib/components/viewers/TMMidViewer.d.ts +1 -1
  53. package/lib/components/viewers/TMTidViewer.d.ts +1 -1
  54. package/lib/helper/GlobalStyles.d.ts +2 -0
  55. package/lib/helper/GlobalStyles.js +10 -0
  56. package/lib/helper/Globalization.d.ts +1 -0
  57. package/lib/helper/Globalization.js +30 -0
  58. package/lib/helper/SDKUI_Localizator.d.ts +34 -2
  59. package/lib/helper/SDKUI_Localizator.js +342 -22
  60. package/lib/helper/TMCustomSearchBar.js +1 -1
  61. package/lib/helper/TMIcons.d.ts +2 -1
  62. package/lib/helper/TMIcons.js +4 -1
  63. package/lib/helper/TMUtils.d.ts +1 -4
  64. package/lib/helper/TMUtils.js +18 -23
  65. package/lib/helper/dcmtsHelper.d.ts +2 -1
  66. package/lib/helper/dcmtsHelper.js +19 -13
  67. package/lib/helper/helpers.js +2 -1
  68. package/lib/helper/index.d.ts +1 -0
  69. package/lib/helper/index.js +1 -0
  70. package/lib/hooks/useRelatedDocuments.js +35 -26
  71. package/lib/ts/types.d.ts +1 -1
  72. package/package.json +8 -8
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useEffect, useRef, useState } from 'react';
3
3
  import { ObjectClasses, TaskDescriptor, Priorities, PdGs, SDK_Globals, UserListCacheService, SDK_Localizator, Task_States } from '@topconsultnpm/sdk-ts';
4
4
  import { areDifferentIDs, formatDate, getOriginLabel, getPriorityLocalizatorValue, getPriorityLocalizatorValues, getStatusLocalizatorValues, gotoPDGExtendedLabel, taskValidatorAsync } from './TMTasksUtils';
5
- import ScrollView from 'devextreme-react/cjs/scroll-view';
5
+ import ScrollView from 'devextreme-react/scroll-view';
6
6
  import TMLayoutContainer from '../../base/TMLayout';
7
7
  import { FormModes } from '../../../ts';
8
8
  import { useWorkflowApprove } from '../../../hooks/useWorkflowApprove';
@@ -81,6 +81,11 @@ const TMTaskForm = (props) => {
81
81
  else if (taskContext?.workingGroup) {
82
82
  task.pdG = PdGs.WG;
83
83
  task.iD1 = taskContext.workingGroup.id;
84
+ if (currentTask) {
85
+ task.name = currentTask.name;
86
+ task.toID = 0;
87
+ task.startTime = new Date();
88
+ }
84
89
  }
85
90
  else if (taskContext?.dossier) {
86
91
  task.pdG = PdGs.CF;
@@ -357,6 +362,7 @@ const TMTaskForm = (props) => {
357
362
  }, children: _jsx(TMTooltip, { content: formData.pdG !== PdGs.None ? gotoPDGExtendedLabel(true, formData.pdG, formData.iD1Name) : '', children: _jsxs("span", { onClick: () => formData.pdG !== PdGs.None ? gotoPDGExtendedLabelClickCallback() : null, style: {
358
363
  display: 'inline-flex',
359
364
  alignItems: 'center',
365
+ lineHeight: 1,
360
366
  padding: '6px 10px',
361
367
  borderRadius: 8,
362
368
  backgroundColor: formData.pdG !== PdGs.None ? '#f5f5f7' : 'transparent',
@@ -371,13 +377,13 @@ const TMTaskForm = (props) => {
371
377
  }, onMouseLeave: e => {
372
378
  if (formData.pdG !== PdGs.None)
373
379
  e.currentTarget.style.backgroundColor = '#f5f5f7';
374
- }, children: [getPdgsIconMap().get(formData.pdG), _jsx("span", { children: getOriginLabel(formData.pdG, formData.iD1Name) })] }) }) }) }) })), _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 10 }, children: children }), children: _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.Name, value: formData?.name ?? '', readOnly: fieldsReadOnly.name, autoFocus: true, maxLength: 100, isModifiedWhen: formData?.name !== formDataOrig?.name, onValueChanged: (e) => { setFormData({ ...formData ?? {}, name: e.target.value }); }, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.Name) }) }) }), _jsx("div", { style: { width: '100%' }, children: _jsx(TMTextArea, { label: SDKUI_Localizator.Description, value: formData?.description ?? '', maxLength: 200, readOnly: fieldsReadOnly.description, isModifiedWhen: formData?.description !== formDataOrig?.description, onValueChanged: (e) => { setFormData({ ...formData ?? {}, description: e.target.value }); }, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.Description), resize: false }) }), _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 10 }, children: children }), children: (formMode === FormModes.Create || !areDifferentIDs(formDataOrig?.fromID, SDK_Globals.tmSession?.SessionDescr?.userID)) ?
375
- _jsx("div", { id: "assignedToAnotherUserField", style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMUserChooser, { dataSource: usersList ?? undefined, allowMultipleSelection: false, label: SDKUI_Localizator.AssignedTo, readOnly: fieldsReadOnly.assignedTO, values: formData?.toID ? [formData?.toID] : [], isModifiedWhen: formData?.toID !== formDataOrig?.toID, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.AssignedTo), onValueChanged: (newValue) => {
380
+ }, children: [_jsx("span", { style: { display: 'flex', alignItems: 'center' }, children: getPdgsIconMap().get(formData.pdG) }), _jsx("span", { children: getOriginLabel(formData.pdG, formData.iD1Name) })] }) }) }) }) })), _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 10 }, children: children }), children: _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.Name, value: formData?.name ?? '', readOnly: fieldsReadOnly.name, autoFocus: true, maxLength: 100, isModifiedWhen: formData?.name !== formDataOrig?.name, onValueChanged: (e) => { setFormData({ ...formData ?? {}, name: e.target.value }); }, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.Name) }) }) }), _jsx("div", { style: { width: '100%' }, children: _jsx(TMTextArea, { label: SDKUI_Localizator.Description, value: formData?.description ?? '', maxLength: 200, readOnly: fieldsReadOnly.description, isModifiedWhen: formData?.description !== formDataOrig?.description, onValueChanged: (e) => { setFormData({ ...formData ?? {}, description: e.target.value }); }, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.Description), resize: false }) }), _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 10 }, children: children }), children: (formMode === FormModes.Create || !areDifferentIDs(formDataOrig?.fromID, SDK_Globals.tmSession?.SessionDescr?.userID)) ?
381
+ _jsx("div", { id: "assignedToAnotherUserField", style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMUserChooser, { dataSource: usersList ?? undefined, allowMultipleSelection: false, label: SDKUI_Localizator.AssignedTo_Female, readOnly: fieldsReadOnly.assignedTO, values: formData?.toID ? [formData?.toID] : [], isModifiedWhen: formData?.toID !== formDataOrig?.toID, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.AssignedTo_Female), onValueChanged: (newValue) => {
376
382
  if (newValue === undefined)
377
383
  return;
378
384
  setFormData({ ...formData ?? {}, toID: newValue[0] });
379
385
  } }) })
380
- : formMode === FormModes.Update && _jsxs(_Fragment, { children: [areDifferentIDs(formDataOrig?.fromID, SDK_Globals.tmSession?.SessionDescr?.userID) && _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.AssignedBy, value: formData?.fromName ?? '', readOnly: true }) }), areDifferentIDs(formDataOrig?.toID, SDK_Globals.tmSession?.SessionDescr?.userID) && _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.AssignedTo, value: formData?.toName ?? '', 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%' }, children: _jsx(TMDropDown, { label: SDKUI_Localizator.Status, value: formData?.state, dataSource: getStatusLocalizatorValues(), isModifiedWhen: formData?.state !== formDataOrig?.state, onValueChanged: onStatusValueChange, readOnly: fieldsReadOnly.status }) }), _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: !fieldsReadOnly.priority ? _jsx(TMDropDown, { label: SDKUI_Localizator.Priority, value: formData?.priority, dataSource: getPriorityLocalizatorValues(), isModifiedWhen: formData?.priority !== formDataOrig?.priority, onValueChanged: onPriorityValueChange })
386
+ : formMode === FormModes.Update && _jsxs(_Fragment, { children: [areDifferentIDs(formDataOrig?.fromID, SDK_Globals.tmSession?.SessionDescr?.userID) && _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.AssignedBy, value: formData?.fromName ?? '', readOnly: true }) }), areDifferentIDs(formDataOrig?.toID, SDK_Globals.tmSession?.SessionDescr?.userID) && _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.AssignedTo_Female, value: formData?.toName ?? '', 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%' }, children: _jsx(TMDropDown, { label: SDKUI_Localizator.Status, value: formData?.state, dataSource: getStatusLocalizatorValues(), isModifiedWhen: formData?.state !== formDataOrig?.state, onValueChanged: onStatusValueChange, readOnly: fieldsReadOnly.status }) }), _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: !fieldsReadOnly.priority ? _jsx(TMDropDown, { label: SDKUI_Localizator.Priority, value: formData?.priority, dataSource: getPriorityLocalizatorValues(), isModifiedWhen: formData?.priority !== formDataOrig?.priority, onValueChanged: onPriorityValueChange })
381
387
  : _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) ||
382
388
  (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 ?? "") !== "" &&
383
389
  (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) &&
@@ -1,12 +1,12 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import React, { useCallback, useEffect, useState } from "react";
3
3
  import ArrayStore from "devextreme/data/array_store";
4
- import Scheduler from "devextreme-react/cjs/scheduler";
4
+ import Scheduler from "devextreme-react/scheduler";
5
5
  import { calculateNumberOfDays, highlightTaskText, priorityLegend, renderTaskIcons } from "./TMTasksUtilsView";
6
6
  import { Priorities, Task_States } from "@topconsultnpm/sdk-ts";
7
7
  import { checkIfNew, convertToSchedulerAppointments, findTasksBySearch, formatDate, getPriorityColor, getStatusLocalizatorValue } from "./TMTasksUtils";
8
- import ScrollView from "devextreme-react/cjs/scroll-view";
9
- import LoadIndicator from "devextreme-react/cjs/load-indicator";
8
+ import ScrollView from "devextreme-react/scroll-view";
9
+ import LoadIndicator from "devextreme-react/load-indicator";
10
10
  import { FormModes } from "../../../ts";
11
11
  import { SDKUI_Localizator } from "../../../helper";
12
12
  import TMCustomSearchBar from "../../../helper/TMCustomSearchBar";
@@ -55,7 +55,7 @@ const TMTasksAgenda = React.memo((props) => {
55
55
  let bgColor = 'transparent';
56
56
  if (priority)
57
57
  bgColor = getPriorityColor(priority);
58
- return _jsx("div", { style: { width: "100%", height: "100%", display: 'flex', flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'flex-end', backgroundColor: bgColor }, children: _jsx(ScrollView, { width: "100%", height: "100%", direction: "both", useNative: true, children: _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', width: '100%', fontWeight: isNew ? 'bold' : 'normal' }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-start' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center' }, children: [showId && _jsxs("span", { children: [highlightTaskText(currentTask.id.toString(), searchText, currentTask.id), " - "] }), renderTaskIcons({ stateLabel, stateTooltipLabel, pdg, ID1Name, endTime, remTime, isNew, numberOfDays }), "\u00A0", _jsx("span", { style: { fontWeight: "bold" }, children: highlightTaskText(currentTask.name ?? '', searchText, currentTask.id) })] }), _jsxs("div", { children: [startTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.StartDate, ": ", formatDate(startTime), " - \u00A0"] })), endTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.Expiration, ": ", formatDate(endTime)] }))] })] }), fromCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedBy, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.fromName ?? '', searchText, currentTask.id), (showId && currentTask.fromID) && _jsxs("span", { children: ["(", currentTask.fromID, ")"] })] })] }), toCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedTo, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.toName ?? '', searchText, currentTask.id), (showId && currentTask.toID) && _jsxs("span", { children: ["(", currentTask.toID, ")"] })] })] })] }) }) });
58
+ return _jsx("div", { style: { width: "100%", height: "100%", display: 'flex', flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'flex-end', backgroundColor: bgColor }, children: _jsx(ScrollView, { width: "100%", height: "100%", direction: "both", useNative: true, children: _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', width: '100%', fontWeight: isNew ? 'bold' : 'normal' }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-start' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center' }, children: [showId && _jsxs("span", { children: [highlightTaskText(currentTask.id.toString(), searchText, currentTask.id), " - "] }), renderTaskIcons({ stateLabel, stateTooltipLabel, pdg, ID1Name, endTime, remTime, isNew, numberOfDays }), "\u00A0", _jsx("span", { style: { fontWeight: "bold" }, children: highlightTaskText(currentTask.name ?? '', searchText, currentTask.id) })] }), _jsxs("div", { children: [startTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.StartDate, ": ", formatDate(startTime), " - \u00A0"] })), endTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.Expiration, ": ", formatDate(endTime)] }))] })] }), fromCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedBy, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.fromName ?? '', searchText, currentTask.id), (showId && currentTask.fromID) && _jsxs("span", { children: ["(", currentTask.fromID, ")"] })] })] }), toCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedTo_Female, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.toName ?? '', searchText, currentTask.id), (showId && currentTask.toID) && _jsxs("span", { children: ["(", currentTask.toID, ")"] })] })] })] }) }) });
59
59
  }, [visualizedTasks, searchText]);
60
60
  // handle appointment click handler
61
61
  const handleAppointmentClick = useCallback((e) => {
@@ -5,7 +5,7 @@ import { Priorities, Task_States } from "@topconsultnpm/sdk-ts";
5
5
  import Scheduler, { Resource } from 'devextreme-react/scheduler';
6
6
  import { calculateNumberOfDays, highlightTaskText, priorityLegend, renderTaskIcons, taskStateIconMap, TMActionCalendar } from './TMTasksUtilsView';
7
7
  import { checkIfNew, convertToSchedulerAppointments, findTasksBySearch, formatDate, getPriorityColor, getPriorityLocalizatorValue, getStatusLocalizatorValue, prioritiesResourceData } from './TMTasksUtils';
8
- import LoadIndicator from 'devextreme-react/cjs/load-indicator';
8
+ import LoadIndicator from 'devextreme-react/load-indicator';
9
9
  import { FormModes } from '../../../ts';
10
10
  import { SDKUI_Localizator } from '../../../helper';
11
11
  import TMTooltip from '../../base/TMTooltip';
@@ -144,7 +144,7 @@ const TMTasksCalendar = (props) => {
144
144
  const ID1Name = currentTask.iD1Name || '';
145
145
  const isNew = checkIfNew(currentTask.fromID, currentTask.isNew);
146
146
  const numberOfDays = calculateNumberOfDays(startTime, endTime);
147
- return _jsxs("div", { className: "dx-tooltip-appointment-item", onClick: (e) => { e.preventDefault(); e.stopPropagation(); }, style: { backgroundColor: getPriorityColor(currentTask.priority ?? Priorities.None) }, children: [_jsxs("div", { className: "dx-tooltip-appointment-item-content", style: { width: '70%', cursor: 'auto' }, children: [_jsx("div", { style: { display: "flex" }, children: renderTaskIcons({ stateLabel, stateTooltipLabel, pdg, ID1Name, endTime, remTime, isNew, numberOfDays }) }), _jsxs("div", { className: "dx-tooltip-appointment-item-content-subject", children: [" ", showId && _jsxs("span", { children: [highlightTaskText(appointmentData.id.toString(), searchText, appointmentData.id), " - "] }), " ", highlightTaskText(appointmentData.text ?? '', searchText, currentTask.id)] }), _jsx("div", { className: "dx-tooltip-appointment-item-content-date", children: startTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.StartDate, ": ", formatDate(startTime)] })) }), _jsx("div", { className: "dx-tooltip-appointment-item-content-date", children: endTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.Expiration, ": ", formatDate(endTime)] })) }), _jsxs("div", { className: "dx-tooltip-appointment-item-content-subject", children: [SDKUI_Localizator.Priority, ": ", highlightTaskText(priority, searchText, currentTask.id)] }), _jsxs("div", { className: "dx-tooltip-appointment-item-content-subject", children: [fromCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedBy, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.fromName ?? '', searchText, currentTask.id), (showId && currentTask.fromID) && _jsxs("span", { children: ["(", currentTask.fromID, ")"] })] })] }), toCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedTo, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.toName ?? '', searchText, currentTask.id), (showId && currentTask.toID) && _jsxs("span", { children: ["(", currentTask.toID, ")"] })] })] })] })] }), _jsx(TMActionCalendar, { currentTask: currentTask, openTaskForm: openTaskForm, onDeleteCallback: onDeleteCallback })] });
147
+ return _jsxs("div", { className: "dx-tooltip-appointment-item", onClick: (e) => { e.preventDefault(); e.stopPropagation(); }, style: { backgroundColor: getPriorityColor(currentTask.priority ?? Priorities.None) }, children: [_jsxs("div", { className: "dx-tooltip-appointment-item-content", style: { width: '70%', cursor: 'auto' }, children: [_jsx("div", { style: { display: "flex" }, children: renderTaskIcons({ stateLabel, stateTooltipLabel, pdg, ID1Name, endTime, remTime, isNew, numberOfDays }) }), _jsxs("div", { className: "dx-tooltip-appointment-item-content-subject", children: [" ", showId && _jsxs("span", { children: [highlightTaskText(appointmentData.id.toString(), searchText, appointmentData.id), " - "] }), " ", highlightTaskText(appointmentData.text ?? '', searchText, currentTask.id)] }), _jsx("div", { className: "dx-tooltip-appointment-item-content-date", children: startTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.StartDate, ": ", formatDate(startTime)] })) }), _jsx("div", { className: "dx-tooltip-appointment-item-content-date", children: endTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.Expiration, ": ", formatDate(endTime)] })) }), _jsxs("div", { className: "dx-tooltip-appointment-item-content-subject", children: [SDKUI_Localizator.Priority, ": ", highlightTaskText(priority, searchText, currentTask.id)] }), _jsxs("div", { className: "dx-tooltip-appointment-item-content-subject", children: [fromCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedBy, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.fromName ?? '', searchText, currentTask.id), (showId && currentTask.fromID) && _jsxs("span", { children: ["(", currentTask.fromID, ")"] })] })] }), toCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedTo_Female, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.toName ?? '', searchText, currentTask.id), (showId && currentTask.toID) && _jsxs("span", { children: ["(", currentTask.toID, ")"] })] })] })] })] }), _jsx(TMActionCalendar, { currentTask: currentTask, openTaskForm: openTaskForm, onDeleteCallback: onDeleteCallback })] });
148
148
  };
149
149
  const onCurrentCalendarDateChange = (value) => {
150
150
  // Exit early if it's not a valid Date
@@ -3,7 +3,7 @@ import styled from 'styled-components';
3
3
  import { treeFilterDataSource } from './TMTasksUtilsView';
4
4
  import { FilterCategoryId, TaskView } from './TMTasksUtils';
5
5
  import { useEffect, useRef, useState } from 'react';
6
- import ScrollView from 'devextreme-react/cjs/scroll-view';
6
+ import ScrollView from 'devextreme-react/scroll-view';
7
7
  import TMTooltip from '../../base/TMTooltip';
8
8
  import { SDKUI_Localizator } from '../../../helper';
9
9
  import TMDropDown from '../../editors/TMDropDown';
@@ -1,5 +1,5 @@
1
1
  import { Appointment } from 'devextreme/ui/scheduler';
2
- import { ContextMenuTypes } from 'devextreme-react/cjs/context-menu';
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
5
  import { TMDataGridContextMenuItem } from '../../base/TMDataGrid';
@@ -61,6 +61,7 @@ export declare const getTaskAssignedToMe: (tasks: Array<TaskDescriptor>) => Arra
61
61
  export declare const getTaskNotPersonalAssignedToMe: (tasks: Array<TaskDescriptor>) => Array<TaskDescriptor>;
62
62
  export declare const getTaskPersonalAssignedToMe: (tasks: Array<TaskDescriptor>) => Array<TaskDescriptor>;
63
63
  export declare const getTaskAssignedByMe: (tasks: Array<TaskDescriptor>) => Array<TaskDescriptor>;
64
+ export declare const getTaskNotCompletedAssignedByMe: (tasks: Array<TaskDescriptor>) => Array<TaskDescriptor>;
64
65
  export declare const getHeaderStatusFilterConfig: () => {
65
66
  enabled: boolean;
66
67
  dataSource: {
@@ -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.AssignedTo, `${SDK_Localizator.RequiredField}`));
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.Practice;
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: 'isblank', text: SDKUI_Localizator.NewFemale, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.NotStarted) },
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-isblank"],
11
- [Task_States.NotStarted, "dx-icon-isblank"],
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(_Fragment, { children: [_jsxs(TMTooltip, { content: stateTooltipLabel, children: [" ", _jsx("div", { children: taskStateIconMap().get(stateLabel) })] }), _jsxs(TMTooltip, { content: gotoPDGExtendedLabel(false, pdg ?? PdGs.None, ID1Name), children: [" ", _jsx("div", { children: getPdgsIconMap().get(pdg) })] }), (stateLabel !== Task_States.Completed && endTime && taskIsExpiringSoon(endTime, remTime)) && _jsx(TMTooltip, { content: SDKUI_Localizator.Expiring, children: _jsx("i", { style: { fontSize: "24px" }, className: "dx-icon-warning" }) }), numberOfDays > 1 && _jsx("i", { title: SDKUI_Localizator.ActivityOverMultipleDays.replaceParams(numberOfDays), style: { fontSize: 20 }, className: "dx-icon-unselectall" }), isNew && _jsx(TMTooltip, { content: SDKUI_Localizator.NewAssignedActivity, children: _jsx("i", { style: { fontSize: "24px" }, className: "dx-icon-bell" }) })] }));
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 regex = new RegExp(`(${search})`, 'gi');
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/cjs/context-menu';
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
- return _jsx("div", { style: {
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
- }, children: priorityLabel });
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.AssignedTo,
512
+ caption: SDKUI_Localizator.AssignedTo_Female,
507
513
  dataType: 'string',
508
514
  cellRender: cellToRender,
509
515
  headerCellRender: (e) => _jsx(RenderCustomHeader, { data: e }),
@@ -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?.(), advancedColor: TMColors.success, 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(IconInfo, { fontSize: 16 }), caption: SDKUI_Localizator.MoreInformation, width: "180px", disabled: infoDisable, onClick: () => !infoDisable && onMoreInfo?.(), 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: TMColors.success, 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" })] })) }));
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?.(), 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(IconInfo, { fontSize: 16 }), caption: SDKUI_Localizator.MoreInformation, width: "180px", disabled: infoDisable, onClick: () => !infoDisable && onMoreInfo?.(), 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.AssignedTo, `${SDK_Localizator.RequiredField}`));
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.AssignedTo), onValueChanged: (IDs) => {
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] });
@@ -107,7 +107,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
107
107
  case DiagramItemTypes.Approval:
108
108
  case DiagramItemTypes.DataEntry:
109
109
  width = '700px';
110
- height = '510px';
110
+ height = '530px';
111
111
  break;
112
112
  case DiagramItemTypes.ExecTask:
113
113
  width = '700px';
@@ -130,6 +130,11 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
130
130
  width = '700px';
131
131
  height = '700px';
132
132
  break;
133
+ case DiagramItemTypes.WorkGroup_AddParts:
134
+ case DiagramItemTypes.CaseFlow_AddParts:
135
+ width = '700px';
136
+ height = '530px';
137
+ break;
133
138
  default:
134
139
  width = '50%';
135
140
  height = '50%';
@@ -383,7 +388,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
383
388
  };
384
389
  // Function to render Condition-specific fields
385
390
  const renderConditionFields = () => {
386
- return (_jsx(TMQuerySummary, { qd: localItem.QD, validateSelect: true, validateOrderBy: false, validationItems: validationItems.filter(v => v.PropertyScopes.includes(DiagramItemProps.QD)), onValueChanged: handleQDChange }));
391
+ return (_jsx(TMQuerySummary, { qd: localItem.QD, showDistinct: true, validateSelect: true, validateOrderBy: false, validationItems: validationItems.filter(v => v.PropertyScopes.includes(DiagramItemProps.QD)), onValueChanged: handleQDChange }));
387
392
  };
388
393
  // Function to render Status-specific fields
389
394
  const renderStatusFields = () => {
@@ -404,7 +409,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
404
409
  return qd;
405
410
  };
406
411
  const qdForRecipientsEditor = localItem.QD ?? newQD();
407
- return (_jsxs(_Fragment, { children: [_jsx(TMLocalizedTextBox, { label: SDKUI_Localizator.Description, value: localItem.Description, value_IT: localItem.Description_IT, value_EN: localItem.Description_EN, value_FR: localItem.Description_FR, value_PT: localItem.Description_PT, value_ES: localItem.Description_ES, value_DE: localItem.Description_DE, isModifiedWhen: localItem.Description !== localItemOrig.Description, validationItems: validationItems.filter(v => v.PropertyName === DiagramItemProps.Description), onValueChanged: handleLocalizedDescriptionChange }), _jsx(WorkitemRecipientsEditor, { tos: localItem.Tos ?? '', mTID: wf?.MTID, qd: qdForRecipientsEditor, onTosChange: handleTosChange, onQDChange: handleSetRuleQDChange }), _jsx(TMVilViewer, { vil: validationItems.filter(v => v.PropertyName === DiagramItemProps.Tos) }), _jsxs(FlexContainer, { children: [_jsx(TMDropDown, { label: SDKUI_Localizator.WorkflowRecipientSetRule, elementStyle: { width: '320px' }, dataSource: SET_RULE_DATASOURCE, value: localItem.SetRule, isModifiedWhen: localItem.SetRule !== localItemOrig.SetRule, onValueChanged: (e) => { handleSetRuleChange(e.target.value); } }), _jsx(TMCheckBox, { value: localItem.AllowZeroTos ?? 0, label: SDKUI_Localizator.WorkflowAllowZeroTos, isModifiedWhen: localItem.AllowZeroTos !== localItemOrig.AllowZeroTos, onValueChanged: handleAllowZeroTosChange })] }), localItem.Type === DiagramItemTypes.ExecTask &&
412
+ return (_jsxs(_Fragment, { children: [_jsx(TMLocalizedTextBox, { label: SDKUI_Localizator.Description, value: localItem.Description, value_IT: localItem.Description_IT, value_EN: localItem.Description_EN, value_FR: localItem.Description_FR, value_PT: localItem.Description_PT, value_ES: localItem.Description_ES, value_DE: localItem.Description_DE, isModifiedWhen: localItem.Description !== localItemOrig.Description, validationItems: validationItems.filter(v => v.PropertyName === DiagramItemProps.Description), onValueChanged: handleLocalizedDescriptionChange }), _jsx(TMTextBox, { label: "SetID", value: localItem.ID ?? '', readOnly: true }), _jsx(WorkitemRecipientsEditor, { tos: localItem.Tos ?? '', mTID: wf?.MTID, qd: qdForRecipientsEditor, onTosChange: handleTosChange, onQDChange: handleSetRuleQDChange }), _jsx(TMVilViewer, { vil: validationItems.filter(v => v.PropertyName === DiagramItemProps.Tos) }), _jsxs(FlexContainer, { children: [_jsx(TMDropDown, { label: SDKUI_Localizator.WorkflowRecipientSetRule, elementStyle: { width: '320px' }, dataSource: SET_RULE_DATASOURCE, value: localItem.SetRule, isModifiedWhen: localItem.SetRule !== localItemOrig.SetRule, onValueChanged: (e) => { handleSetRuleChange(e.target.value); } }), _jsx(TMCheckBox, { value: localItem.AllowZeroTos ?? 0, label: SDKUI_Localizator.WorkflowAllowZeroTos, isModifiedWhen: localItem.AllowZeroTos !== localItemOrig.AllowZeroTos, onValueChanged: handleAllowZeroTosChange })] }), localItem.Type === DiagramItemTypes.ExecTask &&
408
413
  _jsxs(BoxContainer, { children: [_jsx(HeaderContainer, { children: _jsx("span", { children: SDKUI_Localizator.Application }) }), renderAppFields()] })] }));
409
414
  };
410
415
  // Function to render UpdateDcmt-specific fields
@@ -562,7 +567,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
562
567
  const newTos = actorsToTos(updatedRecipients);
563
568
  handleTos2Change(newTos);
564
569
  }, [localItem.Tos2, handleTos2Change]);
565
- return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${SDKUI_Localizator.Practice})`, value: localItem.PlatformObjName, valueOrig: localItemOrig.PlatformObjName, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjName ?? '') !== (localItemOrig.PlatformObjName ?? ''), onValueChanged: handlePlatformObjNameChange }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.Description} (${SDKUI_Localizator.Practice})`, value: localItem.PlatformObjDescr, valueOrig: localItemOrig.PlatformObjDescr, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjDescr ?? '') !== (localItemOrig.PlatformObjDescr ?? ''), onValueChanged: handlePlatformObjDescrChange }), _jsx(TMCultureIDPicker, { label: SDKUI_Localizator.Format, selectedValue: localItem.FormatCultureID, isModifiedWhen: localItem.FormatCultureID !== localItemOrig.FormatCultureID, openChooserBySingleClick: true, onSelectCultureID: handleFormatCultureIDChange }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.CommentText} (${SDKUI_Localizator.BlogCase})`, placeHolder: 'Inserisci il valore', rows: 2, value: localItem.Value1asString, valueOrig: localItemOrig.Value1asString, tid: wf?.MTID, isModifiedWhen: (localItem.Value1asString ?? '') !== (localItemOrig.Value1asString ?? ''), onValueChanged: handleValue1asStringChange }), _jsx(TMCheckBox, { value: localItem.Value1asInt ?? 0, label: SDKUI_Localizator.WorkflowAddDraftToWg, isModifiedWhen: localItem.Value1asInt !== localItemOrig.Value1asInt, onValueChanged: handleValue1asIntChange }), _jsx(TMCheckBox, { value: localItem.Value2asInt ?? 0, label: SDKUI_Localizator.WorkflowAddDcmtToWg, isModifiedWhen: localItem.Value2asInt !== localItemOrig.Value2asInt, onValueChanged: handleValue2asIntChange }), _jsx(TMCheckBox, { value: localItem.Trunc ?? 0, label: SDKUI_Localizator.TruncateString, isModifiedWhen: localItem.Trunc !== localItemOrig.Trunc, onValueChanged: handleTruncChange }), _jsxs(RecipientsContainer, { children: [_jsx(RecipientList, { recipients: tosRecipients, title: SDKUI_Localizator.OwnerName, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTosRecipients(newRecipients, 0), onRemove: handleRemoveTosRecipient }), _jsx(RecipientList, { recipients: tos2Recipients, title: SDKUI_Localizator.Participants, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTos2Recipients(newRecipients, 0), onRemove: handleRemoveTos2Recipient })] })] }));
570
+ return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${SDKUI_Localizator.Dossier})`, value: localItem.PlatformObjName, valueOrig: localItemOrig.PlatformObjName, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjName ?? '') !== (localItemOrig.PlatformObjName ?? ''), onValueChanged: handlePlatformObjNameChange }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.Description} (${SDKUI_Localizator.Dossier})`, value: localItem.PlatformObjDescr, valueOrig: localItemOrig.PlatformObjDescr, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjDescr ?? '') !== (localItemOrig.PlatformObjDescr ?? ''), onValueChanged: handlePlatformObjDescrChange }), _jsx(TMCultureIDPicker, { label: SDKUI_Localizator.Format, selectedValue: localItem.FormatCultureID, isModifiedWhen: localItem.FormatCultureID !== localItemOrig.FormatCultureID, openChooserBySingleClick: true, onSelectCultureID: handleFormatCultureIDChange }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.CommentText} (${SDKUI_Localizator.BlogCase})`, placeHolder: 'Inserisci il valore', rows: 2, value: localItem.Value1asString, valueOrig: localItemOrig.Value1asString, tid: wf?.MTID, isModifiedWhen: (localItem.Value1asString ?? '') !== (localItemOrig.Value1asString ?? ''), onValueChanged: handleValue1asStringChange }), _jsx(TMCheckBox, { value: localItem.Value1asInt ?? 0, label: SDKUI_Localizator.WorkflowAddDraftToWg, isModifiedWhen: localItem.Value1asInt !== localItemOrig.Value1asInt, onValueChanged: handleValue1asIntChange }), _jsx(TMCheckBox, { value: localItem.Value2asInt ?? 0, label: SDKUI_Localizator.WorkflowAddDcmtToWg, isModifiedWhen: localItem.Value2asInt !== localItemOrig.Value2asInt, onValueChanged: handleValue2asIntChange }), _jsx(TMCheckBox, { value: localItem.Trunc ?? 0, label: SDKUI_Localizator.TruncateString, isModifiedWhen: localItem.Trunc !== localItemOrig.Trunc, onValueChanged: handleTruncChange }), _jsxs(RecipientsContainer, { children: [_jsx(RecipientList, { recipients: tosRecipients, title: SDKUI_Localizator.OwnerName, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTosRecipients(newRecipients, 0), onRemove: handleRemoveTosRecipient }), _jsx(RecipientList, { recipients: tos2Recipients, title: SDKUI_Localizator.Participants, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTos2Recipients(newRecipients, 0), onRemove: handleRemoveTos2Recipient })] })] }));
566
571
  };
567
572
  const renderCaseFlowCreateFields = () => {
568
573
  const [dossierTypes, setDossierTypes] = useState([]);
@@ -606,7 +611,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
606
611
  const newTos = actorsToTos(updatedRecipients);
607
612
  handleTos2Change(newTos);
608
613
  }, [localItem.Tos2, handleTos2Change]);
609
- return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${SDKUI_Localizator.WorkGroup})`, value: localItem.PlatformObjName, valueOrig: localItemOrig.PlatformObjName, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjName ?? '') !== (localItemOrig.PlatformObjName ?? ''), onValueChanged: handlePlatformObjNameChange }), _jsx(TMDropDown, { dataSource: dossierTypes, label: `${SDKUI_Localizator.Description} (${SDKUI_Localizator.WorkGroup})`, value: localItem.Value3asInt, isModifiedWhen: (localItem.Value3asInt ?? 0) !== (localItemOrig.Value3asInt ?? 0), onValueChanged: (e) => { handleValue3asIntChange(e.target.value); } }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.Description} (${SDKUI_Localizator.WorkGroup})`, value: localItem.PlatformObjDescr, valueOrig: localItemOrig.PlatformObjDescr, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjDescr ?? '') !== (localItemOrig.PlatformObjDescr ?? ''), onValueChanged: handlePlatformObjDescrChange }), _jsx(TMCultureIDPicker, { label: SDKUI_Localizator.Format, selectedValue: localItem.FormatCultureID, isModifiedWhen: localItem.FormatCultureID !== localItemOrig.FormatCultureID, openChooserBySingleClick: true, onSelectCultureID: handleFormatCultureIDChange }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.CommentText} (${SDKUI_Localizator.BlogCase})`, placeHolder: 'Inserisci il valore', rows: 2, value: localItem.Value1asString, valueOrig: localItemOrig.Value1asString, tid: wf?.MTID, isModifiedWhen: (localItem.Value1asString ?? '') !== (localItemOrig.Value1asString ?? ''), onValueChanged: handleValue1asStringChange }), _jsx(TMCheckBox, { value: localItem.Value1asInt ?? 0, label: SDKUI_Localizator.WorkflowAddDraftToWg, isModifiedWhen: localItem.Value1asInt !== localItemOrig.Value1asInt, onValueChanged: handleValue1asIntChange }), _jsx(TMCheckBox, { value: localItem.Value2asInt ?? 0, label: SDKUI_Localizator.WorkflowAddDcmtToWg, isModifiedWhen: localItem.Value2asInt !== localItemOrig.Value2asInt, onValueChanged: handleValue2asIntChange }), _jsx(TMCheckBox, { value: localItem.Trunc ?? 0, label: SDKUI_Localizator.TruncateString, isModifiedWhen: localItem.Trunc !== localItemOrig.Trunc, onValueChanged: handleTruncChange }), _jsxs(RecipientsContainer, { children: [_jsx(RecipientList, { recipients: tosRecipients, title: SDKUI_Localizator.OwnerName, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTosRecipients(newRecipients, 0), onRemove: handleRemoveTosRecipient }), _jsx(RecipientList, { recipients: tos2Recipients, title: SDKUI_Localizator.Participants, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTos2Recipients(newRecipients, 0), onRemove: handleRemoveTos2Recipient })] })] }));
614
+ return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${SDKUI_Localizator.Dossier})`, value: localItem.PlatformObjName, valueOrig: localItemOrig.PlatformObjName, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjName ?? '') !== (localItemOrig.PlatformObjName ?? ''), onValueChanged: handlePlatformObjNameChange }), _jsx(TMDropDown, { dataSource: dossierTypes, label: `${SDKUI_Localizator.Description} (${SDKUI_Localizator.Dossier})`, value: localItem.Value3asInt, isModifiedWhen: (localItem.Value3asInt ?? 0) !== (localItemOrig.Value3asInt ?? 0), onValueChanged: (e) => { handleValue3asIntChange(e.target.value); } }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.Description} (${SDKUI_Localizator.Dossier})`, value: localItem.PlatformObjDescr, valueOrig: localItemOrig.PlatformObjDescr, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjDescr ?? '') !== (localItemOrig.PlatformObjDescr ?? ''), onValueChanged: handlePlatformObjDescrChange }), _jsx(TMCultureIDPicker, { label: SDKUI_Localizator.Format, selectedValue: localItem.FormatCultureID, isModifiedWhen: localItem.FormatCultureID !== localItemOrig.FormatCultureID, openChooserBySingleClick: true, onSelectCultureID: handleFormatCultureIDChange }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.CommentText} (${SDKUI_Localizator.BlogCase})`, placeHolder: 'Inserisci il valore', rows: 2, value: localItem.Value1asString, valueOrig: localItemOrig.Value1asString, tid: wf?.MTID, isModifiedWhen: (localItem.Value1asString ?? '') !== (localItemOrig.Value1asString ?? ''), onValueChanged: handleValue1asStringChange }), _jsx(TMCheckBox, { value: localItem.Value1asInt ?? 0, label: SDKUI_Localizator.WorkflowAddDcmtAsAttachment, isModifiedWhen: localItem.Value1asInt !== localItemOrig.Value1asInt, onValueChanged: handleValue1asIntChange }), _jsx(TMCheckBox, { value: localItem.Value2asInt ?? 0, label: SDKUI_Localizator.WorkflowAddDcmtToDossier, isModifiedWhen: localItem.Value2asInt !== localItemOrig.Value2asInt, onValueChanged: handleValue2asIntChange }), _jsx(TMCheckBox, { value: localItem.Trunc ?? 0, label: SDKUI_Localizator.TruncateString, isModifiedWhen: localItem.Trunc !== localItemOrig.Trunc, onValueChanged: handleTruncChange }), _jsxs(RecipientsContainer, { children: [_jsx(RecipientList, { recipients: tosRecipients, title: SDKUI_Localizator.OwnerName, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTosRecipients(newRecipients, 0), onRemove: handleRemoveTosRecipient }), _jsx(RecipientList, { recipients: tos2Recipients, title: SDKUI_Localizator.Participants, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTos2Recipients(newRecipients, 0), onRemove: handleRemoveTos2Recipient })] })] }));
610
615
  };
611
616
  const renderAddPartsFields = () => {
612
617
  const { andRecipients: tosRecipients } = useMemo(() => {
@@ -624,7 +629,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
624
629
  const newTos = actorsToTos(updatedRecipients);
625
630
  handleTosChange(newTos);
626
631
  }, [localItem.Tos, handleTosChange]);
627
- return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${localItem.Type === DiagramItemTypes.CaseFlow_AddParts ? SDKUI_Localizator.Practice : SDKUI_Localizator.WorkGroup})`, value: localItem.PlatformObjName, valueOrig: localItemOrig.PlatformObjName, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjName ?? '') !== (localItemOrig.PlatformObjName ?? ''), onValueChanged: handlePlatformObjNameChange }), _jsx(TMCultureIDPicker, { label: SDKUI_Localizator.Format, selectedValue: localItem.FormatCultureID, isModifiedWhen: localItem.FormatCultureID !== localItemOrig.FormatCultureID, openChooserBySingleClick: true, onSelectCultureID: handleFormatCultureIDChange }), _jsx(TMCheckBox, { value: localItem.Trunc ?? 0, label: SDKUI_Localizator.TruncateString, isModifiedWhen: localItem.Trunc !== localItemOrig.Trunc, onValueChanged: handleTruncChange }), _jsx(TMRadioButton, { label: SDKUI_Localizator.OperationType, dataSource: [
632
+ return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${localItem.Type === DiagramItemTypes.CaseFlow_AddParts ? SDKUI_Localizator.Dossier : SDKUI_Localizator.WorkGroup})`, value: localItem.PlatformObjName, valueOrig: localItemOrig.PlatformObjName, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjName ?? '') !== (localItemOrig.PlatformObjName ?? ''), onValueChanged: handlePlatformObjNameChange }), _jsx(TMCultureIDPicker, { label: SDKUI_Localizator.Format, selectedValue: localItem.FormatCultureID, isModifiedWhen: localItem.FormatCultureID !== localItemOrig.FormatCultureID, openChooserBySingleClick: true, onSelectCultureID: handleFormatCultureIDChange }), _jsx(TMCheckBox, { value: localItem.Trunc ?? 0, label: SDKUI_Localizator.TruncateString, isModifiedWhen: localItem.Trunc !== localItemOrig.Trunc, onValueChanged: handleTruncChange }), _jsx(TMRadioButton, { label: SDKUI_Localizator.OperationType, dataSource: [
628
633
  { value: 1, display: SDKUI_Localizator.Add },
629
634
  { value: 0, display: SDKUI_Localizator.Remove },
630
635
  ], value: localItem.Value1asInt, isModifiedWhen: localItem.Value1asInt !== localItemOrig.Value1asInt, onValueChanged: handleValue1asIntChange }), _jsx(RecipientList, { recipients: tosRecipients, title: SDKUI_Localizator.OwnerName, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTosRecipients(newRecipients, 0), onRemove: handleRemoveTosRecipient })] }));
@@ -199,6 +199,6 @@ const RecipientList = ({ recipients, title, tid, qd, onAdd, onRemove, onQDChange
199
199
  onRemove(recipient);
200
200
  setUiState(prevState => ({ ...prevState, selectedRecipientIndex: null })); // Resetta la selezione
201
201
  } }), renderActorViewer(recipient)] }, index))) }), uiState.showUserChooser && _jsx(TMUserChooserForm, { allowMultipleSelection: true, allowSorting: true, onClose: () => setUiState(prevState => ({ ...prevState, showUserChooser: false })), onChoose: (IDs) => handleUserChosen(IDs) }), uiState.showGroupChooser && _jsx(TMGroupChooserForm, { allowMultipleSelection: true, allowSorting: true, onClose: () => setUiState(prevState => ({ ...prevState, showGroupChooser: false })), onChoose: (IDs) => handleGroupChosen(IDs) }), uiState.showMetadataChooser && tid && _jsx(TMMetadataChooserForm, { allowMultipleSelection: true, allowSorting: true, tids: [tid], onClose: () => setUiState(prevState => ({ ...prevState, showMetadataChooser: false })), onChoose: (IDs) => handleMetadataChosen(IDs) }), uiState.showQdEditor &&
202
- _jsx(TMModal, { title: SDKUI_Localizator.QueryDefine, onClose: () => setUiState(prevState => ({ ...prevState, showQdEditor: false })), children: _jsx(TMQueryEditor, { inputData: qd, formMode: FormModes.Update, onApplied: handleQdChosen, onClose: () => setUiState(prevState => ({ ...prevState, showQdEditor: false })) }) })] }));
202
+ _jsx(TMModal, { title: SDKUI_Localizator.QueryDefine, onClose: () => setUiState(prevState => ({ ...prevState, showQdEditor: false })), children: _jsx(TMQueryEditor, { inputData: qd, formMode: FormModes.Update, showDistinct: true, onApplied: handleQdChosen, onClose: () => setUiState(prevState => ({ ...prevState, showQdEditor: false })) }) })] }));
203
203
  };
204
204
  export default RecipientList;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ResultTypes } from '@topconsultnpm/sdk-ts';
3
- import DataGrid, { Column, HeaderFilter, Pager, Paging, Scrolling } from 'devextreme-react/cjs/data-grid';
3
+ import DataGrid, { Column, HeaderFilter, Pager, Paging, Scrolling } from 'devextreme-react/data-grid';
4
4
  import ReactDOM from 'react-dom/client';
5
5
  import { IconSuccessCirlce, IconWarning, IconCloseCircle, IconInfo, SDKUI_Globals, SDKUI_Localizator } from '../../helper';
6
6
  import { TMColors } from '../../utils/theme';
@@ -8,6 +8,7 @@ import ShowAlert from '../base/TMAlert';
8
8
  import { TMDeviceProvider } from '../base/TMDeviceProvider';
9
9
  import TMLayoutContainer from '../base/TMLayout';
10
10
  import TMModal from '../base/TMModal';
11
+ import { TMExceptionBoxManager } from '../base/TMPopUp';
11
12
  const cellRender = (cellData) => {
12
13
  const resultType = cellData.data.resultType;
13
14
  switch (resultType) {
@@ -19,7 +20,12 @@ const cellRender = (cellData) => {
19
20
  }
20
21
  };
21
22
  const TMResultDialog = ({ title, result, id1Caption, id2Caption }) => {
22
- return (_jsx(TMModal, { height: '65%', width: '75%', title: `${SDKUI_Localizator.OperationResult} - ${title}`, children: _jsxs(TMLayoutContainer, { children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: '5px', padding: '5px', justifyContent: 'center', alignItems: 'center' }, children: [_jsx("p", { children: `${SDKUI_Localizator.ProcessedItems}: ${result.length}` }), _jsx(IconSuccessCirlce, { fontSize: 22, color: TMColors.success }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.SUCCESS).length ?? 0 }), _jsx(IconWarning, { fontSize: 22, color: TMColors.warning }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.WARNING).length ?? 0 }), _jsx(IconCloseCircle, { fontSize: 22, color: TMColors.error }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.ERROR).length ?? 0 })] }), _jsxs(DataGrid, { dataSource: result.filter(o => o.resultType != ResultTypes.SUCCESS), showColumnLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines) === 1, showRowLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines) === 1, keyExpr: "rowIndex", width: "100%", height: "100%", columnResizingMode: "widget", allowColumnResizing: true, focusedRowEnabled: true, hoverStateEnabled: true, rowAlternationEnabled: true, children: [_jsx(Column, { dataField: 'resultType', caption: '', width: "5%", allowResizing: true, allowSorting: true, cellRender: cellRender }), _jsx(Column, { dataField: 'id1', caption: id1Caption, width: "10%" }), id2Caption && _jsx(Column, { dataField: 'id2', caption: id2Caption, width: "10%" }), _jsx(Column, { dataField: 'description', allowResizing: true, caption: SDKUI_Localizator.Description, allowSorting: true, width: id2Caption ? "75%" : "85%" }), _jsx(HeaderFilter, { visible: true }), _jsx(Paging, { enabled: true, pageSize: 30 }), _jsx(Pager, { visible: true, showInfo: true, showNavigationButtons: true }), _jsx(Scrolling, { mode: 'standard', useNative: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar) === 1 })] })] }) }));
23
+ const handleRowDblClick = (e) => {
24
+ if (e.data && e.data.description) {
25
+ TMExceptionBoxManager.show({ exception: e.data.description });
26
+ }
27
+ };
28
+ return (_jsx(TMModal, { height: '65%', width: '75%', title: `${SDKUI_Localizator.OperationResult} - ${title}`, children: _jsxs(TMLayoutContainer, { children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: '5px', padding: '5px', justifyContent: 'center', alignItems: 'center' }, children: [_jsx("p", { children: `${SDKUI_Localizator.ProcessedItems}: ${result.length}` }), _jsx(IconSuccessCirlce, { fontSize: 22, color: TMColors.success }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.SUCCESS).length ?? 0 }), _jsx(IconWarning, { fontSize: 22, color: TMColors.warning }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.WARNING).length ?? 0 }), _jsx(IconCloseCircle, { fontSize: 22, color: TMColors.error }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.ERROR).length ?? 0 })] }), _jsxs(DataGrid, { dataSource: result.filter(o => o.resultType != ResultTypes.SUCCESS), showColumnLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines) === 1, showRowLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines) === 1, keyExpr: "rowIndex", width: "100%", height: "100%", columnResizingMode: "widget", allowColumnResizing: true, focusedRowEnabled: true, hoverStateEnabled: true, rowAlternationEnabled: true, onRowDblClick: handleRowDblClick, children: [_jsx(Column, { dataField: 'resultType', caption: '', width: "5%", allowResizing: true, allowSorting: true, cellRender: cellRender }), _jsx(Column, { dataField: 'id1', caption: id1Caption, width: "10%" }), id2Caption && _jsx(Column, { dataField: 'id2', caption: id2Caption, width: "10%" }), _jsx(Column, { dataField: 'description', allowResizing: true, caption: SDKUI_Localizator.Description, allowSorting: true, width: id2Caption ? "75%" : "85%" }), _jsx(HeaderFilter, { visible: true }), _jsx(Paging, { enabled: true, pageSize: 30 }), _jsx(Pager, { visible: true, showInfo: true, showNavigationButtons: true }), _jsx(Scrolling, { mode: 'standard', useNative: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar) === 1 })] })] }) }));
23
29
  };
24
30
  export default TMResultDialog;
25
31
  export class TMResultManager {
@@ -74,6 +74,7 @@ interface TMBlogsPostProps {
74
74
  externalBlogPost?: BlogPost;
75
75
  /** Optional function to reset the external blog post */
76
76
  resetExternalBlogPost?: () => void;
77
+ visible?: boolean;
77
78
  allTasks?: Array<TaskDescriptor>;
78
79
  getAllTasks?: () => Promise<void>;
79
80
  deleteTaskByIdsCallback?: (deletedTaskIds: Array<number>) => Promise<void>;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useCallback, useEffect, useRef, useState } from "react";
3
- import { LayoutModes, ResultTypes, SDK_Globals, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
3
+ import { DossierEngine, LayoutModes, ResultTypes, SDK_Globals, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
4
4
  import { ContextMenu } from "devextreme-react";
5
5
  import { SDKUI_Localizator, Globalization, getExceptionMessage, TMConditionalWrapper } from "../../helper";
6
6
  import TMToppyMessage from "../../helper/TMToppyMessage";
@@ -30,7 +30,7 @@ const TMBlogsPost = (props) => {
30
30
  isRestoreEnabled: false,
31
31
  isRefreshEnabled: false,
32
32
  isCreateContextualTask: false,
33
- }, showFloatingCommentButton = false, showCommentFormCallback, showTaskFormCallback, refreshCallback, showId, setShowId, refreshHomePageNews, markBlogAsRead, externalBlogPost, resetExternalBlogPost, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, } = props;
33
+ }, showFloatingCommentButton = false, showCommentFormCallback, showTaskFormCallback, refreshCallback, showId, setShowId, refreshHomePageNews, markBlogAsRead, externalBlogPost, resetExternalBlogPost, visible = true, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, } = props;
34
34
  const { abortController, showWaitPanel, waitPanelTitle, showPrimary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, downloadDcmtsAsync } = useDcmtOperations();
35
35
  const bottomRef = useRef(null);
36
36
  const containerRef = useRef(null);
@@ -222,6 +222,11 @@ const TMBlogsPost = (props) => {
222
222
  if (setShowId)
223
223
  setShowId(localShowId);
224
224
  }, [localShowId]);
225
+ useEffect(() => {
226
+ if (!visible) {
227
+ closeContextMenu();
228
+ }
229
+ }, [visible]);
225
230
  const toggleHeaderClick = () => {
226
231
  setCurrentHeader(prevState => {
227
232
  if (prevState === undefined) {
@@ -320,6 +325,16 @@ const TMBlogsPost = (props) => {
320
325
  result.push({ rowIndex: currentBlog.id, id1: currentBlog.id, id2: currentBlog.id, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
321
326
  });
322
327
  break;
328
+ case 'DS':
329
+ const dossierEngine = new DossierEngine(SDK_Globals.tmSession);
330
+ await dossierEngine.FollowAddOrRemoveAsync(currentBlog.id, true).then(async () => {
331
+ result.push({ rowIndex: currentBlog.id, id1: currentBlog.id, id2: currentBlog.id, description: SDKUI_Localizator.OperationSuccess, resultType: ResultTypes.SUCCESS });
332
+ refreshHomePageNews?.();
333
+ })
334
+ .catch((err) => {
335
+ result.push({ rowIndex: currentBlog.id, id1: currentBlog.id, id2: currentBlog.id, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
336
+ });
337
+ break;
323
338
  default:
324
339
  ShowAlert({ message: 'TODO', mode: 'warning', title: SDKUI_Localizator.Unfollow, duration: 3000 });
325
340
  break;
@@ -500,11 +515,11 @@ const TMBlogsPost = (props) => {
500
515
  beginGroup: true
501
516
  });
502
517
  }
503
- if (targetItem && Boolean(classId && classId === 'WG')) {
518
+ if (targetItem && Boolean(classId && (classId === 'WG' || classId === 'DS'))) {
504
519
  menuItems.push({
505
520
  icon: "eyeclose",
506
521
  text: SDKUI_Localizator.Unfollow,
507
- onClick: () => targetItem && classId && unFollowCallback(targetItem, classId),
522
+ onClick: () => (targetItem && classId) && unFollowCallback(targetItem, classId),
508
523
  });
509
524
  }
510
525
  if (contextMenuParams.isShowHideFilterEnabled) {
@@ -159,18 +159,20 @@ export const getDcmtTypeDescriptor = async (blogPosts) => {
159
159
  export const BlogPostHomeHeader = (header, classId, isSelected, searchText, headerClickCallback) => {
160
160
  const isWorkGroup = classId === 'WG';
161
161
  const iconColor = isSelected ? '#ffffff' : isWorkGroup ? '#009700' : '#e65b00';
162
- return (_jsxs("div", { onClick: headerClickCallback, style: {
162
+ return (_jsxs("div", { style: {
163
163
  display: "flex",
164
164
  alignItems: "center",
165
165
  cursor: "pointer",
166
166
  fontWeight: "bold",
167
167
  color: isSelected ? "#fff" : TMColors.primary,
168
168
  gap: "4px",
169
- }, children: [_jsx(TMTooltip, { content: isWorkGroup ? SDKUI_Localizator.WorkGroup : SDKUI_Localizator.Practice, children: isWorkGroup ? (_jsx(IconMenuCAWorkingGroups, { color: iconColor, fontSize: 28 })) : (_jsx(IconCADossier, { color: iconColor, fontSize: 28 })) }), _jsx("div", { style: {
169
+ }, children: [_jsx(TMTooltip, { content: isWorkGroup ? SDKUI_Localizator.WorkGroup : SDKUI_Localizator.Dossier, children: isWorkGroup ? (_jsx(IconMenuCAWorkingGroups, { color: iconColor, fontSize: 28, onClick: headerClickCallback })) : (_jsx(IconCADossier, { color: iconColor, fontSize: 28, onClick: headerClickCallback })) }), _jsx("div", { onClick: headerClickCallback, style: {
170
170
  whiteSpace: "nowrap",
171
171
  overflow: "hidden",
172
172
  textOverflow: "ellipsis",
173
- flex: 1,
173
+ display: "inline-block",
174
+ cursor: "pointer",
175
+ maxWidth: "100%",
174
176
  }, children: highlightText(header ?? "", searchText, isSelected) })] }));
175
177
  };
176
178
  export const isHeaderFullyHidden = (header) => {
@@ -3,7 +3,7 @@ import styled from 'styled-components';
3
3
  import { useCallback, useEffect, useState } from 'react';
4
4
  import ReactDOMServer from 'react-dom/server';
5
5
  import { DcmtTypeListCacheService } from '@topconsultnpm/sdk-ts';
6
- import ContextMenu from 'devextreme-react/cjs/context-menu';
6
+ import ContextMenu from 'devextreme-react/context-menu';
7
7
  import { IconDelete, SDKUI_Localizator, IconApply, IconInfo, IconCloseOutline } from '../../helper';
8
8
  import { TMColors } from '../../utils/theme';
9
9
  import { DeviceType } from '../base/TMDeviceProvider';