@topconsultnpm/sdkui-react 6.19.0-dev2.5 → 6.19.0-dev2.50

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 (94) hide show
  1. package/lib/components/base/TMButton.d.ts +1 -0
  2. package/lib/components/base/TMButton.js +6 -6
  3. package/lib/components/base/TMCustomButton.d.ts +1 -1
  4. package/lib/components/base/TMCustomButton.js +83 -28
  5. package/lib/components/base/TMDataGridExportForm.d.ts +1 -1
  6. package/lib/components/base/TMDataGridExportForm.js +9 -3
  7. package/lib/components/base/TMFileManager.js +12 -3
  8. package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -0
  9. package/lib/components/base/TMFileManagerDataGridView.js +12 -3
  10. package/lib/components/base/TMFileManagerThumbnailItems.d.ts +2 -0
  11. package/lib/components/base/TMFileManagerThumbnailItems.js +12 -2
  12. package/lib/components/base/TMFileManagerThumbnailsView.d.ts +2 -0
  13. package/lib/components/base/TMFileManagerThumbnailsView.js +2 -2
  14. package/lib/components/base/TMModal.d.ts +2 -0
  15. package/lib/components/base/TMModal.js +13 -2
  16. package/lib/components/base/TMTooltip.d.ts +1 -1
  17. package/lib/components/base/TMTooltip.js +1 -1
  18. package/lib/components/base/TMWaitPanel.js +8 -2
  19. package/lib/components/choosers/TMDcmtTypeChooser.js +2 -2
  20. package/lib/components/choosers/TMMetadataChooser.d.ts +4 -1
  21. package/lib/components/choosers/TMMetadataChooser.js +31 -8
  22. package/lib/components/choosers/TMUserChooser.d.ts +4 -0
  23. package/lib/components/choosers/TMUserChooser.js +21 -5
  24. package/lib/components/editors/TMDateBox.d.ts +1 -1
  25. package/lib/components/editors/TMTextArea.d.ts +1 -0
  26. package/lib/components/editors/TMTextArea.js +43 -9
  27. package/lib/components/editors/TMTextBox.js +33 -3
  28. package/lib/components/editors/TMTextExpression.js +36 -28
  29. package/lib/components/features/assistant/ToppyDraggableHelpCenter.d.ts +28 -0
  30. package/lib/components/features/assistant/ToppyDraggableHelpCenter.js +324 -0
  31. package/lib/components/features/assistant/ToppyHelpCenter.js +1 -1
  32. package/lib/components/features/assistant/ToppySpeechBubble.d.ts +8 -0
  33. package/lib/components/features/assistant/ToppySpeechBubble.js +53 -0
  34. package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -0
  35. package/lib/components/features/blog/TMBlogCommentForm.js +18 -6
  36. package/lib/components/features/documents/TMDcmtBlog.js +1 -1
  37. package/lib/components/features/documents/TMDcmtForm.js +313 -57
  38. package/lib/components/features/documents/TMDcmtPreview.js +45 -8
  39. package/lib/components/features/documents/TMRelationViewer.js +56 -23
  40. package/lib/components/features/search/TMSavedQuerySelector.js +1 -1
  41. package/lib/components/features/search/TMSearch.js +2 -2
  42. package/lib/components/features/search/TMSearchQueryEditor.js +1 -1
  43. package/lib/components/features/search/TMSearchQueryPanel.js +8 -25
  44. package/lib/components/features/search/TMSearchResult.js +94 -13
  45. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +2 -1
  46. package/lib/components/features/search/TMSearchResultsMenuItems.js +97 -51
  47. package/lib/components/features/tasks/TMTaskForm.js +11 -5
  48. package/lib/components/features/tasks/TMTasksAgenda.js +4 -4
  49. package/lib/components/features/tasks/TMTasksCalendar.js +2 -2
  50. package/lib/components/features/tasks/TMTasksHeader.js +1 -1
  51. package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -1
  52. package/lib/components/features/tasks/TMTasksUtils.js +18 -3
  53. package/lib/components/features/tasks/TMTasksUtilsView.js +26 -4
  54. package/lib/components/features/tasks/TMTasksView.js +12 -6
  55. package/lib/components/features/workflow/TMWorkflowPopup.js +3 -3
  56. package/lib/components/features/workflow/diagram/DiagramItemForm.js +8 -3
  57. package/lib/components/forms/TMResultDialog.js +8 -2
  58. package/lib/components/forms/TMSaveForm.js +2 -2
  59. package/lib/components/grids/TMBlogsPost.d.ts +8 -3
  60. package/lib/components/grids/TMBlogsPost.js +73 -11
  61. package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
  62. package/lib/components/grids/TMBlogsPostUtils.js +15 -3
  63. package/lib/components/grids/TMRecentsManager.js +1 -1
  64. package/lib/components/index.d.ts +2 -1
  65. package/lib/components/index.js +2 -1
  66. package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
  67. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +2 -2
  68. package/lib/components/layout/panelManager/TMPanelManagerContext.js +0 -1
  69. package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +2 -1
  70. package/lib/components/layout/panelManager/types.d.ts +1 -0
  71. package/lib/components/pages/TMPage.js +1 -1
  72. package/lib/components/settings/SettingsAppearance.js +5 -5
  73. package/lib/components/viewers/TMDataListItemViewer.d.ts +1 -1
  74. package/lib/components/viewers/TMMidViewer.d.ts +1 -1
  75. package/lib/components/viewers/TMTidViewer.d.ts +1 -1
  76. package/lib/helper/GlobalStyles.d.ts +2 -0
  77. package/lib/helper/GlobalStyles.js +10 -0
  78. package/lib/helper/Globalization.d.ts +1 -0
  79. package/lib/helper/Globalization.js +30 -0
  80. package/lib/helper/SDKUI_Localizator.d.ts +39 -2
  81. package/lib/helper/SDKUI_Localizator.js +392 -22
  82. package/lib/helper/TMCustomSearchBar.js +1 -1
  83. package/lib/helper/TMIcons.d.ts +4 -1
  84. package/lib/helper/TMIcons.js +13 -1
  85. package/lib/helper/TMUtils.d.ts +1 -4
  86. package/lib/helper/TMUtils.js +18 -23
  87. package/lib/helper/dcmtsHelper.d.ts +2 -1
  88. package/lib/helper/dcmtsHelper.js +56 -17
  89. package/lib/helper/helpers.js +5 -1
  90. package/lib/helper/index.d.ts +1 -0
  91. package/lib/helper/index.js +1 -0
  92. package/lib/hooks/useRelatedDocuments.js +35 -26
  93. package/lib/ts/types.d.ts +3 -1
  94. package/package.json +8 -8
@@ -6,10 +6,7 @@ export interface RowData {
6
6
  [key: string]: string | number | null;
7
7
  }
8
8
  export declare const associateColumnsToRows: (columns: Array<DataColumnDescriptor> | undefined, rows: Array<Array<string>> | undefined) => Array<RowData>;
9
- export declare const buildValueToLabelMapFromDataColumns: (columns: Array<DataColumnDescriptor>) => Promise<{
10
- valueToNameMap: Map<string, string>;
11
- captions: Set<string>;
12
- }>;
9
+ export declare const buildValueToLabelMapFromDataColumns: (columns: Array<DataColumnDescriptor>) => Promise<Map<string, Map<string, string>>>;
13
10
  export declare const getAvatarColor: (name: string) => string;
14
11
  export declare const extractInitialsFromName: (name: string) => string;
15
12
  export declare const SIGN4_TOP_WIDGET_ID = "60003";
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import styled from "styled-components";
3
3
  import { TMTooltip } from '../components';
4
- import { IconKey } from './TMIcons';
4
+ import { IconCADossier, IconKey, IconMenuCAWorkingGroups } from './TMIcons';
5
5
  import { DataListCacheService, MetadataDataDomains, PdGs } from '@topconsultnpm/sdk-ts';
6
6
  import { SDKUI_Localizator } from './SDKUI_Localizator';
7
7
  const StyledIconFileContainer = styled.div `
@@ -119,23 +119,27 @@ export const associateColumnsToRows = (columns, rows) => {
119
119
  };
120
120
  export const buildValueToLabelMapFromDataColumns = async (columns) => {
121
121
  const valueToNameMap = new Map();
122
- const captions = new Set();
123
- for (const col of columns) {
124
- const dataDomain = MetadataDataDomains[(col.extendedProperties?.["DataDomain"] ?? "None")];
122
+ const dataListColumns = columns.filter(col => {
123
+ const dataDomainRaw = col.extendedProperties?.["DataDomain"];
124
+ const dataDomain = MetadataDataDomains[(dataDomainRaw ?? "None")];
125
+ return dataDomain === MetadataDataDomains.DataList;
126
+ });
127
+ for (const col of dataListColumns) {
128
+ const tid = Number(col.extendedProperties?.["TID"]);
129
+ const mid = Number(col.extendedProperties?.["MID"]);
125
130
  const dataListID = Number(col.extendedProperties?.["DataListID"]);
126
- if (dataDomain === MetadataDataDomains.DataList) {
127
- if (col.caption) {
128
- captions.add(col.caption);
129
- }
131
+ if (tid && mid && dataListID) {
132
+ const tid_mid = `${tid}_${mid}`;
133
+ valueToNameMap.set(tid_mid, new Map());
130
134
  const dl = await DataListCacheService.GetAsync(dataListID);
131
135
  dl?.items?.forEach((item) => {
132
136
  if (item?.name !== undefined && item?.value !== undefined) {
133
- valueToNameMap.set(item.value, item.name);
137
+ valueToNameMap.get(tid_mid)?.set(item.value, item.name);
134
138
  }
135
139
  });
136
140
  }
137
141
  }
138
- return { valueToNameMap, captions };
142
+ return valueToNameMap;
139
143
  };
140
144
  export const getAvatarColor = (name) => {
141
145
  const colors = [
@@ -197,21 +201,12 @@ export const StyledTabIcon = styled.i `
197
201
  transition: color 0.2s ease;
198
202
  `;
199
203
  export const TMCountBadge = styled.div ` background-color: #ff5252; color: white; border-radius: 999px; margin-left: 8px; font-size: 0.7rem; line-height: 1; min-height: 20px; min-width: 20px; display: flex ; align-items: center; justify-content: center; `;
200
- const taskPdgsIconClassMap = () => {
201
- return new Map([
202
- [PdGs.None, ""],
203
- [PdGs.CF, "dx-icon-folder"],
204
- [PdGs.DT, "dx-icon-file"],
205
- [PdGs.WF, "dx-icon-box"],
206
- [PdGs.WG, "dx-icon-group"],
207
- ]);
208
- };
209
204
  export const getPdgsIconMap = (fontSize = 20) => {
210
205
  return new Map([
211
206
  [PdGs.None, _jsx("span", {}, "PdGs-None")],
212
- [PdGs.CF, _jsx("i", { style: { fontSize }, className: taskPdgsIconClassMap().get(PdGs.CF) }, "PdGs-CF")],
213
- [PdGs.DT, _jsx("i", { style: { fontSize }, className: taskPdgsIconClassMap().get(PdGs.DT) }, "PdGs-DT")],
214
- [PdGs.WF, _jsx("i", { style: { fontSize }, className: taskPdgsIconClassMap().get(PdGs.WF) }, "PdGs-WF")],
215
- [PdGs.WG, _jsx("i", { style: { fontSize }, className: taskPdgsIconClassMap().get(PdGs.WG) }, "PdGs-WG")], // <IconUserGroup color="#009700"/>
207
+ [PdGs.CF, _jsx(IconCADossier, { color: "#e65b00", fontSize: 28 }, "PdGs-CF")],
208
+ [PdGs.DT, _jsx("i", { style: { fontSize, color: '#b38600' }, className: "dx-icon-file" }, "PdGs-DT")],
209
+ [PdGs.WF, _jsx("i", { style: { fontSize }, className: "dx-icon-box" }, "PdGs-WF")],
210
+ [PdGs.WG, _jsx(IconMenuCAWorkingGroups, { color: "#009700", fontSize: 28 }, "PdGs-WG")],
216
211
  ]);
217
212
  };
@@ -4,4 +4,5 @@ export declare const hasDetailRelations: (mTID: number | undefined) => Promise<b
4
4
  /** Check if dcmtType (mTID) has configured Master or Many-to-Many relations */
5
5
  export declare const hasMasterRelations: (mTID: number | undefined) => Promise<boolean>;
6
6
  export declare const isXMLFileExt: (fileExt: string | undefined) => boolean;
7
- export declare const processButtonAttributes: (args: string | undefined, formData: MetadataValueDescriptorEx[] | undefined) => Record<string, string | number> | undefined;
7
+ export declare const getButtonAttributes: (args: string | undefined, formData: MetadataValueDescriptorEx[] | undefined, selectedItems: Array<any> | undefined) => Record<string, any> | undefined;
8
+ export declare const getSelectedItem: (args: string | undefined, formData: MetadataValueDescriptorEx[] | undefined, item: any) => Record<string, any> | undefined;
@@ -1,4 +1,4 @@
1
- import { RelationCacheService, RelationTypes } from "@topconsultnpm/sdk-ts";
1
+ import { RelationCacheService, RelationTypes, SDK_Globals } from "@topconsultnpm/sdk-ts";
2
2
  /** Check if dcmtType (mTID) has configured Detail or Many-to-Many relations */
3
3
  export const hasDetailRelations = async (mTID) => {
4
4
  let allRelations = await RelationCacheService.GetAllAsync();
@@ -24,20 +24,59 @@ export const isXMLFileExt = (fileExt) => {
24
24
  }
25
25
  };
26
26
  /*utility functions for TMCustomButton*/
27
- export const processButtonAttributes = (args, formData) => args && formData ? splitArguments(replaceCustomButtonAttributes(args, formDataMap(formData))) : undefined;
28
- const replaceCustomButtonAttributes = (input, attributes) => {
29
- const matches = Array.from(input.matchAll(/@\w+/g));
30
- return matches
31
- .map(([match]) => `${match}=${attributes[match.slice(1)] ?? ''}`)
32
- .join(';') + ';';
27
+ export const getButtonAttributes = (args, formData, selectedItems) => args && formData ? formDataMap(formData, args, selectedItems) : undefined;
28
+ const getSelectedItems = (selectedItems) => selectedItems && selectedItems.map(item => item["DID"]) || [];
29
+ export const getSelectedItem = (args, formData, item) => {
30
+ //converto item in formData
31
+ const formDataConverted = [];
32
+ for (const key in item) {
33
+ const md = formData?.find(md => `${item["TID"]}_${md.mid}` === key);
34
+ if (md) { // aggiungo solo i metadati
35
+ const name = md.md?.name || "";
36
+ formDataConverted.push({ md: { name: name }, value: item[key] });
37
+ }
38
+ }
39
+ return args && formDataConverted ?
40
+ formDataMap(formDataConverted, args, []) : undefined;
41
+ };
42
+ const formDataMap = (data, args, selectedItems) => {
43
+ const session = SDK_Globals.tmSession;
44
+ const sessionDescr = session?.SessionDescr;
45
+ const result = {};
46
+ // Helper per estrarre il valore di un campo
47
+ const getParamValue = (fieldName) => {
48
+ const md = data.find(md => md.md?.name === fieldName);
49
+ switch (fieldName) {
50
+ case 'SelectedDIDs': return getSelectedItems(selectedItems);
51
+ case 'AuthenticationMode': return sessionDescr?.authenticationMode ?? null;
52
+ case 'ArchiveID': return sessionDescr?.archiveID ?? null;
53
+ case 'CultureID': return sessionDescr?.cultureID ?? null;
54
+ case 'Domain': return sessionDescr?.domain ?? null;
55
+ case 'UserID': return sessionDescr?.userID ?? null;
56
+ case 'UserName': return sessionDescr?.userName ?? null;
57
+ case 'Session': return session ?? null;
58
+ default: return md?.value;
59
+ }
60
+ };
61
+ // Regex per catturare: chiave=[...] o chiave={...} o {@campo}
62
+ const keyValueRegex = /(\w+)=\[([^\]]+)\]|(\w+)=\{@?([^}]+)\}|\{@([^}]+)\}/g;
63
+ for (const match of args.matchAll(keyValueRegex)) {
64
+ if (match[1]) {
65
+ // Formato: chiave=[{@campo} testo {@campo} ...]
66
+ const key = match[1];
67
+ const content = match[2].replace(/\{@([^}]+)\}/g, (_, fieldName) => data.find(md => md.md?.name === fieldName)?.value ?? '');
68
+ result[key] = content;
69
+ }
70
+ else if (match[3]) {
71
+ // Formato: chiave={@campo} o chiave={valore}
72
+ const key = match[3];
73
+ const value = match[4];
74
+ result[key] = value.startsWith('@') ? getParamValue(value.substring(1)) : value;
75
+ }
76
+ else if (match[5]) {
77
+ // Formato: {@campo}
78
+ result[match[5]] = getParamValue(match[5]);
79
+ }
80
+ }
81
+ return result;
33
82
  };
34
- const formDataMap = (data) => data.reduce((acc, md) => {
35
- const key = md.md?.name;
36
- if (key && md.value)
37
- acc[key] = md.value;
38
- return acc;
39
- }, {});
40
- const splitArguments = (input) => Object.fromEntries(Array.from(input.matchAll(/@?(\w+)=([^;]+)/g), ([, key, value]) => [
41
- key,
42
- isNaN(Number(value)) ? value : Number(value),
43
- ]));
@@ -480,6 +480,9 @@ export const extensionHandler = (fileExt) => {
480
480
  case 'xml.p7m.tsd': return FileExtensionHandler.READY_TO_SHOW;
481
481
  case 'pdf': return FileExtensionHandler.READY_TO_SHOW;
482
482
  case 'txt': return FileExtensionHandler.READY_TO_SHOW;
483
+ case 'config':
484
+ case 'cfg':
485
+ case 'json': return FileExtensionHandler.READY_TO_SHOW;
483
486
  default: return FileExtensionHandler.NONE;
484
487
  }
485
488
  };
@@ -633,7 +636,8 @@ export const highlightText = (text, searchValue) => {
633
636
  export const renderHighlightedText = (text, searchText, isSelected) => {
634
637
  if (!searchText)
635
638
  return text;
636
- const regex = new RegExp(`(${searchText})`, 'gi');
639
+ const escapedSearchText = searchText.trim().replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
640
+ const regex = new RegExp(`(${escapedSearchText})`, 'gi');
637
641
  return text.split(regex).map((part, index) => regex.test(part) ? (_jsx("span", { style: { backgroundColor: isSelected ? '#6c9023' : 'yellow' }, children: part }, index)) : (part));
638
642
  };
639
643
  export function versionAndBuildtypeInfo(module) {
@@ -10,3 +10,4 @@ export * from './TMUtils';
10
10
  export * from './TMCommandsContextMenu';
11
11
  export * from './TMConditionalWrapper';
12
12
  export * from './TMToppyMessage';
13
+ export * from './GlobalStyles';
@@ -10,3 +10,4 @@ export * from './TMUtils';
10
10
  export * from './TMCommandsContextMenu';
11
11
  export * from './TMConditionalWrapper';
12
12
  export * from './TMToppyMessage';
13
+ export * from './GlobalStyles';
@@ -195,9 +195,18 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
195
195
  }
196
196
  }, [selectedSearchResult?.fromTID]);
197
197
  const getFocusedItem = useCallback(() => {
198
- if (!focusedItem || currentSearchResults.length !== 1)
198
+ if (!focusedItem)
199
199
  return undefined;
200
- return { mdList: currentSearchResults[0].dtdResult?.rows?.[focusedItem?.rowIndex ?? 0], mids: currentSearchResults[0].selectMIDs ?? [] };
200
+ if (currentSearchResults.length === 1) {
201
+ return { mdList: currentSearchResults[0].dtdResult?.rows?.[focusedItem?.rowIndex ?? 0], mids: currentSearchResults[0].selectMIDs ?? [] };
202
+ }
203
+ const matchingSearchResult = currentSearchResults.find(res => res.fromTID == focusedItem?.TID);
204
+ if (!matchingSearchResult)
205
+ return undefined;
206
+ return {
207
+ mdList: matchingSearchResult.dtdResult?.rows?.[focusedItem?.rowIndex ?? 0],
208
+ mids: matchingSearchResult.selectMIDs ?? []
209
+ };
201
210
  }, [focusedItem, currentSearchResults]);
202
211
  const fetchAssociatedValues = useCallback((mid) => {
203
212
  let mdList = getFocusedItem();
@@ -222,8 +231,8 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
222
231
  const showNoRelationsAlert = (type) => {
223
232
  ShowAlert({
224
233
  message: type === 'detail'
225
- ? "Nessun documento di dettaglio trovato per l'archiviazione."
226
- : "Nessun documento di master trovato per l'archiviazione.",
234
+ ? SDKUI_Localizator.NoDetailDocumentFoundForArchiving
235
+ : SDKUI_Localizator.NoMasterDocumentFoundForArchiving,
227
236
  mode: 'info',
228
237
  title: type === 'detail' ? SDKUI_Localizator.DcmtsDetail : SDKUI_Localizator.DcmtsMaster,
229
238
  duration: 5000
@@ -232,8 +241,8 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
232
241
  const showNoAssociationsAlert = (type) => {
233
242
  ShowAlert({
234
243
  message: type === 'detail'
235
- ? "Nessuna associazione trovata per i documenti di dettaglio."
236
- : "Nessuna associazione trovata per i documenti di master.",
244
+ ? SDKUI_Localizator.NoMatchFoundForDetailDocuments
245
+ : SDKUI_Localizator.NoMatchFoundForMasterDocuments,
237
246
  mode: 'info',
238
247
  title: type === 'detail' ? SDKUI_Localizator.DcmtsDetail : SDKUI_Localizator.DcmtsMaster,
239
248
  duration: 5000
@@ -254,8 +263,8 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
254
263
  if (dtd?.perm?.canArchive !== AccessLevelsEx.Yes && dtd?.perm?.canArchive !== AccessLevelsEx.Mixed) {
255
264
  ShowAlert({
256
265
  message: type === 'detail'
257
- ? "Non hai i permessi per archiviare documenti di dettaglio di questo tipo."
258
- : "Non hai i permessi per archiviare documenti master di questo tipo.",
266
+ ? SDKUI_Localizator.YouDoNotHavePermissionsToArchiveDetailDocumentsOfThisType
267
+ : SDKUI_Localizator.YouDoNotHavePermissionsToArchiveMasterDocumentsOfThisType,
259
268
  mode: 'warning',
260
269
  title: type === 'detail' ? SDKUI_Localizator.DcmtsDetail : SDKUI_Localizator.DcmtsMaster,
261
270
  duration: 5000
@@ -365,10 +374,10 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
365
374
  if (!focusedItem?.TID || !focusedItem?.DID) {
366
375
  ShowAlert({
367
376
  message: isPairing
368
- ? "Nessun documento selezionato per l'abbinamento molti a molti."
369
- : "Nessun documento selezionato per il disabbinamento molti a molti.",
377
+ ? SDKUI_Localizator.NoDocumentSelectedForManyToManyMatching
378
+ : SDKUI_Localizator.NoDocumentSelectedForManyToManyUnmatching,
370
379
  mode: 'warning',
371
- title: isPairing ? 'Abbina documenti molti a molti' : 'Disabbina documenti molti a molti',
380
+ title: isPairing ? SDKUI_Localizator.MatchManyDocumentsManyToMany : SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
372
381
  duration: 5000
373
382
  });
374
383
  return;
@@ -384,10 +393,10 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
384
393
  if (!qd) {
385
394
  ShowAlert({
386
395
  message: isPairing
387
- ? "Nessuna query di recupero associata alla relazione di abbinamento molti a molti."
388
- : "Nessuna query di recupero associata alla relazione di disabbinamento molti a molti.",
396
+ ? SDKUI_Localizator.NoManyToManyMatchingRelationshipAssociatedWithRetrievalQuery
397
+ : SDKUI_Localizator.NoManyToManyUnmatchingRelationshipAssociatedWithRetrievalQuery,
389
398
  mode: 'warning',
390
- title: isPairing ? 'Abbina documenti molti a molti' : 'Disabbina documenti molti a molti',
399
+ title: isPairing ? SDKUI_Localizator.MatchManyDocumentsManyToMany : SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
391
400
  duration: 5000
392
401
  });
393
402
  return;
@@ -490,9 +499,9 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
490
499
  if (!isPairing) {
491
500
  if (!pairedDocumentsResult?.dtdResult?.rows || pairedDocumentsResult.dtdResult.rows.length === 0) {
492
501
  ShowAlert({
493
- message: "Nessun documento abbinato trovato.",
502
+ message: SDKUI_Localizator.NoDocumentMatchFound,
494
503
  mode: 'warning',
495
- title: 'Disabbina documenti molti a molti',
504
+ title: SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
496
505
  duration: 5000
497
506
  });
498
507
  return;
@@ -514,9 +523,9 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
514
523
  const sq = await searchEngine.SearchByIDAsync(qd);
515
524
  if (!sq?.dtdResult?.rows || sq.dtdResult.rows.length === 0) {
516
525
  ShowAlert({
517
- message: "Nessun documento trovato.",
526
+ message: SDKUI_Localizator.NoDcmtFound,
518
527
  mode: 'warning',
519
- title: 'Abbina documenti molti a molti',
528
+ title: SDKUI_Localizator.MatchManyDocumentsManyToMany,
520
529
  duration: 5000
521
530
  });
522
531
  openPairSearchModal(relation, targetTID, qd);
@@ -539,9 +548,9 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
539
548
  };
540
549
  if (filteredRows.length === 0) {
541
550
  ShowAlert({
542
- message: "Nessun documento da abbinare. Tutti i documenti risultanti sono già abbinati.",
551
+ message: SDKUI_Localizator.NoDocumentToMatch,
543
552
  mode: 'warning',
544
- title: 'Abbina documenti molti a molti',
553
+ title: SDKUI_Localizator.MatchManyDocumentsManyToMany,
545
554
  duration: 5000
546
555
  });
547
556
  openPairSearchModal(relation, targetTID, qd);
@@ -560,10 +569,10 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
560
569
  if (!relations.some(r => r.relationType === RelationTypes.ManyToMany)) {
561
570
  ShowAlert({
562
571
  message: isPairing
563
- ? "Nessuna relazione di abbinamento molti a molti definita nel sistema."
564
- : "Nessuna relazione di disabbinamento molti a molti definita nel sistema.",
572
+ ? SDKUI_Localizator.NoManyToManyMatchingRelationshipDefined
573
+ : SDKUI_Localizator.NoManyToManyUnmatchingRelationshipDefined,
565
574
  mode: 'warning',
566
- title: isPairing ? 'Abbina documenti molti a molti' : 'Disabbina documenti molti a molti',
575
+ title: isPairing ? SDKUI_Localizator.MatchManyDocumentsManyToMany : SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
567
576
  duration: 5000
568
577
  });
569
578
  return;
@@ -572,10 +581,10 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
572
581
  if (!manyToManyRels.some(r => r.masterTID === selectedSearchResult?.fromTID || r.detailTID === selectedSearchResult?.fromTID)) {
573
582
  ShowAlert({
574
583
  message: isPairing
575
- ? "Nessuna relazione di abbinamento molti a molti definita per il tipo di documento selezionato."
576
- : "Nessuna relazione di disabbinamento molti a molti definita per il tipo di documento selezionato.",
584
+ ? SDKUI_Localizator.NoManyToManyMatchingRelationshipDefinedForSelectedDocumentType
585
+ : SDKUI_Localizator.NoManyToManyUnmatchingRelationshipDefinedForSelectedDocumentType,
577
586
  mode: 'warning',
578
- title: isPairing ? 'Abbina documenti molti a molti' : 'Disabbina documenti molti a molti',
587
+ title: isPairing ? SDKUI_Localizator.MatchManyDocumentsManyToMany : SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
579
588
  duration: 5000
580
589
  });
581
590
  return;
package/lib/ts/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from "react";
2
2
  import { FileFormats, ITopMediaSession, MetadataDescriptor, MetadataValueDescriptor, UserDescriptor, ValidationItem } from "@topconsultnpm/sdk-ts";
3
3
  import { ITMEditorBase } from "../components/base/TMEditorBase";
4
- import { IColumnProps } from "devextreme-react/cjs/data-grid";
4
+ import { IColumnProps } from "devextreme-react/data-grid";
5
5
  export declare enum FormModes {
6
6
  None = 0,
7
7
  Create = 1,
@@ -112,6 +112,7 @@ export type TaskContext = {
112
112
  dossier?: {
113
113
  id: number;
114
114
  name: string;
115
+ origin?: string;
115
116
  };
116
117
  document?: {
117
118
  tid: number;
@@ -172,6 +173,7 @@ export interface ITMSaveFormBaseProps {
172
173
  customTooltipSaveButton?: string;
173
174
  showBackButton?: boolean;
174
175
  showUndoButton?: boolean;
176
+ showCloseButton?: boolean;
175
177
  showWarningsCount?: boolean;
176
178
  showErrorCount?: boolean;
177
179
  hasNavigation?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.19.0-dev2.5",
3
+ "version": "6.19.0-dev2.50",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -21,12 +21,12 @@
21
21
  "@storybook/react-vite": "^10.1.0",
22
22
  "@types/htmlparser2": "^3.10.7",
23
23
  "@types/node": "^20.2.5",
24
- "@types/react": "^18.2.7",
25
- "@types/react-dom": "^18.2.4",
24
+ "@types/react": "^18.3.3",
25
+ "@types/react-dom": "^18.3.3",
26
26
  "copyfiles": "^2.4.1",
27
27
  "esbuild": "^0.25.0",
28
- "react": "^18.2.0",
29
- "react-dom": "^18.2.0",
28
+ "react": "^18.3.1",
29
+ "react-dom": "^18.3.1",
30
30
  "storybook": "^10.1.0",
31
31
  "typescript": "^5.9.3",
32
32
  "vite": "^6.1.1"
@@ -39,10 +39,10 @@
39
39
  "lib"
40
40
  ],
41
41
  "dependencies": {
42
- "@topconsultnpm/sdk-ts": "6.19.0-dev2.3",
42
+ "@topconsultnpm/sdk-ts": "6.19.0-dev2.5",
43
43
  "buffer": "^6.0.3",
44
- "devextreme": "25.1.4",
45
- "devextreme-react": "25.1.4",
44
+ "devextreme": "25.1.7",
45
+ "devextreme-react": "25.1.7",
46
46
  "exceljs": "^4.4.0",
47
47
  "htmlparser2": "^10.0.0",
48
48
  "react-router-dom": "^6.15.0",