sag_components 1.0.98 → 1.0.99

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.
@@ -13,13 +13,17 @@ var _OneColumnContainer = require("./OneColumnContainer.style");
13
13
  var _InfoIcon = require("./InfoIcon");
14
14
  var _core = require("@dnd-kit/core");
15
15
  var _classnames = _interopRequireDefault(require("classnames"));
16
- var _excluded = ["children", "display", "gridTemplateColumns", "nodeRef", "itemClass", "divStyle", "overStyle", "draggingStyle", "droppedStyle", "refId", "width", "height", "infoText"];
16
+ var _reactLoadingSkeleton = _interopRequireWildcard(require("react-loading-skeleton"));
17
+ require("react-loading-skeleton/dist/skeleton.css");
18
+ var _excluded = ["children", "display", "isLoading", "gridTemplateColumns", "nodeRef", "itemClass", "divStyle", "overStyle", "draggingStyle", "droppedStyle", "refId", "width", "height", "infoText"];
17
19
  /**
18
20
  * Primary UI component for user interaction
19
21
  */
20
22
  var OneColumnContainer = function OneColumnContainer(_ref) {
21
23
  var children = _ref.children,
22
- display = _ref.display,
24
+ _ref$display = _ref.display,
25
+ display = _ref$display === void 0 ? 'flex' : _ref$display,
26
+ isLoading = _ref.isLoading,
23
27
  gridTemplateColumns = _ref.gridTemplateColumns,
24
28
  nodeRef = _ref.nodeRef,
25
29
  itemClass = _ref.itemClass,
@@ -44,15 +48,42 @@ var OneColumnContainer = function OneColumnContainer(_ref) {
44
48
  width: width,
45
49
  height: height
46
50
  }, /*#__PURE__*/_react.default.createElement("div", {
51
+ id: "mainDiv",
47
52
  className: props.className,
48
53
  style: {
54
+ alignItems: "flex-start",
55
+ justifyContent: "center",
49
56
  width: width,
50
57
  height: height,
51
58
  display: display,
52
59
  gridTemplateColumns: gridTemplateColumns
53
60
  },
54
61
  ref: nodeRef
55
- }, children, /*#__PURE__*/_react.default.createElement(_OneColumnContainer.InfoTextContainer, {
62
+ }, children, isLoading && /*#__PURE__*/_react.default.createElement("div", {
63
+ id: "loadingDiv",
64
+ style: {
65
+ marginTop: '20px',
66
+ display: 'flex',
67
+ flexDirection: 'column',
68
+ justifyContent: 'space-evenly',
69
+ alignItems: 'center',
70
+ width: "76%",
71
+ height: "65%"
72
+ }
73
+ }, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.SkeletonTheme, {
74
+ baseColor: "#EAEAEA"
75
+ }, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
76
+ enableAnimation: true,
77
+ width: width.replace('px', '') * 0.76,
78
+ height: 45,
79
+ containerClassName: "avatar-skeleton"
80
+ }), /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
81
+ enableAnimation: true,
82
+ count: 4,
83
+ width: width.replace('px', '') * 0.76,
84
+ height: 10,
85
+ containerClassName: "avatar-skeleton"
86
+ }))), !isLoading && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_OneColumnContainer.InfoTextContainer, {
56
87
  clicked: clicked,
57
88
  width: width,
58
89
  height: height
@@ -60,7 +91,7 @@ var OneColumnContainer = function OneColumnContainer(_ref) {
60
91
  onClick: onInfoClick
61
92
  }, /*#__PURE__*/_react.default.createElement(_InfoIcon.InfoIcon, {
62
93
  clicked: clicked
63
- }))));
94
+ })))));
64
95
  };
65
96
  exports.OneColumnContainer = OneColumnContainer;
66
97
  OneColumnContainer.defaultProps = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.98",
3
+ "version": "1.0.99",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -55,6 +55,7 @@
55
55
  "classnames": "^2.3.2",
56
56
  "hoopy": "^0.1.4",
57
57
  "react-css-modules": "^4.7.11",
58
+ "react-loading-skeleton": "^3.3.1",
58
59
  "react-scripts": "5.0.1",
59
60
  "recharts": "^2.6.2"
60
61
  },