@sis-cc/dotstatsuite-visions 8.0.4 → 8.0.6
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
2
2
|
|
|
3
|
-
import React, { Fragment, useState } from 'react';
|
|
3
|
+
import React, { Fragment, useState, useEffect } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as R from 'ramda';
|
|
@@ -61,12 +61,16 @@ var TableLayout = function TableLayout(_ref) {
|
|
|
61
61
|
return isHidden;
|
|
62
62
|
}))(layout);
|
|
63
63
|
|
|
64
|
-
var _useState = useState(
|
|
64
|
+
var _useState = useState([]),
|
|
65
65
|
currentLayout = _useState[0],
|
|
66
66
|
setCurrentLayout = _useState[1];
|
|
67
67
|
|
|
68
68
|
var boxLabel = (_boxLabel = {}, _boxLabel[BOX.header] = labels.column || BOX.header, _boxLabel[BOX.sections] = labels.section || BOX.sections, _boxLabel[BOX.rows] = labels.row || BOX.rows, _boxLabel);
|
|
69
69
|
|
|
70
|
+
useEffect(function () {
|
|
71
|
+
return setCurrentLayout(rejectHiddenElement(layout));
|
|
72
|
+
}, [layout]);
|
|
73
|
+
|
|
70
74
|
var onChangeLayout = function onChangeLayout(props) {
|
|
71
75
|
return setCurrentLayout(changeLayout(_extends({}, props)));
|
|
72
76
|
};
|
|
@@ -117,12 +117,16 @@ var TableLayout = function TableLayout(_ref) {
|
|
|
117
117
|
return isHidden;
|
|
118
118
|
}))(layout);
|
|
119
119
|
|
|
120
|
-
var _useState = (0, _react.useState)(
|
|
120
|
+
var _useState = (0, _react.useState)([]),
|
|
121
121
|
currentLayout = _useState[0],
|
|
122
122
|
setCurrentLayout = _useState[1];
|
|
123
123
|
|
|
124
124
|
var boxLabel = (_boxLabel = {}, _boxLabel[_constants.BOX.header] = labels.column || _constants.BOX.header, _boxLabel[_constants.BOX.sections] = labels.section || _constants.BOX.sections, _boxLabel[_constants.BOX.rows] = labels.row || _constants.BOX.rows, _boxLabel);
|
|
125
125
|
|
|
126
|
+
(0, _react.useEffect)(function () {
|
|
127
|
+
return setCurrentLayout((0, _lib.rejectHiddenElement)(layout));
|
|
128
|
+
}, [layout]);
|
|
129
|
+
|
|
126
130
|
var onChangeLayout = function onChangeLayout(props) {
|
|
127
131
|
return setCurrentLayout((0, _lib.changeLayout)(_extends({}, props)));
|
|
128
132
|
};
|