@topconsultnpm/sdkui-react 6.21.0-dev4.8 → 6.21.0-dev5.1
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.
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +43 -19
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +79 -27
- package/lib/components/base/Styled.d.ts +77 -41
- package/lib/components/base/TMCounterBar.d.ts +2 -2
- package/lib/components/base/TMCounterContainer.d.ts +2 -1
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMDataGridExportForm.d.ts +2 -1
- package/lib/components/base/TMFileManager.d.ts +2 -1
- package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -1
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
- package/lib/components/base/TMFileManagerUtils.d.ts +6 -2
- package/lib/components/base/TMLayout.d.ts +4 -4
- package/lib/components/base/TMList.d.ts +2 -1
- package/lib/components/base/TMListView.d.ts +1 -1
- package/lib/components/base/TMSpinner.d.ts +2 -1
- package/lib/components/base/TMTab.d.ts +4 -3
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTreeView.d.ts +21 -16
- package/lib/components/base/TMTreeView.js +230 -64
- package/lib/components/base/TMUserAvatar.d.ts +2 -1
- package/lib/components/base/TMVilViewer.d.ts +2 -1
- package/lib/components/base/TMWaitPanel.d.ts +3 -2
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
- package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +2 -1
- package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +2 -1
- package/lib/components/choosers/TMRelationChooser.d.ts +3 -3
- package/lib/components/choosers/TMUserChooser.d.ts +2 -2
- package/lib/components/editors/TMEditorStyled.d.ts +42 -10
- package/lib/components/editors/TMFormulaEditor.d.ts +1 -1
- package/lib/components/editors/TMHtmlContentDisplay.d.ts +2 -1
- package/lib/components/editors/TMHtmlEditor.d.ts +2 -1
- package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -1
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtIcon.d.ts +4 -1
- package/lib/components/features/documents/TMDcmtIcon.js +5 -32
- package/lib/components/features/documents/TMDcmtPreview.d.ts +6 -4
- package/lib/components/features/documents/TMDcmtTasks.d.ts +2 -1
- package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
- package/lib/components/features/documents/TMFileUploader.js +1 -1
- package/lib/components/features/documents/TMMasterDetailDcmts.js +50 -11
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +2 -1
- package/lib/components/features/documents/TMMergeToPdfForm.js +91 -48
- package/lib/components/features/documents/TMRelationViewer.d.ts +12 -10
- package/lib/components/features/documents/TMRelationViewer.js +400 -96
- package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +4 -3
- package/lib/components/features/documents/copyAndMergeDcmtsShared.js +47 -23
- package/lib/components/features/documents/mergePdfUtils.d.ts +52 -0
- package/lib/components/features/documents/mergePdfUtils.js +268 -0
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +2 -1
- package/lib/components/features/search/TMMetadataOutputForm.d.ts +2 -1
- package/lib/components/features/search/TMMetadataSorterForm.d.ts +2 -1
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +3 -3
- package/lib/components/features/search/TMSearchResult.js +20 -5
- package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
- package/lib/components/features/search/TMSignatureInfoContent.d.ts +2 -1
- package/lib/components/features/search/TMViewHistoryDcmt.d.ts +2 -1
- package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
- package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
- package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
- package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
- package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +3 -2
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +8 -7
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +1 -1
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +1 -1
- package/lib/components/forms/Login/Chooser.d.ts +2 -2
- package/lib/components/forms/TMChooserForm.d.ts +2 -1
- package/lib/components/forms/TMSaveForm.d.ts +4 -4
- package/lib/components/grids/TMBlogAttachments.d.ts +2 -1
- package/lib/components/grids/TMBlogHeader.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.d.ts +1 -1
- package/lib/components/grids/TMBlogsPostUtils.d.ts +9 -9
- package/lib/components/grids/TMValidationItemsList.d.ts +2 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +2 -1
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +6 -3
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
- package/lib/components/pages/TMPage.d.ts +1 -1
- package/lib/components/query/TMQueryEditor.d.ts +10 -6
- package/lib/components/settings/SettingsAppearance.d.ts +2 -1
- package/lib/components/sidebar/TMAboutApp.d.ts +2 -1
- package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -2
- package/lib/components/sidebar/TMHeader.d.ts +3 -3
- package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -2
- package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +3 -2
- package/lib/components/viewers/TMMidViewer.d.ts +2 -2
- package/lib/components/viewers/TMTidViewer.d.ts +2 -2
- package/lib/components/viewers/TMTidViewer.js +14 -2
- package/lib/helper/SDKUI_Globals.d.ts +1 -0
- package/lib/helper/SDKUI_Globals.js +1 -0
- package/lib/helper/SDKUI_Localizator.d.ts +28 -0
- package/lib/helper/SDKUI_Localizator.js +292 -12
- package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
- package/lib/helper/TMIcons.d.ts +278 -278
- package/lib/helper/TMPdfViewer.d.ts +2 -1
- package/lib/helper/TMToppyMessage.d.ts +2 -2
- package/lib/helper/TMUtils.d.ts +37 -5
- package/lib/helper/TMUtils.js +104 -1
- package/lib/helper/helpers.d.ts +1 -1
- package/lib/helper/helpers.js +9 -0
- package/lib/hooks/useDocumentOperations.js +1 -1
- package/lib/hooks/useInputDialog.d.ts +2 -1
- package/lib/services/platform_services.d.ts +3 -2
- package/package.json +3 -4
|
@@ -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) =>
|
|
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) =>
|
|
7
|
+
declare const TMToppyMessage: (props: TMToppyMessageProps) => React.JSX.Element;
|
|
8
8
|
export default TMToppyMessage;
|
package/lib/helper/TMUtils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FileItem } from '../components';
|
|
3
|
-
import { AppModules, DataColumnDescriptor, DcmtTypeDescriptor, PdGs, SearchResultDescriptor } from '@topconsultnpm/sdk-ts';
|
|
3
|
+
import { AppModules, DataColumnDescriptor, DcmtTypeDescriptor, MetadataDescriptor, PdGs, SearchResultDescriptor } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
/**
|
|
5
5
|
* Estensioni di firma/marca temporale note che possono avvolgere altre estensioni.
|
|
6
6
|
* Es: file.pdf.p7m, file.xml.p7m, file.docx.p7m, file.xml.p7m.ts
|
|
@@ -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) =>
|
|
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;
|
|
@@ -46,9 +46,9 @@ interface TabItemProps {
|
|
|
46
46
|
$isSelected: boolean;
|
|
47
47
|
$activeGradient?: string;
|
|
48
48
|
}
|
|
49
|
-
export declare const StyledTabItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components
|
|
50
|
-
export declare const StyledTabIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components
|
|
51
|
-
export declare const TMCountBadge: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never
|
|
49
|
+
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;
|
|
50
|
+
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;
|
|
51
|
+
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;
|
|
52
52
|
export declare const PDGS_COLORS: {
|
|
53
53
|
DOSSIER: string;
|
|
54
54
|
DOCUMENT: string;
|
|
@@ -77,4 +77,36 @@ type DcmtFormToolbarVisibility = {
|
|
|
77
77
|
};
|
|
78
78
|
export declare const getDcmtFormToolbarVisibility: (appModuleID: AppModules) => DcmtFormToolbarVisibility;
|
|
79
79
|
export declare const isConvertibleToPdfExt: (ext: string | undefined | null) => boolean;
|
|
80
|
+
/** Valore metadato con descrittore (da searchResultToDataSource) */
|
|
81
|
+
export interface DcmtMetadataValue {
|
|
82
|
+
md?: MetadataDescriptor;
|
|
83
|
+
value: any;
|
|
84
|
+
}
|
|
85
|
+
/** Documento con metadati indicizzati per nome */
|
|
86
|
+
export interface DcmtMetadataMap {
|
|
87
|
+
[key: string]: DcmtMetadataValue;
|
|
88
|
+
rowIndex?: any;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Restituisce le chiavi dei metadati da visualizzare come descrizione documento.
|
|
92
|
+
* Priorità: 1) SYS_Abstract 2) isSpecialSearchOutput=true 3) primi 5 metadati non di sistema
|
|
93
|
+
*/
|
|
94
|
+
export declare const buildDcmtDisplayName: (obj: DcmtMetadataMap | null | undefined) => Array<string>;
|
|
95
|
+
/** Metodo utilizzato per determinare i metadati da visualizzare come descrizione documento */
|
|
96
|
+
export declare enum DcmtDisplayNameMethod {
|
|
97
|
+
/** Nessun metadato disponibile */
|
|
98
|
+
None = "None",
|
|
99
|
+
/** Campo SYS_Abstract presente */
|
|
100
|
+
SysAbstract = "SysAbstract",
|
|
101
|
+
/** Metadati con isSpecialSearchOutput = true */
|
|
102
|
+
SpecialSearchOutput = "SpecialSearchOutput",
|
|
103
|
+
/** Primi 5 metadati non di sistema con permesso canView */
|
|
104
|
+
FirstViewableMetadata = "FirstViewableMetadata"
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Analizza un DcmtTypeDescriptor e restituisce la stringa descrittiva del metodo di visualizzazione.
|
|
108
|
+
* Priorità: 1) SYS_Abstract 2) isSpecialSearchOutput=true 3) primi 5 metadati non di sistema (default)
|
|
109
|
+
* Se i metadati non sono presenti nel dtd, li recupera dalla cache.
|
|
110
|
+
*/
|
|
111
|
+
export declare const getDTDDisplayNameInfo: (dtd: DcmtTypeDescriptor | undefined) => Promise<string>;
|
|
80
112
|
export {};
|
package/lib/helper/TMUtils.js
CHANGED
|
@@ -2,7 +2,7 @@ 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
4
|
import { IconCADossier, IconKey, IconMenuCAWorkingGroups } from './TMIcons';
|
|
5
|
-
import { AppModules, DataListCacheService, LicenseModuleStatus, MetadataDataDomains, PdGs, SDK_Globals } from '@topconsultnpm/sdk-ts';
|
|
5
|
+
import { AccessLevels, AppModules, DataListCacheService, DcmtTypeListCacheService, LicenseModuleStatus, MetadataDataDomains, PdGs, SDK_Globals, SystemMIDs } from '@topconsultnpm/sdk-ts';
|
|
6
6
|
import { SDKUI_Localizator } from './SDKUI_Localizator';
|
|
7
7
|
/**
|
|
8
8
|
* Estensioni di firma/marca temporale note che possono avvolgere altre estensioni.
|
|
@@ -430,3 +430,106 @@ export const isConvertibleToPdfExt = (ext) => {
|
|
|
430
430
|
'eml', 'msg'
|
|
431
431
|
].includes(normalized);
|
|
432
432
|
};
|
|
433
|
+
/**
|
|
434
|
+
* Restituisce le chiavi dei metadati da visualizzare come descrizione documento.
|
|
435
|
+
* Priorità: 1) SYS_Abstract 2) isSpecialSearchOutput=true 3) primi 5 metadati non di sistema
|
|
436
|
+
*/
|
|
437
|
+
export const buildDcmtDisplayName = (obj) => {
|
|
438
|
+
try {
|
|
439
|
+
if (!obj)
|
|
440
|
+
return [];
|
|
441
|
+
const sysAbstractKey = Object.keys(obj).find(k => k.toUpperCase() === 'SYS_ABSTRACT');
|
|
442
|
+
if (sysAbstractKey) {
|
|
443
|
+
if (obj[sysAbstractKey]?.value) {
|
|
444
|
+
return [sysAbstractKey];
|
|
445
|
+
}
|
|
446
|
+
// SYS_Abstract esiste ma è vuoto: usa DID se presente, altrimenti continua con la logica standard
|
|
447
|
+
const didKey = Object.keys(obj).find(k => k.toUpperCase() === 'DID');
|
|
448
|
+
if (didKey && obj[didKey]?.value) {
|
|
449
|
+
return [didKey];
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
const keys = Object.keys(obj);
|
|
453
|
+
const sysMIDs = Object.values(SystemMIDs).map(o => o.toUpperCase());
|
|
454
|
+
const viewableMetadataKeys = keys.filter(k => obj?.[k]?.value &&
|
|
455
|
+
obj?.[k]?.md?.perm?.canView === AccessLevels.Yes &&
|
|
456
|
+
!sysMIDs.includes(k.toUpperCase()) &&
|
|
457
|
+
k !== "rowIndex" &&
|
|
458
|
+
k !== "ISLEXPROT");
|
|
459
|
+
// Metadati con isSpecialSearchOutput = true
|
|
460
|
+
const specialOutputKeys = viewableMetadataKeys.filter(k => obj?.[k]?.md?.isSpecialSearchOutput === true);
|
|
461
|
+
if (specialOutputKeys.length > 0) {
|
|
462
|
+
return specialOutputKeys;
|
|
463
|
+
}
|
|
464
|
+
if (viewableMetadataKeys.length > 0) {
|
|
465
|
+
return viewableMetadataKeys.slice(0, 5);
|
|
466
|
+
}
|
|
467
|
+
// Fallback: se tutti i metadati personalizzati sono vuoti, usa DID
|
|
468
|
+
const didKey = Object.keys(obj).find(k => k.toUpperCase() === 'DID');
|
|
469
|
+
if (didKey && obj[didKey]?.value) {
|
|
470
|
+
return [didKey];
|
|
471
|
+
}
|
|
472
|
+
return [];
|
|
473
|
+
}
|
|
474
|
+
catch (error) {
|
|
475
|
+
console.error('buildDcmtDisplayName error:', error);
|
|
476
|
+
return [];
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
/** Metodo utilizzato per determinare i metadati da visualizzare come descrizione documento */
|
|
480
|
+
export var DcmtDisplayNameMethod;
|
|
481
|
+
(function (DcmtDisplayNameMethod) {
|
|
482
|
+
/** Nessun metadato disponibile */
|
|
483
|
+
DcmtDisplayNameMethod["None"] = "None";
|
|
484
|
+
/** Campo SYS_Abstract presente */
|
|
485
|
+
DcmtDisplayNameMethod["SysAbstract"] = "SysAbstract";
|
|
486
|
+
/** Metadati con isSpecialSearchOutput = true */
|
|
487
|
+
DcmtDisplayNameMethod["SpecialSearchOutput"] = "SpecialSearchOutput";
|
|
488
|
+
/** Primi 5 metadati non di sistema con permesso canView */
|
|
489
|
+
DcmtDisplayNameMethod["FirstViewableMetadata"] = "FirstViewableMetadata";
|
|
490
|
+
})(DcmtDisplayNameMethod || (DcmtDisplayNameMethod = {}));
|
|
491
|
+
/**
|
|
492
|
+
* Analizza un DcmtTypeDescriptor e restituisce la stringa descrittiva del metodo di visualizzazione.
|
|
493
|
+
* Priorità: 1) SYS_Abstract 2) isSpecialSearchOutput=true 3) primi 5 metadati non di sistema (default)
|
|
494
|
+
* Se i metadati non sono presenti nel dtd, li recupera dalla cache.
|
|
495
|
+
*/
|
|
496
|
+
export const getDTDDisplayNameInfo = async (dtd) => {
|
|
497
|
+
try {
|
|
498
|
+
if (!dtd) {
|
|
499
|
+
return SDKUI_Localizator.DisplayNameMethod_Top5;
|
|
500
|
+
}
|
|
501
|
+
// Recupera i metadati dalla cache se non presenti nel dtd
|
|
502
|
+
let metadata = dtd.metadata;
|
|
503
|
+
if (!metadata || metadata.length === 0) {
|
|
504
|
+
const cachedDtd = await DcmtTypeListCacheService.GetAsync(dtd.id);
|
|
505
|
+
metadata = cachedDtd?.metadata;
|
|
506
|
+
}
|
|
507
|
+
if (!metadata || metadata.length === 0) {
|
|
508
|
+
return SDKUI_Localizator.DisplayNameMethod_Top5;
|
|
509
|
+
}
|
|
510
|
+
const sysMIDs = Object.values(SystemMIDs).map(o => o.toUpperCase());
|
|
511
|
+
// 1) Cerca SYS_Abstract
|
|
512
|
+
const sysAbstract = metadata.find(md => md.name?.toUpperCase() === 'SYS_ABSTRACT');
|
|
513
|
+
if (sysAbstract) {
|
|
514
|
+
return SDKUI_Localizator.DisplayNameMethod_Abstract;
|
|
515
|
+
}
|
|
516
|
+
// Filtra metadati non di sistema con permesso canView
|
|
517
|
+
const viewableMetadata = metadata.filter(md => md.perm?.canView === AccessLevels.Yes &&
|
|
518
|
+
md.name &&
|
|
519
|
+
!sysMIDs.includes(md.name.toUpperCase()));
|
|
520
|
+
// 2) Cerca metadati con isSpecialSearchOutput = true
|
|
521
|
+
const specialOutputMetadata = viewableMetadata.filter(md => md.isSpecialSearchOutput === true);
|
|
522
|
+
if (specialOutputMetadata.length > 0) {
|
|
523
|
+
const metadataNames = specialOutputMetadata.map(md => md.nameLoc || md.name).filter(Boolean).join(', ');
|
|
524
|
+
const maxLength = 50;
|
|
525
|
+
const truncatedNames = metadataNames.length > maxLength ? metadataNames.substring(0, maxLength) + '...' : metadataNames;
|
|
526
|
+
return `${SDKUI_Localizator.Search_Special} (${truncatedNames})`;
|
|
527
|
+
}
|
|
528
|
+
// 3) Default: primi 5 metadati non di sistema
|
|
529
|
+
return SDKUI_Localizator.DisplayNameMethod_Top5;
|
|
530
|
+
}
|
|
531
|
+
catch (error) {
|
|
532
|
+
console.error('getDTDDisplayNameInfo error:', error);
|
|
533
|
+
return SDKUI_Localizator.DisplayNameMethod_Top5;
|
|
534
|
+
}
|
|
535
|
+
};
|
package/lib/helper/helpers.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export { openApps, calcResponsiveDirection, calcResponsiveSizes, taskModalSizes,
|
|
|
52
52
|
export declare function moduleVersion(module: moduleTypes): string;
|
|
53
53
|
export declare function buildtype(module: moduleTypes): string;
|
|
54
54
|
export declare const highlightText: (text: string, searchValue: string) => JSX.Element;
|
|
55
|
-
export declare const renderHighlightedText: (text: string, searchText: string, isSelected: boolean) => string | (string | import("react
|
|
55
|
+
export declare const renderHighlightedText: (text: string, searchText: string, isSelected: boolean) => string | (string | import("react").JSX.Element)[];
|
|
56
56
|
export declare function versionAndBuildtypeInfo(module: moduleTypes): string;
|
|
57
57
|
export declare const getListMaxItems: (deviceType: DeviceType | undefined) => number;
|
|
58
58
|
export declare const svgToString: (icon: React.ReactElement) => string;
|
package/lib/helper/helpers.js
CHANGED
|
@@ -461,6 +461,15 @@ export const extensionHandler = (fileExt) => {
|
|
|
461
461
|
case 'docx':
|
|
462
462
|
case 'docx.p7m':
|
|
463
463
|
case 'docx.p7m.ts': return FileExtensionHandler.CONVERTIBLE;
|
|
464
|
+
case 'dotm':
|
|
465
|
+
case 'dotm.p7m':
|
|
466
|
+
case 'dotm.p7m.ts': return FileExtensionHandler.CONVERTIBLE;
|
|
467
|
+
case 'docm':
|
|
468
|
+
case 'docm.p7m':
|
|
469
|
+
case 'docm.p7m.ts': return FileExtensionHandler.CONVERTIBLE;
|
|
470
|
+
case 'dotx':
|
|
471
|
+
case 'dotx.p7m':
|
|
472
|
+
case 'dotx.p7m.ts': return FileExtensionHandler.CONVERTIBLE;
|
|
464
473
|
case 'xls':
|
|
465
474
|
case 'xls.p7m':
|
|
466
475
|
case 'xls.p7m.ts': return FileExtensionHandler.CONVERTIBLE;
|
|
@@ -1443,7 +1443,7 @@ export const useDocumentOperations = (props) => {
|
|
|
1443
1443
|
updateBatchUpdateForm(false);
|
|
1444
1444
|
setIsModifiedBatchUpdate(false);
|
|
1445
1445
|
await onRefreshDataRowsAsync?.();
|
|
1446
|
-
}, onStatusChanged: (isModified) => { setIsModifiedBatchUpdate(isModified); } }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, selectedItems: approvalVID ? selectedDcmtInfos.map(item => ({ ...item, TID: approvalVID })) : selectedDcmtInfos, isReject: 0, onClose: () => updateShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, selectedItems: approvalVID ? selectedDcmtInfos.map(item => ({ ...item, TID: approvalVID })) : selectedDcmtInfos, isReject: 1, onClose: () => updateShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, selectedItems: approvalVID ? selectedDcmtInfos.map(item => ({ ...item, TID: approvalVID })) : selectedDcmtInfos, onClose: () => updateShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { fromDTD: dtd, TID: contextConfig.approvalTID, DID: focusedItem?.DID, deviceType: deviceType, onCompleted: handleWFOperationCompleted, onClose: () => updateShowMoreInfoPopup(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, triggerBlogRefresh: onRefreshBlogDatagrid }), openCopyToFolderForm.open && openCopyToFolderForm.operationType === 'mergeToPdf' && _jsx(TMMergeToPdfForm, { mode: openCopyToFolderForm.mode, selectedDcmtInfos: selectedDcmtInfos, onClose: () => setOpenCopyToFolderForm({ open: false, operationType: 'copyToFolder', mode: 'onlySelected' }), showTMRelationViewer: showTMRelationViewerInCopyToFolderForm, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), openCopyToFolderForm.open && openCopyToFolderForm.operationType === 'copyToFolder' && _jsx(TMCopyToFolderForm, { mode: openCopyToFolderForm.mode, selectedDcmtInfos: selectedDcmtInfos, onClose: () => setOpenCopyToFolderForm({ open: false, operationType: 'copyToFolder', mode: 'onlySelected' }), showTMRelationViewer: showTMRelationViewerInCopyToFolderForm, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), _jsx(ConfirmFormatDialog, {}), _jsx(ConfirmAttachmentsDialog, {}), _jsx(FileSourceDialog, {}), taskFormDialogComponent, s4TViewerDialogComponent, currentCustomButton && _jsx(TMCustomButton, { button: currentCustomButton, formData: currentMetadataValues, selectedItems: selectedItemsFull, onClose: () => setCurrentCustomButton(undefined) })] }));
|
|
1446
|
+
}, onStatusChanged: (isModified) => { setIsModifiedBatchUpdate(isModified); } }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, selectedItems: approvalVID ? selectedDcmtInfos.map(item => ({ ...item, TID: approvalVID })) : selectedDcmtInfos, isReject: 0, onClose: () => updateShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, selectedItems: approvalVID ? selectedDcmtInfos.map(item => ({ ...item, TID: approvalVID })) : selectedDcmtInfos, isReject: 1, onClose: () => updateShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, selectedItems: approvalVID ? selectedDcmtInfos.map(item => ({ ...item, TID: approvalVID })) : selectedDcmtInfos, onClose: () => updateShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { fromDTD: dtd, TID: contextConfig.approvalTID, DID: focusedItem?.DID, deviceType: deviceType, onCompleted: handleWFOperationCompleted, onClose: () => updateShowMoreInfoPopup(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, triggerBlogRefresh: onRefreshBlogDatagrid }), openCopyToFolderForm.open && openCopyToFolderForm.operationType === 'mergeToPdf' && _jsx(TMMergeToPdfForm, { mode: openCopyToFolderForm.mode, selectedDcmtInfos: selectedDcmtInfos, selectedItemsFull: selectedItemsFull, onClose: () => setOpenCopyToFolderForm({ open: false, operationType: 'copyToFolder', mode: 'onlySelected' }), showTMRelationViewer: showTMRelationViewerInCopyToFolderForm, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), openCopyToFolderForm.open && openCopyToFolderForm.operationType === 'copyToFolder' && _jsx(TMCopyToFolderForm, { mode: openCopyToFolderForm.mode, selectedDcmtInfos: selectedDcmtInfos, onClose: () => setOpenCopyToFolderForm({ open: false, operationType: 'copyToFolder', mode: 'onlySelected' }), showTMRelationViewer: showTMRelationViewerInCopyToFolderForm, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), _jsx(ConfirmFormatDialog, {}), _jsx(ConfirmAttachmentsDialog, {}), _jsx(FileSourceDialog, {}), taskFormDialogComponent, s4TViewerDialogComponent, currentCustomButton && _jsx(TMCustomButton, { button: currentCustomButton, formData: currentMetadataValues, selectedItems: selectedItemsFull, onClose: () => setCurrentCustomButton(undefined) })] }));
|
|
1447
1447
|
return {
|
|
1448
1448
|
operationItems: operationItems(),
|
|
1449
1449
|
renderFloatingBar,
|
|
@@ -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: () =>
|
|
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) =>
|
|
17
|
-
static readonly getTooltip: (objClass: ObjectClasses, d: any) =>
|
|
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.21.0-
|
|
3
|
+
"version": "6.21.0-dev5.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"@storybook/addon-docs": "^10.3.5",
|
|
21
21
|
"@storybook/addon-onboarding": "^10.3.5",
|
|
22
22
|
"@storybook/react-vite": "^10.3.5",
|
|
23
|
-
"@types/htmlparser2": "^3.10.7",
|
|
24
23
|
"@types/node": "^24.12.2",
|
|
25
24
|
"@types/react": "^18.3.3",
|
|
26
25
|
"@types/react-dom": "^18.3.3",
|
|
@@ -40,7 +39,7 @@
|
|
|
40
39
|
"lib"
|
|
41
40
|
],
|
|
42
41
|
"dependencies": {
|
|
43
|
-
"@topconsultnpm/sdk-ts": "6.21.0-
|
|
42
|
+
"@topconsultnpm/sdk-ts": "6.21.0-dev5.1",
|
|
44
43
|
"@zip.js/zip.js": "2.8.26",
|
|
45
44
|
"buffer": "^6.0.3",
|
|
46
45
|
"devextreme": "^25.2.6",
|
|
@@ -49,7 +48,7 @@
|
|
|
49
48
|
"htmlparser2": "^10.0.0",
|
|
50
49
|
"pdf-lib": "^1.17.1",
|
|
51
50
|
"react-pdf": "^10.4.1",
|
|
52
|
-
"react-
|
|
51
|
+
"react-window": "^2.2.7",
|
|
53
52
|
"styled-components": "^6.1.1"
|
|
54
53
|
},
|
|
55
54
|
"overrides": {
|