@sis-cc/dotstatsuite-visions 12.28.0 → 12.29.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.
@@ -14,9 +14,11 @@ import IconButton from '@mui/material/IconButton';
14
14
  import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
15
15
  import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
16
16
  import CircularProgress from '@mui/material/CircularProgress';
17
+ import InfoIcon from '@mui/icons-material/Info';
17
18
  import Grid from '@mui/material/Grid';
18
19
  import Collapse, { VARIANT_BOLD } from './Collapse';
19
20
  import cx from 'classnames';
21
+ import NoData from '../NoData/NoData';
20
22
 
21
23
  var useStyles = makeStyles(function (theme) {
22
24
  return {
@@ -126,6 +128,10 @@ var CollapsibleTree = function CollapsibleTree(_ref) {
126
128
  )
127
129
  )
128
130
  ),
131
+ R.isEmpty(data) && React.createElement(NoData, {
132
+ message: R.prop('noData', labels) || 'no data',
133
+ icon: React.createElement(InfoIcon, { color: 'primary', fontSize: 'large' })
134
+ }),
129
135
  R.map(function (_ref3) {
130
136
  var id = _ref3.id,
131
137
  label = _ref3.label,
@@ -210,7 +216,8 @@ CollapsibleTree.propTypes = process.env.NODE_ENV !== "production" ? {
210
216
  labels: PropTypes.shape({
211
217
  collapseAll: PropTypes.string,
212
218
  expandAll: PropTypes.string,
213
- noValue: PropTypes.string
219
+ noValue: PropTypes.string,
220
+ noData: PropTypes.string
214
221
  }),
215
222
  testId: PropTypes.string,
216
223
  valueHandler: PropTypes.func,
@@ -52,6 +52,10 @@ var _CircularProgress = require('@mui/material/CircularProgress');
52
52
 
53
53
  var _CircularProgress2 = _interopRequireDefault(_CircularProgress);
54
54
 
55
+ var _Info = require('@mui/icons-material/Info');
56
+
57
+ var _Info2 = _interopRequireDefault(_Info);
58
+
55
59
  var _Grid = require('@mui/material/Grid');
56
60
 
57
61
  var _Grid2 = _interopRequireDefault(_Grid);
@@ -64,6 +68,10 @@ var _classnames = require('classnames');
64
68
 
65
69
  var _classnames2 = _interopRequireDefault(_classnames);
66
70
 
71
+ var _NoData = require('../NoData/NoData');
72
+
73
+ var _NoData2 = _interopRequireDefault(_NoData);
74
+
67
75
  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; } }
68
76
 
69
77
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -178,6 +186,10 @@ var CollapsibleTree = function CollapsibleTree(_ref) {
178
186
  )
179
187
  )
180
188
  ),
189
+ R.isEmpty(data) && _react2.default.createElement(_NoData2.default, {
190
+ message: R.prop('noData', labels) || 'no data',
191
+ icon: _react2.default.createElement(_Info2.default, { color: 'primary', fontSize: 'large' })
192
+ }),
181
193
  R.map(function (_ref3) {
182
194
  var id = _ref3.id,
183
195
  label = _ref3.label,
@@ -262,7 +274,8 @@ CollapsibleTree.propTypes = process.env.NODE_ENV !== "production" ? {
262
274
  labels: _propTypes2.default.shape({
263
275
  collapseAll: _propTypes2.default.string,
264
276
  expandAll: _propTypes2.default.string,
265
- noValue: _propTypes2.default.string
277
+ noValue: _propTypes2.default.string,
278
+ noData: _propTypes2.default.string
266
279
  }),
267
280
  testId: _propTypes2.default.string,
268
281
  valueHandler: _propTypes2.default.func,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sis-cc/dotstatsuite-visions",
3
- "version": "12.28.0",
3
+ "version": "12.29.0",
4
4
  "description": "Library of visual components",
5
5
  "author": "OECD",
6
6
  "homepage": "https://visions-qa.siscc.org/#o",