@topconsultnpm/sdkui-react 6.22.0-dev3.3 → 6.22.0-dev3.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +45 -43
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +67 -60
- package/lib/components/base/Styled.d.ts +93 -77
- package/lib/components/base/Styled.js +7 -5
- package/lib/components/base/TMAlert.js +6 -8
- package/lib/components/base/TMAreaManager.js +53 -55
- 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/TMCustomButton.js +40 -48
- package/lib/components/base/TMDataGrid.js +2 -2
- package/lib/components/base/TMDataGridExportForm.d.ts +2 -1
- package/lib/components/base/TMFileManager.d.ts +2 -1
- package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -1
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
- package/lib/components/base/TMFileManagerUtils.d.ts +4 -6
- 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/TMPanel.js +2 -2
- package/lib/components/base/TMSpinner.d.ts +4 -2
- package/lib/components/base/TMSpinner.js +9 -7
- package/lib/components/base/TMTab.d.ts +4 -3
- package/lib/components/base/TMTabControl.d.ts +106 -0
- package/lib/components/base/TMTabControl.js +664 -0
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTreeView.d.ts +14 -8
- package/lib/components/base/TMTreeView.js +33 -1
- package/lib/components/base/TMUserAvatar.d.ts +2 -1
- package/lib/components/base/TMVilViewer.d.ts +2 -1
- package/lib/components/base/TMWaitPanel.d.ts +3 -2
- package/lib/components/base/TMWaitPanel.js +1 -1
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.d.ts +12 -0
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.js +185 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.d.ts +169 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.js +320 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +53 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.js +274 -0
- package/lib/components/base/waitPanel/index.d.ts +1 -0
- package/lib/components/base/waitPanel/index.js +1 -0
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
- package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +2 -1
- package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +2 -1
- package/lib/components/choosers/TMPathChooser.js +17 -34
- package/lib/components/choosers/TMQuickSearchInfo.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 +20 -42
- package/lib/components/editors/TMFormulaEditor.d.ts +1 -1
- package/lib/components/editors/TMHtmlContentDisplay.d.ts +2 -1
- package/lib/components/editors/TMHtmlEditor.d.ts +2 -1
- package/lib/components/editors/TMMetadataValues.js +5 -5
- package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
- package/lib/components/features/archive/TMArchive.js +7 -2
- package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +28 -0
- package/lib/components/features/assistant/TMHelpOnLineChat.js +888 -0
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -1
- package/lib/components/features/documents/TMBatchUpdateForm.js +3 -4
- package/lib/components/features/documents/TMCopyToFolderForm.js +50 -42
- package/lib/components/features/documents/TMDcmtForm.js +51 -62
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtIcon.d.ts +2 -3
- package/lib/components/features/documents/TMDcmtIcon.js +3 -5
- package/lib/components/features/documents/TMDcmtPreview.d.ts +8 -6
- package/lib/components/features/documents/TMDcmtPreview.js +5 -3
- package/lib/components/features/documents/TMDcmtTasks.d.ts +2 -1
- package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
- package/lib/components/features/documents/TMFileUploader.js +26 -26
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +54 -129
- package/lib/components/features/documents/TMMasterInfoFields.d.ts +2 -1
- package/lib/components/features/documents/TMMasterInfoFields.js +3 -2
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +2 -1
- package/lib/components/features/documents/TMMergeToPdfForm.js +56 -54
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +2 -1
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +2 -5
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +5 -5
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +3 -3
- package/lib/components/features/documents/TMRelationViewer.d.ts +16 -9
- package/lib/components/features/documents/TMRelationViewer.js +238 -166
- package/lib/components/features/documents/relationTreeState.d.ts +32 -0
- package/lib/components/features/documents/relationTreeState.js +89 -0
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +2 -1
- package/lib/components/features/search/TMMetadataOutputForm.d.ts +2 -1
- package/lib/components/features/search/TMMetadataSorterForm.d.ts +2 -1
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
- package/lib/components/features/search/TMSearch.d.ts +1 -1
- package/lib/components/features/search/TMSearch.js +68 -9
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +9 -3
- package/lib/components/features/search/TMSearchResult.d.ts +5 -0
- package/lib/components/features/search/TMSearchResult.js +19 -12
- 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/TMTreeSelector.js +38 -36
- package/lib/components/features/search/TMViewHistoryDcmt.d.ts +2 -1
- package/lib/components/features/search/TMViewHistoryDcmt.js +14 -25
- package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
- package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
- package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
- package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksView.js +96 -101
- package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +3 -2
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +91 -91
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +8 -7
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +3 -1
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +3 -1
- package/lib/components/forms/Login/Chooser.d.ts +2 -2
- package/lib/components/forms/TMChooserForm.d.ts +2 -1
- package/lib/components/forms/TMResultDialog.js +1 -1
- package/lib/components/forms/TMSaveForm.d.ts +4 -4
- package/lib/components/grids/TMBlogAttachments.d.ts +2 -1
- package/lib/components/grids/TMBlogHeader.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.js +92 -96
- package/lib/components/grids/TMBlogsPostUtils.d.ts +9 -9
- package/lib/components/grids/TMValidationItemsList.d.ts +2 -1
- package/lib/components/index.d.ts +6 -0
- package/lib/components/index.js +5 -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 +5 -6
- 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 +29 -31
- package/lib/components/query/TMQueryEditor.d.ts +17 -10
- package/lib/components/query/TMQueryEditor.js +2 -1
- package/lib/components/settings/SettingsAppearance.d.ts +2 -1
- package/lib/components/sidebar/TMAboutApp.d.ts +2 -1
- package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
- package/lib/components/sidebar/TMHeader.d.ts +4 -3
- package/lib/components/sidebar/TMHeader.js +2 -2
- package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -2
- package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +3 -2
- package/lib/components/viewers/TMMidViewer.d.ts +2 -2
- package/lib/components/viewers/TMTidViewer.d.ts +2 -2
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/SDKUI_Localizator.d.ts +24 -0
- package/lib/helper/SDKUI_Localizator.js +240 -0
- package/lib/helper/TMAppUpdatedModal.d.ts +2 -1
- package/lib/helper/TMAppUpdatedModal.js +93 -93
- package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
- package/lib/helper/TMIcons.d.ts +280 -280
- package/lib/helper/TMPdfViewer.d.ts +2 -1
- package/lib/helper/TMToppyMessage.d.ts +2 -2
- package/lib/helper/TMUtils.d.ts +10 -4
- package/lib/helper/ZipManager.d.ts +1 -1
- package/lib/helper/ZipManager.js +2 -1
- package/lib/helper/dcmtsHelper.d.ts +2 -0
- package/lib/helper/dcmtsHelper.js +3 -1
- package/lib/helper/helpers.d.ts +1 -1
- package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
- package/lib/hooks/useCheckInOutOperations.js +14 -34
- package/lib/hooks/useDcmtOperations.d.ts +3 -12
- package/lib/hooks/useDcmtOperations.js +187 -179
- package/lib/hooks/useDocumentOperations.d.ts +1 -0
- package/lib/hooks/useDocumentOperations.js +14 -25
- package/lib/hooks/useInputDialog.d.ts +2 -1
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +0 -15
- package/lib/hooks/useMultiMasterDetailDcmts.js +65 -67
- package/lib/hooks/usePreventFileDrop.js +9 -0
- package/lib/hooks/useWorkflowApprove.js +33 -17
- package/lib/services/caseflow/CaseFlowService.d.ts +36 -6
- package/lib/services/caseflow/CaseFlowService.js +55 -14
- package/lib/services/platform_services.d.ts +3 -2
- package/package.json +71 -71
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useState, useMemo } from 'react';
|
|
3
3
|
import TMModal from './TMModal';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import { SDKUI_Localizator
|
|
5
|
+
import { SDKUI_Localizator } from '../..';
|
|
6
6
|
import { getButtonAttributes, getSelectedItem } from '../../helper/dcmtsHelper';
|
|
7
7
|
import { DeviceType, useDeviceType } from './TMDeviceProvider';
|
|
8
|
+
import TMWaitPanelManager from './waitPanel/TMWaitPanelManager';
|
|
8
9
|
const IframeContainer = styled.div `
|
|
9
10
|
display: flex;
|
|
10
11
|
height: 100%;
|
|
@@ -53,12 +54,6 @@ const TMCustomButton = (props) => {
|
|
|
53
54
|
const [loading, setLoading] = useState(true);
|
|
54
55
|
const [error, setError] = useState(false);
|
|
55
56
|
const itemsToProcess = useMemo(() => selectedItems && selectedItems.length > 0 ? selectedItems : [attributes], [selectedItems, attributes]);
|
|
56
|
-
// Stati per il wait panel
|
|
57
|
-
const [showWaitPanel, setShowWaitPanel] = useState(itemsToProcess.length > 0 && !RunOnce);
|
|
58
|
-
const [waitPanelText, setWaitPanelText] = useState(SDKUI_Localizator.CustomButtonActions.replaceParams(1, itemsToProcess.length));
|
|
59
|
-
const [waitPanelValue, setWaitPanelValue] = useState(0);
|
|
60
|
-
const [waitPanelMaxValue, setWaitPanelMaxValue] = useState(itemsToProcess.length);
|
|
61
|
-
const [abortController, setAbortController] = useState(undefined);
|
|
62
57
|
// Aggiungi timestamp all'URL per evitare cache
|
|
63
58
|
const iframeUrl = useMemo(() => {
|
|
64
59
|
if (!scriptUrl)
|
|
@@ -83,41 +78,45 @@ const TMCustomButton = (props) => {
|
|
|
83
78
|
setLoading(false);
|
|
84
79
|
setError(true);
|
|
85
80
|
};
|
|
86
|
-
const executeSequentially = async (
|
|
81
|
+
const executeSequentially = async () => {
|
|
87
82
|
if (!itemsToProcess)
|
|
88
83
|
return;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
84
|
+
const waitPanel = TMWaitPanelManager.show({
|
|
85
|
+
title: SDKUI_Localizator.CustomButtonAction,
|
|
86
|
+
max: itemsToProcess.length,
|
|
87
|
+
cancelable: true,
|
|
88
|
+
showCounters: false,
|
|
89
|
+
});
|
|
90
|
+
try {
|
|
91
|
+
for (const [index, item] of itemsToProcess.entries()) {
|
|
92
|
+
if (waitPanel.aborted)
|
|
93
|
+
break;
|
|
94
|
+
waitPanel.setSubtitle(SDKUI_Localizator.CustomButtonActions.replaceParams(index + 1, itemsToProcess.length));
|
|
95
|
+
// Attendi che l'iframe sia pronto e invia il messaggio
|
|
96
|
+
await new Promise((resolve) => {
|
|
97
|
+
const checkIframe = setInterval(() => {
|
|
98
|
+
if (iframeRef.current?.contentWindow) {
|
|
99
|
+
clearInterval(checkIframe);
|
|
100
|
+
if (selectedItems && selectedItems.length > 0) {
|
|
101
|
+
//devo convertire item in formData
|
|
102
|
+
const processedItem = getSelectedItem(args, formData, item);
|
|
103
|
+
postMessageIframe(processedItem);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
postMessageIframe(item);
|
|
107
|
+
}
|
|
108
|
+
// Attendi prima di passare al prossimo
|
|
109
|
+
setTimeout(resolve, 500);
|
|
106
110
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
}, 100);
|
|
117
|
-
});
|
|
111
|
+
}, 100);
|
|
112
|
+
});
|
|
113
|
+
await waitPanel.step();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
finally {
|
|
117
|
+
waitPanel.close();
|
|
118
|
+
onClose?.();
|
|
118
119
|
}
|
|
119
|
-
setShowWaitPanel(false);
|
|
120
|
-
onClose?.();
|
|
121
120
|
};
|
|
122
121
|
const postMessageIframe = (data) => {
|
|
123
122
|
console.log("TMCustomButton - postMessageIframe - data:", data);
|
|
@@ -130,14 +129,7 @@ const TMCustomButton = (props) => {
|
|
|
130
129
|
return;
|
|
131
130
|
if (!RunOnce && itemsToProcess.length > 0) {
|
|
132
131
|
// esegui per ogni item selezionato
|
|
133
|
-
|
|
134
|
-
controller.signal.addEventListener('abort', () => {
|
|
135
|
-
setShowWaitPanel(false);
|
|
136
|
-
onClose?.();
|
|
137
|
-
});
|
|
138
|
-
setAbortController(controller);
|
|
139
|
-
setWaitPanelMaxValue(itemsToProcess.length);
|
|
140
|
-
executeSequentially(controller);
|
|
132
|
+
executeSequentially();
|
|
141
133
|
}
|
|
142
134
|
else {
|
|
143
135
|
// Modalità RunOnce: invia dati all'iframe quando è caricato
|
|
@@ -157,6 +149,6 @@ const TMCustomButton = (props) => {
|
|
|
157
149
|
}
|
|
158
150
|
}, []);
|
|
159
151
|
const iframeContent = (_jsxs(IframeContainer, { style: !RunOnce ? { visibility: 'hidden' } : {}, children: [loading && _jsx(LoadingOverlay, {}), error && _jsx("div", { children: "Si \u00E8 verificato un errore nel caricamento del contenuto." }), !error && _jsx(StyledIframe, { ref: iframeRef, loading: 'lazy', onLoad: handleLoad, onError: handleError, src: iframeUrl })] }));
|
|
160
|
-
return isModal && RunOnce ? (_jsx(TMModal, { title: button.title, width: isMobile ? '95%' : '60%', height: isMobile ? '95%' : '70%', resizable: isMobile ? false : true, expandable: isMobile ? false : true, onClose: onClose, children: iframeContent })) : !RunOnce &&
|
|
152
|
+
return isModal && RunOnce ? (_jsx(TMModal, { title: button.title, width: isMobile ? '95%' : '60%', height: isMobile ? '95%' : '70%', resizable: isMobile ? false : true, expandable: isMobile ? false : true, onClose: onClose, children: iframeContent })) : !RunOnce && iframeContent;
|
|
161
153
|
};
|
|
162
154
|
export default TMCustomButton;
|
|
@@ -23,7 +23,7 @@ const TMDataGrid = React.forwardRef((props, ref) => {
|
|
|
23
23
|
// events and callbacks
|
|
24
24
|
onSelectionChanged, onFocusedRowChanged, onRowDblClick, onRowClick, onCellClick, onCellDblClick, onOptionChanged, onContentReady, onContextMenuPreparing, onInitialized, onEditorPreparing, onCellPrepared, onRowPrepared, onRowUpdating, onRowExpanded, onRowCollapsed, onRowUpdated, onSaved, onEditCanceled, onEditingStart, onEditingChange, customizeColumns, onKeyDown, scrolling = { mode: 'standard', useNative: SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar === 1 }, paging = { enabled: true, pageSize: pageSize }, pager = { visible: true, showInfo: true, showNavigationButtons: true }, selection = { mode: 'multiple', showCheckBoxesMode: "always", selectAllMode: "allPages" }, sorting, summary, stateStoring, grouping, groupPanel, filterRow, headerFilter, editing, rowDragging, masterDetail,
|
|
25
25
|
// other properties
|
|
26
|
-
disabled = false, autoNavigateToFocusedRow = true, columnResizingMode = 'widget', columnHidingEnabled = true, columnAutoWidth = true, allowColumnResizing = true, allowColumnReordering = true, showBorders = true, showRowLines = SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines === 1, showColumnLines = SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines === 1, showColumnHeaders = true, rowAlternationEnabled = false, wordWrapEnabled = false, noDataText, columnMinWidth,
|
|
26
|
+
disabled = false, autoNavigateToFocusedRow = true, columnResizingMode = 'widget', columnHidingEnabled = true, columnAutoWidth = true, allowColumnResizing = true, allowColumnReordering = true, showBorders = true, showRowLines = SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines === 1, showColumnLines = SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines === 1, showColumnHeaders = true, rowAlternationEnabled = false, repaintChangesOnly = false, wordWrapEnabled = false, noDataText, columnMinWidth,
|
|
27
27
|
// styles
|
|
28
28
|
id, width = '100%', height = '100%', } = props;
|
|
29
29
|
const internalRef = React.useRef(null);
|
|
@@ -416,7 +416,7 @@ const TMDataGrid = React.forwardRef((props, ref) => {
|
|
|
416
416
|
// events and callbacks
|
|
417
417
|
onSelectionChanged: onSelectionChangedCallback, onRowDblClick: onRowDblClickCallback, onRowPrepared: onRowPrepared, onContextMenuPreparing: onContextMenuPreparingCallback, onToolbarPreparing: onToolbarPreparingCallback, onFocusedRowChanged: onFocusedRowChanged, onRowClick: onRowClick, onCellClick: onCellClick, onCellDblClick: onCellDblClick, onOptionChanged: onOptionChangedCallback, onContentReady: onContentReadyCallback, onInitialized: onInitialized, customizeColumns: customizeColumns, onEditorPreparing: onEditorPreparing, onCellPrepared: onCellPrepared, onRowUpdating: onRowUpdating, onRowExpanded: onRowExpanded, onRowCollapsed: onRowCollapsed, onRowUpdated: onRowUpdated, onSaved: onSaved, onEditCanceled: onEditCanceled, onEditingStart: onEditingStart, onEditingChange: onEditingChange, onKeyDown: onKeyDown,
|
|
418
418
|
// other properties
|
|
419
|
-
disabled: disabled, autoNavigateToFocusedRow: autoNavigateToFocusedRow, focusedRowKey: focusedRowKey, columnHidingEnabled: columnHidingEnabled, columnResizingMode: columnResizingMode, columnAutoWidth: columnAutoWidth, allowColumnResizing: allowColumnResizing, allowColumnReordering: allowColumnReordering, showBorders: showBorders, showRowLines: showRowLines, showColumnLines: showColumnLines, showColumnHeaders: showColumnHeaders, rowAlternationEnabled: rowAlternationEnabled, wordWrapEnabled: wordWrapEnabled, columnMinWidth: columnMinWidth, noDataText: noDataText,
|
|
419
|
+
disabled: disabled, autoNavigateToFocusedRow: autoNavigateToFocusedRow, focusedRowKey: focusedRowKey, columnHidingEnabled: columnHidingEnabled, columnResizingMode: columnResizingMode, columnAutoWidth: columnAutoWidth, allowColumnResizing: allowColumnResizing, allowColumnReordering: allowColumnReordering, showBorders: showBorders, showRowLines: showRowLines, showColumnLines: showColumnLines, showColumnHeaders: showColumnHeaders, rowAlternationEnabled: rowAlternationEnabled, repaintChangesOnly: repaintChangesOnly, wordWrapEnabled: wordWrapEnabled, columnMinWidth: columnMinWidth, noDataText: noDataText,
|
|
420
420
|
// styles
|
|
421
421
|
width: width, height: height, style: {
|
|
422
422
|
userSelect: 'none',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IColumnProps } from 'devextreme-react/data-grid';
|
|
2
3
|
import { SearchResultDescriptor } from '@topconsultnpm/sdk-ts';
|
|
3
4
|
export type FormatOption = {
|
|
@@ -11,5 +12,5 @@ interface TMDataGridExportFormProps {
|
|
|
11
12
|
selectedRowKeys: Array<number>;
|
|
12
13
|
onCloseExportForm: () => void;
|
|
13
14
|
}
|
|
14
|
-
declare const TMDataGridExportForm: (props: TMDataGridExportFormProps) =>
|
|
15
|
+
declare const TMDataGridExportForm: (props: TMDataGridExportFormProps) => React.JSX.Element;
|
|
15
16
|
export default TMDataGridExportForm;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { FileItem } from "./TMFileManagerUtils";
|
|
2
3
|
import { TMContextMenuItemProps } from '../NewComponents/ContextMenu/types';
|
|
3
4
|
interface TMFileManagerProps {
|
|
@@ -42,5 +43,5 @@ interface TMFileManagerProps {
|
|
|
42
43
|
/** Optional: Callback to handle back button */
|
|
43
44
|
onMaximizePanel?: () => void;
|
|
44
45
|
}
|
|
45
|
-
declare const TMFileManager: (props: TMFileManagerProps) =>
|
|
46
|
+
declare const TMFileManager: (props: TMFileManagerProps) => React.JSX.Element;
|
|
46
47
|
export default TMFileManager;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { FileItem } from "./TMFileManagerUtils";
|
|
2
3
|
import { UserDescriptor } from "@topconsultnpm/sdk-ts";
|
|
3
4
|
import { TMContextMenuItemProps } from "../NewComponents/ContextMenu/types";
|
|
@@ -13,5 +14,5 @@ interface TMFileManagerDataGridViewProps {
|
|
|
13
14
|
userID?: number;
|
|
14
15
|
onDoubleClickHandler?: (fileItem: FileItem | undefined) => void;
|
|
15
16
|
}
|
|
16
|
-
declare const TMFileManagerDataGridView: (props: TMFileManagerDataGridViewProps) =>
|
|
17
|
+
declare const TMFileManagerDataGridView: (props: TMFileManagerDataGridViewProps) => React.JSX.Element;
|
|
17
18
|
export default TMFileManagerDataGridView;
|
|
@@ -20,5 +20,5 @@ export interface TMFileManagerThumbnailItemsProps {
|
|
|
20
20
|
onDoubleClick?: (file: FileItem) => void;
|
|
21
21
|
userID?: number;
|
|
22
22
|
}
|
|
23
|
-
declare const TMFileManagerThumbnailItems: (props: TMFileManagerThumbnailItemsProps) =>
|
|
23
|
+
declare const TMFileManagerThumbnailItems: (props: TMFileManagerThumbnailItemsProps) => React.JSX.Element;
|
|
24
24
|
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;
|
|
@@ -48,15 +48,13 @@ export declare const colors: {
|
|
|
48
48
|
LIGHT_YELLOW: string;
|
|
49
49
|
MEDIUM_GREEN: string;
|
|
50
50
|
};
|
|
51
|
-
export declare const TMFileItemContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
51
|
+
export declare const TMFileItemContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
52
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
53
|
+
}, {
|
|
52
54
|
$backgroundColor?: string;
|
|
53
55
|
$textColor?: string;
|
|
54
56
|
$bgHoverColor?: string;
|
|
55
|
-
}
|
|
56
|
-
$backgroundColor?: string;
|
|
57
|
-
$textColor?: string;
|
|
58
|
-
$bgHoverColor?: string;
|
|
59
|
-
}, never>>> & string;
|
|
57
|
+
}>> & string;
|
|
60
58
|
export declare const getFileItemLinkUrl: (fileItem: FileItem | undefined) => string | undefined;
|
|
61
59
|
export declare const findFileItems: (items: Array<FileItem>, id: number) => FileItem | undefined;
|
|
62
60
|
export declare const setFolderTreeViewItems: (items: Array<FileItem>) => Array<TMFileManagerTreeViewDirectory>;
|
|
@@ -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>;
|
|
@@ -3,7 +3,7 @@ import { useCallback, useRef, useState, forwardRef, useImperativeHandle } from '
|
|
|
3
3
|
import styled, { css, keyframes } from 'styled-components';
|
|
4
4
|
import { getAppModuleGradient, IconArrowLeft, IconClearButton, IconRefresh, IconWindowMaximize, IconWindowMinimize, isPositiveNumber, SDKUI_Localizator } from '../../helper';
|
|
5
5
|
import TMButton from './TMButton';
|
|
6
|
-
import {
|
|
6
|
+
import { SpinnerGraphic } from './TMSpinner';
|
|
7
7
|
import { TMExceptionBoxManager } from './TMPopUp';
|
|
8
8
|
import { Gutters, TMColors } from '../../utils/theme';
|
|
9
9
|
const StyledBackButton = styled.button `
|
|
@@ -326,6 +326,6 @@ onRefresh, isRefreshing, onActivate, onBack, backCaption = SDKUI_Localizator.Bac
|
|
|
326
326
|
}, children: [toolbar, onRefresh && _jsx(TMButton, { color: 'primaryOutline', caption: SDKUI_Localizator.Refresh, disabled: isBusy, icon: _jsx(StyledRefreshIcon, { $isSpinning: isBusy, children: _jsx(IconRefresh, {}) }), btnStyle: 'icon', onClick: handleRefresh }), allowMaximize && _jsx(TMButton, { color: 'primaryOutline', caption: isMaximized ? SDKUI_Localizator.Minimize : SDKUI_Localizator.Maximize, icon: isMaximized
|
|
327
327
|
? _jsx(IconWindowMinimize, { fontSize: 16 })
|
|
328
328
|
: _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?.(); } })] })] }) }), _jsxs(StyledPanelContent, { $height: showHeader ? "calc(100% - 40px)" : "100%", $padding: padding, $backgroundColor: backgroundColorContainer ?? `#FFFFFF`, children: [children, isBusy &&
|
|
329
|
-
_jsxs(StyledPanelLoaderOverlay, { children: [_jsx(
|
|
329
|
+
_jsxs(StyledPanelLoaderOverlay, { children: [_jsx(SpinnerGraphic, {}), _jsx("div", { children: SDKUI_Localizator.Loading })] })] })] }));
|
|
330
330
|
});
|
|
331
331
|
export default TMPanel;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface ITMSpinner {
|
|
2
3
|
backgroundColor?: string;
|
|
3
4
|
fontSize?: string;
|
|
@@ -7,10 +8,11 @@ interface ITMSpinner {
|
|
|
7
8
|
onCancel?: () => void;
|
|
8
9
|
cancelText?: string;
|
|
9
10
|
}
|
|
10
|
-
declare const
|
|
11
|
+
declare const SpinnerGraphic: () => React.JSX.Element;
|
|
12
|
+
declare const Spinner: ({ backgroundColor, description, fontSize, width, flat, onCancel, cancelText }: ITMSpinner) => React.JSX.Element;
|
|
11
13
|
declare class TMSpinner {
|
|
12
14
|
static show({ description, backgroundColor, fontSize, flat, onCancel, cancelText }?: ITMSpinner): void;
|
|
13
15
|
static hide(): void;
|
|
14
16
|
}
|
|
15
|
-
export { Spinner };
|
|
17
|
+
export { Spinner, SpinnerGraphic };
|
|
16
18
|
export default TMSpinner;
|
|
@@ -157,13 +157,15 @@ const StyledCancelButton = styled.button `
|
|
|
157
157
|
transform: scale(0.98);
|
|
158
158
|
}
|
|
159
159
|
`;
|
|
160
|
+
// Grafica dello spinner (logo + 8 pallini animati), riusabile anche nei loader inline
|
|
161
|
+
const SpinnerGraphic = () => (_jsxs("div", { style: { position: 'relative', width: '80px', height: '80px' }, children: [_jsx("img", { style: {
|
|
162
|
+
position: 'absolute',
|
|
163
|
+
top: '50%',
|
|
164
|
+
left: '50%',
|
|
165
|
+
transform: 'translate(-54%, -54%)'
|
|
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", {})] })] }));
|
|
160
167
|
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: [
|
|
162
|
-
position: 'absolute',
|
|
163
|
-
top: '50%',
|
|
164
|
-
left: '50%',
|
|
165
|
-
transform: 'translate(-54%, -54%)'
|
|
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 }))] }) }));
|
|
168
|
+
return (_jsx(StyledSpinnerContainer, { $backgroundColor: backgroundColor, children: _jsxs(StyledSpinnerWrapper, { $width: width, $flat: flat, $hasCancel: !!onCancel, children: [_jsx(SpinnerGraphic, {}), _jsx(StyledSpinnerDescription, { $fontSize: fontSize, children: description }), onCancel && (_jsx(StyledCancelButton, { onClick: onCancel, children: cancelText }))] }) }));
|
|
167
169
|
};
|
|
168
170
|
class TMSpinner {
|
|
169
171
|
static show({ description, backgroundColor, fontSize, flat, onCancel, cancelText } = {
|
|
@@ -183,5 +185,5 @@ class TMSpinner {
|
|
|
183
185
|
container?.remove();
|
|
184
186
|
}
|
|
185
187
|
}
|
|
186
|
-
export { Spinner };
|
|
188
|
+
export { Spinner, SpinnerGraphic };
|
|
187
189
|
export default TMSpinner;
|
|
@@ -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;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TMContextMenuItemProps } from '../NewComponents/ContextMenu/types';
|
|
3
|
+
/** Stile della barra, sempre nei colori del modulo: 'module' con la striscia, 'card' senza fondo, 'moduleFilled' col tab pieno. */
|
|
4
|
+
export type TMTabControlVariant = 'card' | 'module' | 'moduleFilled';
|
|
5
|
+
/** Effetto del contenuto quando si cambia tab: 'fade' e il default, 'none' toglie l'animazione. */
|
|
6
|
+
export type TMTabControlAnimation = 'none' | 'fade' | 'slide' | 'zoom';
|
|
7
|
+
export interface TMTabPanelProps {
|
|
8
|
+
/** Identificativo univoco del tab. */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Titolo mostrato nella barra: stringa se vuoi poterlo rinominare. */
|
|
11
|
+
label: React.ReactNode;
|
|
12
|
+
/** Numero nel badge accanto al titolo: nascosto se 0 o undefined. */
|
|
13
|
+
badge?: number;
|
|
14
|
+
/** Colore del badge, default rosso. */
|
|
15
|
+
badgeColor?: string;
|
|
16
|
+
/** Tab non cliccabile. */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Se false il tab non viene renderizzato: comodo per tab condizionali. Default true. */
|
|
19
|
+
visible?: boolean;
|
|
20
|
+
/** Se false nasconde la 'x' e la voce Chiudi su questo tab. Default true. */
|
|
21
|
+
closable?: boolean;
|
|
22
|
+
/** Se false disabilita la rinomina su questo tab. Default true. */
|
|
23
|
+
renamable?: boolean;
|
|
24
|
+
/** Se false il tab non si trascina e non accetta il rilascio di altri: resta al suo posto. Default true. */
|
|
25
|
+
movable?: boolean;
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
/** Contenitore dichiarativo di un tab: figlio diretto di TMTabControl, non renderizza nulla di suo. */
|
|
29
|
+
export declare const TMTabPanel: React.FC<TMTabPanelProps>;
|
|
30
|
+
export interface TMTabControlProps {
|
|
31
|
+
/** Id del tab attivo in modalita controllata. */
|
|
32
|
+
selectedId?: string;
|
|
33
|
+
/** Tab iniziale in modalita non controllata. Default: primo tab visibile. */
|
|
34
|
+
defaultSelectedId?: string;
|
|
35
|
+
/** Notifica il cambio tab in entrambe le modalita. */
|
|
36
|
+
onSelectedIdChange?: (id: string) => void;
|
|
37
|
+
/** Se true con un solo tab la barra non viene mostrata: resta solo il contenuto. Default false. */
|
|
38
|
+
hideBarWhenSingle?: boolean;
|
|
39
|
+
/** Se valorizzata mostra la 'x' sui tab e notifica la richiesta di chiusura. */
|
|
40
|
+
onTabClose?: (id: string) => void;
|
|
41
|
+
/** Se true anche l'ultimo tab rimasto e chiudibile, lasciando il controllo senza tab. Default false. */
|
|
42
|
+
closableWhenSingle?: boolean;
|
|
43
|
+
/** Se valorizzata abilita la rinomina del titolo. */
|
|
44
|
+
onTabRename?: (id: string, label: string) => void;
|
|
45
|
+
/** Se valorizzata abilita lo spostamento con trascinamento: sposta draggedId nella posizione di targetId. */
|
|
46
|
+
onTabReorder?: (draggedId: string, targetId: string) => void;
|
|
47
|
+
/** Se valorizzata il menu contestuale del tab mostra anche la voce per aggiungere un tab. */
|
|
48
|
+
onTabAdd?: () => void;
|
|
49
|
+
/** Voci del chiamante nel menu contestuale del tab: precedono quelle del controllo, che non ripete una voce con lo stesso testo (es. Chiudi). */
|
|
50
|
+
tabMenuItems?: (id: string) => TMContextMenuItemProps[];
|
|
51
|
+
/** Testo della voce di menu per l'aggiunta. */
|
|
52
|
+
addCaption?: string;
|
|
53
|
+
/** Testo della voce di menu per la rinomina. */
|
|
54
|
+
renameCaption?: string;
|
|
55
|
+
/** Testo della voce di menu per la chiusura. */
|
|
56
|
+
closeCaption?: string;
|
|
57
|
+
/** Testo della voce di menu per la chiusura degli altri tab. */
|
|
58
|
+
closeOtherCaption?: string;
|
|
59
|
+
/** Stile della barra: 'module' (default) con la striscia, 'card' senza fondo o 'moduleFilled' col tab pieno. */
|
|
60
|
+
variant?: TMTabControlVariant;
|
|
61
|
+
/** Colore del titolo del tab attivo: scavalca quello della variante. */
|
|
62
|
+
textColor?: string;
|
|
63
|
+
/** Colore del titolo dei tab inattivi: scavalca quello della variante. */
|
|
64
|
+
idleTextColor?: string;
|
|
65
|
+
/** Effetto del contenuto al cambio tab: 'fade' (default), 'slide' nel verso dello spostamento, 'zoom' o 'none'. */
|
|
66
|
+
contentAnimation?: TMTabControlAnimation;
|
|
67
|
+
/** Durata dell'effetto in millisecondi. Default 280. */
|
|
68
|
+
animationDuration?: number;
|
|
69
|
+
/** Se true su touch si cambia tab trascinando il contenuto di lato. Default false. */
|
|
70
|
+
swipeEnabled?: boolean;
|
|
71
|
+
/** Stile del contenitore del contenuto, es. altezza e overflow. */
|
|
72
|
+
contentStyle?: React.CSSProperties;
|
|
73
|
+
/** Stile del contenitore esterno. */
|
|
74
|
+
style?: React.CSSProperties;
|
|
75
|
+
/** Contenuto del chiamante in coda alla barra, a destra dei tab: es. i pulsanti di azione della pagina.
|
|
76
|
+
Fa parte della barra, quindi con hideBarWhenSingle e un solo tab non viene mostrato. */
|
|
77
|
+
toolbar?: React.ReactNode;
|
|
78
|
+
children: React.ReactNode;
|
|
79
|
+
}
|
|
80
|
+
declare const TMTabControl: React.FC<TMTabControlProps>;
|
|
81
|
+
export default TMTabControl;
|
|
82
|
+
export interface TMTabDescriptor {
|
|
83
|
+
id: string;
|
|
84
|
+
label: string;
|
|
85
|
+
}
|
|
86
|
+
export interface TMTabsController {
|
|
87
|
+
items: TMTabDescriptor[];
|
|
88
|
+
activeId: string;
|
|
89
|
+
setActiveId: (id: string) => void;
|
|
90
|
+
/** Aggiunge un tab e lo attiva. Torna l'id creato. */
|
|
91
|
+
add: (label?: string) => string;
|
|
92
|
+
/** Chiude un tab: se era attivo passa al precedente. */
|
|
93
|
+
close: (id: string) => void;
|
|
94
|
+
rename: (id: string, label: string) => void;
|
|
95
|
+
/** Sposta il tab trascinato nella posizione di quello di arrivo. */
|
|
96
|
+
move: (draggedId: string, targetId: string) => void;
|
|
97
|
+
/** TMTabControl: funzionalità selezione, chiusura, rinomina, spostamento e aggiunta. */
|
|
98
|
+
controlProps: Pick<TMTabControlProps, 'selectedId' | 'onSelectedIdChange' | 'onTabClose' | 'onTabRename' | 'onTabReorder' | 'onTabAdd'>;
|
|
99
|
+
}
|
|
100
|
+
export interface TMTabsOptions {
|
|
101
|
+
/** Titolo del primo tab e base per quelli aggiunti ("Ricerca", poi "Ricerca 2", "Ricerca 3"...). */
|
|
102
|
+
label: string;
|
|
103
|
+
/** Titolo personalizzato per i tab aggiunti, in alternativa alla numerazione automatica. */
|
|
104
|
+
newLabel?: (index: number) => string;
|
|
105
|
+
}
|
|
106
|
+
export declare const useTMTabs: ({ label, newLabel }: TMTabsOptions) => TMTabsController;
|