contentoh-components-library 21.4.38 → 21.4.39
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.
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.InputGroup = void 0;
|
|
7
9
|
|
|
10
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/typeof"));
|
|
11
|
+
|
|
8
12
|
var _styles = require("./styles");
|
|
9
13
|
|
|
10
14
|
var _ScreenHeader = require("../../atoms/ScreenHeader");
|
|
@@ -36,8 +40,10 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
36
40
|
version = _ref.version,
|
|
37
41
|
dinamicHeight = _ref.dinamicHeight,
|
|
38
42
|
compare = _ref.compare,
|
|
39
|
-
_ref$
|
|
40
|
-
|
|
43
|
+
_ref$groupData = _ref.groupData,
|
|
44
|
+
groupData = _ref$groupData === void 0 ? [] : _ref$groupData;
|
|
45
|
+
console.log('groupData: ', (0, _typeof2.default)(groupData));
|
|
46
|
+
console.log('groupData: ', groupData);
|
|
41
47
|
|
|
42
48
|
var inputTypeValue = function inputTypeValue(type) {
|
|
43
49
|
switch (type) {
|
|
@@ -52,6 +58,17 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
52
58
|
}
|
|
53
59
|
};
|
|
54
60
|
|
|
61
|
+
var contentBoxAttribute = groupData.find(function (_ref2) {
|
|
62
|
+
var dataGroup = _ref2.dataGroup;
|
|
63
|
+
return dataGroup === 'Caja';
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
if (contentBoxAttribute) {
|
|
67
|
+
console.log('content box attribute');
|
|
68
|
+
} else {
|
|
69
|
+
console.log('dont content box attribute');
|
|
70
|
+
}
|
|
71
|
+
|
|
55
72
|
var isOnboarding = function isOnboarding(dataGroup, group) {
|
|
56
73
|
var result = dataGroup === group;
|
|
57
74
|
return result;
|
|
@@ -115,7 +132,7 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
115
132
|
})]
|
|
116
133
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
117
134
|
className: activeSection === "Ficha técnica" ? "datasheets-layout" : "descriptions-layout",
|
|
118
|
-
children:
|
|
135
|
+
children: contentBoxAttribute && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.Box, {})
|
|
119
136
|
})]
|
|
120
137
|
});
|
|
121
138
|
};
|
|
@@ -1083,6 +1083,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1083
1083
|
|
|
1084
1084
|
if ((_services$0$activeRet = services[0][activeRetailer.id]) !== null && _services$0$activeRet !== void 0 && _services$0$activeRet.data) services[0][activeRetailer.id].data = Object.values(services[0][activeRetailer.id].data);
|
|
1085
1085
|
setActivePercentage(Math.round(activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.percentage, 0));
|
|
1086
|
+
console.log("loadInputs: ", services[0]);
|
|
1086
1087
|
var datagroups = services[0][activeRetailer.id];
|
|
1087
1088
|
var inputs = (_services$2 = services[0]) === null || _services$2 === void 0 ? void 0 : _services$2.inputs;
|
|
1088
1089
|
|
|
@@ -2195,7 +2196,8 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
2195
2196
|
inputGroup: dataGroup,
|
|
2196
2197
|
dataInputs: datasheets[1],
|
|
2197
2198
|
updatedDatasheets: updatedDatasheets,
|
|
2198
|
-
setUpdatedDatasheets: setUpdatedDatasheets
|
|
2199
|
+
setUpdatedDatasheets: setUpdatedDatasheets,
|
|
2200
|
+
groupData: services[0][activeRetailer.id].data //enableActions={enableActions(product.version_status)} ADD THIS VALIDATION
|
|
2199
2201
|
|
|
2200
2202
|
}, index + "-" + activeRetailer.name);
|
|
2201
2203
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
package/package.json
CHANGED
|
@@ -18,8 +18,11 @@ export const InputGroup = ({
|
|
|
18
18
|
version,
|
|
19
19
|
dinamicHeight,
|
|
20
20
|
compare,
|
|
21
|
-
|
|
21
|
+
groupData = [],
|
|
22
22
|
}) => {
|
|
23
|
+
|
|
24
|
+
console.log('groupData: ', typeof groupData);
|
|
25
|
+
console.log('groupData: ', groupData);
|
|
23
26
|
const inputTypeValue = (type) => {
|
|
24
27
|
switch (type) {
|
|
25
28
|
case "Booleano":
|
|
@@ -31,6 +34,12 @@ export const InputGroup = ({
|
|
|
31
34
|
}
|
|
32
35
|
};
|
|
33
36
|
|
|
37
|
+
let contentBoxAttribute = groupData.find(({dataGroup}) => dataGroup === 'Caja')
|
|
38
|
+
if(contentBoxAttribute) {
|
|
39
|
+
console.log('content box attribute');
|
|
40
|
+
} else {
|
|
41
|
+
console.log('dont content box attribute');
|
|
42
|
+
}
|
|
34
43
|
const isOnboarding = (dataGroup, group) => {
|
|
35
44
|
const result = dataGroup === group;
|
|
36
45
|
return result;
|
|
@@ -142,7 +151,7 @@ export const InputGroup = ({
|
|
|
142
151
|
? "datasheets-layout"
|
|
143
152
|
: "descriptions-layout"
|
|
144
153
|
}>
|
|
145
|
-
{
|
|
154
|
+
{ contentBoxAttribute && <Box/>}
|
|
146
155
|
</Container>
|
|
147
156
|
</>
|
|
148
157
|
);
|
|
@@ -596,6 +596,7 @@ export const ProviderProductEdition = ({
|
|
|
596
596
|
);
|
|
597
597
|
setActivePercentage(Math.round(activeRetailer?.percentage, 0));
|
|
598
598
|
|
|
599
|
+
console.log("loadInputs: ", services[0]);
|
|
599
600
|
const datagroups = services[0][activeRetailer.id];
|
|
600
601
|
const inputs = services[0]?.inputs;
|
|
601
602
|
const descriptions = services[1]?.filter(
|
|
@@ -1462,6 +1463,7 @@ export const ProviderProductEdition = ({
|
|
|
1462
1463
|
dataInputs={datasheets[1]}
|
|
1463
1464
|
updatedDatasheets={updatedDatasheets}
|
|
1464
1465
|
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
1466
|
+
groupData = { services[0][activeRetailer.id].data }
|
|
1465
1467
|
//enableActions={enableActions(product.version_status)} ADD THIS VALIDATION
|
|
1466
1468
|
/>
|
|
1467
1469
|
))
|