@sis-cc/dotstatsuite-components 15.0.7 → 15.0.8

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.
@@ -93,12 +93,10 @@ var ViewContent = function ViewContent(_ref3) {
93
93
  var loading = _ref3.loading,
94
94
  _ref3$loadingProps = _ref3.loadingProps,
95
95
  loadingProps = _ref3$loadingProps === undefined ? {} : _ref3$loadingProps,
96
- _ref3$noData = _ref3.noData,
97
- noData = _ref3$noData === undefined ? 'No Data' : _ref3$noData,
98
96
  type = _ref3.type,
99
97
  width = _ref3.width,
100
98
  errorMessage = _ref3.errorMessage,
101
- rest = (0, _objectWithoutProperties3.default)(_ref3, ['loading', 'loadingProps', 'noData', 'type', 'width', 'errorMessage']);
99
+ rest = (0, _objectWithoutProperties3.default)(_ref3, ['loading', 'loadingProps', 'type', 'width', 'errorMessage']);
102
100
 
103
101
  if (loading) return _react2.default.createElement(_dotstatsuiteVisions.Loading, (0, _extends3.default)({ message: loading }, loadingProps));
104
102
  if (!width) return _react2.default.createElement(_dotstatsuiteVisions.Loading, (0, _extends3.default)({ message: loading }, loadingProps));
@@ -107,7 +105,7 @@ var ViewContent = function ViewContent(_ref3) {
107
105
  if (type === 'table') {
108
106
  var tableProps = R.propOr({}, 'tableProps', rest);
109
107
  var hasNoObs = R.pipe(R.prop('cells'), R.anyPass([R.isNil, R.isEmpty]))(tableProps);
110
- if (hasNoObs) return _react2.default.createElement(_dotstatsuiteVisions.NoData, { message: noData });
108
+ if (hasNoObs) return _react2.default.createElement(_dotstatsuiteVisions.Loading, null);
111
109
 
112
110
  return _react2.default.createElement(_dotstatsuiteVisions.TableHtml5, (0, _extends3.default)({ isRtl: R.prop('isRtl', rest) }, tableProps));
113
111
  }
@@ -116,7 +114,6 @@ var ViewContent = function ViewContent(_ref3) {
116
114
  fixedHeight: R.prop('fixedHeight', rest),
117
115
  getAxisOptions: R.prop('getAxisOptions', rest),
118
116
  heightOffsets: R.prop('heightOffsets', rest),
119
- noData: noData,
120
117
  options: R.prop('chartOptions', rest),
121
118
  type: type,
122
119
  width: width
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sis-cc/dotstatsuite-components",
3
3
  "description": "Set components based on React.",
4
- "version": "15.0.7",
4
+ "version": "15.0.8",
5
5
  "main": "lib/index.js",
6
6
  "author": "OECD",
7
7
  "license": "MIT",
@@ -33,7 +33,7 @@ const useStyles = makeStyles(() => ({
33
33
  }
34
34
  }));
35
35
 
36
- const ViewContent = ({ loading, loadingProps={}, noData = 'No Data', type, width, errorMessage, ...rest }) => {
36
+ const ViewContent = ({ loading, loadingProps={}, type, width, errorMessage, ...rest }) => {
37
37
  if (loading) return <Loading message={loading} {...loadingProps} />;
38
38
  if (!width) return <Loading message={loading} {...loadingProps} />;
39
39
  if (errorMessage) return <NoData message={errorMessage} />;
@@ -41,7 +41,7 @@ const ViewContent = ({ loading, loadingProps={}, noData = 'No Data', type, width
41
41
  if (type === 'table') {
42
42
  const tableProps = R.propOr({}, 'tableProps', rest);
43
43
  const hasNoObs = R.pipe(R.prop('cells'), R.anyPass([R.isNil, R.isEmpty]))(tableProps);
44
- if (hasNoObs) return <NoData message={noData} />;
44
+ if (hasNoObs) return <Loading />;
45
45
 
46
46
  return <TableHtml5 isRtl={R.prop('isRtl', rest)} {...tableProps} />;
47
47
  }
@@ -51,7 +51,6 @@ const ViewContent = ({ loading, loadingProps={}, noData = 'No Data', type, width
51
51
  fixedHeight={R.prop('fixedHeight', rest)}
52
52
  getAxisOptions={R.prop('getAxisOptions', rest)}
53
53
  heightOffsets={R.prop('heightOffsets', rest)}
54
- noData={noData}
55
54
  options={R.prop('chartOptions', rest)}
56
55
  type={type}
57
56
  width={width}