contentoh-components-library 21.4.12 → 21.4.13

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.
@@ -55,8 +55,11 @@ var GridItem = function GridItem(_ref) {
55
55
  case "images":
56
56
  return "IMG";
57
57
 
58
- default:
58
+ case "general":
59
59
  return "S.G.";
60
+
61
+ default:
62
+ return srv;
60
63
  }
61
64
  };
62
65
 
@@ -91,19 +94,22 @@ var GridItem = function GridItem(_ref) {
91
94
  })
92
95
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
93
96
  className: "status-slider",
94
- children: status === null || status === void 0 ? void 0 : status.map(function (item) {
97
+ children: status === null || status === void 0 ? void 0 : status.map(function (_ref2) {
98
+ var title = _ref2.title,
99
+ value = _ref2.value,
100
+ percent = _ref2.percent;
95
101
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
96
102
  className: "status-element",
97
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
103
+ children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
98
104
  className: "srv-name",
99
105
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
100
- children: getSrvName(item.title)
106
+ children: getSrvName(title)
101
107
  })
102
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Status.Status, {
103
- statusType: item.value
104
- }), (item === null || item === void 0 ? void 0 : item.percent) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_PercentTag.PercentTag, {
105
- percent: item.percent,
106
- progressBarType: item.value
108
+ }), value && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Status.Status, {
109
+ statusType: value
110
+ }), percent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_PercentTag.PercentTag, {
111
+ percent: percent,
112
+ progressBarType: value
107
113
  })]
108
114
  });
109
115
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.4.12",
3
+ "version": "21.4.13",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -28,8 +28,10 @@ export const GridItem = ({
28
28
  return "D.C.";
29
29
  case "images":
30
30
  return "IMG";
31
- default:
31
+ case "general":
32
32
  return "S.G.";
33
+ default:
34
+ return srv;
33
35
  }
34
36
  };
35
37
 
@@ -51,14 +53,16 @@ export const GridItem = ({
51
53
  )}
52
54
  </div>
53
55
  <div className="status-slider">
54
- {status?.map((item) => (
56
+ {status?.map(({ title, value, percent }) => (
55
57
  <div className="status-element">
56
- <div className="srv-name">
57
- <p>{getSrvName(item.title)}</p>
58
- </div>
59
- <Status statusType={item.value} />
60
- {item?.percent && (
61
- <PercentTag percent={item.percent} progressBarType={item.value} />
58
+ {title && (
59
+ <div className="srv-name">
60
+ <p>{getSrvName(title)}</p>
61
+ </div>
62
+ )}
63
+ {value && <Status statusType={value} />}
64
+ {percent && (
65
+ <PercentTag percent={percent} progressBarType={value} />
62
66
  )}
63
67
  </div>
64
68
  ))}