@topconsultnpm/sdkui-react 6.22.0-dev2.4 → 6.22.0-dev2.6

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 (92) hide show
  1. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +4 -4
  2. package/lib/components/base/Styled.d.ts +1 -1
  3. package/lib/components/base/TMButton.d.ts +13 -0
  4. package/lib/components/base/TMButton.js +137 -5
  5. package/lib/components/base/TMCounterBar.d.ts +2 -2
  6. package/lib/components/base/TMCounterContainer.d.ts +2 -1
  7. package/lib/components/base/TMCustomButton.d.ts +1 -1
  8. package/lib/components/base/TMDataGridExportForm.d.ts +2 -1
  9. package/lib/components/base/TMFileManager.d.ts +2 -1
  10. package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -1
  11. package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
  12. package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
  13. package/lib/components/base/TMLayout.d.ts +4 -4
  14. package/lib/components/base/TMList.d.ts +2 -1
  15. package/lib/components/base/TMListView.d.ts +1 -1
  16. package/lib/components/base/TMSpinner.d.ts +2 -1
  17. package/lib/components/base/TMTab.d.ts +4 -3
  18. package/lib/components/base/TMTooltip.d.ts +1 -1
  19. package/lib/components/base/TMTreeView.d.ts +1 -1
  20. package/lib/components/base/TMUserAvatar.d.ts +2 -1
  21. package/lib/components/base/TMVilViewer.d.ts +2 -1
  22. package/lib/components/base/TMWaitPanel.d.ts +3 -2
  23. package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
  24. package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +2 -1
  25. package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +2 -1
  26. package/lib/components/choosers/TMRelationChooser.d.ts +3 -3
  27. package/lib/components/choosers/TMUserChooser.d.ts +2 -2
  28. package/lib/components/editors/TMFormulaEditor.d.ts +1 -1
  29. package/lib/components/editors/TMHtmlContentDisplay.d.ts +2 -1
  30. package/lib/components/editors/TMHtmlEditor.d.ts +2 -1
  31. package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
  32. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
  33. package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -1
  34. package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
  35. package/lib/components/features/documents/TMDcmtIcon.d.ts +2 -1
  36. package/lib/components/features/documents/TMDcmtPreview.d.ts +1 -1
  37. package/lib/components/features/documents/TMDcmtTasks.d.ts +2 -1
  38. package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
  39. package/lib/components/features/documents/TMMergeToPdfForm.d.ts +2 -1
  40. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +2 -1
  41. package/lib/components/features/search/TMMetadataOutputForm.d.ts +2 -1
  42. package/lib/components/features/search/TMMetadataSorterForm.d.ts +2 -1
  43. package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
  44. package/lib/components/features/search/TMSearch.js +29 -16
  45. package/lib/components/features/search/TMSearchQueryPanel.d.ts +1 -1
  46. package/lib/components/features/search/TMSearchQueryPanel.js +28 -7
  47. package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
  48. package/lib/components/features/search/TMSignatureInfoContent.d.ts +2 -1
  49. package/lib/components/features/search/TMViewHistoryDcmt.d.ts +2 -1
  50. package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
  51. package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
  52. package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
  53. package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
  54. package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
  55. package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
  56. package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
  57. package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
  58. package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +3 -2
  59. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +8 -7
  60. package/lib/components/forms/Login/Chooser.d.ts +2 -2
  61. package/lib/components/forms/TMChooserForm.d.ts +2 -1
  62. package/lib/components/forms/TMSaveForm.d.ts +4 -4
  63. package/lib/components/grids/TMBlogAttachments.d.ts +2 -1
  64. package/lib/components/grids/TMBlogHeader.d.ts +1 -1
  65. package/lib/components/grids/TMBlogsPost.d.ts +1 -1
  66. package/lib/components/grids/TMBlogsPostUtils.d.ts +9 -9
  67. package/lib/components/grids/TMValidationItemsList.d.ts +2 -1
  68. package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +2 -1
  69. package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +2 -2
  70. package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +1 -1
  71. package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
  72. package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
  73. package/lib/components/pages/TMPage.d.ts +1 -1
  74. package/lib/components/settings/SettingsAppearance.d.ts +2 -1
  75. package/lib/components/sidebar/TMAboutApp.d.ts +2 -1
  76. package/lib/components/sidebar/TMHeader.d.ts +3 -3
  77. package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -2
  78. package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +3 -2
  79. package/lib/components/viewers/TMMidViewer.d.ts +2 -2
  80. package/lib/components/viewers/TMTidViewer.d.ts +2 -2
  81. package/lib/helper/SDKUI_Localizator.d.ts +2 -0
  82. package/lib/helper/SDKUI_Localizator.js +20 -0
  83. package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
  84. package/lib/helper/TMIcons.d.ts +279 -279
  85. package/lib/helper/TMPdfViewer.d.ts +2 -1
  86. package/lib/helper/TMToppyMessage.d.ts +2 -2
  87. package/lib/helper/TMUtils.d.ts +1 -1
  88. package/lib/helper/helpers.d.ts +12 -1
  89. package/lib/helper/helpers.js +32 -0
  90. package/lib/hooks/useInputDialog.d.ts +2 -1
  91. package/lib/services/platform_services.d.ts +3 -2
  92. package/package.json +2 -2
@@ -1,8 +1,9 @@
1
+ import React from "react";
1
2
  interface TMPdfViewerProps {
2
3
  pdfBlob: Blob;
3
4
  title?: string;
4
5
  isResizingActive?: boolean;
5
6
  enableFitToWidth?: boolean;
6
7
  }
7
- declare const TMPdfViewer: (props: TMPdfViewerProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const TMPdfViewer: (props: TMPdfViewerProps) => React.JSX.Element;
8
9
  export default TMPdfViewer;
@@ -1,8 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  interface TMToppyMessageProps {
3
3
  message: ReactNode;
4
4
  titleTooltip?: string;
5
5
  maxWidth?: string;
6
6
  }
7
- declare const TMToppyMessage: (props: TMToppyMessageProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const TMToppyMessage: (props: TMToppyMessageProps) => React.JSX.Element;
8
8
  export default TMToppyMessage;
@@ -24,7 +24,7 @@ export declare const getFullFileExtension: (fileName: string, depth?: number) =>
24
24
  * Es: pdf.p7m.tsd → pdf, pdf.p7m → pdf, pdf → pdf
25
25
  */
26
26
  export declare const getBaseExtension: (ext: string) => string;
27
- export declare const getFileIcon: (fileExtension: string | undefined, fileCount: number | undefined, tooltipContent?: JSX.Element | string) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const getFileIcon: (fileExtension: string | undefined, fileCount: number | undefined, tooltipContent?: JSX.Element | string) => React.JSX.Element;
28
28
  export declare function formatBytes(bytes: number | undefined, decimalPlaces?: number): string;
29
29
  export interface RowData {
30
30
  [key: string]: string | number | null;
@@ -35,6 +35,17 @@ export declare const getDataColumnName: (fromTID: number | undefined, dtColumn:
35
35
  */
36
36
  export declare const generateUniqueColumnKeys: (columns: DataColumnDescriptor[] | undefined, fromTID: number | undefined) => string[];
37
37
  export declare const searchResultDescriptorToSimpleArray: (searchResult: SearchResultDescriptor | undefined) => any[] | undefined;
38
+ /**
39
+ * Unisce ("accoda") il risultato di una nuova ricerca a quello precedente, sullo stesso tipo documento.
40
+ * - Le righe della nuova ricerca vengono messe in cima (più recenti in alto)
41
+ * - Le righe duplicate sono accettate: lo stesso documento può comparire più volte
42
+ * - Aggiorna i contatori globali (dcmtsFound / dcmtsReturned) sul totale unito
43
+ *
44
+ * @param previous Risultato attualmente in memoria (può essere undefined al primo giro)
45
+ * @param next Nuovo risultato appena ottenuto
46
+ * @returns Un nuovo SearchResultDescriptor con le righe unite, oppure il singolo risultato disponibile
47
+ */
48
+ export declare const mergeSearchResultsAppend: (previous: SearchResultDescriptor | undefined, next: SearchResultDescriptor | undefined) => SearchResultDescriptor | undefined;
38
49
  export declare const getCompleteMetadataName: (dcmtTypeName: string | undefined, metadataName: string | undefined) => string;
39
50
  export declare const getQueryCountAsync: (qd: QueryDescriptor, showSpinner: boolean) => Promise<void>;
40
51
  export declare function getTIDByMID(mid: number | undefined, defaultTid?: number): number;
@@ -55,7 +66,7 @@ export { openApps, calcResponsiveDirection, calcResponsiveSizes, taskModalSizes,
55
66
  export declare function moduleVersion(module: moduleTypes): string;
56
67
  export declare function buildtype(module: moduleTypes): string;
57
68
  export declare const highlightText: (text: string, searchValue: string) => JSX.Element;
58
- export declare const renderHighlightedText: (text: string, searchText: string, isSelected: boolean) => string | (string | import("react/jsx-runtime").JSX.Element)[];
69
+ export declare const renderHighlightedText: (text: string, searchText: string, isSelected: boolean) => string | (string | import("react").JSX.Element)[];
59
70
  export declare function versionAndBuildtypeInfo(module: moduleTypes): string;
60
71
  export declare const getListMaxItems: (deviceType: DeviceType | undefined) => number;
61
72
  export declare const svgToString: (icon: React.ReactElement) => string;
@@ -239,6 +239,38 @@ export const searchResultDescriptorToSimpleArray = (searchResult) => {
239
239
  });
240
240
  return result;
241
241
  };
242
+ /**
243
+ * Unisce ("accoda") il risultato di una nuova ricerca a quello precedente, sullo stesso tipo documento.
244
+ * - Le righe della nuova ricerca vengono messe in cima (più recenti in alto)
245
+ * - Le righe duplicate sono accettate: lo stesso documento può comparire più volte
246
+ * - Aggiorna i contatori globali (dcmtsFound / dcmtsReturned) sul totale unito
247
+ *
248
+ * @param previous Risultato attualmente in memoria (può essere undefined al primo giro)
249
+ * @param next Nuovo risultato appena ottenuto
250
+ * @returns Un nuovo SearchResultDescriptor con le righe unite, oppure il singolo risultato disponibile
251
+ */
252
+ export const mergeSearchResultsAppend = (previous, next) => {
253
+ // Se manca uno dei due, non c'è nulla da unire
254
+ if (!next?.dtdResult?.rows?.length)
255
+ return previous;
256
+ if (!previous?.dtdResult?.rows?.length)
257
+ return next;
258
+ // L'accodamento ha senso solo sullo stesso tipo documento (colonne compatibili)
259
+ if (previous.fromTID !== next.fromTID)
260
+ return next;
261
+ const prevRows = previous.dtdResult.rows ?? [];
262
+ const nextRows = next.dtdResult.rows ?? [];
263
+ // Nessuna deduplica: le nuove righe in cima, poi le precedenti (i duplicati sono ammessi)
264
+ const mergedRows = [...nextRows, ...prevRows];
265
+ // Costruisce il nuovo descrittore basandosi sull'ultimo risultato (colonne/qd più recenti), con le righe unite
266
+ const merged = structuredClone(next);
267
+ const mergedDtd = structuredClone(next.dtdResult);
268
+ mergedDtd.rows = mergedRows;
269
+ merged.dtdResult = mergedDtd;
270
+ merged.dcmtsReturned = mergedRows.length;
271
+ merged.dcmtsFound = mergedRows.length;
272
+ return merged;
273
+ };
242
274
  export const getCompleteMetadataName = (dcmtTypeName, metadataName) => `${dcmtTypeName}...${metadataName}`;
243
275
  export const getQueryCountAsync = async (qd, showSpinner) => {
244
276
  try {
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { FileDescriptor, FileFormats } from '@topconsultnpm/sdk-ts';
2
3
  export declare const useInputCvtFormatDialog: () => [() => Promise<FileFormats>, () => JSX.Element];
3
4
  export declare const useFileDialog: () => {
@@ -5,7 +6,7 @@ export declare const useFileDialog: () => {
5
6
  };
6
7
  export declare const useInputAttachmentsDialog: () => {
7
8
  openConfirmAttachmentsDialog: (list: FileDescriptor[]) => Promise<string[] | undefined>;
8
- ConfirmAttachmentsDialog: () => import("react/jsx-runtime").JSX.Element | null;
9
+ ConfirmAttachmentsDialog: () => React.JSX.Element | null;
9
10
  };
10
11
  export type FileSourceType = 'filesystem' | 'scanner-new' | 'scanner-edit' | undefined;
11
12
  export declare const useFileSourceDialog: () => [(hasExistingFile?: boolean) => Promise<FileSourceType>, () => JSX.Element];
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { JobTypes, ObjectClasses, ProcessDescriptor, DcmtTypeDescriptor } from "@topconsultnpm/sdk-ts";
2
3
  export declare class PlatformObjectService {
3
4
  static readonly retrieveAllAsync: (objClass: ObjectClasses, refreshCache?: boolean) => Promise<import("@topconsultnpm/sdk-ts").RelationDescriptor[] | import("@topconsultnpm/sdk-ts").AreaDescriptor[] | import("@topconsultnpm/sdk-ts").NotificationDescriptor[] | import("@topconsultnpm/sdk-ts").TaskDescriptor[] | import("@topconsultnpm/sdk-ts").WorkingGroupDescriptor[] | undefined>;
@@ -13,6 +14,6 @@ export declare class PlatformObjectService {
13
14
  static readonly createAsync: (objClass: ObjectClasses, jobType: JobTypes, d: any) => Promise<number | undefined>;
14
15
  static readonly deleteAsync: (objClass: ObjectClasses, id: number) => Promise<number | undefined>;
15
16
  static readonly getName: (objClass: ObjectClasses, jobType?: JobTypes, isPlural?: boolean) => string;
16
- static readonly getIcon: (objClass: ObjectClasses, d: any) => import("react/jsx-runtime").JSX.Element;
17
- static readonly getTooltip: (objClass: ObjectClasses, d: any) => import("react/jsx-runtime").JSX.Element | null;
17
+ static readonly getIcon: (objClass: ObjectClasses, d: any) => React.JSX.Element;
18
+ static readonly getTooltip: (objClass: ObjectClasses, d: any) => React.JSX.Element | null;
18
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.22.0-dev2.4",
3
+ "version": "6.22.0-dev2.6",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -39,7 +39,7 @@
39
39
  "lib"
40
40
  ],
41
41
  "dependencies": {
42
- "@topconsultnpm/sdk-ts": "6.22.0-dev2.2",
42
+ "@topconsultnpm/sdk-ts": "6.22.0-dev2.3",
43
43
  "@zip.js/zip.js": "2.8.26",
44
44
  "buffer": "^6.0.3",
45
45
  "devextreme": "^25.2.6",