@topconsultnpm/sdkui-react 6.20.0-dev1.50 → 6.20.0-dev1.52

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.
@@ -1,5 +1,6 @@
1
- import { DcmtTypeDescriptor } from '@topconsultnpm/sdk-ts';
1
+ import { DcmtTypeDescriptor, WFDescriptor } from '@topconsultnpm/sdk-ts';
2
2
  import { DeviceType } from "../../base/TMDeviceProvider";
3
+ import { WorkItemDetail } from "../../../ts";
3
4
  interface IWorkflowOperationButtonsProps {
4
5
  dtd: DcmtTypeDescriptor | undefined;
5
6
  approveDisable?: boolean;
@@ -24,13 +25,42 @@ export declare const WorkFlowApproveRejectPopUp: ({ TID, DID, deviceType, isReje
24
25
  onClose?: () => void;
25
26
  onCompleted?: () => Promise<void>;
26
27
  }) => import("react/jsx-runtime").JSX.Element;
27
- export declare const WorkFlowReAssignPopUp: ({ DID, TID, deviceType, onClose, selectedItems, onCompleted }: {
28
+ export declare const WorkFlowReAssignPopUp: ({ DID, TID, deviceType, onClose, selectedItems, onCompleted, wf }: {
28
29
  TID?: number;
29
30
  DID?: number;
30
31
  deviceType?: DeviceType;
31
32
  onClose?: () => void;
32
33
  selectedItems?: any[];
33
34
  onCompleted?: () => Promise<void>;
35
+ wf?: WFDescriptor;
36
+ }) => import("react/jsx-runtime").JSX.Element;
37
+ /**
38
+ * Modal per forzare l'approvazione di un work item
39
+ */
40
+ export declare const WorkflowForceApproveModal: ({ detail, onClose, onCompleted }: {
41
+ detail: WorkItemDetail;
42
+ onClose?: () => void;
43
+ onCompleted?: () => Promise<void>;
44
+ }) => import("react/jsx-runtime").JSX.Element;
45
+ /**
46
+ * Modal per forzare il rifiuto di un work item
47
+ */
48
+ export declare const WorkflowForceRejectModal: ({ detail, onClose, onCompleted }: {
49
+ detail: WorkItemDetail;
50
+ onClose?: () => void;
51
+ onCompleted?: () => Promise<void>;
52
+ }) => import("react/jsx-runtime").JSX.Element;
53
+ /**
54
+ * Modal per terminare le istanze workflow selezionate
55
+ */
56
+ export declare const WorkflowEndInstanceModal: ({ selectedInstances, onClose, onCompleted }: {
57
+ selectedInstances: Array<{
58
+ wfid?: number;
59
+ tid?: number;
60
+ did?: number;
61
+ }>;
62
+ onClose?: () => void;
63
+ onCompleted?: () => Promise<void>;
34
64
  }) => import("react/jsx-runtime").JSX.Element;
35
65
  export declare const WorkFlowMoreInfoPopUp: ({ DID, TID, deviceType, onClose, onCompleted }: {
36
66
  TID?: number;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from "react";
3
- import { Priorities, ResultTypes, SDK_Globals, SDK_Localizator, TaskEngine, UserListCacheService, ValidationItem, WorkflowCacheService } from '@topconsultnpm/sdk-ts';
3
+ import { Priorities, ResultTypes, SDK_Globals, SDK_Localizator, TaskEngine, UserListCacheService, ValidationItem, WFEvents, WorkflowCacheService } from '@topconsultnpm/sdk-ts';
4
4
  import styled from "styled-components";
5
- import { SDKUI_Localizator, IconApply, IconCloseOutline, IconUser, IconInfo, DateDisplayTypes, TASK_MORE_INFO_PREFIX_NAME, IconSignaturePencil, isSign4TopEnabled } from "../../../helper";
5
+ import { SDKUI_Localizator, IconApply, IconCloseOutline, IconUser, IconInfo, DateDisplayTypes, TASK_MORE_INFO_PREFIX_NAME, IconSignaturePencil, isSign4TopEnabled, IconCheck, IconCloseCircle, IconStop } from "../../../helper";
6
6
  import { TMColors } from "../../../utils/theme";
7
7
  import TMButton from "../../base/TMButton";
8
8
  import { DeviceType } from "../../base/TMDeviceProvider";
@@ -21,17 +21,15 @@ const StyledWorkFlowOperationButtonsContainer = styled.div `
21
21
  gap: 10px;
22
22
  flex-direction: column;
23
23
  `;
24
- const StyledTextArea = styled.textarea.attrs({
25
- maxLength: 200
26
- }) `
24
+ const StyledTextArea = styled.textarea `
27
25
  width: 100%;
28
26
  height: 100%;
29
- border: 1px solid ${props => props.$isValid ? '#b4b4b4' : TMColors.error};
27
+ border: 1px solid ${(props) => (props.$isValid ? '#b4b4b4' : TMColors.error)};
30
28
  border-radius: 10px;
31
29
  padding: 10px;
32
- &:focus{
30
+ &:focus {
33
31
  outline: none;
34
- border-bottom: 4px solid ${props => props.$isValid ? TMColors.primaryColor : TMColors.error};
32
+ border-bottom: 4px solid ${(props) => (props.$isValid ? TMColors.primaryColor : TMColors.error)};
35
33
  }
36
34
  `;
37
35
  const CharacterCounter = styled.div `
@@ -111,11 +109,11 @@ export const WorkFlowApproveRejectPopUp = ({ TID = 0, DID = 0, deviceType = Devi
111
109
  const workflowAction = isReject === 0 ? SDKUI_Localizator.Approve : SDKUI_Localizator.Reject;
112
110
  const itemCount = selectedItems.length > 0 ? `(${selectedItems.length} workitem)` : '';
113
111
  const title = `${workflowAction} ${itemCount}`;
114
- return (_jsx(TMModal, { title: title, onClose: onClose, width: '600px', height: '270px', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsxs("p", { style: { color: (isReject === 1 && disable) ? TMColors.error : 'black' }, children: [SDKUI_Localizator.CommentText, " ", isReject === 1 && disable && _jsx("span", { children: ` (${SDKUI_Localizator.RequiredField})` }), " "] }), _jsx(StyledTextArea, { "$isValid": isReject === 0 ? true : !disable, value: commentValue, onChange: (e) => setCommentValue(e.target.value) }), _jsx(CharacterCounter, { children: `${200 - commentValue.length} ${SDKUI_Localizator.CharactersRemaining}` })] }), _jsx(StyledModalFooter, { children: isReject === 0
112
+ return (_jsx(TMModal, { title: title, onClose: onClose, width: '600px', height: '270px', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsxs("p", { style: { color: (isReject === 1 && disable) ? TMColors.error : 'black' }, children: [SDKUI_Localizator.CommentText, " ", isReject === 1 && disable && _jsx("span", { children: ` (${SDKUI_Localizator.RequiredField})` }), " "] }), _jsx(StyledTextArea, { maxLength: 200, "$isValid": isReject === 0 ? true : !disable, value: commentValue, onChange: (e) => setCommentValue(e.target.value) }), _jsx(CharacterCounter, { children: `${200 - commentValue.length} ${SDKUI_Localizator.CharactersRemaining}` })] }), _jsx(StyledModalFooter, { children: isReject === 0
115
113
  ? _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconApply, {}), caption: SDKUI_Localizator.Approve, disabled: false, onClick: () => completeOrRejectAsync(isReject), advancedColor: TMColors.success })
116
114
  : _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconCloseOutline, {}), caption: SDKUI_Localizator.Reject, disabled: disable, onClick: () => { !disable && completeOrRejectAsync(isReject); }, advancedColor: TMColors.error }) })] }) }));
117
115
  };
118
- export const WorkFlowReAssignPopUp = ({ DID = 0, TID = 0, deviceType = DeviceType.DESKTOP, onClose, selectedItems = [], onCompleted }) => {
116
+ export const WorkFlowReAssignPopUp = ({ DID = 0, TID = 0, deviceType = DeviceType.DESKTOP, onClose, selectedItems = [], onCompleted, wf }) => {
119
117
  const [commentValue, setCommentValue] = useState('');
120
118
  const [selectedUserID, setSelectedUserID] = useState([]);
121
119
  const [participants, setParticipants] = useState([]);
@@ -153,11 +151,11 @@ export const WorkFlowReAssignPopUp = ({ DID = 0, TID = 0, deviceType = DeviceTyp
153
151
  if (!tidToUse)
154
152
  return;
155
153
  // Recupera info workflow
156
- const wf = await WorkflowCacheService.GetWFInfoAsync(tidToUse);
154
+ const workflowInfo = wf ?? await WorkflowCacheService.GetWFInfoAsync(tidToUse);
157
155
  // Recupera tutti gli utenti
158
156
  const allUsers = await UserListCacheService.GetAllAsync();
159
157
  // Filtra utenti partecipanti
160
- const participantIds = wf?.participants?.map(p => p.userID);
158
+ const participantIds = workflowInfo?.participants?.map(p => p.userID);
161
159
  const participantUsers = allUsers.filter(u => participantIds?.includes(u.id) && u.id !== SDK_Globals.tmSession?.SessionDescr?.userID);
162
160
  if (isMounted)
163
161
  setParticipants(participantUsers);
@@ -171,10 +169,110 @@ export const WorkFlowReAssignPopUp = ({ DID = 0, TID = 0, deviceType = DeviceTyp
171
169
  };
172
170
  fetchData();
173
171
  return () => { isMounted = false; };
174
- }, [tidToUse]);
172
+ }, [tidToUse, wf]);
175
173
  return (_jsx(TMModal, { onClose: onClose, width: '600px', height: '270px', isModal: true, title: SDKUI_Localizator.Reassign + (selectedItems.length > 0 ? ' (' + selectedItems.length + ' workitem)' : ''), children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsx(TMUserChooser, { dataSource: participants, values: selectedUserID, onValueChanged: (IDs) => {
176
174
  setSelectedUserID(IDs ?? []);
177
- } }), _jsxs("p", { style: { color: commentValue.length === 0 ? TMColors.error : 'black' }, children: [SDKUI_Localizator.CommentText, " ", commentValue.length === 0 && _jsx("span", { children: ` (${SDKUI_Localizator.RequiredField})` }), " "] }), _jsx(StyledTextArea, { "$isValid": commentValue.length !== 0, value: commentValue, onChange: (e) => setCommentValue(e.target.value) }), _jsx(CharacterCounter, { children: `${200 - commentValue.length} ${SDKUI_Localizator.CharactersRemaining}` })] }), _jsx(StyledModalFooter, { children: _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconUser, { fontSize: 16 }), caption: SDKUI_Localizator.Reassign, disabled: disable, onClick: () => !disable && reAssignWorkFlowAsync(), advancedColor: TMColors.tertiary }) })] }) }));
175
+ } }), _jsxs("p", { style: { color: commentValue.length === 0 ? TMColors.error : 'black' }, children: [SDKUI_Localizator.CommentText, " ", commentValue.length === 0 && _jsx("span", { children: ` (${SDKUI_Localizator.RequiredField})` }), " "] }), _jsx(StyledTextArea, { maxLength: 200, "$isValid": commentValue.length !== 0, value: commentValue, onChange: (e) => setCommentValue(e.target.value) }), _jsx(CharacterCounter, { children: `${200 - commentValue.length} ${SDKUI_Localizator.CharactersRemaining}` })] }), _jsx(StyledModalFooter, { children: _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconUser, { fontSize: 16 }), caption: SDKUI_Localizator.Reassign, disabled: disable, onClick: () => !disable && reAssignWorkFlowAsync(), advancedColor: TMColors.tertiary }) })] }) }));
176
+ };
177
+ /**
178
+ * Modal per forzare l'approvazione di un work item
179
+ */
180
+ export const WorkflowForceApproveModal = ({ detail, onClose, onCompleted }) => {
181
+ const [commentValue, setCommentValue] = useState('');
182
+ const disable = commentValue.length === 0;
183
+ const forceApproveAsync = async () => {
184
+ try {
185
+ TMSpinner.show({ description: 'Forza approvazione in corso...' });
186
+ await SDK_Globals.tmSession?.NewWorkflowEngine().WFCtrl_ForceWIAsync(detail.tid, detail.did, WFEvents.AfterBtnApprove01, commentValue);
187
+ ShowAlert({
188
+ mode: 'success',
189
+ position: 'TOP_RIGHT',
190
+ title: 'Forza completamento',
191
+ message: 'Work item approvato con successo',
192
+ duration: 3000
193
+ });
194
+ await onCompleted?.();
195
+ }
196
+ catch (e) {
197
+ TMExceptionBoxManager.show({ exception: e });
198
+ }
199
+ finally {
200
+ onClose?.();
201
+ TMSpinner.hide();
202
+ }
203
+ };
204
+ const userName = detail.toUser?.name ?? detail.to;
205
+ const title = `Forza completamento - ${userName}`;
206
+ return (_jsx(TMModal, { title: title, onClose: onClose, width: '600px', height: '270px', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsx("div", { style: { fontWeight: 600, marginBottom: '8px' }, children: "Motivazione (obbligatorio):" }), _jsx(StyledTextArea, { "$isValid": !disable, value: commentValue, onChange: (e) => setCommentValue(e.target.value), placeholder: "Inserisci il motivo della forzatura...", maxLength: 200 }), _jsxs(CharacterCounter, { children: [commentValue.length, "/200"] })] }), _jsx(StyledModalFooter, { children: _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconCheck, {}), caption: "Forza approvazione", width: '180px', disabled: disable, onClick: () => !disable && forceApproveAsync(), advancedColor: TMColors.success }) })] }) }));
207
+ };
208
+ /**
209
+ * Modal per forzare il rifiuto di un work item
210
+ */
211
+ export const WorkflowForceRejectModal = ({ detail, onClose, onCompleted }) => {
212
+ const [commentValue, setCommentValue] = useState('');
213
+ const disable = commentValue.length === 0;
214
+ const forceRejectAsync = async () => {
215
+ try {
216
+ TMSpinner.show({ description: 'Forza rifiuto in corso...' });
217
+ await SDK_Globals.tmSession?.NewWorkflowEngine().WFCtrl_ForceWIAsync(detail.tid, detail.did, WFEvents.AfterBtnReject01, commentValue);
218
+ ShowAlert({
219
+ mode: 'success',
220
+ position: 'TOP_RIGHT',
221
+ title: 'Forza rifiuto',
222
+ message: 'Work item rifiutato con successo',
223
+ duration: 3000
224
+ });
225
+ await onCompleted?.();
226
+ }
227
+ catch (e) {
228
+ TMExceptionBoxManager.show({ exception: e });
229
+ }
230
+ finally {
231
+ onClose?.();
232
+ TMSpinner.hide();
233
+ }
234
+ };
235
+ const userName = detail.toUser?.name ?? detail.to;
236
+ const title = `Forza rifiuto - ${userName}`;
237
+ return (_jsx(TMModal, { title: title, onClose: onClose, width: '600px', height: '270px', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsx("div", { style: { fontWeight: 600, marginBottom: '8px' }, children: "Motivazione (obbligatorio):" }), _jsx(StyledTextArea, { "$isValid": !disable, value: commentValue, onChange: (e) => setCommentValue(e.target.value), placeholder: "Inserisci il motivo del rifiuto...", maxLength: 200 }), _jsxs(CharacterCounter, { children: [commentValue.length, "/200"] })] }), _jsx(StyledModalFooter, { children: _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconCloseCircle, {}), caption: "Forza rifiuto", width: '150px', disabled: disable, onClick: () => !disable && forceRejectAsync(), advancedColor: TMColors.error }) })] }) }));
238
+ };
239
+ /**
240
+ * Modal per terminare le istanze workflow selezionate
241
+ */
242
+ export const WorkflowEndInstanceModal = ({ selectedInstances, onClose, onCompleted }) => {
243
+ const [commentValue, setCommentValue] = useState('');
244
+ const disable = commentValue.length === 0;
245
+ const endInstancesAsync = async () => {
246
+ try {
247
+ TMSpinner.show({ description: 'Terminazione istanze in corso...' });
248
+ const workflowEngine = SDK_Globals.tmSession?.NewWorkflowEngine();
249
+ if (!workflowEngine)
250
+ throw new Error("Workflow engine non disponibile");
251
+ for (const instance of selectedInstances) {
252
+ if (instance.wfid && instance.did) {
253
+ await workflowEngine.WFCtrl_EndInstanceAsync(instance.wfid, instance.tid ?? 0, instance.did, commentValue);
254
+ }
255
+ }
256
+ ShowAlert({
257
+ mode: 'success',
258
+ position: 'TOP_RIGHT',
259
+ title: 'Terminazione istanze',
260
+ message: `${selectedInstances.length} ${selectedInstances.length === 1 ? 'istanza terminata' : 'istanze terminate'} con successo`,
261
+ duration: 3000
262
+ });
263
+ await onCompleted?.();
264
+ }
265
+ catch (e) {
266
+ TMExceptionBoxManager.show({ exception: e });
267
+ }
268
+ finally {
269
+ onClose?.();
270
+ TMSpinner.hide();
271
+ }
272
+ };
273
+ const itemCount = selectedInstances.length > 0 ? `(${selectedInstances.length} ${selectedInstances.length === 1 ? 'istanza' : 'istanze'})` : '';
274
+ const title = `Termina istanza ${itemCount}`;
275
+ return (_jsx(TMModal, { title: title, onClose: onClose, width: '600px', height: '270px', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsx("div", { style: { fontWeight: 600, marginBottom: '8px' }, children: "Motivazione (obbligatorio):" }), _jsx(StyledTextArea, { "$isValid": !disable, value: commentValue, onChange: (e) => setCommentValue(e.target.value), placeholder: "Inserisci il motivo della terminazione...", maxLength: 200 }), _jsxs(CharacterCounter, { children: [commentValue.length, "/200"] })] }), _jsx(StyledModalFooter, { children: _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconStop, {}), caption: "Termina istanza", width: '150px', disabled: disable, onClick: () => !disable && endInstancesAsync(), advancedColor: TMColors.error }) })] }) }));
178
276
  };
179
277
  export const WorkFlowMoreInfoPopUp = ({ DID = 0, TID = 0, deviceType = DeviceType.DESKTOP, onClose, onCompleted }) => {
180
278
  const [users, setUsers] = useState([]);
@@ -113,5 +113,6 @@ export * from "./features/workflow/diagram/workflowHelpers";
113
113
  export * from "./features/workflow/diagram/xmlParser";
114
114
  export * from "./features/workflow/diagram/interfaces";
115
115
  export * from "./features/workflow/diagram/DiagramItemSvgContent";
116
+ export * from "./features/workflow/TMWorkflowPopup";
116
117
  export { default as TMWizard } from './wizard/TMWizard';
117
118
  export * from './wizard/TMWizard';
@@ -134,6 +134,7 @@ export * from "./features/workflow/diagram/workflowHelpers";
134
134
  export * from "./features/workflow/diagram/xmlParser";
135
135
  export * from "./features/workflow/diagram/interfaces";
136
136
  export * from "./features/workflow/diagram/DiagramItemSvgContent";
137
+ export * from "./features/workflow/TMWorkflowPopup";
137
138
  // wizard
138
139
  export { default as TMWizard } from './wizard/TMWizard';
139
140
  export * from './wizard/TMWizard';
@@ -4,7 +4,8 @@ interface ITMDataListItemViewerProps {
4
4
  dataListId?: number;
5
5
  value?: string | Date | number;
6
6
  viewMode?: DataListViewModes;
7
+ showTooltip?: boolean;
7
8
  }
8
- declare const TMDataListItemViewer: ({ dataListId, value, viewMode }: ITMDataListItemViewerProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const TMDataListItemViewer: ({ dataListId, value, viewMode, showTooltip }: ITMDataListItemViewerProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export default TMDataListItemViewer;
10
11
  export declare const cellRenderDataListItem: (data: DataGridTypes.ColumnCellTemplateData, dataListId?: number, viewMode?: DataListViewModes) => import("react/jsx-runtime").JSX.Element;
@@ -7,7 +7,7 @@ import TMTooltip from '../base/TMTooltip';
7
7
  import { TMColors } from '../../utils/theme';
8
8
  import { TMExceptionBoxManager } from '../base/TMPopUp';
9
9
  import { FormulaHelper } from '../editors/TMFormulaEditor';
10
- const TMDataListItemViewer = ({ dataListId, value, viewMode = DataListViewModes.ImageAndDescription }) => {
10
+ const TMDataListItemViewer = ({ dataListId, value, viewMode = DataListViewModes.ImageAndDescription, showTooltip = true }) => {
11
11
  const [dataListItem, setDataListItem] = useState();
12
12
  useEffect(() => {
13
13
  if (!dataListId || value === undefined || value === null) {
@@ -63,16 +63,17 @@ const TMDataListItemViewer = ({ dataListId, value, viewMode = DataListViewModes.
63
63
  }
64
64
  return dataListItem ? dataListItem.name : displayValue;
65
65
  };
66
- return (_jsx(TMTooltip, { content: dataListItem ? dataListItem.value : SDKUI_Localizator.ValueNotPresent, parentStyle: { width: '100%' }, childStyle: { width: '100%' }, children: _jsxs(StyledDivHorizontal, { style: { width: '100%' }, children: [getIcon(), _jsx("p", { style: {
67
- textAlign: 'left',
68
- marginLeft: showIcon ? '5px' : '',
69
- opacity: dataListItem ? 1 : 0.5,
70
- whiteSpace: 'nowrap',
71
- overflow: 'hidden',
72
- textOverflow: 'ellipsis',
73
- flexGrow: 1,
74
- minWidth: 0
75
- }, children: getDescription() })] }) }));
66
+ const content = (_jsxs(StyledDivHorizontal, { style: { width: '100%' }, children: [getIcon(), _jsx("p", { style: {
67
+ textAlign: 'left',
68
+ marginLeft: showIcon ? '5px' : '',
69
+ opacity: dataListItem ? 1 : 0.5,
70
+ whiteSpace: 'nowrap',
71
+ overflow: 'hidden',
72
+ textOverflow: 'ellipsis',
73
+ flexGrow: 1,
74
+ minWidth: 0
75
+ }, children: getDescription() })] }));
76
+ return showTooltip ? (_jsx(TMTooltip, { content: dataListItem ? dataListItem.value : SDKUI_Localizator.ValueNotPresent, parentStyle: { width: '100%' }, childStyle: { width: '100%' }, children: content })) : content;
76
77
  };
77
78
  export default TMDataListItemViewer;
78
79
  export const cellRenderDataListItem = (data, dataListId, viewMode) => {
@@ -24,6 +24,7 @@ export declare class SDKUI_Localizator {
24
24
  static get AddTo(): string;
25
25
  static get AddToHomePage(): "Zur Startseite hinzufügen" | "Add to Home Page" | "Añadir a la página inicial" | "Ajoute à Home Page" | "Adicionar a Home Page" | "Aggiungi alla Home Page";
26
26
  static get Advanced(): "Erweitert" | "Advanced" | "Avanzado" | "Avancé" | "Avançado" | "Avanzate";
27
+ static get AggregateSearch(): "Aggregierte Suche" | "Aggregate search" | "Búsqueda agregada" | "Recherche agrégée" | "Pesquisa agregada" | "Ricerca aggregata";
27
28
  static get All(): "Alle" | "All" | "Todos" | "Tous" | "Tutti";
28
29
  static get AllFemale(): "Alle" | "All" | "Todas" | "Toutes" | "Tutte";
29
30
  static get AllDcmts(): "Alle Dokumente" | "All documents" | "Todos los documentos" | "Tous les documents" | "Todos os documentos" | "Tutti i documenti";
@@ -530,6 +531,7 @@ export declare class SDKUI_Localizator {
530
531
  static get ReplaceDocument(): "Dokument ersetzen" | "Replace Document" | "Reemplazar Documento" | "Remplacer le Document" | "Substituir Documento" | "Sostituisci Documento";
531
532
  static get Request(): string;
532
533
  static get RequestTo(): string;
534
+ static get RequestType(): "Anforderungstyp" | "Request type" | "Tipo de solicitud" | "Type de demande" | "Tipo de requisição" | "Tipo richiesta";
533
535
  static get Required(): "Obligatorisch" | "Required" | "Obligatorio" | "Obbligatoire" | "Obrigatório" | "Obbligatorio";
534
536
  static get RequiredField(): "Erforderliches Feld" | "Required field" | "Campo obligatorio" | "Champ obligatoire" | "Campo obrigatório" | "Campo Obbligatorio";
535
537
  static get RequiredNOT(): "Nicht obligatorisch" | "Not mandatory" | "No obligatorio" | "Pas obligatoire" | "Não é obrigatório" | "Non obbligatorio";
@@ -628,6 +630,7 @@ export declare class SDKUI_Localizator {
628
630
  static get Subject(): "Betreff" | "Subject" | "Asunto" | "Objet" | "Assunto" | "Oggetto";
629
631
  static get Summary(): "Zusammenfassung" | "Summary" | "Resumen" | "Résumé" | "Resumo" | "Riepilogo";
630
632
  static get SwitchUser(): "Benutzer wechseln" | "Switch user" | "Cambiar usuario" | "Changer d'utilisateur" | "Mudar de usuário" | "Cambia utente";
633
+ static get TargetedSearch(): "Gezielte Suche" | "Targeted search" | "Búsqueda dirigida" | "Recherche ciblée" | "Pesquisa direcionada" | "Ricerca puntuale";
631
634
  static get TaskAssignedMessage(): "Die Aufgabe wurde von Benutzer '{{0}}' zugewiesen. Nur die Felder 'Status' und 'Erinnerung' können bearbeitet werden, da sie für die Person, die mit der Arbeit fortfährt, relevant sind" | "The task was assigned by user '{{0}}'. Only the 'Status' and 'Reminder' fields can be edited, as they are relevant for the person who will continue with the work" | "La tarea fue asignada por el usuario '{{0}}'. Solo se pueden editar los campos 'Estado' y 'Recordatorio', ya que son relevantes para la persona que continuará con el trabajo" | "La tâche a été assignée par l'utilisateur '{{0}}'. Seuls les champs 'Statut' et 'Rappel' peuvent être modifiés, car ils sont pertinents pour la personne qui poursuivra le travail" | "A tarefa foi atribuída pelo usuário '{{0}}'. Apenas os campos 'Status' e 'Lembrete' podem ser editados, pois são relevantes para quem continuará com o trabalho" | "Attività assegnata dall'utente '{{0}}'. Solo i campi 'Stato' e 'Promemoria' possono essere modificati, in quanto sono rilevanti per chi dovrà proseguire con il lavoro";
632
635
  static get TaskAssignedToUserMessage(): "Aufgabe zugewiesen an den Benutzer '{{0}}'" | "Task assigned to user '{{0}}'" | "Tarea asignada al usuario '{{0}}'" | "Tâche assignée à l'utilisateur '{{0}}'" | "Tarefa atribuída ao usuário '{{0}}'" | "Attività assegnata all'utente '{{0}}'";
633
636
  static get TaskConsideredExpiring(): "Die Aufgabe wird als ablaufend betrachtet, wenn" | "The task is considered expiring if" | "La tarea se considera por vencer si" | "La tâche est considérée comme expirante si" | "A tarefa é considerada vencendo se" | "L'attività è considerata in scadenza se";
@@ -188,6 +188,16 @@ export class SDKUI_Localizator {
188
188
  default: return "Avanzate";
189
189
  }
190
190
  }
191
+ static get AggregateSearch() {
192
+ switch (this._cultureID) {
193
+ case CultureIDs.De_DE: return "Aggregierte Suche";
194
+ case CultureIDs.En_US: return "Aggregate search";
195
+ case CultureIDs.Es_ES: return "Búsqueda agregada";
196
+ case CultureIDs.Fr_FR: return "Recherche agrégée";
197
+ case CultureIDs.Pt_PT: return "Pesquisa agregada";
198
+ default: return "Ricerca aggregata";
199
+ }
200
+ }
191
201
  static get All() {
192
202
  switch (this._cultureID) {
193
203
  case CultureIDs.De_DE: return "Alle";
@@ -5265,6 +5275,16 @@ export class SDKUI_Localizator {
5265
5275
  default: return "Richiedi a";
5266
5276
  }
5267
5277
  }
5278
+ static get RequestType() {
5279
+ switch (this._cultureID) {
5280
+ case CultureIDs.De_DE: return "Anforderungstyp";
5281
+ case CultureIDs.En_US: return "Request type";
5282
+ case CultureIDs.Es_ES: return "Tipo de solicitud";
5283
+ case CultureIDs.Fr_FR: return "Type de demande";
5284
+ case CultureIDs.Pt_PT: return "Tipo de requisição";
5285
+ default: return "Tipo richiesta";
5286
+ }
5287
+ }
5268
5288
  static get Required() {
5269
5289
  switch (this._cultureID) {
5270
5290
  case CultureIDs.De_DE: return "Obligatorisch";
@@ -6246,6 +6266,16 @@ export class SDKUI_Localizator {
6246
6266
  default: return "Cambia utente";
6247
6267
  }
6248
6268
  }
6269
+ static get TargetedSearch() {
6270
+ switch (this._cultureID) {
6271
+ case CultureIDs.De_DE: return "Gezielte Suche";
6272
+ case CultureIDs.En_US: return "Targeted search";
6273
+ case CultureIDs.Es_ES: return "Búsqueda dirigida";
6274
+ case CultureIDs.Fr_FR: return "Recherche ciblée";
6275
+ case CultureIDs.Pt_PT: return "Pesquisa direcionada";
6276
+ default: return "Ricerca puntuale";
6277
+ }
6278
+ }
6249
6279
  static get TaskAssignedMessage() {
6250
6280
  switch (this._cultureID) {
6251
6281
  case CultureIDs.De_DE: return "Die Aufgabe wurde von Benutzer '{{0}}' zugewiesen. Nur die Felder 'Status' und 'Erinnerung' können bearbeitet werden, da sie für die Person, die mit der Arbeit fortfährt, relevant sind";
package/lib/ts/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from "react";
2
- import { FileFormats, ITopMediaSession, MetadataDescriptor, MetadataValueDescriptor, UserDescriptor, ValidationItem } from "@topconsultnpm/sdk-ts";
2
+ import { DataListItemDescriptor, FileFormats, ITopMediaSession, MetadataDescriptor, MetadataValueDescriptor, UserDescriptor, ValidationItem } from "@topconsultnpm/sdk-ts";
3
3
  import { ITMEditorBase } from "../components/base/TMEditorBase";
4
4
  import { IColumnProps } from "devextreme-react/data-grid";
5
5
  export declare enum FormModes {
@@ -310,3 +310,58 @@ export declare enum buildTypes {
310
310
  RTM = "RTM",
311
311
  PATCH = "PATCH"
312
312
  }
313
+ /**
314
+ * Descrive un'istanza di workflow per il contesto WorkflowCtrl.
315
+ * Contiene tutte le informazioni necessarie per recuperare i work items associati.
316
+ */
317
+ export interface WFInstanceDescriptor {
318
+ /** ID dell'istanza */
319
+ instanceId: string;
320
+ /** Indice della riga nel search result */
321
+ rowIndex: number;
322
+ /** Struttura metadati completa da searchResultToDataSource: { [key: string]: { md: MetadataDescriptor, value: any } } */
323
+ values: any;
324
+ /** TID del documento workflow */
325
+ tid?: number;
326
+ /** DID del documento workflow */
327
+ did?: number;
328
+ /** ID del workflow */
329
+ wfid?: number;
330
+ /** MID del metadato che contiene lo stato del workflow */
331
+ mStatusMID?: number;
332
+ /** DataList ID per visualizzare lo stato */
333
+ mStatusDLID?: number;
334
+ }
335
+ /**
336
+ * Dettaglio di un singolo work item
337
+ */
338
+ export interface WorkItemDetail {
339
+ wid: string;
340
+ tid: number;
341
+ did: number;
342
+ status?: DataListItemDescriptor;
343
+ setID: string;
344
+ response?: string;
345
+ creationTime?: Date;
346
+ completionTime?: Date;
347
+ from?: number;
348
+ to?: number;
349
+ toUser?: UserDescriptor;
350
+ or?: number;
351
+ }
352
+ /**
353
+ * Raggruppamento di work items per setID (e creationTime se lo step si ripete)
354
+ */
355
+ export interface IWorkItemData {
356
+ wid: string;
357
+ category?: any;
358
+ type?: any;
359
+ name?: string;
360
+ description?: string;
361
+ setID: string;
362
+ creationTime?: Date;
363
+ setStatus?: DataListItemDescriptor;
364
+ setRule?: number;
365
+ details: WorkItemDetail[];
366
+ groupIndex?: number;
367
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.20.0-dev1.50",
3
+ "version": "6.20.0-dev1.52",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -40,7 +40,7 @@
40
40
  "lib"
41
41
  ],
42
42
  "dependencies": {
43
- "@topconsultnpm/sdk-ts": "6.20.0-dev1.2",
43
+ "@topconsultnpm/sdk-ts": "6.20.0-dev1.3",
44
44
  "buffer": "^6.0.3",
45
45
  "devextreme": "25.1.7",
46
46
  "devextreme-react": "25.1.7",