@topconsultnpm/sdkui-react 6.21.0-t1 → 6.21.0-t3
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/TMContextMenu.js +22 -1
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +4 -4
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +10 -10
- package/lib/components/base/Styled.d.ts +1 -1
- package/lib/components/base/TMAccordionNew.d.ts +1 -0
- package/lib/components/base/TMAccordionNew.js +6 -5
- package/lib/components/base/TMAreaManager.js +30 -3
- 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/TMDataGrid.js +14 -4
- package/lib/components/base/TMDataGridExportForm.d.ts +2 -1
- package/lib/components/base/TMDataGridExportForm.js +19 -8
- package/lib/components/base/TMFileManager.d.ts +2 -1
- package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -1
- package/lib/components/base/TMFileManagerDataGridView.js +4 -4
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
- package/lib/components/base/TMFileManagerThumbnailItems.js +3 -3
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
- package/lib/components/base/TMFileManagerUtils.d.ts +7 -0
- package/lib/components/base/TMFileManagerUtils.js +14 -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/TMModal.d.ts +1 -0
- package/lib/components/base/TMModal.js +4 -4
- package/lib/components/base/TMPanel.d.ts +7 -4
- package/lib/components/base/TMPanel.js +58 -26
- package/lib/components/base/TMPopUp.d.ts +1 -0
- package/lib/components/base/TMPopUp.js +59 -2
- package/lib/components/base/TMSpinner.d.ts +5 -2
- package/lib/components/base/TMSpinner.js +33 -6
- 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/TMTreeView.js +24 -17
- 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 +5 -2
- package/lib/components/base/TMWaitPanel.js +14 -9
- package/lib/components/choosers/TMDistinctValues.js +35 -21
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
- package/lib/components/choosers/TMDynDataListItemChooser.js +6 -1
- package/lib/components/choosers/TMGroupChooser.js +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 +6 -2
- package/lib/components/choosers/TMUserChooser.js +7 -5
- package/lib/components/editors/TMDateBox.js +4 -2
- package/lib/components/editors/TMEditorStyled.d.ts +6 -6
- package/lib/components/editors/TMFormulaEditor.d.ts +4 -1
- package/lib/components/editors/TMFormulaEditor.js +125 -22
- package/lib/components/editors/TMHtmlContentDisplay.d.ts +2 -1
- package/lib/components/editors/TMHtmlEditor.d.ts +2 -1
- package/lib/components/editors/TMMetadataEditor.js +6 -2
- package/lib/components/editors/TMMetadataValues.js +25 -7
- package/lib/components/editors/TMRadioButton.js +7 -5
- package/lib/components/editors/TMTextArea.d.ts +2 -0
- package/lib/components/editors/TMTextArea.js +6 -3
- package/lib/components/editors/TMTextBox.d.ts +2 -0
- package/lib/components/editors/TMTextBox.js +3 -3
- package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
- package/lib/components/features/archive/TMArchive.js +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/blog/TMBlogCommentForm.js +5 -2
- package/lib/components/features/documents/TMCopyToFolderForm.d.ts +24 -0
- package/lib/components/features/documents/TMCopyToFolderForm.js +401 -0
- package/lib/components/features/documents/TMDcmtForm.d.ts +1 -0
- package/lib/components/features/documents/TMDcmtForm.js +166 -54
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtFormActionButtons.js +259 -60
- package/lib/components/features/documents/TMDcmtIcon.d.ts +2 -1
- package/lib/components/features/documents/TMDcmtIcon.js +1 -1
- package/lib/components/features/documents/TMDcmtPreview.d.ts +2 -1
- package/lib/components/features/documents/TMDcmtPreview.js +2 -2
- package/lib/components/features/documents/TMDcmtTasks.d.ts +3 -1
- package/lib/components/features/documents/TMDcmtTasks.js +2 -2
- package/lib/components/features/documents/TMDownloadRelationViewerSection.d.ts +23 -0
- package/lib/components/features/documents/TMDownloadRelationViewerSection.js +173 -0
- 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.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +28 -9
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +24 -0
- package/lib/components/features/documents/TMMergeToPdfForm.js +309 -0
- package/lib/components/features/documents/TMRelationViewer.d.ts +13 -0
- package/lib/components/features/documents/TMRelationViewer.js +80 -6
- package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +58 -0
- package/lib/components/features/documents/copyAndMergeDcmtsShared.js +266 -0
- package/lib/components/features/search/SignatureParamsManager.d.ts +70 -0
- package/lib/components/features/search/SignatureParamsManager.js +145 -0
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +2 -1
- package/lib/components/features/search/TMMetadataOutputForm.d.ts +18 -0
- package/lib/components/features/search/TMMetadataOutputForm.js +225 -0
- package/lib/components/features/search/TMMetadataSorterForm.d.ts +18 -0
- package/lib/components/features/search/TMMetadataSorterForm.js +243 -0
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +3 -3
- package/lib/components/features/search/TMSavedQuerySelector.js +3 -2
- package/lib/components/features/search/TMSearch.d.ts +4 -1
- package/lib/components/features/search/TMSearch.js +16 -10
- package/lib/components/features/search/TMSearchQueryEditor.js +14 -8
- package/lib/components/features/search/TMSearchQueryPanel.js +250 -59
- package/lib/components/features/search/TMSearchResult.d.ts +3 -0
- package/lib/components/features/search/TMSearchResult.js +154 -38
- 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/search/TMViewHistoryDcmt.js +2 -3
- package/lib/components/features/search/metadataFormHelper.d.ts +16 -0
- package/lib/components/features/search/metadataFormHelper.js +77 -0
- 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/TMWorkflowPopup.js +3 -0
- package/lib/components/features/workflow/diagram/queryDescriptorParser.js +3 -6
- package/lib/components/forms/Login/Chooser.d.ts +2 -2
- package/lib/components/forms/Login/TMLoginForm.d.ts +9 -0
- package/lib/components/forms/Login/TMLoginForm.js +76 -3
- package/lib/components/forms/TMChooserForm.d.ts +2 -1
- package/lib/components/forms/TMResultDialog.d.ts +1 -1
- package/lib/components/forms/TMResultDialog.js +4 -2
- package/lib/components/forms/TMSaveForm.d.ts +4 -4
- package/lib/components/grids/TMBlogAttachments.d.ts +3 -1
- package/lib/components/grids/TMBlogAttachments.js +39 -13
- package/lib/components/grids/TMBlogHeader.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.js +12 -4
- package/lib/components/grids/TMBlogsPostUtils.d.ts +10 -9
- package/lib/components/grids/TMBlogsPostUtils.js +14 -18
- package/lib/components/grids/TMValidationItemsList.d.ts +2 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- 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/pages/TMPage.js +3 -1
- package/lib/components/query/TMQueryEditor.js +2 -2
- 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/components/viewers/TMTidViewer.js +1 -1
- package/lib/components/wizard/TMWizard.d.ts +1 -0
- package/lib/components/wizard/TMWizard.js +5 -3
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/GlobalStyles.js +6 -0
- package/lib/helper/MergePdfManager.d.ts +45 -0
- package/lib/helper/MergePdfManager.js +148 -0
- package/lib/helper/SDKUI_Globals.d.ts +15 -0
- package/lib/helper/SDKUI_Globals.js +16 -1
- package/lib/helper/SDKUI_Localizator.d.ts +112 -2
- package/lib/helper/SDKUI_Localizator.js +1120 -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/TMPdfViewer.js +25 -24
- package/lib/helper/TMToppyMessage.d.ts +2 -2
- package/lib/helper/TMUtils.d.ts +25 -1
- package/lib/helper/TMUtils.js +72 -0
- package/lib/helper/ZipManager.d.ts +56 -0
- package/lib/helper/ZipManager.js +127 -0
- package/lib/helper/checkinCheckoutManager.d.ts +4 -3
- package/lib/helper/checkinCheckoutManager.js +29 -11
- package/lib/helper/helpers.d.ts +3 -2
- package/lib/helper/helpers.js +1 -0
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/hooks/useCheckInOutOperations.d.ts +4 -3
- package/lib/hooks/useDataUserIdItem.js +6 -4
- package/lib/hooks/useDcmtOperations.d.ts +26 -2
- package/lib/hooks/useDcmtOperations.js +292 -38
- package/lib/hooks/useDocumentOperations.d.ts +3 -0
- package/lib/hooks/useDocumentOperations.js +254 -26
- package/lib/hooks/useForm.js +5 -2
- package/lib/hooks/useInputDialog.d.ts +2 -1
- package/lib/hooks/useRelatedDocuments.js +4 -4
- package/lib/hooks/useResizeObserver.d.ts +1 -1
- package/lib/hooks/useResizeObserver.js +16 -15
- package/lib/services/platform_services.d.ts +7 -6
- package/lib/ts/types.d.ts +3 -1
- package/lib/ts/types.js +1 -0
- package/package.json +15 -7
|
@@ -143,9 +143,9 @@ const TMFileManagerThumbnailItems = (props) => {
|
|
|
143
143
|
bgColor = isSelected ? colors.PRIMARY_BLUE : backgroundColors.lockMode;
|
|
144
144
|
bgHoverColor = isSelected ? colors.PRIMARY_BLUE : "#fff59d";
|
|
145
145
|
}
|
|
146
|
-
const editLockTooltipText = _jsxs(_Fragment, { children: [_jsxs("div", { style: { textAlign: "center" }, children: [editMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-edit" }), SDKUI_Localizator.CurrentUserExtract] })), lockMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-lock" }), SDKUI_Localizator.ExtractedFromOtherUser] }))] }), _jsx("hr", {}), _jsxs("div", { style: { textAlign: "left" }, children: [_jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedBy }), ": ", findCheckOutUserName(item) ?? '-', " (ID: ", item.checkOutUserID, ")"] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedOn }), ": ", Globalization.getDateTimeDisplayValue(item.checkoutDate?.toString())] })] }), _jsx("hr", {}), _jsx("ul", { children: _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Version }), ": ", item.version ?? 1] }) }), _jsx("hr", {}), _jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.
|
|
147
|
-
const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", item.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", item.did ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", item.tid ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", item.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", item.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", item.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(item.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime)] })] }));
|
|
148
|
-
return _jsx(TMFileItemContainer, { className: "tm-file-manager-thumbnail-items", ref: containerRef, id: "tm-file-manager-thumbnail-item-" + item.id.toString(), "$backgroundColor": bgColor, "$bgHoverColor": bgHoverColor, "$textColor": textColor, onDoubleClick: () => onDoubleClickHandler(item), onContextMenu: (e) => onContextMenu(e, item), onClick: (e) => onClickHandler(e, item), tabIndex: 0, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', flex: 1, minWidth: 0 }, children: [_jsxs("div", { style: { marginRight: '16px', flexShrink: 0 }, children: [_jsx(TMDcmtIcon, { tid: item.tid, did: item.did, fileExtension: item.ext, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent }), editMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-edit" }) }), lockMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-lock" }) })] }), _jsxs("div", { style: { overflow: 'hidden', minWidth: 0 }, children: [_jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: '1rem', fontWeight: "bold" }, children: _jsx(TMTooltip, { parentStyle: { overflow: 'hidden' }, childStyle: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block' }, children: renderHighlightedText(item.name, searchText, isSelected) }) }), _jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: 'calc(1rem - 1px)' }, children: formatBytes(item.size ?? 0) })] })] }), item.version && (_jsx("div", { style: { flexShrink: 0, marginLeft: '12px', whiteSpace: 'nowrap' }, children: _jsx(TMTooltip, { content: SDKUI_Localizator.Version, children: _jsx("div", { style: { border: "2px solid #28a745", backgroundColor: "#28a745", color: "#ffffff", borderRadius: '50%', width: '30px', height: '30px', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: '12px', fontWeight: 'bold' }, children: item.version }) }) }))] }) }, "tm-file-manager-thumbnail-item-" + item.id);
|
|
146
|
+
const editLockTooltipText = _jsxs(_Fragment, { children: [_jsxs("div", { style: { textAlign: "center" }, children: [editMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-edit" }), SDKUI_Localizator.CurrentUserExtract] })), lockMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-lock" }), SDKUI_Localizator.ExtractedFromOtherUser] }))] }), _jsx("hr", {}), _jsxs("div", { style: { textAlign: "left" }, children: [_jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedBy }), ": ", findCheckOutUserName(item) ?? '-', " (ID: ", item.checkOutUserID, ")"] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedOn }), ": ", Globalization.getDateTimeDisplayValue(item.checkoutDate?.toString())] })] }), _jsx("hr", {}), _jsx("ul", { children: _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Version }), ": ", item.version ?? 1] }) }), _jsx("hr", {}), _jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Extension }), ": ", item.ext] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.CreationTime }), ": ", Globalization.getDateTimeDisplayValue(item.creationTime?.toString())] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.LastUpdateTime }), ": ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime?.toString())] })] })] })] });
|
|
147
|
+
const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", item.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", item.did ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", item.tid ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", item.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Extension, ":"] }), " ", item.ext ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", item.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", item.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(item.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime)] })] }));
|
|
148
|
+
return _jsx(TMFileItemContainer, { className: "tm-file-manager-thumbnail-items", ref: containerRef, id: "tm-file-manager-thumbnail-item-" + item.id.toString(), "$backgroundColor": bgColor, "$bgHoverColor": bgHoverColor, "$textColor": textColor, onDoubleClick: () => onDoubleClickHandler(item), onContextMenu: (e) => onContextMenu(e, item), onClick: (e) => onClickHandler(e, item), tabIndex: 0, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', flex: 1, minWidth: 0 }, children: [_jsxs("div", { style: { marginRight: '16px', flexShrink: 0, display: 'flex', flexDirection: 'column', alignItems: 'center' }, children: [_jsx("div", { style: { width: '40px' }, children: _jsx(TMDcmtIcon, { tid: item.tid, did: item.did, fileExtension: item.ext, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent, isSigned: item.isSigned }) }), _jsxs("div", { style: { display: 'flex', justifyContent: 'center', width: '40px' }, children: [editMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-edit" }) }), lockMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-lock" }) })] })] }), _jsxs("div", { style: { overflow: 'hidden', minWidth: 0 }, children: [_jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: '1rem', fontWeight: "bold" }, children: _jsx(TMTooltip, { parentStyle: { overflow: 'hidden' }, childStyle: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block' }, children: renderHighlightedText(item.name, searchText, isSelected) }) }), _jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: 'calc(1rem - 1px)' }, children: formatBytes(item.size ?? 0) })] })] }), item.version && (_jsx("div", { style: { flexShrink: 0, marginLeft: '12px', whiteSpace: 'nowrap' }, children: _jsx(TMTooltip, { content: SDKUI_Localizator.Version, children: _jsx("div", { style: { border: "2px solid #28a745", backgroundColor: "#28a745", color: "#ffffff", borderRadius: '50%', width: '30px', height: '30px', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: '12px', fontWeight: 'bold' }, children: item.version }) }) }))] }) }, "tm-file-manager-thumbnail-item-" + item.id);
|
|
149
149
|
}) });
|
|
150
150
|
};
|
|
151
151
|
export default TMFileManagerThumbnailItems;
|
|
@@ -28,5 +28,5 @@ interface TMFileManagerThumbnailsViewProps {
|
|
|
28
28
|
};
|
|
29
29
|
}>>;
|
|
30
30
|
}
|
|
31
|
-
declare const TMFileManagerThumbnailsView: (props: TMFileManagerThumbnailsViewProps) =>
|
|
31
|
+
declare const TMFileManagerThumbnailsView: (props: TMFileManagerThumbnailsViewProps) => React.JSX.Element;
|
|
32
32
|
export default TMFileManagerThumbnailsView;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SearchResultDescriptor, UserDescriptor, WGTreeDescriptor } from "@topconsultnpm/sdk-ts";
|
|
3
|
+
/**
|
|
4
|
+
* Verifica se un'estensione indica che il file è firmato digitalmente.
|
|
5
|
+
* Controlla se l'estensione (es. "pdf.p7m", ".p7m", "p7m") contiene
|
|
6
|
+
* una delle estensioni di firma note (p7m, p7s, m7m, tsd, tsr, ts).
|
|
7
|
+
*/
|
|
8
|
+
export declare const isSigned: (ext: string | null | undefined) => boolean;
|
|
3
9
|
export interface FileItem {
|
|
4
10
|
id: number;
|
|
5
11
|
name: string;
|
|
@@ -18,6 +24,7 @@ export interface FileItem {
|
|
|
18
24
|
checkoutDate?: Date | null;
|
|
19
25
|
size?: number;
|
|
20
26
|
version?: number;
|
|
27
|
+
isSigned?: number;
|
|
21
28
|
}
|
|
22
29
|
export interface TMFileManagerTreeViewDirectory {
|
|
23
30
|
id: number;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import { associateColumnsToRows } from "../../helper";
|
|
2
|
+
import { associateColumnsToRows, SIGNATURE_EXTENSIONS } from "../../helper";
|
|
3
|
+
/**
|
|
4
|
+
* Verifica se un'estensione indica che il file è firmato digitalmente.
|
|
5
|
+
* Controlla se l'estensione (es. "pdf.p7m", ".p7m", "p7m") contiene
|
|
6
|
+
* una delle estensioni di firma note (p7m, p7s, m7m, tsd, tsr, ts).
|
|
7
|
+
*/
|
|
8
|
+
export const isSigned = (ext) => {
|
|
9
|
+
if (!ext)
|
|
10
|
+
return false;
|
|
11
|
+
const normalized = ext.trim().toLowerCase().replace(/^\./, '');
|
|
12
|
+
const parts = normalized.split('.');
|
|
13
|
+
return parts.some(part => SIGNATURE_EXTENSIONS.has(part));
|
|
14
|
+
};
|
|
3
15
|
export var TMFileManagerPageSize;
|
|
4
16
|
(function (TMFileManagerPageSize) {
|
|
5
17
|
TMFileManagerPageSize[TMFileManagerPageSize["Small"] = 30] = "Small";
|
|
@@ -125,6 +137,7 @@ export const buildFolderHierarchy = (fileSystemTree, draftsFile, archivedDocumen
|
|
|
125
137
|
checkOutUserName: checkOutUserName,
|
|
126
138
|
checkoutDate: row.CheckOutDate ? new Date(row.CheckOutDate) : null,
|
|
127
139
|
version,
|
|
140
|
+
isSigned: isSigned(row.FileExt) ? 1 : 0
|
|
128
141
|
};
|
|
129
142
|
if (draftInfoMap.has(draftID)) {
|
|
130
143
|
// Get the current version in the map
|
|
@@ -17,7 +17,7 @@ declare const TMCard: ({ borderRadius, onClick, scrollX, scrollY, width, height,
|
|
|
17
17
|
scroll?: boolean;
|
|
18
18
|
backgroundColor?: string;
|
|
19
19
|
color?: string;
|
|
20
|
-
}) =>
|
|
20
|
+
}) => React.JSX.Element;
|
|
21
21
|
declare const TMSplitterLayout: ({ animation, showSeparator, separatorColor, overflow, separatorActiveColor, separatorSize, direction, children, start, min, }: {
|
|
22
22
|
animation?: boolean;
|
|
23
23
|
separatorColor?: string;
|
|
@@ -29,7 +29,7 @@ declare const TMSplitterLayout: ({ animation, showSeparator, separatorColor, ove
|
|
|
29
29
|
children?: React.ReactNode;
|
|
30
30
|
start?: string[];
|
|
31
31
|
min?: string[];
|
|
32
|
-
}) =>
|
|
32
|
+
}) => React.JSX.Element;
|
|
33
33
|
declare const TMLayoutItem: ({ onClick, children, width, minWidth, maxWidth, maxHeight, height, minHeight }: {
|
|
34
34
|
onClick?: () => void;
|
|
35
35
|
children: React.ReactNode;
|
|
@@ -40,7 +40,7 @@ declare const TMLayoutItem: ({ onClick, children, width, minWidth, maxWidth, max
|
|
|
40
40
|
fixed?: boolean;
|
|
41
41
|
height?: string;
|
|
42
42
|
minHeight?: string;
|
|
43
|
-
}) =>
|
|
43
|
+
}) => React.JSX.Element;
|
|
44
44
|
export interface ITMLayoutContainerProps {
|
|
45
45
|
children: React.ReactNode;
|
|
46
46
|
gap?: number;
|
|
@@ -50,6 +50,6 @@ export interface ITMLayoutContainerProps {
|
|
|
50
50
|
onClick?: () => void;
|
|
51
51
|
onContextMenu?: (e: React.MouseEvent) => void;
|
|
52
52
|
}
|
|
53
|
-
declare const TMLayoutContainer: ({ gap, onClick, justifyContent, alignItems, children, direction, onContextMenu }: ITMLayoutContainerProps) =>
|
|
53
|
+
declare const TMLayoutContainer: ({ gap, onClick, justifyContent, alignItems, children, direction, onContextMenu }: ITMLayoutContainerProps) => React.JSX.Element;
|
|
54
54
|
export { TMCard, TMLayoutItem, TMSplitterLayout };
|
|
55
55
|
export default TMLayoutContainer;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface ITMListItem {
|
|
2
3
|
icon: any;
|
|
3
4
|
text?: string;
|
|
@@ -5,5 +6,5 @@ interface ITMListItem {
|
|
|
5
6
|
}
|
|
6
7
|
declare const TMList: ({ items }: {
|
|
7
8
|
items: ITMListItem[];
|
|
8
|
-
}) =>
|
|
9
|
+
}) => React.JSX.Element;
|
|
9
10
|
export default TMList;
|
|
@@ -37,6 +37,6 @@ interface ListProps<T> {
|
|
|
37
37
|
onItemDblClick?: (item: T) => void;
|
|
38
38
|
itemTemplate?: (item: T) => JSX.Element;
|
|
39
39
|
}
|
|
40
|
-
declare const TMListView: <T>({ customGroupingHeaders, headerBackGroundColor, header, showId, setShowId, showSearch, setShowSearch, grouping, orderBy, id, onScrollChange, scroll, searchKeys, searchable, itemTemplate, customColor, dataSource, exprKey, onSelectionChanged, onItemClick, onItemDblClick, selectedItem, autoScrollToSelectedItem }: ListProps<T>) =>
|
|
40
|
+
declare const TMListView: <T>({ customGroupingHeaders, headerBackGroundColor, header, showId, setShowId, showSearch, setShowSearch, grouping, orderBy, id, onScrollChange, scroll, searchKeys, searchable, itemTemplate, customColor, dataSource, exprKey, onSelectionChanged, onItemClick, onItemDblClick, selectedItem, autoScrollToSelectedItem }: ListProps<T>) => React.JSX.Element;
|
|
41
41
|
export default TMListView;
|
|
42
42
|
export declare const CustomListViewHeader: React.FC<ITMListViewHeader>;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { useState, useEffect, useRef } from 'react';
|
|
3
3
|
import { Popup } from 'devextreme-react';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import
|
|
5
|
+
import { TMCard } from './TMLayout';
|
|
6
6
|
import { FontSize, TMColors } from '../../utils/theme';
|
|
7
7
|
import { IconWindowMaximize, IconWindowMinimize, svgToString } from '../../helper';
|
|
8
8
|
const StyledModal = styled.div `
|
|
@@ -39,7 +39,7 @@ const StyledModalContext = styled.div `
|
|
|
39
39
|
overflow: auto;
|
|
40
40
|
height: 100%;
|
|
41
41
|
`;
|
|
42
|
-
const TMModal = ({ resizable = true, expandable = false, isModal = true, title = '', toolbar, onClose, children, width = '100%', height = '100%', fontSize = FontSize.defaultFontSize, hidePopup = true, askClosingConfirm = false, showCloseButton = true }) => {
|
|
42
|
+
const TMModal = ({ resizable = true, expandable = false, isModal = true, title = '', toolbar, onClose, children, width = '100%', height = '100%', fontSize = FontSize.defaultFontSize, hidePopup = true, askClosingConfirm = false, showCloseButton = true, showHeader = true }) => {
|
|
43
43
|
const popupRef = useRef(null);
|
|
44
44
|
const [initialWidth, setInitialWidth] = useState(width);
|
|
45
45
|
const [initialHeight, setInitialHeight] = useState(height);
|
|
@@ -101,7 +101,7 @@ const TMModal = ({ resizable = true, expandable = false, isModal = true, title =
|
|
|
101
101
|
setShowPopup(false);
|
|
102
102
|
onClose && onClose();
|
|
103
103
|
};
|
|
104
|
-
return (_jsx(_Fragment, { children: isModal ? (_jsx(Popup, { ref: popupRef, showCloseButton: showCloseButton, animation: undefined, minWidth: minWidth, minHeight: minHeight, maxHeight: '95%', maxWidth: '95%', dragEnabled: !isResizing, resizeEnabled: resizable, width: expandable && isFullScreen ? '95%' : initialWidth, height: expandable && isFullScreen ? '95%' : initialHeight, title: title, visible: showPopup, onShown: handleShown, onResizeStart: handleResizeStart, onResizeEnd: handleResizeEnd, onHiding: onHiding, toolbarItems: expandable ? [
|
|
104
|
+
return (_jsx(_Fragment, { children: isModal ? (_jsx(Popup, { ref: popupRef, showCloseButton: showHeader ? showCloseButton : false, showTitle: showHeader, animation: undefined, minWidth: minWidth, minHeight: minHeight, maxHeight: '95%', maxWidth: '95%', dragEnabled: !isResizing, resizeEnabled: resizable, width: expandable && isFullScreen ? '95%' : initialWidth, height: expandable && isFullScreen ? '95%' : initialHeight, title: title, visible: showPopup, onShown: handleShown, onResizeStart: handleResizeStart, onResizeEnd: handleResizeEnd, onHiding: onHiding, toolbarItems: showHeader && expandable ? [
|
|
105
105
|
{
|
|
106
106
|
widget: 'dxButton',
|
|
107
107
|
location: 'after',
|
|
@@ -110,6 +110,6 @@ const TMModal = ({ resizable = true, expandable = false, isModal = true, title =
|
|
|
110
110
|
onClick: () => setIsFullScreen(!isFullScreen)
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
] : undefined, children: _jsxs(
|
|
113
|
+
] : undefined, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', height: '100%', width: '100%' }, children: [toolbar && (_jsx(StyledModalToolbar, { children: toolbar })), _jsx("div", { style: { flex: 1, overflow: 'hidden', minHeight: 0 }, children: _jsx(TMCard, { showBorder: false, padding: false, scrollY: true, children: children }) })] }) })) : (_jsxs(StyledModal, { "$isModal": isModal, className: "temp-modal", "$fontSize": fontSize, "$width": initialWidth, "$height": initialHeight, children: [toolbar ? _jsx(StyledModalToolbar, { children: toolbar }) : _jsx(_Fragment, {}), _jsx(StyledModalContext, { children: children })] })) }));
|
|
114
114
|
};
|
|
115
115
|
export default TMModal;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/** Gestione TMPanel "attivo / non attivo" secondo una pattern ibrido (Controlled/Uncontrolled Component):
|
|
2
|
-
1) Modalità Non Controllata (Uncontrolled): Se non gli viene passata la prop "isActive", il pannello gestisce lo stato "attivo" internamente. Per l'uso singolo ("plug-and-play").
|
|
3
|
-
2) Modalità Controllata (Controlled): Se il genitore passa la prop "isActive", il pannello cede il controllo e si affida completamente al genitore. Ideale per layout con più pannelli che necessitano di coordinamento.
|
|
4
|
-
*/
|
|
5
1
|
import React from 'react';
|
|
6
2
|
export interface ITMPanelRef {
|
|
7
3
|
focusPanel: () => void;
|
|
@@ -28,5 +24,12 @@ export interface ITMPanelProps {
|
|
|
28
24
|
onHeaderDoubleClick?: () => void;
|
|
29
25
|
onMaximize?: (isMaximized: boolean) => void;
|
|
30
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* TMPanel - Pannello con supporto Controlled/Uncontrolled
|
|
29
|
+
*
|
|
30
|
+
* @prop isActive (opzionale)
|
|
31
|
+
* - Se NON passata → Uncontrolled: gestione interna dello stato attivo (plug-and-play)
|
|
32
|
+
* - Se passata → Controlled: il parent gestisce lo stato tramite onActivate
|
|
33
|
+
*/
|
|
31
34
|
declare const TMPanel: React.ForwardRefExoticComponent<ITMPanelProps & React.RefAttributes<ITMPanelRef>>;
|
|
32
35
|
export default TMPanel;
|
|
@@ -1,14 +1,35 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/** Gestione TMPanel "attivo / non attivo" secondo una pattern ibrido (Controlled/Uncontrolled Component):
|
|
3
|
-
1) Modalità Non Controllata (Uncontrolled): Se non gli viene passata la prop "isActive", il pannello gestisce lo stato "attivo" internamente. Per l'uso singolo ("plug-and-play").
|
|
4
|
-
2) Modalità Controllata (Controlled): Se il genitore passa la prop "isActive", il pannello cede il controllo e si affida completamente al genitore. Ideale per layout con più pannelli che necessitano di coordinamento.
|
|
5
|
-
*/
|
|
6
2
|
import { useCallback, useRef, useState, forwardRef, useImperativeHandle } from 'react';
|
|
7
3
|
import styled from 'styled-components';
|
|
8
4
|
import { getAppModuleGradient, IconArrowLeft, IconClearButton, IconWindowMaximize, IconWindowMinimize, isPositiveNumber, SDKUI_Localizator } from '../../helper';
|
|
9
5
|
import TMButton from './TMButton';
|
|
10
6
|
import { Gutters } from '../../utils/theme';
|
|
7
|
+
const StyledBackButton = styled.button `
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
gap: 4px;
|
|
12
|
+
padding: 4px 10px;
|
|
13
|
+
border: 1px solid ${({ $isActive }) => $isActive ? 'rgba(37, 89, 165, 0.3)' : 'rgba(255, 255, 255, 0.4)'};
|
|
14
|
+
border-radius: 6px;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
font-size: 0.85rem;
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
transition: all 0.15s ease;
|
|
20
|
+
background-color: ${({ $isActive }) => $isActive ? '#FFFFFF' : '#2559A5'};
|
|
21
|
+
box-shadow: none;
|
|
22
|
+
|
|
23
|
+
&&, && * {
|
|
24
|
+
color: ${({ $isActive }) => $isActive ? '#2559A5' : '#FFFFFF'} !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
svg {
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
11
31
|
import { AppModules, SDK_Globals } from '@topconsultnpm/sdk-ts';
|
|
32
|
+
import { DeviceType, useDeviceType } from './TMDeviceProvider';
|
|
12
33
|
const StyledPanelContainer = styled.div `
|
|
13
34
|
width: 100%;
|
|
14
35
|
height: 100%;
|
|
@@ -75,9 +96,19 @@ const StyledPanelContent = styled.div `
|
|
|
75
96
|
outline: none;
|
|
76
97
|
}
|
|
77
98
|
`;
|
|
99
|
+
/**
|
|
100
|
+
* TMPanel - Pannello con supporto Controlled/Uncontrolled
|
|
101
|
+
*
|
|
102
|
+
* @prop isActive (opzionale)
|
|
103
|
+
* - Se NON passata → Uncontrolled: gestione interna dello stato attivo (plug-and-play)
|
|
104
|
+
* - Se passata → Controlled: il parent gestisce lo stato tramite onActivate
|
|
105
|
+
*/
|
|
78
106
|
const TMPanel = forwardRef(({ allowMaximize = true, color, backgroundColor, backgroundColorContainer, children, showHeader = true, title, totalItems, displayedItemsCount, toolbar, padding = '5px', isVisible = true, panelID = 'tmpanel', isActive, // Questa prop determinerà la modalità
|
|
79
107
|
onActivate, onBack, onClose, onHeaderDoubleClick, onMaximize, onActiveChanged }, ref) => {
|
|
80
108
|
const [isMaximized, setIsMaximized] = useState(false);
|
|
109
|
+
// Detect device type (e.g., mobile or desktop)
|
|
110
|
+
const deviceType = useDeviceType();
|
|
111
|
+
const isMobile = deviceType === DeviceType.MOBILE;
|
|
81
112
|
// INTERNAL STATUS for UNCONTROLLED mode
|
|
82
113
|
const [internalIsActive, setInternalIsActive] = useState(false);
|
|
83
114
|
const panelRef = useRef(null);
|
|
@@ -149,36 +180,37 @@ onActivate, onBack, onClose, onHeaderDoubleClick, onMaximize, onActiveChanged },
|
|
|
149
180
|
flexDirection: 'row',
|
|
150
181
|
alignItems: 'center',
|
|
151
182
|
width: '100%',
|
|
152
|
-
minWidth: 0
|
|
153
|
-
|
|
183
|
+
minWidth: 0,
|
|
184
|
+
flexWrap: 'nowrap',
|
|
185
|
+
overflow: 'hidden'
|
|
186
|
+
}, children: [onBack && _jsx("div", { style: {
|
|
154
187
|
display: 'flex',
|
|
155
188
|
flexDirection: 'row',
|
|
156
189
|
alignItems: 'center',
|
|
157
|
-
|
|
190
|
+
flexShrink: 0
|
|
191
|
+
}, children: _jsxs(StyledBackButton, { "$isActive": currentIsActive, onClick: () => onBack ? onBack() : null, title: SDKUI_Localizator.Back, children: [_jsx(IconArrowLeft, {}), !isMobile && _jsx("span", { children: SDKUI_Localizator.Back })] }) }), _jsx("div", { style: {
|
|
158
192
|
flex: 1,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
: ''] }) })] }), _jsxs("div", { style: {
|
|
193
|
+
display: 'flex',
|
|
194
|
+
alignItems: 'center',
|
|
195
|
+
justifyContent: 'flex-start',
|
|
196
|
+
minWidth: 0,
|
|
197
|
+
overflow: 'hidden',
|
|
198
|
+
padding: '0 8px'
|
|
199
|
+
}, children: _jsxs("div", { style: {
|
|
200
|
+
whiteSpace: 'nowrap',
|
|
201
|
+
overflow: 'hidden',
|
|
202
|
+
textOverflow: 'ellipsis',
|
|
203
|
+
margin: 0
|
|
204
|
+
}, children: [title, isPositiveNumber(displayedItemsCount) && isPositiveNumber(totalItems)
|
|
205
|
+
? ` (${displayedItemsCount} / ${totalItems})`
|
|
206
|
+
: isPositiveNumber(totalItems)
|
|
207
|
+
? ` (${totalItems})`
|
|
208
|
+
: ''] }) }), _jsxs("div", { style: {
|
|
176
209
|
display: 'flex',
|
|
177
210
|
flexDirection: 'row',
|
|
178
211
|
alignItems: 'center',
|
|
179
212
|
gap: '5px',
|
|
180
|
-
flexShrink: 0
|
|
181
|
-
marginLeft: 10
|
|
213
|
+
flexShrink: 0
|
|
182
214
|
}, children: [toolbar, allowMaximize && _jsx(TMButton, { color: 'primaryOutline', caption: isMaximized ? SDKUI_Localizator.Minimize : SDKUI_Localizator.Maximize, icon: isMaximized
|
|
183
215
|
? _jsx(IconWindowMinimize, { fontSize: 16 })
|
|
184
216
|
: _jsx(IconWindowMaximize, { fontSize: 16 }), btnStyle: 'icon', onClick: handleMaximize }), onClose && _jsx(TMButton, { color: 'primaryOutline', caption: SDKUI_Localizator.Close, icon: _jsx(IconClearButton, {}), btnStyle: 'icon', onClick: () => { setIsMaximized(false); onClose?.(); } })] })] }) }), _jsx(StyledPanelContent, { "$height": showHeader ? "calc(100% - 40px)" : "100%", "$padding": padding, "$backgroundColor": backgroundColorContainer ?? `#FFFFFF`, children: children })] }));
|
|
@@ -24,6 +24,7 @@ interface ITMExceptionBox extends ITMPopup {
|
|
|
24
24
|
exception?: any;
|
|
25
25
|
onClose?: () => void;
|
|
26
26
|
}
|
|
27
|
+
export declare const sanitizeException: (exception: any) => any;
|
|
27
28
|
declare class TMExceptionBoxManager {
|
|
28
29
|
static show({ title, exception, onClose }: ITMExceptionBox): void;
|
|
29
30
|
}
|
|
@@ -23,6 +23,45 @@ export var ButtonNames;
|
|
|
23
23
|
// Dimensioni minime di default per i popup
|
|
24
24
|
const DEFAULT_MIN_WIDTH = 500;
|
|
25
25
|
const DEFAULT_MIN_HEIGHT = 400;
|
|
26
|
+
// filtr password from all errors.
|
|
27
|
+
const SENSITIVE_KEY = 'password';
|
|
28
|
+
const redactSensitiveJsonString = (value) => {
|
|
29
|
+
const trimmed = value.trim();
|
|
30
|
+
const looksLikeJson = (trimmed.startsWith('{') && trimmed.endsWith('}')) || (trimmed.startsWith('[') && trimmed.endsWith(']'));
|
|
31
|
+
if (!looksLikeJson)
|
|
32
|
+
return value;
|
|
33
|
+
try {
|
|
34
|
+
return JSON.stringify(redactSensitiveValue(JSON.parse(value)));
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const redactSensitiveValue = (value) => {
|
|
41
|
+
if (Array.isArray(value))
|
|
42
|
+
return value.map(redactSensitiveValue);
|
|
43
|
+
if (typeof value === 'string')
|
|
44
|
+
return redactSensitiveJsonString(value);
|
|
45
|
+
if (!value || typeof value !== 'object')
|
|
46
|
+
return value;
|
|
47
|
+
const result = {};
|
|
48
|
+
for (const key of Object.keys(value)) {
|
|
49
|
+
result[key] = key.toLowerCase() === SENSITIVE_KEY ? '***' : redactSensitiveValue(value[key]);
|
|
50
|
+
}
|
|
51
|
+
return result;
|
|
52
|
+
};
|
|
53
|
+
export const sanitizeException = (exception) => {
|
|
54
|
+
if (exception === null || exception === undefined)
|
|
55
|
+
return exception;
|
|
56
|
+
let plain;
|
|
57
|
+
try {
|
|
58
|
+
plain = JSON.parse(JSON.stringify(exception));
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return exception;
|
|
62
|
+
}
|
|
63
|
+
return redactSensitiveValue(plain);
|
|
64
|
+
};
|
|
26
65
|
const StyledExeptionToolbar = styled.div `
|
|
27
66
|
display: flex;
|
|
28
67
|
flex-direction: row;
|
|
@@ -273,6 +312,7 @@ const TMExceptionBox = ({ resizable = false, exception, title = `${SDK_Globals.a
|
|
|
273
312
|
let dateString = d.getDate() + '/' + d.getMonth() + 1 + '/' + d.getFullYear();
|
|
274
313
|
let timeString = d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds() + ':' + d.getMilliseconds();
|
|
275
314
|
let message = getExceptionMessage(exception);
|
|
315
|
+
const safeException = useMemo(() => sanitizeException(exception), [exception]);
|
|
276
316
|
let deviceType = useDeviceType();
|
|
277
317
|
/**
|
|
278
318
|
* Gestore chiamato quando il popup viene mostrato.
|
|
@@ -304,17 +344,34 @@ const TMExceptionBox = ({ resizable = false, exception, title = `${SDK_Globals.a
|
|
|
304
344
|
};
|
|
305
345
|
const getFullMessage = () => {
|
|
306
346
|
let fullMessage = '';
|
|
307
|
-
fullMessage += `${d}\n${'-' + JSON.stringify(
|
|
347
|
+
fullMessage += `${d}\n${'-' + JSON.stringify(safeException)}\n` + `-${SDK_Globals.appModule}: ${SDK_Globals.appVersion}\n` + `-SDKUI: ${SDK_Globals.sdkuiVersion}\n` + `-SDK: ${SDK_Globals.sdkVersion}\n`;
|
|
308
348
|
return fullMessage.replaceAll('{', '').replaceAll('}', '').replaceAll(`":`, '=').replaceAll(`,"`, '\n').replaceAll(`"`, '');
|
|
309
349
|
};
|
|
310
350
|
const copyToClipBoard = (e) => {
|
|
311
351
|
navigator.clipboard.writeText(e);
|
|
312
352
|
ShowAlert({ mode: 'success', duration: 3000, message: SDKUI_Localizator.CopiedSuccessfully, title: 'Success' });
|
|
313
353
|
};
|
|
354
|
+
const handleClose = useCallback(() => {
|
|
355
|
+
onClose?.();
|
|
356
|
+
setIsVisible(false);
|
|
357
|
+
}, [onClose]);
|
|
358
|
+
const handleKeyDown = useCallback((e) => {
|
|
359
|
+
if (e.key === 'Enter' || e.key === 'Escape') {
|
|
360
|
+
e.preventDefault();
|
|
361
|
+
e.stopPropagation();
|
|
362
|
+
handleClose();
|
|
363
|
+
}
|
|
364
|
+
}, [handleClose]);
|
|
365
|
+
useEffect(() => {
|
|
366
|
+
if (!isVisible)
|
|
367
|
+
return;
|
|
368
|
+
window.addEventListener('keydown', handleKeyDown, true);
|
|
369
|
+
return () => window.removeEventListener('keydown', handleKeyDown, true);
|
|
370
|
+
}, [isVisible, handleKeyDown]);
|
|
314
371
|
const ExceptionToolbar = () => {
|
|
315
372
|
return (_jsxs(StyledExeptionToolbar, { children: [_jsx(TMButton, { color: 'primaryOutline', btnStyle: 'text', onClick: () => copyToClipBoard(getFullMessage()), caption: SDKUI_Localizator.CopyToClipboard, showTooltip: false }), _jsx(TMButton, { btnStyle: 'text', onClick: () => { onClose?.(); setIsVisible(false); }, caption: SDKUI_Localizator.Close, showTooltip: false, color: 'error' })] }));
|
|
316
373
|
};
|
|
317
|
-
return (_jsx(Popup, { ref: popupRef, resizeEnabled: resizable, visible: isVisible, onHidden: () => { onClose?.(); setIsVisible(false); }, onShown: handleShown, showCloseButton: true, width: calcResponsiveSizes(deviceType, '600px', '400px', '350px'), height: '350px', minWidth: minWidth, minHeight: minHeight, maxHeight: '95%', maxWidth: '95%', title: title, children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { height: 'calc(100% - 50px)', children: _jsxs(TMTabGroup, { validationItems: [], children: [_jsxs(TMTab, { label: SDKUI_Localizator.Error, children: [_jsxs(TabContextContainer, { style: { height: 'calc(100% - 68px )', paddingRight: '40px' }, children: [_jsxs("p", { children: [" ", _jsx("span", { style: { color: TMColors.primary }, children: "Messaggio: " }), " ", message] }), _jsx("div", { style: { display: 'flex', flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'flex-start', gap: '5px', marginTop: '5px' }, children: _jsxs("div", { children: [_jsxs("span", { style: { color: TMColors.primary }, children: [SDKUI_Localizator.Date, " ", SDKUI_Localizator.Time.toLowerCase(), ": "] }), d.toString()] }) })] }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(`Date: ${dateString}\nTime: ${timeString}\nMessage: ${message}`), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] }), _jsxs(TMTab, { label: SDKUI_Localizator.CompleteError, children: [_jsx(TabContextContainer, { style: { paddingRight: '40px' }, children: JSON.stringify(
|
|
374
|
+
return (_jsx(Popup, { ref: popupRef, resizeEnabled: resizable, visible: isVisible, onHidden: () => { onClose?.(); setIsVisible(false); }, onShown: handleShown, showCloseButton: true, width: calcResponsiveSizes(deviceType, '600px', '400px', '350px'), height: '350px', minWidth: minWidth, minHeight: minHeight, maxHeight: '95%', maxWidth: '95%', title: title, children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { height: 'calc(100% - 50px)', children: _jsxs(TMTabGroup, { validationItems: [], children: [_jsxs(TMTab, { label: SDKUI_Localizator.Error, children: [_jsxs(TabContextContainer, { style: { height: 'calc(100% - 68px )', paddingRight: '40px' }, children: [_jsxs("p", { children: [" ", _jsx("span", { style: { color: TMColors.primary }, children: "Messaggio: " }), " ", message] }), _jsx("div", { style: { display: 'flex', flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'flex-start', gap: '5px', marginTop: '5px' }, children: _jsxs("div", { children: [_jsxs("span", { style: { color: TMColors.primary }, children: [SDKUI_Localizator.Date, " ", SDKUI_Localizator.Time.toLowerCase(), ": "] }), d.toString()] }) })] }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(`Date: ${dateString}\nTime: ${timeString}\nMessage: ${message}`), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] }), _jsxs(TMTab, { label: SDKUI_Localizator.CompleteError, children: [_jsx(TabContextContainer, { style: { paddingRight: '40px' }, children: JSON.stringify(safeException).replaceAll('{', '').replaceAll('}', '').split(`,"`).map((t, index) => (_jsxs("div", { style: { padding: '5px', borderBottom: '1px solid rgb(180,180,180)' }, children: ["\u261B", ' ' + (t.toLowerCase().includes('detail') ? (t.replaceAll(`"`, '').replaceAll(`:`, ': ').replaceAll(String.fromCharCode(92), '')) : (t.replaceAll(`"`, '').replaceAll(`:`, ': ')))] }, index))) }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(JSON.stringify(safeException).replaceAll('{', '').replaceAll('}', '').replaceAll(',', '\n')), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] }), _jsxs(TMTab, { label: SDKUI_Localizator.Details, children: [_jsxs(TabContextContainer, { children: [_jsxs(StyledAppVersionText, { "$color": TMColors.primary, children: [SDK_Globals.appModule, " ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.appVersion })] }), _jsxs(StyledAppVersionText, { "$color": TMColors.tertiary, children: ["SDKUI: ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.sdkuiVersion })] }), _jsxs(StyledAppVersionText, { "$color": TMColors.success, children: ["SDK : ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.sdkVersion })] })] }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(`-${SDK_Globals.appModule}: ${SDK_Globals.appVersion}\n` + `-SDKUI: ${SDK_Globals.sdkuiVersion}\n` + `-SDK: ${SDK_Globals.sdkVersion}\n`), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] })] }) }), _jsx(TMLayoutItem, { height: '40px', children: _jsx(ExceptionToolbar, {}) })] }) }));
|
|
318
375
|
};
|
|
319
376
|
class TMExceptionBoxManager {
|
|
320
377
|
static show({ title, exception, onClose }) {
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface ITMSpinner {
|
|
2
3
|
backgroundColor?: string;
|
|
3
4
|
fontSize?: string;
|
|
4
5
|
description?: string;
|
|
5
6
|
width?: string;
|
|
6
7
|
flat?: boolean;
|
|
8
|
+
onCancel?: () => void;
|
|
9
|
+
cancelText?: string;
|
|
7
10
|
}
|
|
8
|
-
declare const Spinner: ({ backgroundColor, description, fontSize, width, flat }: ITMSpinner) =>
|
|
11
|
+
declare const Spinner: ({ backgroundColor, description, fontSize, width, flat, onCancel, cancelText }: ITMSpinner) => React.JSX.Element;
|
|
9
12
|
declare class TMSpinner {
|
|
10
|
-
static show({ description, backgroundColor, fontSize, flat }?: ITMSpinner): void;
|
|
13
|
+
static show({ description, backgroundColor, fontSize, flat, onCancel, cancelText }?: ITMSpinner): void;
|
|
11
14
|
static hide(): void;
|
|
12
15
|
}
|
|
13
16
|
export { Spinner };
|
|
@@ -32,7 +32,7 @@ const StyledSpinnerWrapper = styled.div `
|
|
|
32
32
|
width: ${props => props.$width || 'fit-content'};
|
|
33
33
|
height: fit-content;
|
|
34
34
|
max-width: 250px;
|
|
35
|
-
max-height: 200px;
|
|
35
|
+
max-height: ${props => props.$hasCancel ? '280px' : '200px'};
|
|
36
36
|
padding: 10px;
|
|
37
37
|
border-radius: 5px;
|
|
38
38
|
background-color: ${props => props.$flat ? 'transparent' : '#fcfcfc'};
|
|
@@ -134,22 +134,49 @@ const StyledSpinnerAnimation = styled.div `
|
|
|
134
134
|
const StyledSpinnerDescription = styled.div `
|
|
135
135
|
font-size: ${props => props.$fontSize || FontSize.defaultFontSize};
|
|
136
136
|
text-align: center;
|
|
137
|
+
white-space: pre-line;
|
|
137
138
|
`;
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
// Pulsante Annulla sotto lo spinner
|
|
140
|
+
const StyledCancelButton = styled.button `
|
|
141
|
+
margin-top: 15px;
|
|
142
|
+
padding: 8px 20px;
|
|
143
|
+
font-size: 14px;
|
|
144
|
+
font-weight: 500;
|
|
145
|
+
color: #fff;
|
|
146
|
+
background-color: #d12a1c;
|
|
147
|
+
border: none;
|
|
148
|
+
border-radius: 5px;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
transition: background-color 0.2s ease, transform 0.1s ease;
|
|
151
|
+
|
|
152
|
+
&:hover {
|
|
153
|
+
background-color: #b8241a;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&:active {
|
|
157
|
+
transform: scale(0.98);
|
|
158
|
+
}
|
|
159
|
+
`;
|
|
160
|
+
const Spinner = ({ backgroundColor = 'transparent', description = '', fontSize = FontSize.defaultFontSize, width = 'fit-content', flat = false, onCancel, cancelText = 'Annulla' }) => {
|
|
161
|
+
return (_jsx(StyledSpinnerContainer, { "$backgroundColor": backgroundColor, children: _jsxs(StyledSpinnerWrapper, { "$width": width, "$flat": flat, "$hasCancel": !!onCancel, children: [_jsxs("div", { style: { position: 'relative', width: '80px', height: '80px' }, children: [_jsx("img", { style: {
|
|
140
162
|
position: 'absolute',
|
|
141
163
|
top: '50%',
|
|
142
164
|
left: '50%',
|
|
143
165
|
transform: 'translate(-54%, -54%)'
|
|
144
|
-
}, src: six, width: 35, alt: "" }), _jsxs(StyledSpinnerAnimation, { children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {})] })] }), _jsx(StyledSpinnerDescription, { "$fontSize": fontSize, children: description })] }) }));
|
|
166
|
+
}, src: six, width: 35, alt: "" }), _jsxs(StyledSpinnerAnimation, { children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {})] })] }), _jsx(StyledSpinnerDescription, { "$fontSize": fontSize, children: description }), onCancel && (_jsx(StyledCancelButton, { onClick: onCancel, children: cancelText }))] }) }));
|
|
145
167
|
};
|
|
146
168
|
class TMSpinner {
|
|
147
|
-
static show({ description, backgroundColor, fontSize, flat
|
|
169
|
+
static show({ description, backgroundColor, fontSize, flat, onCancel, cancelText } = {
|
|
170
|
+
backgroundColor: 'transparent',
|
|
171
|
+
description: '',
|
|
172
|
+
fontSize: FontSize.defaultFontSize,
|
|
173
|
+
flat: false
|
|
174
|
+
}) {
|
|
148
175
|
let container = document.createElement('div');
|
|
149
176
|
container.setAttribute("id", 'tm-spinner-temporary-container');
|
|
150
177
|
document.body.appendChild(container);
|
|
151
178
|
const root = ReactDOM.createRoot(container);
|
|
152
|
-
root.render(_jsx(React.StrictMode, { children: _jsx(Spinner, { backgroundColor: backgroundColor, fontSize: fontSize, description: description, flat: flat }) }));
|
|
179
|
+
root.render(_jsx(React.StrictMode, { children: _jsx(Spinner, { backgroundColor: backgroundColor, fontSize: fontSize, description: description, flat: flat, onCancel: onCancel, cancelText: cancelText }) }));
|
|
153
180
|
}
|
|
154
181
|
static hide() {
|
|
155
182
|
let container = document.getElementById('tm-spinner-temporary-container');
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ValidationItem } from '@topconsultnpm/sdk-ts';
|
|
2
3
|
export interface ITMTabProps {
|
|
3
4
|
title: string;
|
|
@@ -7,14 +8,14 @@ export declare const TMTab: ({ label, propsToBeValidated, children }: {
|
|
|
7
8
|
label?: string;
|
|
8
9
|
propsToBeValidated?: string[] | undefined;
|
|
9
10
|
children?: any;
|
|
10
|
-
}) =>
|
|
11
|
+
}) => React.JSX.Element;
|
|
11
12
|
export declare const TMTabItemBadge: ({ vil }: {
|
|
12
13
|
vil: ValidationItem[];
|
|
13
|
-
}) =>
|
|
14
|
+
}) => React.JSX.Element;
|
|
14
15
|
declare const TMTabGroup: ({ children, fontSize, validationItems, onTabIndexChanged }: {
|
|
15
16
|
onTabIndexChanged?: (e: number) => void;
|
|
16
17
|
children: any;
|
|
17
18
|
fontSize?: string;
|
|
18
19
|
validationItems?: ValidationItem[];
|
|
19
|
-
}) =>
|
|
20
|
+
}) => React.JSX.Element;
|
|
20
21
|
export default TMTabGroup;
|
|
@@ -10,5 +10,5 @@ interface ITMTooltipProps extends ITooltipOptions {
|
|
|
10
10
|
parentStyle?: React.CSSProperties;
|
|
11
11
|
childStyle?: React.CSSProperties;
|
|
12
12
|
}
|
|
13
|
-
declare const TMTooltip: ({ children, position, content, hideAfterDelay, parentStyle, childStyle }: ITMTooltipProps) =>
|
|
13
|
+
declare const TMTooltip: ({ children, position, content, hideAfterDelay, parentStyle, childStyle }: ITMTooltipProps) => React.JSX.Element;
|
|
14
14
|
export default TMTooltip;
|
|
@@ -28,7 +28,7 @@ interface ITMTreeViewProps<T extends ITMTreeItem> {
|
|
|
28
28
|
itemsPerPage?: number;
|
|
29
29
|
showLoadMoreButton?: boolean;
|
|
30
30
|
}
|
|
31
|
-
declare const TMTreeView: <T extends ITMTreeItem>({ dataSource, focusedItem, selectedItems, allowMultipleSelection, onDataChanged, calculateItemsForNode, itemRender, onNodeUpdate, onFocusedItemChanged, onSelectionChanged, shouldDelayFocusOnEvent, onItemContextMenu, autoSelectChildren, itemsPerPage, showLoadMoreButton }: ITMTreeViewProps<T>) =>
|
|
31
|
+
declare const TMTreeView: <T extends ITMTreeItem>({ dataSource, focusedItem, selectedItems, allowMultipleSelection, onDataChanged, calculateItemsForNode, itemRender, onNodeUpdate, onFocusedItemChanged, onSelectionChanged, shouldDelayFocusOnEvent, onItemContextMenu, autoSelectChildren, itemsPerPage, showLoadMoreButton }: ITMTreeViewProps<T>) => React.JSX.Element;
|
|
32
32
|
export default TMTreeView;
|
|
33
33
|
export declare const StyledTreeNode: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$isSelected"> & {
|
|
34
34
|
$isSelected?: boolean;
|