contentoh-components-library 21.0.31 → 21.0.34
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 +5 -16
- package/.env.production +3 -14
- package/CHANGELOG.md +33 -31
- package/dist/assets/images/carouselImagesLogin/login2.svg +117 -0
- package/dist/assets/images/carouselImagesLogin/login3.svg +147 -0
- package/dist/assets/images/carouselImagesLogin/loginImage.svg +301 -0
- package/dist/components/atoms/AsignationOption/index.js +5 -9
- package/dist/components/atoms/AsignationOption/styles.js +1 -1
- package/dist/components/atoms/CheckBox/index.js +2 -4
- package/dist/components/atoms/GeneralButton/index.js +0 -5
- package/dist/components/atoms/GeneralButton/styles.js +2 -4
- package/dist/components/atoms/GeneralInput/index.js +24 -73
- package/dist/components/atoms/GeneralInput/styles.js +1 -7
- package/dist/components/atoms/GenericModal/index.js +2 -4
- package/dist/components/atoms/GenericModal/styles.js +1 -1
- package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +36 -0
- package/dist/components/atoms/ListCommercialRetailers/index.js +64 -0
- package/dist/components/atoms/ListCommercialRetailers/styles.js +20 -0
- package/dist/components/atoms/Loading/Loading.stories.js +28 -0
- package/dist/components/atoms/Loading/index.js +2 -1
- package/dist/components/atoms/Loading/styles.js +4 -8
- package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +37 -0
- package/dist/components/atoms/MenuCommercialRetailers/index.js +25 -0
- package/dist/components/{molecules/RetailerSelector → atoms/MenuCommercialRetailers}/styles.js +1 -1
- package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +28 -0
- package/dist/components/atoms/MenuProductImage/index.js +88 -0
- package/dist/components/atoms/MenuProductImage/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 +5 -3
- package/dist/components/atoms/ScreenHeader/index.js +1 -1
- package/dist/components/atoms/ScreenHeader/styles.js +1 -1
- package/dist/components/atoms/StatusTag/index.js +2 -37
- package/dist/components/atoms/StatusTag/styles.js +1 -1
- package/dist/components/atoms/ValidationPanel/index.js +3 -4
- package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +22 -0
- package/dist/components/atoms/VerticalSideMenuMainPage/index.js +49 -0
- package/dist/components/atoms/{Commentary → VerticalSideMenuMainPage}/styles.js +1 -6
- package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +25 -0
- package/dist/components/molecules/ApproveRejetPanel/index.js +49 -0
- package/dist/components/{atoms/CharCounter → molecules/ApproveRejetPanel}/styles.js +1 -3
- package/dist/components/molecules/AvatarAndValidation/index.js +7 -17
- package/dist/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/dist/components/molecules/CarouselImagesLogin/index.js +40 -42
- package/dist/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +28 -0
- package/dist/components/molecules/EmailResetPasswordLogin/index.js +155 -0
- package/dist/components/molecules/EmailResetPasswordLogin/styles.js +20 -0
- package/dist/components/molecules/FeaturesBar/index.js +1 -1
- package/dist/components/molecules/GalleryElement/index.js +21 -80
- package/dist/components/molecules/GalleryElement/styles.js +1 -1
- package/dist/components/molecules/GalleryHeader/index.js +6 -28
- package/dist/components/molecules/GalleryHeader/styles.js +1 -1
- package/dist/components/molecules/ImageSelector/index.js +4 -2
- package/dist/components/molecules/ProductNameHeader/index.js +2 -1
- package/dist/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +28 -0
- package/dist/components/molecules/RegistrationFirstStep/index.js +336 -0
- package/dist/components/molecules/RegistrationFirstStep/styles.js +20 -0
- package/dist/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +28 -0
- package/dist/components/molecules/RegistrationSecondStep/index.js +156 -0
- package/dist/components/molecules/RegistrationSecondStep/styles.js +20 -0
- package/dist/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +28 -0
- package/dist/components/molecules/RegistrationThirdStep/index.js +161 -0
- package/dist/components/molecules/RegistrationThirdStep/styles.js +20 -0
- package/dist/components/{atoms/CharCounter/CharCounter.stories.js → molecules/SignInLogin/SignInLogin.stories.js} +7 -10
- package/dist/components/molecules/SignInLogin/index.js +292 -0
- package/dist/components/molecules/SignInLogin/styles.js +20 -0
- package/dist/components/molecules/StatusAsignationInfo/index.js +25 -46
- package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
- package/dist/components/molecules/TableHeader/index.js +5 -12
- package/dist/components/molecules/TableHeader/styles.js +1 -1
- package/dist/components/molecules/TagAndInput/index.js +2 -26
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +28 -0
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +104 -0
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/styles.js +20 -0
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/utils.js +69 -0
- package/dist/components/{atoms/InputFormatter/Wysiwyg.stories.js → organisms/ChangePassword/ChangePassword.stories.js} +7 -9
- package/dist/components/organisms/ChangePassword/index.js +113 -0
- package/dist/components/organisms/ChangePassword/styles.js +18 -0
- package/dist/components/organisms/FullProductNameHeader/index.js +8 -32
- package/dist/components/organisms/FullTabsMenu/index.js +5 -18
- package/dist/components/organisms/ImageDataTable/index.js +14 -90
- package/dist/components/organisms/InputGroup/index.js +13 -34
- package/dist/components/organisms/InputGroup/styles.js +1 -1
- package/dist/components/organisms/ProductImageModal/index.js +11 -15
- package/dist/components/organisms/ProductImageModal/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +347 -109
- package/dist/components/pages/RetailerProductEdition/index.js +59 -1589
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/global-files/data.js +53 -212
- package/dist/global-files/global-styles.css +0 -1
- package/dist/global-files/variables.js +0 -1
- package/dist/index.js +260 -31
- package/package.json +14 -12
- package/src/components/atoms/AsignationOption/index.js +5 -7
- package/src/components/atoms/AsignationOption/styles.js +1 -9
- package/src/components/atoms/CheckBox/index.js +2 -8
- package/src/components/atoms/GeneralButton/index.js +2 -9
- package/src/components/atoms/GeneralButton/styles.js +0 -23
- package/src/components/atoms/GeneralInput/index.js +21 -71
- package/src/components/atoms/GeneralInput/styles.js +1 -11
- package/src/components/atoms/GenericModal/index.js +2 -2
- package/src/components/atoms/GenericModal/styles.js +2 -10
- package/src/components/atoms/Loading/Loading.stories.js +10 -0
- package/src/components/atoms/Loading/index.js +5 -4
- package/src/components/atoms/Loading/styles.js +43 -43
- 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 +3 -54
- package/src/components/atoms/ScreenHeader/index.js +3 -7
- package/src/components/atoms/ScreenHeader/styles.js +2 -9
- package/src/components/atoms/StatusTag/index.js +2 -30
- package/src/components/atoms/StatusTag/styles.js +3 -15
- package/src/components/atoms/ValidationPanel/index.js +3 -3
- package/src/components/molecules/AvatarAndValidation/index.js +6 -24
- package/src/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/src/components/molecules/CarouselImagesLogin/index.js +34 -37
- package/src/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +11 -0
- package/src/components/molecules/EmailResetPasswordLogin/index.js +86 -0
- package/src/components/molecules/EmailResetPasswordLogin/styles.js +23 -0
- package/src/components/molecules/FeaturesBar/index.js +7 -10
- package/src/components/molecules/GalleryElement/index.js +36 -75
- package/src/components/molecules/GalleryElement/styles.js +11 -38
- package/src/components/molecules/GalleryHeader/index.js +8 -14
- package/src/components/molecules/GalleryHeader/styles.js +0 -16
- package/src/components/molecules/ImageSelector/index.js +3 -2
- package/src/components/molecules/ProductNameHeader/index.js +2 -1
- package/src/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +11 -0
- package/src/components/molecules/RegistrationFirstStep/index.js +242 -0
- package/src/components/molecules/RegistrationFirstStep/styles.js +81 -0
- package/src/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +11 -0
- package/src/components/molecules/RegistrationSecondStep/index.js +97 -0
- package/src/components/molecules/RegistrationSecondStep/styles.js +59 -0
- package/src/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +11 -0
- package/src/components/molecules/RegistrationThirdStep/index.js +109 -0
- package/src/components/molecules/RegistrationThirdStep/styles.js +44 -0
- package/src/components/molecules/SignInLogin/SignInLogin.stories.js +11 -0
- package/src/components/molecules/SignInLogin/index.js +206 -0
- package/src/components/molecules/SignInLogin/styles.js +78 -0
- package/src/components/molecules/StatusAsignationInfo/index.js +38 -62
- package/src/components/molecules/StatusAsignationInfo/styles.js +2 -12
- package/src/components/molecules/TableHeader/index.js +3 -16
- package/src/components/molecules/TableHeader/styles.js +0 -5
- package/src/components/molecules/TagAndInput/index.js +0 -24
- package/src/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +11 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +78 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/styles.js +49 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/utils.js +56 -0
- package/src/components/organisms/ChangePassword/ChangePassword.stories.js +11 -0
- package/src/components/organisms/ChangePassword/index.js +63 -0
- package/src/components/organisms/ChangePassword/styles.js +16 -0
- package/src/components/organisms/FullProductNameHeader/index.js +7 -28
- package/src/components/organisms/FullTabsMenu/index.js +3 -15
- package/src/components/organisms/ImageDataTable/index.js +11 -89
- package/src/components/organisms/InputGroup/index.js +11 -46
- package/src/components/organisms/InputGroup/styles.js +0 -3
- package/src/components/organisms/ProductImageModal/index.js +12 -20
- package/src/components/organisms/ProductImageModal/styles.js +0 -3
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +343 -117
- package/src/components/pages/RetailerProductEdition/index.js +46 -1225
- package/src/components/pages/RetailerProductEdition/styles.js +4 -67
- package/src/global-files/data.js +57 -156
- package/src/global-files/global-styles.css +0 -1
- package/src/global-files/variables.js +0 -1
- package/src/index.js +33 -1
- package/dist/assets/images/generalButton/downloadIcon.svg +0 -3
- package/dist/assets/images/modalsSVGs/attributesSent.svg +0 -208
- package/dist/assets/images/modalsSVGs/descriptionSent.svg +0 -237
- package/dist/assets/images/modalsSVGs/providerSent.svg +0 -445
- package/dist/assets/images/modalsSVGs/uploadingImages.svg +0 -148
- package/dist/components/atoms/CharCounter/index.js +0 -22
- package/dist/components/atoms/Commentary/Commentary.stories.js +0 -1
- package/dist/components/atoms/Commentary/index.js +0 -23
- package/dist/components/atoms/Input/index.js +0 -26
- package/dist/components/atoms/Input/style.js +0 -26
- package/dist/components/atoms/InputFormatter/index.js +0 -185
- package/dist/components/atoms/InputFormatter/styles.js +0 -33
- package/dist/components/atoms/LabelToInput/index.js +0 -53
- package/dist/components/atoms/LabelToInput/style.js +0 -22
- package/dist/components/atoms/Percent/Percent.stories.js +0 -39
- package/dist/components/atoms/Percent/index.js +0 -39
- package/dist/components/atoms/Percent/styles.js +0 -20
- package/dist/components/atoms/Select/index.js +0 -39
- package/dist/components/atoms/Select/style.js +0 -32
- package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +0 -48
- package/dist/components/molecules/RetailerSelector/index.js +0 -74
- package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +0 -31
- package/dist/components/molecules/TextAndGradient/index.js +0 -36
- package/dist/components/molecules/TextAndGradient/styles.js +0 -18
- package/src/assets/images/generalButton/downloadIcon.svg +0 -3
- package/src/assets/images/modalsSVGs/attributesSent.svg +0 -208
- package/src/assets/images/modalsSVGs/descriptionSent.svg +0 -237
- package/src/assets/images/modalsSVGs/providerSent.svg +0 -445
- package/src/assets/images/modalsSVGs/uploadingImages.svg +0 -148
- package/src/components/atoms/CharCounter/CharCounter.stories.js +0 -11
- package/src/components/atoms/CharCounter/index.js +0 -13
- package/src/components/atoms/CharCounter/styles.js +0 -10
- package/src/components/atoms/Commentary/Commentary.stories.js +0 -0
- package/src/components/atoms/Commentary/index.js +0 -9
- package/src/components/atoms/Commentary/styles.js +0 -16
- package/src/components/atoms/Input/index.js +0 -15
- package/src/components/atoms/Input/style.js +0 -31
- package/src/components/atoms/InputFormatter/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/InputFormatter/index.js +0 -141
- package/src/components/atoms/InputFormatter/styles.js +0 -40
- package/src/components/atoms/LabelToInput/index.js +0 -26
- package/src/components/atoms/LabelToInput/style.js +0 -41
- package/src/components/atoms/Select/index.js +0 -35
- package/src/components/atoms/Select/style.js +0 -76
- package/src/components/molecules/RetailerSelector/RetailerSelector.stories.js +0 -35
- package/src/components/molecules/RetailerSelector/index.js +0 -63
- package/src/components/molecules/RetailerSelector/styles.js +0 -18
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
|
-
import React from "react";
|
|
3
2
|
|
|
4
3
|
export const Button = ({
|
|
5
4
|
buttonType,
|
|
@@ -10,15 +9,9 @@ export const Button = ({
|
|
|
10
9
|
onClick,
|
|
11
10
|
}) => {
|
|
12
11
|
return (
|
|
13
|
-
<Container
|
|
14
|
-
className={buttonType}
|
|
15
|
-
buttonFont={buttonFont}
|
|
16
|
-
onClick={onClick}
|
|
17
|
-
key={`button-${buttonType}`}
|
|
18
|
-
disabled={buttonType === "general-button-disabled"}
|
|
19
|
-
>
|
|
12
|
+
<Container className={buttonType} buttonFont={buttonFont} onClick={onClick} key={`button-${buttonType}`}>
|
|
20
13
|
{buttonType.includes("general") && label}
|
|
21
|
-
{image && <img src={image} alt={altText}
|
|
14
|
+
{image && <img src={image} alt={altText}/>}
|
|
22
15
|
</Container>
|
|
23
16
|
);
|
|
24
17
|
};
|
|
@@ -12,7 +12,6 @@ import saveIcon from "../../../assets/images/generalButton/saveIcon.svg";
|
|
|
12
12
|
import saveIconHover from "../../../assets/images/generalButton/saveIconHover.svg";
|
|
13
13
|
import deleteIcon from "../../../assets/images/generalButton/deleteIcon.svg";
|
|
14
14
|
import deleteIconHover from "../../../assets/images/generalButton/deleteIconHover.svg";
|
|
15
|
-
import downloadIcon from "../../../assets/images/generalButton/downloadIcon.svg";
|
|
16
15
|
import { GlobalColors } from "../../../global-files/variables";
|
|
17
16
|
|
|
18
17
|
export const Container = styled.button`
|
|
@@ -93,19 +92,6 @@ export const Container = styled.button`
|
|
|
93
92
|
border: 1px solid ${GlobalColors.magenta_s2};
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
|
-
|
|
97
|
-
&.download-button {
|
|
98
|
-
background-image: url(${downloadIcon});
|
|
99
|
-
border: 1px solid ${GlobalColors.s3};
|
|
100
|
-
border-radius: 15px;
|
|
101
|
-
background-size: 15px;
|
|
102
|
-
|
|
103
|
-
&:hover {
|
|
104
|
-
color: white;
|
|
105
|
-
background-color: ${GlobalColors.magenta_s2};
|
|
106
|
-
border: 1px solid ${GlobalColors.magenta_s2};
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
95
|
}
|
|
110
96
|
|
|
111
97
|
&.general-arrow-button {
|
|
@@ -159,13 +145,4 @@ export const Container = styled.button`
|
|
|
159
145
|
&.row-layout {
|
|
160
146
|
background-image: url(${gridLayout});
|
|
161
147
|
}
|
|
162
|
-
|
|
163
|
-
&.general-button-disabled {
|
|
164
|
-
background-color: grey;
|
|
165
|
-
color: ${GlobalColors.white};
|
|
166
|
-
|
|
167
|
-
&:hover {
|
|
168
|
-
opacity: 1;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
148
|
`;
|
|
@@ -1,84 +1,38 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
import { Container } from "./styles";
|
|
3
|
-
import { InputFormatter } from "../InputFormatter";
|
|
4
|
-
import { CheckBox } from "../CheckBox";
|
|
5
3
|
|
|
6
4
|
export const GeneralInput = ({
|
|
7
5
|
inputType,
|
|
8
6
|
inputId,
|
|
7
|
+
inputCols,
|
|
8
|
+
inputRows,
|
|
9
9
|
inputName,
|
|
10
10
|
inputValue,
|
|
11
11
|
inputPlaceholder,
|
|
12
12
|
validateInput,
|
|
13
13
|
position,
|
|
14
14
|
inputsArray,
|
|
15
|
+
maxLength,
|
|
15
16
|
inputSize,
|
|
16
|
-
articleId,
|
|
17
|
-
updatedDatasheets,
|
|
18
|
-
setUpdatedDatasheets,
|
|
19
|
-
updatedDescriptions,
|
|
20
|
-
setUpdatedDescriptions,
|
|
21
|
-
maxChar,
|
|
22
|
-
isRequired,
|
|
23
|
-
version,
|
|
24
17
|
}) => {
|
|
25
|
-
const [textValue, setTextValue] = useState({
|
|
26
|
-
value: inputValue,
|
|
27
|
-
});
|
|
28
|
-
const [requiredEmpty, setRequiredEmpty] = useState(false);
|
|
18
|
+
const [textValue, setTextValue] = useState({ value: inputValue ?? "" });
|
|
29
19
|
|
|
30
|
-
const onHandleChange = (
|
|
31
|
-
|
|
32
|
-
setTextValue({ value: validateInput(
|
|
33
|
-
|
|
34
|
-
setTextValue({
|
|
35
|
-
value: inputType === "checkbox" ? evt.target.checked : evt.target.value,
|
|
36
|
-
});
|
|
37
|
-
let dataSave = updatedDatasheets.slice();
|
|
38
|
-
if (dataSave.length === 0)
|
|
39
|
-
dataSave.push({
|
|
40
|
-
articleId: articleId,
|
|
41
|
-
versionId: version,
|
|
42
|
-
attributeId: inputId,
|
|
43
|
-
value:
|
|
44
|
-
inputType === "checkbox" ? evt.target.checked : evt.target.value,
|
|
45
|
-
});
|
|
46
|
-
else if (dataSave.some((e) => e.attributeId === inputId)) {
|
|
47
|
-
dataSave.forEach((e) => {
|
|
48
|
-
if (e.attributeId === inputId) {
|
|
49
|
-
e.value =
|
|
50
|
-
inputType === "checkbox" ? evt.target.checked : evt.target.value;
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
} else {
|
|
54
|
-
dataSave.push({
|
|
55
|
-
articleId: articleId,
|
|
56
|
-
versionId: version,
|
|
57
|
-
attributeId: inputId,
|
|
58
|
-
value:
|
|
59
|
-
inputType === "checkbox" ? evt.target.checked : evt.target.value,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
setUpdatedDatasheets(dataSave);
|
|
63
|
-
}
|
|
20
|
+
const onHandleChange = (e) => {
|
|
21
|
+
validateInput
|
|
22
|
+
? setTextValue({ value: validateInput(e, position, inputsArray) })
|
|
23
|
+
: setTextValue(({ value }) => (value = e.target.value));
|
|
64
24
|
};
|
|
65
25
|
|
|
66
26
|
useEffect(() => {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
27
|
+
const input = document.querySelector(`textarea#${inputId}`);
|
|
28
|
+
if (input) {
|
|
29
|
+
input.style.cssText = "height:" + input.scrollHeight + "px";
|
|
30
|
+
}
|
|
71
31
|
}, [textValue]);
|
|
72
32
|
|
|
73
33
|
return (
|
|
74
|
-
<Container
|
|
75
|
-
{inputType
|
|
76
|
-
<CheckBox
|
|
77
|
-
id={inputId}
|
|
78
|
-
onChange={(e) => onHandleChange(e)}
|
|
79
|
-
defaultChecked={textValue.value === "true" ? true : false}
|
|
80
|
-
/>
|
|
81
|
-
) : inputType !== "textarea" ? (
|
|
34
|
+
<Container>
|
|
35
|
+
{inputType !== "textarea" ? (
|
|
82
36
|
<input
|
|
83
37
|
type={inputType}
|
|
84
38
|
id={inputId}
|
|
@@ -87,22 +41,18 @@ export const GeneralInput = ({
|
|
|
87
41
|
placeholder={inputPlaceholder}
|
|
88
42
|
value={textValue.value}
|
|
89
43
|
onInput={(e) => onHandleChange(e)}
|
|
90
|
-
|
|
91
|
-
maxLength={maxChar}
|
|
44
|
+
maxLength={maxLength && maxLength}
|
|
92
45
|
/>
|
|
93
46
|
) : (
|
|
94
|
-
<
|
|
47
|
+
<textarea
|
|
95
48
|
name={inputName}
|
|
96
|
-
|
|
49
|
+
id={inputId}
|
|
50
|
+
cols={inputCols}
|
|
51
|
+
rows={inputRows}
|
|
97
52
|
placeholder={inputPlaceholder}
|
|
98
|
-
|
|
53
|
+
value={textValue.value}
|
|
99
54
|
onChange={onHandleChange}
|
|
100
|
-
|
|
101
|
-
updatedDescriptions={updatedDescriptions}
|
|
102
|
-
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
103
|
-
maxChar={maxChar}
|
|
104
|
-
isRequired={isRequired}
|
|
105
|
-
/>
|
|
55
|
+
></textarea>
|
|
106
56
|
)}
|
|
107
57
|
</Container>
|
|
108
58
|
);
|
|
@@ -4,20 +4,10 @@ import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
|
4
4
|
export const Container = styled.div`
|
|
5
5
|
width: 100%;
|
|
6
6
|
|
|
7
|
-
> div {
|
|
8
|
-
label {
|
|
9
|
-
&:before {
|
|
10
|
-
outline: 1px solid ${({ isRequired }) => (isRequired ? "red" : "none")};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
7
|
input,
|
|
16
8
|
textarea {
|
|
17
9
|
width: 100%;
|
|
18
|
-
border: 1px solid
|
|
19
|
-
${({ isRequired }) => (isRequired ? "red" : `${GlobalColors.s2}`)};
|
|
20
|
-
|
|
10
|
+
border: 1px solid ${GlobalColors.s2};
|
|
21
11
|
font-family: ${FontFamily.AvenirNext};
|
|
22
12
|
color: ${GlobalColors.s4};
|
|
23
13
|
font-weight: normal;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
|
|
3
|
-
export const GenericModal = ({ componentsArray = [], buttonType
|
|
3
|
+
export const GenericModal = ({ componentsArray = [], buttonType }) => {
|
|
4
4
|
return (
|
|
5
5
|
<Container>
|
|
6
6
|
<div className={"global-styles " + buttonType}>
|
|
7
|
-
<button className="close-button"
|
|
7
|
+
<button className="close-button" />
|
|
8
8
|
{componentsArray?.map((component) => component)}
|
|
9
9
|
</div>
|
|
10
10
|
</Container>
|
|
@@ -12,13 +12,6 @@ export const Container = styled.div`
|
|
|
12
12
|
position: fixed;
|
|
13
13
|
background-color: rgba(59, 59, 59, 0.53);
|
|
14
14
|
backdrop-filter: blur(4px);
|
|
15
|
-
top: 0;
|
|
16
|
-
left: 0;
|
|
17
|
-
z-index: 100;
|
|
18
|
-
|
|
19
|
-
h2 {
|
|
20
|
-
overflow: initial;
|
|
21
|
-
}
|
|
22
15
|
|
|
23
16
|
.global-styles {
|
|
24
17
|
background-color: ${GlobalColors.deep_gray};
|
|
@@ -75,10 +68,9 @@ export const Container = styled.div`
|
|
|
75
68
|
margin-top: 30px;
|
|
76
69
|
}
|
|
77
70
|
}
|
|
78
|
-
.product-name-header
|
|
79
|
-
.retailer-name-header {
|
|
71
|
+
.product-name-header {
|
|
80
72
|
& + * {
|
|
81
|
-
margin-
|
|
73
|
+
margin-bottom: 30px;
|
|
82
74
|
}
|
|
83
75
|
}
|
|
84
76
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { Container
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
|
|
2
3
|
export const Loading = () => {
|
|
3
4
|
return (
|
|
4
|
-
<Container>
|
|
5
|
-
<
|
|
5
|
+
<Container >
|
|
6
|
+
<div className="loader">
|
|
6
7
|
<span className="first"></span>
|
|
7
8
|
<span className="second"></span>
|
|
8
9
|
<span className="third"></span>
|
|
9
|
-
</
|
|
10
|
+
</div>
|
|
10
11
|
</Container>
|
|
11
12
|
);
|
|
12
13
|
};
|
|
@@ -6,52 +6,52 @@ export const Container = styled.div`
|
|
|
6
6
|
align-items: center;
|
|
7
7
|
height: 100%;
|
|
8
8
|
width: 100%;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
height: 18px;
|
|
9
|
+
.loader {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
height: 100%;
|
|
14
|
+
width: 100%;
|
|
15
|
+
span {
|
|
16
|
+
display: inline-block;
|
|
17
|
+
border-radius: 100%;
|
|
18
|
+
margin-left: 5px;
|
|
19
|
+
opacity: 1;
|
|
20
|
+
}
|
|
21
|
+
.first {
|
|
22
|
+
background-color: #ff75cf;
|
|
23
|
+
}
|
|
24
|
+
.second {
|
|
25
|
+
background-color: #e33aa9;
|
|
26
|
+
}
|
|
27
|
+
.third {
|
|
28
|
+
background-color: #b12d84;
|
|
29
|
+
}
|
|
30
|
+
span:nth-child(1) {
|
|
31
|
+
width: 16px;
|
|
32
|
+
height: 16px;
|
|
33
|
+
animation: opacitychange 1s ease-in-out infinite;
|
|
34
|
+
}
|
|
35
|
+
span:nth-child(2) {
|
|
36
|
+
width: 18px;
|
|
37
|
+
height: 18px;
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
animation: opacitychange 1s ease-in-out 0.33s infinite;
|
|
40
|
+
}
|
|
41
|
+
span:nth-child(3) {
|
|
42
|
+
width: 20px;
|
|
43
|
+
height: 20px;
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
@keyframes opacitychange {
|
|
49
|
-
0%,
|
|
50
|
-
100% {
|
|
51
|
-
opacity: 0;
|
|
45
|
+
animation: opacitychange 1s ease-in-out 0.66s infinite;
|
|
52
46
|
}
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
@keyframes opacitychange {
|
|
48
|
+
0%,
|
|
49
|
+
100% {
|
|
50
|
+
opacity: 0;
|
|
51
|
+
}
|
|
52
|
+
60% {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
|
|
3
|
-
export const ProgressBar = ({ percent,
|
|
3
|
+
export const ProgressBar = ({ percent, backgroundColor }) => {
|
|
4
4
|
return (
|
|
5
|
-
<Container
|
|
5
|
+
<Container backgroundColor={backgroundColor}>
|
|
6
6
|
<p>{percent}%</p>
|
|
7
7
|
</Container>
|
|
8
8
|
);
|
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
3
|
|
|
4
4
|
export const Container = styled.div`
|
|
5
|
-
background-color: ${GlobalColors.
|
|
5
|
+
background-color: ${(props) => GlobalColors[props.backgroundColor]};
|
|
6
6
|
width: fit-content;
|
|
7
7
|
height: 27px;
|
|
8
8
|
padding: 4px;
|
|
@@ -11,59 +11,8 @@ export const Container = styled.div`
|
|
|
11
11
|
font-weight: 600;
|
|
12
12
|
font-size: 14px;
|
|
13
13
|
line-height: 19px;
|
|
14
|
-
color: ${(
|
|
15
|
-
backgroundColor === "s2" || backgroundColor === "s1"
|
|
14
|
+
color: ${(props) =>
|
|
15
|
+
props.backgroundColor === "s2" || props.backgroundColor === "s1"
|
|
16
16
|
? GlobalColors.s4
|
|
17
17
|
: GlobalColors.white};
|
|
18
|
-
|
|
19
|
-
&.status-As,
|
|
20
|
-
&.status-P {
|
|
21
|
-
background-color: ${GlobalColors.in_progress};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&.status-Pr,
|
|
25
|
-
&.status-Rr {
|
|
26
|
-
background-color: ${GlobalColors.reception};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&.status-AA,
|
|
30
|
-
&.status-AP,
|
|
31
|
-
&.status-AC,
|
|
32
|
-
&.status-AF {
|
|
33
|
-
background-color: ${GlobalColors.finished};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&.status-RA,
|
|
37
|
-
&.status-RF,
|
|
38
|
-
&.status-RP,
|
|
39
|
-
&.status-RC {
|
|
40
|
-
background-color: ${GlobalColors.rejected_status};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.status-Dat,
|
|
44
|
-
&.status-Dsc,
|
|
45
|
-
&.status-Imgs {
|
|
46
|
-
background-color: ${GlobalColors.s4};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&.status-Ex {
|
|
50
|
-
background-color: ${GlobalColors.exported};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&.status-DDI {
|
|
54
|
-
background-color: ${GlobalColors.original_purpura};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&.status-GLD {
|
|
58
|
-
background-color: ${GlobalColors.in_progress};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&.status-TAB {
|
|
62
|
-
background-color: ${GlobalColors.deep_gray};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&.status-Pt {
|
|
66
|
-
background-color: ${GlobalColors.s2};
|
|
67
|
-
color: ${GlobalColors.s4};
|
|
68
|
-
}
|
|
69
18
|
`;
|
|
@@ -8,16 +8,12 @@ export const ScreenHeader = ({
|
|
|
8
8
|
color,
|
|
9
9
|
headerType,
|
|
10
10
|
Paragraph,
|
|
11
|
+
|
|
11
12
|
}) => {
|
|
12
13
|
return (
|
|
13
|
-
<Container
|
|
14
|
-
fontFamily={fontFamily}
|
|
15
|
-
color={color}
|
|
16
|
-
className={headerType}
|
|
17
|
-
key={`title-${text}`}
|
|
18
|
-
>
|
|
14
|
+
<Container fontFamily={fontFamily} color={color} className={headerType} key={`title-${text}`}>
|
|
19
15
|
{text} {boldText && <span> {boldText}</span>}
|
|
20
|
-
{
|
|
16
|
+
{<p>{Paragraph}</p>}
|
|
21
17
|
</Container>
|
|
22
18
|
);
|
|
23
19
|
};
|
|
@@ -52,11 +52,6 @@ export const Container = styled.h2`
|
|
|
52
52
|
font-weight: 400;
|
|
53
53
|
font-size: 11px;
|
|
54
54
|
line-height: 18px;
|
|
55
|
-
|
|
56
|
-
&:last-child {
|
|
57
|
-
min-width: 50px;
|
|
58
|
-
text-align: center;
|
|
59
|
-
}
|
|
60
55
|
}
|
|
61
56
|
|
|
62
57
|
&.gray-table-row {
|
|
@@ -68,14 +63,12 @@ export const Container = styled.h2`
|
|
|
68
63
|
background-color: ${GlobalColors.s2};
|
|
69
64
|
padding: 1px 3px;
|
|
70
65
|
border-radius: 3px;
|
|
71
|
-
min-width: 50px;
|
|
72
|
-
text-align: center;
|
|
73
66
|
}
|
|
74
|
-
&.header-and-paragraph
|
|
67
|
+
&.header-and-paragraph{
|
|
75
68
|
font-family: ${FontFamily.Raleway};
|
|
76
69
|
font-size: 36px;
|
|
77
70
|
color: ${GlobalColors.s5};
|
|
78
|
-
p
|
|
71
|
+
p{
|
|
79
72
|
font-family: ${FontFamily.AvenirNext};
|
|
80
73
|
font-size: 14px;
|
|
81
74
|
color: ${GlobalColors.s4};
|
|
@@ -1,37 +1,9 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
|
|
3
3
|
export const StatusTag = ({ statusType, ovalForm }) => {
|
|
4
|
-
const getShortStatus = (status) => {
|
|
5
|
-
switch (status) {
|
|
6
|
-
case "COMPLETED":
|
|
7
|
-
return "C";
|
|
8
|
-
case "RECEPTION":
|
|
9
|
-
return "Pr";
|
|
10
|
-
case "NULL":
|
|
11
|
-
return "-";
|
|
12
|
-
case "RECEIVED":
|
|
13
|
-
return "Rc";
|
|
14
|
-
case "IN_PROGRESS":
|
|
15
|
-
return "P";
|
|
16
|
-
case "ASSIGNED":
|
|
17
|
-
return "As";
|
|
18
|
-
case "APPROVED":
|
|
19
|
-
return "Ap";
|
|
20
|
-
case "VALIDATING":
|
|
21
|
-
return "V";
|
|
22
|
-
case "PAID_OUT":
|
|
23
|
-
return "Po";
|
|
24
|
-
default:
|
|
25
|
-
return status;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
4
|
return (
|
|
29
|
-
<Container
|
|
30
|
-
|
|
31
|
-
ovalForm && "oval-form"
|
|
32
|
-
}`}
|
|
33
|
-
>
|
|
34
|
-
<p>{getShortStatus(statusType)}</p>
|
|
5
|
+
<Container className={`status-${statusType} ${ovalForm && "oval-form"}`}>
|
|
6
|
+
<p>{statusType}</p>
|
|
35
7
|
</Container>
|
|
36
8
|
);
|
|
37
9
|
};
|
|
@@ -2,8 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
3
|
|
|
4
4
|
export const Container = styled.div`
|
|
5
|
-
width:
|
|
6
|
-
padding: 0 10px;
|
|
5
|
+
width: 30px;
|
|
7
6
|
height: 20px;
|
|
8
7
|
background-color: ${GlobalColors.s3};
|
|
9
8
|
border-radius: 3px;
|
|
@@ -17,9 +16,7 @@ export const Container = styled.div`
|
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
&.status-As,
|
|
20
|
-
&.status-P
|
|
21
|
-
&.status-IN_PROGRESS,
|
|
22
|
-
&.status-QF {
|
|
19
|
+
&.status-P {
|
|
23
20
|
background-color: ${GlobalColors.in_progress};
|
|
24
21
|
}
|
|
25
22
|
|
|
@@ -29,19 +26,10 @@ export const Container = styled.div`
|
|
|
29
26
|
}
|
|
30
27
|
|
|
31
28
|
&.status-AA,
|
|
32
|
-
&.status-AP
|
|
33
|
-
&.status-AC,
|
|
34
|
-
&.status-AF {
|
|
29
|
+
&.status-AP {
|
|
35
30
|
background-color: ${GlobalColors.finished};
|
|
36
31
|
}
|
|
37
32
|
|
|
38
|
-
&.status-RA,
|
|
39
|
-
&.status-RF,
|
|
40
|
-
&.status-RP,
|
|
41
|
-
&.status-RC {
|
|
42
|
-
background-color: ${GlobalColors.rejected_status};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
33
|
&.status-Dat,
|
|
46
34
|
&.status-Dsc,
|
|
47
35
|
&.status-Imgs {
|
|
@@ -7,8 +7,8 @@ export const ValidationPanel = ({
|
|
|
7
7
|
id,
|
|
8
8
|
setOptionClicked,
|
|
9
9
|
setShowValidationPanel,
|
|
10
|
-
sendToFacilitator,
|
|
11
10
|
}) => {
|
|
11
|
+
|
|
12
12
|
const optionSelected = (option) => {
|
|
13
13
|
setOptionClicked(`${option}-button`);
|
|
14
14
|
setShowValidationPanel(false);
|
|
@@ -18,7 +18,7 @@ export const ValidationPanel = ({
|
|
|
18
18
|
<Container id={id}>
|
|
19
19
|
<button
|
|
20
20
|
onClick={() => {
|
|
21
|
-
|
|
21
|
+
optionSelected("accept");
|
|
22
22
|
}}
|
|
23
23
|
className="validation-option"
|
|
24
24
|
>
|
|
@@ -27,7 +27,7 @@ export const ValidationPanel = ({
|
|
|
27
27
|
</button>
|
|
28
28
|
<button
|
|
29
29
|
onClick={() => {
|
|
30
|
-
|
|
30
|
+
optionSelected("reject");
|
|
31
31
|
}}
|
|
32
32
|
className="validation-option"
|
|
33
33
|
>
|