contentoh-components-library 21.0.60 → 21.0.63

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 (246) hide show
  1. package/.env.development +18 -5
  2. package/.env.production +16 -3
  3. package/CHANGELOG.md +31 -33
  4. package/dist/assets/images/generalButton/downloadIcon.svg +3 -0
  5. package/dist/assets/images/modalsSVGs/attributesSent.svg +208 -0
  6. package/dist/assets/images/modalsSVGs/descriptionSent.svg +237 -0
  7. package/dist/assets/images/modalsSVGs/providerSent.svg +445 -0
  8. package/dist/assets/images/modalsSVGs/uploadingImages.svg +148 -0
  9. package/dist/components/atoms/AsignationOption/index.js +9 -5
  10. package/dist/components/atoms/AsignationOption/styles.js +1 -1
  11. package/dist/components/{molecules/SignInLogin/SignInLogin.stories.js → atoms/CharCounter/CharCounter.stories.js} +10 -7
  12. package/dist/components/atoms/CharCounter/index.js +22 -0
  13. package/dist/components/{molecules/LogoLoading → atoms/CharCounter}/styles.js +3 -1
  14. package/dist/components/atoms/CheckBox/index.js +4 -2
  15. package/dist/components/atoms/Commentary/Commentary.stories.js +1 -0
  16. package/dist/components/atoms/Commentary/index.js +23 -0
  17. package/dist/components/{organisms/ChangePassword → atoms/Commentary}/styles.js +6 -1
  18. package/dist/components/atoms/GeneralButton/index.js +5 -0
  19. package/dist/components/atoms/GeneralButton/styles.js +4 -2
  20. package/dist/components/atoms/GeneralInput/index.js +72 -25
  21. package/dist/components/atoms/GeneralInput/styles.js +7 -1
  22. package/dist/components/atoms/GenericModal/index.js +4 -2
  23. package/dist/components/atoms/GenericModal/styles.js +1 -1
  24. package/dist/components/atoms/GradientPanel/styles.js +1 -1
  25. package/dist/components/atoms/Input/index.js +26 -0
  26. package/dist/components/atoms/Input/style.js +26 -0
  27. package/dist/components/{organisms/ChangePassword/ChangePassword.stories.js → atoms/InputFormatter/Wysiwyg.stories.js} +9 -7
  28. package/dist/components/atoms/InputFormatter/index.js +184 -0
  29. package/dist/components/atoms/InputFormatter/styles.js +33 -0
  30. package/dist/components/atoms/LabelToInput/index.js +53 -0
  31. package/dist/components/atoms/LabelToInput/style.js +22 -0
  32. package/dist/components/atoms/Loading/index.js +0 -1
  33. package/dist/components/atoms/LogoImage/index.js +0 -1
  34. package/dist/components/atoms/Percent/Percent.stories.js +39 -0
  35. package/dist/components/atoms/Percent/index.js +39 -0
  36. package/dist/components/atoms/Percent/styles.js +20 -0
  37. package/dist/components/atoms/PriorityFlag/index.js +1 -1
  38. package/dist/components/atoms/ProductImage/styles.js +1 -1
  39. package/dist/components/atoms/ProgressBar/index.js +2 -2
  40. package/dist/components/atoms/ProgressBar/styles.js +3 -5
  41. package/dist/components/atoms/ScreenHeader/index.js +1 -1
  42. package/dist/components/atoms/ScreenHeader/styles.js +1 -1
  43. package/dist/components/atoms/Select/index.js +39 -0
  44. package/dist/components/atoms/Select/style.js +32 -0
  45. package/dist/components/atoms/StatusTag/index.js +37 -2
  46. package/dist/components/atoms/StatusTag/styles.js +1 -1
  47. package/dist/components/atoms/ValidationPanel/index.js +4 -3
  48. package/dist/components/molecules/AvatarAndValidation/index.js +17 -7
  49. package/dist/components/molecules/AvatarAndValidation/styles.js +1 -1
  50. package/dist/components/molecules/CarouselImagesLogin/index.js +42 -40
  51. package/dist/components/molecules/FeaturesBar/index.js +1 -1
  52. package/dist/components/molecules/GalleryElement/index.js +80 -21
  53. package/dist/components/molecules/GalleryElement/styles.js +1 -1
  54. package/dist/components/molecules/GalleryHeader/index.js +28 -6
  55. package/dist/components/molecules/GalleryHeader/styles.js +1 -1
  56. package/dist/components/molecules/ImageSelector/index.js +2 -4
  57. package/dist/components/molecules/LoginPasswordStrength/index.js +6 -6
  58. package/dist/components/molecules/LoginPasswordStrength/styles.js +1 -1
  59. package/dist/components/molecules/ProductNameHeader/index.js +1 -2
  60. package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +48 -0
  61. package/dist/components/molecules/RetailerSelector/index.js +74 -0
  62. package/dist/components/{atoms/MenuCommercialRetailers → molecules/RetailerSelector}/styles.js +1 -1
  63. package/dist/components/molecules/StatusAsignationInfo/index.js +46 -25
  64. package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
  65. package/dist/components/molecules/TableHeader/index.js +12 -5
  66. package/dist/components/molecules/TableHeader/styles.js +1 -1
  67. package/dist/components/molecules/TagAndInput/index.js +24 -2
  68. package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +31 -0
  69. package/dist/components/molecules/TextAndGradient/index.js +36 -0
  70. package/dist/components/molecules/TextAndGradient/styles.js +18 -0
  71. package/dist/components/organisms/FullProductNameHeader/index.js +32 -8
  72. package/dist/components/organisms/FullTabsMenu/index.js +18 -5
  73. package/dist/components/organisms/ImageDataTable/index.js +90 -14
  74. package/dist/components/organisms/InputGroup/index.js +34 -13
  75. package/dist/components/organisms/InputGroup/styles.js +1 -1
  76. package/dist/components/organisms/ProductImageModal/index.js +15 -11
  77. package/dist/components/organisms/ProductImageModal/styles.js +1 -1
  78. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +91 -347
  79. package/dist/components/pages/RetailerProductEdition/index.js +1608 -60
  80. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  81. package/dist/global-files/data.js +212 -53
  82. package/dist/global-files/global-styles.css +1 -0
  83. package/dist/global-files/variables.js +1 -0
  84. package/dist/index.js +30 -277
  85. package/package.json +12 -14
  86. package/src/assets/images/generalButton/downloadIcon.svg +3 -0
  87. package/src/assets/images/modalsSVGs/attributesSent.svg +208 -0
  88. package/src/assets/images/modalsSVGs/descriptionSent.svg +237 -0
  89. package/src/assets/images/modalsSVGs/providerSent.svg +445 -0
  90. package/src/assets/images/modalsSVGs/uploadingImages.svg +148 -0
  91. package/src/components/atoms/AsignationOption/index.js +7 -5
  92. package/src/components/atoms/AsignationOption/styles.js +9 -1
  93. package/src/components/atoms/CharCounter/CharCounter.stories.js +11 -0
  94. package/src/components/atoms/CharCounter/index.js +13 -0
  95. package/src/components/atoms/CharCounter/styles.js +10 -0
  96. package/src/components/atoms/CheckBox/index.js +8 -2
  97. package/src/components/atoms/Commentary/Commentary.stories.js +0 -0
  98. package/src/components/atoms/Commentary/index.js +9 -0
  99. package/src/components/atoms/Commentary/styles.js +16 -0
  100. package/src/components/atoms/GeneralButton/index.js +9 -2
  101. package/src/components/atoms/GeneralButton/styles.js +23 -0
  102. package/src/components/atoms/GeneralInput/index.js +71 -23
  103. package/src/components/atoms/GeneralInput/styles.js +11 -1
  104. package/src/components/atoms/GenericModal/index.js +2 -2
  105. package/src/components/atoms/GenericModal/styles.js +10 -2
  106. package/src/components/atoms/GradientPanel/styles.js +0 -1
  107. package/src/components/atoms/Input/index.js +15 -0
  108. package/src/components/atoms/Input/style.js +31 -0
  109. package/src/components/atoms/InputFormatter/Wysiwyg.stories.js +12 -0
  110. package/src/components/atoms/InputFormatter/index.js +144 -0
  111. package/src/components/atoms/InputFormatter/styles.js +40 -0
  112. package/src/components/atoms/LabelToInput/index.js +26 -0
  113. package/src/components/atoms/LabelToInput/style.js +41 -0
  114. package/src/components/atoms/Loading/index.js +2 -3
  115. package/src/components/atoms/LogoImage/index.js +1 -1
  116. package/src/components/atoms/PriorityFlag/index.js +1 -1
  117. package/src/components/atoms/ProductImage/styles.js +1 -1
  118. package/src/components/atoms/ProgressBar/index.js +2 -2
  119. package/src/components/atoms/ProgressBar/styles.js +54 -3
  120. package/src/components/atoms/ScreenHeader/index.js +7 -3
  121. package/src/components/atoms/ScreenHeader/styles.js +9 -2
  122. package/src/components/atoms/Select/index.js +35 -0
  123. package/src/components/atoms/Select/style.js +76 -0
  124. package/src/components/atoms/StatusTag/index.js +30 -2
  125. package/src/components/atoms/StatusTag/styles.js +15 -3
  126. package/src/components/atoms/ValidationPanel/index.js +3 -3
  127. package/src/components/molecules/AvatarAndValidation/index.js +24 -6
  128. package/src/components/molecules/AvatarAndValidation/styles.js +1 -1
  129. package/src/components/molecules/CarouselImagesLogin/index.js +37 -34
  130. package/src/components/molecules/FeaturesBar/index.js +10 -7
  131. package/src/components/molecules/GalleryElement/index.js +75 -36
  132. package/src/components/molecules/GalleryElement/styles.js +38 -11
  133. package/src/components/molecules/GalleryHeader/index.js +14 -8
  134. package/src/components/molecules/GalleryHeader/styles.js +16 -0
  135. package/src/components/molecules/ImageSelector/index.js +2 -3
  136. package/src/components/molecules/LoginPasswordStrength/index.js +3 -8
  137. package/src/components/molecules/LoginPasswordStrength/styles.js +0 -3
  138. package/src/components/molecules/ProductNameHeader/index.js +1 -2
  139. package/src/components/molecules/RetailerSelector/RetailerSelector.stories.js +35 -0
  140. package/src/components/molecules/RetailerSelector/index.js +63 -0
  141. package/src/components/molecules/RetailerSelector/styles.js +18 -0
  142. package/src/components/molecules/StatusAsignationInfo/index.js +62 -38
  143. package/src/components/molecules/StatusAsignationInfo/styles.js +12 -2
  144. package/src/components/molecules/TableHeader/index.js +16 -3
  145. package/src/components/molecules/TableHeader/styles.js +5 -0
  146. package/src/components/molecules/TagAndInput/index.js +24 -2
  147. package/src/components/organisms/FullProductNameHeader/index.js +28 -7
  148. package/src/components/organisms/FullTabsMenu/index.js +15 -3
  149. package/src/components/organisms/ImageDataTable/index.js +89 -11
  150. package/src/components/organisms/InputGroup/index.js +46 -11
  151. package/src/components/organisms/InputGroup/styles.js +3 -0
  152. package/src/components/organisms/ProductImageModal/index.js +20 -12
  153. package/src/components/organisms/ProductImageModal/styles.js +3 -0
  154. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +91 -343
  155. package/src/components/pages/RetailerProductEdition/index.js +1238 -48
  156. package/src/components/pages/RetailerProductEdition/styles.js +67 -4
  157. package/src/global-files/data.js +156 -57
  158. package/src/global-files/global-styles.css +1 -0
  159. package/src/global-files/variables.js +1 -0
  160. package/src/index.js +1 -20
  161. package/dist/assets/images/carouselImagesLogin/login2.svg +0 -117
  162. package/dist/assets/images/carouselImagesLogin/login3.svg +0 -147
  163. package/dist/assets/images/carouselImagesLogin/loginImage.svg +0 -301
  164. package/dist/assets/images/sliderToolTip/infoIcon.svg +0 -4
  165. package/dist/assets/images/sliderToolTip/slide1.svg +0 -5
  166. package/dist/assets/images/sliderToolTip/slide2.svg +0 -9
  167. package/dist/assets/images/sliderToolTip/slide3.svg +0 -9
  168. package/dist/assets/images/sliderToolTip/slide4.svg +0 -9
  169. package/dist/assets/images/sliderToolTip/slide5.svg +0 -40
  170. package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +0 -36
  171. package/dist/components/atoms/ListCommercialRetailers/index.js +0 -64
  172. package/dist/components/atoms/ListCommercialRetailers/styles.js +0 -20
  173. package/dist/components/atoms/Loading/Loading.stories.js +0 -28
  174. package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +0 -37
  175. package/dist/components/atoms/MenuCommercialRetailers/index.js +0 -25
  176. package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +0 -28
  177. package/dist/components/atoms/MenuProductImage/index.js +0 -88
  178. package/dist/components/atoms/MenuProductImage/styles.js +0 -20
  179. package/dist/components/atoms/SliderToolTip/SliderToolTip.stories.js +0 -47
  180. package/dist/components/atoms/SliderToolTip/index.js +0 -200
  181. package/dist/components/atoms/SliderToolTip/styles.js +0 -24
  182. package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +0 -22
  183. package/dist/components/atoms/VerticalSideMenuMainPage/index.js +0 -49
  184. package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +0 -18
  185. package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +0 -25
  186. package/dist/components/molecules/ApproveRejetPanel/index.js +0 -49
  187. package/dist/components/molecules/ApproveRejetPanel/styles.js +0 -18
  188. package/dist/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +0 -28
  189. package/dist/components/molecules/EmailResetPasswordLogin/index.js +0 -153
  190. package/dist/components/molecules/EmailResetPasswordLogin/styles.js +0 -20
  191. package/dist/components/molecules/LogoLoading/Loading.stories.js +0 -28
  192. package/dist/components/molecules/LogoLoading/index.js +0 -22
  193. package/dist/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +0 -28
  194. package/dist/components/molecules/RegistrationFirstStep/index.js +0 -308
  195. package/dist/components/molecules/RegistrationFirstStep/styles.js +0 -20
  196. package/dist/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +0 -28
  197. package/dist/components/molecules/RegistrationSecondStep/index.js +0 -169
  198. package/dist/components/molecules/RegistrationSecondStep/styles.js +0 -20
  199. package/dist/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +0 -28
  200. package/dist/components/molecules/RegistrationThirdStep/index.js +0 -155
  201. package/dist/components/molecules/RegistrationThirdStep/styles.js +0 -20
  202. package/dist/components/molecules/SignInLogin/index.js +0 -295
  203. package/dist/components/molecules/SignInLogin/styles.js +0 -20
  204. package/dist/components/molecules/SignInLoginCreationApp/SignInLogin.stories.js +0 -28
  205. package/dist/components/molecules/SignInLoginCreationApp/index.js +0 -270
  206. package/dist/components/molecules/SignInLoginCreationApp/styles.js +0 -20
  207. package/dist/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +0 -28
  208. package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +0 -210
  209. package/dist/components/molecules/VerificationCodeResetPasswordLogin/styles.js +0 -20
  210. package/dist/components/molecules/VerificationCodeResetPasswordLogin/utils.js +0 -69
  211. package/dist/components/organisms/ChangePassword/index.js +0 -123
  212. package/src/assets/images/sliderToolTip/infoIcon.svg +0 -4
  213. package/src/assets/images/sliderToolTip/slide1.svg +0 -5
  214. package/src/assets/images/sliderToolTip/slide2.svg +0 -9
  215. package/src/assets/images/sliderToolTip/slide3.svg +0 -9
  216. package/src/assets/images/sliderToolTip/slide4.svg +0 -9
  217. package/src/assets/images/sliderToolTip/slide5.svg +0 -40
  218. package/src/components/atoms/Loading/Loading.stories.js +0 -10
  219. package/src/components/atoms/SliderToolTip/SliderToolTip.stories.js +0 -23
  220. package/src/components/atoms/SliderToolTip/index.js +0 -182
  221. package/src/components/atoms/SliderToolTip/styles.js +0 -168
  222. package/src/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +0 -11
  223. package/src/components/molecules/EmailResetPasswordLogin/index.js +0 -85
  224. package/src/components/molecules/EmailResetPasswordLogin/styles.js +0 -23
  225. package/src/components/molecules/LogoLoading/Loading.stories.js +0 -10
  226. package/src/components/molecules/LogoLoading/index.js +0 -12
  227. package/src/components/molecules/LogoLoading/styles.js +0 -16
  228. package/src/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +0 -11
  229. package/src/components/molecules/RegistrationFirstStep/index.js +0 -227
  230. package/src/components/molecules/RegistrationFirstStep/styles.js +0 -87
  231. package/src/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +0 -11
  232. package/src/components/molecules/RegistrationSecondStep/index.js +0 -130
  233. package/src/components/molecules/RegistrationSecondStep/styles.js +0 -59
  234. package/src/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +0 -11
  235. package/src/components/molecules/RegistrationThirdStep/index.js +0 -130
  236. package/src/components/molecules/RegistrationThirdStep/styles.js +0 -44
  237. package/src/components/molecules/SignInLogin/SignInLogin.stories.js +0 -11
  238. package/src/components/molecules/SignInLogin/index.js +0 -210
  239. package/src/components/molecules/SignInLogin/styles.js +0 -79
  240. package/src/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +0 -11
  241. package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +0 -170
  242. package/src/components/molecules/VerificationCodeResetPasswordLogin/styles.js +0 -51
  243. package/src/components/molecules/VerificationCodeResetPasswordLogin/utils.js +0 -54
  244. package/src/components/organisms/ChangePassword/ChangePassword.stories.js +0 -11
  245. package/src/components/organisms/ChangePassword/index.js +0 -76
  246. package/src/components/organisms/ChangePassword/styles.js +0 -13
@@ -13,7 +13,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
14
  var _templateObject;
15
15
 
16
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n height: 100%;\n\n .data-container {\n display: flex;\n flex: 0%;\n height: calc(100% - ", "px);\n .image-data-panel {\n width: 340px;\n\n & + * {\n margin-left: 10px;\n }\n }\n\n .product-information {\n width: 100%;\n display: flex;\n flex-direction: column;\n\n .services-information-container {\n overflow: auto;\n }\n\n .image-services {\n display: grid;\n grid-template-columns: repeat(auto-fill, 179px);\n column-gap: 15px;\n row-gap: 15px;\n }\n }\n }\n"])), function (_ref) {
16
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n overflow: auto;\n\n .data-container {\n display: flex;\n flex: 0%;\n height: calc(100% - ", "px);\n .image-data-panel {\n width: 340px;\n\n & + * {\n margin-left: 10px;\n }\n }\n\n .product-information {\n width: 100%;\n display: flex;\n flex-direction: column;\n\n .services-information-container {\n height: 100%;\n overflow: auto;\n }\n\n .image-services {\n aside {\n display: grid;\n grid-template-columns: repeat(auto-fill, 179px);\n column-gap: 15px;\n row-gap: 15px;\n padding: 20px;\n }\n }\n\n .commentary-box {\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n padding: 10px;\n padding-left: 0;\n\n .commentary {\n display: flex;\n align-items: flex-end;\n\n .input-container {\n width: 500px;\n\n .quill {\n height: 100px;\n }\n\n & + * {\n margin-left: 5px;\n }\n }\n\n .buttons-box {\n display: flex;\n width: 210px;\n flex-wrap: wrap;\n\n .general-transparent-button {\n & + * {\n margin-top: 5px;\n }\n }\n\n .general-transparent-button,\n .general-green-button,\n .general-button-disabled {\n width: fit-content;\n min-width: 201px;\n height: 40px;\n }\n }\n }\n }\n\n .feedback-box {\n display: flex;\n }\n }\n }\n .container {\n width: 100%;\n height: 100%;\n .dropzone {\n height: 100%;\n width: 100%;\n }\n }\n"])), function (_ref) {
17
17
  var headerTop = _ref.headerTop;
18
18
  return headerTop;
19
19
  });
@@ -5,66 +5,46 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.getRetailerServices = exports.getImage = void 0;
8
+ exports.getRetailerServices = exports.getProfilePicture = exports.getPercentage = exports.getNewStatus = exports.getImage = exports.fetchUsers = void 0;
9
9
 
10
10
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
11
 
12
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
13
+
12
14
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
13
15
 
14
16
  var _axios = _interopRequireDefault(require("axios"));
15
17
 
16
18
  var _jsBase = require("js-base64");
17
19
 
18
- var _defaultUpdate = _interopRequireDefault(require("../assets/images/defaultImages/defaultUpdate.png"));
20
+ var _uuid = require("uuid");
19
21
 
20
22
  var getRetailerServices = /*#__PURE__*/function () {
21
- var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
22
- var _images$attrForImgs, _images$attrForImgs$g;
23
+ var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(articleId, category, version) {
24
+ var _images$values;
23
25
 
24
- var responseArray, datasheets, descriptions, images, code;
26
+ var responseArray, datasheets, descriptions, images;
25
27
  return _regenerator.default.wrap(function _callee$(_context) {
26
28
  while (1) {
27
29
  switch (_context.prev = _context.next) {
28
30
  case 0:
29
31
  _context.next = 2;
30
- return Promise.all([_axios.default.post("".concat(process.env.REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT, "?idCategory=846&articleId=238&version=2")), _axios.default.get("".concat(process.env.REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT, "?idCategory=846&articleId=238&version=2")), _axios.default.post("".concat(process.env.REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT, "?idCategory=846&articleId=238&version=2"))]);
32
+ return Promise.all([_axios.default.post("".concat(process.env.REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT, "?idCategory=").concat(category, "&articleId=").concat(articleId, "&version=").concat(version)), _axios.default.get("".concat(process.env.REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT, "?idCategory=").concat(category, "&articleId=").concat(articleId, "&version=").concat(version)), _axios.default.post("".concat(process.env.REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT, "?idCategory=").concat(category, "&articleId=").concat(articleId, "&version=").concat(version))]);
31
33
 
32
34
  case 2:
33
35
  responseArray = _context.sent;
34
36
  datasheets = JSON.parse(responseArray[0].data.body).data;
35
37
  descriptions = JSON.parse(responseArray[1].data.body).data;
36
38
  images = JSON.parse(responseArray[2].data.body).data;
37
- code = images === null || images === void 0 ? void 0 : (_images$attrForImgs = images.attrForImgs) === null || _images$attrForImgs === void 0 ? void 0 : (_images$attrForImgs$g = _images$attrForImgs.general[0]) === null || _images$attrForImgs$g === void 0 ? void 0 : _images$attrForImgs$g.value;
38
- images === null || images === void 0 ? void 0 : images.values.map(function (value) {
39
- value.imageName = images.inputs.filter(function (e) {
39
+ images.values = images === null || images === void 0 ? void 0 : (_images$values = images.values) === null || _images$values === void 0 ? void 0 : _images$values.map(function (value) {
40
+ value.name = images.inputs.find(function (e) {
40
41
  return e.id === value.image_id;
41
- })[0].name;
42
- value.data = [{
43
- feature: "Tipo de empaque",
44
- value: images === null || images === void 0 ? void 0 : images.imagePackagingType[(value === null || value === void 0 ? void 0 : value.packing_type) - 1].name
45
- }, {
46
- feature: "Tipo de imagen",
47
- value: images === null || images === void 0 ? void 0 : images.imageType.filter(function (e) {
48
- return value.image_type == e.id;
49
- })[0].name
50
- }, {
51
- feature: "Código de Fabricante",
52
- value: code
53
- }, {
54
- feature: "Formato",
55
- value: value.src.split(".")[1]
56
- }, {
57
- feature: "Tamaño de imagen",
58
- value: "".concat(value.width, "x").concat(value.height)
59
- }, {
60
- feature: "Subfijo de imagen",
61
- value: ""
62
- }];
63
- return value;
42
+ }).name;
43
+ return getImage(value);
64
44
  });
65
45
  return _context.abrupt("return", [datasheets, descriptions, images]);
66
46
 
67
- case 9:
47
+ case 8:
68
48
  case "end":
69
49
  return _context.stop();
70
50
  }
@@ -72,35 +52,29 @@ var getRetailerServices = /*#__PURE__*/function () {
72
52
  }, _callee);
73
53
  }));
74
54
 
75
- return function getRetailerServices() {
55
+ return function getRetailerServices(_x, _x2, _x3) {
76
56
  return _ref.apply(this, arguments);
77
57
  };
78
58
  }();
79
59
 
80
60
  exports.getRetailerServices = getRetailerServices;
81
61
 
82
- var getImage = function getImage(imageGeneral, width, height) {
62
+ var getImage = function getImage(imageGeneral) {
63
+ var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 250;
64
+ var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 250;
65
+
83
66
  try {
84
67
  var image = imageGeneral;
85
68
  var ext = image.src.split(".");
86
69
  var uuid = ext[0].split("-");
87
- return {
88
- id: image.id,
89
- image_id: image.image_id,
90
- packing_type: +image.packing_type,
91
- image_type: +image.image_type,
92
- name: image.name,
93
- imageName: image.imageName,
94
- data: image.data,
70
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, image), {}, {
95
71
  version: image.id_version,
96
- width: image.width,
97
- height: image.height,
98
72
  ext: ext[ext.length - 1],
99
73
  uuid: uuid.reduce(function (prevVal, currVal, idx) {
100
74
  if (idx < 2) return "";else return idx === 2 ? currVal : prevVal + "-" + currVal;
101
- }, "") || uuidv4(),
75
+ }, "") || (0, _uuid.v4)(),
102
76
  srcDB: image.src,
103
- src: "https://d24s337exbt5zr.cloudfront.net/" + _jsBase.Base64.encode(JSON.stringify({
77
+ src: image.image_id ? "https://d24s337exbt5zr.cloudfront.net/" + _jsBase.Base64.encode(JSON.stringify({
104
78
  bucket: process.env.REACT_APP_IMAGES_BUCKET,
105
79
  key: image.src,
106
80
  edits: {
@@ -116,14 +90,199 @@ var getImage = function getImage(imageGeneral, width, height) {
116
90
  }
117
91
  }
118
92
  }
119
- }))
120
- };
93
+ })) : image.src
94
+ });
95
+ } catch (err) {
96
+ console.log("err", err);
97
+ return imageGeneral["error"] = err;
98
+ }
99
+ };
100
+
101
+ exports.getImage = getImage;
102
+
103
+ var getPercentage = /*#__PURE__*/function () {
104
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
105
+ var params,
106
+ func,
107
+ _args3 = arguments;
108
+ return _regenerator.default.wrap(function _callee3$(_context3) {
109
+ while (1) {
110
+ switch (_context3.prev = _context3.next) {
111
+ case 0:
112
+ params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
113
+
114
+ func = /*#__PURE__*/function () {
115
+ var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
116
+ var dataToSend;
117
+ return _regenerator.default.wrap(function _callee2$(_context2) {
118
+ while (1) {
119
+ switch (_context2.prev = _context2.next) {
120
+ case 0:
121
+ dataToSend = [];
122
+ params.data.forEach(function (product) {
123
+ params.data[0].retailers.forEach(function (retailer) {
124
+ dataToSend.push(product.article ? {
125
+ id_article: product.article.id_article,
126
+ id_category: product.article.id_category,
127
+ id_retailer: retailer.id,
128
+ version: product.version,
129
+ upc: product.article.upc,
130
+ name: product.article.name,
131
+ retailerName: retailer.name
132
+ } : {
133
+ id_article: product.product.id_article,
134
+ id_category: product.product.id_category,
135
+ id_retailer: retailer.id,
136
+ version: product.product.version,
137
+ upc: product.product.upc,
138
+ name: product.product.name,
139
+ retailerName: retailer.name
140
+ });
141
+ });
142
+ });
143
+ _context2.next = 4;
144
+ return _axios.default.post(process.env.REACT_APP_VALID_EXPORT_ENDPOINT, {
145
+ data: dataToSend
146
+ }, {
147
+ headers: {
148
+ Authorization: sessionStorage.getItem("jwt")
149
+ }
150
+ }).then(function (response) {
151
+ return response.data;
152
+ }).catch(function (err) {
153
+ return console.log(err, "Errror");
154
+ });
155
+
156
+ case 4:
157
+ return _context2.abrupt("return", _context2.sent);
158
+
159
+ case 5:
160
+ case "end":
161
+ return _context2.stop();
162
+ }
163
+ }
164
+ }, _callee2);
165
+ }));
166
+
167
+ return function func() {
168
+ return _ref3.apply(this, arguments);
169
+ };
170
+ }();
171
+
172
+ _context3.next = 4;
173
+ return func();
174
+
175
+ case 4:
176
+ return _context3.abrupt("return", _context3.sent);
177
+
178
+ case 5:
179
+ case "end":
180
+ return _context3.stop();
181
+ }
182
+ }
183
+ }, _callee3);
184
+ }));
185
+
186
+ return function getPercentage() {
187
+ return _ref2.apply(this, arguments);
188
+ };
189
+ }();
190
+
191
+ exports.getPercentage = getPercentage;
192
+
193
+ var getProfilePicture = function getProfilePicture(userId, width, height) {
194
+ try {
195
+ return "https://d24s337exbt5zr.cloudfront.net/" + _jsBase.Base64.encode(JSON.stringify({
196
+ bucket: process.env.REACT_APP_IMAGES_PROFILE_BUCKET,
197
+ key: "id-".concat(userId, "/").concat(userId, ".png"),
198
+ edits: {
199
+ resize: {
200
+ width: width,
201
+ height: height,
202
+ fit: "contain",
203
+ background: {
204
+ r: 255,
205
+ g: 255,
206
+ b: 255,
207
+ alpha: 0
208
+ }
209
+ }
210
+ }
211
+ }));
121
212
  } catch (err) {
122
213
  console.log("err", err);
123
- return {
124
- src: _defaultUpdate.default
125
- };
214
+ return defaultUpdate;
126
215
  }
127
216
  };
128
217
 
129
- exports.getImage = getImage;
218
+ exports.getProfilePicture = getProfilePicture;
219
+
220
+ var fetchUsers = /*#__PURE__*/function () {
221
+ var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(auth) {
222
+ var usersPromises, usersGroups, header, usersResponse;
223
+ return _regenerator.default.wrap(function _callee4$(_context4) {
224
+ while (1) {
225
+ switch (_context4.prev = _context4.next) {
226
+ case 0:
227
+ usersPromises = [];
228
+ usersGroups = [];
229
+ header = {
230
+ headers: {
231
+ Authorization: auth
232
+ }
233
+ };
234
+ /**
235
+ * 7 will fetch all text specialists
236
+ * 8 will fetch all img specialists
237
+ * 4 will fetch all text facilitators
238
+ * 5 will fetch all img facilitators
239
+ * 6 will fetch all auditors
240
+ */
241
+
242
+ usersPromises.push(_axios.default.get("".concat(process.env.REACT_APP_USER_ENDPOINT, "?fetchRole=7"), header), _axios.default.get("".concat(process.env.REACT_APP_USER_ENDPOINT, "?fetchRole=8"), header), _axios.default.get("".concat(process.env.REACT_APP_USER_ENDPOINT, "?fetchRole=4"), header), _axios.default.get("".concat(process.env.REACT_APP_USER_ENDPOINT, "?fetchRole=5"), header), _axios.default.get("".concat(process.env.REACT_APP_USER_ENDPOINT, "?fetchRole=6"), header));
243
+ _context4.next = 6;
244
+ return Promise.all(usersPromises);
245
+
246
+ case 6:
247
+ usersResponse = _context4.sent;
248
+ usersResponse.forEach(function (item, i) {
249
+ usersGroups.push(item.data.data);
250
+ });
251
+ return _context4.abrupt("return", usersGroups);
252
+
253
+ case 9:
254
+ case "end":
255
+ return _context4.stop();
256
+ }
257
+ }
258
+ }, _callee4);
259
+ }));
260
+
261
+ return function fetchUsers(_x4) {
262
+ return _ref4.apply(this, arguments);
263
+ };
264
+ }();
265
+
266
+ exports.fetchUsers = fetchUsers;
267
+
268
+ var getNewStatus = function getNewStatus(statusArray) {
269
+ var lookupString = "";
270
+ statusArray.forEach(function (element) {
271
+ return lookupString += element + "/";
272
+ });
273
+ console.log(lookupString, "productTemp");
274
+ if (lookupString.includes("RF")) return "RF";
275
+ if (lookupString.includes("RA")) return "RA";
276
+ if (lookupString.includes("RP")) return "RP";
277
+ if (lookupString.includes("RC")) return "RC";
278
+ if (lookupString.includes("UNASSIGNED")) return "IN_PROGRESS";
279
+ if (lookupString.includes("IN_PROGRESS")) return "IN_PROGRESS";
280
+ if (lookupString.includes("QF")) return "QF";
281
+ if (lookupString.includes("AF")) return "AF";
282
+ if (lookupString.includes("AA")) return "AA";
283
+ if (lookupString.includes("AP")) return "AP";
284
+ if (lookupString.includes("AC")) return "AC";
285
+ return new Error("Status not found");
286
+ };
287
+
288
+ exports.getNewStatus = getNewStatus;
@@ -11,6 +11,7 @@
11
11
  body.sb-main-padded.sb-show-main {
12
12
  padding: 0;
13
13
  height: 100vh;
14
+ overflow: hidden;
14
15
  }
15
16
 
16
17
  .sb-main-padded.sb-show-main #root {
@@ -12,6 +12,7 @@ var GlobalColors = {
12
12
  s5: "#503D66",
13
13
  original_magenta: "#B12D84",
14
14
  secondary_magenta: "#BA0070",
15
+ rejected_status: "#D74DED",
15
16
  magenta_s2: "#E33AA9",
16
17
  original_purpura: "#603888",
17
18
  in_progress: "#ED9A4D",