@bit.rhplus/ag-grid 0.0.34 → 0.0.36
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/AggregationNotification.js +113 -105
- package/Aggregations.js +320 -184
- package/Functions/index.js +11 -3
- package/NotificationOptions.jsx +355 -53
- package/dist/AggregationNotification.js +119 -105
- package/dist/AggregationNotification.js.map +1 -1
- package/dist/Aggregations.d.ts +1 -25
- package/dist/Aggregations.js +142 -20
- package/dist/Aggregations.js.map +1 -1
- package/dist/Functions/index.js +11 -3
- package/dist/Functions/index.js.map +1 -1
- package/dist/NotificationOptions.d.ts +1 -0
- package/dist/NotificationOptions.js +50 -9
- package/dist/NotificationOptions.js.map +1 -1
- package/dist/index.js +41 -21
- package/dist/index.js.map +1 -1
- package/dist/util.js +16 -5
- package/dist/util.js.map +1 -1
- package/index.jsx +50 -22
- package/package.json +4 -2
- package/util.js +16 -6
- /package/dist/{preview-1758725544565.js → preview-1759925900657.js} +0 -0
|
@@ -1,111 +1,119 @@
|
|
|
1
|
-
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// DEPRECATED: This component is not used anywhere in the codebase
|
|
3
|
+
// Kept for reference only - uses @material-ui which is being phased out
|
|
4
|
+
/*
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import classnames from 'classnames';
|
|
8
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
9
|
+
import { useSnackbar } from 'notistack';
|
|
10
|
+
import Collapse from '@material-ui/core/Collapse';
|
|
11
|
+
import Paper from '@material-ui/core/Paper';
|
|
12
|
+
import Typography from '@material-ui/core/Typography';
|
|
13
|
+
import Card from '@material-ui/core/Card';
|
|
14
|
+
import CardActions from '@material-ui/core/CardActions';
|
|
15
|
+
import Button from '@material-ui/core/Button';
|
|
16
|
+
import IconButton from '@material-ui/core/IconButton';
|
|
17
|
+
import CloseIcon from '@material-ui/icons/Close';
|
|
18
|
+
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
|
|
19
|
+
import CheckCircleIcon from '@material-ui/icons/CheckCircle';
|
|
20
|
+
import moment from 'moment';
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
22
|
+
const useStyles = makeStyles(theme => ({
|
|
23
|
+
card: {
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'column',
|
|
26
|
+
flexWrap: 'wrap',
|
|
27
|
+
flexGrow: 1,
|
|
28
|
+
backgroundColor: '#fddc6c',
|
|
29
|
+
[theme.breakpoints.up('sm')]: {
|
|
30
|
+
flexGrow: 'initial',
|
|
31
|
+
minWidth: 344,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
// typography: {
|
|
35
|
+
// fontWeight: 'bold',
|
|
36
|
+
// },
|
|
37
|
+
actionRoot: {
|
|
38
|
+
padding: '8px 8px 8px 16px',
|
|
39
|
+
},
|
|
40
|
+
icons: {
|
|
41
|
+
marginLeft: 'auto',
|
|
42
|
+
},
|
|
43
|
+
expand: {
|
|
44
|
+
padding: '8px 8px',
|
|
45
|
+
transform: 'rotate(0deg)',
|
|
46
|
+
transition: theme.transitions.create('transform', {
|
|
47
|
+
duration: theme.transitions.duration.shortest,
|
|
48
|
+
}),
|
|
49
|
+
},
|
|
50
|
+
expandOpen: {
|
|
51
|
+
transform: 'rotate(180deg)',
|
|
52
|
+
},
|
|
53
|
+
collapse: {
|
|
54
|
+
padding: 16,
|
|
55
|
+
},
|
|
56
|
+
checkIcon: {
|
|
57
|
+
fontSize: 20,
|
|
58
|
+
color: '#b3b3b3',
|
|
59
|
+
paddingRight: 4,
|
|
60
|
+
},
|
|
61
|
+
button: {
|
|
62
|
+
padding: 0,
|
|
63
|
+
textTransform: 'none',
|
|
64
|
+
},
|
|
65
|
+
}));
|
|
62
66
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
//
|
|
67
|
+
const AggregationNotification = React.forwardRef((props, ref) => {
|
|
68
|
+
const classes = useStyles();
|
|
69
|
+
const { closeSnackbar } = useSnackbar();
|
|
70
|
+
const expanded = true;
|
|
71
|
+
// Aktualizované props pro novou verzi AG Grid aggregací
|
|
72
|
+
const {count, sum, max, min, avg, square, cubic, earliest, latest, rows, cols} = props.messageInfo;
|
|
73
|
+
const length = count || 0;
|
|
74
|
+
const isDate = earliest && latest;
|
|
68
75
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
76
|
+
const handleDismiss = () => {
|
|
77
|
+
closeSnackbar(props.id);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<Card className={classes.card} ref={ref}>
|
|
82
|
+
<CardActions classes={{ root: classes.actionRoot }}>
|
|
83
|
+
<Typography variant="subtitle2">Označeno {rows} řádků, {cols} sloupců ({length} buněk)</Typography>
|
|
84
|
+
<div className={classes.icons}>
|
|
85
|
+
<IconButton className={classes.expand} onClick={handleDismiss}>
|
|
86
|
+
<CloseIcon />
|
|
87
|
+
</IconButton>
|
|
88
|
+
</div>
|
|
89
|
+
</CardActions>
|
|
90
|
+
<Collapse in={expanded} timeout="auto" unmountOnExit>
|
|
91
|
+
{props.showNumber && count > 0 ? (
|
|
92
|
+
<Paper className={classes.collapse}>
|
|
93
|
+
{ !isNaN(parseFloat(count)) ? (<span><b>Počet:</b> {parseFloat(count)}</span>) : (<span />) }
|
|
94
|
+
{ !isNaN(parseFloat(sum)) ? (<span className="ml-2"><b>Součet:</b> {parseFloat(sum).toFixed(2)}</span>) : (<span />) }
|
|
95
|
+
{ !isNaN(parseFloat(min)) ? (<span className="ml-2"><b>Min:</b> {parseFloat(min).toFixed(2)}</span>) : (<span />) }
|
|
96
|
+
{ !isNaN(parseFloat(max)) ? (<span className="ml-2"><b>Max:</b> {parseFloat(max).toFixed(2)}</span>) : (<span />) }
|
|
97
|
+
{ !isNaN(parseFloat(avg)) ? (<span className="ml-2"><b>Průměr:</b> {parseFloat(avg).toFixed(2)}</span>) : (<span />) }
|
|
98
|
+
{ !isNaN(parseFloat(square)) ? (<span className="ml-2"><b>2D:</b> {parseFloat(square).toFixed(2)}</span>) : (<span />) }
|
|
99
|
+
{ !isNaN(parseFloat(cubic)) ? (<span className="ml-2"><b>3D:</b> {parseFloat(cubic).toFixed(2)}</span>) : (<span />) }
|
|
100
|
+
</Paper>
|
|
101
|
+
) : (<div />)}
|
|
94
102
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
// });
|
|
103
|
+
{props.showDate && isDate ? (
|
|
104
|
+
<Paper className={classes.collapse}>
|
|
105
|
+
<span><b>Nejdříve:</b> {moment(earliest).format("DD.MM.YY HH:mm:ss")}</span>
|
|
106
|
+
<span className="ml-2"><b>Nejpozději:</b> {moment(latest).format("DD.MM.YY HH:mm:ss")}</span>
|
|
107
|
+
</Paper>
|
|
108
|
+
) : (<div />)}
|
|
109
|
+
</Collapse>
|
|
110
|
+
</Card>
|
|
111
|
+
);
|
|
112
|
+
});
|
|
106
113
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
114
|
+
AggregationNotification.propTypes = {
|
|
115
|
+
id: PropTypes.number.isRequired,
|
|
116
|
+
};
|
|
110
117
|
|
|
111
|
-
|
|
118
|
+
export default AggregationNotification;
|
|
119
|
+
*/
|