@topconsultnpm/sdkui-react 6.22.0-dev4.4 → 6.22.0-dev4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/NewComponents/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/TMCounterBar.d.ts +2 -2
- package/lib/components/base/TMCounterContainer.d.ts +5 -2
- package/lib/components/base/TMCounterContainer.js +16 -1
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMDataGrid.js +243 -223
- 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/TMSpinner.d.ts +3 -2
- package/lib/components/base/TMTab.d.ts +4 -3
- package/lib/components/base/TMTabControl.js +208 -208
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTreeView.d.ts +14 -8
- 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/waitPanel/TMWaitPanelManager.d.ts +16 -6
- package/lib/components/base/waitPanel/TMWaitPanelManager.js +55 -2
- package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +7 -1
- package/lib/components/base/waitPanel/TMWaitPanelView.js +257 -185
- package/lib/components/choosers/TMDistinctValues.js +3 -3
- 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/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/TMTreeDropDown.d.ts +1 -1
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -1
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtIcon.d.ts +2 -1
- package/lib/components/features/documents/TMDcmtPreview.d.ts +8 -6
- 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 +21 -21
- package/lib/components/features/documents/TMMasterInfoFields.d.ts +2 -1
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +2 -1
- package/lib/components/features/documents/TMMergeToPdfForm.js +5 -4
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +2 -1
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +4 -4
- 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 +2 -1
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +9 -3
- package/lib/components/features/search/TMSearchResult.js +7 -8
- 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/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 +15 -9
- package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +3 -2
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +17 -13
- 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/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 +1 -1
- package/lib/components/grids/TMBlogsPostUtils.d.ts +9 -9
- package/lib/components/grids/TMValidationItemsList.d.ts +2 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +2 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +12 -12
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelManagerLoader.d.ts +2 -1
- 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 +7 -4
- package/lib/components/query/TMQueryEditor.d.ts +14 -10
- 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 +3 -3
- package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -2
- package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +3 -2
- package/lib/components/viewers/TMMidViewer.d.ts +2 -2
- package/lib/components/viewers/TMTidViewer.d.ts +2 -2
- package/lib/helper/SDKUI_Globals.d.ts +3 -4
- package/lib/helper/SDKUI_Globals.js +3 -4
- package/lib/helper/SDKUI_Localizator.d.ts +8 -4
- package/lib/helper/SDKUI_Localizator.js +77 -37
- 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/helpers.d.ts +1 -1
- package/lib/hooks/useDcmtOperations.js +23 -14
- package/lib/hooks/useInputDialog.d.ts +2 -1
- package/lib/hooks/useMultiMasterDetailDcmts.js +10 -6
- package/lib/services/platform_services.d.ts +3 -2
- package/package.json +1 -1
|
@@ -3,8 +3,8 @@ import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, us
|
|
|
3
3
|
import styled, { createGlobalStyle, css } from 'styled-components';
|
|
4
4
|
import DataGrid, { Column, HeaderFilter, Selection, Scrolling, LoadPanel, SearchPanel, Pager, Sorting, Paging, FilterPanel, ColumnChooser, Grouping, GroupPanel, Summary, Editing, FilterRow, StateStoring, RowDragging, MasterDetail, Position, ColumnChooserSearch, ColumnChooserSelection } from 'devextreme-react/data-grid';
|
|
5
5
|
import DataSource from 'devextreme/data/data_source';
|
|
6
|
-
import { IconAll, IconSelected, IconVisible, SDKUI_Globals, SDKUI_Localizator } from '../../helper';
|
|
7
|
-
import TMCounterContainer, { CounterItemKey } from './TMCounterContainer';
|
|
6
|
+
import { IconAll, IconFormatPageSplit, IconSelected, IconVisible, SDKUI_Globals, SDKUI_Localizator } from '../../helper';
|
|
7
|
+
import TMCounterContainer, { CounterItemKey, formatCount } from './TMCounterContainer';
|
|
8
8
|
import TMContextMenu from '../NewComponents/ContextMenu/TMContextMenu';
|
|
9
9
|
import { useLongPress } from '../NewComponents/ContextMenu/useLongPress';
|
|
10
10
|
;
|
|
@@ -132,6 +132,9 @@ const TMDataGrid = React.forwardRef((props, ref) => {
|
|
|
132
132
|
setCustomContextMenuOnEmptyArea(false);
|
|
133
133
|
},
|
|
134
134
|
});
|
|
135
|
+
// Valori primitivi: paging di default viene ricreato a ogni render e non può stare tra le dipendenze dell'effetto
|
|
136
|
+
const pagingEnabled = !!paging && paging.enabled !== false;
|
|
137
|
+
const rowsPerPage = paging?.pageSize ?? pageSize;
|
|
135
138
|
// Creating a ref to store the timestamp of the last selection change
|
|
136
139
|
const lastSelectionChangeTime = useRef(Date.now());
|
|
137
140
|
useEffect(() => {
|
|
@@ -148,6 +151,11 @@ const TMDataGrid = React.forwardRef((props, ref) => {
|
|
|
148
151
|
[
|
|
149
152
|
CounterItemKey.selectedItems,
|
|
150
153
|
{ key: CounterItemKey.selectedItems, show: true, caption: SDKUI_Localizator.SelectedItems, value: selectedRowKeys.length, icon: _jsx(IconSelected, {}), order: 1 }
|
|
154
|
+
],
|
|
155
|
+
[
|
|
156
|
+
// Righe per pagina: visibile solo quando c'è il paginatore, cioè gli elementi non stanno in una pagina
|
|
157
|
+
CounterItemKey.pageSize,
|
|
158
|
+
{ key: CounterItemKey.pageSize, show: pagingEnabled && totalRecordCount > rowsPerPage, caption: SDKUI_Localizator.ResultsPerPage, value: `${formatCount(rowsPerPage)} ${SDKUI_Localizator.PerPage}`, icon: _jsx(IconFormatPageSplit, {}), order: 2 }
|
|
151
159
|
]
|
|
152
160
|
]);
|
|
153
161
|
const mergedCounterItems = new Map(defaultCounterItems);
|
|
@@ -164,7 +172,7 @@ const TMDataGrid = React.forwardRef((props, ref) => {
|
|
|
164
172
|
}));
|
|
165
173
|
setCounterValues(sortedCounterItems);
|
|
166
174
|
}
|
|
167
|
-
}, [counterConfig, visibleItemsCount, selectedRowKeys]);
|
|
175
|
+
}, [counterConfig, visibleItemsCount, selectedRowKeys, pagingEnabled, rowsPerPage, totalRecordCount]);
|
|
168
176
|
// Handle selection changes and invoke callback if provided
|
|
169
177
|
const onSelectionChangedCallback = useCallback((e) => {
|
|
170
178
|
lastSelectionChangeTime.current = Date.now(); // Store current time of selection change
|
|
@@ -331,7 +339,8 @@ const TMDataGrid = React.forwardRef((props, ref) => {
|
|
|
331
339
|
if (!internalRef.current)
|
|
332
340
|
return;
|
|
333
341
|
// Update state with the current number of visible rows in the DataGrid
|
|
334
|
-
|
|
342
|
+
const grid = internalRef.current.instance();
|
|
343
|
+
setVisibleItemsCount(grid ? getVisibleItemsCount(grid) : 0);
|
|
335
344
|
// Focusing SearchPanel on content ready - solo se non è già stato fatto
|
|
336
345
|
if (showSearchPanel && searchPanelFocusTrigger && searchPanelFocusTrigger > 0 && !searchPanelFocusedRef.current) {
|
|
337
346
|
// Use a small delay to ensure the DOM is fully rendered before trying to focus
|
|
@@ -434,229 +443,229 @@ export default TMDataGrid;
|
|
|
434
443
|
// (padding, altezza minima, font e dimensione dei pulsanti di pagina).
|
|
435
444
|
// Con compactPager = false non emette nessuna regola: width/height restano inline come in precedenza,
|
|
436
445
|
// così il rendering è identico a quello del div originale.
|
|
437
|
-
const StyledDataGridContainer = styled.div `
|
|
438
|
-
${({ $compactPager }) => $compactPager && css `
|
|
439
|
-
& .dx-datagrid-pager {
|
|
440
|
-
padding: 2px 4px !important;
|
|
441
|
-
min-height: 0 !important;
|
|
442
|
-
font-size: 11px;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
& .dx-datagrid-pager .dx-page,
|
|
446
|
-
& .dx-datagrid-pager .dx-page-size,
|
|
447
|
-
& .dx-datagrid-pager .dx-selection,
|
|
448
|
-
& .dx-datagrid-pager .dx-navigate-button {
|
|
449
|
-
min-width: 18px !important;
|
|
450
|
-
min-height: 18px !important;
|
|
451
|
-
height: auto !important;
|
|
452
|
-
padding: 1px 5px !important;
|
|
453
|
-
line-height: 16px !important;
|
|
454
|
-
font-size: 11px;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
& .dx-datagrid-pager .dx-pages,
|
|
458
|
-
& .dx-datagrid-pager .dx-page-sizes,
|
|
459
|
-
& .dx-datagrid-pager .dx-info,
|
|
460
|
-
& .dx-datagrid-pager .dx-page-index,
|
|
461
|
-
& .dx-datagrid-pager .dx-pages .dx-info {
|
|
462
|
-
font-size: 11px;
|
|
463
|
-
margin-top: 0 !important;
|
|
464
|
-
margin-bottom: 0 !important;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
& .dx-datagrid-pager .dx-info {
|
|
468
|
-
margin-left: 4px !important;
|
|
469
|
-
margin-right: 4px !important;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
/* Editor del numero di pagina (displayMode compact) */
|
|
473
|
-
& .dx-datagrid-pager .dx-page-index .dx-texteditor-input,
|
|
474
|
-
& .dx-datagrid-pager .dx-page-sizes .dx-texteditor-input {
|
|
475
|
-
min-height: 18px !important;
|
|
476
|
-
height: 18px !important;
|
|
477
|
-
padding: 0 4px !important;
|
|
478
|
-
font-size: 11px;
|
|
479
|
-
}
|
|
480
|
-
`}
|
|
446
|
+
const StyledDataGridContainer = styled.div `
|
|
447
|
+
${({ $compactPager }) => $compactPager && css `
|
|
448
|
+
& .dx-datagrid-pager {
|
|
449
|
+
padding: 2px 4px !important;
|
|
450
|
+
min-height: 0 !important;
|
|
451
|
+
font-size: 11px;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
& .dx-datagrid-pager .dx-page,
|
|
455
|
+
& .dx-datagrid-pager .dx-page-size,
|
|
456
|
+
& .dx-datagrid-pager .dx-selection,
|
|
457
|
+
& .dx-datagrid-pager .dx-navigate-button {
|
|
458
|
+
min-width: 18px !important;
|
|
459
|
+
min-height: 18px !important;
|
|
460
|
+
height: auto !important;
|
|
461
|
+
padding: 1px 5px !important;
|
|
462
|
+
line-height: 16px !important;
|
|
463
|
+
font-size: 11px;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
& .dx-datagrid-pager .dx-pages,
|
|
467
|
+
& .dx-datagrid-pager .dx-page-sizes,
|
|
468
|
+
& .dx-datagrid-pager .dx-info,
|
|
469
|
+
& .dx-datagrid-pager .dx-page-index,
|
|
470
|
+
& .dx-datagrid-pager .dx-pages .dx-info {
|
|
471
|
+
font-size: 11px;
|
|
472
|
+
margin-top: 0 !important;
|
|
473
|
+
margin-bottom: 0 !important;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
& .dx-datagrid-pager .dx-info {
|
|
477
|
+
margin-left: 4px !important;
|
|
478
|
+
margin-right: 4px !important;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/* Editor del numero di pagina (displayMode compact) */
|
|
482
|
+
& .dx-datagrid-pager .dx-page-index .dx-texteditor-input,
|
|
483
|
+
& .dx-datagrid-pager .dx-page-sizes .dx-texteditor-input {
|
|
484
|
+
min-height: 18px !important;
|
|
485
|
+
height: 18px !important;
|
|
486
|
+
padding: 0 4px !important;
|
|
487
|
+
font-size: 11px;
|
|
488
|
+
}
|
|
489
|
+
`}
|
|
481
490
|
`;
|
|
482
491
|
// Stile del pannello del filtro d'intestazione (ricerca, elenco valori, OK/Annulla).
|
|
483
492
|
// Il popup è in portale sul body, fuori da StyledDataGridContainer: le regole sono globali
|
|
484
493
|
// ma tutte sotto .dx-header-filter-menu, classe che DevExtreme applica solo a questo popup.
|
|
485
|
-
const HeaderFilterMenuGlobalStyle = createGlobalStyle `
|
|
486
|
-
.dx-header-filter-menu {
|
|
487
|
-
|
|
488
|
-
&.dx-popup-wrapper > .dx-overlay-content.dx-popup-normal {
|
|
489
|
-
border: 1px solid #E4E8EE;
|
|
490
|
-
border-radius: 8px;
|
|
491
|
-
box-shadow: 0 2px 6px rgba(18, 44, 76, .08), 0 12px 28px rgba(18, 44, 76, .14);
|
|
492
|
-
overflow: hidden;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
&.dx-popup-wrapper .dx-popup-content {
|
|
496
|
-
padding: 10px 10px 4px;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
/* Campo di ricerca: TextBox mode "search" resa da List o da TreeView (filtri gerarchici) */
|
|
500
|
-
.dx-searchbox.dx-list-search,
|
|
501
|
-
.dx-searchbox.dx-treeview-search {
|
|
502
|
-
margin-bottom: 8px;
|
|
503
|
-
border-radius: 6px;
|
|
504
|
-
border: 1px solid #CDD2D8;
|
|
505
|
-
background-color: #F4F6F9;
|
|
506
|
-
box-shadow: none;
|
|
507
|
-
transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
|
|
508
|
-
|
|
509
|
-
/* fluent disegna qui la barretta di focus, sostituita da bordo + alone */
|
|
510
|
-
&::before,
|
|
511
|
-
&::after {
|
|
512
|
-
display: none;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
&.dx-state-hover:not(.dx-state-focused) {
|
|
516
|
-
border-color: #AEB6C1;
|
|
517
|
-
background-color: #EEF2F7;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
&.dx-state-focused {
|
|
521
|
-
border-color: #2559A5;
|
|
522
|
-
background-color: #FFFFFF;
|
|
523
|
-
box-shadow: 0 0 0 2px rgba(37, 89, 165, .16);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
.dx-icon-search {
|
|
527
|
-
width: 28px;
|
|
528
|
-
color: #8A929B;
|
|
529
|
-
transition: color .15s ease;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
&.dx-state-focused .dx-icon-search {
|
|
533
|
-
color: #2559A5;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
.dx-texteditor-input {
|
|
537
|
-
min-height: 28px;
|
|
538
|
-
padding-inline-start: 28px;
|
|
539
|
-
padding-inline-end: 8px;
|
|
540
|
-
font-size: 12px;
|
|
541
|
-
background-color: transparent;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
.dx-placeholder {
|
|
545
|
-
color: #9AA3AD;
|
|
546
|
-
font-size: 12px;
|
|
547
|
-
|
|
548
|
-
&::before {
|
|
549
|
-
padding-inline-start: 28px;
|
|
550
|
-
padding-inline-end: 8px;
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
.dx-clear-button-area .dx-icon-clear {
|
|
555
|
-
color: #8A929B;
|
|
556
|
-
transition: color .15s ease;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
.dx-clear-button-area:hover .dx-icon-clear {
|
|
560
|
-
color: #2559A5;
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
.dx-list-item {
|
|
565
|
-
border-radius: 4px;
|
|
566
|
-
transition: background-color .12s ease;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
.dx-list-item-content {
|
|
570
|
-
padding: 4px 6px;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
.dx-list-item.dx-state-hover,
|
|
574
|
-
.dx-list-item.dx-state-focused {
|
|
575
|
-
background-color: #F1F6FD;
|
|
576
|
-
color: #122C4C;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
.dx-list-select-all {
|
|
580
|
-
padding: 2px 0 6px;
|
|
581
|
-
margin-bottom: 4px;
|
|
582
|
-
border-bottom: 1px solid #ECEFF3;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
.dx-list-select-all-label {
|
|
586
|
-
font-weight: 600;
|
|
587
|
-
color: #122C4C;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
.dx-checkbox-checked .dx-checkbox-icon,
|
|
591
|
-
.dx-checkbox-indeterminate .dx-checkbox-icon {
|
|
592
|
-
border-color: #2559A5;
|
|
593
|
-
background-color: #2559A5;
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
.dx-checkbox.dx-state-hover:not(.dx-checkbox-checked) .dx-checkbox-icon {
|
|
597
|
-
border-color: #2559A5;
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
/* il :not() lascia intatto il fade-out nativo della scrollbar */
|
|
601
|
-
.dx-scrollable-scroll:not(.dx-state-invisible) .dx-scrollable-scroll-content {
|
|
602
|
-
background-color: rgba(18, 44, 76, .28);
|
|
603
|
-
border-radius: 3px;
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
&.dx-popup-wrapper .dx-popup-bottom.dx-toolbar {
|
|
607
|
-
padding: 8px 10px 10px;
|
|
608
|
-
border-top: 1px solid #ECEFF3;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
.dx-popup-bottom .dx-button {
|
|
612
|
-
border-radius: 5px;
|
|
613
|
-
min-width: 76px;
|
|
614
|
-
margin: 0;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
.dx-popup-bottom .dx-toolbar-button + .dx-toolbar-button {
|
|
618
|
-
margin-inline-start: 6px;
|
|
619
|
-
|
|
620
|
-
.dx-button {
|
|
621
|
-
margin: 0;
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
/* DevExtreme aggiunge prima OK e poi Annulla: individuarli per posizione li rende indipendenti dalla lingua */
|
|
626
|
-
.dx-popup-bottom .dx-toolbar-after > .dx-toolbar-button:first-child .dx-button {
|
|
627
|
-
border-color: transparent;
|
|
628
|
-
background-color: #2559A5;
|
|
629
|
-
|
|
630
|
-
.dx-button-text {
|
|
631
|
-
color: #FFFFFF;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
&.dx-state-hover {
|
|
635
|
-
background-color: #1E4A8C;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
&.dx-state-active {
|
|
639
|
-
background-color: #1A3F78;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
.dx-popup-bottom .dx-toolbar-after > .dx-toolbar-button + .dx-toolbar-button .dx-button {
|
|
644
|
-
border-color: transparent;
|
|
645
|
-
background-color: transparent;
|
|
646
|
-
|
|
647
|
-
.dx-button-text {
|
|
648
|
-
color: #44506B;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
&.dx-state-hover {
|
|
652
|
-
background-color: #F0F3F7;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
&.dx-state-active {
|
|
656
|
-
background-color: #E6EBF2;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
}
|
|
494
|
+
const HeaderFilterMenuGlobalStyle = createGlobalStyle `
|
|
495
|
+
.dx-header-filter-menu {
|
|
496
|
+
|
|
497
|
+
&.dx-popup-wrapper > .dx-overlay-content.dx-popup-normal {
|
|
498
|
+
border: 1px solid #E4E8EE;
|
|
499
|
+
border-radius: 8px;
|
|
500
|
+
box-shadow: 0 2px 6px rgba(18, 44, 76, .08), 0 12px 28px rgba(18, 44, 76, .14);
|
|
501
|
+
overflow: hidden;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
&.dx-popup-wrapper .dx-popup-content {
|
|
505
|
+
padding: 10px 10px 4px;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/* Campo di ricerca: TextBox mode "search" resa da List o da TreeView (filtri gerarchici) */
|
|
509
|
+
.dx-searchbox.dx-list-search,
|
|
510
|
+
.dx-searchbox.dx-treeview-search {
|
|
511
|
+
margin-bottom: 8px;
|
|
512
|
+
border-radius: 6px;
|
|
513
|
+
border: 1px solid #CDD2D8;
|
|
514
|
+
background-color: #F4F6F9;
|
|
515
|
+
box-shadow: none;
|
|
516
|
+
transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
|
|
517
|
+
|
|
518
|
+
/* fluent disegna qui la barretta di focus, sostituita da bordo + alone */
|
|
519
|
+
&::before,
|
|
520
|
+
&::after {
|
|
521
|
+
display: none;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
&.dx-state-hover:not(.dx-state-focused) {
|
|
525
|
+
border-color: #AEB6C1;
|
|
526
|
+
background-color: #EEF2F7;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
&.dx-state-focused {
|
|
530
|
+
border-color: #2559A5;
|
|
531
|
+
background-color: #FFFFFF;
|
|
532
|
+
box-shadow: 0 0 0 2px rgba(37, 89, 165, .16);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.dx-icon-search {
|
|
536
|
+
width: 28px;
|
|
537
|
+
color: #8A929B;
|
|
538
|
+
transition: color .15s ease;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
&.dx-state-focused .dx-icon-search {
|
|
542
|
+
color: #2559A5;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.dx-texteditor-input {
|
|
546
|
+
min-height: 28px;
|
|
547
|
+
padding-inline-start: 28px;
|
|
548
|
+
padding-inline-end: 8px;
|
|
549
|
+
font-size: 12px;
|
|
550
|
+
background-color: transparent;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.dx-placeholder {
|
|
554
|
+
color: #9AA3AD;
|
|
555
|
+
font-size: 12px;
|
|
556
|
+
|
|
557
|
+
&::before {
|
|
558
|
+
padding-inline-start: 28px;
|
|
559
|
+
padding-inline-end: 8px;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.dx-clear-button-area .dx-icon-clear {
|
|
564
|
+
color: #8A929B;
|
|
565
|
+
transition: color .15s ease;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.dx-clear-button-area:hover .dx-icon-clear {
|
|
569
|
+
color: #2559A5;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.dx-list-item {
|
|
574
|
+
border-radius: 4px;
|
|
575
|
+
transition: background-color .12s ease;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.dx-list-item-content {
|
|
579
|
+
padding: 4px 6px;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.dx-list-item.dx-state-hover,
|
|
583
|
+
.dx-list-item.dx-state-focused {
|
|
584
|
+
background-color: #F1F6FD;
|
|
585
|
+
color: #122C4C;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.dx-list-select-all {
|
|
589
|
+
padding: 2px 0 6px;
|
|
590
|
+
margin-bottom: 4px;
|
|
591
|
+
border-bottom: 1px solid #ECEFF3;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.dx-list-select-all-label {
|
|
595
|
+
font-weight: 600;
|
|
596
|
+
color: #122C4C;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.dx-checkbox-checked .dx-checkbox-icon,
|
|
600
|
+
.dx-checkbox-indeterminate .dx-checkbox-icon {
|
|
601
|
+
border-color: #2559A5;
|
|
602
|
+
background-color: #2559A5;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.dx-checkbox.dx-state-hover:not(.dx-checkbox-checked) .dx-checkbox-icon {
|
|
606
|
+
border-color: #2559A5;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/* il :not() lascia intatto il fade-out nativo della scrollbar */
|
|
610
|
+
.dx-scrollable-scroll:not(.dx-state-invisible) .dx-scrollable-scroll-content {
|
|
611
|
+
background-color: rgba(18, 44, 76, .28);
|
|
612
|
+
border-radius: 3px;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
&.dx-popup-wrapper .dx-popup-bottom.dx-toolbar {
|
|
616
|
+
padding: 8px 10px 10px;
|
|
617
|
+
border-top: 1px solid #ECEFF3;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.dx-popup-bottom .dx-button {
|
|
621
|
+
border-radius: 5px;
|
|
622
|
+
min-width: 76px;
|
|
623
|
+
margin: 0;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.dx-popup-bottom .dx-toolbar-button + .dx-toolbar-button {
|
|
627
|
+
margin-inline-start: 6px;
|
|
628
|
+
|
|
629
|
+
.dx-button {
|
|
630
|
+
margin: 0;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/* DevExtreme aggiunge prima OK e poi Annulla: individuarli per posizione li rende indipendenti dalla lingua */
|
|
635
|
+
.dx-popup-bottom .dx-toolbar-after > .dx-toolbar-button:first-child .dx-button {
|
|
636
|
+
border-color: transparent;
|
|
637
|
+
background-color: #2559A5;
|
|
638
|
+
|
|
639
|
+
.dx-button-text {
|
|
640
|
+
color: #FFFFFF;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
&.dx-state-hover {
|
|
644
|
+
background-color: #1E4A8C;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
&.dx-state-active {
|
|
648
|
+
background-color: #1A3F78;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.dx-popup-bottom .dx-toolbar-after > .dx-toolbar-button + .dx-toolbar-button .dx-button {
|
|
653
|
+
border-color: transparent;
|
|
654
|
+
background-color: transparent;
|
|
655
|
+
|
|
656
|
+
.dx-button-text {
|
|
657
|
+
color: #44506B;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
&.dx-state-hover {
|
|
661
|
+
background-color: #F0F3F7;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
&.dx-state-active {
|
|
665
|
+
background-color: #E6EBF2;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}
|
|
660
669
|
`;
|
|
661
670
|
const getRecordCount = (dataSource) => {
|
|
662
671
|
if (Array.isArray(dataSource)) {
|
|
@@ -667,3 +676,14 @@ const getRecordCount = (dataSource) => {
|
|
|
667
676
|
}
|
|
668
677
|
return 0; // Default case when neither condition is met
|
|
669
678
|
};
|
|
679
|
+
/* Righe della pagina corrente: una per gruppo più le sue righe dati, che non contano se il gruppo è chiuso.
|
|
680
|
+
Stesso criterio di DevExtreme: un gruppo ha la proprietà items, valorizzata a null quando è chiuso. */
|
|
681
|
+
const countPageRows = (items) => items.reduce((count, item) => count + (item.items === undefined ? 1 : 1 + countPageRows(item.items ?? [])), 0);
|
|
682
|
+
/* Con il rendering virtuale getVisibleRows restituisce solo le righe disegnate a video, non tutte quelle della pagina:
|
|
683
|
+
in quel caso le righe si contano dagli elementi caricati per la pagina corrente. */
|
|
684
|
+
const getVisibleItemsCount = (grid) => {
|
|
685
|
+
if (grid.option('scrolling.rowRenderingMode') === 'virtual') {
|
|
686
|
+
return countPageRows(grid.getDataSource()?.items() ?? []);
|
|
687
|
+
}
|
|
688
|
+
return grid.getVisibleRows()?.length ?? 0;
|
|
689
|
+
};
|
|
@@ -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>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface ITMSpinner {
|
|
2
3
|
backgroundColor?: string;
|
|
3
4
|
fontSize?: string;
|
|
@@ -7,8 +8,8 @@ interface ITMSpinner {
|
|
|
7
8
|
onCancel?: () => void;
|
|
8
9
|
cancelText?: string;
|
|
9
10
|
}
|
|
10
|
-
declare const SpinnerGraphic: () =>
|
|
11
|
-
declare const Spinner: ({ backgroundColor, description, fontSize, width, flat, onCancel, cancelText }: ITMSpinner) =>
|
|
11
|
+
declare const SpinnerGraphic: () => React.JSX.Element;
|
|
12
|
+
declare const Spinner: ({ backgroundColor, description, fontSize, width, flat, onCancel, cancelText }: ITMSpinner) => React.JSX.Element;
|
|
12
13
|
declare class TMSpinner {
|
|
13
14
|
static show({ description, backgroundColor, fontSize, flat, onCancel, cancelText }?: ITMSpinner): void;
|
|
14
15
|
static hide(): void;
|