contentoh-components-library 21.0.72 → 21.0.75
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/.env.development +21 -4
- package/.env.production +19 -2
- package/CHANGELOG.md +37 -0
- package/dist/assets/images/generalButton/downloadIcon.svg +3 -0
- package/dist/assets/images/genericModal/closeWhite.svg +3 -0
- package/dist/assets/images/genericModal/errorModal.svg +3 -0
- package/dist/assets/images/genericModal/yellowAlert.svg +12 -0
- package/dist/assets/images/modalsSVGs/attributesSent.svg +208 -0
- package/dist/assets/images/modalsSVGs/descriptionSent.svg +237 -0
- package/dist/assets/images/modalsSVGs/providerSent.svg +445 -0
- package/dist/assets/images/modalsSVGs/uploadingImages.svg +148 -0
- package/dist/components/atoms/AsignationOption/index.js +9 -5
- package/dist/components/atoms/AsignationOption/styles.js +1 -1
- package/dist/components/{molecules/SignInLoginCreationApp/SignInLogin.stories.js → atoms/CharCounter/CharCounter.stories.js} +10 -7
- package/dist/components/atoms/CharCounter/index.js +22 -0
- package/dist/components/{molecules/ApproveRejetPanel → atoms/CharCounter}/styles.js +3 -1
- package/dist/components/atoms/CheckBox/index.js +4 -2
- package/dist/components/atoms/Commentary/Commentary.stories.js +1 -0
- package/dist/components/atoms/Commentary/index.js +23 -0
- package/dist/components/atoms/Commentary/styles.js +23 -0
- package/dist/components/atoms/GeneralButton/index.js +5 -0
- package/dist/components/atoms/GeneralButton/styles.js +4 -2
- package/dist/components/atoms/GeneralInput/index.js +72 -24
- package/dist/components/atoms/GeneralInput/styles.js +7 -1
- package/dist/components/atoms/GenericModal/index.js +4 -2
- package/dist/components/atoms/GenericModal/styles.js +1 -1
- package/dist/components/atoms/Input/index.js +26 -0
- package/dist/components/atoms/Input/style.js +26 -0
- package/dist/components/atoms/InputFormatter/Wysiwyg.stories.js +30 -0
- package/dist/components/atoms/InputFormatter/index.js +184 -0
- package/dist/components/atoms/InputFormatter/styles.js +33 -0
- package/dist/components/atoms/LabelToInput/index.js +53 -0
- package/dist/components/atoms/LabelToInput/style.js +22 -0
- package/dist/components/atoms/Percent/Percent.stories.js +39 -0
- package/dist/components/atoms/Percent/index.js +39 -0
- package/dist/components/atoms/Percent/styles.js +20 -0
- package/dist/components/atoms/PriorityFlag/index.js +1 -1
- package/dist/components/atoms/ProductImage/styles.js +1 -1
- package/dist/components/atoms/ProgressBar/index.js +2 -2
- package/dist/components/atoms/ProgressBar/styles.js +3 -5
- package/dist/components/atoms/ScreenHeader/index.js +1 -1
- package/dist/components/atoms/ScreenHeader/styles.js +1 -1
- package/dist/components/atoms/Select/index.js +39 -0
- package/dist/components/atoms/Select/style.js +32 -0
- package/dist/components/atoms/StatusTag/index.js +37 -2
- package/dist/components/atoms/StatusTag/styles.js +1 -1
- package/dist/components/atoms/ValidationPanel/index.js +5 -3
- package/dist/components/atoms/VerticalSideMenuMainPage/index.js +15 -10
- package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +1 -1
- package/dist/components/molecules/AvatarAndValidation/index.js +17 -7
- package/dist/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/dist/components/molecules/FeaturesBar/index.js +1 -1
- package/dist/components/molecules/GalleryElement/index.js +80 -21
- package/dist/components/molecules/GalleryElement/styles.js +1 -1
- package/dist/components/molecules/GalleryHeader/index.js +28 -6
- package/dist/components/molecules/GalleryHeader/styles.js +1 -1
- package/dist/components/molecules/ImageSelector/index.js +2 -4
- package/dist/components/molecules/ProductNameHeader/index.js +1 -2
- package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +48 -0
- package/dist/components/molecules/RetailerSelector/index.js +74 -0
- package/dist/components/{atoms/MenuCommercialRetailers → molecules/RetailerSelector}/styles.js +1 -1
- package/dist/components/molecules/StatusAsignationInfo/index.js +46 -28
- package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
- package/dist/components/molecules/TableHeader/index.js +12 -5
- package/dist/components/molecules/TableHeader/styles.js +1 -1
- package/dist/components/molecules/TagAndInput/index.js +24 -0
- package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +31 -0
- package/dist/components/molecules/TextAndGradient/index.js +36 -0
- package/dist/components/molecules/TextAndGradient/styles.js +18 -0
- package/dist/components/organisms/FullProductNameHeader/index.js +31 -9
- package/dist/components/organisms/FullTabsMenu/index.js +18 -5
- package/dist/components/organisms/GlobalModal/index.js +73 -0
- package/dist/components/organisms/GlobalModal/styles.js +66 -0
- package/dist/components/organisms/ImageDataTable/index.js +90 -14
- package/dist/components/organisms/InputGroup/index.js +34 -13
- package/dist/components/organisms/InputGroup/styles.js +1 -1
- package/dist/components/organisms/ProductImageModal/index.js +13 -10
- package/dist/components/organisms/ProductImageModal/styles.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +135 -0
- package/dist/components/pages/ProviderProductEdition/index.js +1979 -0
- package/dist/components/pages/ProviderProductEdition/styles.js +23 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +91 -347
- package/dist/components/pages/RetailerProductEdition/index.js +1610 -60
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/global-files/data.js +213 -53
- package/dist/global-files/global-styles.css +1 -0
- package/dist/global-files/variables.js +1 -0
- package/dist/index.js +13 -0
- package/package.json +16 -9
- package/src/assets/images/generalButton/downloadIcon.svg +3 -0
- package/src/assets/images/genericModal/closeWhite.svg +3 -0
- package/src/assets/images/genericModal/errorModal.svg +3 -0
- package/src/assets/images/genericModal/yellowAlert.svg +12 -0
- package/src/assets/images/modalsSVGs/attributesSent.svg +208 -0
- package/src/assets/images/modalsSVGs/descriptionSent.svg +237 -0
- package/src/assets/images/modalsSVGs/providerSent.svg +445 -0
- package/src/assets/images/modalsSVGs/uploadingImages.svg +148 -0
- package/src/components/atoms/AsignationOption/index.js +7 -5
- package/src/components/atoms/AsignationOption/styles.js +9 -1
- package/src/components/atoms/CharCounter/CharCounter.stories.js +11 -0
- package/src/components/atoms/CharCounter/index.js +13 -0
- package/src/components/atoms/CharCounter/styles.js +10 -0
- package/src/components/atoms/CheckBox/index.js +8 -2
- package/src/components/atoms/Commentary/Commentary.stories.js +0 -0
- package/src/components/atoms/Commentary/index.js +9 -0
- package/src/components/atoms/Commentary/styles.js +16 -0
- package/src/components/atoms/GeneralButton/index.js +9 -2
- package/src/components/atoms/GeneralButton/styles.js +23 -0
- package/src/components/atoms/GeneralInput/index.js +71 -22
- package/src/components/atoms/GeneralInput/styles.js +11 -1
- package/src/components/atoms/GenericModal/index.js +2 -2
- package/src/components/atoms/GenericModal/styles.js +10 -2
- package/src/components/atoms/Input/index.js +15 -0
- package/src/components/atoms/Input/style.js +31 -0
- package/src/components/atoms/InputFormatter/Wysiwyg.stories.js +12 -0
- package/src/components/atoms/InputFormatter/index.js +144 -0
- package/src/components/atoms/InputFormatter/styles.js +40 -0
- package/src/components/atoms/LabelToInput/index.js +26 -0
- package/src/components/atoms/LabelToInput/style.js +41 -0
- package/src/components/atoms/PriorityFlag/index.js +1 -1
- package/src/components/atoms/ProductImage/styles.js +1 -1
- package/src/components/atoms/ProgressBar/index.js +2 -2
- package/src/components/atoms/ProgressBar/styles.js +54 -3
- package/src/components/atoms/ScreenHeader/index.js +7 -3
- package/src/components/atoms/ScreenHeader/styles.js +9 -2
- package/src/components/atoms/Select/index.js +35 -0
- package/src/components/atoms/Select/style.js +76 -0
- package/src/components/atoms/StatusTag/index.js +30 -2
- package/src/components/atoms/StatusTag/styles.js +15 -3
- package/src/components/atoms/ValidationPanel/index.js +4 -3
- package/src/components/atoms/VerticalSideMenuMainPage/index.js +15 -11
- package/src/components/atoms/VerticalSideMenuMainPage/styles.js +8 -7
- package/src/components/molecules/AvatarAndValidation/index.js +23 -6
- package/src/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/src/components/molecules/FeaturesBar/index.js +10 -7
- package/src/components/molecules/GalleryElement/index.js +75 -36
- package/src/components/molecules/GalleryElement/styles.js +38 -11
- package/src/components/molecules/GalleryHeader/index.js +14 -8
- package/src/components/molecules/GalleryHeader/styles.js +16 -0
- package/src/components/molecules/ImageSelector/index.js +2 -3
- package/src/components/molecules/ProductNameHeader/index.js +1 -2
- package/src/components/molecules/RetailerSelector/RetailerSelector.stories.js +35 -0
- package/src/components/molecules/RetailerSelector/index.js +63 -0
- package/src/components/molecules/RetailerSelector/styles.js +18 -0
- package/src/components/molecules/StatusAsignationInfo/index.js +64 -39
- package/src/components/molecules/StatusAsignationInfo/styles.js +12 -2
- package/src/components/molecules/TableHeader/index.js +16 -3
- package/src/components/molecules/TableHeader/styles.js +5 -0
- package/src/components/molecules/TagAndInput/index.js +24 -0
- package/src/components/organisms/FullProductNameHeader/index.js +38 -8
- package/src/components/organisms/FullTabsMenu/index.js +15 -3
- package/src/components/organisms/GlobalModal/index.js +68 -0
- package/src/components/organisms/GlobalModal/styles.js +113 -0
- package/src/components/organisms/ImageDataTable/index.js +89 -11
- package/src/components/organisms/InputGroup/index.js +46 -11
- package/src/components/organisms/InputGroup/styles.js +3 -0
- package/src/components/organisms/ProductImageModal/index.js +19 -12
- package/src/components/organisms/ProductImageModal/styles.js +3 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +123 -0
- package/src/components/pages/ProviderProductEdition/index.js +1493 -0
- package/src/components/pages/ProviderProductEdition/styles.js +118 -0
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +91 -343
- package/src/components/pages/RetailerProductEdition/index.js +1245 -48
- package/src/components/pages/RetailerProductEdition/styles.js +67 -4
- package/src/global-files/data.js +158 -57
- package/src/global-files/global-styles.css +1 -0
- package/src/global-files/variables.js +1 -0
- package/src/index.js +1 -0
- package/dist/assets/images/editField/showPassword.png +0 -0
- package/dist/assets/images/sliderToolTip/infoIcon.svg +0 -4
- package/dist/assets/images/sliderToolTip/slide1.svg +0 -5
- package/dist/assets/images/sliderToolTip/slide2.svg +0 -9
- package/dist/assets/images/sliderToolTip/slide3.svg +0 -9
- package/dist/assets/images/sliderToolTip/slide4.svg +0 -9
- package/dist/assets/images/sliderToolTip/slide5.svg +0 -40
- package/dist/assets/images/verticalSideMenuMainPage/closeMenu.svg +0 -4
- package/dist/assets/images/verticalSideMenuMainPage/iconFAQS.svg +0 -12
- package/dist/assets/images/verticalSideMenuMainPage/iconGroup.svg +0 -3
- package/dist/assets/images/verticalSideMenuMainPage/iconLogo.svg +0 -12
- package/dist/assets/images/verticalSideMenuMainPage/iconLogoContentoh.svg +0 -15
- package/dist/assets/images/verticalSideMenuMainPage/iconProduct.svg +0 -3
- package/dist/assets/images/verticalSideMenuMainPage/iconSpeedometer.svg +0 -12
- package/dist/assets/images/verticalSideMenuMainPage/iconTask.svg +0 -10
- package/dist/assets/images/verticalSideMenuMainPage/openMenu.svg +0 -4
- package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +0 -36
- package/dist/components/atoms/ListCommercialRetailers/index.js +0 -64
- package/dist/components/atoms/ListCommercialRetailers/styles.js +0 -20
- package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +0 -37
- package/dist/components/atoms/MenuCommercialRetailers/index.js +0 -25
- package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +0 -28
- package/dist/components/atoms/MenuProductImage/index.js +0 -88
- package/dist/components/atoms/MenuProductImage/styles.js +0 -20
- package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +0 -25
- package/dist/components/molecules/ApproveRejetPanel/index.js +0 -49
- package/dist/components/molecules/SignInLoginCreationApp/index.js +0 -270
- package/dist/components/molecules/SignInLoginCreationApp/styles.js +0 -20
|
@@ -4,17 +4,18 @@ export const Container = styled.div`
|
|
|
4
4
|
height: 100%;
|
|
5
5
|
width: ${({ bar }) => (bar ? 200 : 58)}px;
|
|
6
6
|
box-sizing: border-box;
|
|
7
|
-
padding: 23px 10px
|
|
7
|
+
padding: 23px 10px 70px 10px;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
justify-content: space-between;
|
|
10
10
|
overflow: auto;
|
|
11
|
-
border-radius:
|
|
11
|
+
border-radius: ${({ bar }) => (bar ? 20 : 50)}px;
|
|
12
12
|
background: linear-gradient(180deg, #e33aa9 0%, #3b1366 100%);
|
|
13
13
|
scrollbar-width: none;
|
|
14
14
|
display: flex;
|
|
15
15
|
text-align: center;
|
|
16
16
|
img {
|
|
17
17
|
cursor: pointer;
|
|
18
|
+
width:"25px" !important;
|
|
18
19
|
}
|
|
19
20
|
.navbar-top {
|
|
20
21
|
& + * {
|
|
@@ -22,15 +23,15 @@ export const Container = styled.div`
|
|
|
22
23
|
}
|
|
23
24
|
.option {
|
|
24
25
|
div {
|
|
26
|
+
height: 38px;
|
|
27
|
+
display: flex;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
border-radius: 100%;
|
|
25
30
|
& + * {
|
|
26
31
|
margin-top: 12px;
|
|
27
32
|
}
|
|
28
33
|
}
|
|
29
|
-
|
|
30
|
-
padding: 5px 0px;
|
|
31
|
-
border-radius: 100%;
|
|
32
|
-
}
|
|
33
|
-
.icon:hover{
|
|
34
|
+
div:hover {
|
|
34
35
|
background: #e33aa9;
|
|
35
36
|
}
|
|
36
37
|
}
|
|
@@ -7,8 +7,17 @@ import { DropDownButton } from "../../atoms/DropDownButton";
|
|
|
7
7
|
import { Button } from "../../atoms/GeneralButton";
|
|
8
8
|
import { ValidationPanel } from "../../atoms/ValidationPanel";
|
|
9
9
|
import { useEffect } from "react";
|
|
10
|
+
import { RetailerSelector } from "../RetailerSelector";
|
|
10
11
|
|
|
11
|
-
export const AvatarAndValidation = ({
|
|
12
|
+
export const AvatarAndValidation = ({
|
|
13
|
+
retailers,
|
|
14
|
+
validation,
|
|
15
|
+
activeRetailer,
|
|
16
|
+
setActiveRetailer,
|
|
17
|
+
showValidationButtons,
|
|
18
|
+
approve,
|
|
19
|
+
reject,
|
|
20
|
+
}) => {
|
|
12
21
|
const [showValidationPanel, setShowValidationPanel] = useState(false);
|
|
13
22
|
const [buttonType, setButtonType] = useState(
|
|
14
23
|
validation ? validation : "null-button"
|
|
@@ -33,18 +42,26 @@ export const AvatarAndValidation = ({ avatarData, validation }) => {
|
|
|
33
42
|
return (
|
|
34
43
|
<Container>
|
|
35
44
|
<div className="buttons-container">
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
onClick={() => setShowValidationPanel(true)}
|
|
45
|
+
<RetailerSelector
|
|
46
|
+
retailers={retailers}
|
|
47
|
+
activeRetailer={activeRetailer}
|
|
48
|
+
setActiveRetailer={setActiveRetailer}
|
|
41
49
|
/>
|
|
50
|
+
<DropDownButton />
|
|
51
|
+
{showValidationButtons && (
|
|
52
|
+
<Button
|
|
53
|
+
buttonType={`circular-button ${buttonType}`}
|
|
54
|
+
onClick={() => setShowValidationPanel(true)}
|
|
55
|
+
/>
|
|
56
|
+
)}
|
|
42
57
|
</div>
|
|
43
58
|
{showValidationPanel && (
|
|
44
59
|
<ValidationPanel
|
|
45
60
|
id="validation-panel"
|
|
46
61
|
setOptionClicked={setButtonType}
|
|
47
62
|
setShowValidationPanel={setShowValidationPanel}
|
|
63
|
+
approve={approve}
|
|
64
|
+
reject={reject}
|
|
48
65
|
/>
|
|
49
66
|
)}
|
|
50
67
|
</Container>
|
|
@@ -15,13 +15,16 @@ export const FeaturesBar = ({ features }) => {
|
|
|
15
15
|
return (
|
|
16
16
|
<Container className={isIE ? "IEClass" : "gapClass"}>
|
|
17
17
|
{features !== undefined &&
|
|
18
|
-
features.map(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
features.map(
|
|
19
|
+
(feature, index) =>
|
|
20
|
+
feature.value && (
|
|
21
|
+
<FeatureTag
|
|
22
|
+
key={index}
|
|
23
|
+
feature={feature.feature}
|
|
24
|
+
value={feature.value}
|
|
25
|
+
/>
|
|
26
|
+
)
|
|
27
|
+
)}
|
|
25
28
|
</Container>
|
|
26
29
|
);
|
|
27
30
|
};
|
|
@@ -4,6 +4,7 @@ import { CheckBox } from "../../atoms/CheckBox";
|
|
|
4
4
|
import { Button } from "../../atoms/GeneralButton";
|
|
5
5
|
import { ValidationPanel } from "../../atoms/ValidationPanel";
|
|
6
6
|
import { useState, useEffect } from "react";
|
|
7
|
+
import Select from "../../atoms/Select";
|
|
7
8
|
|
|
8
9
|
export const GalleryElement = ({
|
|
9
10
|
validation = "null-button",
|
|
@@ -11,6 +12,14 @@ export const GalleryElement = ({
|
|
|
11
12
|
gridLayout = false,
|
|
12
13
|
id = "chk-default",
|
|
13
14
|
label,
|
|
15
|
+
index,
|
|
16
|
+
imageInputs,
|
|
17
|
+
imageType,
|
|
18
|
+
imagePackagingType,
|
|
19
|
+
changeImage,
|
|
20
|
+
selectedImages,
|
|
21
|
+
setSelectedImages,
|
|
22
|
+
setCheckAll,
|
|
14
23
|
}) => {
|
|
15
24
|
const [statusValidation, setStatusValidation] = useState(validation);
|
|
16
25
|
const [showValidationPanel, setShowValidationPanel] = useState(false);
|
|
@@ -25,6 +34,20 @@ export const GalleryElement = ({
|
|
|
25
34
|
}
|
|
26
35
|
};
|
|
27
36
|
|
|
37
|
+
const checkOnChange = (e) => {
|
|
38
|
+
const chkGlobal = document.getElementById("check-all-images");
|
|
39
|
+
const checkboxList = document.querySelectorAll("[id^='gallery-element-']");
|
|
40
|
+
let temp = selectedImages.slice();
|
|
41
|
+
e.target.checked
|
|
42
|
+
? temp.push(image)
|
|
43
|
+
: (temp = temp.filter((img) => image.id !== img.id));
|
|
44
|
+
let counter = 0;
|
|
45
|
+
checkboxList?.forEach((chk) => chk.checked && counter++);
|
|
46
|
+
chkGlobal.checked = checkboxList.length === counter;
|
|
47
|
+
setCheckAll(checkboxList.length === counter);
|
|
48
|
+
setSelectedImages(temp);
|
|
49
|
+
};
|
|
50
|
+
|
|
28
51
|
useEffect(() => {
|
|
29
52
|
if (showValidationPanel) {
|
|
30
53
|
document.addEventListener("click", closeValidationPanel, false);
|
|
@@ -34,50 +57,66 @@ export const GalleryElement = ({
|
|
|
34
57
|
return (
|
|
35
58
|
<Container className={gridLayout ? "grid-gallery" : "row-gallery"}>
|
|
36
59
|
<div className="buttons-container">
|
|
37
|
-
<CheckBox id={id} label={
|
|
38
|
-
<Button
|
|
39
|
-
buttonType={`circular-button ${statusValidation}`}
|
|
40
|
-
onClick={() => setShowValidationPanel(true)}
|
|
41
|
-
/>
|
|
42
|
-
{showValidationPanel && (
|
|
43
|
-
<ValidationPanel
|
|
44
|
-
id={"validation-panel"}
|
|
45
|
-
setOptionClicked={setStatusValidation}
|
|
46
|
-
setShowValidationPanel={setShowValidationPanel}
|
|
47
|
-
/>
|
|
48
|
-
)}
|
|
60
|
+
<CheckBox id={id} label={label} onChange={(e) => checkOnChange(e)} />
|
|
49
61
|
</div>
|
|
50
62
|
<div className="image-container">
|
|
51
63
|
<ProductImage
|
|
52
64
|
img={image?.src}
|
|
53
65
|
altText={image?.altText}
|
|
54
|
-
imageType={
|
|
55
|
-
gridLayout
|
|
56
|
-
? "catalogue-image-big-size"
|
|
57
|
-
: "catalogue-image-small-size"
|
|
58
|
-
}
|
|
66
|
+
imageType={`catalogue-image-${gridLayout ? "big" : "small"}-size`}
|
|
59
67
|
/>
|
|
60
68
|
<div className="information-container">
|
|
61
|
-
{/* name */}
|
|
62
69
|
<p>{image?.name}</p>
|
|
63
|
-
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
70
|
+
{!gridLayout && (
|
|
71
|
+
<>
|
|
72
|
+
<p>
|
|
73
|
+
{image.width}x{image.height}
|
|
74
|
+
</p>
|
|
75
|
+
<p>{image.ext}</p>
|
|
76
|
+
<Select
|
|
77
|
+
width="100%"
|
|
78
|
+
placeholder="Tipo de toma"
|
|
79
|
+
options={imageInputs}
|
|
80
|
+
valueSelected={image.image_id}
|
|
81
|
+
onChange={(e) => {
|
|
82
|
+
changeImage({
|
|
83
|
+
action: "changeImageInfo",
|
|
84
|
+
attribute: "image_id",
|
|
85
|
+
value: +e.target.value,
|
|
86
|
+
index: index,
|
|
87
|
+
});
|
|
88
|
+
}}
|
|
89
|
+
/>
|
|
90
|
+
<Select
|
|
91
|
+
width="100%"
|
|
92
|
+
placeholder="Tipo de imagen"
|
|
93
|
+
options={imageType}
|
|
94
|
+
valueSelected={image.image_type}
|
|
95
|
+
onChange={(e) => {
|
|
96
|
+
changeImage({
|
|
97
|
+
action: "changeImageInfo",
|
|
98
|
+
attribute: "image_type",
|
|
99
|
+
value: +e.target.value,
|
|
100
|
+
index: index,
|
|
101
|
+
});
|
|
102
|
+
}}
|
|
103
|
+
/>
|
|
104
|
+
<Select
|
|
105
|
+
width="100%"
|
|
106
|
+
placeholder="Tipo de empaque"
|
|
107
|
+
options={imagePackagingType}
|
|
108
|
+
valueSelected={image.packing_type}
|
|
109
|
+
onChange={(e) => {
|
|
110
|
+
changeImage({
|
|
111
|
+
action: "changeImageInfo",
|
|
112
|
+
attribute: "packing_type",
|
|
113
|
+
value: +e.target.value,
|
|
114
|
+
index: index,
|
|
115
|
+
});
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
</>
|
|
119
|
+
)}
|
|
81
120
|
</div>
|
|
82
121
|
</div>
|
|
83
122
|
</Container>
|
|
@@ -10,12 +10,12 @@ export const Container = styled.div`
|
|
|
10
10
|
|
|
11
11
|
.buttons-container {
|
|
12
12
|
position: absolute;
|
|
13
|
-
top:
|
|
13
|
+
top: 5px;
|
|
14
|
+
left: 5px;
|
|
14
15
|
width: 100%;
|
|
15
16
|
display: flex;
|
|
16
17
|
align-items: center;
|
|
17
18
|
justify-content: space-between;
|
|
18
|
-
padding: 0 5px;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.image-container {
|
|
@@ -40,10 +40,10 @@ export const Container = styled.div`
|
|
|
40
40
|
&.row-gallery {
|
|
41
41
|
display: flex;
|
|
42
42
|
align-items: center;
|
|
43
|
+
padding-right: 10px;
|
|
43
44
|
|
|
44
45
|
.buttons-container {
|
|
45
46
|
position: relative;
|
|
46
|
-
width: 58px;
|
|
47
47
|
display: flex;
|
|
48
48
|
align-items: center;
|
|
49
49
|
justify-content: space-between;
|
|
@@ -52,18 +52,17 @@ export const Container = styled.div`
|
|
|
52
52
|
.image-container {
|
|
53
53
|
display: flex;
|
|
54
54
|
align-items: center;
|
|
55
|
+
flex: 1;
|
|
55
56
|
.information-container {
|
|
56
57
|
display: flex;
|
|
58
|
+
flex: 1;
|
|
57
59
|
|
|
58
60
|
p {
|
|
59
61
|
font-family: ${FontFamily.Lato};
|
|
60
62
|
color: ${GlobalColors.s4};
|
|
61
63
|
font-size: 14px;
|
|
62
64
|
line-height: 17px;
|
|
63
|
-
|
|
64
|
-
& + p {
|
|
65
|
-
margin-left: 18px;
|
|
66
|
-
}
|
|
65
|
+
text-align: center;
|
|
67
66
|
|
|
68
67
|
&.highlighted-data {
|
|
69
68
|
font-family: ${FontFamily.AvenirNext};
|
|
@@ -75,12 +74,40 @@ export const Container = styled.div`
|
|
|
75
74
|
line-height: 18px;
|
|
76
75
|
padding: 0 10px;
|
|
77
76
|
}
|
|
77
|
+
|
|
78
|
+
&:nth-child(1) {
|
|
79
|
+
//min-width: calc(20% - 76px);
|
|
80
|
+
//flex: 1 0 20%;
|
|
81
|
+
min-width: 22%;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:nth-child(2),
|
|
85
|
+
&:nth-child(3) {
|
|
86
|
+
text-align: center;
|
|
87
|
+
}
|
|
88
|
+
&:nth-child(2) {
|
|
89
|
+
max-width: 90px;
|
|
90
|
+
min-width: 90px;
|
|
91
|
+
}
|
|
92
|
+
&:nth-child(3) {
|
|
93
|
+
max-width: 60px;
|
|
94
|
+
min-width: 60px;
|
|
95
|
+
}
|
|
96
|
+
/* &:nth-child(4) {
|
|
97
|
+
max-width: 90px;
|
|
98
|
+
min-width: 90px;
|
|
99
|
+
}
|
|
100
|
+
&:nth-child(5) {
|
|
101
|
+
max-width: 80px;
|
|
102
|
+
min-width: 80px;
|
|
103
|
+
} */
|
|
78
104
|
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
105
|
|
|
82
|
-
|
|
83
|
-
|
|
106
|
+
& > * {
|
|
107
|
+
flex: 1;
|
|
108
|
+
padding: 5px;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
84
111
|
}
|
|
85
112
|
}
|
|
86
113
|
`;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
import { CheckBox } from "../../atoms/CheckBox";
|
|
3
3
|
|
|
4
|
-
export const GalleryHeader = () => {
|
|
4
|
+
export const GalleryHeader = ({ setCheckAll, setSelectedImages }) => {
|
|
5
|
+
const checkAll = (e) => {
|
|
6
|
+
const checkboxList = document.querySelectorAll("[id^='gallery-element-']");
|
|
7
|
+
checkboxList.forEach((chk) => (chk.checked = e.target.checked));
|
|
8
|
+
setCheckAll(e.target.checked);
|
|
9
|
+
if (!e.target.checked) setSelectedImages([]);
|
|
10
|
+
};
|
|
5
11
|
return (
|
|
6
12
|
<Container>
|
|
7
13
|
<div>
|
|
8
|
-
<CheckBox />
|
|
14
|
+
<CheckBox id="check-all-images" onChange={(e) => checkAll(e)} />
|
|
9
15
|
</div>
|
|
10
|
-
<p className="value-header">Val.</p>
|
|
11
16
|
<p className="image-header">Image</p>
|
|
12
|
-
<p>Nombre</p>
|
|
13
|
-
<p>Tamaño</p>
|
|
14
|
-
<p>Formato</p>
|
|
15
|
-
<p>Tipo de
|
|
16
|
-
<p>
|
|
17
|
+
<p className="image-name">Nombre</p>
|
|
18
|
+
<p className="image-size">Tamaño</p>
|
|
19
|
+
<p className="image-format">Formato</p>
|
|
20
|
+
<p className="">Tipo de toma</p>
|
|
21
|
+
<p className="">Tipo de imagen</p>
|
|
22
|
+
<p className="">Tipo de empaque</p>
|
|
17
23
|
</Container>
|
|
18
24
|
);
|
|
19
25
|
};
|
|
@@ -25,5 +25,21 @@ export const Container = styled.div`
|
|
|
25
25
|
&.image-header {
|
|
26
26
|
max-width: 60px;
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
&.image-name {
|
|
30
|
+
min-width: 20%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.image-format {
|
|
34
|
+
max-width: 60px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.image-size {
|
|
38
|
+
max-width: 90px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.image-identifier {
|
|
42
|
+
max-width: 80px;
|
|
43
|
+
}
|
|
28
44
|
}
|
|
29
45
|
`;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
import { ProductImage } from "../../atoms/ProductImage/index";
|
|
3
|
-
import { getImage } from "../../../global-files/data";
|
|
4
3
|
|
|
5
4
|
export const ImageSelector = ({
|
|
6
5
|
images = [],
|
|
@@ -12,10 +11,10 @@ export const ImageSelector = ({
|
|
|
12
11
|
{images?.values?.map((image, index) => (
|
|
13
12
|
<ProductImage
|
|
14
13
|
key={index}
|
|
15
|
-
img={
|
|
14
|
+
img={image.src}
|
|
16
15
|
altText={image.altText}
|
|
17
16
|
imageType={modalSelector ? "catalogue-modal-image" : "carousel-image"}
|
|
18
|
-
onClick={() => setActiveImage(
|
|
17
|
+
onClick={() => setActiveImage(index)}
|
|
19
18
|
/>
|
|
20
19
|
))}
|
|
21
20
|
</Container>
|
|
@@ -8,7 +8,6 @@ export const ProductNameHeader = ({
|
|
|
8
8
|
productName,
|
|
9
9
|
statusType,
|
|
10
10
|
percent,
|
|
11
|
-
backgroundColor,
|
|
12
11
|
priority,
|
|
13
12
|
date,
|
|
14
13
|
}) => {
|
|
@@ -16,7 +15,7 @@ export const ProductNameHeader = ({
|
|
|
16
15
|
<Container>
|
|
17
16
|
<ScreenHeader headerType={"product-name-header"} text={productName} />
|
|
18
17
|
<StatusTag statusType={statusType} />
|
|
19
|
-
<ProgressBar percent={percent}
|
|
18
|
+
<ProgressBar percent={percent} progressBarType={statusType} />
|
|
20
19
|
<PriorityFlag priority={priority} />
|
|
21
20
|
<ScreenHeader headerType={"date-header"} text={date} />
|
|
22
21
|
</Container>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { RetailerSelector } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/molecules/RetailerSelector",
|
|
5
|
+
component: RetailerSelector,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <RetailerSelector {...args} />;
|
|
9
|
+
|
|
10
|
+
export const RetailerSelectorDefault = Template.bind({});
|
|
11
|
+
RetailerSelectorDefault.args = {
|
|
12
|
+
retailers: [
|
|
13
|
+
{
|
|
14
|
+
id: 2,
|
|
15
|
+
name: "Walmart Mercancías Generales",
|
|
16
|
+
country: "México",
|
|
17
|
+
id_region: 1,
|
|
18
|
+
active: 1,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 3,
|
|
22
|
+
name: "Sam´s Club",
|
|
23
|
+
country: "México",
|
|
24
|
+
id_region: 1,
|
|
25
|
+
active: 1,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 14,
|
|
29
|
+
name: "Maskota y Petsy",
|
|
30
|
+
country: "México",
|
|
31
|
+
id_region: 1,
|
|
32
|
+
active: 1,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { Avatar } from "../../atoms/Avatar";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { AsignationOption } from "../../atoms/AsignationOption";
|
|
5
|
+
|
|
6
|
+
export const RetailerSelector = ({
|
|
7
|
+
retailers,
|
|
8
|
+
activeRetailer,
|
|
9
|
+
setActiveRetailer,
|
|
10
|
+
}) => {
|
|
11
|
+
const [retailersPanel, setRetailersPanel] = useState(false);
|
|
12
|
+
|
|
13
|
+
const closeRetailersPanel = (e) => {
|
|
14
|
+
if (!e.target.closest("#retailers-assignation") && retailersPanel) {
|
|
15
|
+
document.removeEventListener("click", closeRetailersPanel, false);
|
|
16
|
+
setRetailersPanel(false);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (retailersPanel) {
|
|
22
|
+
document.addEventListener("click", closeRetailersPanel, false);
|
|
23
|
+
}
|
|
24
|
+
}, [retailersPanel]);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<Container id="retailers-assignation">
|
|
28
|
+
<Avatar
|
|
29
|
+
image={activeRetailer?.image}
|
|
30
|
+
altText={activeRetailer?.name}
|
|
31
|
+
imageType={"medium-image"}
|
|
32
|
+
onClick={() => {
|
|
33
|
+
retailers?.length > 1 && setRetailersPanel(!retailersPanel);
|
|
34
|
+
if (retailersPanel)
|
|
35
|
+
document.removeEventListener("click", closeRetailersPanel, false);
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
{retailersPanel && (
|
|
39
|
+
<div className="retailers-panel">
|
|
40
|
+
{retailers.map((retailer, index) => (
|
|
41
|
+
<AsignationOption
|
|
42
|
+
key={`${index}-${retailer?.name}`}
|
|
43
|
+
profileImage={retailer?.image}
|
|
44
|
+
imageType={"medium-image"}
|
|
45
|
+
asignationType={null}
|
|
46
|
+
name={retailer?.name}
|
|
47
|
+
team={retailer?.team}
|
|
48
|
+
onClick={() => {
|
|
49
|
+
setActiveRetailer(retailer);
|
|
50
|
+
document.removeEventListener(
|
|
51
|
+
"click",
|
|
52
|
+
closeRetailersPanel,
|
|
53
|
+
false
|
|
54
|
+
);
|
|
55
|
+
setRetailersPanel(false);
|
|
56
|
+
}}
|
|
57
|
+
/>
|
|
58
|
+
))}
|
|
59
|
+
</div>
|
|
60
|
+
)}
|
|
61
|
+
</Container>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
position: relative;
|
|
6
|
+
.retailers-panel {
|
|
7
|
+
background: ${GlobalColors.s2};
|
|
8
|
+
border: 1px solid ${GlobalColors.s3};
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.25);
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
padding: 10px;
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: calc(100% + 10px);
|
|
15
|
+
right: 0;
|
|
16
|
+
z-index: 10;
|
|
17
|
+
}
|
|
18
|
+
`;
|