@sis-cc/dotstatsuite-components 13.1.0 → 13.2.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/lib/viewer/src/index.js
CHANGED
|
@@ -91,15 +91,17 @@ var useStyles = (0, _styles.makeStyles)(function () {
|
|
|
91
91
|
|
|
92
92
|
var ViewContent = function ViewContent(_ref3) {
|
|
93
93
|
var loading = _ref3.loading,
|
|
94
|
+
_ref3$loadingProps = _ref3.loadingProps,
|
|
95
|
+
loadingProps = _ref3$loadingProps === undefined ? {} : _ref3$loadingProps,
|
|
94
96
|
_ref3$noData = _ref3.noData,
|
|
95
97
|
noData = _ref3$noData === undefined ? 'No Data' : _ref3$noData,
|
|
96
98
|
type = _ref3.type,
|
|
97
99
|
width = _ref3.width,
|
|
98
100
|
errorMessage = _ref3.errorMessage,
|
|
99
|
-
rest = (0, _objectWithoutProperties3.default)(_ref3, ['loading', 'noData', 'type', 'width', 'errorMessage']);
|
|
101
|
+
rest = (0, _objectWithoutProperties3.default)(_ref3, ['loading', 'loadingProps', 'noData', 'type', 'width', 'errorMessage']);
|
|
100
102
|
|
|
101
|
-
if (loading) return _react2.default.createElement(_dotstatsuiteVisions.Loading, { message: loading });
|
|
102
|
-
if (!width) return _react2.default.createElement(_dotstatsuiteVisions.Loading, { message: loading });
|
|
103
|
+
if (loading) return _react2.default.createElement(_dotstatsuiteVisions.Loading, (0, _extends3.default)({ message: loading }, loadingProps));
|
|
104
|
+
if (!width) return _react2.default.createElement(_dotstatsuiteVisions.Loading, (0, _extends3.default)({ message: loading }, loadingProps));
|
|
103
105
|
if (errorMessage) return _react2.default.createElement(_dotstatsuiteVisions.NoData, { message: errorMessage });
|
|
104
106
|
|
|
105
107
|
if (type === 'table') {
|
package/package.json
CHANGED
package/src/viewer/src/index.js
CHANGED
|
@@ -33,11 +33,11 @@ const useStyles = makeStyles(() => ({
|
|
|
33
33
|
}
|
|
34
34
|
}));
|
|
35
35
|
|
|
36
|
-
const ViewContent = ({ loading, noData = 'No Data', type, width, errorMessage, ...rest }) => {
|
|
37
|
-
if (loading) return <Loading message={loading} />;
|
|
38
|
-
if (!width) return <Loading message={loading} />;
|
|
36
|
+
const ViewContent = ({ loading, loadingProps={}, noData = 'No Data', type, width, errorMessage, ...rest }) => {
|
|
37
|
+
if (loading) return <Loading message={loading} {...loadingProps} />;
|
|
38
|
+
if (!width) return <Loading message={loading} {...loadingProps} />;
|
|
39
39
|
if (errorMessage) return <NoData message={errorMessage} />;
|
|
40
|
-
|
|
40
|
+
|
|
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);
|
|
@@ -60,8 +60,8 @@ const ViewContent = ({ loading, noData = 'No Data', type, width, errorMessage, .
|
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
const Viewer = ({ getResponsiveSize, setFooterOffset, setHeaderOffset, size, type, ...rest }) => {
|
|
63
|
-
const classes = useStyles({
|
|
64
|
-
fixedWidth: rest.fixedWidth,
|
|
63
|
+
const classes = useStyles({
|
|
64
|
+
fixedWidth: rest.fixedWidth,
|
|
65
65
|
fixedHeight: rest.fixedHeight
|
|
66
66
|
});
|
|
67
67
|
useEffect(() => {
|
|
@@ -74,7 +74,7 @@ const Viewer = ({ getResponsiveSize, setFooterOffset, setHeaderOffset, size, typ
|
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
return (
|
|
77
|
-
<div
|
|
77
|
+
<div
|
|
78
78
|
className={cx(classes.container, {
|
|
79
79
|
[classes.tableContainer]: type === 'table',
|
|
80
80
|
[classes.chartContainer]: type !== 'table'
|