contentoh-components-library 21.0.70 → 21.0.73

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 (261) hide show
  1. package/.env.development +20 -5
  2. package/.env.production +18 -3
  3. package/CHANGELOG.md +31 -33
  4. package/dist/assets/images/generalButton/downloadIcon.svg +3 -0
  5. package/dist/assets/images/genericModal/closeWhite.svg +3 -0
  6. package/dist/assets/images/genericModal/errorModal.svg +3 -0
  7. package/dist/assets/images/genericModal/yellowAlert.svg +12 -0
  8. package/dist/assets/images/modalsSVGs/attributesSent.svg +208 -0
  9. package/dist/assets/images/modalsSVGs/descriptionSent.svg +237 -0
  10. package/dist/assets/images/modalsSVGs/providerSent.svg +445 -0
  11. package/dist/assets/images/modalsSVGs/uploadingImages.svg +148 -0
  12. package/dist/components/atoms/AsignationOption/index.js +9 -5
  13. package/dist/components/atoms/AsignationOption/styles.js +1 -1
  14. package/dist/components/{molecules/SignInLogin/SignInLogin.stories.js → atoms/CharCounter/CharCounter.stories.js} +10 -7
  15. package/dist/components/atoms/CharCounter/index.js +22 -0
  16. package/dist/components/{molecules/LogoLoading → atoms/CharCounter}/styles.js +3 -1
  17. package/dist/components/atoms/CheckBox/index.js +4 -2
  18. package/dist/components/atoms/Commentary/Commentary.stories.js +1 -0
  19. package/dist/components/atoms/Commentary/index.js +23 -0
  20. package/dist/components/{organisms/ChangePassword → atoms/Commentary}/styles.js +6 -1
  21. package/dist/components/atoms/GeneralButton/index.js +5 -0
  22. package/dist/components/atoms/GeneralButton/styles.js +4 -2
  23. package/dist/components/atoms/GeneralInput/index.js +72 -25
  24. package/dist/components/atoms/GeneralInput/styles.js +7 -1
  25. package/dist/components/atoms/GenericModal/index.js +4 -2
  26. package/dist/components/atoms/GenericModal/styles.js +1 -1
  27. package/dist/components/atoms/GradientPanel/styles.js +1 -1
  28. package/dist/components/atoms/Input/index.js +26 -0
  29. package/dist/components/atoms/Input/style.js +26 -0
  30. package/dist/components/{organisms/ChangePassword/ChangePassword.stories.js → atoms/InputFormatter/Wysiwyg.stories.js} +9 -7
  31. package/dist/components/atoms/InputFormatter/index.js +184 -0
  32. package/dist/components/atoms/InputFormatter/styles.js +33 -0
  33. package/dist/components/atoms/LabelToInput/index.js +53 -0
  34. package/dist/components/atoms/LabelToInput/style.js +22 -0
  35. package/dist/components/atoms/Loading/index.js +0 -1
  36. package/dist/components/atoms/LogoImage/index.js +0 -1
  37. package/dist/components/atoms/Percent/Percent.stories.js +39 -0
  38. package/dist/components/atoms/Percent/index.js +39 -0
  39. package/dist/components/atoms/Percent/styles.js +20 -0
  40. package/dist/components/atoms/PriorityFlag/index.js +1 -1
  41. package/dist/components/atoms/ProductImage/styles.js +1 -1
  42. package/dist/components/atoms/ProgressBar/index.js +2 -2
  43. package/dist/components/atoms/ProgressBar/styles.js +3 -5
  44. package/dist/components/atoms/ScreenHeader/index.js +1 -1
  45. package/dist/components/atoms/ScreenHeader/styles.js +1 -1
  46. package/dist/components/atoms/Select/index.js +39 -0
  47. package/dist/components/atoms/Select/style.js +32 -0
  48. package/dist/components/atoms/StatusTag/index.js +37 -2
  49. package/dist/components/atoms/StatusTag/styles.js +1 -1
  50. package/dist/components/atoms/ValidationPanel/index.js +5 -3
  51. package/dist/components/molecules/AvatarAndValidation/index.js +17 -7
  52. package/dist/components/molecules/AvatarAndValidation/styles.js +1 -1
  53. package/dist/components/molecules/CarouselImagesLogin/index.js +42 -40
  54. package/dist/components/molecules/FeaturesBar/index.js +1 -1
  55. package/dist/components/molecules/GalleryElement/index.js +80 -21
  56. package/dist/components/molecules/GalleryElement/styles.js +1 -1
  57. package/dist/components/molecules/GalleryHeader/index.js +28 -6
  58. package/dist/components/molecules/GalleryHeader/styles.js +1 -1
  59. package/dist/components/molecules/ImageSelector/index.js +2 -4
  60. package/dist/components/molecules/LoginPasswordStrength/index.js +6 -6
  61. package/dist/components/molecules/LoginPasswordStrength/styles.js +1 -1
  62. package/dist/components/molecules/ProductNameHeader/index.js +1 -2
  63. package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +48 -0
  64. package/dist/components/molecules/RetailerSelector/index.js +74 -0
  65. package/dist/components/{atoms/MenuCommercialRetailers → molecules/RetailerSelector}/styles.js +1 -1
  66. package/dist/components/molecules/StatusAsignationInfo/index.js +46 -28
  67. package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
  68. package/dist/components/molecules/TableHeader/index.js +12 -5
  69. package/dist/components/molecules/TableHeader/styles.js +1 -1
  70. package/dist/components/molecules/TagAndInput/index.js +24 -2
  71. package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +31 -0
  72. package/dist/components/molecules/TextAndGradient/index.js +36 -0
  73. package/dist/components/molecules/TextAndGradient/styles.js +18 -0
  74. package/dist/components/organisms/FullProductNameHeader/index.js +31 -9
  75. package/dist/components/organisms/FullTabsMenu/index.js +18 -5
  76. package/dist/components/organisms/GlobalModal/index.js +73 -0
  77. package/dist/components/organisms/GlobalModal/styles.js +66 -0
  78. package/dist/components/organisms/ImageDataTable/index.js +90 -14
  79. package/dist/components/organisms/InputGroup/index.js +34 -13
  80. package/dist/components/organisms/InputGroup/styles.js +1 -1
  81. package/dist/components/organisms/ProductImageModal/index.js +13 -10
  82. package/dist/components/organisms/ProductImageModal/styles.js +1 -1
  83. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +135 -0
  84. package/dist/components/pages/ProviderProductEdition/index.js +1979 -0
  85. package/dist/components/pages/ProviderProductEdition/styles.js +23 -0
  86. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +91 -347
  87. package/dist/components/pages/RetailerProductEdition/index.js +1610 -60
  88. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  89. package/dist/global-files/data.js +213 -53
  90. package/dist/global-files/global-styles.css +1 -0
  91. package/dist/global-files/variables.js +1 -0
  92. package/dist/index.js +30 -277
  93. package/package.json +17 -18
  94. package/src/assets/images/generalButton/downloadIcon.svg +3 -0
  95. package/src/assets/images/genericModal/closeWhite.svg +3 -0
  96. package/src/assets/images/genericModal/errorModal.svg +3 -0
  97. package/src/assets/images/genericModal/yellowAlert.svg +12 -0
  98. package/src/assets/images/modalsSVGs/attributesSent.svg +208 -0
  99. package/src/assets/images/modalsSVGs/descriptionSent.svg +237 -0
  100. package/src/assets/images/modalsSVGs/providerSent.svg +445 -0
  101. package/src/assets/images/modalsSVGs/uploadingImages.svg +148 -0
  102. package/src/components/atoms/AsignationOption/index.js +7 -5
  103. package/src/components/atoms/AsignationOption/styles.js +9 -1
  104. package/src/components/atoms/CharCounter/CharCounter.stories.js +11 -0
  105. package/src/components/atoms/CharCounter/index.js +13 -0
  106. package/src/components/atoms/CharCounter/styles.js +10 -0
  107. package/src/components/atoms/CheckBox/index.js +8 -2
  108. package/src/components/atoms/Commentary/Commentary.stories.js +0 -0
  109. package/src/components/atoms/Commentary/index.js +9 -0
  110. package/src/components/atoms/Commentary/styles.js +16 -0
  111. package/src/components/atoms/GeneralButton/index.js +9 -2
  112. package/src/components/atoms/GeneralButton/styles.js +23 -0
  113. package/src/components/atoms/GeneralInput/index.js +71 -23
  114. package/src/components/atoms/GeneralInput/styles.js +11 -1
  115. package/src/components/atoms/GenericModal/index.js +2 -2
  116. package/src/components/atoms/GenericModal/styles.js +10 -2
  117. package/src/components/atoms/GradientPanel/styles.js +0 -1
  118. package/src/components/atoms/Input/index.js +15 -0
  119. package/src/components/atoms/Input/style.js +31 -0
  120. package/src/components/atoms/InputFormatter/Wysiwyg.stories.js +12 -0
  121. package/src/components/atoms/InputFormatter/index.js +144 -0
  122. package/src/components/atoms/InputFormatter/styles.js +40 -0
  123. package/src/components/atoms/LabelToInput/index.js +26 -0
  124. package/src/components/atoms/LabelToInput/style.js +41 -0
  125. package/src/components/atoms/Loading/index.js +2 -3
  126. package/src/components/atoms/LogoImage/index.js +1 -1
  127. package/src/components/atoms/PriorityFlag/index.js +1 -1
  128. package/src/components/atoms/ProductImage/styles.js +1 -1
  129. package/src/components/atoms/ProgressBar/index.js +2 -2
  130. package/src/components/atoms/ProgressBar/styles.js +54 -3
  131. package/src/components/atoms/ScreenHeader/index.js +7 -3
  132. package/src/components/atoms/ScreenHeader/styles.js +9 -2
  133. package/src/components/atoms/Select/index.js +35 -0
  134. package/src/components/atoms/Select/style.js +76 -0
  135. package/src/components/atoms/StatusTag/index.js +30 -2
  136. package/src/components/atoms/StatusTag/styles.js +15 -3
  137. package/src/components/atoms/ValidationPanel/index.js +4 -3
  138. package/src/components/molecules/AvatarAndValidation/index.js +23 -6
  139. package/src/components/molecules/AvatarAndValidation/styles.js +1 -1
  140. package/src/components/molecules/CarouselImagesLogin/index.js +37 -34
  141. package/src/components/molecules/FeaturesBar/index.js +10 -7
  142. package/src/components/molecules/GalleryElement/index.js +75 -36
  143. package/src/components/molecules/GalleryElement/styles.js +38 -11
  144. package/src/components/molecules/GalleryHeader/index.js +14 -8
  145. package/src/components/molecules/GalleryHeader/styles.js +16 -0
  146. package/src/components/molecules/ImageSelector/index.js +2 -3
  147. package/src/components/molecules/LoginPasswordStrength/index.js +3 -8
  148. package/src/components/molecules/LoginPasswordStrength/styles.js +0 -3
  149. package/src/components/molecules/ProductNameHeader/index.js +1 -2
  150. package/src/components/molecules/RetailerSelector/RetailerSelector.stories.js +35 -0
  151. package/src/components/molecules/RetailerSelector/index.js +63 -0
  152. package/src/components/molecules/RetailerSelector/styles.js +18 -0
  153. package/src/components/molecules/StatusAsignationInfo/index.js +64 -39
  154. package/src/components/molecules/StatusAsignationInfo/styles.js +12 -2
  155. package/src/components/molecules/TableHeader/index.js +16 -3
  156. package/src/components/molecules/TableHeader/styles.js +5 -0
  157. package/src/components/molecules/TagAndInput/index.js +24 -2
  158. package/src/components/organisms/FullProductNameHeader/index.js +38 -8
  159. package/src/components/organisms/FullTabsMenu/index.js +15 -3
  160. package/src/components/organisms/GlobalModal/index.js +68 -0
  161. package/src/components/organisms/GlobalModal/styles.js +113 -0
  162. package/src/components/organisms/ImageDataTable/index.js +89 -11
  163. package/src/components/organisms/InputGroup/index.js +46 -11
  164. package/src/components/organisms/InputGroup/styles.js +3 -0
  165. package/src/components/organisms/ProductImageModal/index.js +19 -12
  166. package/src/components/organisms/ProductImageModal/styles.js +3 -0
  167. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +123 -0
  168. package/src/components/pages/ProviderProductEdition/index.js +1493 -0
  169. package/src/components/pages/ProviderProductEdition/styles.js +118 -0
  170. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +91 -343
  171. package/src/components/pages/RetailerProductEdition/index.js +1245 -48
  172. package/src/components/pages/RetailerProductEdition/styles.js +67 -4
  173. package/src/global-files/data.js +158 -57
  174. package/src/global-files/global-styles.css +1 -0
  175. package/src/global-files/variables.js +1 -0
  176. package/src/index.js +1 -20
  177. package/dist/assets/images/editField/showPassword.png +0 -0
  178. package/dist/assets/images/sliderToolTip/infoIcon.svg +0 -4
  179. package/dist/assets/images/sliderToolTip/slide1.svg +0 -5
  180. package/dist/assets/images/sliderToolTip/slide2.svg +0 -9
  181. package/dist/assets/images/sliderToolTip/slide3.svg +0 -9
  182. package/dist/assets/images/sliderToolTip/slide4.svg +0 -9
  183. package/dist/assets/images/sliderToolTip/slide5.svg +0 -40
  184. package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +0 -36
  185. package/dist/components/atoms/ListCommercialRetailers/index.js +0 -64
  186. package/dist/components/atoms/ListCommercialRetailers/styles.js +0 -20
  187. package/dist/components/atoms/Loading/Loading.stories.js +0 -28
  188. package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +0 -37
  189. package/dist/components/atoms/MenuCommercialRetailers/index.js +0 -25
  190. package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +0 -28
  191. package/dist/components/atoms/MenuProductImage/index.js +0 -88
  192. package/dist/components/atoms/MenuProductImage/styles.js +0 -20
  193. package/dist/components/atoms/SliderToolTip/SliderToolTip.stories.js +0 -47
  194. package/dist/components/atoms/SliderToolTip/index.js +0 -200
  195. package/dist/components/atoms/SliderToolTip/styles.js +0 -24
  196. package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +0 -22
  197. package/dist/components/atoms/VerticalSideMenuMainPage/index.js +0 -49
  198. package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +0 -18
  199. package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +0 -25
  200. package/dist/components/molecules/ApproveRejetPanel/index.js +0 -49
  201. package/dist/components/molecules/ApproveRejetPanel/styles.js +0 -18
  202. package/dist/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +0 -28
  203. package/dist/components/molecules/EmailResetPasswordLogin/index.js +0 -153
  204. package/dist/components/molecules/EmailResetPasswordLogin/styles.js +0 -20
  205. package/dist/components/molecules/LogoLoading/Loading.stories.js +0 -28
  206. package/dist/components/molecules/LogoLoading/index.js +0 -22
  207. package/dist/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +0 -28
  208. package/dist/components/molecules/RegistrationFirstStep/index.js +0 -308
  209. package/dist/components/molecules/RegistrationFirstStep/styles.js +0 -20
  210. package/dist/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +0 -28
  211. package/dist/components/molecules/RegistrationSecondStep/index.js +0 -169
  212. package/dist/components/molecules/RegistrationSecondStep/styles.js +0 -20
  213. package/dist/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +0 -28
  214. package/dist/components/molecules/RegistrationThirdStep/index.js +0 -155
  215. package/dist/components/molecules/RegistrationThirdStep/styles.js +0 -20
  216. package/dist/components/molecules/SignInLogin/index.js +0 -321
  217. package/dist/components/molecules/SignInLogin/styles.js +0 -20
  218. package/dist/components/molecules/SignInLoginCreationApp/SignInLogin.stories.js +0 -28
  219. package/dist/components/molecules/SignInLoginCreationApp/index.js +0 -270
  220. package/dist/components/molecules/SignInLoginCreationApp/styles.js +0 -20
  221. package/dist/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +0 -28
  222. package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +0 -210
  223. package/dist/components/molecules/VerificationCodeResetPasswordLogin/styles.js +0 -20
  224. package/dist/components/molecules/VerificationCodeResetPasswordLogin/utils.js +0 -69
  225. package/dist/components/organisms/ChangePassword/index.js +0 -123
  226. package/src/assets/images/editField/showPassword.png +0 -0
  227. package/src/assets/images/sliderToolTip/infoIcon.svg +0 -4
  228. package/src/assets/images/sliderToolTip/slide1.svg +0 -5
  229. package/src/assets/images/sliderToolTip/slide2.svg +0 -9
  230. package/src/assets/images/sliderToolTip/slide3.svg +0 -9
  231. package/src/assets/images/sliderToolTip/slide4.svg +0 -9
  232. package/src/assets/images/sliderToolTip/slide5.svg +0 -40
  233. package/src/components/atoms/Loading/Loading.stories.js +0 -10
  234. package/src/components/atoms/SliderToolTip/SliderToolTip.stories.js +0 -23
  235. package/src/components/atoms/SliderToolTip/index.js +0 -182
  236. package/src/components/atoms/SliderToolTip/styles.js +0 -168
  237. package/src/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +0 -11
  238. package/src/components/molecules/EmailResetPasswordLogin/index.js +0 -85
  239. package/src/components/molecules/EmailResetPasswordLogin/styles.js +0 -23
  240. package/src/components/molecules/LogoLoading/Loading.stories.js +0 -10
  241. package/src/components/molecules/LogoLoading/index.js +0 -12
  242. package/src/components/molecules/LogoLoading/styles.js +0 -16
  243. package/src/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +0 -11
  244. package/src/components/molecules/RegistrationFirstStep/index.js +0 -227
  245. package/src/components/molecules/RegistrationFirstStep/styles.js +0 -87
  246. package/src/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +0 -11
  247. package/src/components/molecules/RegistrationSecondStep/index.js +0 -130
  248. package/src/components/molecules/RegistrationSecondStep/styles.js +0 -59
  249. package/src/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +0 -11
  250. package/src/components/molecules/RegistrationThirdStep/index.js +0 -130
  251. package/src/components/molecules/RegistrationThirdStep/styles.js +0 -44
  252. package/src/components/molecules/SignInLogin/SignInLogin.stories.js +0 -11
  253. package/src/components/molecules/SignInLogin/index.js +0 -226
  254. package/src/components/molecules/SignInLogin/styles.js +0 -120
  255. package/src/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +0 -11
  256. package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +0 -170
  257. package/src/components/molecules/VerificationCodeResetPasswordLogin/styles.js +0 -51
  258. package/src/components/molecules/VerificationCodeResetPasswordLogin/utils.js +0 -54
  259. package/src/components/organisms/ChangePassword/ChangePassword.stories.js +0 -11
  260. package/src/components/organisms/ChangePassword/index.js +0 -76
  261. package/src/components/organisms/ChangePassword/styles.js +0 -13
@@ -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 = ({ avatarData, validation }) => {
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
- <Avatar image={avatarData?.image} altText={avatarData?.altText} />
37
- <DropDownButton />
38
- <Button
39
- buttonType={`circular-button ${buttonType}`}
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>
@@ -8,7 +8,7 @@ export const Container = styled.div`
8
8
  display: flex;
9
9
  align-items: center;
10
10
 
11
- * + * {
11
+ > * + * {
12
12
  margin-left: 3px;
13
13
  }
14
14
  }
@@ -9,43 +9,46 @@ export const CarouselImagesLogin = ({
9
9
  panelColor,
10
10
  }) => {
11
11
  const carouselStart = () => {
12
- const images = panelImg;
13
- let i = 1;
14
- const img1 = document.querySelector("#img1");
15
- const img2 = document.querySelector("#img2");
16
- const divIndicadores = document.querySelector("#indicadores");
17
- for (let index = 0; index < images.length; index++) {
18
- const div = document.createElement("div");
19
- div.classList.add("circles");
20
- div.id = index;
21
- divIndicadores.appendChild(div);
22
- }
23
- img1.src = images[0];
24
- const circulos = document.querySelectorAll(".circles");
25
- circulos[0].classList.add("resaltado");
26
- const slideshow = () => {
27
- img2.src = images[i];
28
- const circulo_actual = Array.from(circulos).find((el) => el.id == i);
29
- Array.from(circulos).forEach((cir) => cir.classList.remove("resaltado"));
30
- circulo_actual.classList.add("resaltado");
31
- img1.classList.add("right");
32
- img2.classList.add("active");
33
- i++;
34
- if (i == images.length) {
35
- i = 0;
12
+ addEventListener("DOMContentLoaded", () => {
13
+ const images = panelImg;
14
+ let i = 1;
15
+ const img1 = document.querySelector("#img1");
16
+ const img2 = document.querySelector("#img2");
17
+ const divIndicadores = document.querySelector("#indicadores");
18
+ for (let index = 0; index < images.length; index++) {
19
+ const div = document.createElement("div");
20
+ div.classList.add("circles");
21
+ div.id = index;
22
+ divIndicadores.appendChild(div);
36
23
  }
37
- setTimeout(() => {
38
- img1.src = img2.src;
39
- img2.classList.remove("active");
40
- img1.classList.remove("right");
41
- }, 1000);
42
- };
43
- setInterval(slideshow, 4000);
24
+ img1.src = images[0];
25
+ const circulos = document.querySelectorAll(".circles");
26
+ circulos[0].classList.add("resaltado");
27
+ const slideshow = () => {
28
+ img2.src = images[i];
29
+ const circulo_actual = Array.from(circulos).find((el) => el.id == i);
30
+ Array.from(circulos).forEach((cir) =>
31
+ cir.classList.remove("resaltado")
32
+ );
33
+ circulo_actual.classList.add("resaltado");
34
+ img1.classList.add("right");
35
+ img2.classList.add("active");
36
+ i++;
37
+ if (i == images.length) {
38
+ i = 0;
39
+ }
40
+ setTimeout(() => {
41
+ img1.src = img2.src;
42
+ img2.classList.remove("active");
43
+ img1.classList.remove("right");
44
+ }, 1000);
45
+ };
46
+ setInterval(slideshow, 4000);
47
+ });
44
48
  };
45
-
46
- useEffect(() => {
49
+ useEffect(()=>{
47
50
  carouselStart();
48
- }, []);
51
+ },[])
49
52
 
50
53
  return (
51
54
  <Container panelColor={panelColor}>
@@ -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((feature, index) => (
19
- <FeatureTag
20
- key={index}
21
- feature={feature.feature}
22
- value={feature.value}
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={id} label={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
- {/* <p>{image?.data[0]?.value}</p> */}
64
- {/* size */}
65
- {!gridLayout &&
66
- image?.data.map(
67
- (element, index) =>
68
- index > 0 && <p key={index}>{element.value}</p>
69
- )}
70
- {/* <p>{image?.size}</p>
71
-
72
- {!gridLayout && (
73
- <>
74
- <p>{image?.format}</p>
75
- <p>{image?.resolution}</p>
76
- <p className="highlighted-data">{image?.imageType}</p>
77
- <p className="highlighted-image">{data?.identificator}</p>
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: 0;
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
- margin-left: 18px;
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 imagen</p>
16
- <p>Identificador</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={getImage(image, 85, 60).src}
14
+ img={image.src}
16
15
  altText={image.altText}
17
16
  imageType={modalSelector ? "catalogue-modal-image" : "carousel-image"}
18
- onClick={() => setActiveImage(getImage(image), 350, 295)}
17
+ onClick={() => setActiveImage(index)}
19
18
  />
20
19
  ))}
21
20
  </Container>
@@ -1,18 +1,15 @@
1
1
  import { Container, ItemPasswordStrength, Password } from "./styles";
2
2
  import { useEffect, useState } from "react";
3
3
  import { TagAndInput } from "../TagAndInput";
4
-
5
4
  export const LoginPasswordStrength = ({
6
5
  emptyPassword,
7
6
  emptyConfirmPassword,
8
7
  matchPasswords,
9
- required,
10
8
  }) => {
11
9
  const [passwordStrength, setPasswordStrength] = useState(0);
12
10
  let upperCaseLetters = /[A-Z]/g;
13
11
  let numbers = /[0-9]/g;
14
12
  let specialChar = /[‘!’,‘@’,‘#’,‘$’,‘%’,‘^’,‘&’,‘*’]/g;
15
-
16
13
  useEffect(() => {
17
14
  const inputValue = document.getElementById("newPasswordInput");
18
15
  inputValue.addEventListener(
@@ -23,7 +20,6 @@ export const LoginPasswordStrength = ({
23
20
  false
24
21
  );
25
22
  }, []);
26
-
27
23
  const updateInfo = (e, newValue) => {
28
24
  switch (e.target.id) {
29
25
  case "newPasswordInput":
@@ -39,11 +35,12 @@ export const LoginPasswordStrength = ({
39
35
  newValue.match(specialChar) &&
40
36
  setPasswordStrength((passwordStrength) => passwordStrength + 1);
41
37
  break;
38
+ case "confirmPasswordInput":
39
+ break;
42
40
  default:
43
41
  return;
44
42
  }
45
43
  };
46
-
47
44
  return (
48
45
  <Container>
49
46
  <div className="user" key={"3"}>
@@ -51,7 +48,6 @@ export const LoginPasswordStrength = ({
51
48
  inputType={"password"}
52
49
  inputId={"newPasswordInput"}
53
50
  label={"Ingrese su nueva contraseña"}
54
- required={required}
55
51
  />
56
52
  {emptyPassword && (
57
53
  <label>La contraseña debe ser minimo de 8 caracteres</label>
@@ -80,7 +76,6 @@ export const LoginPasswordStrength = ({
80
76
  inputType={"password"}
81
77
  inputId={"confirmPasswordInput"}
82
78
  label={"Confirme la nueva contraseña"}
83
- required={required}
84
79
  />
85
80
  {emptyConfirmPassword && !emptyPassword && (
86
81
  <label>Confirme la contraseña</label>
@@ -91,4 +86,4 @@ export const LoginPasswordStrength = ({
91
86
  </div>
92
87
  </Container>
93
88
  );
94
- };
89
+ };
@@ -20,9 +20,6 @@ export const Container = styled.div`
20
20
  font-family: ${FontFamily.Raleway_700};
21
21
  font-size: 11px;
22
22
  }
23
- & + *{
24
- margin-top: 20px;
25
- }
26
23
  `;
27
24
 
28
25
  export const Password = styled.div`
@@ -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} backgroundColor={backgroundColor} />
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
+ };