@sis-cc/dotstatsuite-visions 7.12.2 → 7.14.0
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/es/Loading/Loading.js +20 -7
- package/es/Loading/index.js +13 -3
- package/es/ScopeList/Item.js +6 -4
- package/es/ScopeList/ScopeList.js +7 -3
- package/es/ScopeList/index.js +1 -0
- package/es/TableHtml5/TableHtml5.js +2 -2
- package/es/TableHtml5/cell.js +3 -3
- package/es/TableHtml5/header.js +2 -2
- package/es/TableHtml5/section.js +4 -4
- package/es/TableHtml5/sectionHeader.js +2 -2
- package/es/TableHtml5/subHeader.js +4 -4
- package/lib/Loading/Loading.js +25 -7
- package/lib/ScopeList/Item.js +6 -4
- package/lib/ScopeList/ScopeList.js +7 -3
- package/lib/TableHtml5/TableHtml5.js +2 -2
- package/lib/TableHtml5/cell.js +3 -3
- package/lib/TableHtml5/header.js +2 -2
- package/lib/TableHtml5/section.js +4 -4
- package/lib/TableHtml5/sectionHeader.js +2 -2
- package/lib/TableHtml5/subHeader.js +4 -4
- package/package.json +1 -1
package/es/Loading/Loading.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import * as R from 'ramda';
|
|
2
3
|
import cx from 'classnames';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
4
5
|
import { makeStyles } from '@material-ui/core/styles';
|
|
@@ -19,13 +20,12 @@ var useStyles = makeStyles(function (theme) {
|
|
|
19
20
|
height: ' 48px',
|
|
20
21
|
borderStyle: 'solid',
|
|
21
22
|
borderWidth: '5px',
|
|
22
|
-
borderColor: theme.palette.primary.main,
|
|
23
|
-
borderBottomColor: 'transparent',
|
|
24
23
|
borderRadius: '50%',
|
|
25
24
|
display: 'inline-block',
|
|
26
25
|
boxSizing: 'border-box',
|
|
27
26
|
animation: '$rotate 1s linear infinite',
|
|
28
|
-
margin: theme.spacing(2)
|
|
27
|
+
margin: theme.spacing(2),
|
|
28
|
+
borderBottomColor: 'transparent !important'
|
|
29
29
|
},
|
|
30
30
|
'@keyframes rotate': {
|
|
31
31
|
'0%': {
|
|
@@ -36,8 +36,13 @@ var useStyles = makeStyles(function (theme) {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
warning: {
|
|
39
|
-
borderColor: theme.palette.warning.main
|
|
40
|
-
|
|
39
|
+
borderColor: theme.palette.warning.main
|
|
40
|
+
},
|
|
41
|
+
primaryColor: {
|
|
42
|
+
borderColor: theme.palette.primary.main
|
|
43
|
+
},
|
|
44
|
+
secondaryColor: {
|
|
45
|
+
borderColor: theme.palette.secondary.main
|
|
41
46
|
}
|
|
42
47
|
};
|
|
43
48
|
});
|
|
@@ -47,14 +52,20 @@ var Loading = function Loading(_ref) {
|
|
|
47
52
|
|
|
48
53
|
var message = _ref.message,
|
|
49
54
|
_ref$isWarning = _ref.isWarning,
|
|
50
|
-
isWarning = _ref$isWarning === undefined ? false : _ref$isWarning
|
|
55
|
+
isWarning = _ref$isWarning === undefined ? false : _ref$isWarning,
|
|
56
|
+
_ref$variant = _ref.variant,
|
|
57
|
+
variant = _ref$variant === undefined ? 'primary' : _ref$variant,
|
|
58
|
+
color = _ref.color;
|
|
51
59
|
|
|
52
60
|
var classes = useStyles();
|
|
53
61
|
|
|
54
62
|
return React.createElement(
|
|
55
63
|
'div',
|
|
56
64
|
{ className: classes.root },
|
|
57
|
-
React.createElement('div', {
|
|
65
|
+
React.createElement('div', {
|
|
66
|
+
style: { color: R.isNil(color) ? undefined : color },
|
|
67
|
+
className: cx(classes.circularProgress, (_cx = {}, _cx[classes[variant + 'Color']] = !R.isNil(variant) && R.isNil(color) && !isWarning, _cx[classes.warning] = isWarning, _cx))
|
|
68
|
+
}),
|
|
58
69
|
React.createElement(
|
|
59
70
|
Typography,
|
|
60
71
|
{ variant: 'subtitle1', noWrap: true, align: 'center' },
|
|
@@ -65,6 +76,8 @@ var Loading = function Loading(_ref) {
|
|
|
65
76
|
|
|
66
77
|
Loading.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
67
78
|
message: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
79
|
+
variant: PropTypes.string,
|
|
80
|
+
color: PropTypes.string,
|
|
68
81
|
isWarning: PropTypes.bool
|
|
69
82
|
} : {};
|
|
70
83
|
|
package/es/Loading/index.js
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Loading component is a basic placeholder to use when retrieving things.
|
|
3
|
+
* There are four way to use it:
|
|
4
|
+
* 1. Loading with message
|
|
5
|
+
* 2. Loading with message and variant (primary|secondary) (default: primary)
|
|
6
|
+
* 3. Loading with message and color (second priority color)
|
|
7
|
+
* 4. Loading with warning (top priority color)
|
|
8
|
+
*
|
|
3
9
|
*
|
|
4
10
|
* @memberOf VISIONS
|
|
5
11
|
* @name Loading
|
|
6
12
|
* @tag component
|
|
7
13
|
* @api public
|
|
8
14
|
* @props
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
15
|
+
* Loading.propTypes = {
|
|
16
|
+
* message: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
17
|
+
* variant: PropTypes.string,
|
|
18
|
+
* color: PropTypes.string,
|
|
19
|
+
* isWarning: PropTypes.bool,
|
|
20
|
+
* };
|
|
21
|
+
|
|
12
22
|
*/
|
|
13
23
|
|
|
14
24
|
export { default } from './Loading';
|
package/es/ScopeList/Item.js
CHANGED
|
@@ -55,7 +55,8 @@ var Item = function Item(_ref) {
|
|
|
55
55
|
index = _ref.index,
|
|
56
56
|
labelRenderer = _ref.labelRenderer,
|
|
57
57
|
HTMLRenderer = _ref.HTMLRenderer,
|
|
58
|
-
hierarchicalId = _ref.hierarchicalId
|
|
58
|
+
hierarchicalId = _ref.hierarchicalId,
|
|
59
|
+
labels = _ref.labels;
|
|
59
60
|
|
|
60
61
|
var _React$useState = React.useState(false),
|
|
61
62
|
isTooltipShown = _React$useState[0],
|
|
@@ -82,14 +83,14 @@ var Item = function Item(_ref) {
|
|
|
82
83
|
},
|
|
83
84
|
React.createElement(ListItemText, {
|
|
84
85
|
tabIndex: 0,
|
|
85
|
-
'aria-label': label,
|
|
86
|
+
'aria-label': isDisabled ? R.propOr('', 'disableItemLabel')(labels) + ' ' + label : label,
|
|
86
87
|
'aria-pressed': isSelected,
|
|
87
88
|
'aria-disabled': isDisabled,
|
|
88
89
|
primaryTypographyProps: { noWrap: true, color: 'inherit' },
|
|
89
90
|
secondaryTypographyProps: { color: 'inherit' },
|
|
90
91
|
classes: { root: classes.listItem },
|
|
91
92
|
className: cx((_cx2 = {}, _cx2[classes.accessibilityItemHover] = accessibility, _cx2[classes.listItemSelected] = R.and(isSelected, R.not(isDisabled)), _cx2[classes.listItemHover] = R.not(isDisabled), _cx2)),
|
|
92
|
-
title: label,
|
|
93
|
+
title: isDisabled ? R.propOr('', 'disableItemLabel')(labels) + ' ' + label : label,
|
|
93
94
|
primary: React.createElement(
|
|
94
95
|
'div',
|
|
95
96
|
{
|
|
@@ -234,7 +235,8 @@ Item.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
234
235
|
index: PropTypes.number,
|
|
235
236
|
labelRenderer: PropTypes.func,
|
|
236
237
|
HTMLRenderer: PropTypes.func,
|
|
237
|
-
hierarchicalId: PropTypes.string
|
|
238
|
+
hierarchicalId: PropTypes.string,
|
|
239
|
+
labels: PropTypes.object
|
|
238
240
|
} : {};
|
|
239
241
|
|
|
240
242
|
export default Item;
|
|
@@ -110,7 +110,7 @@ var ScopeList = function ScopeList(props) {
|
|
|
110
110
|
// ReactVirtualized__Grid ReactVirtualized__List made the scrollbar
|
|
111
111
|
var scrollEl = R.path(['children', 0, 'children', 0], current);
|
|
112
112
|
var isBottom = R.gte(R.add(R.prop('scrollTop')(scrollEl), R.prop('clientHeight')(scrollEl)), R.prop('scrollHeight')(scrollEl));
|
|
113
|
-
var nextpos = (scrollTop ||
|
|
113
|
+
var nextpos = (scrollTop || scrollEl.scrollTop) + event.deltaY / 2;
|
|
114
114
|
if (R.or(event.deltaY < 0, event.deltaY > 0 && R.not(isBottom))) {
|
|
115
115
|
setScrollTop(nextpos < 0 ? 0 : nextpos);
|
|
116
116
|
}
|
|
@@ -120,6 +120,9 @@ var ScopeList = function ScopeList(props) {
|
|
|
120
120
|
setScrollTop(undefined); // should be undefined if the user want use the normal scroll
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
|
+
if (scrollTop === 0) {
|
|
124
|
+
setScrollTop(undefined);
|
|
125
|
+
}
|
|
123
126
|
if (R.isNil(current)) return;
|
|
124
127
|
|
|
125
128
|
current.addEventListener('wheel', handler, { passive: false });
|
|
@@ -229,7 +232,6 @@ var ScopeList = function ScopeList(props) {
|
|
|
229
232
|
var height = _ref.height,
|
|
230
233
|
width = _ref.width;
|
|
231
234
|
return React.createElement(VirtualizedList, {
|
|
232
|
-
ref: ref,
|
|
233
235
|
overscan: 10,
|
|
234
236
|
tabIndex: -1,
|
|
235
237
|
height: height,
|
|
@@ -258,7 +260,8 @@ var ScopeList = function ScopeList(props) {
|
|
|
258
260
|
changeMouseSelection: changeMouseSelection,
|
|
259
261
|
ariaLabel: R.prop('navigateNext')(labels),
|
|
260
262
|
NavigateIcon: isRtl ? NavigateBefore : NavigateNext,
|
|
261
|
-
accessibility: accessibility
|
|
263
|
+
accessibility: accessibility,
|
|
264
|
+
labels: labels
|
|
262
265
|
}, item, {
|
|
263
266
|
isDisabled: disableAccessor(item),
|
|
264
267
|
label: labelRenderer(item)
|
|
@@ -297,6 +300,7 @@ ScopeList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
297
300
|
childrenNavigateDesc: PropTypes.string,
|
|
298
301
|
navigateNext: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
299
302
|
backHelper: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
303
|
+
disableItemLabel: PropTypes.string,
|
|
300
304
|
selection: PropTypes.shape({
|
|
301
305
|
title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
302
306
|
currentLevel: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
package/es/ScopeList/index.js
CHANGED
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
* navigateBefore: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
52
52
|
* navigateNext: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
53
53
|
* backHelper: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
54
|
+
* disableItemLabel: PropTypes.string,
|
|
54
55
|
* selection: {
|
|
55
56
|
* title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
56
57
|
* currentLevel: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
@@ -22,8 +22,8 @@ var useStyles = makeStyles(function (theme) {
|
|
|
22
22
|
return {
|
|
23
23
|
table: {
|
|
24
24
|
borderCollapse: 'separate',
|
|
25
|
-
borderLeft: '
|
|
26
|
-
borderTop: '
|
|
25
|
+
borderLeft: 'thin solid ' + theme.palette.grey[500],
|
|
26
|
+
borderTop: 'thin solid ' + theme.palette.grey[500]
|
|
27
27
|
},
|
|
28
28
|
stickyHeader: {
|
|
29
29
|
position: 'sticky',
|
package/es/TableHtml5/cell.js
CHANGED
|
@@ -11,8 +11,8 @@ import { getIsRtl } from '../utils';
|
|
|
11
11
|
var useStyles = makeStyles(function (theme) {
|
|
12
12
|
return {
|
|
13
13
|
cell: {
|
|
14
|
-
borderBottom: '
|
|
15
|
-
borderRight: '
|
|
14
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
15
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
16
16
|
padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
|
|
17
17
|
verticalAlign: 'baseline',
|
|
18
18
|
color: theme.palette.grey['A700'],
|
|
@@ -26,7 +26,7 @@ var useStyles = makeStyles(function (theme) {
|
|
|
26
26
|
},
|
|
27
27
|
highlight: theme.mixins.table.cellHighlight,
|
|
28
28
|
oneCell: {
|
|
29
|
-
border: '
|
|
29
|
+
border: 'thin solid ' + theme.palette.grey[500],
|
|
30
30
|
display: 'block' // MUI TableCell is inline-block
|
|
31
31
|
},
|
|
32
32
|
link: {
|
package/es/TableHtml5/header.js
CHANGED
|
@@ -15,8 +15,8 @@ var useStyles = makeStyles(function (theme) {
|
|
|
15
15
|
color: theme.palette.getContrastText(theme.palette.primary.main),
|
|
16
16
|
backgroundColor: theme.palette.primary.main,
|
|
17
17
|
border: 'inherit',
|
|
18
|
-
borderBottom: '
|
|
19
|
-
borderRight: '
|
|
18
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
19
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
20
20
|
padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
|
|
21
21
|
verticalAlign: 'middle',
|
|
22
22
|
'&:focus ': {
|
package/es/TableHtml5/section.js
CHANGED
|
@@ -19,8 +19,8 @@ var useStyles = makeStyles(function (theme) {
|
|
|
19
19
|
rowTitle: {
|
|
20
20
|
backgroundColor: getLight(theme) || theme.palette.secondary.light,
|
|
21
21
|
border: 'inherit',
|
|
22
|
-
borderBottom: '
|
|
23
|
-
borderRight: '
|
|
22
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
23
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
24
24
|
padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
|
|
25
25
|
color: theme.palette.grey['A700'],
|
|
26
26
|
verticalAlign: 'middle'
|
|
@@ -30,8 +30,8 @@ var useStyles = makeStyles(function (theme) {
|
|
|
30
30
|
backgroundColor: theme.palette.grey[200],
|
|
31
31
|
verticalAlign: 'top',
|
|
32
32
|
border: 'inherit',
|
|
33
|
-
borderBottom: '
|
|
34
|
-
borderRight: '
|
|
33
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
34
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
35
35
|
padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
|
|
36
36
|
position: 'sticky',
|
|
37
37
|
zIndex: 1
|
|
@@ -17,8 +17,8 @@ var useStyles = makeStyles(function (theme) {
|
|
|
17
17
|
section: {
|
|
18
18
|
backgroundColor: getDark(theme) || theme.palette.secondary.dark,
|
|
19
19
|
border: 'inherit',
|
|
20
|
-
borderBottom: '
|
|
21
|
-
borderRight: '
|
|
20
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
21
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
22
22
|
padding: theme.spacing(0, 1),
|
|
23
23
|
color: theme.palette.grey['A700'],
|
|
24
24
|
verticalAlign: 'middle',
|
|
@@ -14,8 +14,8 @@ var useStyles = makeStyles(function (theme) {
|
|
|
14
14
|
columnsTitle: {
|
|
15
15
|
backgroundColor: getLight(theme) || theme.palette.secondary.light,
|
|
16
16
|
border: 'inherit',
|
|
17
|
-
borderBottom: '
|
|
18
|
-
borderRight: '
|
|
17
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
18
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
19
19
|
padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
|
|
20
20
|
color: theme.palette.grey['A700'],
|
|
21
21
|
verticalAlign: 'middle',
|
|
@@ -25,8 +25,8 @@ var useStyles = makeStyles(function (theme) {
|
|
|
25
25
|
fillerCell: {
|
|
26
26
|
backgroundColor: theme.palette.grey[200],
|
|
27
27
|
border: 'inherit',
|
|
28
|
-
borderBottom: '
|
|
29
|
-
borderRight: '
|
|
28
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
29
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
30
30
|
padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
|
|
31
31
|
verticalAlign: 'middle',
|
|
32
32
|
textAlign: 'center',
|
package/lib/Loading/Loading.js
CHANGED
|
@@ -6,6 +6,10 @@ var _react = require('react');
|
|
|
6
6
|
|
|
7
7
|
var _react2 = _interopRequireDefault(_react);
|
|
8
8
|
|
|
9
|
+
var _ramda = require('ramda');
|
|
10
|
+
|
|
11
|
+
var R = _interopRequireWildcard(_ramda);
|
|
12
|
+
|
|
9
13
|
var _classnames = require('classnames');
|
|
10
14
|
|
|
11
15
|
var _classnames2 = _interopRequireDefault(_classnames);
|
|
@@ -20,6 +24,8 @@ var _Typography = require('@material-ui/core/Typography');
|
|
|
20
24
|
|
|
21
25
|
var _Typography2 = _interopRequireDefault(_Typography);
|
|
22
26
|
|
|
27
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
28
|
+
|
|
23
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
30
|
|
|
25
31
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
@@ -37,13 +43,12 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
37
43
|
height: ' 48px',
|
|
38
44
|
borderStyle: 'solid',
|
|
39
45
|
borderWidth: '5px',
|
|
40
|
-
borderColor: theme.palette.primary.main,
|
|
41
|
-
borderBottomColor: 'transparent',
|
|
42
46
|
borderRadius: '50%',
|
|
43
47
|
display: 'inline-block',
|
|
44
48
|
boxSizing: 'border-box',
|
|
45
49
|
animation: '$rotate 1s linear infinite',
|
|
46
|
-
margin: theme.spacing(2)
|
|
50
|
+
margin: theme.spacing(2),
|
|
51
|
+
borderBottomColor: 'transparent !important'
|
|
47
52
|
},
|
|
48
53
|
'@keyframes rotate': {
|
|
49
54
|
'0%': {
|
|
@@ -54,8 +59,13 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
54
59
|
}
|
|
55
60
|
},
|
|
56
61
|
warning: {
|
|
57
|
-
borderColor: theme.palette.warning.main
|
|
58
|
-
|
|
62
|
+
borderColor: theme.palette.warning.main
|
|
63
|
+
},
|
|
64
|
+
primaryColor: {
|
|
65
|
+
borderColor: theme.palette.primary.main
|
|
66
|
+
},
|
|
67
|
+
secondaryColor: {
|
|
68
|
+
borderColor: theme.palette.secondary.main
|
|
59
69
|
}
|
|
60
70
|
};
|
|
61
71
|
});
|
|
@@ -65,14 +75,20 @@ var Loading = function Loading(_ref) {
|
|
|
65
75
|
|
|
66
76
|
var message = _ref.message,
|
|
67
77
|
_ref$isWarning = _ref.isWarning,
|
|
68
|
-
isWarning = _ref$isWarning === undefined ? false : _ref$isWarning
|
|
78
|
+
isWarning = _ref$isWarning === undefined ? false : _ref$isWarning,
|
|
79
|
+
_ref$variant = _ref.variant,
|
|
80
|
+
variant = _ref$variant === undefined ? 'primary' : _ref$variant,
|
|
81
|
+
color = _ref.color;
|
|
69
82
|
|
|
70
83
|
var classes = useStyles();
|
|
71
84
|
|
|
72
85
|
return _react2.default.createElement(
|
|
73
86
|
'div',
|
|
74
87
|
{ className: classes.root },
|
|
75
|
-
_react2.default.createElement('div', {
|
|
88
|
+
_react2.default.createElement('div', {
|
|
89
|
+
style: { color: R.isNil(color) ? undefined : color },
|
|
90
|
+
className: (0, _classnames2.default)(classes.circularProgress, (_cx = {}, _cx[classes[variant + 'Color']] = !R.isNil(variant) && R.isNil(color) && !isWarning, _cx[classes.warning] = isWarning, _cx))
|
|
91
|
+
}),
|
|
76
92
|
_react2.default.createElement(
|
|
77
93
|
_Typography2.default,
|
|
78
94
|
{ variant: 'subtitle1', noWrap: true, align: 'center' },
|
|
@@ -83,6 +99,8 @@ var Loading = function Loading(_ref) {
|
|
|
83
99
|
|
|
84
100
|
Loading.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
85
101
|
message: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]),
|
|
102
|
+
variant: _propTypes2.default.string,
|
|
103
|
+
color: _propTypes2.default.string,
|
|
86
104
|
isWarning: _propTypes2.default.bool
|
|
87
105
|
} : {};
|
|
88
106
|
|
package/lib/ScopeList/Item.js
CHANGED
|
@@ -93,7 +93,8 @@ var Item = function Item(_ref) {
|
|
|
93
93
|
index = _ref.index,
|
|
94
94
|
labelRenderer = _ref.labelRenderer,
|
|
95
95
|
HTMLRenderer = _ref.HTMLRenderer,
|
|
96
|
-
hierarchicalId = _ref.hierarchicalId
|
|
96
|
+
hierarchicalId = _ref.hierarchicalId,
|
|
97
|
+
labels = _ref.labels;
|
|
97
98
|
|
|
98
99
|
var _React$useState = _react2.default.useState(false),
|
|
99
100
|
isTooltipShown = _React$useState[0],
|
|
@@ -120,14 +121,14 @@ var Item = function Item(_ref) {
|
|
|
120
121
|
},
|
|
121
122
|
_react2.default.createElement(_ListItemText2.default, {
|
|
122
123
|
tabIndex: 0,
|
|
123
|
-
'aria-label': label,
|
|
124
|
+
'aria-label': isDisabled ? R.propOr('', 'disableItemLabel')(labels) + ' ' + label : label,
|
|
124
125
|
'aria-pressed': isSelected,
|
|
125
126
|
'aria-disabled': isDisabled,
|
|
126
127
|
primaryTypographyProps: { noWrap: true, color: 'inherit' },
|
|
127
128
|
secondaryTypographyProps: { color: 'inherit' },
|
|
128
129
|
classes: { root: classes.listItem },
|
|
129
130
|
className: (0, _classnames2.default)((_cx2 = {}, _cx2[classes.accessibilityItemHover] = accessibility, _cx2[classes.listItemSelected] = R.and(isSelected, R.not(isDisabled)), _cx2[classes.listItemHover] = R.not(isDisabled), _cx2)),
|
|
130
|
-
title: label,
|
|
131
|
+
title: isDisabled ? R.propOr('', 'disableItemLabel')(labels) + ' ' + label : label,
|
|
131
132
|
primary: _react2.default.createElement(
|
|
132
133
|
'div',
|
|
133
134
|
{
|
|
@@ -272,7 +273,8 @@ Item.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
272
273
|
index: _propTypes2.default.number,
|
|
273
274
|
labelRenderer: _propTypes2.default.func,
|
|
274
275
|
HTMLRenderer: _propTypes2.default.func,
|
|
275
|
-
hierarchicalId: _propTypes2.default.string
|
|
276
|
+
hierarchicalId: _propTypes2.default.string,
|
|
277
|
+
labels: _propTypes2.default.object
|
|
276
278
|
} : {};
|
|
277
279
|
|
|
278
280
|
exports.default = Item;
|
|
@@ -163,7 +163,7 @@ var ScopeList = function ScopeList(props) {
|
|
|
163
163
|
// ReactVirtualized__Grid ReactVirtualized__List made the scrollbar
|
|
164
164
|
var scrollEl = R.path(['children', 0, 'children', 0], current);
|
|
165
165
|
var isBottom = R.gte(R.add(R.prop('scrollTop')(scrollEl), R.prop('clientHeight')(scrollEl)), R.prop('scrollHeight')(scrollEl));
|
|
166
|
-
var nextpos = (scrollTop ||
|
|
166
|
+
var nextpos = (scrollTop || scrollEl.scrollTop) + event.deltaY / 2;
|
|
167
167
|
if (R.or(event.deltaY < 0, event.deltaY > 0 && R.not(isBottom))) {
|
|
168
168
|
setScrollTop(nextpos < 0 ? 0 : nextpos);
|
|
169
169
|
}
|
|
@@ -173,6 +173,9 @@ var ScopeList = function ScopeList(props) {
|
|
|
173
173
|
setScrollTop(undefined); // should be undefined if the user want use the normal scroll
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
|
+
if (scrollTop === 0) {
|
|
177
|
+
setScrollTop(undefined);
|
|
178
|
+
}
|
|
176
179
|
if (R.isNil(current)) return;
|
|
177
180
|
|
|
178
181
|
current.addEventListener('wheel', handler, { passive: false });
|
|
@@ -282,7 +285,6 @@ var ScopeList = function ScopeList(props) {
|
|
|
282
285
|
var height = _ref.height,
|
|
283
286
|
width = _ref.width;
|
|
284
287
|
return _react2.default.createElement(_List2.default, {
|
|
285
|
-
ref: ref,
|
|
286
288
|
overscan: 10,
|
|
287
289
|
tabIndex: -1,
|
|
288
290
|
height: height,
|
|
@@ -311,7 +313,8 @@ var ScopeList = function ScopeList(props) {
|
|
|
311
313
|
changeMouseSelection: changeMouseSelection,
|
|
312
314
|
ariaLabel: R.prop('navigateNext')(labels),
|
|
313
315
|
NavigateIcon: isRtl ? _NavigateBefore2.default : _NavigateNext2.default,
|
|
314
|
-
accessibility: accessibility
|
|
316
|
+
accessibility: accessibility,
|
|
317
|
+
labels: labels
|
|
315
318
|
}, item, {
|
|
316
319
|
isDisabled: disableAccessor(item),
|
|
317
320
|
label: labelRenderer(item)
|
|
@@ -350,6 +353,7 @@ ScopeList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
350
353
|
childrenNavigateDesc: _propTypes2.default.string,
|
|
351
354
|
navigateNext: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]),
|
|
352
355
|
backHelper: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]),
|
|
356
|
+
disableItemLabel: _propTypes2.default.string,
|
|
353
357
|
selection: _propTypes2.default.shape({
|
|
354
358
|
title: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]),
|
|
355
359
|
currentLevel: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]),
|
|
@@ -55,8 +55,8 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
55
55
|
return {
|
|
56
56
|
table: {
|
|
57
57
|
borderCollapse: 'separate',
|
|
58
|
-
borderLeft: '
|
|
59
|
-
borderTop: '
|
|
58
|
+
borderLeft: 'thin solid ' + theme.palette.grey[500],
|
|
59
|
+
borderTop: 'thin solid ' + theme.palette.grey[500]
|
|
60
60
|
},
|
|
61
61
|
stickyHeader: {
|
|
62
62
|
position: 'sticky',
|
package/lib/TableHtml5/cell.js
CHANGED
|
@@ -41,8 +41,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
41
41
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
42
42
|
return {
|
|
43
43
|
cell: {
|
|
44
|
-
borderBottom: '
|
|
45
|
-
borderRight: '
|
|
44
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
45
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
46
46
|
padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
|
|
47
47
|
verticalAlign: 'baseline',
|
|
48
48
|
color: theme.palette.grey['A700'],
|
|
@@ -56,7 +56,7 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
56
56
|
},
|
|
57
57
|
highlight: theme.mixins.table.cellHighlight,
|
|
58
58
|
oneCell: {
|
|
59
|
-
border: '
|
|
59
|
+
border: 'thin solid ' + theme.palette.grey[500],
|
|
60
60
|
display: 'block' // MUI TableCell is inline-block
|
|
61
61
|
},
|
|
62
62
|
link: {
|
package/lib/TableHtml5/header.js
CHANGED
|
@@ -48,8 +48,8 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
48
48
|
color: theme.palette.getContrastText(theme.palette.primary.main),
|
|
49
49
|
backgroundColor: theme.palette.primary.main,
|
|
50
50
|
border: 'inherit',
|
|
51
|
-
borderBottom: '
|
|
52
|
-
borderRight: '
|
|
51
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
52
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
53
53
|
padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
|
|
54
54
|
verticalAlign: 'middle',
|
|
55
55
|
'&:focus ': {
|
|
@@ -61,8 +61,8 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
61
61
|
rowTitle: {
|
|
62
62
|
backgroundColor: (0, _utils.getLight)(theme) || theme.palette.secondary.light,
|
|
63
63
|
border: 'inherit',
|
|
64
|
-
borderBottom: '
|
|
65
|
-
borderRight: '
|
|
64
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
65
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
66
66
|
padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
|
|
67
67
|
color: theme.palette.grey['A700'],
|
|
68
68
|
verticalAlign: 'middle'
|
|
@@ -72,8 +72,8 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
72
72
|
backgroundColor: theme.palette.grey[200],
|
|
73
73
|
verticalAlign: 'top',
|
|
74
74
|
border: 'inherit',
|
|
75
|
-
borderBottom: '
|
|
76
|
-
borderRight: '
|
|
75
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
76
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
77
77
|
padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
|
|
78
78
|
position: 'sticky',
|
|
79
79
|
zIndex: 1
|
|
@@ -53,8 +53,8 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
53
53
|
section: {
|
|
54
54
|
backgroundColor: (0, _utils.getDark)(theme) || theme.palette.secondary.dark,
|
|
55
55
|
border: 'inherit',
|
|
56
|
-
borderBottom: '
|
|
57
|
-
borderRight: '
|
|
56
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
57
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
58
58
|
padding: theme.spacing(0, 1),
|
|
59
59
|
color: theme.palette.grey['A700'],
|
|
60
60
|
verticalAlign: 'middle',
|
|
@@ -47,8 +47,8 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
47
47
|
columnsTitle: {
|
|
48
48
|
backgroundColor: (0, _utils.getLight)(theme) || theme.palette.secondary.light,
|
|
49
49
|
border: 'inherit',
|
|
50
|
-
borderBottom: '
|
|
51
|
-
borderRight: '
|
|
50
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
51
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
52
52
|
padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
|
|
53
53
|
color: theme.palette.grey['A700'],
|
|
54
54
|
verticalAlign: 'middle',
|
|
@@ -58,8 +58,8 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
58
58
|
fillerCell: {
|
|
59
59
|
backgroundColor: theme.palette.grey[200],
|
|
60
60
|
border: 'inherit',
|
|
61
|
-
borderBottom: '
|
|
62
|
-
borderRight: '
|
|
61
|
+
borderBottom: 'thin solid ' + theme.palette.grey[500],
|
|
62
|
+
borderRight: 'thin solid ' + theme.palette.grey[500],
|
|
63
63
|
padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
|
|
64
64
|
verticalAlign: 'middle',
|
|
65
65
|
textAlign: 'center',
|