@sis-cc/dotstatsuite-visions 7.11.4 → 7.12.2
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/DataHeader/DataHeader.js +23 -35
- package/es/Loading/Loading.js +32 -12
- package/es/ScopeList/ScopeList.js +7 -0
- package/es/theme.js +1 -1
- package/lib/DataHeader/DataHeader.js +23 -35
- package/lib/Loading/Loading.js +35 -15
- package/lib/ScopeList/ScopeList.js +7 -0
- package/lib/theme.js +1 -1
- package/package.json +1 -1
|
@@ -61,9 +61,12 @@ var useStyles = makeStyles(function (theme) {
|
|
|
61
61
|
}
|
|
62
62
|
}),
|
|
63
63
|
disclaimer: _extends({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
padding: theme.spacing(0.5),
|
|
65
|
+
fontSize: function fontSize(_ref4) {
|
|
66
|
+
var isWidthLess = _ref4.isWidthLess;
|
|
67
|
+
return R.cond([[R.always(isWidthLess(T4_BREAKPOINTS.xs3)), R.always(12)], [R.always(isWidthLess(T4_BREAKPOINTS.sm)), R.always(13)]])(14);
|
|
68
|
+
},
|
|
69
|
+
lineHeight: 1.5
|
|
67
70
|
}, R.pathOr({}, ['mixins', 'dataHeader', 'disclaimer'], theme)),
|
|
68
71
|
infoIcon: {
|
|
69
72
|
height: '0.8em',
|
|
@@ -104,19 +107,19 @@ var useStyles = makeStyles(function (theme) {
|
|
|
104
107
|
};
|
|
105
108
|
});
|
|
106
109
|
|
|
107
|
-
var DataHeader = function DataHeader(
|
|
110
|
+
var DataHeader = function DataHeader(_ref5) {
|
|
108
111
|
var _cx;
|
|
109
112
|
|
|
110
|
-
var children =
|
|
111
|
-
title =
|
|
112
|
-
|
|
113
|
-
subtitle =
|
|
114
|
-
uprs =
|
|
115
|
-
disclaimer =
|
|
116
|
-
sideProps =
|
|
117
|
-
SideIcon =
|
|
118
|
-
|
|
119
|
-
isSticky =
|
|
113
|
+
var children = _ref5.children,
|
|
114
|
+
title = _ref5.title,
|
|
115
|
+
_ref5$subtitle = _ref5.subtitle,
|
|
116
|
+
subtitle = _ref5$subtitle === undefined ? [] : _ref5$subtitle,
|
|
117
|
+
uprs = _ref5.uprs,
|
|
118
|
+
disclaimer = _ref5.disclaimer,
|
|
119
|
+
sideProps = _ref5.sideProps,
|
|
120
|
+
SideIcon = _ref5.SideIcon,
|
|
121
|
+
_ref5$isSticky = _ref5.isSticky,
|
|
122
|
+
isSticky = _ref5$isSticky === undefined ? false : _ref5$isSticky;
|
|
120
123
|
|
|
121
124
|
var target = React.useRef(null);
|
|
122
125
|
|
|
@@ -151,27 +154,7 @@ var DataHeader = function DataHeader(_ref4) {
|
|
|
151
154
|
{ className: classes.sideIconContainer },
|
|
152
155
|
React.createElement(SideIcon, { sideProps: sideProps })
|
|
153
156
|
),
|
|
154
|
-
React.createElement(Flags, { classes: classes, content: R.propOr([], 'flags', title) })
|
|
155
|
-
disclaimer && React.createElement(
|
|
156
|
-
Tooltip,
|
|
157
|
-
{
|
|
158
|
-
className: cx(classes.title, classes.disclaimer),
|
|
159
|
-
title: disclaimer,
|
|
160
|
-
tabIndex: 0,
|
|
161
|
-
'data-testid': 'data-header-disclaimer',
|
|
162
|
-
variant: 'warning',
|
|
163
|
-
'aria-hidden': false,
|
|
164
|
-
placement: 'bottom',
|
|
165
|
-
PopperProps: {
|
|
166
|
-
modifiers: {
|
|
167
|
-
flip: {
|
|
168
|
-
behavior: ['bottom', 'top', 'left', 'right']
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
React.createElement(WarningIcon, { pathBackgroundColor: warningColor, pathColor: warningTextColor })
|
|
174
|
-
)
|
|
157
|
+
React.createElement(Flags, { classes: classes, content: R.propOr([], 'flags', title) })
|
|
175
158
|
),
|
|
176
159
|
isWidthUp(T4_BREAKPOINTS.xs3) && subtitle && R.not(R.isEmpty(subtitle)) && React.createElement(
|
|
177
160
|
'div',
|
|
@@ -200,6 +183,11 @@ var DataHeader = function DataHeader(_ref4) {
|
|
|
200
183
|
{ className: classes.subtitle },
|
|
201
184
|
React.createElement(Title, { header: uprs.header }),
|
|
202
185
|
uprs.label
|
|
186
|
+
),
|
|
187
|
+
isWidthUp(T4_BREAKPOINTS.xs3) && disclaimer && React.createElement(
|
|
188
|
+
Typography,
|
|
189
|
+
{ 'data-testid': 'data-header-disclaimer', className: classes.disclaimer },
|
|
190
|
+
disclaimer
|
|
203
191
|
)
|
|
204
192
|
),
|
|
205
193
|
React.createElement(
|
package/es/Loading/Loading.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
5
|
import Typography from '@material-ui/core/Typography';
|
|
5
|
-
import CircularProgress from '@material-ui/core/CircularProgress';
|
|
6
6
|
|
|
7
7
|
var useStyles = makeStyles(function (theme) {
|
|
8
8
|
return {
|
|
@@ -14,27 +14,47 @@ var useStyles = makeStyles(function (theme) {
|
|
|
14
14
|
justifyContent: 'center',
|
|
15
15
|
alignItems: 'center'
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
circularProgress: {
|
|
18
|
+
width: '48px',
|
|
19
|
+
height: ' 48px',
|
|
20
|
+
borderStyle: 'solid',
|
|
21
|
+
borderWidth: '5px',
|
|
22
|
+
borderColor: theme.palette.primary.main,
|
|
23
|
+
borderBottomColor: 'transparent',
|
|
24
|
+
borderRadius: '50%',
|
|
25
|
+
display: 'inline-block',
|
|
26
|
+
boxSizing: 'border-box',
|
|
27
|
+
animation: '$rotate 1s linear infinite',
|
|
28
|
+
margin: theme.spacing(2)
|
|
29
|
+
},
|
|
30
|
+
'@keyframes rotate': {
|
|
31
|
+
'0%': {
|
|
32
|
+
transform: 'rotate(0deg)'
|
|
33
|
+
},
|
|
34
|
+
'100%': {
|
|
35
|
+
transform: 'rotate(360deg)'
|
|
22
36
|
}
|
|
37
|
+
},
|
|
38
|
+
warning: {
|
|
39
|
+
borderColor: theme.palette.warning.main,
|
|
40
|
+
borderBottomColor: 'transparent'
|
|
23
41
|
}
|
|
24
42
|
};
|
|
25
43
|
});
|
|
26
44
|
|
|
27
|
-
var Loading = function Loading(
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
45
|
+
var Loading = function Loading(_ref) {
|
|
46
|
+
var _cx;
|
|
47
|
+
|
|
48
|
+
var message = _ref.message,
|
|
49
|
+
_ref$isWarning = _ref.isWarning,
|
|
50
|
+
isWarning = _ref$isWarning === undefined ? false : _ref$isWarning;
|
|
31
51
|
|
|
32
|
-
var classes = useStyles(
|
|
52
|
+
var classes = useStyles();
|
|
33
53
|
|
|
34
54
|
return React.createElement(
|
|
35
55
|
'div',
|
|
36
56
|
{ className: classes.root },
|
|
37
|
-
React.createElement(
|
|
57
|
+
React.createElement('div', { className: cx(classes.circularProgress, (_cx = {}, _cx[classes.warning] = isWarning, _cx)) }),
|
|
38
58
|
React.createElement(
|
|
39
59
|
Typography,
|
|
40
60
|
{ variant: 'subtitle1', noWrap: true, align: 'center' },
|
|
@@ -95,6 +95,13 @@ var ScopeList = function ScopeList(props) {
|
|
|
95
95
|
}, 0);
|
|
96
96
|
}, [isLoading, items, itemsById, disableAccessor]);
|
|
97
97
|
|
|
98
|
+
useEffect(function () {
|
|
99
|
+
var scrollEl = R.path(['children', 0, 'children', 0], ref.current);
|
|
100
|
+
if (scrollEl) {
|
|
101
|
+
setScrollTop(0);
|
|
102
|
+
}
|
|
103
|
+
}, [R.prop('id', R.last(currentItem || []))]);
|
|
104
|
+
|
|
98
105
|
useEffect(function () {
|
|
99
106
|
var current = ref.current;
|
|
100
107
|
var handler = function handler(event) {
|
package/es/theme.js
CHANGED
|
@@ -255,7 +255,7 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
255
255
|
color: '#494444'
|
|
256
256
|
},
|
|
257
257
|
disclaimer: {
|
|
258
|
-
|
|
258
|
+
backgroundColor: outerPalette.highlight1 || innerPalette.highlight1
|
|
259
259
|
},
|
|
260
260
|
subtitle: {
|
|
261
261
|
color: '#494444',
|
|
@@ -101,9 +101,12 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
101
101
|
}
|
|
102
102
|
}),
|
|
103
103
|
disclaimer: _extends({
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
padding: theme.spacing(0.5),
|
|
105
|
+
fontSize: function fontSize(_ref4) {
|
|
106
|
+
var isWidthLess = _ref4.isWidthLess;
|
|
107
|
+
return R.cond([[R.always(isWidthLess(_theme.T4_BREAKPOINTS.xs3)), R.always(12)], [R.always(isWidthLess(_theme.T4_BREAKPOINTS.sm)), R.always(13)]])(14);
|
|
108
|
+
},
|
|
109
|
+
lineHeight: 1.5
|
|
107
110
|
}, R.pathOr({}, ['mixins', 'dataHeader', 'disclaimer'], theme)),
|
|
108
111
|
infoIcon: {
|
|
109
112
|
height: '0.8em',
|
|
@@ -144,19 +147,19 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
144
147
|
};
|
|
145
148
|
});
|
|
146
149
|
|
|
147
|
-
var DataHeader = function DataHeader(
|
|
150
|
+
var DataHeader = function DataHeader(_ref5) {
|
|
148
151
|
var _cx;
|
|
149
152
|
|
|
150
|
-
var children =
|
|
151
|
-
title =
|
|
152
|
-
|
|
153
|
-
subtitle =
|
|
154
|
-
uprs =
|
|
155
|
-
disclaimer =
|
|
156
|
-
sideProps =
|
|
157
|
-
SideIcon =
|
|
158
|
-
|
|
159
|
-
isSticky =
|
|
153
|
+
var children = _ref5.children,
|
|
154
|
+
title = _ref5.title,
|
|
155
|
+
_ref5$subtitle = _ref5.subtitle,
|
|
156
|
+
subtitle = _ref5$subtitle === undefined ? [] : _ref5$subtitle,
|
|
157
|
+
uprs = _ref5.uprs,
|
|
158
|
+
disclaimer = _ref5.disclaimer,
|
|
159
|
+
sideProps = _ref5.sideProps,
|
|
160
|
+
SideIcon = _ref5.SideIcon,
|
|
161
|
+
_ref5$isSticky = _ref5.isSticky,
|
|
162
|
+
isSticky = _ref5$isSticky === undefined ? false : _ref5$isSticky;
|
|
160
163
|
|
|
161
164
|
var target = _react2.default.useRef(null);
|
|
162
165
|
|
|
@@ -191,27 +194,7 @@ var DataHeader = function DataHeader(_ref4) {
|
|
|
191
194
|
{ className: classes.sideIconContainer },
|
|
192
195
|
_react2.default.createElement(SideIcon, { sideProps: sideProps })
|
|
193
196
|
),
|
|
194
|
-
_react2.default.createElement(_Flags2.default, { classes: classes, content: R.propOr([], 'flags', title) })
|
|
195
|
-
disclaimer && _react2.default.createElement(
|
|
196
|
-
_.Tooltip,
|
|
197
|
-
{
|
|
198
|
-
className: (0, _classnames2.default)(classes.title, classes.disclaimer),
|
|
199
|
-
title: disclaimer,
|
|
200
|
-
tabIndex: 0,
|
|
201
|
-
'data-testid': 'data-header-disclaimer',
|
|
202
|
-
variant: 'warning',
|
|
203
|
-
'aria-hidden': false,
|
|
204
|
-
placement: 'bottom',
|
|
205
|
-
PopperProps: {
|
|
206
|
-
modifiers: {
|
|
207
|
-
flip: {
|
|
208
|
-
behavior: ['bottom', 'top', 'left', 'right']
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
_react2.default.createElement(_.Warning, { pathBackgroundColor: warningColor, pathColor: warningTextColor })
|
|
214
|
-
)
|
|
197
|
+
_react2.default.createElement(_Flags2.default, { classes: classes, content: R.propOr([], 'flags', title) })
|
|
215
198
|
),
|
|
216
199
|
isWidthUp(_theme.T4_BREAKPOINTS.xs3) && subtitle && R.not(R.isEmpty(subtitle)) && _react2.default.createElement(
|
|
217
200
|
'div',
|
|
@@ -240,6 +223,11 @@ var DataHeader = function DataHeader(_ref4) {
|
|
|
240
223
|
{ className: classes.subtitle },
|
|
241
224
|
_react2.default.createElement(_Title2.default, { header: uprs.header }),
|
|
242
225
|
uprs.label
|
|
226
|
+
),
|
|
227
|
+
isWidthUp(_theme.T4_BREAKPOINTS.xs3) && disclaimer && _react2.default.createElement(
|
|
228
|
+
_Typography2.default,
|
|
229
|
+
{ 'data-testid': 'data-header-disclaimer', className: classes.disclaimer },
|
|
230
|
+
disclaimer
|
|
243
231
|
)
|
|
244
232
|
),
|
|
245
233
|
_react2.default.createElement(
|
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 _classnames = require('classnames');
|
|
10
|
+
|
|
11
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
|
12
|
+
|
|
9
13
|
var _propTypes = require('prop-types');
|
|
10
14
|
|
|
11
15
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
@@ -16,10 +20,6 @@ var _Typography = require('@material-ui/core/Typography');
|
|
|
16
20
|
|
|
17
21
|
var _Typography2 = _interopRequireDefault(_Typography);
|
|
18
22
|
|
|
19
|
-
var _CircularProgress = require('@material-ui/core/CircularProgress');
|
|
20
|
-
|
|
21
|
-
var _CircularProgress2 = _interopRequireDefault(_CircularProgress);
|
|
22
|
-
|
|
23
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
24
|
|
|
25
25
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
@@ -32,27 +32,47 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
32
32
|
justifyContent: 'center',
|
|
33
33
|
alignItems: 'center'
|
|
34
34
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
circularProgress: {
|
|
36
|
+
width: '48px',
|
|
37
|
+
height: ' 48px',
|
|
38
|
+
borderStyle: 'solid',
|
|
39
|
+
borderWidth: '5px',
|
|
40
|
+
borderColor: theme.palette.primary.main,
|
|
41
|
+
borderBottomColor: 'transparent',
|
|
42
|
+
borderRadius: '50%',
|
|
43
|
+
display: 'inline-block',
|
|
44
|
+
boxSizing: 'border-box',
|
|
45
|
+
animation: '$rotate 1s linear infinite',
|
|
46
|
+
margin: theme.spacing(2)
|
|
47
|
+
},
|
|
48
|
+
'@keyframes rotate': {
|
|
49
|
+
'0%': {
|
|
50
|
+
transform: 'rotate(0deg)'
|
|
51
|
+
},
|
|
52
|
+
'100%': {
|
|
53
|
+
transform: 'rotate(360deg)'
|
|
40
54
|
}
|
|
55
|
+
},
|
|
56
|
+
warning: {
|
|
57
|
+
borderColor: theme.palette.warning.main,
|
|
58
|
+
borderBottomColor: 'transparent'
|
|
41
59
|
}
|
|
42
60
|
};
|
|
43
61
|
});
|
|
44
62
|
|
|
45
|
-
var Loading = function Loading(
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
|
|
63
|
+
var Loading = function Loading(_ref) {
|
|
64
|
+
var _cx;
|
|
65
|
+
|
|
66
|
+
var message = _ref.message,
|
|
67
|
+
_ref$isWarning = _ref.isWarning,
|
|
68
|
+
isWarning = _ref$isWarning === undefined ? false : _ref$isWarning;
|
|
49
69
|
|
|
50
|
-
var classes = useStyles(
|
|
70
|
+
var classes = useStyles();
|
|
51
71
|
|
|
52
72
|
return _react2.default.createElement(
|
|
53
73
|
'div',
|
|
54
74
|
{ className: classes.root },
|
|
55
|
-
_react2.default.createElement(
|
|
75
|
+
_react2.default.createElement('div', { className: (0, _classnames2.default)(classes.circularProgress, (_cx = {}, _cx[classes.warning] = isWarning, _cx)) }),
|
|
56
76
|
_react2.default.createElement(
|
|
57
77
|
_Typography2.default,
|
|
58
78
|
{ variant: 'subtitle1', noWrap: true, align: 'center' },
|
|
@@ -148,6 +148,13 @@ var ScopeList = function ScopeList(props) {
|
|
|
148
148
|
}, 0);
|
|
149
149
|
}, [isLoading, items, itemsById, disableAccessor]);
|
|
150
150
|
|
|
151
|
+
(0, _react.useEffect)(function () {
|
|
152
|
+
var scrollEl = R.path(['children', 0, 'children', 0], ref.current);
|
|
153
|
+
if (scrollEl) {
|
|
154
|
+
setScrollTop(0);
|
|
155
|
+
}
|
|
156
|
+
}, [R.prop('id', R.last(currentItem || []))]);
|
|
157
|
+
|
|
151
158
|
(0, _react.useEffect)(function () {
|
|
152
159
|
var current = ref.current;
|
|
153
160
|
var handler = function handler(event) {
|
package/lib/theme.js
CHANGED
|
@@ -258,7 +258,7 @@ var sisccTheme = exports.sisccTheme = function sisccTheme(_ref) {
|
|
|
258
258
|
color: '#494444'
|
|
259
259
|
},
|
|
260
260
|
disclaimer: {
|
|
261
|
-
|
|
261
|
+
backgroundColor: outerPalette.highlight1 || innerPalette.highlight1
|
|
262
262
|
},
|
|
263
263
|
subtitle: {
|
|
264
264
|
color: '#494444',
|