contentoh-components-library 21.4.37 → 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.
- package/dist/assets/images/Icons/delete.svg +8 -0
- package/dist/assets/images/Icons/edit.svg +3 -0
- package/dist/assets/images/Icons/info.svg +8 -0
- package/dist/components/molecules/BoxAttribute/BoxAttribute.stories.js +33 -0
- package/dist/components/molecules/BoxAttribute/index.js +73 -0
- package/dist/components/molecules/BoxAttribute/styles.js +23 -0
- package/dist/components/molecules/BoxButtons/BoxButtons.stories.js +31 -0
- package/dist/components/molecules/BoxButtons/index.js +56 -0
- package/dist/components/molecules/BoxButtons/styles.js +24 -0
- package/dist/components/molecules/ButtonsAssignation/ButtonsAssignation.stories.js +34 -0
- package/dist/components/molecules/ButtonsAssignation/index.js +142 -0
- package/dist/components/molecules/ButtonsAssignation/styles.js +20 -0
- package/dist/components/molecules/ButtonsEdition/ButtonsEdition.stories.js +34 -0
- package/dist/components/molecules/ButtonsEdition/index.js +182 -0
- package/dist/components/molecules/ButtonsEdition/styles.js +24 -0
- package/dist/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +64 -0
- package/dist/components/molecules/ProductSkuStatus/index.js +36 -0
- package/dist/components/molecules/ProductSkuStatus/styles.js +18 -0
- package/dist/components/molecules/Validation/Validation.stories.js +28 -0
- package/dist/components/molecules/Validation/index.js +77 -0
- package/dist/components/molecules/Validation/styles.js +18 -0
- package/dist/components/organisms/BarButtons/BarButtons.stories.js +30 -0
- package/dist/components/organisms/BarButtons/index.js +61 -0
- package/dist/components/organisms/BarButtons/styles.js +18 -0
- package/dist/components/organisms/Box/Box.stories.js +37 -0
- package/dist/components/organisms/Box/index.js +99 -0
- package/dist/components/organisms/Box/styles.js +20 -0
- package/dist/components/organisms/BoxOnboarding/BoxOnboarding.stories.js +37 -0
- package/dist/components/organisms/BoxOnboarding/index.js +69 -0
- package/dist/components/organisms/BoxOnboarding/styles.js +20 -0
- package/dist/components/organisms/InputGroup/index.js +83 -48
- package/dist/components/pages/ProviderProductEdition/index.js +4 -2
- package/dist/components/pages/ProviderProductEdition1/ProviderProductEdition.stories.js +222 -0
- package/dist/components/pages/ProviderProductEdition1/index.js +2339 -0
- package/dist/components/pages/ProviderProductEdition1/styles.js +23 -0
- package/dist/global-files/data.js +4 -4
- package/dist/global-files/variables.js +5 -1
- package/package.json +1 -1
- package/src/assets/images/Icons/info.svg +8 -0
- package/src/components/molecules/BoxAttribute/BoxAttribute.stories.js +17 -0
- package/src/components/molecules/BoxAttribute/index.js +71 -0
- package/src/components/molecules/BoxAttribute/styles.js +35 -0
- package/src/components/molecules/BoxButtons/BoxButtons.stories.js +15 -0
- package/src/components/molecules/BoxButtons/index.js +32 -0
- package/src/components/molecules/BoxButtons/styles.js +43 -0
- package/src/components/organisms/Box/Box.stories.js +17 -0
- package/src/components/organisms/Box/index.js +61 -0
- package/src/components/organisms/Box/styles.js +48 -0
- package/src/components/organisms/BoxOnboarding/BoxOnboarding.stories.js +17 -0
- package/src/components/organisms/BoxOnboarding/index.js +63 -0
- package/src/components/organisms/BoxOnboarding/styles.js +44 -0
- package/src/components/organisms/InputGroup/index.js +31 -0
- package/src/components/pages/ProviderProductEdition/index.js +4 -1
- package/src/global-files/data.js +3 -2
- package/src/global-files/variables.js +4 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.Box = void 0;
|
|
11
|
+
|
|
12
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _styles = require("./styles");
|
|
19
|
+
|
|
20
|
+
var _variables = require("../../../global-files/variables");
|
|
21
|
+
|
|
22
|
+
var _BoxOnboarding = require("../BoxOnboarding");
|
|
23
|
+
|
|
24
|
+
var _BoxButtons = require("../../molecules/BoxButtons");
|
|
25
|
+
|
|
26
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
+
|
|
28
|
+
var Box = function Box() {
|
|
29
|
+
var _useState = (0, _react.useState)(true),
|
|
30
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
31
|
+
isDeleteDisabled = _useState2[0],
|
|
32
|
+
setIsDeleteDisabled = _useState2[1];
|
|
33
|
+
|
|
34
|
+
var _useState3 = (0, _react.useState)(false),
|
|
35
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
36
|
+
isEditEnabled = _useState4[0],
|
|
37
|
+
setIsEditEnabled = _useState4[1];
|
|
38
|
+
|
|
39
|
+
var _useState5 = (0, _react.useState)([{
|
|
40
|
+
showAdd: true
|
|
41
|
+
}]),
|
|
42
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
43
|
+
boxOnboardingList = _useState6[0],
|
|
44
|
+
setBoxOnboardingList = _useState6[1];
|
|
45
|
+
|
|
46
|
+
var handleAddBoxOnboarding = function handleAddBoxOnboarding() {
|
|
47
|
+
var newBoxOnboarding = {
|
|
48
|
+
showAdd: false
|
|
49
|
+
};
|
|
50
|
+
setBoxOnboardingList([].concat((0, _toConsumableArray2.default)(boxOnboardingList), [newBoxOnboarding]));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var handleDeleteBoxOnboarding = function handleDeleteBoxOnboarding(index) {
|
|
54
|
+
if (index !== 0) {
|
|
55
|
+
var updatedBoxOnboardingList = (0, _toConsumableArray2.default)(boxOnboardingList);
|
|
56
|
+
updatedBoxOnboardingList.splice(index, 1);
|
|
57
|
+
setBoxOnboardingList(updatedBoxOnboardingList);
|
|
58
|
+
} else {
|
|
59
|
+
setIsDeleteDisabled(true);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var handleToggleEdit = function handleToggleEdit() {
|
|
64
|
+
setIsEditEnabled(!isEditEnabled);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
68
|
+
fontFamily: _variables.FontFamily.Raleway,
|
|
69
|
+
color: _variables.GlobalColors.original_magenta,
|
|
70
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h1", {
|
|
71
|
+
fontFamily: _variables.FontFamily.Raleway,
|
|
72
|
+
children: "Cajas"
|
|
73
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
74
|
+
className: "container-box",
|
|
75
|
+
children: boxOnboardingList.map(function (boxOnboarding, index) {
|
|
76
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
77
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
78
|
+
className: "container-buttons",
|
|
79
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_BoxOnboarding.BoxOnboarding, {
|
|
80
|
+
showAdd: boxOnboarding.showAdd,
|
|
81
|
+
isEditEnabled: isEditEnabled
|
|
82
|
+
}, index), /*#__PURE__*/(0, _jsxRuntime.jsx)(_BoxButtons.BoxButtons, {
|
|
83
|
+
showAdd: boxOnboarding.showAdd,
|
|
84
|
+
onAdd: handleAddBoxOnboarding,
|
|
85
|
+
onDelete: function onDelete() {
|
|
86
|
+
return handleDeleteBoxOnboarding(index);
|
|
87
|
+
},
|
|
88
|
+
isDeleteDisabled: isDeleteDisabled,
|
|
89
|
+
onToggleEdit: handleToggleEdit,
|
|
90
|
+
isEditEnabled: isEditEnabled
|
|
91
|
+
})]
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
})
|
|
95
|
+
})]
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
exports.Box = Box;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: ", ", sans-serif;\n font-weight: 400;\n display: flex;\n flex-direction: column;\n gap: 10px;\n font-size: var(--size);\n line-height: 1.2;\n height: auto;\n border-radius: 10px;\n background: white;\n position: relative;\n overflow: hidden;\n width: 100%;\n text-align: center;\n .container-buttons {\n display: flex;\n gap:10px;\n }\n .container-box{\n display: flex;\n flex-direction:column-reverse;\n gap:10px;\n }\n #contenedor-caja {\n display: flex;\n justify-content: space-between;\n color: #262626;\n white-space: nowrap;\n gap: 10px;\n }\n #atr-alto {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 6px;\n }\n h1 {\n font-family: ", ", sans-serif;\n font-size: 17px;\n line-height: 1.2;\n font-weight: 500;\n text-align: left;\n }\n"])), _variables.FontFamily.Roboto, _variables.FontFamily.RobotoMedium);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.BoxOnboardingDefault = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _index = require("./index");
|
|
13
|
+
|
|
14
|
+
var _loginImage = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/loginImage.svg"));
|
|
15
|
+
|
|
16
|
+
var _login = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/login2.svg"));
|
|
17
|
+
|
|
18
|
+
var _login2 = _interopRequireDefault(require("../../../assets/images/carouselImagesLogin/login3.svg"));
|
|
19
|
+
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
|
|
22
|
+
var _default = {
|
|
23
|
+
title: "Components/organisms/BoxOnboarding",
|
|
24
|
+
component: _index.BoxOnboarding
|
|
25
|
+
};
|
|
26
|
+
exports.default = _default;
|
|
27
|
+
|
|
28
|
+
var Template = function Template(args) {
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxOnboarding, (0, _objectSpread2.default)({}, args));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var BoxOnboardingDefault = Template.bind({});
|
|
33
|
+
exports.BoxOnboardingDefault = BoxOnboardingDefault;
|
|
34
|
+
BoxOnboardingDefault.args = {
|
|
35
|
+
panelImg: [_loginImage.default, _login.default, _login2.default],
|
|
36
|
+
panelText: "Elige la plataforma que conecta proovedores y retailers"
|
|
37
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.BoxOnboarding = void 0;
|
|
9
|
+
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
+
|
|
12
|
+
var _styles = require("./styles");
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _BoxAttribute = require("../../molecules/BoxAttribute");
|
|
17
|
+
|
|
18
|
+
var _react = require("react");
|
|
19
|
+
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
|
|
22
|
+
var BoxOnboarding = function BoxOnboarding(_ref) {
|
|
23
|
+
var panelColor = _ref.panelColor,
|
|
24
|
+
isEditEnabled = _ref.isEditEnabled;
|
|
25
|
+
|
|
26
|
+
var _useState = (0, _react.useState)(true),
|
|
27
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
28
|
+
boxAttributesActive = _useState2[0],
|
|
29
|
+
setBoxAttributesActive = _useState2[1];
|
|
30
|
+
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
32
|
+
panelColor: panelColor,
|
|
33
|
+
fontFamily: _variables.FontFamily.Raleway,
|
|
34
|
+
color: _variables.GlobalColors.original_magenta,
|
|
35
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
36
|
+
id: "contenedor-caja",
|
|
37
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
38
|
+
fontFamily: _variables.FontFamily.Raleway,
|
|
39
|
+
children: "Caja 1, chica"
|
|
40
|
+
}), boxAttributesActive && /*#__PURE__*/(0, _jsxRuntime.jsx)(_BoxAttribute.BoxAttribute, {
|
|
41
|
+
id: "atr-alto",
|
|
42
|
+
borderType: "rectangle",
|
|
43
|
+
className: "caja",
|
|
44
|
+
text: "Largo",
|
|
45
|
+
isEditEnabled: isEditEnabled
|
|
46
|
+
}), boxAttributesActive && /*#__PURE__*/(0, _jsxRuntime.jsx)(_BoxAttribute.BoxAttribute, {
|
|
47
|
+
id: "atr-alto",
|
|
48
|
+
borderType: "rectangle",
|
|
49
|
+
className: "caja",
|
|
50
|
+
text: "Alto",
|
|
51
|
+
isEditEnabled: isEditEnabled
|
|
52
|
+
}), boxAttributesActive && /*#__PURE__*/(0, _jsxRuntime.jsx)(_BoxAttribute.BoxAttribute, {
|
|
53
|
+
id: "atr-alto",
|
|
54
|
+
borderType: "rectangle",
|
|
55
|
+
className: "caja",
|
|
56
|
+
text: "Ancho",
|
|
57
|
+
isEditEnabled: isEditEnabled
|
|
58
|
+
}), boxAttributesActive && /*#__PURE__*/(0, _jsxRuntime.jsx)(_BoxAttribute.BoxAttribute, {
|
|
59
|
+
id: "atr-alto",
|
|
60
|
+
borderType: "rectangle",
|
|
61
|
+
className: "caja",
|
|
62
|
+
text: "Peso",
|
|
63
|
+
isEditEnabled: isEditEnabled
|
|
64
|
+
})]
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
exports.BoxOnboarding = BoxOnboarding;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: ", ", sans-serif;\n font-weight: 400;\n font-size: var(--size);\n line-height: 1.2;\n background: white;\n position: relative;\n overflow: hidden;\n width: 80%;\n height: 100%;\n text-align: center;\n #contenedor-caja {\n display: flex;\n justify-content: space-between;\n color: #262626;\n }\n #atr-alto {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n p {\n font-family: ", ", sans-serif;\n font-size: 12px;\n line-height: 1.2;\n font-weight: 600;\n align-self: center;\n }\n }\n .icon-red {\n color: #B64545;\n height:18px;\n }\n .icon-gray {\n color: #707070;\n }\n .icon-gray-l {\n color: #707070;\n height:18px;\n }\n"])), _variables.FontFamily.Roboto, _variables.FontFamily.RobotoMedium);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -1,16 +1,24 @@
|
|
|
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");
|
|
11
15
|
|
|
12
16
|
var _TagAndInput = require("../../molecules/TagAndInput");
|
|
13
17
|
|
|
18
|
+
var _BoxOnboarding = require("../BoxOnboarding");
|
|
19
|
+
|
|
20
|
+
var _Box = require("../Box");
|
|
21
|
+
|
|
14
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
23
|
|
|
16
24
|
var InputGroup = function InputGroup(_ref) {
|
|
@@ -31,7 +39,11 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
31
39
|
articleId = _ref.articleId,
|
|
32
40
|
version = _ref.version,
|
|
33
41
|
dinamicHeight = _ref.dinamicHeight,
|
|
34
|
-
compare = _ref.compare
|
|
42
|
+
compare = _ref.compare,
|
|
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);
|
|
35
47
|
|
|
36
48
|
var inputTypeValue = function inputTypeValue(type) {
|
|
37
49
|
switch (type) {
|
|
@@ -46,58 +58,81 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
46
58
|
}
|
|
47
59
|
};
|
|
48
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
|
+
|
|
72
|
+
var isOnboarding = function isOnboarding(dataGroup, group) {
|
|
73
|
+
var result = dataGroup === group;
|
|
74
|
+
return result;
|
|
75
|
+
};
|
|
76
|
+
|
|
49
77
|
var isEquals = function isEquals(dataInputsVal, auditInputsVal) {
|
|
50
78
|
var result = dataInputsVal === auditInputsVal;
|
|
51
79
|
return result;
|
|
52
80
|
};
|
|
53
81
|
|
|
54
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
82
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
83
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
84
|
+
className: activeSection === "Ficha técnica" ? "datasheets-layout" : "descriptions-layout",
|
|
85
|
+
children: [(inputGroup === null || inputGroup === void 0 ? void 0 : inputGroup.dataGroup) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
86
|
+
headerType: "retailer-name-header",
|
|
87
|
+
text: inputGroup === null || inputGroup === void 0 ? void 0 : inputGroup.dataGroup
|
|
88
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
89
|
+
className: "inputs-container",
|
|
90
|
+
children: inputGroup === null || inputGroup === void 0 ? void 0 : (_inputGroup$inputs = inputGroup.inputs) === null || _inputGroup$inputs === void 0 ? void 0 : _inputGroup$inputs.map(function (input, index) {
|
|
91
|
+
var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4, _dataInputs$input5, _dataInputs$input6, _auditInputs$input, _dataInputs$input7, _dataInputs$input8, _dataInputs$input9, _dataInputs$input10, _dataInputs$input11, _dataInputs$input12, _auditInputGroup$inpu, _auditInputGroup$inpu2;
|
|
92
|
+
|
|
93
|
+
return activeSection === "Ficha técnica" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
94
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
95
|
+
//disabled={input === 40001}
|
|
96
|
+
disabled: false,
|
|
97
|
+
inputId: (_dataInputs$input3 = dataInputs[input]) === null || _dataInputs$input3 === void 0 ? void 0 : _dataInputs$input3.id,
|
|
98
|
+
version: version,
|
|
99
|
+
inputType: inputTypeValue((_dataInputs$input4 = dataInputs[input]) === null || _dataInputs$input4 === void 0 ? void 0 : _dataInputs$input4.type),
|
|
100
|
+
label: ((_dataInputs$input5 = dataInputs[input]) === null || _dataInputs$input5 === void 0 ? void 0 : _dataInputs$input5.name) + ((_dataInputs$input6 = dataInputs[input]) !== null && _dataInputs$input6 !== void 0 && _dataInputs$input6.required ? "*" : ""),
|
|
101
|
+
value: compare ? (_auditInputs$input = auditInputs[input]) === null || _auditInputs$input === void 0 ? void 0 : _auditInputs$input.value : (_dataInputs$input7 = dataInputs[input]) === null || _dataInputs$input7 === void 0 ? void 0 : _dataInputs$input7.value,
|
|
102
|
+
inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
|
|
103
|
+
articleId: articleId,
|
|
104
|
+
isRequired: (_dataInputs$input8 = dataInputs[input]) === null || _dataInputs$input8 === void 0 ? void 0 : _dataInputs$input8.required,
|
|
105
|
+
updatedDatasheets: updatedDatasheets,
|
|
106
|
+
setUpdatedDatasheets: setUpdatedDatasheets,
|
|
107
|
+
maxChar: (_dataInputs$input9 = dataInputs[input]) !== null && _dataInputs$input9 !== void 0 && _dataInputs$input9.max_chars ? (_dataInputs$input10 = dataInputs[input]) === null || _dataInputs$input10 === void 0 ? void 0 : _dataInputs$input10.max_chars : 999,
|
|
108
|
+
optionList: (_dataInputs$input11 = dataInputs[input]) === null || _dataInputs$input11 === void 0 ? void 0 : _dataInputs$input11.option_list,
|
|
109
|
+
description: (_dataInputs$input12 = dataInputs[input]) === null || _dataInputs$input12 === void 0 ? void 0 : _dataInputs$input12.description,
|
|
110
|
+
showTooltip: true,
|
|
111
|
+
auditClass: compare && !isEquals(dataInputs[input].value, auditInputs[input].value) ? "audit-class" : ""
|
|
112
|
+
}, index + "-" + ((_dataInputs$input = dataInputs[input]) === null || _dataInputs$input === void 0 ? void 0 : _dataInputs$input.value) + "-" + ((_dataInputs$input2 = dataInputs[input]) === null || _dataInputs$input2 === void 0 ? void 0 : _dataInputs$input2.id) + "-" + compare)
|
|
113
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
114
|
+
inputId: input.id,
|
|
115
|
+
index: index,
|
|
116
|
+
inputType: "textarea",
|
|
117
|
+
label: (input === null || input === void 0 ? void 0 : input.name) + (input.required ? "*" : ""),
|
|
118
|
+
value: compare ? auditInputGroup === null || auditInputGroup === void 0 ? void 0 : (_auditInputGroup$inpu = auditInputGroup.inputs[index]) === null || _auditInputGroup$inpu === void 0 ? void 0 : _auditInputGroup$inpu.value : input === null || input === void 0 ? void 0 : input.value,
|
|
119
|
+
isRequired: input.required,
|
|
120
|
+
maxChar: input.max_chars,
|
|
121
|
+
inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
|
|
122
|
+
updatedDescriptions: updatedDescriptions,
|
|
123
|
+
setUpdatedDescriptions: setUpdatedDescriptions,
|
|
124
|
+
articleId: articleId,
|
|
125
|
+
version: version,
|
|
126
|
+
dinamicHeight: dinamicHeight,
|
|
127
|
+
description: input === null || input === void 0 ? void 0 : input.description,
|
|
128
|
+
showTooltip: true,
|
|
129
|
+
auditClass: compare && !isEquals(input === null || input === void 0 ? void 0 : input.value, auditInputGroup === null || auditInputGroup === void 0 ? void 0 : (_auditInputGroup$inpu2 = auditInputGroup.inputs[index]) === null || _auditInputGroup$inpu2 === void 0 ? void 0 : _auditInputGroup$inpu2.value) ? "audit-class" : ""
|
|
130
|
+
}, index + "-" + (input === null || input === void 0 ? void 0 : input.value) + "-" + compare);
|
|
131
|
+
})
|
|
132
|
+
})]
|
|
133
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
134
|
+
className: activeSection === "Ficha técnica" ? "datasheets-layout" : "descriptions-layout",
|
|
135
|
+
children: contentBoxAttribute && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.Box, {})
|
|
101
136
|
})]
|
|
102
137
|
});
|
|
103
138
|
};
|
|
@@ -886,7 +886,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
886
886
|
switch (_context8.prev = _context8.next) {
|
|
887
887
|
case 0:
|
|
888
888
|
_context8.next = 2;
|
|
889
|
-
return (0, _data.getRetailerServices)((product === null || product === void 0 ? void 0 : product.id_article) || (product === null || product === void 0 ? void 0 : (_product$article = product.article) === null || _product$article === void 0 ? void 0 : _product$article.id_article), (product === null || product === void 0 ? void 0 : (_product$article2 = product.article) === null || _product$article2 === void 0 ? void 0 : _product$article2.company_name) || (product === null || product === void 0 ? void 0 : product.categoryName), parseInt((product === null || product === void 0 ? void 0 : (_product$article3 = product.article) === null || _product$article3 === void 0 ? void 0 : _product$article3.id_category) || (product === null || product === void 0 ? void 0 : product.id_category)), version);
|
|
889
|
+
return (0, _data.getRetailerServices)((product === null || product === void 0 ? void 0 : product.id_article) || (product === null || product === void 0 ? void 0 : (_product$article = product.article) === null || _product$article === void 0 ? void 0 : _product$article.id_article), (product === null || product === void 0 ? void 0 : (_product$article2 = product.article) === null || _product$article2 === void 0 ? void 0 : _product$article2.company_name) || (product === null || product === void 0 ? void 0 : product.categoryName), parseInt((product === null || product === void 0 ? void 0 : (_product$article3 = product.article) === null || _product$article3 === void 0 ? void 0 : _product$article3.id_category) || (product === null || product === void 0 ? void 0 : product.id_category)), version, token);
|
|
890
890
|
|
|
891
891
|
case 2:
|
|
892
892
|
services = _context8.sent;
|
|
@@ -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, {
|