contentoh-components-library 21.4.12 → 21.4.14
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
|
-
|
|
58
|
+
case "general":
|
|
59
59
|
return "S.G.";
|
|
60
|
+
|
|
61
|
+
default:
|
|
62
|
+
return srv;
|
|
60
63
|
}
|
|
61
64
|
};
|
|
62
65
|
|
|
@@ -70,8 +73,8 @@ var GridItem = function GridItem(_ref) {
|
|
|
70
73
|
return e.stopPropagation();
|
|
71
74
|
},
|
|
72
75
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckBox.CheckBox, {
|
|
73
|
-
id: id,
|
|
74
|
-
name: id,
|
|
76
|
+
id: "chk-" + id,
|
|
77
|
+
name: "chk-" + id,
|
|
75
78
|
className: "chk-absolute",
|
|
76
79
|
onChange: function onChange(e) {
|
|
77
80
|
return chkOnChange && chkOnChange(e, product);
|
|
@@ -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 (
|
|
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(
|
|
106
|
+
children: getSrvName(title)
|
|
101
107
|
})
|
|
102
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Status.Status, {
|
|
103
|
-
statusType:
|
|
104
|
-
}),
|
|
105
|
-
percent:
|
|
106
|
-
progressBarType:
|
|
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
|
})
|
|
@@ -23,7 +23,7 @@ var RowItem = function RowItem(_ref) {
|
|
|
23
23
|
children: productsArray.map(function (_ref2, i) {
|
|
24
24
|
var cols = _ref2.cols,
|
|
25
25
|
product = _ref2.product,
|
|
26
|
-
|
|
26
|
+
id = _ref2.id;
|
|
27
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
28
28
|
className: "row-container",
|
|
29
29
|
onClick: function onClick(e) {
|
|
@@ -35,8 +35,8 @@ var RowItem = function RowItem(_ref) {
|
|
|
35
35
|
e.stopPropagation();
|
|
36
36
|
},
|
|
37
37
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckBox.CheckBox, {
|
|
38
|
-
id:
|
|
39
|
-
name:
|
|
38
|
+
id: "chk-" + id,
|
|
39
|
+
name: "chk-" + id,
|
|
40
40
|
className: "chk-item",
|
|
41
41
|
onChange: function onChange(e) {
|
|
42
42
|
return chkOnChange && chkOnChange(e, product);
|
|
@@ -48,9 +48,9 @@ var RowItem = function RowItem(_ref) {
|
|
|
48
48
|
element: col.name,
|
|
49
49
|
flex: col.flex,
|
|
50
50
|
minWidth: col.minWidth
|
|
51
|
-
},
|
|
51
|
+
}, id + "-" + i);
|
|
52
52
|
})]
|
|
53
|
-
},
|
|
53
|
+
}, id);
|
|
54
54
|
})
|
|
55
55
|
});
|
|
56
56
|
};
|
package/package.json
CHANGED
|
@@ -28,8 +28,10 @@ export const GridItem = ({
|
|
|
28
28
|
return "D.C.";
|
|
29
29
|
case "images":
|
|
30
30
|
return "IMG";
|
|
31
|
-
|
|
31
|
+
case "general":
|
|
32
32
|
return "S.G.";
|
|
33
|
+
default:
|
|
34
|
+
return srv;
|
|
33
35
|
}
|
|
34
36
|
};
|
|
35
37
|
|
|
@@ -37,8 +39,8 @@ export const GridItem = ({
|
|
|
37
39
|
<Container onClick={(e) => onGridClick && onGridClick(e, product, index)}>
|
|
38
40
|
<div className="chk-container" onClick={(e) => e.stopPropagation()}>
|
|
39
41
|
<CheckBox
|
|
40
|
-
id={id}
|
|
41
|
-
name={id}
|
|
42
|
+
id={"chk-" + id}
|
|
43
|
+
name={"chk-" + id}
|
|
42
44
|
className="chk-absolute"
|
|
43
45
|
onChange={(e) => chkOnChange && chkOnChange(e, product)}
|
|
44
46
|
defaultChecked={chkChecked && chkChecked(product)}
|
|
@@ -51,14 +53,16 @@ export const GridItem = ({
|
|
|
51
53
|
)}
|
|
52
54
|
</div>
|
|
53
55
|
<div className="status-slider">
|
|
54
|
-
{status?.map((
|
|
56
|
+
{status?.map(({ title, value, percent }) => (
|
|
55
57
|
<div className="status-element">
|
|
56
|
-
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
))}
|
|
@@ -10,10 +10,10 @@ export const RowItem = ({
|
|
|
10
10
|
}) => {
|
|
11
11
|
return (
|
|
12
12
|
<Container>
|
|
13
|
-
{productsArray.map(({ cols, product,
|
|
13
|
+
{productsArray.map(({ cols, product, id }, i) => (
|
|
14
14
|
<div
|
|
15
15
|
className="row-container"
|
|
16
|
-
key={
|
|
16
|
+
key={id}
|
|
17
17
|
onClick={(e) => onGridClick && onGridClick(e, product, i)}
|
|
18
18
|
>
|
|
19
19
|
<div
|
|
@@ -23,8 +23,8 @@ export const RowItem = ({
|
|
|
23
23
|
}}
|
|
24
24
|
>
|
|
25
25
|
<CheckBox
|
|
26
|
-
id={
|
|
27
|
-
name={
|
|
26
|
+
id={"chk-" + id}
|
|
27
|
+
name={"chk-" + id}
|
|
28
28
|
className="chk-item"
|
|
29
29
|
onChange={(e) => chkOnChange && chkOnChange(e, product)}
|
|
30
30
|
defaultChecked={chkChecked && chkChecked(product)}
|
|
@@ -32,7 +32,7 @@ export const RowItem = ({
|
|
|
32
32
|
</div>
|
|
33
33
|
{cols.map((col, i) => (
|
|
34
34
|
<ColumnItem
|
|
35
|
-
key={
|
|
35
|
+
key={id + "-" + i}
|
|
36
36
|
element={col.name}
|
|
37
37
|
flex={col.flex}
|
|
38
38
|
minWidth={col.minWidth}
|