@topconsultnpm/sdkui-react 6.22.0-dev4.5 → 6.22.0-dev4.7
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/base/TMCounterContainer.d.ts +3 -1
- package/lib/components/base/TMCounterContainer.js +16 -1
- package/lib/components/base/TMDataGrid.js +230 -222
- 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 +5 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.js +257 -185
- package/lib/components/choosers/TMDistinctValues.js +3 -3
- package/lib/components/features/documents/TMMergeToPdfForm.js +5 -4
- package/lib/components/features/search/TMSearchResult.js +7 -8
- package/lib/components/features/search/TMViewHistoryDcmt.js +1 -1
- package/lib/components/features/tasks/TMTasksView.js +15 -9
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +17 -13
- package/lib/components/grids/TMBlogsPost.js +1 -1
- package/lib/components/pages/TMPage.js +7 -4
- package/lib/helper/SDKUI_Globals.d.ts +3 -4
- package/lib/helper/SDKUI_Globals.js +3 -4
- package/lib/helper/SDKUI_Localizator.d.ts +10 -6
- package/lib/helper/SDKUI_Localizator.js +91 -51
- package/lib/hooks/useDcmtOperations.js +23 -14
- package/lib/hooks/useMultiMasterDetailDcmts.js +10 -6
- package/package.json +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
export declare const formatCount: (value: number | string | undefined) => string;
|
|
2
3
|
export declare enum CounterItemKey {
|
|
3
4
|
allItems = "allItems",
|
|
4
5
|
visibleItems = "visibleItems",
|
|
5
|
-
selectedItems = "selectedItems"
|
|
6
|
+
selectedItems = "selectedItems",
|
|
7
|
+
pageSize = "pageSize"
|
|
6
8
|
}
|
|
7
9
|
export interface ITMCounterItemData {
|
|
8
10
|
key?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import TMTooltip from './TMTooltip';
|
|
4
|
+
import { DeviceType, useDeviceType } from './TMDeviceProvider';
|
|
4
5
|
/* Styled container component that holds all counter items */
|
|
5
6
|
const Container = styled.div `
|
|
6
7
|
background: ${({ bgColor }) => bgColor || 'linear-gradient(to right, #f8f9fa, #e9ecef)'};
|
|
@@ -35,6 +36,14 @@ const Counter = styled.div `
|
|
|
35
36
|
transition: color 0.3s ease-in-out;
|
|
36
37
|
}
|
|
37
38
|
`;
|
|
39
|
+
/* Formatta un conteggio con il separatore delle migliaia della lingua del browser; i valori non numerici restano invariati.
|
|
40
|
+
useGrouping 'always' forza il separatore anche sotto le 10.000 unità, che in italiano e spagnolo di default non viene messo (2000 invece di 2.000).
|
|
41
|
+
Il cast serve perché la lib ES2021 tipizza useGrouping solo come boolean. */
|
|
42
|
+
export const formatCount = (value) => {
|
|
43
|
+
if (value === undefined || value === '' || isNaN(Number(value)))
|
|
44
|
+
return String(value ?? '');
|
|
45
|
+
return Number(value).toLocaleString(navigator.language, { useGrouping: 'always' });
|
|
46
|
+
};
|
|
38
47
|
/* Enum for possible counter item keys */
|
|
39
48
|
export var CounterItemKey;
|
|
40
49
|
(function (CounterItemKey) {
|
|
@@ -44,15 +53,21 @@ export var CounterItemKey;
|
|
|
44
53
|
CounterItemKey["visibleItems"] = "visibleItems";
|
|
45
54
|
/* Key for selected item count */
|
|
46
55
|
CounterItemKey["selectedItems"] = "selectedItems";
|
|
56
|
+
/* Key for rows per page count */
|
|
57
|
+
CounterItemKey["pageSize"] = "pageSize";
|
|
47
58
|
})(CounterItemKey || (CounterItemKey = {}));
|
|
48
59
|
;
|
|
49
60
|
;
|
|
50
61
|
const TMCounterContainer = (props) => {
|
|
51
62
|
const { items, bgColorContainer, hoverColorItem, bgColorItem, textColorItem } = props;
|
|
63
|
+
// Su mobile lo spazio è poco: le righe per pagina non vengono mostrate
|
|
64
|
+
const isMobile = useDeviceType() === DeviceType.MOBILE;
|
|
52
65
|
return (items && _jsx(Container, { bgColor: bgColorContainer, children: [...items.values()].map((item) => {
|
|
53
66
|
if (!item.show)
|
|
54
67
|
return null;
|
|
55
|
-
|
|
68
|
+
if (isMobile && item.key === CounterItemKey.pageSize)
|
|
69
|
+
return null;
|
|
70
|
+
return _jsx(TMTooltip, { content: item.caption ?? '', children: _jsxs(Counter, { bgColor: bgColorContainer, color: bgColorItem, hoverColor: hoverColorItem, textColor: textColorItem, children: [item.icon ?? null, _jsx("span", { children: formatCount(item.value) })] }) }, item.key ?? '');
|
|
56
71
|
}) }));
|
|
57
72
|
};
|
|
58
73
|
export default TMCounterContainer;
|
|
@@ -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.DocumentsPerPage, 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
|
|
@@ -435,229 +443,229 @@ export default TMDataGrid;
|
|
|
435
443
|
// (padding, altezza minima, font e dimensione dei pulsanti di pagina).
|
|
436
444
|
// Con compactPager = false non emette nessuna regola: width/height restano inline come in precedenza,
|
|
437
445
|
// così il rendering è identico a quello del div originale.
|
|
438
|
-
const StyledDataGridContainer = styled.div `
|
|
439
|
-
${({ $compactPager }) => $compactPager && css `
|
|
440
|
-
& .dx-datagrid-pager {
|
|
441
|
-
padding: 2px 4px !important;
|
|
442
|
-
min-height: 0 !important;
|
|
443
|
-
font-size: 11px;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
& .dx-datagrid-pager .dx-page,
|
|
447
|
-
& .dx-datagrid-pager .dx-page-size,
|
|
448
|
-
& .dx-datagrid-pager .dx-selection,
|
|
449
|
-
& .dx-datagrid-pager .dx-navigate-button {
|
|
450
|
-
min-width: 18px !important;
|
|
451
|
-
min-height: 18px !important;
|
|
452
|
-
height: auto !important;
|
|
453
|
-
padding: 1px 5px !important;
|
|
454
|
-
line-height: 16px !important;
|
|
455
|
-
font-size: 11px;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
& .dx-datagrid-pager .dx-pages,
|
|
459
|
-
& .dx-datagrid-pager .dx-page-sizes,
|
|
460
|
-
& .dx-datagrid-pager .dx-info,
|
|
461
|
-
& .dx-datagrid-pager .dx-page-index,
|
|
462
|
-
& .dx-datagrid-pager .dx-pages .dx-info {
|
|
463
|
-
font-size: 11px;
|
|
464
|
-
margin-top: 0 !important;
|
|
465
|
-
margin-bottom: 0 !important;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
& .dx-datagrid-pager .dx-info {
|
|
469
|
-
margin-left: 4px !important;
|
|
470
|
-
margin-right: 4px !important;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/* Editor del numero di pagina (displayMode compact) */
|
|
474
|
-
& .dx-datagrid-pager .dx-page-index .dx-texteditor-input,
|
|
475
|
-
& .dx-datagrid-pager .dx-page-sizes .dx-texteditor-input {
|
|
476
|
-
min-height: 18px !important;
|
|
477
|
-
height: 18px !important;
|
|
478
|
-
padding: 0 4px !important;
|
|
479
|
-
font-size: 11px;
|
|
480
|
-
}
|
|
481
|
-
`}
|
|
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
|
+
`}
|
|
482
490
|
`;
|
|
483
491
|
// Stile del pannello del filtro d'intestazione (ricerca, elenco valori, OK/Annulla).
|
|
484
492
|
// Il popup è in portale sul body, fuori da StyledDataGridContainer: le regole sono globali
|
|
485
493
|
// ma tutte sotto .dx-header-filter-menu, classe che DevExtreme applica solo a questo popup.
|
|
486
|
-
const HeaderFilterMenuGlobalStyle = createGlobalStyle `
|
|
487
|
-
.dx-header-filter-menu {
|
|
488
|
-
|
|
489
|
-
&.dx-popup-wrapper > .dx-overlay-content.dx-popup-normal {
|
|
490
|
-
border: 1px solid #E4E8EE;
|
|
491
|
-
border-radius: 8px;
|
|
492
|
-
box-shadow: 0 2px 6px rgba(18, 44, 76, .08), 0 12px 28px rgba(18, 44, 76, .14);
|
|
493
|
-
overflow: hidden;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
&.dx-popup-wrapper .dx-popup-content {
|
|
497
|
-
padding: 10px 10px 4px;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
/* Campo di ricerca: TextBox mode "search" resa da List o da TreeView (filtri gerarchici) */
|
|
501
|
-
.dx-searchbox.dx-list-search,
|
|
502
|
-
.dx-searchbox.dx-treeview-search {
|
|
503
|
-
margin-bottom: 8px;
|
|
504
|
-
border-radius: 6px;
|
|
505
|
-
border: 1px solid #CDD2D8;
|
|
506
|
-
background-color: #F4F6F9;
|
|
507
|
-
box-shadow: none;
|
|
508
|
-
transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
|
|
509
|
-
|
|
510
|
-
/* fluent disegna qui la barretta di focus, sostituita da bordo + alone */
|
|
511
|
-
&::before,
|
|
512
|
-
&::after {
|
|
513
|
-
display: none;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
&.dx-state-hover:not(.dx-state-focused) {
|
|
517
|
-
border-color: #AEB6C1;
|
|
518
|
-
background-color: #EEF2F7;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
&.dx-state-focused {
|
|
522
|
-
border-color: #2559A5;
|
|
523
|
-
background-color: #FFFFFF;
|
|
524
|
-
box-shadow: 0 0 0 2px rgba(37, 89, 165, .16);
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
.dx-icon-search {
|
|
528
|
-
width: 28px;
|
|
529
|
-
color: #8A929B;
|
|
530
|
-
transition: color .15s ease;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
&.dx-state-focused .dx-icon-search {
|
|
534
|
-
color: #2559A5;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.dx-texteditor-input {
|
|
538
|
-
min-height: 28px;
|
|
539
|
-
padding-inline-start: 28px;
|
|
540
|
-
padding-inline-end: 8px;
|
|
541
|
-
font-size: 12px;
|
|
542
|
-
background-color: transparent;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
.dx-placeholder {
|
|
546
|
-
color: #9AA3AD;
|
|
547
|
-
font-size: 12px;
|
|
548
|
-
|
|
549
|
-
&::before {
|
|
550
|
-
padding-inline-start: 28px;
|
|
551
|
-
padding-inline-end: 8px;
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
.dx-clear-button-area .dx-icon-clear {
|
|
556
|
-
color: #8A929B;
|
|
557
|
-
transition: color .15s ease;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
.dx-clear-button-area:hover .dx-icon-clear {
|
|
561
|
-
color: #2559A5;
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
.dx-list-item {
|
|
566
|
-
border-radius: 4px;
|
|
567
|
-
transition: background-color .12s ease;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
.dx-list-item-content {
|
|
571
|
-
padding: 4px 6px;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
.dx-list-item.dx-state-hover,
|
|
575
|
-
.dx-list-item.dx-state-focused {
|
|
576
|
-
background-color: #F1F6FD;
|
|
577
|
-
color: #122C4C;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
.dx-list-select-all {
|
|
581
|
-
padding: 2px 0 6px;
|
|
582
|
-
margin-bottom: 4px;
|
|
583
|
-
border-bottom: 1px solid #ECEFF3;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
.dx-list-select-all-label {
|
|
587
|
-
font-weight: 600;
|
|
588
|
-
color: #122C4C;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
.dx-checkbox-checked .dx-checkbox-icon,
|
|
592
|
-
.dx-checkbox-indeterminate .dx-checkbox-icon {
|
|
593
|
-
border-color: #2559A5;
|
|
594
|
-
background-color: #2559A5;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
.dx-checkbox.dx-state-hover:not(.dx-checkbox-checked) .dx-checkbox-icon {
|
|
598
|
-
border-color: #2559A5;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
/* il :not() lascia intatto il fade-out nativo della scrollbar */
|
|
602
|
-
.dx-scrollable-scroll:not(.dx-state-invisible) .dx-scrollable-scroll-content {
|
|
603
|
-
background-color: rgba(18, 44, 76, .28);
|
|
604
|
-
border-radius: 3px;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
&.dx-popup-wrapper .dx-popup-bottom.dx-toolbar {
|
|
608
|
-
padding: 8px 10px 10px;
|
|
609
|
-
border-top: 1px solid #ECEFF3;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
.dx-popup-bottom .dx-button {
|
|
613
|
-
border-radius: 5px;
|
|
614
|
-
min-width: 76px;
|
|
615
|
-
margin: 0;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
.dx-popup-bottom .dx-toolbar-button + .dx-toolbar-button {
|
|
619
|
-
margin-inline-start: 6px;
|
|
620
|
-
|
|
621
|
-
.dx-button {
|
|
622
|
-
margin: 0;
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
/* DevExtreme aggiunge prima OK e poi Annulla: individuarli per posizione li rende indipendenti dalla lingua */
|
|
627
|
-
.dx-popup-bottom .dx-toolbar-after > .dx-toolbar-button:first-child .dx-button {
|
|
628
|
-
border-color: transparent;
|
|
629
|
-
background-color: #2559A5;
|
|
630
|
-
|
|
631
|
-
.dx-button-text {
|
|
632
|
-
color: #FFFFFF;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
&.dx-state-hover {
|
|
636
|
-
background-color: #1E4A8C;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
&.dx-state-active {
|
|
640
|
-
background-color: #1A3F78;
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
.dx-popup-bottom .dx-toolbar-after > .dx-toolbar-button + .dx-toolbar-button .dx-button {
|
|
645
|
-
border-color: transparent;
|
|
646
|
-
background-color: transparent;
|
|
647
|
-
|
|
648
|
-
.dx-button-text {
|
|
649
|
-
color: #44506B;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
&.dx-state-hover {
|
|
653
|
-
background-color: #F0F3F7;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
&.dx-state-active {
|
|
657
|
-
background-color: #E6EBF2;
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
}
|
|
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
|
+
}
|
|
661
669
|
`;
|
|
662
670
|
const getRecordCount = (dataSource) => {
|
|
663
671
|
if (Array.isArray(dataSource)) {
|
|
@@ -21,6 +21,8 @@ export interface ITMWaitPanelOptions {
|
|
|
21
21
|
/** Didascalie fisse sopra le due barre, es. "Documenti" e "File corrente". Omesse: nessuna riga. */
|
|
22
22
|
primaryLabel?: string;
|
|
23
23
|
secondaryLabel?: string;
|
|
24
|
+
/** Quanti messaggi di warning / errore mostrare nel popover delle pill. Default: 5. */
|
|
25
|
+
maxVisibleMessages?: number;
|
|
24
26
|
/** Invocato quando l'utente interrompe */
|
|
25
27
|
onAbort?: () => void;
|
|
26
28
|
}
|
|
@@ -67,10 +69,10 @@ export interface ITMWaitPanelHandle {
|
|
|
67
69
|
setSubtitle(subtitle: string | undefined): void;
|
|
68
70
|
/** Incrementa il contatore verde (default +1). */
|
|
69
71
|
ok(delta?: number): void;
|
|
70
|
-
/** Incrementa il contatore giallo (default +1). */
|
|
71
|
-
warning(delta?: number): void;
|
|
72
|
-
/** Incrementa il contatore rosso (default +1). */
|
|
73
|
-
error(delta?: number): void;
|
|
72
|
+
/** Incrementa il contatore giallo (default +1). Il messaggio, se presente, finisce nel popover della pill. */
|
|
73
|
+
warning(delta?: number, message?: string): void;
|
|
74
|
+
/** Incrementa il contatore rosso (default +1). Il messaggio, se presente, finisce nel popover della pill. */
|
|
75
|
+
error(delta?: number, message?: string): void;
|
|
74
76
|
/** Aggiornamento cumulativo: i contatori qui sono valori assoluti, non incrementi. */
|
|
75
77
|
update(patch: ITMWaitPanelUpdate): void;
|
|
76
78
|
/** Aggiorna la barra secondaria. Senza `showSecondary` non ha effetto. */
|
|
@@ -104,6 +106,12 @@ declare class TMWaitPanelInstance implements ITMWaitPanelHandle {
|
|
|
104
106
|
private _secondaryValue;
|
|
105
107
|
private _secondaryMax;
|
|
106
108
|
private _secondaryText;
|
|
109
|
+
private readonly maxVisibleMessages;
|
|
110
|
+
private readonly _warningMessages;
|
|
111
|
+
private readonly _errorMessages;
|
|
112
|
+
private warningMessageTotal;
|
|
113
|
+
private errorMessageTotal;
|
|
114
|
+
private messagesDirty;
|
|
107
115
|
private lastPercentText;
|
|
108
116
|
private lastSubtitleText;
|
|
109
117
|
private lastElapsedText;
|
|
@@ -129,8 +137,8 @@ declare class TMWaitPanelInstance implements ITMWaitPanelHandle {
|
|
|
129
137
|
setTitle: (title: string) => void;
|
|
130
138
|
setSubtitle: (subtitle: string | undefined) => void;
|
|
131
139
|
ok: (delta?: number) => void;
|
|
132
|
-
warning: (delta?: number) => void;
|
|
133
|
-
error: (delta?: number) => void;
|
|
140
|
+
warning: (delta?: number, message?: string) => void;
|
|
141
|
+
error: (delta?: number, message?: string) => void;
|
|
134
142
|
setSecondary: (patch: ITMWaitPanelSecondaryUpdate) => void;
|
|
135
143
|
update: (patch: ITMWaitPanelUpdate) => void;
|
|
136
144
|
close: () => void;
|
|
@@ -148,6 +156,8 @@ declare class TMWaitPanelInstance implements ITMWaitPanelHandle {
|
|
|
148
156
|
private schedule;
|
|
149
157
|
/** Riversa sul DOM lo stato corrente (barra, percentuale, testi, contatori), saltando cio' che non e' cambiato. */
|
|
150
158
|
private flush;
|
|
159
|
+
/** Riscrive la lista di un popover con gli ultimi messaggi e la riga "... e altri N". Il popover si apre solo se non e' vuoto. */
|
|
160
|
+
private flushMessages;
|
|
151
161
|
/** Riversa sul DOM la seconda barra. Invocata solo quando la view l'ha renderizzata. */
|
|
152
162
|
private flushSecondary;
|
|
153
163
|
/** Aggiorna la riga dei tempi: trascorso al netto delle pause e stima del rimanente. */
|