contentoh-components-library 21.4.69 → 21.4.71

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 (339) hide show
  1. package/dist/assets/images/Icons/infoNR.svg +8 -0
  2. package/dist/assets/images/flagsv2/highPriority.svg +3 -0
  3. package/dist/assets/images/flagsv2/lowPriority.svg +3 -0
  4. package/dist/assets/images/flagsv2/mediumPriority.svg +3 -0
  5. package/dist/assets/images/flagsv2/noPriority.svg +3 -0
  6. package/dist/assets/images/generalButton/closeIconWhite.svg +4 -0
  7. package/dist/assets/images/generalButton/closeIconv2.svg +4 -0
  8. package/dist/components/atoms/CharsMissing/Wysiwyg.stories.js +30 -0
  9. package/dist/components/atoms/CharsMissing/index.js +89 -0
  10. package/dist/components/atoms/CharsMissing/styles.js +33 -0
  11. package/dist/components/atoms/FeatureTagv2/FeatureTagv2.stories.js +32 -0
  12. package/dist/components/atoms/FeatureTagv2/index.js +29 -0
  13. package/dist/components/atoms/FeatureTagv2/styles.js +22 -0
  14. package/dist/components/atoms/GeneralButton/styles.js +6 -2
  15. package/dist/components/atoms/GeneralInputv2/GeneralInputv2.stories.js +50 -0
  16. package/dist/components/atoms/GeneralInputv2/index.js +188 -0
  17. package/dist/components/atoms/GeneralInputv2/styles.js +29 -0
  18. package/dist/components/atoms/InputFormatter/styles.js +3 -3
  19. package/dist/components/atoms/InputFormatterv2/Wysiwyg.stories.js +30 -0
  20. package/dist/components/atoms/InputFormatterv2/index.js +182 -0
  21. package/dist/components/atoms/InputFormatterv2/styles.js +33 -0
  22. package/dist/components/atoms/InputImages/InputImages.stories.js +34 -0
  23. package/dist/components/atoms/InputImages/index.js +46 -0
  24. package/dist/components/atoms/InputImages/styles.js +20 -0
  25. package/dist/components/atoms/NumberMandatory/NumberMandatory.stories.js +34 -0
  26. package/dist/components/atoms/NumberMandatory/index.js +35 -0
  27. package/dist/components/atoms/NumberMandatory/styles.js +20 -0
  28. package/dist/components/atoms/PriorityFlagv2/PriorityFlagv2.stories.js +38 -0
  29. package/dist/components/atoms/PriorityFlagv2/index.js +37 -0
  30. package/dist/components/atoms/PriorityFlagv2/styles.js +18 -0
  31. package/dist/components/atoms/ProductImagev2/ProductImagev2.stories.js +39 -0
  32. package/dist/components/atoms/ProductImagev2/index.js +34 -0
  33. package/dist/components/atoms/ProductImagev2/styles.js +18 -0
  34. package/dist/components/atoms/Progress/Progress.stories.js +49 -0
  35. package/dist/components/atoms/Progress/index.js +74 -0
  36. package/dist/components/atoms/Progress/styles.js +30 -0
  37. package/dist/components/atoms/ScreenHeaderv2/ScreenHeaderv2.stories.js +67 -0
  38. package/dist/components/atoms/ScreenHeaderv2/index.js +169 -0
  39. package/dist/components/atoms/ScreenHeaderv2/styles.js +40 -0
  40. package/dist/components/atoms/Selectv2/VersionSelect.js +38 -0
  41. package/dist/components/atoms/Selectv2/index.js +40 -0
  42. package/dist/components/atoms/Selectv2/style.js +38 -0
  43. package/dist/components/atoms/TabSectionv2/TabSection.stories.js +39 -0
  44. package/dist/components/atoms/TabSectionv2/index.js +26 -0
  45. package/dist/components/atoms/TabSectionv2/styles.js +20 -0
  46. package/dist/components/atoms/TooltipLight/Tooltip.stories.js +36 -0
  47. package/dist/components/atoms/TooltipLight/index.js +117 -0
  48. package/dist/components/atoms/TooltipLight/styles.js +23 -0
  49. package/dist/components/atoms/WordsMissing/Wysiwyg.stories.js +30 -0
  50. package/dist/components/atoms/WordsMissing/index.js +89 -0
  51. package/dist/components/atoms/WordsMissing/styles.js +20 -0
  52. package/dist/components/molecules/AsignationInfo/AsignationInfo.stories.js +34 -0
  53. package/dist/components/molecules/AsignationInfo/index.js +137 -0
  54. package/dist/components/molecules/AsignationInfo/styles.js +20 -0
  55. package/dist/components/molecules/EditionActiveImagev2/EditionActiveImagev2.stories.js +28 -0
  56. package/dist/components/molecules/EditionActiveImagev2/index.js +34 -0
  57. package/dist/components/molecules/EditionActiveImagev2/styles.js +18 -0
  58. package/dist/components/molecules/FeaturesBarv2/FeaturesBarv2.stories.js +45 -0
  59. package/dist/components/molecules/FeaturesBarv2/index.js +49 -0
  60. package/dist/components/molecules/FeaturesBarv2/styles.js +18 -0
  61. package/dist/components/molecules/GalleryElementv2/GalleryElementv2.stories.js +45 -0
  62. package/dist/components/molecules/GalleryElementv2/index.js +164 -0
  63. package/dist/components/molecules/GalleryElementv2/styles.js +20 -0
  64. package/dist/components/molecules/GalleryHeaderv2/GalleryHeaderv2.stories.js +28 -0
  65. package/dist/components/molecules/GalleryHeaderv2/index.js +61 -0
  66. package/dist/components/molecules/GalleryHeaderv2/styles.js +20 -0
  67. package/dist/components/molecules/HeaderTopv2/HeaderTopv2.stories.js +27 -0
  68. package/dist/components/molecules/HeaderTopv2/index.js +123 -0
  69. package/dist/components/molecules/HeaderTopv2/styles.js +18 -0
  70. package/dist/components/molecules/ImageSelectorv2/ImageSelectorv2.stories.js +55 -0
  71. package/dist/components/molecules/ImageSelectorv2/index.js +36 -0
  72. package/dist/components/molecules/ImageSelectorv2/styles.js +18 -0
  73. package/dist/components/molecules/Phase/Phase.stories.js +65 -0
  74. package/dist/components/molecules/Phase/index.js +104 -0
  75. package/dist/components/molecules/Phase/styles.js +24 -0
  76. package/dist/components/molecules/ProductNameHeaderv2/ProductNameHeaderv2.stories.js +65 -0
  77. package/dist/components/molecules/ProductNameHeaderv2/index.js +24 -0
  78. package/dist/components/molecules/ProductNameHeaderv2/styles.js +18 -0
  79. package/dist/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +65 -0
  80. package/dist/components/molecules/ProductSkuStatus/index.js +36 -0
  81. package/dist/components/molecules/ProductSkuStatus/styles.js +18 -0
  82. package/dist/components/molecules/RetailerSelectorv2/RetailerSelectorv2.stories.js +48 -0
  83. package/dist/components/molecules/RetailerSelectorv2/index.js +109 -0
  84. package/dist/components/molecules/RetailerSelectorv2/styles.js +20 -0
  85. package/dist/components/molecules/ServiceDataValidator/ServiceDataValidator.stories.js +99 -0
  86. package/dist/components/molecules/ServiceDataValidator/index.js +57 -0
  87. package/dist/components/molecules/ServiceDataValidator/styles.js +20 -0
  88. package/dist/components/molecules/StatusRetailer/StatusAsignationInfo.stories.js +34 -0
  89. package/dist/components/molecules/StatusRetailer/index.js +74 -0
  90. package/dist/components/molecules/StatusRetailer/styles.js +20 -0
  91. package/dist/components/molecules/TabsMenuv2/TabsMenuv2.stories.js +35 -0
  92. package/dist/components/molecules/TabsMenuv2/index.js +145 -0
  93. package/dist/components/molecules/TabsMenuv2/styles.js +18 -0
  94. package/dist/components/molecules/TagAndInputv2/TagAndInputv2.stories.js +41 -0
  95. package/dist/components/molecules/TagAndInputv2/index.js +92 -0
  96. package/dist/components/molecules/TagAndInputv2/styles.js +29 -0
  97. package/dist/components/molecules/Validation/Validation.stories.js +28 -0
  98. package/dist/components/molecules/Validation/index.js +89 -0
  99. package/dist/components/molecules/Validation/styles.js +18 -0
  100. package/dist/components/molecules/VersionItemv2/VersionItemv2.stories.js +28 -0
  101. package/dist/components/molecules/VersionItemv2/index.js +74 -0
  102. package/dist/components/molecules/VersionItemv2/styles.js +20 -0
  103. package/dist/components/organisms/BarButtons/BarButtons.stories.js +30 -0
  104. package/dist/components/organisms/BarButtons/index.js +186 -0
  105. package/dist/components/organisms/BarButtons/styles.js +24 -0
  106. package/dist/components/organisms/Chatv2/ChatLists/ChatLists.stories.js +83 -0
  107. package/dist/components/organisms/Chatv2/ChatLists/index.js +160 -0
  108. package/dist/components/organisms/Chatv2/ChatLists/styles.js +29 -0
  109. package/dist/components/organisms/Chatv2/Chatv2.stories.js +194 -0
  110. package/dist/components/organisms/Chatv2/ContainerItems/ContainerItems.stories.js +176 -0
  111. package/dist/components/organisms/Chatv2/ContainerItems/index.js +556 -0
  112. package/dist/components/organisms/Chatv2/ContainerItems/styles.js +20 -0
  113. package/dist/components/organisms/Chatv2/ContentChat/ContentChat.stories.js +142 -0
  114. package/dist/components/organisms/Chatv2/ContentChat/index.js +1679 -0
  115. package/dist/components/organisms/Chatv2/ContentChat/styles.js +20 -0
  116. package/dist/components/organisms/Chatv2/Footer/Footer.stories.js +43 -0
  117. package/dist/components/organisms/Chatv2/Footer/index.js +984 -0
  118. package/dist/components/organisms/Chatv2/Footer/styles.js +32 -0
  119. package/dist/components/organisms/Chatv2/Header/Header.stories.js +96 -0
  120. package/dist/components/organisms/Chatv2/Header/index.js +83 -0
  121. package/dist/components/organisms/Chatv2/Header/styles.js +20 -0
  122. package/dist/components/organisms/Chatv2/index.js +306 -0
  123. package/dist/components/organisms/Chatv2/styles.js +34 -0
  124. package/dist/components/organisms/CompleteServices/CompleteServices.stories.js +100 -0
  125. package/dist/components/organisms/CompleteServices/index.js +93 -0
  126. package/dist/components/organisms/CompleteServices/styles.js +20 -0
  127. package/dist/components/organisms/DragAndDropPhases/DragAndDropPhases.stories.js +28 -0
  128. package/dist/components/organisms/DragAndDropPhases/index.js +110 -0
  129. package/dist/components/organisms/DragAndDropPhases/styles.js +20 -0
  130. package/dist/components/organisms/DragPrueba/DragPrueba.stories.js +28 -0
  131. package/dist/components/organisms/DragPrueba/index.js +95 -0
  132. package/dist/components/organisms/DragPrueba/styles.js +20 -0
  133. package/dist/components/organisms/FullProductNamev2/FullProductNamev2.stories.js +54 -0
  134. package/dist/components/organisms/FullProductNamev2/index.js +112 -0
  135. package/dist/components/organisms/FullProductNamev2/styles.js +20 -0
  136. package/dist/components/organisms/FullTabsMenuv2/FullTabsMenuv2.stories.js +39 -0
  137. package/dist/components/organisms/FullTabsMenuv2/index.js +168 -0
  138. package/dist/components/organisms/FullTabsMenuv2/styles.js +18 -0
  139. package/dist/components/organisms/ImageDataTablev2/ImageDataTablev2.stories.js +50 -0
  140. package/dist/components/organisms/ImageDataTablev2/index.js +128 -0
  141. package/dist/components/organisms/ImageDataTablev2/styles.js +26 -0
  142. package/dist/components/organisms/ImagePreviewerv2/ImagePreviewerv2.stories.js +48 -0
  143. package/dist/components/organisms/ImagePreviewerv2/index.js +36 -0
  144. package/dist/components/organisms/ImagePreviewerv2/styles.js +18 -0
  145. package/dist/components/organisms/InputGroupv2/InputGroupv2.stories.js +73 -0
  146. package/dist/components/organisms/InputGroupv2/index.js +228 -0
  147. package/dist/components/organisms/InputGroupv2/styles.js +28 -0
  148. package/dist/components/organisms/MandatoryBar/MandatoryBar.stories.js +31 -0
  149. package/dist/components/organisms/MandatoryBar/index.js +38 -0
  150. package/dist/components/organisms/MandatoryBar/styles.js +20 -0
  151. package/dist/components/organisms/ProductImageModalv2/ProductImageModalv2.stories.js +153 -0
  152. package/dist/components/organisms/ProductImageModalv2/index.js +106 -0
  153. package/dist/components/organisms/ProductImageModalv2/styles.js +20 -0
  154. package/dist/components/organisms/RenameImagesBar/RenameImagesBar.stories.js +31 -0
  155. package/dist/components/organisms/RenameImagesBar/index.js +38 -0
  156. package/dist/components/organisms/RenameImagesBar/styles.js +20 -0
  157. package/dist/components/organisms/VersionSelector/index.js +2 -4
  158. package/dist/components/organisms/VersionSelectorv2/VersionSelectorv2.stories.js +32 -0
  159. package/dist/components/organisms/VersionSelectorv2/index.js +166 -0
  160. package/dist/components/organisms/VersionSelectorv2/styles.js +20 -0
  161. package/dist/components/pages/ProductEditionv2/ProductEditionv2.stories.js +222 -0
  162. package/dist/components/pages/ProductEditionv2/index.js +2495 -0
  163. package/dist/components/pages/ProductEditionv2/styles.js +23 -0
  164. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +34 -38
  165. package/dist/components/pages/ProviderProductEdition/index.js +63 -52
  166. package/dist/global-files/variables.js +3 -1
  167. package/package.json +1 -1
  168. package/src/assets/images/Icons/infoNR.svg +8 -0
  169. package/src/assets/images/flagsv2/highPriority.svg +3 -0
  170. package/src/assets/images/flagsv2/lowPriority.svg +3 -0
  171. package/src/assets/images/flagsv2/mediumPriority.svg +3 -0
  172. package/src/assets/images/flagsv2/noPriority.svg +3 -0
  173. package/src/assets/images/generalButton/closeIconWhite.svg +4 -0
  174. package/src/assets/images/generalButton/closeIconv2.svg +4 -0
  175. package/src/components/atoms/CharsMissing/Wysiwyg.stories.js +12 -0
  176. package/src/components/atoms/CharsMissing/index.js +60 -0
  177. package/src/components/atoms/CharsMissing/styles.js +44 -0
  178. package/src/components/atoms/FeatureTagv2/FeatureTagv2.stories.js +16 -0
  179. package/src/components/atoms/FeatureTagv2/index.js +10 -0
  180. package/src/components/atoms/FeatureTagv2/styles.js +56 -0
  181. package/src/components/atoms/GeneralButton/styles.js +46 -0
  182. package/src/components/atoms/GeneralInputv2/GeneralInputv2.stories.js +33 -0
  183. package/src/components/atoms/GeneralInputv2/index.js +155 -0
  184. package/src/components/atoms/GeneralInputv2/styles.js +67 -0
  185. package/src/components/atoms/InputFormatter/styles.js +7 -3
  186. package/src/components/atoms/InputFormatterv2/Wysiwyg.stories.js +12 -0
  187. package/src/components/atoms/InputFormatterv2/index.js +148 -0
  188. package/src/components/atoms/InputFormatterv2/styles.js +39 -0
  189. package/src/components/atoms/InputImages/InputImages.stories.js +19 -0
  190. package/src/components/atoms/InputImages/index.js +25 -0
  191. package/src/components/atoms/InputImages/styles.js +17 -0
  192. package/src/components/atoms/NumberMandatory/NumberMandatory.stories.js +19 -0
  193. package/src/components/atoms/NumberMandatory/index.js +16 -0
  194. package/src/components/atoms/NumberMandatory/styles.js +11 -0
  195. package/src/components/atoms/PriorityFlagv2/PriorityFlagv2.stories.js +20 -0
  196. package/src/components/atoms/PriorityFlagv2/index.js +20 -0
  197. package/src/components/atoms/PriorityFlagv2/styles.js +6 -0
  198. package/src/components/atoms/ProductImagev2/ProductImagev2.stories.js +28 -0
  199. package/src/components/atoms/ProductImagev2/index.js +16 -0
  200. package/src/components/atoms/ProductImagev2/styles.js +62 -0
  201. package/src/components/atoms/Progress/Progress.stories.js +25 -0
  202. package/src/components/atoms/Progress/index.js +74 -0
  203. package/src/components/atoms/Progress/styles.js +98 -0
  204. package/src/components/atoms/ScreenHeaderv2/ScreenHeaderv2.stories.js +53 -0
  205. package/src/components/atoms/ScreenHeaderv2/index.js +134 -0
  206. package/src/components/atoms/ScreenHeaderv2/styles.js +103 -0
  207. package/src/components/atoms/Selectv2/VersionSelect.js +27 -0
  208. package/src/components/atoms/Selectv2/index.js +35 -0
  209. package/src/components/atoms/Selectv2/style.js +93 -0
  210. package/src/components/atoms/TabSection/index.js +1 -1
  211. package/src/components/atoms/TabSectionv2/TabSection.stories.js +25 -0
  212. package/src/components/atoms/TabSectionv2/index.js +9 -0
  213. package/src/components/atoms/TabSectionv2/styles.js +20 -0
  214. package/src/components/atoms/TooltipLight/Tooltip.stories.js +20 -0
  215. package/src/components/atoms/TooltipLight/index.js +46 -0
  216. package/src/components/atoms/TooltipLight/styles.js +65 -0
  217. package/src/components/atoms/WordsMissing/Wysiwyg.stories.js +12 -0
  218. package/src/components/atoms/WordsMissing/index.js +60 -0
  219. package/src/components/atoms/WordsMissing/styles.js +10 -0
  220. package/src/components/molecules/AsignationInfo/AsignationInfo.stories.js +17 -0
  221. package/src/components/molecules/AsignationInfo/index.js +108 -0
  222. package/src/components/molecules/AsignationInfo/styles.js +86 -0
  223. package/src/components/molecules/EditionActiveImagev2/EditionActiveImagev2.stories.js +12 -0
  224. package/src/components/molecules/EditionActiveImagev2/index.js +15 -0
  225. package/src/components/molecules/EditionActiveImagev2/styles.js +7 -0
  226. package/src/components/molecules/FeaturesBarv2/FeaturesBarv2.stories.js +20 -0
  227. package/src/components/molecules/FeaturesBarv2/index.js +32 -0
  228. package/src/components/molecules/FeaturesBarv2/styles.js +17 -0
  229. package/src/components/molecules/GalleryElementv2/GalleryElementv2.stories.js +30 -0
  230. package/src/components/molecules/GalleryElementv2/index.js +142 -0
  231. package/src/components/molecules/GalleryElementv2/styles.js +119 -0
  232. package/src/components/molecules/GalleryHeaderv2/GalleryHeaderv2.stories.js +10 -0
  233. package/src/components/molecules/GalleryHeaderv2/index.js +25 -0
  234. package/src/components/molecules/GalleryHeaderv2/styles.js +47 -0
  235. package/src/components/molecules/HeaderTopv2/HeaderTopv2.stories.js +10 -0
  236. package/src/components/molecules/HeaderTopv2/index.js +100 -0
  237. package/src/components/molecules/HeaderTopv2/styles.js +33 -0
  238. package/src/components/molecules/ImageSelectorv2/ImageSelectorv2.stories.js +46 -0
  239. package/src/components/molecules/ImageSelectorv2/index.js +22 -0
  240. package/src/components/molecules/ImageSelectorv2/styles.js +15 -0
  241. package/src/components/molecules/Phase/Phase.stories.js +37 -0
  242. package/src/components/molecules/Phase/index.js +56 -0
  243. package/src/components/molecules/Phase/styles.js +82 -0
  244. package/src/components/molecules/ProductNameHeaderv2/ProductNameHeaderv2.stories.js +37 -0
  245. package/src/components/molecules/ProductNameHeaderv2/index.js +12 -0
  246. package/src/components/molecules/ProductNameHeaderv2/styles.js +10 -0
  247. package/src/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +37 -0
  248. package/src/components/molecules/ProductSkuStatus/index.js +26 -0
  249. package/src/components/molecules/ProductSkuStatus/styles.js +7 -0
  250. package/src/components/molecules/RetailerSelectorv2/RetailerSelectorv2.stories.js +35 -0
  251. package/src/components/molecules/RetailerSelectorv2/index.js +80 -0
  252. package/src/components/molecules/RetailerSelectorv2/styles.js +21 -0
  253. package/src/components/molecules/ServiceDataValidator/ServiceDataValidator.stories.js +90 -0
  254. package/src/components/molecules/ServiceDataValidator/index.js +49 -0
  255. package/src/components/molecules/ServiceDataValidator/styles.js +36 -0
  256. package/src/components/molecules/StatusRetailer/StatusAsignationInfo.stories.js +17 -0
  257. package/src/components/molecules/StatusRetailer/index.js +55 -0
  258. package/src/components/molecules/StatusRetailer/styles.js +85 -0
  259. package/src/components/molecules/TabsMenuv2/TabsMenuv2.stories.js +19 -0
  260. package/src/components/molecules/TabsMenuv2/index.js +112 -0
  261. package/src/components/molecules/TabsMenuv2/styles.js +19 -0
  262. package/src/components/molecules/TagAndInputv2/TagAndInputv2.stories.js +24 -0
  263. package/src/components/molecules/TagAndInputv2/index.js +86 -0
  264. package/src/components/molecules/TagAndInputv2/styles.js +35 -0
  265. package/src/components/molecules/Validation/Validation.stories.js +12 -0
  266. package/src/components/molecules/Validation/index.js +77 -0
  267. package/src/components/molecules/Validation/styles.js +19 -0
  268. package/src/components/molecules/VersionItemv2/VersionItemv2.stories.js +14 -0
  269. package/src/components/molecules/VersionItemv2/index.js +59 -0
  270. package/src/components/molecules/VersionItemv2/styles.js +47 -0
  271. package/src/components/organisms/BarButtons/BarButtons.stories.js +13 -0
  272. package/src/components/organisms/BarButtons/index.js +150 -0
  273. package/src/components/organisms/BarButtons/styles.js +54 -0
  274. package/src/components/organisms/Chatv2/ChatLists/ChatLists.stories.js +65 -0
  275. package/src/components/organisms/Chatv2/ChatLists/Rotoplas.jpeg +0 -0
  276. package/src/components/organisms/Chatv2/ChatLists/THD.png +0 -0
  277. package/src/components/organisms/Chatv2/ChatLists/index.js +141 -0
  278. package/src/components/organisms/Chatv2/ChatLists/styles.js +162 -0
  279. package/src/components/organisms/Chatv2/Chatv2.stories.js +184 -0
  280. package/src/components/organisms/Chatv2/ContainerItems/ContainerItems.stories.js +142 -0
  281. package/src/components/organisms/Chatv2/ContainerItems/index.js +538 -0
  282. package/src/components/organisms/Chatv2/ContainerItems/styles.js +360 -0
  283. package/src/components/organisms/Chatv2/ContentChat/ContentChat.stories.js +102 -0
  284. package/src/components/organisms/Chatv2/ContentChat/Rotoplas.jpeg +0 -0
  285. package/src/components/organisms/Chatv2/ContentChat/THD.png +0 -0
  286. package/src/components/organisms/Chatv2/ContentChat/index.js +1016 -0
  287. package/src/components/organisms/Chatv2/ContentChat/styles.js +44 -0
  288. package/src/components/organisms/Chatv2/Footer/Footer.stories.js +22 -0
  289. package/src/components/organisms/Chatv2/Footer/index.js +668 -0
  290. package/src/components/organisms/Chatv2/Footer/styles.js +290 -0
  291. package/src/components/organisms/Chatv2/Header/Header.stories.js +66 -0
  292. package/src/components/organisms/Chatv2/Header/index.js +93 -0
  293. package/src/components/organisms/Chatv2/Header/styles.js +49 -0
  294. package/src/components/organisms/Chatv2/index.js +281 -0
  295. package/src/components/organisms/Chatv2/styles.js +85 -0
  296. package/src/components/organisms/CompleteServices/CompleteServices.stories.js +91 -0
  297. package/src/components/organisms/CompleteServices/index.js +82 -0
  298. package/src/components/organisms/CompleteServices/styles.js +35 -0
  299. package/src/components/organisms/DragAndDropPhases/DragAndDropPhases.stories.js +12 -0
  300. package/src/components/organisms/DragAndDropPhases/index.js +67 -0
  301. package/src/components/organisms/DragAndDropPhases/styles.js +20 -0
  302. package/src/components/organisms/DragPrueba/DragPrueba.stories.js +12 -0
  303. package/src/components/organisms/DragPrueba/index.js +57 -0
  304. package/src/components/organisms/DragPrueba/styles.js +8 -0
  305. package/src/components/organisms/FullProductNamev2/FullProductNamev2.stories.js +28 -0
  306. package/src/components/organisms/FullProductNamev2/index.js +101 -0
  307. package/src/components/organisms/FullProductNamev2/styles.js +49 -0
  308. package/src/components/organisms/FullTabsMenuv2/FullTabsMenuv2.stories.js +22 -0
  309. package/src/components/organisms/FullTabsMenuv2/index.js +142 -0
  310. package/src/components/organisms/FullTabsMenuv2/styles.js +47 -0
  311. package/src/components/organisms/ImageDataTablev2/ImageDataTablev2.stories.js +24 -0
  312. package/src/components/organisms/ImageDataTablev2/index.js +124 -0
  313. package/src/components/organisms/ImageDataTablev2/styles.js +18 -0
  314. package/src/components/organisms/ImagePreviewerv2/ImagePreviewerv2.stories.js +38 -0
  315. package/src/components/organisms/ImagePreviewerv2/index.js +22 -0
  316. package/src/components/organisms/ImagePreviewerv2/styles.js +7 -0
  317. package/src/components/organisms/InputGroupv2/InputGroupv2.stories.js +31 -0
  318. package/src/components/organisms/InputGroupv2/index.js +296 -0
  319. package/src/components/organisms/InputGroupv2/styles.js +90 -0
  320. package/src/components/organisms/MandatoryBar/MandatoryBar.stories.js +18 -0
  321. package/src/components/organisms/MandatoryBar/index.js +31 -0
  322. package/src/components/organisms/MandatoryBar/styles.js +12 -0
  323. package/src/components/organisms/ProductImageModalv2/ProductImageModalv2.stories.js +90 -0
  324. package/src/components/organisms/ProductImageModalv2/index.js +105 -0
  325. package/src/components/organisms/ProductImageModalv2/styles.js +71 -0
  326. package/src/components/organisms/RenameImagesBar/RenameImagesBar.stories.js +18 -0
  327. package/src/components/organisms/RenameImagesBar/index.js +30 -0
  328. package/src/components/organisms/RenameImagesBar/styles.js +12 -0
  329. package/src/components/organisms/VersionSelector/index.js +1 -2
  330. package/src/components/organisms/VersionSelectorv2/VersionSelectorv2.stories.js +15 -0
  331. package/src/components/organisms/VersionSelectorv2/index.js +105 -0
  332. package/src/components/organisms/VersionSelectorv2/styles.js +45 -0
  333. package/src/components/pages/ProductEditionv2/ProductEditionv2.stories.js +213 -0
  334. package/src/components/pages/ProductEditionv2/index.js +1758 -0
  335. package/src/components/pages/ProductEditionv2/styles.js +154 -0
  336. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +39 -29
  337. package/src/components/pages/ProviderProductEdition/index.js +29 -21
  338. package/src/global-files/data.js +1 -3
  339. package/src/global-files/variables.js +2 -0
@@ -0,0 +1,984 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Footer = void 0;
9
+
10
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
+
12
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
13
+
14
+ var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createForOfIteratorHelper"));
15
+
16
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
17
+
18
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
19
+
20
+ var _styles = require("./styles");
21
+
22
+ var _react = require("react");
23
+
24
+ var _awsSdk = _interopRequireDefault(require("aws-sdk"));
25
+
26
+ var _uuid = require("uuid");
27
+
28
+ var _Image = require("../../../atoms/Image");
29
+
30
+ var _freeSolidSvgIcons = require("@fortawesome/free-solid-svg-icons");
31
+
32
+ var _CustomIcon = require("../../../atoms/CustomIcon");
33
+
34
+ var _ButtonV = require("../../../atoms/ButtonV2");
35
+
36
+ var _IconFile = require("../../../atoms/IconFile");
37
+
38
+ var _Modal = require("../../Modal");
39
+
40
+ var _Tooltip = require("../../../atoms/Tooltip");
41
+
42
+ var _material = require("@mui/material");
43
+
44
+ var _ButtonFileChooser = require("../../../atoms/ButtonFileChooser");
45
+
46
+ var _react2 = require("swiper/react");
47
+
48
+ require("swiper/swiper.min.css");
49
+
50
+ var _swiper = require("swiper");
51
+
52
+ var _utils = require("../../../../global-files/utils");
53
+
54
+ var _InputText = require("../../../atoms/InputText");
55
+
56
+ var _jsxRuntime = require("react/jsx-runtime");
57
+
58
+ // carrousel
59
+ //import "swiper/modules/free-mode/free-mode.min.css";
60
+ var S3_BUCKET = process.env.REACT_APP_IMAGES_BUCKET;
61
+ var REGION = "us-east-1";
62
+
63
+ _awsSdk.default.config.update({
64
+ accessKeyId: process.env.REACT_APP_KUTS3,
65
+ secretAccessKey: process.env.REACT_APP_AKUTS3
66
+ });
67
+
68
+ var myBucket = new _awsSdk.default.S3({
69
+ params: {
70
+ Bucket: S3_BUCKET
71
+ },
72
+ region: REGION
73
+ });
74
+
75
+ var Footer = function Footer(props) {
76
+ var chatType = props.chatType,
77
+ dataChat = props.dataChat,
78
+ statusChat = props.statusChat,
79
+ messageDisabled = props.messageDisabled,
80
+ createItemsChat = props.createItemsChat,
81
+ errorUpdate = props.errorUpdate;
82
+
83
+ var _useState = (0, _react.useState)(""),
84
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
85
+ valueInputMessage = _useState2[0],
86
+ setValueInputMessage = _useState2[1];
87
+
88
+ var _useState3 = (0, _react.useState)([]),
89
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
90
+ filesPreview = _useState4[0],
91
+ setFilesPreview = _useState4[1];
92
+
93
+ var _useState5 = (0, _react.useState)([]),
94
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
95
+ filesJsxPreview = _useState6[0],
96
+ setFilesJsxPreview = _useState6[1];
97
+
98
+ var _useState7 = (0, _react.useState)(false),
99
+ _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
100
+ btnSendFilesLoading = _useState8[0],
101
+ setBtnSendFilesLoading = _useState8[1];
102
+
103
+ var _useState9 = (0, _react.useState)(false),
104
+ _useState10 = (0, _slicedToArray2.default)(_useState9, 2),
105
+ btnSendMessageLoading = _useState10[0],
106
+ setBtnSendMessageLoading = _useState10[1];
107
+
108
+ var _useState11 = (0, _react.useState)(false),
109
+ _useState12 = (0, _slicedToArray2.default)(_useState11, 2),
110
+ btnChooserFileDisabled = _useState12[0],
111
+ setBtnChooserFileDisabled = _useState12[1];
112
+
113
+ var _useState13 = (0, _react.useState)(false),
114
+ _useState14 = (0, _slicedToArray2.default)(_useState13, 2),
115
+ inputMessageDisabled = _useState14[0],
116
+ setInputMessageDisabled = _useState14[1];
117
+
118
+ var _useState15 = (0, _react.useState)(false),
119
+ _useState16 = (0, _slicedToArray2.default)(_useState15, 2),
120
+ openPreview = _useState16[0],
121
+ setOpenPreview = _useState16[1];
122
+
123
+ var _useState17 = (0, _react.useState)(false),
124
+ _useState18 = (0, _slicedToArray2.default)(_useState17, 2),
125
+ toggleFocusInputMessage = _useState18[0],
126
+ setToggleFocusInputMessage = _useState18[1];
127
+
128
+ var _useState19 = (0, _react.useState)({
129
+ show: false,
130
+ fileName: ""
131
+ }),
132
+ _useState20 = (0, _slicedToArray2.default)(_useState19, 2),
133
+ tooltipFileName = _useState20[0],
134
+ setTooltipFileName = _useState20[1];
135
+
136
+ var _useState21 = (0, _react.useState)({
137
+ show: false,
138
+ title: "",
139
+ message: "",
140
+ errorInputMessage: false
141
+ }),
142
+ _useState22 = (0, _slicedToArray2.default)(_useState21, 2),
143
+ modalAlert = _useState22[0],
144
+ setModalAlert = _useState22[1];
145
+
146
+ var containerRef = (0, _react.useRef)();
147
+ var refInputTextMessage = (0, _react.useRef)();
148
+ (0, _react.useEffect)(function () {
149
+ setTooltipFileName({
150
+ show: false,
151
+ fileName: ""
152
+ });
153
+ renderFilesPreview();
154
+ }, [filesPreview]);
155
+ (0, _react.useEffect)(function () {
156
+ if (filesJsxPreview.length) setOpenPreview(true);else setOpenPreview(false);
157
+ }, [filesJsxPreview]);
158
+ (0, _react.useEffect)(function () {
159
+ refInputTextMessage.current && refInputTextMessage.current.focus();
160
+ }, [toggleFocusInputMessage]);
161
+
162
+ var sendFilesPreview = /*#__PURE__*/function () {
163
+ var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
164
+ var files, customFiles, fileUploadRequests, _iterator, _step, file, errorMessage, fullBase64, dataBuffer, fileKey, today, paramsCreate, responseAWS, items, index, _file, valueItem, imgSize, responseError, failedFiles, errorDetailFiles;
165
+
166
+ return _regenerator.default.wrap(function _callee$(_context) {
167
+ while (1) {
168
+ switch (_context.prev = _context.next) {
169
+ case 0:
170
+ if (!createItemsChat) {
171
+ _context.next = 90;
172
+ break;
173
+ }
174
+
175
+ files = filesPreview.slice();
176
+
177
+ if (files.length) {
178
+ _context.next = 5;
179
+ break;
180
+ }
181
+
182
+ setModalAlert({
183
+ show: true,
184
+ title: "No hay ningun archivo o imagen seleccionado para enviar",
185
+ message: "Por favor, cargue los archivos o imagenes que quiera enviar al chat",
186
+ errorInputMessage: false
187
+ });
188
+ return _context.abrupt("return");
189
+
190
+ case 5:
191
+ disableSecondaryContainer(true); // subir archivos a AWS
192
+
193
+ customFiles = [];
194
+ _context.prev = 7;
195
+ fileUploadRequests = [];
196
+ _iterator = (0, _createForOfIteratorHelper2.default)(files);
197
+ _context.prev = 10;
198
+
199
+ _iterator.s();
200
+
201
+ case 12:
202
+ if ((_step = _iterator.n()).done) {
203
+ _context.next = 41;
204
+ break;
205
+ }
206
+
207
+ file = _step.value;
208
+ errorMessage = void 0; // obtener base64
209
+
210
+ _context.next = 17;
211
+ return (0, _utils.getBase64)(file);
212
+
213
+ case 17:
214
+ fullBase64 = _context.sent;
215
+
216
+ if (!fullBase64) {
217
+ errorMessage = "No se pudo decodificar el archivo o imagen";
218
+ } // obtener buffer
219
+
220
+
221
+ dataBuffer = void 0;
222
+ if (!errorMessage) dataBuffer = (0, _utils.getDataBuffer)((0, _utils.getDataBase64)(fullBase64));
223
+
224
+ if (!dataBuffer) {
225
+ errorMessage = "No se pudo decodificar el archivo o imagen";
226
+ } // obtener la key
227
+
228
+
229
+ fileKey = "chat/";
230
+ _context.t0 = chatType;
231
+ _context.next = _context.t0 === "merchant_product" ? 26 : _context.t0 === "order_product" ? 28 : _context.t0 === "ticket" ? 30 : _context.t0 === "product_status" ? 32 : 34;
232
+ break;
233
+
234
+ case 26:
235
+ if ((0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.id) && (0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.version)) {
236
+ fileKey += "merchantArticle/".concat(dataChat.id, "-").concat(dataChat.version, "/");
237
+ } else {
238
+ errorMessage = "El ID o la version del producto no es valido";
239
+ }
240
+
241
+ return _context.abrupt("break", 35);
242
+
243
+ case 28:
244
+ if ((0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.id) && (0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.version)) {
245
+ fileKey += "orderArticle/".concat(dataChat.id, "-").concat(dataChat.version, "/");
246
+ } else {
247
+ errorMessage = "El ID o la version del producto no es valido";
248
+ }
249
+
250
+ return _context.abrupt("break", 35);
251
+
252
+ case 30:
253
+ if ((0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.id)) {
254
+ fileKey += "ticket/".concat(dataChat.id, "/");
255
+ } else {
256
+ errorMessage = "El ID del ticket no es valido";
257
+ }
258
+
259
+ return _context.abrupt("break", 35);
260
+
261
+ case 32:
262
+ if ((0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.id) && (0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.version) && (0, _utils.isValidNaturalNumber)(dataChat === null || dataChat === void 0 ? void 0 : dataChat.retailerId)) {
263
+ fileKey += "productStatus/".concat(dataChat.id, "-").concat(dataChat === null || dataChat === void 0 ? void 0 : dataChat.version, "-").concat(dataChat === null || dataChat === void 0 ? void 0 : dataChat.retailerId, "/");
264
+ } else {
265
+ errorMessage = "El ID del ticket no es valido";
266
+ }
267
+
268
+ return _context.abrupt("break", 35);
269
+
270
+ case 34:
271
+ errorMessage = "El tipo de chat no se especifico de manera correcta";
272
+
273
+ case 35:
274
+ if (!errorMessage) {
275
+ today = new Date();
276
+ fileKey += "".concat((0, _uuid.v4)(), "-").concat(today.getTime(), ".").concat((0, _utils.getFileExtension)(file.name));
277
+ } else {
278
+ fileKey = undefined;
279
+ } // enviar file a AWS
280
+
281
+
282
+ customFiles.push({
283
+ itemType: file.type.split("/")[0] === "image" ? "img" : "file",
284
+ key: fileKey,
285
+ errorOwn: errorMessage
286
+ });
287
+ paramsCreate = {
288
+ ACL: "public-read",
289
+ Body: dataBuffer,
290
+ Bucket: S3_BUCKET,
291
+ Key: fileKey
292
+ };
293
+ fileUploadRequests.push(myBucket.putObject(paramsCreate).promise());
294
+
295
+ case 39:
296
+ _context.next = 12;
297
+ break;
298
+
299
+ case 41:
300
+ _context.next = 46;
301
+ break;
302
+
303
+ case 43:
304
+ _context.prev = 43;
305
+ _context.t1 = _context["catch"](10);
306
+
307
+ _iterator.e(_context.t1);
308
+
309
+ case 46:
310
+ _context.prev = 46;
311
+
312
+ _iterator.f();
313
+
314
+ return _context.finish(46);
315
+
316
+ case 49:
317
+ _context.next = 51;
318
+ return Promise.allSettled(fileUploadRequests);
319
+
320
+ case 51:
321
+ responseAWS = _context.sent;
322
+ responseAWS.forEach(function (responseFile, index) {
323
+ if (responseFile.status === "rejected") {
324
+ customFiles[index].errorAWS = responseFile.reason.message;
325
+ customFiles[index].uploaded = false;
326
+ } else {
327
+ customFiles[index].uploaded = true;
328
+ }
329
+ });
330
+ _context.next = 61;
331
+ break;
332
+
333
+ case 55:
334
+ _context.prev = 55;
335
+ _context.t2 = _context["catch"](7);
336
+ console.log(_context.t2);
337
+ disableSecondaryContainer(false);
338
+ setModalAlert({
339
+ show: true,
340
+ title: "hubo un problema al subir los archivos al chat",
341
+ message: "".concat(_context.t2.message, "\n Reporta esto a TI"),
342
+ errorInputMessage: false
343
+ });
344
+ return _context.abrupt("return");
345
+
346
+ case 61:
347
+ // obtener las keys de los files subidos
348
+ items = [];
349
+ index = 0;
350
+
351
+ case 63:
352
+ if (!(index < customFiles.length)) {
353
+ _context.next = 76;
354
+ break;
355
+ }
356
+
357
+ _file = customFiles[index];
358
+
359
+ if (!_file.uploaded) {
360
+ _context.next = 73;
361
+ break;
362
+ }
363
+
364
+ valueItem = {
365
+ key: _file.key,
366
+ name: files[index].name
367
+ }; // caso imagen -> obtener width y height
368
+
369
+ if (!(_file.itemType === "img")) {
370
+ _context.next = 72;
371
+ break;
372
+ }
373
+
374
+ _context.next = 70;
375
+ return (0, _utils.getImageSize)(files[index]);
376
+
377
+ case 70:
378
+ imgSize = _context.sent;
379
+
380
+ if (imgSize) {
381
+ valueItem.width = imgSize.width;
382
+ valueItem.height = imgSize.height;
383
+ }
384
+
385
+ case 72:
386
+ items.push({
387
+ type: _file.itemType,
388
+ value: JSON.stringify(valueItem)
389
+ });
390
+
391
+ case 73:
392
+ index++;
393
+ _context.next = 63;
394
+ break;
395
+
396
+ case 76:
397
+ if (!items.length) {
398
+ _context.next = 84;
399
+ break;
400
+ }
401
+
402
+ _context.next = 79;
403
+ return createItemsChat(items);
404
+
405
+ case 79:
406
+ responseError = _context.sent;
407
+
408
+ if (!responseError) {
409
+ _context.next = 84;
410
+ break;
411
+ }
412
+
413
+ setModalAlert({
414
+ show: true,
415
+ title: responseError.message,
416
+ message: responseError.errorDetail,
417
+ errorInputMessage: false
418
+ });
419
+ disableSecondaryContainer(false);
420
+ return _context.abrupt("return");
421
+
422
+ case 84:
423
+ // obtener los errores de los files no subidos a AWS
424
+ failedFiles = [];
425
+ errorDetailFiles = "";
426
+ customFiles.forEach(function (file, index) {
427
+ if (!file.uploaded) {
428
+ if (failedFiles.length === 0) {
429
+ errorDetailFiles = "".concat(files[index].name, ":\n Error: ").concat(file.errorOwn ? file.errorOwn : file.errorAWS);
430
+ } else {
431
+ errorDetailFiles += "\n\n".concat(files[index].name, ":\n Error: ").concat(file.errorOwn ? file.errorOwn : file.errorAWS);
432
+ }
433
+
434
+ failedFiles.push(files[index]);
435
+ }
436
+ });
437
+
438
+ if (failedFiles.length) {
439
+ setModalAlert({
440
+ show: true,
441
+ title: "".concat(failedFiles.length, "/").concat(files.length, " archivos no fueron enviados al chat"),
442
+ message: errorDetailFiles,
443
+ errorInputMessage: false
444
+ });
445
+ } // actualizar filesPreview
446
+
447
+
448
+ disableSecondaryContainer(false);
449
+ setFilesPreview(failedFiles);
450
+
451
+ case 90:
452
+ case "end":
453
+ return _context.stop();
454
+ }
455
+ }
456
+ }, _callee, null, [[7, 55], [10, 43, 46, 49]]);
457
+ }));
458
+
459
+ return function sendFilesPreview() {
460
+ return _ref.apply(this, arguments);
461
+ };
462
+ }();
463
+
464
+ var sendMessage = /*#__PURE__*/function () {
465
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
466
+ var responseError;
467
+ return _regenerator.default.wrap(function _callee2$(_context2) {
468
+ while (1) {
469
+ switch (_context2.prev = _context2.next) {
470
+ case 0:
471
+ if (!createItemsChat) {
472
+ _context2.next = 15;
473
+ break;
474
+ }
475
+
476
+ if (!(0, _utils.isStringEmpty)(valueInputMessage)) {
477
+ _context2.next = 5;
478
+ break;
479
+ }
480
+
481
+ setValueInputMessage("");
482
+ setModalAlert({
483
+ show: true,
484
+ title: "mensaje vacío",
485
+ message: "Por favor, especifica el mensaje que quieres enviar al chat",
486
+ errorInputMessage: true
487
+ });
488
+ return _context2.abrupt("return");
489
+
490
+ case 5:
491
+ setBtnSendMessageLoading(true);
492
+ setBtnChooserFileDisabled(true);
493
+ setInputMessageDisabled(true);
494
+ _context2.next = 10;
495
+ return createItemsChat([{
496
+ type: "message",
497
+ value: valueInputMessage.trim()
498
+ }]);
499
+
500
+ case 10:
501
+ responseError = _context2.sent;
502
+ setInputMessageDisabled(false);
503
+ setBtnSendMessageLoading(false);
504
+ setBtnChooserFileDisabled(false);
505
+
506
+ if (responseError) {
507
+ setModalAlert({
508
+ show: true,
509
+ title: responseError.message,
510
+ message: responseError.errorDetail,
511
+ errorInputMessage: true
512
+ });
513
+ } else {
514
+ setValueInputMessage("");
515
+ setToggleFocusInputMessage(function (prev) {
516
+ return !prev;
517
+ });
518
+ }
519
+
520
+ case 15:
521
+ case "end":
522
+ return _context2.stop();
523
+ }
524
+ }
525
+ }, _callee2);
526
+ }));
527
+
528
+ return function sendMessage() {
529
+ return _ref2.apply(this, arguments);
530
+ };
531
+ }();
532
+
533
+ var disableSecondaryContainer = function disableSecondaryContainer() {
534
+ var disabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
535
+ setBtnSendFilesLoading(disabled);
536
+ setBtnChooserFileDisabled(disabled);
537
+ setOpenPreview(!disabled);
538
+ };
539
+
540
+ var deleteFile = /*#__PURE__*/function () {
541
+ var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(index) {
542
+ var newFiles;
543
+ return _regenerator.default.wrap(function _callee3$(_context3) {
544
+ while (1) {
545
+ switch (_context3.prev = _context3.next) {
546
+ case 0:
547
+ newFiles = filesPreview.slice();
548
+ newFiles.splice(index, 1);
549
+ setFilesPreview(newFiles);
550
+
551
+ case 3:
552
+ case "end":
553
+ return _context3.stop();
554
+ }
555
+ }
556
+ }, _callee3);
557
+ }));
558
+
559
+ return function deleteFile(_x) {
560
+ return _ref3.apply(this, arguments);
561
+ };
562
+ }();
563
+
564
+ var renderFilesPreview = /*#__PURE__*/function () {
565
+ var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
566
+ var jsxFiles, _loop, index;
567
+
568
+ return _regenerator.default.wrap(function _callee5$(_context6) {
569
+ while (1) {
570
+ switch (_context6.prev = _context6.next) {
571
+ case 0:
572
+ jsxFiles = [];
573
+ _loop = /*#__PURE__*/_regenerator.default.mark(function _loop(index) {
574
+ var _file$type;
575
+
576
+ var file, fileType, base64;
577
+ return _regenerator.default.wrap(function _loop$(_context5) {
578
+ while (1) {
579
+ switch (_context5.prev = _context5.next) {
580
+ case 0:
581
+ file = filesPreview[index];
582
+ fileType = (_file$type = file.type) === null || _file$type === void 0 ? void 0 : _file$type.split("/")[0];
583
+ _context5.next = 4;
584
+ return (0, _utils.getBase64)(file);
585
+
586
+ case 4:
587
+ base64 = _context5.sent;
588
+ jsxFiles.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.SwiperSlide, {
589
+ className: "item-carrousel",
590
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ContainerItemCarrousel, {
591
+ children: [fileType === "image" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.Image, {
592
+ width: "100%",
593
+ className: "container-img",
594
+ sizeLoading: 40,
595
+ colorLoading: undefined,
596
+ src: base64,
597
+ componentDefault: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomIcon.CustomIcon, {
598
+ className: "icon-img",
599
+ size: 60,
600
+ icon: _freeSolidSvgIcons.faImage,
601
+ type: "pink",
602
+ transparent: true
603
+ })
604
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconFile.IconFile, {
605
+ transparent: true,
606
+ size: 60,
607
+ ext: (0, _utils.getFileExtension)(file.name)
608
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
609
+ className: "container-delete",
610
+ onMouseEnter: function onMouseEnter() {
611
+ setTooltipFileName({
612
+ show: true,
613
+ fileName: file.name
614
+ });
615
+ },
616
+ onMouseLeave: function onMouseLeave() {
617
+ setTooltipFileName({
618
+ show: false,
619
+ fileName: ""
620
+ });
621
+ },
622
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
623
+ className: "btn-delete",
624
+ type: "white",
625
+ label: "Eliminar",
626
+ size: 8,
627
+ borderType: "oval",
628
+ icon: _freeSolidSvgIcons.faTrash,
629
+ isLoading: undefined,
630
+ onClick: /*#__PURE__*/function () {
631
+ var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(event) {
632
+ return _regenerator.default.wrap(function _callee4$(_context4) {
633
+ while (1) {
634
+ switch (_context4.prev = _context4.next) {
635
+ case 0:
636
+ deleteFile(index);
637
+
638
+ case 1:
639
+ case "end":
640
+ return _context4.stop();
641
+ }
642
+ }
643
+ }, _callee4);
644
+ }));
645
+
646
+ return function (_x2) {
647
+ return _ref5.apply(this, arguments);
648
+ };
649
+ }()
650
+ })
651
+ })]
652
+ })
653
+ }, "item-" + index));
654
+
655
+ case 6:
656
+ case "end":
657
+ return _context5.stop();
658
+ }
659
+ }
660
+ }, _loop);
661
+ });
662
+ index = 0;
663
+
664
+ case 3:
665
+ if (!(index < filesPreview.length)) {
666
+ _context6.next = 8;
667
+ break;
668
+ }
669
+
670
+ return _context6.delegateYield(_loop(index), "t0", 5);
671
+
672
+ case 5:
673
+ index++;
674
+ _context6.next = 3;
675
+ break;
676
+
677
+ case 8:
678
+ setFilesJsxPreview(jsxFiles);
679
+
680
+ case 9:
681
+ case "end":
682
+ return _context6.stop();
683
+ }
684
+ }
685
+ }, _callee5);
686
+ }));
687
+
688
+ return function renderFilesPreview() {
689
+ return _ref4.apply(this, arguments);
690
+ };
691
+ }();
692
+
693
+ var onChangeFiles = /*#__PURE__*/function () {
694
+ var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(selectedFiles) {
695
+ var newFiles;
696
+ return _regenerator.default.wrap(function _callee6$(_context7) {
697
+ while (1) {
698
+ switch (_context7.prev = _context7.next) {
699
+ case 0:
700
+ newFiles = filesPreview.slice();
701
+ newFiles = newFiles.concat(selectedFiles);
702
+ setFilesPreview(newFiles);
703
+
704
+ case 3:
705
+ case "end":
706
+ return _context7.stop();
707
+ }
708
+ }
709
+ }, _callee6);
710
+ }));
711
+
712
+ return function onChangeFiles(_x3) {
713
+ return _ref6.apply(this, arguments);
714
+ };
715
+ }();
716
+
717
+ var getErrorUpdate = function getErrorUpdate() {
718
+ if (errorUpdate !== null && errorUpdate !== void 0 && errorUpdate.startDate) {
719
+ var errorDetail = "Ultima actualización hace ";
720
+
721
+ if (errorUpdate !== null && errorUpdate !== void 0 && errorUpdate.lastDate) {
722
+ var msDif = errorUpdate.lastDate.getTime() - errorUpdate.startDate.getTime();
723
+ var minutes = Math.floor(msDif / 60000);
724
+ var hours = Math.floor(minutes / 60);
725
+
726
+ if (hours === 0) {
727
+ if (minutes === 0) errorDetail += "menos de 1 minuto";else if (minutes === 1) errorDetail += "1 minuto";else errorDetail += minutes + " minutos";
728
+ } else {
729
+ if (hours === 1) errorDetail += "1 hora con ";else errorDetail += hours + " horas con ";
730
+ if (minutes === 0) errorDetail += "menos de 1 minuto";else if (minutes === 1) errorDetail += "1 minuto";else errorDetail += minutes + " minutos";
731
+ }
732
+ } else {
733
+ errorDetail += "menos de 1 minuto";
734
+ } // retornar el icono
735
+
736
+
737
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
738
+ componentTooltip: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
739
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
740
+ className: "label-title",
741
+ children: "Chat desactualizado"
742
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
743
+ className: "label-detail",
744
+ children: errorDetail
745
+ })]
746
+ }),
747
+ className: "container-ErrorUpdate",
748
+ classNameTooltip: "tooltipErrorUpdate",
749
+ position: "topCenter",
750
+ addArrow: false,
751
+ transitionType: "zoom",
752
+ followCursor: false,
753
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomIcon.CustomIcon, {
754
+ className: "icon-errorUpdate",
755
+ size: 15,
756
+ icon: _freeSolidSvgIcons.faExclamationTriangle,
757
+ type: "pink",
758
+ transparent: true
759
+ })
760
+ });
761
+ } else {
762
+ return null;
763
+ }
764
+ };
765
+
766
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
767
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
768
+ ref: containerRef,
769
+ children: statusChat === "closed" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
770
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
771
+ className: "container-chatDisabled",
772
+ children: [getErrorUpdate(), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
773
+ className: "label-chatDisabled",
774
+ children: messageDisabled
775
+ })]
776
+ })
777
+ }) : filesJsxPreview.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
778
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ContainerMain, {
779
+ children: [getErrorUpdate(), /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputText.InputText, {
780
+ className: "input-itemMessage",
781
+ type: "gray",
782
+ transparent: true,
783
+ size: 13,
784
+ placeHolder: "Escribe aqu\xED...",
785
+ multiline: true,
786
+ maxRows: 5,
787
+ minRows: 1,
788
+ disabled: inputMessageDisabled,
789
+ text: valueInputMessage,
790
+ onChangeText: function onChangeText(newValue) {
791
+ return setValueInputMessage(newValue);
792
+ },
793
+ onEnter: /*#__PURE__*/function () {
794
+ var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(event) {
795
+ return _regenerator.default.wrap(function _callee7$(_context8) {
796
+ while (1) {
797
+ switch (_context8.prev = _context8.next) {
798
+ case 0:
799
+ _context8.next = 2;
800
+ return sendMessage();
801
+
802
+ case 2:
803
+ return _context8.abrupt("return", _context8.sent);
804
+
805
+ case 3:
806
+ case "end":
807
+ return _context8.stop();
808
+ }
809
+ }
810
+ }, _callee7);
811
+ }));
812
+
813
+ return function (_x4) {
814
+ return _ref7.apply(this, arguments);
815
+ };
816
+ }(),
817
+ refInputText: refInputTextMessage
818
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonFileChooser.ButtonFileChooser, {
819
+ className: "btn-chooserFiles",
820
+ type: "gray",
821
+ transparent: true,
822
+ size: 18,
823
+ disabled: btnChooserFileDisabled,
824
+ showIcon: true,
825
+ multipleFiles: true,
826
+ onChangeFiles: onChangeFiles
827
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
828
+ className: "btn-sendMessage",
829
+ type: "pink",
830
+ size: 10,
831
+ borderType: "circle",
832
+ icon: _freeSolidSvgIcons.faArrowUp,
833
+ isLoading: btnSendMessageLoading,
834
+ onClick: /*#__PURE__*/function () {
835
+ var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(event) {
836
+ return _regenerator.default.wrap(function _callee8$(_context9) {
837
+ while (1) {
838
+ switch (_context9.prev = _context9.next) {
839
+ case 0:
840
+ _context9.next = 2;
841
+ return sendMessage();
842
+
843
+ case 2:
844
+ case "end":
845
+ return _context9.stop();
846
+ }
847
+ }
848
+ }, _callee8);
849
+ }));
850
+
851
+ return function (_x5) {
852
+ return _ref8.apply(this, arguments);
853
+ };
854
+ }()
855
+ })]
856
+ })
857
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
858
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
859
+ open: openPreview,
860
+ placement: "top-start",
861
+ arrow: false,
862
+ componentsProps: {
863
+ popper: {
864
+ className: "tooltip-previewFiles",
865
+ disablePortal: true
866
+ },
867
+ transition: {
868
+ timeout: 300
869
+ }
870
+ },
871
+ title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
872
+ open: tooltipFileName.show,
873
+ placement: "top",
874
+ arrow: false,
875
+ followCursor: true,
876
+ TransitionComponent: _material.Fade,
877
+ componentsProps: {
878
+ popper: {
879
+ className: "tooltip-previewFileName",
880
+ disablePortal: true
881
+ },
882
+ transition: {
883
+ timeout: 300
884
+ }
885
+ },
886
+ title: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
887
+ children: tooltipFileName.fileName
888
+ }),
889
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
890
+ className: "container-carrouselFiles",
891
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Swiper, {
892
+ spaceBetween: 5,
893
+ slidesPerView: "auto",
894
+ freeMode: true,
895
+ mousewheel: true,
896
+ keyboard: true,
897
+ modules: [_swiper.Mousewheel, _swiper.Keyboard, _swiper.FreeMode],
898
+ className: "carrousel-files",
899
+ children: filesJsxPreview
900
+ })
901
+ })
902
+ }),
903
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ContainerSecondary, {
904
+ children: [getErrorUpdate(), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Slide, {
905
+ direction: "left",
906
+ in: true,
907
+ timeout: 500,
908
+ container: containerRef.current,
909
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
910
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonFileChooser.ButtonFileChooser, {
911
+ className: "btn-chooserFiles",
912
+ type: "gray",
913
+ size: 17,
914
+ borderType: "circle",
915
+ showIcon: true,
916
+ disabled: btnChooserFileDisabled,
917
+ multipleFiles: true,
918
+ onChangeFiles: onChangeFiles
919
+ })
920
+ })
921
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Slide, {
922
+ direction: "up",
923
+ in: true,
924
+ timeout: 500,
925
+ container: containerRef.current,
926
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
927
+ className: "slide-btnSendFiles",
928
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
929
+ className: "btn-sendFiles",
930
+ type: "pink",
931
+ label: "Enviar archivos",
932
+ size: 12,
933
+ borderType: "oval",
934
+ loading: btnSendFilesLoading,
935
+ isLoading: btnSendFilesLoading,
936
+ onClick: /*#__PURE__*/function () {
937
+ var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(event) {
938
+ return _regenerator.default.wrap(function _callee9$(_context10) {
939
+ while (1) {
940
+ switch (_context10.prev = _context10.next) {
941
+ case 0:
942
+ _context10.next = 2;
943
+ return sendFilesPreview();
944
+
945
+ case 2:
946
+ case "end":
947
+ return _context10.stop();
948
+ }
949
+ }
950
+ }, _callee9);
951
+ }));
952
+
953
+ return function (_x6) {
954
+ return _ref9.apply(this, arguments);
955
+ };
956
+ }()
957
+ })
958
+ })
959
+ })]
960
+ })
961
+ })
962
+ })
963
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, {
964
+ className: "container-modalAlert",
965
+ show: modalAlert.show,
966
+ title: modalAlert.title,
967
+ message: modalAlert.message,
968
+ icon: "info",
969
+ onClickBtnDefault: function onClickBtnDefault(event) {
970
+ setModalAlert(function (prev) {
971
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, prev), {}, {
972
+ show: false,
973
+ errorInputMessage: false
974
+ });
975
+ });
976
+ setToggleFocusInputMessage(function (prev) {
977
+ return !prev;
978
+ });
979
+ }
980
+ })]
981
+ });
982
+ };
983
+
984
+ exports.Footer = Footer;