@topconsultnpm/sdkui-react 6.22.0-dev3.20 → 6.22.0-dev3.22

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 (105) hide show
  1. package/lib/components/NewComponents/ContextMenu/styles.d.ts +43 -45
  2. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +60 -67
  3. package/lib/components/base/Styled.d.ts +77 -93
  4. package/lib/components/base/TMCounterBar.d.ts +2 -2
  5. package/lib/components/base/TMCounterContainer.d.ts +1 -2
  6. package/lib/components/base/TMCustomButton.d.ts +1 -1
  7. package/lib/components/base/TMDataGridExportForm.d.ts +1 -2
  8. package/lib/components/base/TMFileManager.d.ts +1 -2
  9. package/lib/components/base/TMFileManagerDataGridView.d.ts +1 -2
  10. package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
  11. package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
  12. package/lib/components/base/TMFileManagerUtils.d.ts +6 -4
  13. package/lib/components/base/TMLayout.d.ts +4 -4
  14. package/lib/components/base/TMList.d.ts +1 -2
  15. package/lib/components/base/TMListView.d.ts +1 -1
  16. package/lib/components/base/TMPanel.js +167 -167
  17. package/lib/components/base/TMSpinner.d.ts +1 -2
  18. package/lib/components/base/TMTab.d.ts +3 -4
  19. package/lib/components/base/TMTabControl.js +208 -208
  20. package/lib/components/base/TMTooltip.d.ts +1 -1
  21. package/lib/components/base/TMTreeView.d.ts +8 -14
  22. package/lib/components/base/TMUserAvatar.d.ts +1 -2
  23. package/lib/components/base/TMVilViewer.d.ts +1 -2
  24. package/lib/components/base/TMWaitPanel.d.ts +2 -3
  25. package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
  26. package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +1 -2
  27. package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +1 -2
  28. package/lib/components/choosers/TMQuickSearchInfo.d.ts +1 -2
  29. package/lib/components/choosers/TMRelationChooser.d.ts +3 -3
  30. package/lib/components/choosers/TMUserChooser.d.ts +2 -2
  31. package/lib/components/editors/TMEditorStyled.d.ts +42 -20
  32. package/lib/components/editors/TMFormulaEditor.d.ts +1 -1
  33. package/lib/components/editors/TMHtmlContentDisplay.d.ts +1 -2
  34. package/lib/components/editors/TMHtmlEditor.d.ts +1 -2
  35. package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
  36. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
  37. package/lib/components/features/blog/TMBlogCommentForm.d.ts +1 -2
  38. package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
  39. package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -2
  40. package/lib/components/features/documents/TMDcmtPreview.d.ts +6 -8
  41. package/lib/components/features/documents/TMDcmtTasks.d.ts +1 -2
  42. package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
  43. package/lib/components/features/documents/TMFileUploader.js +21 -21
  44. package/lib/components/features/documents/TMMasterInfoFields.d.ts +1 -2
  45. package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
  46. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +1 -2
  47. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +4 -4
  48. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +1 -2
  49. package/lib/components/features/search/TMMetadataOutputForm.d.ts +1 -2
  50. package/lib/components/features/search/TMMetadataSorterForm.d.ts +1 -2
  51. package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
  52. package/lib/components/features/search/TMSearch.d.ts +1 -2
  53. package/lib/components/features/search/TMSearchQueryPanel.d.ts +3 -9
  54. package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
  55. package/lib/components/features/search/TMSignatureInfoContent.d.ts +1 -2
  56. package/lib/components/features/search/TMTreeSelector.js +1 -1
  57. package/lib/components/features/search/TMViewHistoryDcmt.d.ts +1 -2
  58. package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
  59. package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
  60. package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
  61. package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
  62. package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
  63. package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
  64. package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
  65. package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
  66. package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +2 -3
  67. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +7 -8
  68. package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +1 -3
  69. package/lib/components/forms/Login/ChangePasswordInputs.d.ts +1 -3
  70. package/lib/components/forms/Login/Chooser.d.ts +2 -2
  71. package/lib/components/forms/TMChooserForm.d.ts +1 -2
  72. package/lib/components/forms/TMSaveForm.d.ts +4 -4
  73. package/lib/components/grids/TMBlogAttachments.d.ts +1 -2
  74. package/lib/components/grids/TMBlogHeader.d.ts +1 -1
  75. package/lib/components/grids/TMBlogsPost.d.ts +1 -1
  76. package/lib/components/grids/TMBlogsPostUtils.d.ts +9 -9
  77. package/lib/components/grids/TMValidationItemsList.d.ts +1 -2
  78. package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -2
  79. package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +2 -2
  80. package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +6 -5
  81. package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
  82. package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
  83. package/lib/components/pages/TMPage.d.ts +1 -1
  84. package/lib/components/query/TMQueryEditor.d.ts +10 -14
  85. package/lib/components/settings/SettingsAppearance.d.ts +1 -2
  86. package/lib/components/sidebar/TMAboutApp.d.ts +1 -2
  87. package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
  88. package/lib/components/sidebar/TMHeader.d.ts +3 -3
  89. package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -3
  90. package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +2 -3
  91. package/lib/components/viewers/TMMidViewer.d.ts +2 -2
  92. package/lib/components/viewers/TMTidViewer.d.ts +2 -2
  93. package/lib/helper/TMAppUpdatedModal.d.ts +1 -2
  94. package/lib/helper/TMAppUpdatedModal.js +93 -93
  95. package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
  96. package/lib/helper/TMIcons.d.ts +280 -280
  97. package/lib/helper/TMPdfViewer.d.ts +1 -2
  98. package/lib/helper/TMToppyMessage.d.ts +2 -2
  99. package/lib/helper/TMUtils.d.ts +4 -10
  100. package/lib/helper/helpers.d.ts +1 -1
  101. package/lib/hooks/useInputDialog.d.ts +1 -2
  102. package/lib/services/caseflow/CaseFlowService.d.ts +15 -5
  103. package/lib/services/caseflow/CaseFlowService.js +24 -13
  104. package/lib/services/platform_services.d.ts +2 -3
  105. package/package.json +2 -2
@@ -1,9 +1,8 @@
1
- import React from "react";
2
1
  interface TMPdfViewerProps {
3
2
  pdfBlob: Blob;
4
3
  title?: string;
5
4
  isResizingActive?: boolean;
6
5
  enableFitToWidth?: boolean;
7
6
  }
8
- declare const TMPdfViewer: (props: TMPdfViewerProps) => React.JSX.Element;
7
+ declare const TMPdfViewer: (props: TMPdfViewerProps) => import("react/jsx-runtime").JSX.Element;
9
8
  export default TMPdfViewer;
@@ -1,8 +1,8 @@
1
- import React, { ReactNode } from 'react';
1
+ import { 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) => React.JSX.Element;
7
+ declare const TMToppyMessage: (props: TMToppyMessageProps) => import("react/jsx-runtime").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) => React.JSX.Element;
27
+ export declare const getFileIcon: (fileExtension: string | undefined, fileCount: number | undefined, tooltipContent?: JSX.Element | string) => import("react/jsx-runtime").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;
@@ -52,15 +52,9 @@ interface TabItemProps {
52
52
  $isSelected: boolean;
53
53
  $activeGradient?: string;
54
54
  }
55
- export declare const StyledTabItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
56
- style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
57
- }, TabItemProps>> & string;
58
- export declare const StyledTabIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "style"> & {
59
- style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
60
- }, TabItemProps>> & string;
61
- export declare const TMCountBadge: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
62
- style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
63
- }> & string;
55
+ export declare const StyledTabItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof TabItemProps> & TabItemProps, never> & Partial<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof TabItemProps> & TabItemProps, never>>> & string;
56
+ export declare const StyledTabIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, keyof TabItemProps> & TabItemProps, never> & Partial<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, keyof TabItemProps> & TabItemProps, never>>> & string;
57
+ export declare const TMCountBadge: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
64
58
  export declare const PDGS_COLORS: {
65
59
  DOSSIER: string;
66
60
  DOCUMENT: string;
@@ -77,7 +77,7 @@ export { openApps, calcResponsiveDirection, calcResponsiveSizes, taskModalSizes,
77
77
  export declare function moduleVersion(module: moduleTypes): string;
78
78
  export declare function buildtype(module: moduleTypes): string;
79
79
  export declare const highlightText: (text: string, searchValue: string) => JSX.Element;
80
- export declare const renderHighlightedText: (text: string, searchText: string, isSelected: boolean) => string | (string | React.JSX.Element)[];
80
+ export declare const renderHighlightedText: (text: string, searchText: string, isSelected: boolean) => string | (string | import("react/jsx-runtime").JSX.Element)[];
81
81
  export declare function versionAndBuildtypeInfo(module: moduleTypes): string;
82
82
  export declare const getListMaxItems: (deviceType: DeviceType | undefined) => number;
83
83
  export declare const svgToString: (icon: React.ReactElement) => string;
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { FileDescriptor, FileFormats } from '@topconsultnpm/sdk-ts';
3
2
  export declare const useInputCvtFormatDialog: () => [() => Promise<FileFormats>, () => JSX.Element];
4
3
  export declare const useFileDialog: () => {
@@ -6,7 +5,7 @@ export declare const useFileDialog: () => {
6
5
  };
7
6
  export declare const useInputAttachmentsDialog: () => {
8
7
  openConfirmAttachmentsDialog: (list: FileDescriptor[]) => Promise<string[] | undefined>;
9
- ConfirmAttachmentsDialog: () => React.JSX.Element | null;
8
+ ConfirmAttachmentsDialog: () => import("react/jsx-runtime").JSX.Element | null;
10
9
  };
11
10
  export type FileSourceType = 'filesystem' | 'scanner-new' | 'scanner-edit' | undefined;
12
11
  export declare const useFileSourceDialog: () => [(hasExistingFile?: boolean) => Promise<FileSourceType>, () => JSX.Element];
@@ -103,6 +103,17 @@ export declare class CaseFlowService {
103
103
  * @returns id della nuova istanza.
104
104
  */
105
105
  static CreateCaseFlowInstance(template: CaseFlowTemplateDescriptor, instanceName: string, instanceDescription: string | undefined, metadataValues: Record<number, string>): Promise<number>;
106
+ /**
107
+ * Avvia un'istanza tramite StartAsync(cftid, id): il backend porta la pratica
108
+ * da `New` a `InProgress` e materializza i workitem della prima azione.
109
+ *
110
+ * NON va chiamata dopo `CreateCaseFlowInstance`: la Create dell'API REST
111
+ * esegue già lo start internamente, quindi un'istanza appena creata è
112
+ * ancora `New` solo nel descrittore inviato, non lato server. Questa resta
113
+ * per le istanze che si trovano davvero in `New` (avvio differito); sulle
114
+ * altre il backend rifiuta.
115
+ */
116
+ static startCaseflow(caseFlowId: number, cftid?: number): Promise<void>;
106
117
  /**
107
118
  * Elimina un'istanza tramite DeleteAsync(cftid, id). Il cftid è preso dal
108
119
  * template fornito (se disponibile) oppure risolto dall'istanza.
@@ -190,11 +201,10 @@ export declare class CaseFlowService {
190
201
  /**
191
202
  * Stato "l'utente corrente segue questa pratica" letto dal descrittore.
192
203
  *
193
- * Restituisce `undefined` quando il descrittore non porta l'informazione —
194
- * cioè SEMPRE, finché il backend non aggiunge `IsFollow` in output a
195
- * `usp_Cfi_RetrieveAll`/`usp_Cfi_Retrieve` e la relativa proprietà al
196
- * contratto. Il tipo è tollerante perché la colonna è un BIT/NUMBER e può
197
- * arrivare come booleano, come 0/1 o come stringa.
204
+ * `isFollow` fa ormai parte del contratto (`CaseFlowInstanceDescriptor`):
205
+ * arriva valorizzato da `usp_Cfi_RetrieveAll`/`usp_Cfi_Retrieve`. Resta
206
+ * `undefined` solo quando il descrittore proviene da una sorgente che non
207
+ * popola il campo.
198
208
  *
199
209
  * Da NON dedurre dalla bacheca Home come fanno pratiche-dossier e gruppi di
200
210
  * lavoro (filtro su `HomeBlogPost.classID`): quella query prende `TOP 30`
@@ -221,6 +221,25 @@ export class CaseFlowService {
221
221
  const id = await engine.CreateAsync(d);
222
222
  return id ?? 0;
223
223
  }
224
+ /**
225
+ * Avvia un'istanza tramite StartAsync(cftid, id): il backend porta la pratica
226
+ * da `New` a `InProgress` e materializza i workitem della prima azione.
227
+ *
228
+ * NON va chiamata dopo `CreateCaseFlowInstance`: la Create dell'API REST
229
+ * esegue già lo start internamente, quindi un'istanza appena creata è
230
+ * ancora `New` solo nel descrittore inviato, non lato server. Questa resta
231
+ * per le istanze che si trovano davvero in `New` (avvio differito); sulle
232
+ * altre il backend rifiuta.
233
+ */
234
+ static async startCaseflow(caseFlowId, cftid) {
235
+ const engine = SDK_Globals.tmSession?.NewCaseFlowInstanceEngine();
236
+ if (!engine)
237
+ throw new Error('Motore delle istanze CaseFlow non disponibile.');
238
+ const resolvedCftid = cftid ?? (await this.getCaseflow(caseFlowId))?.cftid;
239
+ if (resolvedCftid == null)
240
+ throw new Error(`Impossibile risolvere il template (cftid) per l'istanza id=${caseFlowId}.`);
241
+ await engine.StartAsync(resolvedCftid, caseFlowId);
242
+ }
224
243
  /**
225
244
  * Elimina un'istanza tramite DeleteAsync(cftid, id). Il cftid è preso dal
226
245
  * template fornito (se disponibile) oppure risolto dall'istanza.
@@ -490,11 +509,10 @@ export class CaseFlowService {
490
509
  /**
491
510
  * Stato "l'utente corrente segue questa pratica" letto dal descrittore.
492
511
  *
493
- * Restituisce `undefined` quando il descrittore non porta l'informazione —
494
- * cioè SEMPRE, finché il backend non aggiunge `IsFollow` in output a
495
- * `usp_Cfi_RetrieveAll`/`usp_Cfi_Retrieve` e la relativa proprietà al
496
- * contratto. Il tipo è tollerante perché la colonna è un BIT/NUMBER e può
497
- * arrivare come booleano, come 0/1 o come stringa.
512
+ * `isFollow` fa ormai parte del contratto (`CaseFlowInstanceDescriptor`):
513
+ * arriva valorizzato da `usp_Cfi_RetrieveAll`/`usp_Cfi_Retrieve`. Resta
514
+ * `undefined` solo quando il descrittore proviene da una sorgente che non
515
+ * popola il campo.
498
516
  *
499
517
  * Da NON dedurre dalla bacheca Home come fanno pratiche-dossier e gruppi di
500
518
  * lavoro (filtro su `HomeBlogPost.classID`): quella query prende `TOP 30`
@@ -503,14 +521,7 @@ export class CaseFlowService {
503
521
  * poi, non esiste nemmeno un ramo nella UNION.
504
522
  */
505
523
  static readFollowFlag(cf) {
506
- const raw = cf.isFollow;
507
- if (typeof raw === 'boolean')
508
- return raw;
509
- if (typeof raw === 'number')
510
- return raw !== 0;
511
- if (raw === '0' || raw === '1')
512
- return raw === '1';
513
- return undefined;
524
+ return cf.isFollow;
514
525
  }
515
526
  // ----- Workitem: movimentazione del flusso -------------------------------
516
527
  //
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { JobTypes, ObjectClasses, ProcessDescriptor, DcmtTypeDescriptor } from "@topconsultnpm/sdk-ts";
3
2
  export declare class PlatformObjectService {
4
3
  static readonly retrieveAllAsync: (objClass: ObjectClasses, refreshCache?: boolean) => Promise<import("@topconsultnpm/sdk-ts").AreaDescriptor[] | import("@topconsultnpm/sdk-ts").NotificationDescriptor[] | import("@topconsultnpm/sdk-ts").RelationDescriptor[] | import("@topconsultnpm/sdk-ts").TaskDescriptor[] | import("@topconsultnpm/sdk-ts").WorkingGroupDescriptor[] | undefined>;
@@ -14,6 +13,6 @@ export declare class PlatformObjectService {
14
13
  static readonly createAsync: (objClass: ObjectClasses, jobType: JobTypes, d: any) => Promise<number | undefined>;
15
14
  static readonly deleteAsync: (objClass: ObjectClasses, id: number) => Promise<number | undefined>;
16
15
  static readonly getName: (objClass: ObjectClasses, jobType?: JobTypes, isPlural?: boolean) => string;
17
- static readonly getIcon: (objClass: ObjectClasses, d: any) => React.JSX.Element;
18
- static readonly getTooltip: (objClass: ObjectClasses, d: any) => React.JSX.Element | null;
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;
19
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.22.0-dev3.20",
3
+ "version": "6.22.0-dev3.22",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -42,7 +42,7 @@
42
42
  "lib"
43
43
  ],
44
44
  "dependencies": {
45
- "@topconsultnpm/sdk-ts": "6.22.0-dev3.4",
45
+ "@topconsultnpm/sdk-ts": "6.22.0-dev3.5",
46
46
  "@zip.js/zip.js": "2.8.26",
47
47
  "buffer": "^6.0.3",
48
48
  "devextreme": "^26.1.4",