@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.
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +4 -4
- package/lib/components/base/Styled.d.ts +1 -1
- package/lib/components/base/TMButton.d.ts +13 -0
- package/lib/components/base/TMButton.js +137 -5
- 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/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 +1 -1
- 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/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 +2 -1
- package/lib/components/features/documents/TMDcmtPreview.d.ts +1 -1
- 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/TMMergeToPdfForm.d.ts +2 -1
- 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/TMSearch.js +29 -16
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +1 -1
- package/lib/components/features/search/TMSearchQueryPanel.js +28 -7
- 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/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 +1 -1
- 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/settings/SettingsAppearance.d.ts +2 -1
- package/lib/components/sidebar/TMAboutApp.d.ts +2 -1
- 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/helper/SDKUI_Localizator.d.ts +2 -0
- package/lib/helper/SDKUI_Localizator.js +20 -0
- package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
- package/lib/helper/TMIcons.d.ts +279 -279
- package/lib/helper/TMPdfViewer.d.ts +2 -1
- package/lib/helper/TMToppyMessage.d.ts +2 -2
- package/lib/helper/TMUtils.d.ts +1 -1
- package/lib/helper/helpers.d.ts +12 -1
- package/lib/helper/helpers.js +32 -0
- package/lib/hooks/useInputDialog.d.ts +2 -1
- package/lib/services/platform_services.d.ts +3 -2
- 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) =>
|
|
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
|
@@ -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;
|
package/lib/helper/helpers.d.ts
CHANGED
|
@@ -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
|
|
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;
|
package/lib/helper/helpers.js
CHANGED
|
@@ -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: () =>
|
|
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.22.0-dev2.
|
|
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.
|
|
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",
|