contentoh-components-library 21.4.54 → 21.4.55

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.
@@ -50,20 +50,13 @@ var TagAndInput = function TagAndInput(_ref) {
50
50
  auditClass = _ref.auditClass,
51
51
  onChange = _ref.onChange,
52
52
  dataInputs = _ref.dataInputs,
53
- inputGroup = _ref.inputGroup;
53
+ inputGroup = _ref.inputGroup,
54
+ boxOnboardingData = _ref.boxOnboardingData;
54
55
 
55
- var _useState = (0, _react.useState)(true),
56
+ var _useState = (0, _react.useState)(boxOnboardingData || []),
56
57
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
57
- isDeleteDisabled = _useState2[0],
58
- setIsDeleteDisabled = _useState2[1];
59
-
60
- var _useState3 = (0, _react.useState)([{
61
- showAdd: true,
62
- value: {}
63
- }]),
64
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
65
- boxOnboardingList = _useState4[0],
66
- setBoxOnboardingList = _useState4[1];
58
+ boxOnboardingList = _useState2[0],
59
+ setBoxOnboardingList = _useState2[1];
67
60
 
68
61
  (0, _react.useEffect)(function () {
69
62
  var temp = {};
@@ -85,7 +78,6 @@ var TagAndInput = function TagAndInput(_ref) {
85
78
  if (tempList.length > 0) {
86
79
  setBoxOnboardingList(tempList.map(function (value, index) {
87
80
  return index === tempList.length - 1 ? {
88
- showAdd: true,
89
81
  value: value
90
82
  } : {
91
83
  value: value
@@ -92,6 +92,7 @@ var InputGroup = function InputGroup(_ref) {
92
92
  // }
93
93
  // }, [showBox]);
94
94
 
95
+ console.log("dataInputs", dataInputs);
95
96
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
96
97
  children: [inputGroup.groupId === "16" && (activeRetailer === null || activeRetailer === void 0 ? void 0 : (_activeRetailer$retai3 = activeRetailer.retailer) === null || _activeRetailer$retai3 === void 0 ? void 0 : _activeRetailer$retai3.id) === 68 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
97
98
  className: activeSection === "Ficha técnica" ? "datasheets-layout" : "descriptions-layout",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.4.54",
3
+ "version": "21.4.55",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -32,15 +32,10 @@ export const TagAndInput = ({
32
32
  auditClass,
33
33
  onChange,
34
34
  dataInputs,
35
- inputGroup
35
+ inputGroup,
36
+ boxOnboardingData,
36
37
  }) => {
37
- const [isDeleteDisabled, setIsDeleteDisabled] = useState(true);
38
- const [boxOnboardingList, setBoxOnboardingList] = useState([
39
- {
40
- showAdd: true,
41
- value: {},
42
- },
43
- ]);
38
+ const [boxOnboardingList, setBoxOnboardingList] = useState(boxOnboardingData || []);
44
39
 
45
40
  useEffect(() => {
46
41
  const temp = {};
@@ -57,7 +52,7 @@ export const TagAndInput = ({
57
52
  if (tempList.length > 0) {
58
53
  setBoxOnboardingList(
59
54
  tempList.map((value, index) =>
60
- index === tempList.length - 1 ? { showAdd: true, value } : { value }
55
+ index === tempList.length - 1 ? {value } : { value }
61
56
  )
62
57
  );
63
58
  }
@@ -66,6 +61,7 @@ export const TagAndInput = ({
66
61
  useEffect(() => {
67
62
  onChange && onChange(boxOnboardingList);
68
63
  }, [boxOnboardingList]);
64
+
69
65
  return (
70
66
  <Container
71
67
  inputType={inputType}
@@ -60,6 +60,7 @@ export const InputGroup = ({
60
60
  // console.log("showBox es false");
61
61
  // }
62
62
  // }, [showBox]);
63
+ console.log("dataInputs",dataInputs);
63
64
 
64
65
  return (
65
66
  <>