contentoh-components-library 21.4.72 → 21.4.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 (283) hide show
  1. package/dist/components/atoms/Avatar/index.js +2 -3
  2. package/dist/components/atoms/CheckBox/styles.js +1 -1
  3. package/dist/components/atoms/GeneralButton/styles.js +2 -6
  4. package/dist/components/atoms/InputFormatter/styles.js +3 -3
  5. package/dist/components/atoms/SliderToolTip/styles.js +1 -1
  6. package/dist/components/molecules/BoxAttribute/index.js +3 -3
  7. package/dist/components/molecules/BoxAttribute/styles.js +1 -1
  8. package/dist/components/molecules/BoxButtons/index.js +1 -0
  9. package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
  10. package/dist/components/molecules/HeaderTop/index.js +11 -68
  11. package/dist/components/molecules/SignInLogin/index.js +28 -36
  12. package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
  13. package/dist/components/organisms/Chat/Chat.stories.js +8 -27
  14. package/dist/components/organisms/Chat/ContainerItems/index.js +3 -19
  15. package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
  16. package/dist/components/organisms/Chat/ContentChat/index.js +197 -350
  17. package/dist/components/organisms/Chat/Footer/index.js +39 -48
  18. package/dist/components/organisms/Chat/index.js +4 -49
  19. package/dist/components/organisms/Chat/styles.js +1 -1
  20. package/dist/components/organisms/DashboardMetric/index.js +6 -12
  21. package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
  22. package/dist/components/organisms/InputGroup/index.js +10 -1
  23. package/dist/components/organisms/Modal/styles.js +1 -1
  24. package/dist/components/organisms/VersionSelector/index.js +4 -2
  25. package/dist/components/pages/Dashboard/Dashboard.stories.js +36 -33
  26. package/dist/components/pages/Dashboard/index.js +9 -37
  27. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +38 -34
  28. package/dist/components/pages/ProviderProductEdition/index.js +196 -190
  29. package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
  30. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +53 -52
  31. package/dist/components/pages/RetailerProductEdition/index.js +300 -318
  32. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  33. package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
  34. package/dist/global-files/data.js +29 -22
  35. package/dist/global-files/variables.js +1 -7
  36. package/dist/index.js +58 -201
  37. package/package.json +1 -2
  38. package/src/components/atoms/Avatar/index.js +2 -8
  39. package/src/components/atoms/CheckBox/styles.js +0 -2
  40. package/src/components/atoms/GeneralButton/styles.js +0 -46
  41. package/src/components/atoms/InputFormatter/styles.js +4 -9
  42. package/src/components/atoms/SliderToolTip/styles.js +1 -1
  43. package/src/components/atoms/TabSection/index.js +1 -1
  44. package/src/components/atoms/TabSection/styles.js +1 -1
  45. package/src/components/molecules/BoxAttribute/index.js +25 -32
  46. package/src/components/molecules/BoxAttribute/styles.js +1 -1
  47. package/src/components/molecules/BoxButtons/index.js +22 -23
  48. package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
  49. package/src/components/molecules/HeaderTop/index.js +6 -52
  50. package/src/components/molecules/SignInLogin/index.js +11 -11
  51. package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
  52. package/src/components/molecules/TagAndInput/index.js +5 -6
  53. package/src/components/organisms/Chat/Chat.stories.js +7 -27
  54. package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
  55. package/src/components/organisms/Chat/ContainerItems/styles.js +2 -14
  56. package/src/components/organisms/Chat/ContentChat/index.js +12 -88
  57. package/src/components/organisms/Chat/Footer/index.js +0 -11
  58. package/src/components/organisms/Chat/index.js +4 -46
  59. package/src/components/organisms/Chat/styles.js +0 -4
  60. package/src/components/organisms/DashboardMetric/index.js +3 -6
  61. package/src/components/organisms/FullProductNameHeader/index.js +1 -1
  62. package/src/components/organisms/InputGroup/index.js +119 -131
  63. package/src/components/organisms/Modal/styles.js +1 -4
  64. package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
  65. package/src/components/organisms/VersionSelector/index.js +2 -1
  66. package/src/components/pages/Dashboard/Dashboard.stories.js +38 -33
  67. package/src/components/pages/Dashboard/index.js +7 -36
  68. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +83 -110
  69. package/src/components/pages/ProviderProductEdition/index.js +152 -134
  70. package/src/components/pages/ProviderProductEdition/styles.js +1 -5
  71. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +52 -52
  72. package/src/components/pages/RetailerProductEdition/index.js +137 -120
  73. package/src/components/pages/RetailerProductEdition/styles.js +0 -4
  74. package/src/components/pages/RetailerProductEdition/utils.js +0 -37
  75. package/src/global-files/data.js +46 -14
  76. package/src/global-files/variables.js +0 -6
  77. package/src/index.js +0 -11
  78. package/src/assets/images/Icons/infoNR.svg +0 -8
  79. package/src/assets/images/flagsv2/highPriority.svg +0 -3
  80. package/src/assets/images/flagsv2/lowPriority.svg +0 -3
  81. package/src/assets/images/flagsv2/mediumPriority.svg +0 -3
  82. package/src/assets/images/flagsv2/noPriority.svg +0 -3
  83. package/src/assets/images/generalButton/closeIconWhite.svg +0 -4
  84. package/src/assets/images/generalButton/closeIconv2.svg +0 -4
  85. package/src/components/atoms/CharsMissing/Wysiwyg.stories.js +0 -12
  86. package/src/components/atoms/CharsMissing/index.js +0 -60
  87. package/src/components/atoms/CharsMissing/styles.js +0 -44
  88. package/src/components/atoms/FeatureTagv2/FeatureTagv2.stories.js +0 -16
  89. package/src/components/atoms/FeatureTagv2/index.js +0 -10
  90. package/src/components/atoms/FeatureTagv2/styles.js +0 -56
  91. package/src/components/atoms/GeneralInputv2/GeneralInputv2.stories.js +0 -33
  92. package/src/components/atoms/GeneralInputv2/index.js +0 -155
  93. package/src/components/atoms/GeneralInputv2/styles.js +0 -67
  94. package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -76
  95. package/src/components/atoms/ImageCarousel/index.js +0 -103
  96. package/src/components/atoms/ImageCarousel/styles.js +0 -79
  97. package/src/components/atoms/InputFormatterv2/Wysiwyg.stories.js +0 -12
  98. package/src/components/atoms/InputFormatterv2/index.js +0 -148
  99. package/src/components/atoms/InputFormatterv2/styles.js +0 -39
  100. package/src/components/atoms/InputImages/InputImages.stories.js +0 -19
  101. package/src/components/atoms/InputImages/index.js +0 -25
  102. package/src/components/atoms/InputImages/styles.js +0 -17
  103. package/src/components/atoms/NumberMandatory/NumberMandatory.stories.js +0 -19
  104. package/src/components/atoms/NumberMandatory/index.js +0 -16
  105. package/src/components/atoms/NumberMandatory/styles.js +0 -11
  106. package/src/components/atoms/PercentTag/PercentTag.stories.js +0 -7
  107. package/src/components/atoms/PercentTag/index.js +0 -9
  108. package/src/components/atoms/PercentTag/styles.js +0 -69
  109. package/src/components/atoms/PriorityFlagv2/PriorityFlagv2.stories.js +0 -20
  110. package/src/components/atoms/PriorityFlagv2/index.js +0 -20
  111. package/src/components/atoms/PriorityFlagv2/styles.js +0 -6
  112. package/src/components/atoms/ProductImagev2/ProductImagev2.stories.js +0 -28
  113. package/src/components/atoms/ProductImagev2/index.js +0 -16
  114. package/src/components/atoms/ProductImagev2/styles.js +0 -62
  115. package/src/components/atoms/Progress/Progress.stories.js +0 -25
  116. package/src/components/atoms/Progress/index.js +0 -74
  117. package/src/components/atoms/Progress/styles.js +0 -98
  118. package/src/components/atoms/RatingStars/RatingStars.stories.js +0 -10
  119. package/src/components/atoms/RatingStars/index.js +0 -31
  120. package/src/components/atoms/RatingStars/styles.js +0 -28
  121. package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -36
  122. package/src/components/atoms/RetailerCatalog/index.js +0 -49
  123. package/src/components/atoms/RetailerCatalog/styles.js +0 -30
  124. package/src/components/atoms/RetailerOption/RetailerOption.stories.js +0 -15
  125. package/src/components/atoms/RetailerOption/index.js +0 -53
  126. package/src/components/atoms/RetailerOption/styles.js +0 -41
  127. package/src/components/atoms/RetailersList/RetailersList.stories.js +0 -33
  128. package/src/components/atoms/RetailersList/index.js +0 -20
  129. package/src/components/atoms/RetailersList/styles.js +0 -19
  130. package/src/components/atoms/ScreenHeaderv2/ScreenHeaderv2.stories.js +0 -53
  131. package/src/components/atoms/ScreenHeaderv2/index.js +0 -134
  132. package/src/components/atoms/ScreenHeaderv2/styles.js +0 -103
  133. package/src/components/atoms/Selectv2/VersionSelect.js +0 -27
  134. package/src/components/atoms/Selectv2/index.js +0 -35
  135. package/src/components/atoms/Selectv2/style.js +0 -93
  136. package/src/components/atoms/TabSectionv2/TabSection.stories.js +0 -25
  137. package/src/components/atoms/TabSectionv2/index.js +0 -9
  138. package/src/components/atoms/TabSectionv2/styles.js +0 -20
  139. package/src/components/atoms/TooltipLight/Tooltip.stories.js +0 -20
  140. package/src/components/atoms/TooltipLight/index.js +0 -46
  141. package/src/components/atoms/TooltipLight/styles.js +0 -65
  142. package/src/components/atoms/UserCatalog/UserCatalog.stories.js +0 -67
  143. package/src/components/atoms/UserCatalog/index.js +0 -100
  144. package/src/components/atoms/UserCatalog/styles.js +0 -24
  145. package/src/components/atoms/UserOption/UserOption.stories.js +0 -25
  146. package/src/components/atoms/UserOption/index.js +0 -95
  147. package/src/components/atoms/UserOption/styles.js +0 -61
  148. package/src/components/atoms/UserSelector/UserSelector.stories.js +0 -25
  149. package/src/components/atoms/UserSelector/index.js +0 -86
  150. package/src/components/atoms/UserSelector/styles.js +0 -55
  151. package/src/components/atoms/WordsMissing/Wysiwyg.stories.js +0 -12
  152. package/src/components/atoms/WordsMissing/index.js +0 -60
  153. package/src/components/atoms/WordsMissing/styles.js +0 -10
  154. package/src/components/molecules/AsignationInfo/AsignationInfo.stories.js +0 -17
  155. package/src/components/molecules/AsignationInfo/index.js +0 -108
  156. package/src/components/molecules/AsignationInfo/styles.js +0 -86
  157. package/src/components/molecules/EditionActiveImagev2/EditionActiveImagev2.stories.js +0 -12
  158. package/src/components/molecules/EditionActiveImagev2/index.js +0 -15
  159. package/src/components/molecules/EditionActiveImagev2/styles.js +0 -7
  160. package/src/components/molecules/FeaturesBarv2/FeaturesBarv2.stories.js +0 -20
  161. package/src/components/molecules/FeaturesBarv2/index.js +0 -32
  162. package/src/components/molecules/FeaturesBarv2/styles.js +0 -17
  163. package/src/components/molecules/GalleryElementv2/GalleryElementv2.stories.js +0 -30
  164. package/src/components/molecules/GalleryElementv2/index.js +0 -142
  165. package/src/components/molecules/GalleryElementv2/styles.js +0 -119
  166. package/src/components/molecules/GalleryHeaderv2/GalleryHeaderv2.stories.js +0 -10
  167. package/src/components/molecules/GalleryHeaderv2/index.js +0 -25
  168. package/src/components/molecules/GalleryHeaderv2/styles.js +0 -47
  169. package/src/components/molecules/GridItem/GridItem.stories.js +0 -126
  170. package/src/components/molecules/GridItem/index.js +0 -105
  171. package/src/components/molecules/GridItem/styles.js +0 -104
  172. package/src/components/molecules/HeaderItem/ColumnItem.js +0 -9
  173. package/src/components/molecules/HeaderItem/HeaderItem.stories.js +0 -24
  174. package/src/components/molecules/HeaderItem/index.js +0 -26
  175. package/src/components/molecules/HeaderItem/styles.js +0 -27
  176. package/src/components/molecules/HeaderTopv2/HeaderTopv2.stories.js +0 -10
  177. package/src/components/molecules/HeaderTopv2/index.js +0 -100
  178. package/src/components/molecules/HeaderTopv2/styles.js +0 -33
  179. package/src/components/molecules/ImageSelectorv2/ImageSelectorv2.stories.js +0 -46
  180. package/src/components/molecules/ImageSelectorv2/index.js +0 -22
  181. package/src/components/molecules/ImageSelectorv2/styles.js +0 -15
  182. package/src/components/molecules/Phase/Phase.stories.js +0 -37
  183. package/src/components/molecules/Phase/index.js +0 -56
  184. package/src/components/molecules/Phase/styles.js +0 -82
  185. package/src/components/molecules/ProductNameHeaderv2/ProductNameHeaderv2.stories.js +0 -37
  186. package/src/components/molecules/ProductNameHeaderv2/index.js +0 -12
  187. package/src/components/molecules/ProductNameHeaderv2/styles.js +0 -10
  188. package/src/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +0 -37
  189. package/src/components/molecules/ProductSkuStatus/index.js +0 -26
  190. package/src/components/molecules/ProductSkuStatus/styles.js +0 -7
  191. package/src/components/molecules/RetailerSelectorv2/RetailerSelectorv2.stories.js +0 -35
  192. package/src/components/molecules/RetailerSelectorv2/index.js +0 -80
  193. package/src/components/molecules/RetailerSelectorv2/styles.js +0 -21
  194. package/src/components/molecules/RowItem/ColumnItem.js +0 -9
  195. package/src/components/molecules/RowItem/RowItem.stories.js +0 -5660
  196. package/src/components/molecules/RowItem/index.js +0 -45
  197. package/src/components/molecules/RowItem/styles.js +0 -40
  198. package/src/components/molecules/ServiceDataValidator/ServiceDataValidator.stories.js +0 -90
  199. package/src/components/molecules/ServiceDataValidator/index.js +0 -49
  200. package/src/components/molecules/ServiceDataValidator/styles.js +0 -36
  201. package/src/components/molecules/StatusRetailer/StatusAsignationInfo.stories.js +0 -17
  202. package/src/components/molecules/StatusRetailer/index.js +0 -55
  203. package/src/components/molecules/StatusRetailer/styles.js +0 -85
  204. package/src/components/molecules/TabsMenuv2/TabsMenuv2.stories.js +0 -19
  205. package/src/components/molecules/TabsMenuv2/index.js +0 -112
  206. package/src/components/molecules/TabsMenuv2/styles.js +0 -19
  207. package/src/components/molecules/TagAndInputv2/TagAndInputv2.stories.js +0 -24
  208. package/src/components/molecules/TagAndInputv2/index.js +0 -86
  209. package/src/components/molecules/TagAndInputv2/styles.js +0 -35
  210. package/src/components/molecules/Validation/Validation.stories.js +0 -12
  211. package/src/components/molecules/Validation/index.js +0 -77
  212. package/src/components/molecules/Validation/styles.js +0 -19
  213. package/src/components/molecules/VersionItemv2/VersionItemv2.stories.js +0 -14
  214. package/src/components/molecules/VersionItemv2/index.js +0 -59
  215. package/src/components/molecules/VersionItemv2/styles.js +0 -47
  216. package/src/components/organisms/BarButtons/BarButtons.stories.js +0 -13
  217. package/src/components/organisms/BarButtons/index.js +0 -150
  218. package/src/components/organisms/BarButtons/styles.js +0 -54
  219. package/src/components/organisms/Chatv2/ChatLists/ChatLists.stories.js +0 -65
  220. package/src/components/organisms/Chatv2/ChatLists/Rotoplas.jpeg +0 -0
  221. package/src/components/organisms/Chatv2/ChatLists/THD.png +0 -0
  222. package/src/components/organisms/Chatv2/ChatLists/index.js +0 -141
  223. package/src/components/organisms/Chatv2/ChatLists/styles.js +0 -162
  224. package/src/components/organisms/Chatv2/Chatv2.stories.js +0 -184
  225. package/src/components/organisms/Chatv2/ContainerItems/ContainerItems.stories.js +0 -142
  226. package/src/components/organisms/Chatv2/ContainerItems/index.js +0 -538
  227. package/src/components/organisms/Chatv2/ContainerItems/styles.js +0 -360
  228. package/src/components/organisms/Chatv2/ContentChat/ContentChat.stories.js +0 -102
  229. package/src/components/organisms/Chatv2/ContentChat/Rotoplas.jpeg +0 -0
  230. package/src/components/organisms/Chatv2/ContentChat/THD.png +0 -0
  231. package/src/components/organisms/Chatv2/ContentChat/index.js +0 -1016
  232. package/src/components/organisms/Chatv2/ContentChat/styles.js +0 -44
  233. package/src/components/organisms/Chatv2/Footer/Footer.stories.js +0 -22
  234. package/src/components/organisms/Chatv2/Footer/index.js +0 -668
  235. package/src/components/organisms/Chatv2/Footer/styles.js +0 -290
  236. package/src/components/organisms/Chatv2/Header/Header.stories.js +0 -66
  237. package/src/components/organisms/Chatv2/Header/index.js +0 -93
  238. package/src/components/organisms/Chatv2/Header/styles.js +0 -49
  239. package/src/components/organisms/Chatv2/index.js +0 -281
  240. package/src/components/organisms/Chatv2/styles.js +0 -85
  241. package/src/components/organisms/CompleteServices/CompleteServices.stories.js +0 -91
  242. package/src/components/organisms/CompleteServices/index.js +0 -82
  243. package/src/components/organisms/CompleteServices/styles.js +0 -35
  244. package/src/components/organisms/DragAndDropPhases/DragAndDropPhases.stories.js +0 -12
  245. package/src/components/organisms/DragAndDropPhases/index.js +0 -67
  246. package/src/components/organisms/DragAndDropPhases/styles.js +0 -20
  247. package/src/components/organisms/DragPrueba/DragPrueba.stories.js +0 -12
  248. package/src/components/organisms/DragPrueba/index.js +0 -57
  249. package/src/components/organisms/DragPrueba/styles.js +0 -8
  250. package/src/components/organisms/FullProductNamev2/FullProductNamev2.stories.js +0 -28
  251. package/src/components/organisms/FullProductNamev2/index.js +0 -101
  252. package/src/components/organisms/FullProductNamev2/styles.js +0 -49
  253. package/src/components/organisms/FullTabsMenuv2/FullTabsMenuv2.stories.js +0 -22
  254. package/src/components/organisms/FullTabsMenuv2/index.js +0 -142
  255. package/src/components/organisms/FullTabsMenuv2/styles.js +0 -47
  256. package/src/components/organisms/GridProducts/GridProducts.stories.js +0 -5485
  257. package/src/components/organisms/GridProducts/index.js +0 -50
  258. package/src/components/organisms/GridProducts/styles.js +0 -14
  259. package/src/components/organisms/GridProducts/utils.js +0 -111
  260. package/src/components/organisms/ImageDataTablev2/ImageDataTablev2.stories.js +0 -24
  261. package/src/components/organisms/ImageDataTablev2/index.js +0 -124
  262. package/src/components/organisms/ImageDataTablev2/styles.js +0 -18
  263. package/src/components/organisms/ImagePreviewerv2/ImagePreviewerv2.stories.js +0 -38
  264. package/src/components/organisms/ImagePreviewerv2/index.js +0 -22
  265. package/src/components/organisms/ImagePreviewerv2/styles.js +0 -7
  266. package/src/components/organisms/InputGroupv2/InputGroupv2.stories.js +0 -31
  267. package/src/components/organisms/InputGroupv2/index.js +0 -296
  268. package/src/components/organisms/InputGroupv2/styles.js +0 -90
  269. package/src/components/organisms/MandatoryBar/MandatoryBar.stories.js +0 -18
  270. package/src/components/organisms/MandatoryBar/index.js +0 -31
  271. package/src/components/organisms/MandatoryBar/styles.js +0 -12
  272. package/src/components/organisms/ProductImageModalv2/ProductImageModalv2.stories.js +0 -90
  273. package/src/components/organisms/ProductImageModalv2/index.js +0 -105
  274. package/src/components/organisms/ProductImageModalv2/styles.js +0 -71
  275. package/src/components/organisms/RenameImagesBar/RenameImagesBar.stories.js +0 -18
  276. package/src/components/organisms/RenameImagesBar/index.js +0 -30
  277. package/src/components/organisms/RenameImagesBar/styles.js +0 -12
  278. package/src/components/organisms/VersionSelectorv2/VersionSelectorv2.stories.js +0 -15
  279. package/src/components/organisms/VersionSelectorv2/index.js +0 -105
  280. package/src/components/organisms/VersionSelectorv2/styles.js +0 -45
  281. package/src/components/pages/ProductEditionv2/ProductEditionv2.stories.js +0 -213
  282. package/src/components/pages/ProductEditionv2/index.js +0 -1758
  283. package/src/components/pages/ProductEditionv2/styles.js +0 -154
@@ -1,95 +0,0 @@
1
- import { Container } from "./styles";
2
- import { Avatar } from "../Avatar";
3
- import { useState } from "react";
4
- import { useEffect } from "react";
5
- import { getProfilePicture } from "../../../global-files/data";
6
- import { servicesCodeIcon } from "../../organisms/OrderDetail/utils/Table/utils";
7
- import { UserSelector } from "../UserSelector";
8
- import { useCloseModal } from "../../../global-files/customHooks";
9
-
10
- export const UserOption = ({
11
- userId,
12
- index,
13
- usersArray,
14
- id,
15
- onAssign,
16
- product,
17
- }) => {
18
- index === "auditor" && console.log(userId);
19
- const [userAssigned, setUserAssigned] = useState({});
20
- const [showSelector, setShowSelector] = useCloseModal(id);
21
- const [assignationTarget, setAssignationTarget] = useState("");
22
- const [concept, setConcept] = useState("");
23
- const [target, setTarget] = useState("");
24
-
25
- const icons = servicesCodeIcon;
26
-
27
- useEffect(() => {
28
- if (usersArray) {
29
- usersArray.forEach((user) => {
30
- if (user.id_user === userId) {
31
- setUserAssigned(user);
32
- }
33
- });
34
- }
35
- }, [userId, usersArray]);
36
-
37
- useEffect(() => {
38
- switch (index) {
39
- case "datasheet":
40
- case "description":
41
- setAssignationTarget(`id_${index}_especialist`);
42
- setConcept(index);
43
- setTarget("especialist");
44
- break;
45
- case "image":
46
- setAssignationTarget(`id_${index}s_especialist`);
47
- setConcept(index + "s");
48
- setTarget("especialist");
49
- break;
50
- case "auditor":
51
- setAssignationTarget(`id_${index}`);
52
- setConcept(index);
53
- setTarget(index);
54
- break;
55
- default:
56
- break;
57
- }
58
- }, [index]);
59
-
60
- return (
61
- <Container
62
- onClick={(e) => {
63
- setShowSelector(!showSelector);
64
- e.stopPropagation();
65
- }}
66
- id={id}
67
- >
68
- <div className="image-and-name">
69
- <Avatar
70
- image={getProfilePicture(userAssigned?.id_user, 26, 26)}
71
- altText={"datasheet especialist"}
72
- imageType={"medium-image"}
73
- />
74
- <p>
75
- {userAssigned?.name} {userAssigned?.last_name}
76
- </p>
77
- </div>
78
- <div className="icon-container">{icons[index]}</div>
79
- {showSelector && (
80
- <UserSelector
81
- id={id}
82
- searchLabel="Buscar Usuario"
83
- index={index}
84
- usersArray={usersArray}
85
- position="absolute"
86
- onAssign={onAssign}
87
- product={product}
88
- assignationTarget={assignationTarget}
89
- target={target}
90
- concept={concept}
91
- />
92
- )}
93
- </Container>
94
- );
95
- };
@@ -1,61 +0,0 @@
1
- import styled from "styled-components";
2
- import { FontFamily } from "../../../global-files/variables";
3
-
4
- export const Container = styled.div`
5
- border: 1px solid #f0f0f0;
6
- border-radius: 5px;
7
- color: #262626;
8
- font-size: 12px;
9
- font-family: ${FontFamily.Lato};
10
- display: flex;
11
- align-items: center;
12
- padding: 5px 10px;
13
- justify-content: space-between;
14
- cursor: pointer;
15
- position: relative;
16
- background-color: white;
17
-
18
- .image-and-name {
19
- display: flex;
20
- align-items: center;
21
-
22
- div + p {
23
- margin-left: 10px;
24
- white-space: nowrap;
25
- }
26
-
27
- & + * {
28
- margin-left: 10px;
29
- }
30
- }
31
-
32
- .icon-container {
33
- position: relative;
34
- span {
35
- color: #808080;
36
- cursor: pointer;
37
-
38
- & + span {
39
- display: none;
40
- position: absolute;
41
- right: 120%;
42
- top: 50%;
43
- transform: translateY(-50%);
44
- white-space: nowrap;
45
- border: 1px solid #f0f0f0;
46
- padding: 5px;
47
- background-color: white;
48
- }
49
-
50
- &:hover {
51
- & + span {
52
- display: block;
53
- }
54
- }
55
- }
56
- }
57
-
58
- & + * {
59
- margin-top: 5px;
60
- }
61
- `;
@@ -1,25 +0,0 @@
1
- import { UserSelector } from ".";
2
-
3
- export default {
4
- title: "Components/atoms/UserSelector",
5
- component: UserSelector,
6
- };
7
-
8
- const Template = (args) => <UserSelector {...args} />;
9
- export const UserSelectorDefault = Template.bind({});
10
- UserSelectorDefault.args = {
11
- searchLabel: "Buscar auditor",
12
- index: "auditor",
13
- usersArray: [
14
- {
15
- name: "José",
16
- last_name: "Castañeda",
17
- id_user: 37,
18
- },
19
- {
20
- name: "Eduardo ",
21
- last_name: " Reyes",
22
- id_user: 195,
23
- },
24
- ],
25
- };
@@ -1,86 +0,0 @@
1
- import { Container } from "./styles";
2
- import { faSearch } from "@fortawesome/free-solid-svg-icons";
3
- import { FontAwesomeIcon as Icon } from "@fortawesome/react-fontawesome";
4
- import { Avatar } from "../Avatar";
5
- import { getProfilePicture } from "../../../global-files/data";
6
- import { useState } from "react";
7
- import { useEffect } from "react";
8
-
9
- export const UserSelector = ({
10
- searchLabel,
11
- usersArray,
12
- position,
13
- id,
14
- onAssign,
15
- product,
16
- assignationTarget,
17
- target,
18
- concept,
19
- }) => {
20
- const [text, setText] = useState([]);
21
- const [userFiltered, setUsersFiltered] = useState([]);
22
-
23
- useEffect(() => {
24
- if (usersArray) setUsersFiltered(usersArray);
25
- }, [usersArray]);
26
-
27
- const onChangeText = (e) => {
28
- setText(e.target.value);
29
- if (usersArray)
30
- setUsersFiltered(
31
- usersArray.filter((user) =>
32
- (user.name + " " + user.last_name)
33
- .toLowerCase()
34
- .includes(e.target.value.toLowerCase())
35
- )
36
- );
37
- };
38
-
39
- return (
40
- <Container position={position} id={id + "users-list"}>
41
- <div className="search-cotainer">
42
- <Icon icon={faSearch} />
43
- <input
44
- type="text"
45
- className="search"
46
- placeholder={searchLabel}
47
- value={text}
48
- onChange={onChangeText}
49
- autoFocus
50
- />
51
- </div>
52
- <div className="selector-container">
53
- {userFiltered.length ? (
54
- userFiltered.map((user, i) => (
55
- <div
56
- key={user.id_user + "-" + i}
57
- className="user-item"
58
- onClick={() => {
59
- onAssign(
60
- product,
61
- user.id_user,
62
- assignationTarget,
63
- target,
64
- concept
65
- );
66
- }}
67
- >
68
- <Avatar
69
- image={getProfilePicture(user.id_user, 26, 26)}
70
- altText={"profile image"}
71
- imageType={"medium-image"}
72
- />
73
- <p>
74
- {user.name} {user.last_name}
75
- </p>
76
- </div>
77
- ))
78
- ) : (
79
- <div>
80
- <p>Sin usuarios para asignar</p>
81
- </div>
82
- )}
83
- </div>
84
- </Container>
85
- );
86
- };
@@ -1,55 +0,0 @@
1
- import styled from "styled-components";
2
- import { FontFamily } from "../../../global-files/variables";
3
-
4
- export const Container = styled.div`
5
- box-shadow: 0px 2px 4px #00000040;
6
- width: 197px;
7
- border-radius: 5px;
8
- position: ${({ position }) => (position ? position : "initial")};
9
- top: ${({ position }) => (position ? "100%" : "initial")};
10
- left: ${({ position }) => (position ? "50%" : "initial")};
11
- transform: ${({ position }) => (position ? "translateX(-50%)" : "initial")};
12
- z-index: 500;
13
- background-color: white;
14
-
15
- .search-cotainer {
16
- display: flex;
17
- padding-left: 10px;
18
- align-items: center;
19
- border-bottom: 1px solid #f0f0f0;
20
-
21
- svg {
22
- & + * {
23
- margin-left: 10px;
24
- }
25
- }
26
-
27
- input {
28
- border: none;
29
- width: 100%;
30
- padding: 10px;
31
- outline: none;
32
- }
33
- }
34
-
35
- .selector-container {
36
- max-height: 184px;
37
- overflow: auto;
38
- .user-item {
39
- display: flex;
40
- font-family: ${FontFamily.Lato};
41
- font-size: 12px;
42
- align-items: center;
43
- padding: 10px;
44
- cursor: pointer;
45
-
46
- &:hover {
47
- background-color: #f0f0f0;
48
- }
49
-
50
- > * + * {
51
- margin-left: 10px;
52
- }
53
- }
54
- }
55
- `;
@@ -1,12 +0,0 @@
1
- import { WordsMissing } from "./index";
2
-
3
- export default {
4
- title: "Components/atoms/WordsMissing",
5
- component: WordsMissing,
6
- };
7
-
8
- const Template = (args) => <WordsMissing {...args} />;
9
-
10
- export const DefaultWordsMissing = Template.bind({});
11
-
12
- DefaultWordsMissing.args = { text: "hola mundo" };
@@ -1,60 +0,0 @@
1
- import ReactQuill from "react-quill";
2
- import "react-quill/dist/quill.snow.css";
3
- import { useState } from "react";
4
- import { Container } from "./styles";
5
-
6
- export const WordsMissing = ({
7
- mainValue = "",
8
- inputId,
9
- articleId,
10
- updatedDescriptions,
11
- setUpdatedDescriptions,
12
- isRequired,
13
- maxWords,
14
- }) => {
15
- const [inputValue, setInputValue] = useState(mainValue);
16
- const [selection, setSelection] = useState(false);
17
- const [position, setPosition] = useState({ left: 0, top: 0 });
18
- const [charsCounter, setCharsCounter] = useState(0);
19
- const [quillState, setQuillState] = useState({});
20
- const maxLength = maxWords;
21
-
22
- const getValue = (value) => {
23
- let temp = value
24
- .replace(/\n/gm, "<br>")
25
- .replace(/\&nbsp;/gm, " ")
26
- .replace(/\&amp;/gm, "&");
27
- return temp;
28
- };
29
-
30
- //const quillRef = useRef();
31
- const setQuill = (ref) => {
32
- if (!ref || ref === null) return;
33
- if (typeof ref.getEditor !== "function") return;
34
- setQuillState(ref.getEditor());
35
- };
36
-
37
- const valueFormater = (value) => {
38
- return value
39
- .replace(/<\/p><p>/gm, "\n")
40
- .replace(/<\/?br>|<\/?p>/gm, "")
41
- .replace(/\&nbsp;/gm, " ")
42
- .replace(/\&amp;/gm, "&");
43
- };
44
-
45
-
46
- return (
47
- <Container
48
- isRequired={
49
- isRequired &&
50
- (inputValue.replace(/<.*?>/gm, "").length === 0 || !inputValue)
51
- }
52
- selection={selection}
53
- position={position}
54
- >
55
- <p className="description-limit">
56
- P. {charsCounter}/{maxLength}
57
- </p>
58
- </Container>
59
- );
60
- };
@@ -1,10 +0,0 @@
1
- import styled from "styled-components";
2
- import { GlobalColors, FontFamily } from "../../../global-files/variables";
3
-
4
- export const Container = styled.div`
5
- .description-limit {
6
- font-size: 8px;
7
- font-family: ${FontFamily.Roboto}, sans-serif;
8
- color: ${GlobalColors.gray_medium};
9
- }
10
- `;
@@ -1,17 +0,0 @@
1
- import { AsignationInfo } from "./index";
2
-
3
- export default {
4
- title: "Components/molecules/AsignationInfo",
5
- component: AsignationInfo,
6
- };
7
-
8
- const Template = (args) => <AsignationInfo {...args} />;
9
-
10
- export const AsignationInfoDefault = Template.bind({});
11
- AsignationInfoDefault.args = {
12
- status: "AA",
13
- image: {
14
- src: "https://image.shutterstock.com/image-illustration/3d-render-generic-drug-pills-260nw-709112806.jpg",
15
- },
16
- imagesSection: true,
17
- };
@@ -1,108 +0,0 @@
1
- import { Container } from "./styles";
2
- import { ScreenHeader } from "../../atoms/ScreenHeader/index";
3
- import { Avatar } from "../../atoms/Avatar";
4
- import { Status as StatusTag } from "../../atoms/Status/index";
5
- import { useEffect, useState } from "react";
6
- import { AsignationOption } from "../../atoms/AsignationOption/index";
7
- import { getProfilePicture } from "../../../global-files/data";
8
- export const AsignationInfo = ({
9
- status = "-",
10
- percent = 0,
11
- assignationsImages,
12
- setAssignation,
13
- isRetailer,
14
- id = "default-id",
15
- canAssign,
16
- }) => {
17
- const [showAsignationPanel, setShowAsignationPanel] = useState(false);
18
- const [assignationType, setAssignationType] = useState("facilitator");
19
-
20
- const closeAsignations = (e) => {
21
- if (!e.target.closest("#default-id") && showAsignationPanel) {
22
- document.removeEventListener("click", closeAsignations, false);
23
- setShowAsignationPanel(false);
24
- }
25
- };
26
-
27
- useEffect(() => {
28
- if (showAsignationPanel) {
29
- document.addEventListener("click", closeAsignations, false);
30
- }
31
- }, [showAsignationPanel]);
32
- return (
33
- <Container id={id}>
34
- <div className="assignations-container">
35
- {assignationsImages?.assignations?.map((assignation, index) => (
36
- <Avatar
37
- key={index + "-" + assignation.id}
38
- imageType={"small-image"}
39
- image={getProfilePicture(assignation.id, 20, 20)}
40
- altText="user profile image"
41
- onClick={(e) => {
42
- e.preventDefault();
43
- e.stopPropagation();
44
- setShowAsignationPanel(true);
45
- setAssignationType(assignation?.collaboratorType);
46
- }}
47
- />
48
- ))}
49
- </div>
50
- <ScreenHeader
51
- text={"Asig."}
52
- color={"#969696"}
53
- fontFamily={"Avenir Next"}
54
- headerType={"input-name-header"}
55
- />
56
- {showAsignationPanel && canAssign && (
57
- <div className="asignation-panel">
58
- <div className="asignation-header">
59
- <div className="asignation-status">
60
- <p>Estatus</p>
61
- <StatusTag statusType={status} ovalForm={true} />
62
- </div>
63
- <div className="asignation-percent">
64
- <p>Estatus</p>
65
- <p className="percent">{percent}%</p>
66
- </div>
67
- </div>
68
- <div className="asignations-list">
69
- {assignationsImages?.collaborators !== undefined ? (
70
- assignationsImages?.collaborators[assignationType]?.map(
71
- (asignation, index) => (
72
- <AsignationOption
73
- key={index + "-" + asignation.name}
74
- profileImage={getProfilePicture(
75
- asignation?.id_user,
76
- 40,
77
- 40
78
- )}
79
- onClick={() => {
80
- setAssignation(assignationType, asignation?.id_user);
81
- }}
82
- name={asignation.name}
83
- />
84
- )
85
- )
86
- ) : (
87
- <p className="no-asignations">Sin personas para asignar</p>
88
- )}
89
- </div>
90
- {isRetailer === 1 && (
91
- <div className="default-asignations-list">
92
- <AsignationOption
93
- asignationType={"provider"}
94
- name={"Solicitar a"}
95
- team={"Proveedor"}
96
- />
97
- <AsignationOption
98
- asignationType={"team"}
99
- name={"Solicitar a"}
100
- team={"Content-oh!"}
101
- />
102
- </div>
103
- )}
104
- </div>
105
- )}
106
- </Container>
107
- );
108
- };
@@ -1,86 +0,0 @@
1
- import styled from "styled-components";
2
- import { FontFamily, GlobalColors } from "../../../global-files/variables";
3
-
4
- export const Container = styled.div`
5
- display: flex;
6
- align-items: center;
7
- position: relative;
8
- border-radius: 117px;
9
- padding: 4px 5px;
10
- display: flex;
11
- border: 1px solid #F0F0F0;
12
-
13
- > * + * {
14
- margin-left: 8px;
15
- }
16
-
17
- .images-buttons {
18
- button + * {
19
- margin-left: 8px;
20
- }
21
- }
22
-
23
- .assignations-container {
24
- display: flex;
25
- cursor: pointer;
26
- }
27
-
28
- .asignation-panel {
29
- background: ${GlobalColors.s2};
30
- border: 1px solid ${GlobalColors.s3};
31
- box-sizing: border-box;
32
- box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.25);
33
- border-radius: 4px;
34
- padding: 10px 8px;
35
- position: absolute;
36
- top: calc(100% + 10px);
37
- right: 0;
38
- z-index: 10;
39
-
40
- .asignation-header {
41
- display: flex;
42
- justify-content: space-between;
43
-
44
- .asignation-status,
45
- .asignation-percent {
46
- & > p {
47
- font-family: ${FontFamily.AvenirNext};
48
- font-weight: 500;
49
- font-size: 14px;
50
- line-height: 16px;
51
- color: ${GlobalColors.s5};
52
- }
53
- }
54
-
55
- .asignation-percent {
56
- text-align: right;
57
- }
58
-
59
- & + * {
60
- margin-top: 10px;
61
- }
62
- }
63
-
64
- .asignations-list {
65
- min-height: 40px;
66
-
67
- .no-asignations {
68
- padding: 5px;
69
- font-family: ${FontFamily.AvenirNext};
70
- font-weight: 500;
71
- font-size: 14px;
72
- line-height: 16px;
73
- color: ${GlobalColors.s5};
74
- }
75
-
76
- & + * {
77
- margin-top: 10px;
78
- border-top: 1px solid ${GlobalColors.s3};
79
- }
80
- }
81
-
82
- .default-asignations-list {
83
- padding-top: 10px;
84
- }
85
- }
86
- `;
@@ -1,12 +0,0 @@
1
- import { EditionActiveImagev2 } from "./index";
2
-
3
- export default {
4
- title: "Components/molecules/EditionActiveImagev2",
5
- component: EditionActiveImagev2,
6
- };
7
-
8
- const Template = (args) => <EditionActiveImagev2 {...args} />;
9
-
10
- export const EditionActiveImagev2Default = Template.bind({});
11
-
12
- EditionActiveImagev2Default.args = {};
@@ -1,15 +0,0 @@
1
- import { Container } from "./styles";
2
- import { Button } from "../../atoms/GeneralButton/index";
3
- import { ProductImagev2 } from "../../atoms/ProductImagev2";
4
-
5
- export const EditionActiveImagev2 = ({ img, altText, setShowModal }) => {
6
- return (
7
- <Container>
8
- <ProductImagev2 img={img} imageType="main-image" altText={altText} />
9
- <Button
10
- buttonType="open-modal-button"
11
- onClick={() => setShowModal(true)}
12
- />
13
- </Container>
14
- );
15
- };
@@ -1,7 +0,0 @@
1
- import styled from "styled-components";
2
-
3
- export const Container = styled.div`
4
- position: relative;
5
- width: 192px;
6
- height: 192px;
7
- `;
@@ -1,20 +0,0 @@
1
- import { FeaturesBarv2 } from ".";
2
-
3
- export default {
4
- title: "Components/molecules/FeaturesBarv2",
5
- component: FeaturesBarv2,
6
- };
7
-
8
- const Template = (args) => <FeaturesBarv2 {...args} />;
9
-
10
- export const FeaturesBarv2Default = Template.bind({});
11
-
12
- FeaturesBarv2Default.args = {
13
- features: [
14
- { feature: "Prov", value: "Unilever" },
15
- { feature: "Vendor", value: "1234567890" },
16
- { feature: "SKU", value: "1234567890" },
17
- { feature: "UPC", value: "1234567890" },
18
- { feature: "Categoría", value: "Desodorantes Caballero y Dama" },
19
- ],
20
- };