@topconsultnpm/sdkui-react 6.22.0-dev3.8 → 6.22.0-dev4.10
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 -45
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +60 -67
- package/lib/components/base/Styled.d.ts +77 -93
- package/lib/components/base/TMAlert.js +6 -8
- package/lib/components/base/TMAreaManager.js +53 -55
- package/lib/components/base/TMButton.js +4 -2
- package/lib/components/base/TMCounterBar.d.ts +2 -2
- package/lib/components/base/TMCounterContainer.d.ts +4 -3
- package/lib/components/base/TMCounterContainer.js +16 -1
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMCustomButton.js +40 -48
- package/lib/components/base/TMDataGrid.js +243 -223
- package/lib/components/base/TMDataGridExportForm.d.ts +1 -2
- package/lib/components/base/TMFileManager.d.ts +1 -2
- package/lib/components/base/TMFileManagerDataGridView.d.ts +1 -2
- 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 -4
- package/lib/components/base/TMLayout.d.ts +4 -4
- package/lib/components/base/TMList.d.ts +1 -2
- package/lib/components/base/TMListView.d.ts +1 -1
- package/lib/components/base/TMPanel.js +173 -170
- package/lib/components/base/TMSpinner.d.ts +3 -3
- package/lib/components/base/TMSpinner.js +9 -7
- package/lib/components/base/TMTab.d.ts +3 -4
- package/lib/components/base/TMTabControl.d.ts +7 -0
- package/lib/components/base/TMTabControl.js +225 -213
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTreeView.d.ts +8 -14
- package/lib/components/base/TMTreeView.js +20 -0
- package/lib/components/base/TMUserAvatar.d.ts +1 -2
- package/lib/components/base/TMVilViewer.d.ts +1 -2
- package/lib/components/base/TMWaitPanel.d.ts +2 -3
- package/lib/components/base/TMWaitPanel.js +1 -1
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.d.ts +12 -0
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.js +185 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.d.ts +179 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.js +373 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +57 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.js +346 -0
- package/lib/components/base/waitPanel/index.d.ts +1 -0
- package/lib/components/base/waitPanel/index.js +1 -0
- package/lib/components/choosers/TMDistinctValues.js +3 -3
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
- package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +1 -2
- package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +1 -2
- package/lib/components/choosers/TMPathChooser.js +17 -34
- package/lib/components/choosers/TMQuickSearchInfo.d.ts +1 -2
- 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 -20
- package/lib/components/editors/TMFormulaEditor.d.ts +1 -1
- package/lib/components/editors/TMHtmlContentDisplay.d.ts +1 -2
- package/lib/components/editors/TMHtmlEditor.d.ts +1 -2
- package/lib/components/editors/TMTextBox.d.ts +4 -0
- package/lib/components/editors/TMTextBox.js +99 -11
- package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
- package/lib/components/features/archive/TMArchive.js +7 -2
- package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +28 -0
- package/lib/components/features/assistant/TMHelpOnLineChat.js +1231 -0
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +1 -2
- package/lib/components/features/documents/TMBatchUpdateForm.js +3 -4
- package/lib/components/features/documents/TMCopyToFolderForm.js +50 -42
- package/lib/components/features/documents/TMDcmtForm.js +50 -61
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -4
- package/lib/components/features/documents/TMDcmtIcon.js +3 -5
- package/lib/components/features/documents/TMDcmtPreview.d.ts +6 -8
- package/lib/components/features/documents/TMDcmtPreview.js +5 -3
- package/lib/components/features/documents/TMDcmtTasks.d.ts +1 -2
- package/lib/components/features/documents/TMDcmtTasks.js +2 -9
- package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
- package/lib/components/features/documents/TMFileUploader.js +5 -5
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +53 -141
- package/lib/components/features/documents/TMMasterInfoFields.d.ts +1 -2
- package/lib/components/features/documents/TMMasterInfoFields.js +3 -2
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +59 -56
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +1 -2
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +14 -15
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +5 -5
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +3 -3
- package/lib/components/features/documents/TMRelationViewer.d.ts +13 -14
- package/lib/components/features/documents/TMRelationViewer.js +206 -143
- package/lib/components/features/documents/relationTreeState.d.ts +32 -0
- package/lib/components/features/documents/relationTreeState.js +89 -0
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +1 -2
- package/lib/components/features/search/TMMetadataOutputForm.d.ts +1 -2
- package/lib/components/features/search/TMMetadataSorterForm.d.ts +1 -2
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
- package/lib/components/features/search/TMSearch.d.ts +1 -2
- package/lib/components/features/search/TMSearch.js +3 -4
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +3 -9
- package/lib/components/features/search/TMSearchQueryPanel.js +0 -4
- package/lib/components/features/search/TMSearchResult.d.ts +5 -0
- package/lib/components/features/search/TMSearchResult.js +129 -102
- package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
- package/lib/components/features/search/TMSignatureInfoContent.d.ts +1 -2
- package/lib/components/features/search/TMTreeSelector.js +23 -27
- package/lib/components/features/search/TMViewHistoryDcmt.d.ts +1 -2
- package/lib/components/features/search/TMViewHistoryDcmt.js +15 -26
- 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/tasks/TMTasksView.js +97 -90
- package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +2 -3
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +95 -91
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +7 -8
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +1 -3
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +1 -3
- package/lib/components/forms/Login/Chooser.d.ts +2 -2
- package/lib/components/forms/TMChooserForm.d.ts +1 -2
- package/lib/components/forms/TMResultDialog.js +1 -1
- package/lib/components/forms/TMSaveForm.d.ts +4 -4
- package/lib/components/grids/TMBlogAttachments.d.ts +1 -2
- package/lib/components/grids/TMBlogHeader.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.js +93 -97
- package/lib/components/grids/TMBlogsPostUtils.d.ts +9 -9
- package/lib/components/grids/TMValidationItemsList.d.ts +1 -2
- package/lib/components/index.d.ts +5 -1
- package/lib/components/index.js +4 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -2
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +4 -3
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +3 -2
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +5 -1
- package/lib/components/layout/panelManager/TMPanelManagerLoader.d.ts +5 -0
- package/lib/components/layout/panelManager/TMPanelManagerLoader.js +18 -0
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +6 -5
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +4 -8
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.js +2 -1
- package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
- package/lib/components/pages/TMPage.d.ts +1 -1
- package/lib/components/pages/TMPage.js +32 -31
- package/lib/components/query/TMQueryEditor.d.ts +13 -14
- package/lib/components/query/TMQueryEditor.js +2 -1
- package/lib/components/settings/SettingsAppearance.d.ts +1 -2
- package/lib/components/sidebar/TMAboutApp.d.ts +1 -2
- package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
- package/lib/components/sidebar/TMHeader.d.ts +4 -3
- package/lib/components/sidebar/TMHeader.js +2 -2
- package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -3
- package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +2 -3
- package/lib/components/viewers/TMMidViewer.d.ts +2 -2
- package/lib/components/viewers/TMTidViewer.d.ts +2 -2
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/SDKUI_Globals.d.ts +7 -2
- package/lib/helper/SDKUI_Globals.js +7 -2
- package/lib/helper/SDKUI_Localizator.d.ts +31 -6
- package/lib/helper/SDKUI_Localizator.js +301 -51
- package/lib/helper/TMAppUpdatedModal.d.ts +1 -2
- package/lib/helper/TMAppUpdatedModal.js +93 -93
- package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
- package/lib/helper/TMIcons.d.ts +280 -280
- package/lib/helper/TMPdfViewer.d.ts +1 -2
- package/lib/helper/TMToppyMessage.d.ts +2 -2
- package/lib/helper/TMUtils.d.ts +4 -10
- package/lib/helper/ZipManager.d.ts +1 -1
- package/lib/helper/ZipManager.js +2 -1
- package/lib/helper/dcmtsHelper.d.ts +2 -0
- package/lib/helper/dcmtsHelper.js +3 -1
- package/lib/helper/helpers.d.ts +1 -1
- package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
- package/lib/hooks/useCheckInOutOperations.js +14 -34
- package/lib/hooks/useDcmtOperations.d.ts +3 -12
- package/lib/hooks/useDcmtOperations.js +201 -184
- package/lib/hooks/useDocumentOperations.d.ts +1 -0
- package/lib/hooks/useDocumentOperations.js +14 -25
- package/lib/hooks/useInputDialog.d.ts +1 -2
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +0 -15
- package/lib/hooks/useMultiMasterDetailDcmts.js +70 -68
- package/lib/hooks/usePreventFileDrop.js +9 -0
- package/lib/hooks/useWorkflowApprove.js +33 -17
- package/lib/services/caseflow/CaseFlowService.d.ts +69 -9
- package/lib/services/caseflow/CaseFlowService.js +126 -58
- package/lib/services/platform_services.d.ts +2 -3
- 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) =>
|
|
7
|
+
declare const TMPdfViewer: (props: TMPdfViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default TMPdfViewer;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
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) =>
|
|
7
|
+
declare const TMToppyMessage: (props: TMToppyMessageProps) => import("react/jsx-runtime").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) => 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
|
|
56
|
-
|
|
57
|
-
|
|
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;
|
|
@@ -19,7 +19,7 @@ export interface ZipCreateOptions {
|
|
|
19
19
|
encryptionStrength?: 1 | 2 | 3;
|
|
20
20
|
/** Commento globale ZIP */
|
|
21
21
|
comment?: string;
|
|
22
|
-
/** Callback progresso: (
|
|
22
|
+
/** Callback progresso, invocata a voce conclusa: (voci completate, totale, nomeFile appena aggiunto) */
|
|
23
23
|
onProgress?: (index: number, total: number, filename: string) => void;
|
|
24
24
|
/** Callback progresso singolo file: (bytesElaborati, bytesTotali) */
|
|
25
25
|
onEntryProgress?: (progress: number, total: number) => void;
|
package/lib/helper/ZipManager.js
CHANGED
|
@@ -50,7 +50,6 @@ export class ZipManager {
|
|
|
50
50
|
throw new DOMException("Operazione annullata", "AbortError");
|
|
51
51
|
}
|
|
52
52
|
const file = files[i];
|
|
53
|
-
onProgress?.(i + 1, total, file.filename);
|
|
54
53
|
const reader = this.createReader(file.data, { BlobReader, TextReader, Uint8ArrayReader });
|
|
55
54
|
await zipWriter.add(file.filename, reader, {
|
|
56
55
|
comment: file.comment,
|
|
@@ -60,6 +59,8 @@ export class ZipManager {
|
|
|
60
59
|
encryptionStrength,
|
|
61
60
|
onprogress: onEntryProgress ? (progress, total) => onEntryProgress(progress, total) : undefined
|
|
62
61
|
});
|
|
62
|
+
// A voce conclusa, non prima: con un solo file la barra partirebbe gia' al 100%.
|
|
63
|
+
onProgress?.(i + 1, total, file.filename);
|
|
63
64
|
}
|
|
64
65
|
const commentBytes = comment ? new TextEncoder().encode(comment) : undefined;
|
|
65
66
|
return await zipWriter.close(commentBytes);
|
|
@@ -2,6 +2,8 @@ import { DcmtTypeDescriptor, MetadataDataTypes, MetadataDescriptor, MetadataForm
|
|
|
2
2
|
import { MetadataValueDescriptorEx } from "../ts";
|
|
3
3
|
/** Metadati utente (esclusi quelli di sistema) del tipo documento, in ordine di visualizzazione */
|
|
4
4
|
export declare const getUserMetadataSorted: (dtd: DcmtTypeDescriptor | undefined) => Array<MetadataDescriptor>;
|
|
5
|
+
/** Metadato visibile all'utente: stessa regola del risultato di ricerca (vedi getQD), serve almeno la visualizzazione o la modifica */
|
|
6
|
+
export declare const canViewMetadata: (md: MetadataDescriptor) => boolean;
|
|
5
7
|
/** Formatta un valore scalare (non lista dati): date e numeri rispettano Format e FormatCulture del metadato */
|
|
6
8
|
export declare const formatScalarValue: (value: any, dataType: MetadataDataTypes | undefined, format: MetadataFormats | undefined, formatCulture: string | undefined) => string;
|
|
7
9
|
/** Check if dcmtType (mTID) has configured Detail or Many-to-Many relations */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MetadataDataTypes, RelationCacheService, RelationTypes, SDK_Globals } from "@topconsultnpm/sdk-ts";
|
|
1
|
+
import { AccessLevels, MetadataDataTypes, RelationCacheService, RelationTypes, SDK_Globals } from "@topconsultnpm/sdk-ts";
|
|
2
2
|
import { formatDateTimeByMetadataFormat, formatNumberByMetadataFormat } from "./TMUtils";
|
|
3
3
|
/** Metadati utente (esclusi quelli di sistema) del tipo documento, in ordine di visualizzazione */
|
|
4
4
|
export const getUserMetadataSorted = (dtd) => {
|
|
@@ -6,6 +6,8 @@ export const getUserMetadataSorted = (dtd) => {
|
|
|
6
6
|
.filter(md => md.id !== undefined && md.id > 100 && md.isSystem !== 1)
|
|
7
7
|
.sort((a, b) => (a.ordinalPosition ?? 0) - (b.ordinalPosition ?? 0));
|
|
8
8
|
};
|
|
9
|
+
/** Metadato visibile all'utente: stessa regola del risultato di ricerca (vedi getQD), serve almeno la visualizzazione o la modifica */
|
|
10
|
+
export const canViewMetadata = (md) => !(md.perm?.canView == AccessLevels.No && md.perm?.canUpdate == AccessLevels.No);
|
|
9
11
|
/** Formatta un valore scalare (non lista dati): date e numeri rispettano Format e FormatCulture del metadato */
|
|
10
12
|
export const formatScalarValue = (value, dataType, format, formatCulture) => {
|
|
11
13
|
if (value === undefined || value === null || value === '')
|
package/lib/helper/helpers.d.ts
CHANGED
|
@@ -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 |
|
|
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;
|
|
@@ -20,11 +20,5 @@ export interface UseCheckInOutOperationsReturn {
|
|
|
20
20
|
copyCheckoutPathToClipboardCallback: (dcmt: DcmtInfo, filename: string) => void;
|
|
21
21
|
handleCheckOutCallback: (dcmt: DcmtInfo, checkout: boolean, filename: string, downloadDcmtsAsync: (params: DownloadDcmtsAsyncParams) => Promise<void>, onRefreshAsync?: (tid: number | undefined, did: number | undefined, refreshUI?: boolean, metadataResult?: SearchResultDescriptor | null) => Promise<void>) => Promise<void>;
|
|
22
22
|
handleCheckInCallback: (dcmt: DcmtInfo, checkoutDate?: string | null, onRefreshAsync?: (tid: number | undefined, did: number | undefined, refreshUI?: boolean, metadataResult?: SearchResultDescriptor | null) => Promise<void>) => Promise<void>;
|
|
23
|
-
showCicoWaitPanel: boolean;
|
|
24
|
-
cicoWaitPanelTitle: string;
|
|
25
|
-
showCicoPrimaryProgress: boolean;
|
|
26
|
-
cicoPrimaryProgressText: string;
|
|
27
|
-
cicoPrimaryProgressValue: number;
|
|
28
|
-
cicoPrimaryProgressMax: number;
|
|
29
23
|
}
|
|
30
24
|
export declare const useCheckInOutOperations: (props: UseCheckInOutOperationsProps) => UseCheckInOutOperationsReturn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from 'react';
|
|
2
2
|
import { cicoDownloadFilesCallback, dcmtsFileCachePreview, getCicoDownloadFileName, getExceptionMessage, removeDcmtsFileCache, renderCicoCheckInContent, SDKUI_Globals, SDKUI_Localizator, updateCicoCheckoutStorageItem, validateCicoFileName } from '../helper';
|
|
3
|
-
import { ButtonNames, DeviceType, ShowAlert, TMMessageBoxManager, TMResultManager, useDeviceType } from '../components';
|
|
3
|
+
import { ButtonNames, DeviceType, ShowAlert, TMMessageBoxManager, TMResultManager, TMWaitPanelManager, useDeviceType } from '../components';
|
|
4
4
|
import { ResultTypes, SDK_Globals } from '@topconsultnpm/sdk-ts';
|
|
5
5
|
let abortController = new AbortController();
|
|
6
6
|
export const useCheckInOutOperations = (props) => {
|
|
@@ -18,18 +18,13 @@ export const useCheckInOutOperations = (props) => {
|
|
|
18
18
|
const deviceType = useDeviceType();
|
|
19
19
|
// This avoids unnecessary re-renders by only recalculating when deviceType changes.
|
|
20
20
|
let isMobile = useMemo(() => { return deviceType === DeviceType.MOBILE; }, [deviceType]);
|
|
21
|
-
//
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const [cicoPrimaryProgressText, setCicoPrimaryProgressText] = useState('');
|
|
29
|
-
// State variable to track the current value of the primary progress indicator in the wait panel
|
|
30
|
-
const [cicoPrimaryProgressValue, setCicoPrimaryProgressValue] = useState(0);
|
|
31
|
-
// State variable to define the maximum value for the primary progress indicator in the wait panel
|
|
32
|
-
const [cicoPrimaryProgressMax, setCicoPrimaryProgressMax] = useState(0);
|
|
21
|
+
// Check in e check out non riportano avanzamento: il pannello e' solo il "sto lavorando".
|
|
22
|
+
const showCicoWaitPanel = (title) => TMWaitPanelManager.show({
|
|
23
|
+
title,
|
|
24
|
+
showCounters: false,
|
|
25
|
+
cancelable: true,
|
|
26
|
+
onAbort: () => abortController.abort(),
|
|
27
|
+
});
|
|
33
28
|
const showHistoryCallback = useCallback(() => {
|
|
34
29
|
setShowHistory(true);
|
|
35
30
|
}, []);
|
|
@@ -73,11 +68,9 @@ export const useCheckInOutOperations = (props) => {
|
|
|
73
68
|
if (e !== ButtonNames.YES)
|
|
74
69
|
return;
|
|
75
70
|
let result = [];
|
|
71
|
+
abortController = new AbortController();
|
|
72
|
+
const panel = showCicoWaitPanel(title);
|
|
76
73
|
try {
|
|
77
|
-
setCicoWaitPanelTitle(title);
|
|
78
|
-
setShowCicoWaitPanel(true);
|
|
79
|
-
setShowCicoPrimaryProgress(true);
|
|
80
|
-
abortController = new AbortController();
|
|
81
74
|
const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
|
|
82
75
|
if (!ue)
|
|
83
76
|
throw new Error("Update Engine not available");
|
|
@@ -113,10 +106,7 @@ export const useCheckInOutOperations = (props) => {
|
|
|
113
106
|
result.push({ rowIndex: 1, id1: dcmt.TID, id2: dcmt.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
|
|
114
107
|
}
|
|
115
108
|
finally {
|
|
116
|
-
|
|
117
|
-
setCicoPrimaryProgressMax(0);
|
|
118
|
-
setCicoPrimaryProgressValue(0);
|
|
119
|
-
setShowCicoWaitPanel(false);
|
|
109
|
+
panel.close();
|
|
120
110
|
TMResultManager.show(result, title, "ID", undefined);
|
|
121
111
|
}
|
|
122
112
|
}
|
|
@@ -158,13 +148,12 @@ export const useCheckInOutOperations = (props) => {
|
|
|
158
148
|
onButtonClick: async (e) => {
|
|
159
149
|
if (e !== ButtonNames.YES)
|
|
160
150
|
return;
|
|
161
|
-
setCicoWaitPanelTitle('Check in');
|
|
162
|
-
setShowCicoWaitPanel(true);
|
|
163
|
-
setShowCicoPrimaryProgress(true);
|
|
164
151
|
abortController = new AbortController();
|
|
165
152
|
let result = [];
|
|
166
153
|
let i = 0;
|
|
167
154
|
if (dcmt.TID && dcmt.DID) {
|
|
155
|
+
// Aperto qui e non prima: fuori da questo ramo nessuno lo chiuderebbe.
|
|
156
|
+
const panel = showCicoWaitPanel('Check in');
|
|
168
157
|
try {
|
|
169
158
|
const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
|
|
170
159
|
if (ue) {
|
|
@@ -187,10 +176,7 @@ export const useCheckInOutOperations = (props) => {
|
|
|
187
176
|
result.push({ rowIndex: i, id1: i, id2: i, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
|
|
188
177
|
}
|
|
189
178
|
finally {
|
|
190
|
-
|
|
191
|
-
setCicoPrimaryProgressMax(0);
|
|
192
|
-
setCicoPrimaryProgressValue(0);
|
|
193
|
-
setShowCicoWaitPanel(false);
|
|
179
|
+
panel.close();
|
|
194
180
|
TMResultManager.show(result, 'Check in', "ID", undefined, SDKUI_Localizator.CheckInSuccessMessage, 6000);
|
|
195
181
|
}
|
|
196
182
|
}
|
|
@@ -211,11 +197,5 @@ export const useCheckInOutOperations = (props) => {
|
|
|
211
197
|
copyCheckoutPathToClipboardCallback,
|
|
212
198
|
handleCheckOutCallback,
|
|
213
199
|
handleCheckInCallback,
|
|
214
|
-
showCicoWaitPanel,
|
|
215
|
-
cicoWaitPanelTitle,
|
|
216
|
-
showCicoPrimaryProgress,
|
|
217
|
-
cicoPrimaryProgressText,
|
|
218
|
-
cicoPrimaryProgressValue,
|
|
219
|
-
cicoPrimaryProgressMax,
|
|
220
200
|
};
|
|
221
201
|
};
|
|
@@ -26,19 +26,10 @@ export interface DownloadDcmtsAsyncParams {
|
|
|
26
26
|
useInputFileName?: boolean;
|
|
27
27
|
}
|
|
28
28
|
export interface UseDcmtOperationsReturn {
|
|
29
|
-
abortController: AbortController;
|
|
30
|
-
showWaitPanel: boolean;
|
|
31
|
-
showPrimary: boolean;
|
|
32
|
-
waitPanelTitle: string;
|
|
33
|
-
waitPanelTextPrimary: string;
|
|
34
|
-
waitPanelValuePrimary: number;
|
|
35
|
-
waitPanelMaxValuePrimary: number;
|
|
36
|
-
showSecondary: boolean;
|
|
37
|
-
waitPanelTextSecondary: string;
|
|
38
|
-
waitPanelValueSecondary: number;
|
|
39
|
-
waitPanelMaxValueSecondary: number;
|
|
40
29
|
downloadDcmtsAsync: (params: DownloadDcmtsAsyncParams) => Promise<void>;
|
|
41
|
-
getDcmtFileAsync: (inputDcmt: DcmtInfo | undefined, rfo: RetrieveFileOptions, operationTitle: string,
|
|
30
|
+
getDcmtFileAsync: (inputDcmt: DcmtInfo | undefined, rfo: RetrieveFileOptions, operationTitle: string,
|
|
31
|
+
/** Ignorato: con un file solo il pannello ha una barra sola, quella dei byte. */
|
|
32
|
+
keepWaitPanelPrimary: boolean, bypassCache?: boolean) => Promise<{
|
|
42
33
|
file: File | undefined;
|
|
43
34
|
isFromCache: boolean;
|
|
44
35
|
} | undefined>;
|