contentoh-components-library 21.0.74 → 21.0.78

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.
Files changed (130) hide show
  1. package/.env.development +4 -2
  2. package/.env.production +4 -2
  3. package/CHANGELOG.md +39 -0
  4. package/dist/assets/images/editField/showPassword.png +0 -0
  5. package/dist/assets/images/sliderToolTip/infoIcon.svg +4 -0
  6. package/dist/assets/images/sliderToolTip/slide1.svg +5 -0
  7. package/dist/assets/images/sliderToolTip/slide2.svg +9 -0
  8. package/dist/assets/images/sliderToolTip/slide3.svg +9 -0
  9. package/dist/assets/images/sliderToolTip/slide4.svg +9 -0
  10. package/dist/assets/images/sliderToolTip/slide5.svg +40 -0
  11. package/dist/assets/images/verticalSideMenuMainPage/closeMenu.svg +4 -0
  12. package/dist/assets/images/verticalSideMenuMainPage/iconFAQS.svg +12 -0
  13. package/dist/assets/images/verticalSideMenuMainPage/iconGroup.svg +3 -0
  14. package/dist/assets/images/verticalSideMenuMainPage/iconLogo.svg +12 -0
  15. package/dist/assets/images/verticalSideMenuMainPage/iconLogoContentoh.svg +15 -0
  16. package/dist/assets/images/verticalSideMenuMainPage/iconProduct.svg +3 -0
  17. package/dist/assets/images/verticalSideMenuMainPage/iconSpeedometer.svg +12 -0
  18. package/dist/assets/images/verticalSideMenuMainPage/iconTask.svg +10 -0
  19. package/dist/assets/images/verticalSideMenuMainPage/openMenu.svg +4 -0
  20. package/dist/components/atoms/GeneralInput/index.js +2 -2
  21. package/dist/components/atoms/GradientPanel/styles.js +1 -1
  22. package/dist/components/atoms/Loading/Loading.stories.js +28 -0
  23. package/dist/components/atoms/Loading/index.js +1 -0
  24. package/dist/components/atoms/LogoImage/index.js +1 -0
  25. package/dist/components/atoms/SliderToolTip/SliderToolTip.stories.js +47 -0
  26. package/dist/components/atoms/SliderToolTip/index.js +200 -0
  27. package/dist/components/atoms/SliderToolTip/styles.js +24 -0
  28. package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +28 -0
  29. package/dist/components/atoms/VerticalSideMenuMainPage/index.js +99 -0
  30. package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +24 -0
  31. package/dist/components/molecules/CarouselImagesLogin/index.js +40 -42
  32. package/dist/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +28 -0
  33. package/dist/components/molecules/EmailResetPasswordLogin/index.js +153 -0
  34. package/dist/components/molecules/EmailResetPasswordLogin/styles.js +20 -0
  35. package/dist/components/molecules/LoginPasswordStrength/index.js +9 -9
  36. package/dist/components/molecules/LoginPasswordStrength/styles.js +1 -1
  37. package/dist/components/molecules/LogoLoading/Loading.stories.js +28 -0
  38. package/dist/components/molecules/LogoLoading/index.js +22 -0
  39. package/dist/components/molecules/LogoLoading/styles.js +18 -0
  40. package/dist/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +28 -0
  41. package/dist/components/molecules/RegistrationFirstStep/index.js +308 -0
  42. package/dist/components/molecules/RegistrationFirstStep/styles.js +20 -0
  43. package/dist/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +28 -0
  44. package/dist/components/molecules/RegistrationSecondStep/index.js +173 -0
  45. package/dist/components/molecules/RegistrationSecondStep/styles.js +20 -0
  46. package/dist/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +28 -0
  47. package/dist/components/molecules/RegistrationThirdStep/index.js +155 -0
  48. package/dist/components/molecules/RegistrationThirdStep/styles.js +20 -0
  49. package/dist/components/molecules/SignInLogin/SignInLogin.stories.js +28 -0
  50. package/dist/components/molecules/SignInLogin/index.js +315 -0
  51. package/dist/components/molecules/SignInLogin/styles.js +20 -0
  52. package/dist/components/molecules/StatusAsignationInfo/index.js +3 -2
  53. package/dist/components/molecules/TagAndInput/index.js +4 -2
  54. package/dist/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +28 -0
  55. package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +211 -0
  56. package/dist/components/molecules/VerificationCodeResetPasswordLogin/styles.js +20 -0
  57. package/dist/components/molecules/VerificationCodeResetPasswordLogin/utils.js +69 -0
  58. package/dist/components/organisms/ChangePassword/ChangePassword.stories.js +28 -0
  59. package/dist/components/organisms/ChangePassword/index.js +124 -0
  60. package/dist/components/organisms/ChangePassword/styles.js +18 -0
  61. package/dist/components/organisms/FullTabsMenu/index.js +4 -2
  62. package/dist/components/organisms/InputGroup/index.js +1 -0
  63. package/dist/components/pages/ProviderProductEdition/index.js +1 -0
  64. package/dist/components/pages/RetailerProductEdition/index.js +1 -0
  65. package/dist/components/pages/VerificationCodeResetPassword/index.js +1 -1
  66. package/dist/index.js +290 -30
  67. package/package.json +12 -4
  68. package/src/assets/images/editField/showPassword.png +0 -0
  69. package/src/assets/images/sliderToolTip/infoIcon.svg +4 -0
  70. package/src/assets/images/sliderToolTip/slide1.svg +5 -0
  71. package/src/assets/images/sliderToolTip/slide2.svg +9 -0
  72. package/src/assets/images/sliderToolTip/slide3.svg +9 -0
  73. package/src/assets/images/sliderToolTip/slide4.svg +9 -0
  74. package/src/assets/images/sliderToolTip/slide5.svg +40 -0
  75. package/src/assets/images/verticalSideMenuMainPage/closeMenu.svg +4 -0
  76. package/src/assets/images/verticalSideMenuMainPage/iconFAQS.svg +12 -0
  77. package/src/assets/images/verticalSideMenuMainPage/iconGroup.svg +3 -0
  78. package/src/assets/images/verticalSideMenuMainPage/iconLogo.svg +12 -0
  79. package/src/assets/images/verticalSideMenuMainPage/iconLogoContentoh.svg +15 -0
  80. package/src/assets/images/verticalSideMenuMainPage/iconProduct.svg +3 -0
  81. package/src/assets/images/verticalSideMenuMainPage/iconSpeedometer.svg +12 -0
  82. package/src/assets/images/verticalSideMenuMainPage/iconTask.svg +10 -0
  83. package/src/assets/images/verticalSideMenuMainPage/openMenu.svg +4 -0
  84. package/src/components/atoms/GeneralInput/index.js +1 -1
  85. package/src/components/atoms/GradientPanel/styles.js +1 -0
  86. package/src/components/atoms/Loading/Loading.stories.js +10 -0
  87. package/src/components/atoms/Loading/index.js +3 -2
  88. package/src/components/atoms/LogoImage/index.js +1 -1
  89. package/src/components/atoms/SliderToolTip/SliderToolTip.stories.js +23 -0
  90. package/src/components/atoms/SliderToolTip/index.js +182 -0
  91. package/src/components/atoms/SliderToolTip/styles.js +168 -0
  92. package/src/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +12 -0
  93. package/src/components/atoms/VerticalSideMenuMainPage/index.js +55 -0
  94. package/src/components/atoms/VerticalSideMenuMainPage/styles.js +45 -0
  95. package/src/components/molecules/CarouselImagesLogin/index.js +34 -37
  96. package/src/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +11 -0
  97. package/src/components/molecules/EmailResetPasswordLogin/index.js +85 -0
  98. package/src/components/molecules/EmailResetPasswordLogin/styles.js +23 -0
  99. package/src/components/molecules/LoginPasswordStrength/index.js +11 -6
  100. package/src/components/molecules/LoginPasswordStrength/styles.js +5 -1
  101. package/src/components/molecules/LogoLoading/Loading.stories.js +10 -0
  102. package/src/components/molecules/LogoLoading/index.js +12 -0
  103. package/src/components/molecules/LogoLoading/styles.js +16 -0
  104. package/src/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +11 -0
  105. package/src/components/molecules/RegistrationFirstStep/index.js +227 -0
  106. package/src/components/molecules/RegistrationFirstStep/styles.js +87 -0
  107. package/src/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +11 -0
  108. package/src/components/molecules/RegistrationSecondStep/index.js +136 -0
  109. package/src/components/molecules/RegistrationSecondStep/styles.js +64 -0
  110. package/src/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +11 -0
  111. package/src/components/molecules/RegistrationThirdStep/index.js +130 -0
  112. package/src/components/molecules/RegistrationThirdStep/styles.js +44 -0
  113. package/src/components/molecules/SignInLogin/SignInLogin.stories.js +11 -0
  114. package/src/components/molecules/SignInLogin/index.js +226 -0
  115. package/src/components/molecules/SignInLogin/styles.js +120 -0
  116. package/src/components/molecules/StatusAsignationInfo/index.js +2 -1
  117. package/src/components/molecules/TagAndInput/index.js +2 -0
  118. package/src/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +11 -0
  119. package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +171 -0
  120. package/src/components/molecules/VerificationCodeResetPasswordLogin/styles.js +54 -0
  121. package/src/components/molecules/VerificationCodeResetPasswordLogin/utils.js +54 -0
  122. package/src/components/organisms/ChangePassword/ChangePassword.stories.js +11 -0
  123. package/src/components/organisms/ChangePassword/index.js +77 -0
  124. package/src/components/organisms/ChangePassword/styles.js +13 -0
  125. package/src/components/organisms/FullTabsMenu/index.js +2 -0
  126. package/src/components/organisms/InputGroup/index.js +1 -0
  127. package/src/components/pages/ProviderProductEdition/index.js +1 -0
  128. package/src/components/pages/RetailerProductEdition/index.js +1 -0
  129. package/src/components/pages/VerificationCodeResetPassword/index.js +1 -1
  130. package/src/index.js +21 -1
@@ -0,0 +1,54 @@
1
+ /**
2
+ *
3
+ * @param {event} e event received triggered by verification code input
4
+ * @param {number} index index position from the verification code(VC) input array (i.e. digit 1,2,3 etc...)
5
+ * @param {array<html nodes>} inputsArray array which contains every VC digit input (used to change focus on input change)
6
+ */
7
+ export const validateInput = (e, index, inputsArray) => {
8
+ let isValid = false;
9
+ const inputNotEmpty = e.target.value.length > 0;
10
+ if (inputNotEmpty) {
11
+ if (validateInputNumber(e) !== null) {
12
+ isValid = true;
13
+ nextInputFocus(inputsArray, index++);
14
+ }
15
+ }
16
+ return isValid ? e.target.value : "";
17
+ };
18
+
19
+ /**
20
+ *
21
+ * @param {event} e event received triggered by verification code input
22
+ * @returns {boolean} if digit is a number
23
+ */
24
+ const validateInputNumber = (e) => {
25
+ return (e.target.value || String.fromCharCode(e.keyCode)).match(/[0-9]{1}/);
26
+ };
27
+
28
+ /**
29
+ *
30
+ * @param {array<html nodes>} inputsArray array which contains every VC digit input (used to change focus on input change)
31
+ * @param {number} index index position from the verification code(VC) input array (i.e. digit 1,2,3 etc...)
32
+ * changes focus to next input if digit typed is a number and there wasn't any before
33
+ */
34
+ const nextInputFocus = (inputsArray, index) => {
35
+ const button = document.getElementsByClassName("general-default-button");
36
+
37
+ inputsArray?.length && index === inputsArray?.length
38
+ ? button[0].focus()
39
+ : inputsArray[index]?.focus();
40
+ };
41
+
42
+ /**
43
+ *
44
+ * @param {array<html nodes>} inputsArray array which contains every VC digit input (used to check if there's any empty)
45
+ * @param {function} setEmptyVerificationCode function to update flag which handles if there's an empty char
46
+ * updates emptyVerificationFlag from father component
47
+ */
48
+ export const validate = (inputsArray) => {
49
+ let contInputEmpty = 0;
50
+ inputsArray.forEach((element) => {
51
+ element.value === "" ? 0 : contInputEmpty++;
52
+ });
53
+ return contInputEmpty !== inputsArray.length
54
+ };
@@ -0,0 +1,11 @@
1
+ import { ChangePassword } from "./index";
2
+
3
+ export default {
4
+ title: "Components/organisms/ChangePassword",
5
+ component: ChangePassword,
6
+ };
7
+ const Template = (args) => <ChangePassword {...args} />;
8
+
9
+ export const ChangePasswordDefault = Template.bind({});
10
+
11
+ ChangePasswordDefault.args = {};
@@ -0,0 +1,77 @@
1
+ import { Container } from "./styles";
2
+ import { LoginPasswordStrength } from "../../molecules/LoginPasswordStrength";
3
+ import { useState } from "react";
4
+ import { Button } from "../../atoms/GeneralButton";
5
+ import { LogoImage } from "../../atoms/LogoImage";
6
+ import { ScreenHeader } from "../../atoms/ScreenHeader";
7
+ import { GlobalColors, FontFamily } from "../../../global-files/variables";
8
+ import { GradientPanel } from "../../atoms/GradientPanel";
9
+
10
+ export const ChangePassword = (props) => {
11
+ const [emptyPassword, setEmptyPassword] = useState(false);
12
+ const [emptyConfirmPassword, setEmptyConfirmPassword] = useState(false);
13
+ const [matchPasswords, setMatchPasswords] = useState(true);
14
+
15
+ const validate = async (e) => {
16
+ e.preventDefault();
17
+ let password = document.querySelector("#newPasswordInput").value;
18
+ password.length < 8 ? setEmptyPassword(true) : setEmptyPassword(false);
19
+ let confirmPassword = document.querySelector("#confirmPasswordInput").value;
20
+ confirmPassword === ""
21
+ ? setEmptyConfirmPassword(true)
22
+ : setEmptyConfirmPassword(false);
23
+ if (password === confirmPassword) {
24
+ setMatchPasswords(true);
25
+ } else {
26
+ setMatchPasswords(false);
27
+ }
28
+ let valid = true;
29
+ if (
30
+ password.length < 8 ||
31
+ confirmPassword === "" ||
32
+ password !== confirmPassword
33
+ ) {
34
+ valid = false;
35
+ }
36
+ if (valid) {
37
+ sessionStorage.setItem("newPassword", JSON.stringify(password));
38
+ !sessionStorage.getItem("resetPasswordProcess")
39
+ ? props.setPaso(9)
40
+ : props.setPaso(11);
41
+ }
42
+ };
43
+
44
+ const loginRight = [
45
+ <LogoImage key="1" />,
46
+ <div className="credenciales" key={"2"}>
47
+ <ScreenHeader
48
+ fontFamily={FontFamily.AvenirNext}
49
+ color={GlobalColors.s5}
50
+ text={"Ingresa tus credenciales"}
51
+ />
52
+ </div>,
53
+ <LoginPasswordStrength
54
+ emptyPassword={emptyPassword}
55
+ emptyConfirmPassword={emptyConfirmPassword}
56
+ matchPasswords={matchPasswords}
57
+ textTittle={"Ingresa tus credenciales"}
58
+ key="3"
59
+ />,
60
+ <div className="button-center" key="4">
61
+ <Button
62
+ buttonType={"general-default-button"}
63
+ label={"Enviar"}
64
+ onClick={(e) => validate(e)}
65
+ />
66
+ </div>,
67
+ ];
68
+ return (
69
+ <Container>
70
+ <GradientPanel
71
+ panelColor={GlobalColors.white}
72
+ componentsArray={loginRight}
73
+ panelType={"home-login"}
74
+ ></GradientPanel>
75
+ </Container>
76
+ );
77
+ };
@@ -0,0 +1,13 @@
1
+ import styled from "styled-components";
2
+
3
+ export const Container = styled.div`
4
+ width: 50%;
5
+ height: 100vh;
6
+ .button-center {
7
+ display: flex;
8
+ justify-content: center;
9
+ .general-default-button {
10
+ width: 160px;
11
+ }
12
+ }
13
+ `;
@@ -15,6 +15,7 @@ export const FullTabsMenu = ({
15
15
  downloadImages,
16
16
  askToDeleteImages,
17
17
  onClickSave,
18
+ showSaveButton,
18
19
  }) => {
19
20
  const [imagesSection, setImagesSection] = useState(false);
20
21
 
@@ -36,6 +37,7 @@ export const FullTabsMenu = ({
36
37
  downloadImages={downloadImages}
37
38
  onClickSave={onClickSave}
38
39
  askToDeleteImages={askToDeleteImages}
40
+ showSaveButton={showSaveButton}
39
41
  />
40
42
  </Container>
41
43
  );
@@ -14,6 +14,7 @@ export const InputGroup = ({
14
14
  version,
15
15
  dinamicHeight,
16
16
  }) => {
17
+ console.log(dataInputs, "dataInputs");
17
18
  const inputTypeValue = (type) => {
18
19
  switch (type) {
19
20
  case "Booleano":
@@ -1234,6 +1234,7 @@ export const ProviderProductEdition = ({
1234
1234
  assig={assig}
1235
1235
  setAssignation={setAssignation}
1236
1236
  isRetailer={isRetailer}
1237
+ showSaveButton={["AP", "AC", "RC"].includes(product.version_status)}
1237
1238
  onClickSave={() => {
1238
1239
  switch (activeTab) {
1239
1240
  case "Descripción":
@@ -1123,6 +1123,7 @@ export const RetailerProductEdition = ({
1123
1123
  assig={assig[activeTab]}
1124
1124
  setAssignation={setAssignation}
1125
1125
  isRetailer={isRetailer}
1126
+ showSaveButton={true}
1126
1127
  onClickSave={() => {
1127
1128
  switch (activeTab) {
1128
1129
  case "Descripción":
@@ -47,7 +47,7 @@ export const VerificationCodeResetPassword = ({
47
47
  validateInput={validateInput}
48
48
  inputsArray={inputCodeVerificationAll}
49
49
  position={position}
50
- maxLength="1"
50
+ maxChar={1}
51
51
  />
52
52
  ))}
53
53
  </div>
package/src/index.js CHANGED
@@ -11,32 +11,45 @@ export * from "./components/atoms/GeneralButton/index";
11
11
  export * from "./components/atoms/GeneralInput/index";
12
12
  export * from "./components/atoms/GeneralTextBox/index";
13
13
  export * from "./components/atoms/GradientPanel/index";
14
+ export * from "./components/atoms/Loading/index";
15
+ export * from "./components/atoms/LogoImage/index";
14
16
  export * from "./components/atoms/PriorityFlag/index";
15
17
  export * from "./components/atoms/ProductImage/index";
16
18
  export * from "./components/atoms/ProgressBar/index";
17
19
  export * from "./components/atoms/ScreenHeader/index";
18
20
  export * from "./components/atoms/SideMenuButton/index";
21
+ export * from "./components/atoms/SliderToolTip/index";
19
22
  export * from "./components/atoms/StatusTag/index";
20
23
  export * from "./components/atoms/TabSection/index";
21
24
  export * from "./components/atoms/ValidationPanel/index";
25
+ export * from "./components/atoms/VerticalSideMenuMainPage/index";
22
26
 
23
27
  //molecules
24
28
  export * from "./components/molecules/AvatarAndValidation/index";
29
+ export * from "./components/molecules/CarouselImagesLogin";
25
30
  export * from "./components/molecules/EditionActiveImage/index";
31
+ export * from "./components/molecules/EmailResetPasswordLogin/index";
26
32
  export * from "./components/molecules/FeaturesBar/index";
27
33
  export * from "./components/molecules/GalleryElement/index";
28
34
  export * from "./components/molecules/HeaderTop/index";
29
35
  export * from "./components/molecules/ImageSelector/index";
36
+ export * from "./components/molecules/LoginPasswordStrength/index";
37
+ export * from "./components/molecules/LogoLoading/index";
30
38
  export * from "./components/molecules/PlanSelection/index";
31
39
  export * from "./components/molecules/ProductNameHeader/index";
40
+ export * from "./components/molecules/RegistrationFirstStep/index";
41
+ export * from "./components/molecules/RegistrationSecondStep/index";
42
+ export * from "./components/molecules/RegistrationThirdStep/index";
43
+ export * from "./components/molecules/SignInLogin/index";
32
44
  export * from "./components/molecules/StatusAsignationInfo/index";
33
45
  export * from "./components/molecules/TableHeader/index";
34
46
  export * from "./components/molecules/TableRow/index";
35
47
  export * from "./components/molecules/TabsMenu/index";
36
48
  export * from "./components/molecules/TagAndInput/index";
37
- export * from "./components/molecules/TextAndGradient/index";
49
+ export * from "./components/molecules/VerificationCodeResetPasswordLogin/index";
38
50
 
39
51
  //organisms
52
+ export * from "./components/organisms/ChangePassword/index";
40
53
  export * from "./components/organisms/Fullplan/index";
41
54
  export * from "./components/organisms/FullProductNameHeader/index";
42
55
  export * from "./components/organisms/FullTabsMenu/index";
@@ -47,7 +60,14 @@ export * from "./components/organisms/InputGroup/index";
47
60
  export * from "./components/organisms/ProductImageModal/index";
48
61
 
49
62
  //pages
63
+ export * from "./components/pages/ChangePasswordLogin";
64
+ export * from "./components/pages/CustomerLogin";
50
65
  export * from "./components/pages/CustomerType";
66
+ export * from "./components/pages/EmailResetPassword";
51
67
  export * from "./components/pages/OnboardPlan";
68
+ export * from "./components/pages/RegistrationLoginFirstStep";
69
+ export * from "./components/pages/RegistrationLoginSecondStep";
70
+ export * from "./components/pages/RegistrationLoginThirdStep";
52
71
  export * from "./components/pages/RetailerProductEdition";
53
72
  export * from "./components/pages/ProviderProductEdition";
73
+ export * from "./components/pages/VerificationCodeResetPassword";