sag_components 1.0.142 → 1.0.143

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.
@@ -20,7 +20,6 @@ var _excluded = ["children", "display", "isLoading", "gridTemplateColumns", "nod
20
20
  * Primary UI component for user interaction
21
21
  */
22
22
  var OneColumnContainer = function OneColumnContainer(_ref) {
23
- var _nodeRef$current$offs, _nodeRef$current, _nodeRef$current$offs2, _nodeRef$current2;
24
23
  var children = _ref.children,
25
24
  _ref$display = _ref.display,
26
25
  display = _ref$display === void 0 ? "flex" : _ref$display,
@@ -44,6 +43,15 @@ var OneColumnContainer = function OneColumnContainer(_ref) {
44
43
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
45
44
  hover = _useState2[0],
46
45
  setHover = _useState2[1];
46
+ var _useState3 = (0, _react.useState)(null),
47
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
48
+ offsetWidth = _useState4[0],
49
+ setOffsetWidth = _useState4[1];
50
+ var anotherRef = (0, _react.useRef)(null);
51
+ (0, _react.useEffect)(function () {
52
+ setOffsetWidth(anotherRef.current.offsetWidth);
53
+ console.log(anotherRef.current.offsetWidth);
54
+ }, [anotherRef]);
47
55
  return /*#__PURE__*/_react.default.createElement(_OneColumnContainer.StyledContainer, {
48
56
  className: (0, _classnames.default)(itemClass, overStyle, draggingStyle, children && droppedStyle, divStyle),
49
57
  width: width,
@@ -59,20 +67,20 @@ var OneColumnContainer = function OneColumnContainer(_ref) {
59
67
  display: display,
60
68
  gridTemplateColumns: gridTemplateColumns
61
69
  },
62
- ref: nodeRef
63
- }, isLoading && /*#__PURE__*/_react.default.createElement(_OneColumnContainer.LoadingDiv, {
70
+ ref: anotherRef
71
+ }, console.log(anotherRef), isLoading && /*#__PURE__*/_react.default.createElement(_OneColumnContainer.LoadingDiv, {
64
72
  id: "loadingDiv"
65
73
  }, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.SkeletonTheme, {
66
74
  baseColor: "#EAEAEA"
67
75
  }, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
68
76
  enableAnimation: true,
69
- width: ((_nodeRef$current$offs = nodeRef === null || nodeRef === void 0 ? void 0 : (_nodeRef$current = nodeRef.current) === null || _nodeRef$current === void 0 ? void 0 : _nodeRef$current.offsetWidth) !== null && _nodeRef$current$offs !== void 0 ? _nodeRef$current$offs : 300) * 0.76,
77
+ width: (offsetWidth !== null && offsetWidth !== void 0 ? offsetWidth : 200) * 0.76,
70
78
  height: 45,
71
79
  containerClassName: "avatar-skeleton"
72
80
  }), /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
73
81
  enableAnimation: true,
74
82
  count: 4,
75
- width: ((_nodeRef$current$offs2 = nodeRef === null || nodeRef === void 0 ? void 0 : (_nodeRef$current2 = nodeRef.current) === null || _nodeRef$current2 === void 0 ? void 0 : _nodeRef$current2.offsetWidth) !== null && _nodeRef$current$offs2 !== void 0 ? _nodeRef$current$offs2 : 300) * 0.76,
83
+ width: (offsetWidth !== null && offsetWidth !== void 0 ? offsetWidth : 200) * 0.76,
76
84
  height: 10,
77
85
  containerClassName: "avatar-skeleton"
78
86
  }))), !isLoading && !hover && children, !disableInfo && !isLoading && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, hover && /*#__PURE__*/_react.default.createElement(_OneColumnContainer.InfoTextContainer, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.142",
3
+ "version": "1.0.143",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {