contentoh-components-library 21.4.36 → 21.4.38
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 +66 -48
- package/dist/components/pages/ProviderProductEdition/index.js +1 -1
- 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 +8 -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 +22 -0
- package/src/components/pages/ProviderProductEdition/index.js +2 -1
- package/src/global-files/data.js +11 -2
- package/src/global-files/variables.js +4 -0
- package/dist/assets/fonts/roboto/LICENSE.txt +0 -202
|
@@ -0,0 +1,23 @@
|
|
|
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 display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n overflow: auto;\n\n .data-container {\n display: flex;\n flex-direction:row-reverse;\n flex: 0%;\n height: calc(100% - ", "px);\n .image-data-panel {\n width: 340px;\n\n & + * {\n margin-left: 10px;\n }\n }\n\n .product-information {\n width: 100%;\n display: flex;\n flex-direction: column;\n\n .services-information-container {\n height: 100%;\n overflow: auto;\n }\n\n .image-services {\n aside {\n display: grid;\n grid-template-columns: repeat(auto-fill, 179px);\n column-gap: 15px;\n row-gap: 15px;\n padding: 20px;\n }\n }\n\n .commentary-box {\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n padding: 10px;\n padding-left: 0;\n\n .commentary {\n display: flex;\n align-items: flex-end;\n\n .input-container {\n width: 500px;\n\n .quill {\n height: 100px;\n }\n\n & + * {\n margin-left: 5px;\n }\n }\n\n .buttons-box {\n display: flex;\n width: 210px;\n flex-wrap: wrap;\n\n .general-transparent-button {\n & + * {\n margin-top: 5px;\n }\n }\n\n .general-transparent-button,\n .general-green-button,\n .general-button-disabled {\n width: fit-content;\n min-width: 201px;\n height: 40px;\n }\n }\n }\n }\n\n .feedback-box {\n display: flex;\n }\n\n .required-inputs-message {\n font-family: ", ";\n font-size: 13px;\n color: ", ";\n padding: 10px;\n display: flex;\n align-items: center;\n\n p + * {\n margin-top: 10px;\n }\n\n button {\n min-width: fit-content;\n }\n }\n }\n }\n #modal-message-box {\n width: 400px;\n height: 100px;\n }\n .container {\n width: 100%;\n height: 100%;\n .dropzone {\n height: 100%;\n width: 100%;\n }\n }\n"])), function (_ref) {
|
|
19
|
+
var headerTop = _ref.headerTop;
|
|
20
|
+
return headerTop;
|
|
21
|
+
}, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4);
|
|
22
|
+
|
|
23
|
+
exports.Container = Container;
|
|
@@ -20,7 +20,7 @@ var _jsBase = require("js-base64");
|
|
|
20
20
|
var _uuid = require("uuid");
|
|
21
21
|
|
|
22
22
|
var getRetailerServices = /*#__PURE__*/function () {
|
|
23
|
-
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(articleId, category, categoryId, version) {
|
|
23
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(articleId, category, categoryId, version, token) {
|
|
24
24
|
var _images$values, responseArray, datasheets, descriptions, images;
|
|
25
25
|
|
|
26
26
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
@@ -29,7 +29,11 @@ var getRetailerServices = /*#__PURE__*/function () {
|
|
|
29
29
|
case 0:
|
|
30
30
|
_context.prev = 0;
|
|
31
31
|
_context.next = 3;
|
|
32
|
-
return Promise.all([_axios.default.post("".concat(process.env.REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT, "?idCategory=").concat(categoryId, "&articleId=").concat(articleId, "&version=").concat(version)
|
|
32
|
+
return Promise.all([_axios.default.post("".concat(process.env.REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT, "?idCategory=").concat(categoryId, "&articleId=").concat(articleId, "&version=").concat(version), {}, {
|
|
33
|
+
headers: {
|
|
34
|
+
Authorization: token
|
|
35
|
+
}
|
|
36
|
+
}), _axios.default.get("".concat(process.env.REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT, "?idCategory=").concat(categoryId, "&articleId=").concat(articleId, "&version=").concat(version)), _axios.default.post("".concat(process.env.REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT, "?articleId=").concat(articleId, "&version=").concat(version), {
|
|
33
37
|
category: category
|
|
34
38
|
})]);
|
|
35
39
|
|
|
@@ -61,7 +65,7 @@ var getRetailerServices = /*#__PURE__*/function () {
|
|
|
61
65
|
}, _callee, null, [[0, 11]]);
|
|
62
66
|
}));
|
|
63
67
|
|
|
64
|
-
return function getRetailerServices(_x, _x2, _x3, _x4) {
|
|
68
|
+
return function getRetailerServices(_x, _x2, _x3, _x4, _x5) {
|
|
65
69
|
return _ref.apply(this, arguments);
|
|
66
70
|
};
|
|
67
71
|
}();
|
|
@@ -263,7 +267,7 @@ var fetchUsers = /*#__PURE__*/function () {
|
|
|
263
267
|
}, _callee4);
|
|
264
268
|
}));
|
|
265
269
|
|
|
266
|
-
return function fetchUsers(
|
|
270
|
+
return function fetchUsers(_x6) {
|
|
267
271
|
return _ref4.apply(this, arguments);
|
|
268
272
|
};
|
|
269
273
|
}();
|
|
@@ -20,7 +20,11 @@ var GlobalColors = {
|
|
|
20
20
|
reception: "#E57432",
|
|
21
21
|
finished: "#18A0FB",
|
|
22
22
|
exported: "#71DE56",
|
|
23
|
-
white: "#FFFFFF"
|
|
23
|
+
white: "#FFFFFF",
|
|
24
|
+
gray_light: "#F0F0F0",
|
|
25
|
+
gray: "#707070",
|
|
26
|
+
blue_light: "#F7F7FC",
|
|
27
|
+
purple: "#8A6CAA"
|
|
24
28
|
};
|
|
25
29
|
exports.GlobalColors = GlobalColors;
|
|
26
30
|
var FontFamily = {
|
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<mask id="mask0_37_379" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="8" height="8">
|
|
3
|
+
<rect width="8" height="8" fill="#D9D9D9"/>
|
|
4
|
+
</mask>
|
|
5
|
+
<g mask="url(#mask0_37_379)">
|
|
6
|
+
<path d="M3.63807 5.98825H4.40893V3.62867H3.63807V5.98825ZM3.99596 3.07403C4.124 3.07403 4.2311 3.03169 4.31727 2.947C4.40345 2.86232 4.44653 2.75738 4.44653 2.6322C4.44653 2.49463 4.40331 2.38347 4.31685 2.29871C4.2304 2.21394 4.12327 2.17156 3.99547 2.17156C3.86061 2.17156 3.75166 2.21394 3.66863 2.29871C3.58559 2.38347 3.54407 2.49307 3.54407 2.6275C3.54407 2.7566 3.58737 2.8633 3.67398 2.94759C3.7606 3.03188 3.86792 3.07403 3.99596 3.07403ZM3.9991 8C3.44212 8 2.92156 7.89633 2.43741 7.68899C1.95324 7.48165 1.52964 7.19646 1.16659 6.83341C0.803541 6.47036 0.518349 6.04696 0.311013 5.5632C0.103671 5.07943 0 4.5588 0 4.0013C0 3.44379 0.103671 2.92273 0.311013 2.4381C0.518349 1.95348 0.803049 1.53104 1.16511 1.1708C1.52718 0.810554 1.95032 0.525358 2.43455 0.315215C2.91877 0.105072 3.43989 0 3.99792 0C4.55595 0 5.07764 0.10483 5.56301 0.314491C6.04837 0.524146 6.47094 0.80868 6.83072 1.16809C7.1905 1.52751 7.47533 1.95015 7.6852 2.43603C7.89507 2.92191 8 3.44396 8 4.0022C8 4.56004 7.89493 5.08098 7.68479 5.56504C7.47464 6.04909 7.18945 6.47169 6.8292 6.83282C6.46896 7.19395 6.04646 7.47876 5.56169 7.68726C5.07694 7.89575 4.55607 8 3.9991 8ZM4 7.11633C4.86173 7.11633 5.59499 6.81435 6.19977 6.21037C6.80454 5.60639 7.10693 4.8696 7.10693 4C7.10693 3.13827 6.80513 2.40501 6.20153 1.80024C5.59793 1.19546 4.86095 0.893067 3.9906 0.893067C3.12887 0.893067 2.39561 1.19487 1.79083 1.79847C1.18606 2.40207 0.883666 3.13905 0.883666 4.0094C0.883666 4.87113 1.18565 5.60439 1.78963 6.20917C2.39361 6.81394 3.1304 7.11633 4 7.11633Z" fill="#ECDD1D"/>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BoxAttribute } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/molecules/BoxAttribute",
|
|
5
|
+
component: BoxAttribute,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <BoxAttribute {...args} />;
|
|
9
|
+
|
|
10
|
+
export const BoxAttributeDefault = Template.bind({});
|
|
11
|
+
|
|
12
|
+
BoxAttributeDefault.args = {
|
|
13
|
+
text:"texto prueba",
|
|
14
|
+
isEditEnabled:true,
|
|
15
|
+
titletool:"Porcentaje de requeridos",
|
|
16
|
+
texttool:"Este porcentaje indica la completitud de los atributos requeridos para todos los servicios.",
|
|
17
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import IconInfo from "../../../assets/images/Icons/info.svg";
|
|
3
|
+
import { Tooltip } from "../../atoms/Tooltip";
|
|
4
|
+
import TextField from '@mui/material/TextField';
|
|
5
|
+
|
|
6
|
+
export const BoxAttribute = (props) => {
|
|
7
|
+
const {
|
|
8
|
+
id,
|
|
9
|
+
key,
|
|
10
|
+
className,
|
|
11
|
+
text,
|
|
12
|
+
borderType,
|
|
13
|
+
isEditEnabled,
|
|
14
|
+
titletool,
|
|
15
|
+
texttool,
|
|
16
|
+
} = props;
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<>
|
|
20
|
+
<Container
|
|
21
|
+
id={id}
|
|
22
|
+
key={key}
|
|
23
|
+
className={className}
|
|
24
|
+
borderType={borderType}
|
|
25
|
+
>
|
|
26
|
+
<Tooltip
|
|
27
|
+
componentTooltip={
|
|
28
|
+
<>
|
|
29
|
+
<p>
|
|
30
|
+
<b>{titletool}</b>
|
|
31
|
+
</p>
|
|
32
|
+
<p>{texttool}</p>
|
|
33
|
+
</>
|
|
34
|
+
}
|
|
35
|
+
children={
|
|
36
|
+
<Container className="">
|
|
37
|
+
<img className="icon" src={IconInfo} alt="iconInfo" />
|
|
38
|
+
</Container>
|
|
39
|
+
}
|
|
40
|
+
classNameTooltip={"container-tooltip"}
|
|
41
|
+
/>
|
|
42
|
+
<span>{text}</span>
|
|
43
|
+
{isEditEnabled ? (
|
|
44
|
+
<TextField
|
|
45
|
+
hiddenLabel
|
|
46
|
+
id="caja-borde"
|
|
47
|
+
defaultValue={text}
|
|
48
|
+
variant="outlined"
|
|
49
|
+
size="small"
|
|
50
|
+
/>
|
|
51
|
+
) : (
|
|
52
|
+
<TextField
|
|
53
|
+
hiddenLabel
|
|
54
|
+
id="caja-borde"
|
|
55
|
+
defaultValue={text}
|
|
56
|
+
variant="outlined"
|
|
57
|
+
size="small"
|
|
58
|
+
disabled
|
|
59
|
+
/>
|
|
60
|
+
)}
|
|
61
|
+
{/* <TextField
|
|
62
|
+
hiddenLabel
|
|
63
|
+
id="caja-borde"
|
|
64
|
+
defaultValue={text}
|
|
65
|
+
variant="outlined"
|
|
66
|
+
size="small"
|
|
67
|
+
/> */}
|
|
68
|
+
</Container>
|
|
69
|
+
</>
|
|
70
|
+
);
|
|
71
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap:4px;
|
|
8
|
+
#atr-alto {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
}
|
|
13
|
+
#caja-borde {
|
|
14
|
+
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
line-height: 1.2;
|
|
17
|
+
border-radius: ${({ borderType }) => {
|
|
18
|
+
return borderType?.toLowerCase() === "rectangle"
|
|
19
|
+
? "5px"
|
|
20
|
+
: borderType?.toLowerCase() === "circle"
|
|
21
|
+
? "50%"
|
|
22
|
+
: "none";
|
|
23
|
+
}};
|
|
24
|
+
}
|
|
25
|
+
span {
|
|
26
|
+
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
line-height: 1.2;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
}
|
|
31
|
+
.icon {
|
|
32
|
+
width: 8px;
|
|
33
|
+
height: 8px;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BoxButtons } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/molecules/BoxButtons",
|
|
5
|
+
component: BoxButtons,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <BoxButtons {...args} />;
|
|
9
|
+
|
|
10
|
+
export const BoxButtonsDefault = Template.bind({});
|
|
11
|
+
|
|
12
|
+
BoxButtonsDefault.args = {
|
|
13
|
+
text:"texto prueba",
|
|
14
|
+
showAdd:true,
|
|
15
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Container, ContainerIcon } from "./styles";
|
|
2
|
+
import { Button } from "@mui/material";
|
|
3
|
+
|
|
4
|
+
export const BoxButtons = ({ showAdd, onAdd, onDelete, isTheFirstBox, onToggleEdit, isEditEnabled }) => {
|
|
5
|
+
return (
|
|
6
|
+
<Container>
|
|
7
|
+
<Button variant="outlined" className="button-circle" onClick={onToggleEdit}>
|
|
8
|
+
<ContainerIcon>
|
|
9
|
+
<span className={`iconos-out ${isEditEnabled ? "iconos-grises" : ""}`}>edit</span>
|
|
10
|
+
</ContainerIcon>
|
|
11
|
+
</Button>
|
|
12
|
+
{!isTheFirstBox && (
|
|
13
|
+
<Button
|
|
14
|
+
variant="outlined"
|
|
15
|
+
className="button-circle"
|
|
16
|
+
onClick={onDelete}
|
|
17
|
+
>
|
|
18
|
+
<ContainerIcon>
|
|
19
|
+
<span className="iconos-out">delete_forever</span>
|
|
20
|
+
</ContainerIcon>
|
|
21
|
+
</Button>
|
|
22
|
+
)}
|
|
23
|
+
{showAdd && (
|
|
24
|
+
<Button onClick={onAdd} variant="outlined" className="button-circle">
|
|
25
|
+
<ContainerIcon>
|
|
26
|
+
<span className="iconos-out iconos-grises">add</span>
|
|
27
|
+
</ContainerIcon>
|
|
28
|
+
</Button>
|
|
29
|
+
)}
|
|
30
|
+
</Container>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
display:flex;
|
|
6
|
+
flex-direction:row;
|
|
7
|
+
gap:8px;
|
|
8
|
+
.button-circle{
|
|
9
|
+
width:30px;
|
|
10
|
+
height:30px;
|
|
11
|
+
padding:2px;
|
|
12
|
+
border-radius:100%;
|
|
13
|
+
min-width:30px;
|
|
14
|
+
border: 1px solid #F0F0F0;
|
|
15
|
+
}
|
|
16
|
+
.button-circle:hover {
|
|
17
|
+
border: 1px solid #F0F0F0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
`;
|
|
21
|
+
export const ContainerIcon = styled.div`
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
@font-face {
|
|
24
|
+
font-family: "Material Symbols Outlined";
|
|
25
|
+
font-style: normal;
|
|
26
|
+
font-weight: 100 700;
|
|
27
|
+
src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v68/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVY.woff2)
|
|
28
|
+
format("woff2");
|
|
29
|
+
}
|
|
30
|
+
.iconos-out {
|
|
31
|
+
font-family: "Material Symbols Outlined";
|
|
32
|
+
font-size: 20px;
|
|
33
|
+
//line-height: 1;
|
|
34
|
+
margin-top: 10px;
|
|
35
|
+
}
|
|
36
|
+
.iconos-out {
|
|
37
|
+
font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
|
|
38
|
+
color: #B64545;
|
|
39
|
+
}
|
|
40
|
+
.iconos-grises {
|
|
41
|
+
font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
|
|
42
|
+
color: ${GlobalColors.gray};
|
|
43
|
+
}`;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Box } from "./index";
|
|
2
|
+
import LoginImage from "../../../assets/images/carouselImagesLogin/loginImage.svg";
|
|
3
|
+
import Login2 from "../../../assets/images/carouselImagesLogin/login2.svg";
|
|
4
|
+
import Login3 from "../../../assets/images/carouselImagesLogin/login3.svg";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Components/organisms/Box",
|
|
8
|
+
component: Box,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const Template = (args) => <Box {...args} />;
|
|
12
|
+
|
|
13
|
+
export const BoxDefault = Template.bind({});
|
|
14
|
+
BoxDefault.args = {
|
|
15
|
+
panelImg:[LoginImage, Login2, Login3],
|
|
16
|
+
panelText:"Elige la plataforma que conecta proovedores y retailers",
|
|
17
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Container } from "./styles";
|
|
3
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
4
|
+
import { BoxOnboarding } from "../BoxOnboarding";
|
|
5
|
+
import { BoxButtons } from "../../molecules/BoxButtons";
|
|
6
|
+
|
|
7
|
+
export const Box = () => {
|
|
8
|
+
const [isDeleteDisabled, setIsDeleteDisabled] = useState(true);
|
|
9
|
+
const [isEditEnabled, setIsEditEnabled] = useState(false);
|
|
10
|
+
const [boxOnboardingList, setBoxOnboardingList] = useState([
|
|
11
|
+
{
|
|
12
|
+
showAdd: true,
|
|
13
|
+
},
|
|
14
|
+
]);
|
|
15
|
+
|
|
16
|
+
const handleAddBoxOnboarding = () => {
|
|
17
|
+
const newBoxOnboarding = {
|
|
18
|
+
showAdd: false,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
setBoxOnboardingList([...boxOnboardingList, newBoxOnboarding]);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const handleDeleteBoxOnboarding = (index) => {
|
|
25
|
+
if (index !== 0) {
|
|
26
|
+
const updatedBoxOnboardingList = [...boxOnboardingList];
|
|
27
|
+
updatedBoxOnboardingList.splice(index, 1);
|
|
28
|
+
setBoxOnboardingList(updatedBoxOnboardingList);
|
|
29
|
+
} else {
|
|
30
|
+
setIsDeleteDisabled(true);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const handleToggleEdit = () => {
|
|
34
|
+
setIsEditEnabled(!isEditEnabled);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<Container fontFamily={FontFamily.Raleway} color={GlobalColors.original_magenta}>
|
|
39
|
+
<h1 fontFamily={FontFamily.Raleway}>Cajas</h1>
|
|
40
|
+
<div className="container-box">
|
|
41
|
+
{boxOnboardingList.map((boxOnboarding, index) => (
|
|
42
|
+
<>
|
|
43
|
+
<div className="container-buttons">
|
|
44
|
+
<BoxOnboarding key={index} showAdd={boxOnboarding.showAdd} isEditEnabled={isEditEnabled}/>
|
|
45
|
+
<BoxButtons
|
|
46
|
+
showAdd={boxOnboarding.showAdd}
|
|
47
|
+
onAdd={handleAddBoxOnboarding}
|
|
48
|
+
onDelete={() => handleDeleteBoxOnboarding(index)}
|
|
49
|
+
isDeleteDisabled={isDeleteDisabled}
|
|
50
|
+
onToggleEdit={handleToggleEdit}
|
|
51
|
+
isEditEnabled={isEditEnabled}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
</>
|
|
56
|
+
))}
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
</Container>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
font-family: ${FontFamily.Roboto}, sans-serif;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: 10px;
|
|
10
|
+
font-size: var(--size);
|
|
11
|
+
line-height: 1.2;
|
|
12
|
+
height: auto;
|
|
13
|
+
border-radius: 10px;
|
|
14
|
+
background: white;
|
|
15
|
+
position: relative;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
width: 100%;
|
|
18
|
+
text-align: center;
|
|
19
|
+
.container-buttons {
|
|
20
|
+
display: flex;
|
|
21
|
+
gap:10px;
|
|
22
|
+
}
|
|
23
|
+
.container-box{
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction:column-reverse;
|
|
26
|
+
gap:10px;
|
|
27
|
+
}
|
|
28
|
+
#contenedor-caja {
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
color: #262626;
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
gap: 10px;
|
|
34
|
+
}
|
|
35
|
+
#atr-alto {
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 6px;
|
|
40
|
+
}
|
|
41
|
+
h1 {
|
|
42
|
+
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
43
|
+
font-size: 17px;
|
|
44
|
+
line-height: 1.2;
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
text-align: left;
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BoxOnboarding } from "./index";
|
|
2
|
+
import LoginImage from "../../../assets/images/carouselImagesLogin/loginImage.svg";
|
|
3
|
+
import Login2 from "../../../assets/images/carouselImagesLogin/login2.svg";
|
|
4
|
+
import Login3 from "../../../assets/images/carouselImagesLogin/login3.svg";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Components/organisms/BoxOnboarding",
|
|
8
|
+
component: BoxOnboarding,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const Template = (args) => <BoxOnboarding {...args} />;
|
|
12
|
+
|
|
13
|
+
export const BoxOnboardingDefault = Template.bind({});
|
|
14
|
+
BoxOnboardingDefault.args = {
|
|
15
|
+
panelImg:[LoginImage, Login2, Login3],
|
|
16
|
+
panelText:"Elige la plataforma que conecta proovedores y retailers",
|
|
17
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Container, ContainerIcon } from "./styles";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
import { BoxAttribute } from "../../molecules/BoxAttribute";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
|
|
6
|
+
export const BoxOnboarding = ({ panelColor, isEditEnabled }) => {
|
|
7
|
+
const [boxAttributesActive, setBoxAttributesActive] = useState(true);
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<Container
|
|
11
|
+
panelColor={panelColor}
|
|
12
|
+
fontFamily={FontFamily.Raleway}
|
|
13
|
+
color={GlobalColors.original_magenta}
|
|
14
|
+
>
|
|
15
|
+
<div id="contenedor-caja">
|
|
16
|
+
<p fontFamily={FontFamily.Raleway}>Caja 1, chica</p>
|
|
17
|
+
{boxAttributesActive && (
|
|
18
|
+
<BoxAttribute
|
|
19
|
+
id="atr-alto"
|
|
20
|
+
borderType="rectangle"
|
|
21
|
+
className="caja"
|
|
22
|
+
text="Largo"
|
|
23
|
+
isEditEnabled={isEditEnabled}
|
|
24
|
+
></BoxAttribute>
|
|
25
|
+
)}
|
|
26
|
+
{boxAttributesActive &&
|
|
27
|
+
<BoxAttribute
|
|
28
|
+
id="atr-alto"
|
|
29
|
+
borderType="rectangle"
|
|
30
|
+
className="caja"
|
|
31
|
+
text="Alto"
|
|
32
|
+
isEditEnabled={isEditEnabled}
|
|
33
|
+
></BoxAttribute>
|
|
34
|
+
}
|
|
35
|
+
{boxAttributesActive &&
|
|
36
|
+
<BoxAttribute
|
|
37
|
+
id="atr-alto"
|
|
38
|
+
borderType="rectangle"
|
|
39
|
+
className="caja"
|
|
40
|
+
text="Ancho"
|
|
41
|
+
isEditEnabled={isEditEnabled}
|
|
42
|
+
></BoxAttribute>}
|
|
43
|
+
{boxAttributesActive &&
|
|
44
|
+
<BoxAttribute
|
|
45
|
+
id="atr-alto"
|
|
46
|
+
borderType="rectangle"
|
|
47
|
+
className="caja"
|
|
48
|
+
text="Peso"
|
|
49
|
+
isEditEnabled={isEditEnabled}
|
|
50
|
+
></BoxAttribute>}
|
|
51
|
+
{/* {boxAttributes.map((attr, index) => (
|
|
52
|
+
<BoxAttribute
|
|
53
|
+
key={attr.id}
|
|
54
|
+
id={`atr-alto-${index}`}
|
|
55
|
+
borderType="rectangle"
|
|
56
|
+
className="caja"
|
|
57
|
+
text="Largo"
|
|
58
|
+
></BoxAttribute>
|
|
59
|
+
))} */}
|
|
60
|
+
</div>
|
|
61
|
+
</Container>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
font-family: ${FontFamily.Roboto}, sans-serif;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
font-size: var(--size);
|
|
8
|
+
line-height: 1.2;
|
|
9
|
+
background: white;
|
|
10
|
+
position: relative;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
width: 80%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
text-align: center;
|
|
15
|
+
#contenedor-caja {
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
color: #262626;
|
|
19
|
+
}
|
|
20
|
+
#atr-alto {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|
|
25
|
+
p {
|
|
26
|
+
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
line-height: 1.2;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
align-self: center;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
.icon-red {
|
|
34
|
+
color: #B64545;
|
|
35
|
+
height:18px;
|
|
36
|
+
}
|
|
37
|
+
.icon-gray {
|
|
38
|
+
color: #707070;
|
|
39
|
+
}
|
|
40
|
+
.icon-gray-l {
|
|
41
|
+
color: #707070;
|
|
42
|
+
height:18px;
|
|
43
|
+
}
|
|
44
|
+
`
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
import { ScreenHeader } from "../../atoms/ScreenHeader";
|
|
3
3
|
import { TagAndInput } from "../../molecules/TagAndInput";
|
|
4
|
+
import { BoxOnboarding } from "../BoxOnboarding";
|
|
5
|
+
import { Box } from "../Box";
|
|
4
6
|
|
|
5
7
|
export const InputGroup = ({
|
|
6
8
|
inputGroup = {},
|
|
@@ -16,6 +18,7 @@ export const InputGroup = ({
|
|
|
16
18
|
version,
|
|
17
19
|
dinamicHeight,
|
|
18
20
|
compare,
|
|
21
|
+
dataGroup=12,
|
|
19
22
|
}) => {
|
|
20
23
|
const inputTypeValue = (type) => {
|
|
21
24
|
switch (type) {
|
|
@@ -28,12 +31,19 @@ export const InputGroup = ({
|
|
|
28
31
|
}
|
|
29
32
|
};
|
|
30
33
|
|
|
34
|
+
const isOnboarding = (dataGroup, group) => {
|
|
35
|
+
const result = dataGroup === group;
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
31
40
|
const isEquals = (dataInputsVal, auditInputsVal) => {
|
|
32
41
|
const result = dataInputsVal === auditInputsVal;
|
|
33
42
|
return result;
|
|
34
43
|
};
|
|
35
44
|
|
|
36
45
|
return (
|
|
46
|
+
<>
|
|
37
47
|
<Container
|
|
38
48
|
className={
|
|
39
49
|
activeSection === "Ficha técnica"
|
|
@@ -50,6 +60,8 @@ export const InputGroup = ({
|
|
|
50
60
|
<div className="inputs-container">
|
|
51
61
|
{inputGroup?.inputs?.map((input, index) =>
|
|
52
62
|
activeSection === "Ficha técnica" ? (
|
|
63
|
+
<>
|
|
64
|
+
|
|
53
65
|
<TagAndInput
|
|
54
66
|
key={
|
|
55
67
|
index +
|
|
@@ -92,6 +104,8 @@ export const InputGroup = ({
|
|
|
92
104
|
: ""
|
|
93
105
|
}
|
|
94
106
|
/>
|
|
107
|
+
</>
|
|
108
|
+
|
|
95
109
|
) : (
|
|
96
110
|
<TagAndInput
|
|
97
111
|
key={index + "-" + input?.value + "-" + compare}
|
|
@@ -123,5 +137,13 @@ export const InputGroup = ({
|
|
|
123
137
|
)}
|
|
124
138
|
</div>
|
|
125
139
|
</Container>
|
|
140
|
+
<Container className={
|
|
141
|
+
activeSection === "Ficha técnica"
|
|
142
|
+
? "datasheets-layout"
|
|
143
|
+
: "descriptions-layout"
|
|
144
|
+
}>
|
|
145
|
+
{ isOnboarding && <Box/>}
|
|
146
|
+
</Container>
|
|
147
|
+
</>
|
|
126
148
|
);
|
|
127
149
|
};
|
|
@@ -473,7 +473,8 @@ export const ProviderProductEdition = ({
|
|
|
473
473
|
product?.id_article || product?.article?.id_article,
|
|
474
474
|
product?.article?.company_name || product?.categoryName,
|
|
475
475
|
parseInt(product?.article?.id_category || product?.id_category),
|
|
476
|
-
version
|
|
476
|
+
version,
|
|
477
|
+
token
|
|
477
478
|
);
|
|
478
479
|
|
|
479
480
|
//Converts the data inside the datasheets object to array
|