@topconsultnpm/sdkui-react 6.21.0-t2 → 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 +6 -6
- package/lib/components/base/Styled.d.ts +1 -1
- package/lib/components/base/TMAreaManager.js +11 -0
- 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 +12 -2
- 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.js +2 -2
- 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 +12 -15
- 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 +8 -6
- 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 +2 -2
- package/lib/components/editors/TMEditorStyled.d.ts +6 -6
- package/lib/components/editors/TMFormulaEditor.d.ts +2 -1
- package/lib/components/editors/TMFormulaEditor.js +98 -49
- 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 +23 -6
- 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/blog/TMBlogCommentForm.js +5 -2
- package/lib/components/features/documents/TMCopyToFolderForm.js +46 -24
- package/lib/components/features/documents/TMDcmtForm.js +19 -9
- 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/TMDcmtIcon.js +1 -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/TMMasterDetailDcmts.d.ts +0 -2
- package/lib/components/features/documents/TMMasterDetailDcmts.js +4 -5
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +0 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +26 -10
- package/lib/components/features/documents/TMRelationViewer.js +8 -3
- package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +0 -13
- package/lib/components/features/documents/copyAndMergeDcmtsShared.js +1 -39
- 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 +2 -2
- package/lib/components/features/search/TMSearch.d.ts +0 -2
- package/lib/components/features/search/TMSearch.js +2 -2
- package/lib/components/features/search/TMSearchQueryEditor.js +14 -8
- package/lib/components/features/search/TMSearchQueryPanel.js +249 -58
- package/lib/components/features/search/TMSearchResult.d.ts +1 -2
- package/lib/components/features/search/TMSearchResult.js +40 -20
- 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 +1 -1
- 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/forms/Login/Chooser.d.ts +2 -2
- package/lib/components/forms/Login/TMLoginForm.js +15 -3
- 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/TMBlogAttachments.js +2 -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 +5 -3
- package/lib/components/grids/TMBlogsPostUtils.d.ts +10 -9
- package/lib/components/grids/TMBlogsPostUtils.js +3 -1
- 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/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/MergePdfManager.d.ts +45 -0
- package/lib/helper/MergePdfManager.js +148 -0
- package/lib/helper/SDKUI_Globals.js +2 -1
- package/lib/helper/SDKUI_Localizator.d.ts +6 -0
- package/lib/helper/SDKUI_Localizator.js +60 -0
- package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
- package/lib/helper/TMIcons.d.ts +278 -278
- package/lib/helper/TMPdfViewer.d.ts +2 -1
- package/lib/helper/TMToppyMessage.d.ts +2 -2
- package/lib/helper/TMUtils.d.ts +24 -20
- package/lib/helper/TMUtils.js +55 -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/hooks/useCheckInOutOperations.d.ts +4 -3
- package/lib/hooks/useDataUserIdItem.js +1 -1
- package/lib/hooks/useDcmtOperations.d.ts +18 -1
- package/lib/hooks/useDcmtOperations.js +235 -24
- package/lib/hooks/useDocumentOperations.d.ts +0 -2
- package/lib/hooks/useDocumentOperations.js +27 -10
- package/lib/hooks/useInputDialog.d.ts +2 -1
- package/lib/hooks/useRelatedDocuments.js +4 -4
- package/lib/services/platform_services.d.ts +7 -6
- package/lib/ts/types.d.ts +2 -1
- package/lib/ts/types.js +1 -0
- package/package.json +14 -7
|
@@ -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 `
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -138,22 +138,19 @@ const TMTreeView = ({ dataSource = [], focusedItem, selectedItems = [], allowMul
|
|
|
138
138
|
}
|
|
139
139
|
if (delayFocus) {
|
|
140
140
|
// Logica per il ritardo del focus (es. click singolo su icona desktop, gestito dal padre)
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
141
|
+
// Il focus viene ritardato per permettere al doppio click di registrarsi sull'icona,
|
|
142
|
+
// ma il focus avviene comunque (sia con click singolo che doppio)
|
|
143
|
+
if (!clickTimeoutRef.current) {
|
|
144
|
+
// Primo click: imposta il timer per il focus
|
|
145
|
+
lastClickedNodeKeyRef.current = node.key;
|
|
146
|
+
clickTimeoutRef.current = setTimeout(() => {
|
|
147
|
+
onFocusedItemChanged?.(node);
|
|
148
|
+
clickTimeoutRef.current = null;
|
|
149
|
+
lastClickedNodeKeyRef.current = undefined;
|
|
150
|
+
}, 200);
|
|
148
151
|
}
|
|
149
|
-
//
|
|
150
|
-
|
|
151
|
-
clickTimeoutRef.current = setTimeout(() => {
|
|
152
|
-
// Se il timer scade, significa che è stato solo un click singolo.
|
|
153
|
-
onFocusedItemChanged?.(node);
|
|
154
|
-
clickTimeoutRef.current = null;
|
|
155
|
-
lastClickedNodeKeyRef.current = undefined;
|
|
156
|
-
}, 200);
|
|
152
|
+
// Se c'è già un timer attivo (secondo click di doppio click), non fare nulla
|
|
153
|
+
// Il focus avverrà comunque quando scade il timer del primo click
|
|
157
154
|
}
|
|
158
155
|
else {
|
|
159
156
|
// Logica per il focus immediato (per tutti gli altri click, o se shouldDelayFocusOnEvent è false)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface TMUserAvatarProps {
|
|
2
3
|
displayName: string;
|
|
3
4
|
nameForColorCalculation: string;
|
|
4
5
|
tooltipName?: string;
|
|
5
6
|
returnType?: 'jsx' | 'svg';
|
|
6
7
|
}
|
|
7
|
-
declare const TMUserAvatar: (props: TMUserAvatarProps) => string |
|
|
8
|
+
declare const TMUserAvatar: (props: TMUserAvatarProps) => string | React.JSX.Element;
|
|
8
9
|
export default TMUserAvatar;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ValidationItem } from '@topconsultnpm/sdk-ts';
|
|
2
3
|
declare const TMVilViewer: ({ vil }: {
|
|
3
4
|
vil?: ValidationItem[];
|
|
4
|
-
}) =>
|
|
5
|
+
}) => React.JSX.Element | null;
|
|
5
6
|
export default TMVilViewer;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ITMLayoutContainerProps } from './TMLayout';
|
|
2
3
|
interface ITMWaitPanelProps {
|
|
3
4
|
title?: string;
|
|
@@ -12,8 +13,9 @@ interface ITMWaitPanelProps {
|
|
|
12
13
|
isCancelable?: boolean;
|
|
13
14
|
abortController?: AbortController;
|
|
14
15
|
onAbortClick?: (abortController: AbortController | undefined) => void;
|
|
16
|
+
useHighZIndex?: boolean;
|
|
15
17
|
}
|
|
16
|
-
export declare const TMWaitPanel: (props: ITMWaitPanelProps) =>
|
|
18
|
+
export declare const TMWaitPanel: (props: ITMWaitPanelProps) => React.JSX.Element;
|
|
17
19
|
interface ITMLayoutWaitingContainerProps extends ITMLayoutContainerProps {
|
|
18
20
|
showWaitPanel?: boolean;
|
|
19
21
|
waitPanelTitle?: string;
|
|
@@ -27,6 +29,7 @@ interface ITMLayoutWaitingContainerProps extends ITMLayoutContainerProps {
|
|
|
27
29
|
waitPanelMaxValueSecondary?: number;
|
|
28
30
|
isCancelable?: boolean;
|
|
29
31
|
abortController?: AbortController;
|
|
32
|
+
usePortal?: boolean;
|
|
30
33
|
}
|
|
31
|
-
export declare const TMLayoutWaitingContainer: ({ showWaitPanel, showWaitPanelPrimary, showWaitPanelSecondary, waitPanelTitle, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, isCancelable, abortController, gap, onClick, justifyContent, alignItems, children, direction }: ITMLayoutWaitingContainerProps) =>
|
|
34
|
+
export declare const TMLayoutWaitingContainer: ({ showWaitPanel, showWaitPanelPrimary, showWaitPanelSecondary, waitPanelTitle, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, isCancelable, abortController, usePortal, gap, onClick, justifyContent, alignItems, children, direction }: ITMLayoutWaitingContainerProps) => React.JSX.Element;
|
|
32
35
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { createPortal } from 'react-dom';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
import TMLayoutContainer from './TMLayout';
|
|
4
5
|
import { SDKUI_Localizator } from '../../helper';
|
|
@@ -8,7 +9,7 @@ const StyledWaitPanelOverlay = styled.div `
|
|
|
8
9
|
position: fixed;
|
|
9
10
|
top: 0;
|
|
10
11
|
left: 0;
|
|
11
|
-
z-index: 1501;
|
|
12
|
+
z-index: ${props => props.$useHighZIndex ? 2000000001 : 1501};
|
|
12
13
|
transition: all;
|
|
13
14
|
overflow: visible;
|
|
14
15
|
background-color: rgba(0, 0, 0, 0.4);
|
|
@@ -36,7 +37,7 @@ const StyledProgressText = styled.p ` font-weight: bold; color: #333; margin: 0;
|
|
|
36
37
|
const StyledMessage = styled.p ` color: #666; font-size: 0.9em; margin-top: 10px; `;
|
|
37
38
|
const StyledAbortButton = styled.button ` background: #ff4d4d; color: white; border: none; border-radius: 5px; padding: 10px 20px; font-size: 1em; cursor: pointer; margin-top: 20px; &:hover { background: #ff6666; } `;
|
|
38
39
|
export const TMWaitPanel = (props) => {
|
|
39
|
-
const { title, showPrimary, textPrimary, valuePrimary, maxValuePrimary, showSecondary, textSecondary, valueSecondary, maxValueSecondary, isCancelable, abortController, onAbortClick } = props;
|
|
40
|
+
const { title, showPrimary, textPrimary, valuePrimary, maxValuePrimary, showSecondary, textSecondary, valueSecondary, maxValueSecondary, isCancelable, abortController, onAbortClick, useHighZIndex } = props;
|
|
40
41
|
const calculateProgress = (value = 0, maxValue = 0) => {
|
|
41
42
|
if (maxValue === 0)
|
|
42
43
|
return 0;
|
|
@@ -45,10 +46,11 @@ export const TMWaitPanel = (props) => {
|
|
|
45
46
|
};
|
|
46
47
|
let progressValue1 = calculateProgress(valuePrimary, maxValuePrimary);
|
|
47
48
|
let progressValue2 = calculateProgress(valueSecondary, maxValueSecondary);
|
|
48
|
-
return (_jsx(StyledWaitPanelOverlay, { children: _jsxs(StyledWaitPanel, { children: [_jsx(StyledTitle, { children: title }), showPrimary &&
|
|
49
|
+
return (_jsx(StyledWaitPanelOverlay, { "$useHighZIndex": useHighZIndex, children: _jsxs(StyledWaitPanel, { children: [_jsx(StyledTitle, { children: title }), showPrimary &&
|
|
49
50
|
_jsxs("div", { style: { width: '100%', height: '100px' }, children: [_jsx(StyledProgressBarContainer, { children: _jsx(StyledProgressBar, { style: { width: `${progressValue1.toFixed(2)}%` } }) }), _jsxs(StyledProgressText, { children: [progressValue1.toFixed(2), "%"] }), _jsx(StyledMessage, { children: textPrimary })] }), showSecondary &&
|
|
50
51
|
_jsxs("div", { style: { width: '100%', height: '100px' }, children: [_jsx(StyledProgressBarContainer, { children: _jsx(StyledProgressBar, { style: { width: `${progressValue2.toFixed(2)}%` } }) }), _jsxs(StyledProgressText, { children: [progressValue2.toFixed(2), "%"] }), _jsx(StyledMessage, { children: textSecondary })] }), isCancelable && _jsx(StyledAbortButton, { onClick: () => onAbortClick?.(abortController), children: SDKUI_Localizator.Abort })] }) }));
|
|
51
52
|
};
|
|
52
|
-
export const TMLayoutWaitingContainer = ({ showWaitPanel, showWaitPanelPrimary, showWaitPanelSecondary, waitPanelTitle, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, isCancelable, abortController, gap = 3, onClick, justifyContent = 'flex-start', alignItems = 'flex-start', children, direction = 'vertical' }) => {
|
|
53
|
-
|
|
53
|
+
export const TMLayoutWaitingContainer = ({ showWaitPanel, showWaitPanelPrimary, showWaitPanelSecondary, waitPanelTitle, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, isCancelable, abortController, usePortal = false, gap = 3, onClick, justifyContent = 'flex-start', alignItems = 'flex-start', children, direction = 'vertical' }) => {
|
|
54
|
+
const waitPanelElement = showWaitPanel ? (_jsx(TMWaitPanel, { title: waitPanelTitle, showPrimary: showWaitPanelPrimary, textPrimary: waitPanelTextPrimary, valuePrimary: waitPanelValuePrimary, maxValuePrimary: waitPanelMaxValuePrimary, showSecondary: showWaitPanelSecondary, textSecondary: waitPanelTextSecondary, valueSecondary: waitPanelValueSecondary, maxValueSecondary: waitPanelMaxValueSecondary, isCancelable: isCancelable, abortController: abortController, onAbortClick: (abortController) => { setTimeout(() => { abortController?.abort(); }, 1000); }, useHighZIndex: usePortal })) : null;
|
|
55
|
+
return (_jsxs(_Fragment, { children: [usePortal && waitPanelElement && createPortal(waitPanelElement, document.body), _jsxs(TMLayoutContainer, { gap: gap, justifyContent: justifyContent, alignItems: alignItems, direction: direction, children: [children, !usePortal && waitPanelElement] })] }));
|
|
54
56
|
};
|
|
@@ -39,4 +39,4 @@ interface ITMDynDataListItemChooserFormProps extends ITMChooserFormProps<DataLis
|
|
|
39
39
|
dynDL?: DynamicDataListDescriptor;
|
|
40
40
|
searchResult?: SearchResultDescriptor;
|
|
41
41
|
}
|
|
42
|
-
export declare const TMDynDataListItemChooserForm: (props: ITMDynDataListItemChooserFormProps) =>
|
|
42
|
+
export declare const TMDynDataListItemChooserForm: (props: ITMDynDataListItemChooserFormProps) => React.JSX.Element;
|
|
@@ -84,10 +84,15 @@ const TMDynDataListItemChooser = ({ tid, md, width = '100%', titleForm, openChoo
|
|
|
84
84
|
_jsx(TMTooltip, { content: SDKUI_Localizator.ValueNotPresent, children: _jsx(IconWarning, { color: TMColors.warning }) });
|
|
85
85
|
};
|
|
86
86
|
const renderTemplate = () => {
|
|
87
|
+
const isPlaceholder = values?.[0] === placeHolder;
|
|
88
|
+
// Selezione singola: mostra direttamente il primo valore
|
|
89
|
+
if (!allowMultipleSelection) {
|
|
90
|
+
const singleDescription = getValueDescription(values?.[0]);
|
|
91
|
+
return (_jsx(StyledDivHorizontal, { style: { width: '100%', color: isPlaceholder ? '#a9a9a9' : 'inherit', alignItems: 'center' }, children: dataSource && singleDescription && _jsxs(StyledDivHorizontal, { style: { alignItems: 'center', gap: '8px' }, children: [getIcon(), _jsx("p", { children: singleDescription })] }) }));
|
|
92
|
+
}
|
|
87
93
|
const MIN_COUNT_FOR_BADGE = 1;
|
|
88
94
|
const MAX_VISIBLE_ITEMS = 3;
|
|
89
95
|
const MAX_TOOLTIP_ITEMS = 50;
|
|
90
|
-
const isPlaceholder = values?.[0] === placeHolder;
|
|
91
96
|
const descriptions = getDescriptions(MAX_VISIBLE_ITEMS);
|
|
92
97
|
const remainingCount = (values?.length ?? 0) - MAX_VISIBLE_ITEMS;
|
|
93
98
|
const totalCount = values?.length ?? 0;
|
|
@@ -11,7 +11,7 @@ export const TMGroupChooserForm = (props) => {
|
|
|
11
11
|
TMSpinner.hide();
|
|
12
12
|
return items ?? [];
|
|
13
13
|
};
|
|
14
|
-
return (_jsx(TMChooserForm, { title: SDK_Localizator.Groups, allowMultipleSelection: props.allowMultipleSelection, width: props.width, height: props.height, manageUseLocalizedName: true, hasShowOnlySelectedItems: true, selectedIDs: props.selectedIDs, startWithShowOnlySelectedItems: false, cellRenderIcon: () => _jsx(IconUserGroup, { color: '#767676' }), dataSource: props.dataSource, getItems: getItems, onClose: props.onClose, onChoose: (IDs) => { props.onChoose?.(IDs); } }));
|
|
14
|
+
return (_jsx(TMChooserForm, { title: SDK_Localizator.Groups, allowMultipleSelection: props.allowMultipleSelection, width: props.width, height: props.height, manageUseLocalizedName: props.manageUseLocalizedName ?? true, hasShowOnlySelectedItems: true, selectedIDs: props.selectedIDs, startWithShowOnlySelectedItems: false, cellRenderIcon: () => _jsx(IconUserGroup, { color: '#767676' }), dataSource: props.dataSource, getItems: getItems, onClose: props.onClose, onChoose: (IDs) => { props.onChoose?.(IDs); } }));
|
|
15
15
|
};
|
|
16
16
|
export const TMGroupIdViewer = (props) => {
|
|
17
17
|
const [group, setGroup] = useState(null);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { InvoiceRetrieveFormats } from '@topconsultnpm/sdk-ts';
|
|
2
3
|
import { ITMEnumDataBinding } from '../../ts';
|
|
3
|
-
declare const TMInvoiceRetrieveFormats: ({ value, valueOrig, onValueChanged, valuesToExclude, label, width }: ITMEnumDataBinding<InvoiceRetrieveFormats>) =>
|
|
4
|
+
declare const TMInvoiceRetrieveFormats: ({ value, valueOrig, onValueChanged, valuesToExclude, label, width }: ITMEnumDataBinding<InvoiceRetrieveFormats>) => React.JSX.Element;
|
|
4
5
|
export default TMInvoiceRetrieveFormats;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { OrderRetrieveFormats } from '@topconsultnpm/sdk-ts';
|
|
2
3
|
import { ITMEnumDataBinding } from '../../ts';
|
|
3
|
-
declare const TMOrderRetrieveFormats: ({ value, valueOrig, onValueChanged, valuesToExclude, label, width }: ITMEnumDataBinding<OrderRetrieveFormats>) =>
|
|
4
|
+
declare const TMOrderRetrieveFormats: ({ value, valueOrig, onValueChanged, valuesToExclude, label, width }: ITMEnumDataBinding<OrderRetrieveFormats>) => React.JSX.Element;
|
|
4
5
|
export default TMOrderRetrieveFormats;
|
|
@@ -19,13 +19,13 @@ export declare const TMRelationIdViewer: ({ relationType, relationId, showIcon,
|
|
|
19
19
|
relationId?: number;
|
|
20
20
|
showIcon?: boolean;
|
|
21
21
|
noneSelectionText?: string;
|
|
22
|
-
}) =>
|
|
22
|
+
}) => React.JSX.Element;
|
|
23
23
|
export declare const TMRelationIcon: ({ rd, relationType }: {
|
|
24
24
|
rd: RelationDescriptor | undefined;
|
|
25
25
|
relationType?: RelationTypes;
|
|
26
|
-
}) =>
|
|
26
|
+
}) => React.JSX.Element;
|
|
27
27
|
export declare const TMRelationTooltip: ({ rd, relationType, children }: {
|
|
28
28
|
rd?: RelationDescriptor;
|
|
29
29
|
relationType: RelationTypes | undefined;
|
|
30
30
|
children: React.ReactNode;
|
|
31
|
-
}) =>
|
|
31
|
+
}) => React.JSX.Element;
|
|
@@ -38,8 +38,8 @@ interface ITMUserChooserFormProps extends ITMChooserFormProps<UserDescriptor> {
|
|
|
38
38
|
export declare const TMUserChooserForm: React.FunctionComponent<ITMUserChooserFormProps>;
|
|
39
39
|
export declare const TMUserIcon: ({ ud }: {
|
|
40
40
|
ud?: UserDescriptor;
|
|
41
|
-
}) =>
|
|
41
|
+
}) => React.JSX.Element | null;
|
|
42
42
|
export declare const TMUserTooltip: ({ ud, children }: {
|
|
43
43
|
ud?: UserDescriptor;
|
|
44
44
|
children: React.ReactNode;
|
|
45
|
-
}) =>
|
|
45
|
+
}) => React.JSX.Element;
|
|
@@ -7,7 +7,7 @@ export declare const StyledEditorContainer: import("styled-components/dist/types
|
|
|
7
7
|
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$width"> & {
|
|
8
8
|
$width: string;
|
|
9
9
|
}, never>>> & string;
|
|
10
|
-
export declare const StyledEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "$
|
|
10
|
+
export declare const StyledEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "$width" | "$borderRadius" | "$fontSize" | "$type" | "$disabled" | "$vil" | "$isModified" | "$maxValue" | "$isMobile"> & {
|
|
11
11
|
$vil: ValidationItem[];
|
|
12
12
|
$width: string;
|
|
13
13
|
$type: string;
|
|
@@ -17,7 +17,7 @@ export declare const StyledEditor: import("styled-components/dist/types").IStyle
|
|
|
17
17
|
$disabled: boolean;
|
|
18
18
|
$isMobile?: boolean;
|
|
19
19
|
$borderRadius?: string;
|
|
20
|
-
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "$
|
|
20
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "$width" | "$borderRadius" | "$fontSize" | "$type" | "$disabled" | "$vil" | "$isModified" | "$maxValue" | "$isMobile"> & {
|
|
21
21
|
$vil: ValidationItem[];
|
|
22
22
|
$width: string;
|
|
23
23
|
$type: string;
|
|
@@ -37,20 +37,20 @@ export declare const StyledEditorIcon: import("styled-components/dist/types").IS
|
|
|
37
37
|
$disabled: boolean;
|
|
38
38
|
$isModified: boolean;
|
|
39
39
|
}, never>>> & string;
|
|
40
|
-
export declare const StyledEditorLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color" | "$
|
|
40
|
+
export declare const StyledEditorLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color" | "$fontSize" | "$disabled" | "$isFocused" | "$labelPosition"> & {
|
|
41
41
|
$isFocused: boolean;
|
|
42
42
|
$labelPosition: "right" | "left" | "top";
|
|
43
43
|
$disabled: boolean;
|
|
44
44
|
$fontSize?: string;
|
|
45
45
|
$color?: string;
|
|
46
|
-
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color" | "$
|
|
46
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color" | "$fontSize" | "$disabled" | "$isFocused" | "$labelPosition"> & {
|
|
47
47
|
$isFocused: boolean;
|
|
48
48
|
$labelPosition: "right" | "left" | "top";
|
|
49
49
|
$disabled: boolean;
|
|
50
50
|
$fontSize?: string;
|
|
51
51
|
$color?: string;
|
|
52
52
|
}, never>>> & string;
|
|
53
|
-
export declare const StyledTextareaEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$
|
|
53
|
+
export declare const StyledTextareaEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$width" | "$maxHeight" | "$borderRadius" | "$fontSize" | "$disabled" | "$vil" | "$isModified" | "$isMobile" | "$resize"> & {
|
|
54
54
|
$vil: ValidationItem[];
|
|
55
55
|
$width: string;
|
|
56
56
|
$isModified: boolean;
|
|
@@ -60,7 +60,7 @@ export declare const StyledTextareaEditor: import("styled-components/dist/types"
|
|
|
60
60
|
$maxHeight?: string;
|
|
61
61
|
$borderRadius?: string;
|
|
62
62
|
$resize?: boolean;
|
|
63
|
-
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$
|
|
63
|
+
}, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$width" | "$maxHeight" | "$borderRadius" | "$fontSize" | "$disabled" | "$vil" | "$isModified" | "$isMobile" | "$resize"> & {
|
|
64
64
|
$vil: ValidationItem[];
|
|
65
65
|
$width: string;
|
|
66
66
|
$isModified: boolean;
|
|
@@ -28,8 +28,9 @@ export declare class FormulaDescriptor {
|
|
|
28
28
|
metadataDataTypeDest?: MetadataDataTypes;
|
|
29
29
|
tid?: number;
|
|
30
30
|
description?: string;
|
|
31
|
+
syntax?: string;
|
|
31
32
|
}
|
|
32
|
-
export declare const renderFormulaIcon: (iconType: FormulaIconTypes, tid?: number, md?: MetadataDescriptor) =>
|
|
33
|
+
export declare const renderFormulaIcon: (iconType: FormulaIconTypes, tid?: number, md?: MetadataDescriptor) => React.JSX.Element;
|
|
33
34
|
declare const TMFormulaEditor: React.FunctionComponent<ITMApplyFormProps<FormulaDescriptor>>;
|
|
34
35
|
export default TMFormulaEditor;
|
|
35
36
|
export declare class FormulaHelper {
|