contentoh-components-library 21.4.11 → 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.
@@ -54,6 +54,12 @@ var GridItem = function GridItem(_ref) {
54
54
 
55
55
  case "images":
56
56
  return "IMG";
57
+
58
+ case "general":
59
+ return "S.G.";
60
+
61
+ default:
62
+ return srv;
57
63
  }
58
64
  };
59
65
 
@@ -88,19 +94,22 @@ var GridItem = function GridItem(_ref) {
88
94
  })
89
95
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
90
96
  className: "status-slider",
91
- 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;
92
101
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
93
102
  className: "status-element",
94
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
103
+ children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
95
104
  className: "srv-name",
96
105
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
97
- children: getSrvName(item.title)
106
+ children: getSrvName(title)
98
107
  })
99
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Status.Status, {
100
- statusType: item.value
101
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PercentTag.PercentTag, {
102
- percent: item.percent,
103
- 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
104
113
  })]
105
114
  });
106
115
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.4.11",
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,6 +28,10 @@ export const GridItem = ({
28
28
  return "D.C.";
29
29
  case "images":
30
30
  return "IMG";
31
+ case "general":
32
+ return "S.G.";
33
+ default:
34
+ return srv;
31
35
  }
32
36
  };
33
37
 
@@ -49,13 +53,17 @@ export const GridItem = ({
49
53
  )}
50
54
  </div>
51
55
  <div className="status-slider">
52
- {status?.map((item) => (
56
+ {status?.map(({ title, value, percent }) => (
53
57
  <div className="status-element">
54
- <div className="srv-name">
55
- <p>{getSrvName(item.title)}</p>
56
- </div>
57
- <Status statusType={item.value} />
58
- <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} />
66
+ )}
59
67
  </div>
60
68
  ))}
61
69
  </div>