contentoh-components-library 21.0.72 → 21.0.75

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 (196) hide show
  1. package/.env.development +21 -4
  2. package/.env.production +19 -2
  3. package/CHANGELOG.md +37 -0
  4. package/dist/assets/images/generalButton/downloadIcon.svg +3 -0
  5. package/dist/assets/images/genericModal/closeWhite.svg +3 -0
  6. package/dist/assets/images/genericModal/errorModal.svg +3 -0
  7. package/dist/assets/images/genericModal/yellowAlert.svg +12 -0
  8. package/dist/assets/images/modalsSVGs/attributesSent.svg +208 -0
  9. package/dist/assets/images/modalsSVGs/descriptionSent.svg +237 -0
  10. package/dist/assets/images/modalsSVGs/providerSent.svg +445 -0
  11. package/dist/assets/images/modalsSVGs/uploadingImages.svg +148 -0
  12. package/dist/components/atoms/AsignationOption/index.js +9 -5
  13. package/dist/components/atoms/AsignationOption/styles.js +1 -1
  14. package/dist/components/{molecules/SignInLoginCreationApp/SignInLogin.stories.js → atoms/CharCounter/CharCounter.stories.js} +10 -7
  15. package/dist/components/atoms/CharCounter/index.js +22 -0
  16. package/dist/components/{molecules/ApproveRejetPanel → atoms/CharCounter}/styles.js +3 -1
  17. package/dist/components/atoms/CheckBox/index.js +4 -2
  18. package/dist/components/atoms/Commentary/Commentary.stories.js +1 -0
  19. package/dist/components/atoms/Commentary/index.js +23 -0
  20. package/dist/components/atoms/Commentary/styles.js +23 -0
  21. package/dist/components/atoms/GeneralButton/index.js +5 -0
  22. package/dist/components/atoms/GeneralButton/styles.js +4 -2
  23. package/dist/components/atoms/GeneralInput/index.js +72 -24
  24. package/dist/components/atoms/GeneralInput/styles.js +7 -1
  25. package/dist/components/atoms/GenericModal/index.js +4 -2
  26. package/dist/components/atoms/GenericModal/styles.js +1 -1
  27. package/dist/components/atoms/Input/index.js +26 -0
  28. package/dist/components/atoms/Input/style.js +26 -0
  29. package/dist/components/atoms/InputFormatter/Wysiwyg.stories.js +30 -0
  30. package/dist/components/atoms/InputFormatter/index.js +184 -0
  31. package/dist/components/atoms/InputFormatter/styles.js +33 -0
  32. package/dist/components/atoms/LabelToInput/index.js +53 -0
  33. package/dist/components/atoms/LabelToInput/style.js +22 -0
  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 +5 -3
  48. package/dist/components/atoms/VerticalSideMenuMainPage/index.js +15 -10
  49. package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +1 -1
  50. package/dist/components/molecules/AvatarAndValidation/index.js +17 -7
  51. package/dist/components/molecules/AvatarAndValidation/styles.js +1 -1
  52. package/dist/components/molecules/FeaturesBar/index.js +1 -1
  53. package/dist/components/molecules/GalleryElement/index.js +80 -21
  54. package/dist/components/molecules/GalleryElement/styles.js +1 -1
  55. package/dist/components/molecules/GalleryHeader/index.js +28 -6
  56. package/dist/components/molecules/GalleryHeader/styles.js +1 -1
  57. package/dist/components/molecules/ImageSelector/index.js +2 -4
  58. package/dist/components/molecules/ProductNameHeader/index.js +1 -2
  59. package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +48 -0
  60. package/dist/components/molecules/RetailerSelector/index.js +74 -0
  61. package/dist/components/{atoms/MenuCommercialRetailers → molecules/RetailerSelector}/styles.js +1 -1
  62. package/dist/components/molecules/StatusAsignationInfo/index.js +46 -28
  63. package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
  64. package/dist/components/molecules/TableHeader/index.js +12 -5
  65. package/dist/components/molecules/TableHeader/styles.js +1 -1
  66. package/dist/components/molecules/TagAndInput/index.js +24 -0
  67. package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +31 -0
  68. package/dist/components/molecules/TextAndGradient/index.js +36 -0
  69. package/dist/components/molecules/TextAndGradient/styles.js +18 -0
  70. package/dist/components/organisms/FullProductNameHeader/index.js +31 -9
  71. package/dist/components/organisms/FullTabsMenu/index.js +18 -5
  72. package/dist/components/organisms/GlobalModal/index.js +73 -0
  73. package/dist/components/organisms/GlobalModal/styles.js +66 -0
  74. package/dist/components/organisms/ImageDataTable/index.js +90 -14
  75. package/dist/components/organisms/InputGroup/index.js +34 -13
  76. package/dist/components/organisms/InputGroup/styles.js +1 -1
  77. package/dist/components/organisms/ProductImageModal/index.js +13 -10
  78. package/dist/components/organisms/ProductImageModal/styles.js +1 -1
  79. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +135 -0
  80. package/dist/components/pages/ProviderProductEdition/index.js +1979 -0
  81. package/dist/components/pages/ProviderProductEdition/styles.js +23 -0
  82. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +91 -347
  83. package/dist/components/pages/RetailerProductEdition/index.js +1610 -60
  84. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  85. package/dist/global-files/data.js +213 -53
  86. package/dist/global-files/global-styles.css +1 -0
  87. package/dist/global-files/variables.js +1 -0
  88. package/dist/index.js +13 -0
  89. package/package.json +16 -9
  90. package/src/assets/images/generalButton/downloadIcon.svg +3 -0
  91. package/src/assets/images/genericModal/closeWhite.svg +3 -0
  92. package/src/assets/images/genericModal/errorModal.svg +3 -0
  93. package/src/assets/images/genericModal/yellowAlert.svg +12 -0
  94. package/src/assets/images/modalsSVGs/attributesSent.svg +208 -0
  95. package/src/assets/images/modalsSVGs/descriptionSent.svg +237 -0
  96. package/src/assets/images/modalsSVGs/providerSent.svg +445 -0
  97. package/src/assets/images/modalsSVGs/uploadingImages.svg +148 -0
  98. package/src/components/atoms/AsignationOption/index.js +7 -5
  99. package/src/components/atoms/AsignationOption/styles.js +9 -1
  100. package/src/components/atoms/CharCounter/CharCounter.stories.js +11 -0
  101. package/src/components/atoms/CharCounter/index.js +13 -0
  102. package/src/components/atoms/CharCounter/styles.js +10 -0
  103. package/src/components/atoms/CheckBox/index.js +8 -2
  104. package/src/components/atoms/Commentary/Commentary.stories.js +0 -0
  105. package/src/components/atoms/Commentary/index.js +9 -0
  106. package/src/components/atoms/Commentary/styles.js +16 -0
  107. package/src/components/atoms/GeneralButton/index.js +9 -2
  108. package/src/components/atoms/GeneralButton/styles.js +23 -0
  109. package/src/components/atoms/GeneralInput/index.js +71 -22
  110. package/src/components/atoms/GeneralInput/styles.js +11 -1
  111. package/src/components/atoms/GenericModal/index.js +2 -2
  112. package/src/components/atoms/GenericModal/styles.js +10 -2
  113. package/src/components/atoms/Input/index.js +15 -0
  114. package/src/components/atoms/Input/style.js +31 -0
  115. package/src/components/atoms/InputFormatter/Wysiwyg.stories.js +12 -0
  116. package/src/components/atoms/InputFormatter/index.js +144 -0
  117. package/src/components/atoms/InputFormatter/styles.js +40 -0
  118. package/src/components/atoms/LabelToInput/index.js +26 -0
  119. package/src/components/atoms/LabelToInput/style.js +41 -0
  120. package/src/components/atoms/PriorityFlag/index.js +1 -1
  121. package/src/components/atoms/ProductImage/styles.js +1 -1
  122. package/src/components/atoms/ProgressBar/index.js +2 -2
  123. package/src/components/atoms/ProgressBar/styles.js +54 -3
  124. package/src/components/atoms/ScreenHeader/index.js +7 -3
  125. package/src/components/atoms/ScreenHeader/styles.js +9 -2
  126. package/src/components/atoms/Select/index.js +35 -0
  127. package/src/components/atoms/Select/style.js +76 -0
  128. package/src/components/atoms/StatusTag/index.js +30 -2
  129. package/src/components/atoms/StatusTag/styles.js +15 -3
  130. package/src/components/atoms/ValidationPanel/index.js +4 -3
  131. package/src/components/atoms/VerticalSideMenuMainPage/index.js +15 -11
  132. package/src/components/atoms/VerticalSideMenuMainPage/styles.js +8 -7
  133. package/src/components/molecules/AvatarAndValidation/index.js +23 -6
  134. package/src/components/molecules/AvatarAndValidation/styles.js +1 -1
  135. package/src/components/molecules/FeaturesBar/index.js +10 -7
  136. package/src/components/molecules/GalleryElement/index.js +75 -36
  137. package/src/components/molecules/GalleryElement/styles.js +38 -11
  138. package/src/components/molecules/GalleryHeader/index.js +14 -8
  139. package/src/components/molecules/GalleryHeader/styles.js +16 -0
  140. package/src/components/molecules/ImageSelector/index.js +2 -3
  141. package/src/components/molecules/ProductNameHeader/index.js +1 -2
  142. package/src/components/molecules/RetailerSelector/RetailerSelector.stories.js +35 -0
  143. package/src/components/molecules/RetailerSelector/index.js +63 -0
  144. package/src/components/molecules/RetailerSelector/styles.js +18 -0
  145. package/src/components/molecules/StatusAsignationInfo/index.js +64 -39
  146. package/src/components/molecules/StatusAsignationInfo/styles.js +12 -2
  147. package/src/components/molecules/TableHeader/index.js +16 -3
  148. package/src/components/molecules/TableHeader/styles.js +5 -0
  149. package/src/components/molecules/TagAndInput/index.js +24 -0
  150. package/src/components/organisms/FullProductNameHeader/index.js +38 -8
  151. package/src/components/organisms/FullTabsMenu/index.js +15 -3
  152. package/src/components/organisms/GlobalModal/index.js +68 -0
  153. package/src/components/organisms/GlobalModal/styles.js +113 -0
  154. package/src/components/organisms/ImageDataTable/index.js +89 -11
  155. package/src/components/organisms/InputGroup/index.js +46 -11
  156. package/src/components/organisms/InputGroup/styles.js +3 -0
  157. package/src/components/organisms/ProductImageModal/index.js +19 -12
  158. package/src/components/organisms/ProductImageModal/styles.js +3 -0
  159. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +123 -0
  160. package/src/components/pages/ProviderProductEdition/index.js +1493 -0
  161. package/src/components/pages/ProviderProductEdition/styles.js +118 -0
  162. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +91 -343
  163. package/src/components/pages/RetailerProductEdition/index.js +1245 -48
  164. package/src/components/pages/RetailerProductEdition/styles.js +67 -4
  165. package/src/global-files/data.js +158 -57
  166. package/src/global-files/global-styles.css +1 -0
  167. package/src/global-files/variables.js +1 -0
  168. package/src/index.js +1 -0
  169. package/dist/assets/images/editField/showPassword.png +0 -0
  170. package/dist/assets/images/sliderToolTip/infoIcon.svg +0 -4
  171. package/dist/assets/images/sliderToolTip/slide1.svg +0 -5
  172. package/dist/assets/images/sliderToolTip/slide2.svg +0 -9
  173. package/dist/assets/images/sliderToolTip/slide3.svg +0 -9
  174. package/dist/assets/images/sliderToolTip/slide4.svg +0 -9
  175. package/dist/assets/images/sliderToolTip/slide5.svg +0 -40
  176. package/dist/assets/images/verticalSideMenuMainPage/closeMenu.svg +0 -4
  177. package/dist/assets/images/verticalSideMenuMainPage/iconFAQS.svg +0 -12
  178. package/dist/assets/images/verticalSideMenuMainPage/iconGroup.svg +0 -3
  179. package/dist/assets/images/verticalSideMenuMainPage/iconLogo.svg +0 -12
  180. package/dist/assets/images/verticalSideMenuMainPage/iconLogoContentoh.svg +0 -15
  181. package/dist/assets/images/verticalSideMenuMainPage/iconProduct.svg +0 -3
  182. package/dist/assets/images/verticalSideMenuMainPage/iconSpeedometer.svg +0 -12
  183. package/dist/assets/images/verticalSideMenuMainPage/iconTask.svg +0 -10
  184. package/dist/assets/images/verticalSideMenuMainPage/openMenu.svg +0 -4
  185. package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +0 -36
  186. package/dist/components/atoms/ListCommercialRetailers/index.js +0 -64
  187. package/dist/components/atoms/ListCommercialRetailers/styles.js +0 -20
  188. package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +0 -37
  189. package/dist/components/atoms/MenuCommercialRetailers/index.js +0 -25
  190. package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +0 -28
  191. package/dist/components/atoms/MenuProductImage/index.js +0 -88
  192. package/dist/components/atoms/MenuProductImage/styles.js +0 -20
  193. package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +0 -25
  194. package/dist/components/molecules/ApproveRejetPanel/index.js +0 -49
  195. package/dist/components/molecules/SignInLoginCreationApp/index.js +0 -270
  196. package/dist/components/molecules/SignInLoginCreationApp/styles.js +0 -20
@@ -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,200 @@ 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, retailers;
117
+ return _regenerator.default.wrap(function _callee2$(_context2) {
118
+ while (1) {
119
+ switch (_context2.prev = _context2.next) {
120
+ case 0:
121
+ dataToSend = [];
122
+ retailers = params.data[0].retailers || params.data[0].retailersAvailable;
123
+ params.data.forEach(function (product) {
124
+ retailers.forEach(function (retailer) {
125
+ dataToSend.push(product.article ? {
126
+ id_article: product.article.id_article,
127
+ id_category: product.article.id_category,
128
+ id_retailer: retailer.id,
129
+ version: product.version,
130
+ upc: product.article.upc,
131
+ name: product.article.name,
132
+ retailerName: retailer.name
133
+ } : {
134
+ id_article: product.id_article,
135
+ id_category: product.id_category,
136
+ id_retailer: retailer.id,
137
+ version: product.version,
138
+ upc: product.upc,
139
+ name: product.name,
140
+ retailerName: retailer.name
141
+ });
142
+ });
143
+ });
144
+ _context2.next = 5;
145
+ return _axios.default.post(process.env.REACT_APP_VALID_EXPORT_ENDPOINT, {
146
+ data: dataToSend
147
+ }, {
148
+ headers: {
149
+ Authorization: sessionStorage.getItem("jwt")
150
+ }
151
+ }).then(function (response) {
152
+ return response.data;
153
+ }).catch(function (err) {
154
+ return console.log(err, "Errror");
155
+ });
156
+
157
+ case 5:
158
+ return _context2.abrupt("return", _context2.sent);
159
+
160
+ case 6:
161
+ case "end":
162
+ return _context2.stop();
163
+ }
164
+ }
165
+ }, _callee2);
166
+ }));
167
+
168
+ return function func() {
169
+ return _ref3.apply(this, arguments);
170
+ };
171
+ }();
172
+
173
+ _context3.next = 4;
174
+ return func();
175
+
176
+ case 4:
177
+ return _context3.abrupt("return", _context3.sent);
178
+
179
+ case 5:
180
+ case "end":
181
+ return _context3.stop();
182
+ }
183
+ }
184
+ }, _callee3);
185
+ }));
186
+
187
+ return function getPercentage() {
188
+ return _ref2.apply(this, arguments);
189
+ };
190
+ }();
191
+
192
+ exports.getPercentage = getPercentage;
193
+
194
+ var getProfilePicture = function getProfilePicture(userId, width, height) {
195
+ try {
196
+ return "https://d24s337exbt5zr.cloudfront.net/" + _jsBase.Base64.encode(JSON.stringify({
197
+ bucket: process.env.REACT_APP_IMAGES_PROFILE_BUCKET,
198
+ key: "id-".concat(userId, "/").concat(userId, ".png"),
199
+ edits: {
200
+ resize: {
201
+ width: width,
202
+ height: height,
203
+ fit: "contain",
204
+ background: {
205
+ r: 255,
206
+ g: 255,
207
+ b: 255,
208
+ alpha: 0
209
+ }
210
+ }
211
+ }
212
+ }));
121
213
  } catch (err) {
122
214
  console.log("err", err);
123
- return {
124
- src: _defaultUpdate.default
125
- };
215
+ return defaultUpdate;
126
216
  }
127
217
  };
128
218
 
129
- exports.getImage = getImage;
219
+ exports.getProfilePicture = getProfilePicture;
220
+
221
+ var fetchUsers = /*#__PURE__*/function () {
222
+ var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(auth) {
223
+ var usersPromises, usersGroups, header, usersResponse;
224
+ return _regenerator.default.wrap(function _callee4$(_context4) {
225
+ while (1) {
226
+ switch (_context4.prev = _context4.next) {
227
+ case 0:
228
+ usersPromises = [];
229
+ usersGroups = [];
230
+ header = {
231
+ headers: {
232
+ Authorization: auth
233
+ }
234
+ };
235
+ /**
236
+ * 7 will fetch all text specialists
237
+ * 8 will fetch all img specialists
238
+ * 4 will fetch all text facilitators
239
+ * 5 will fetch all img facilitators
240
+ * 6 will fetch all auditors
241
+ */
242
+
243
+ 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));
244
+ _context4.next = 6;
245
+ return Promise.all(usersPromises);
246
+
247
+ case 6:
248
+ usersResponse = _context4.sent;
249
+ usersResponse.forEach(function (item, i) {
250
+ usersGroups.push(item.data.data);
251
+ });
252
+ return _context4.abrupt("return", usersGroups);
253
+
254
+ case 9:
255
+ case "end":
256
+ return _context4.stop();
257
+ }
258
+ }
259
+ }, _callee4);
260
+ }));
261
+
262
+ return function fetchUsers(_x4) {
263
+ return _ref4.apply(this, arguments);
264
+ };
265
+ }();
266
+
267
+ exports.fetchUsers = fetchUsers;
268
+
269
+ var getNewStatus = function getNewStatus(statusArray) {
270
+ var lookupString = "";
271
+ statusArray.forEach(function (element) {
272
+ return lookupString += element + "/";
273
+ });
274
+ console.log(lookupString, "productTemp");
275
+ if (lookupString.includes("RF")) return "RF";
276
+ if (lookupString.includes("RA")) return "RA";
277
+ if (lookupString.includes("RP")) return "RP";
278
+ if (lookupString.includes("RC")) return "RC";
279
+ if (lookupString.includes("UNASSIGNED")) return "IN_PROGRESS";
280
+ if (lookupString.includes("IN_PROGRESS")) return "IN_PROGRESS";
281
+ if (lookupString.includes("QF")) return "QF";
282
+ if (lookupString.includes("AF")) return "AF";
283
+ if (lookupString.includes("AA")) return "AA";
284
+ if (lookupString.includes("AP")) return "AP";
285
+ if (lookupString.includes("AC")) return "AC";
286
+ return new Error("Status not found");
287
+ };
288
+
289
+ 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",
package/dist/index.js CHANGED
@@ -836,6 +836,19 @@ Object.keys(_RetailerProductEdition).forEach(function (key) {
836
836
  });
837
837
  });
838
838
 
839
+ var _ProviderProductEdition = require("./components/pages/ProviderProductEdition");
840
+
841
+ Object.keys(_ProviderProductEdition).forEach(function (key) {
842
+ if (key === "default" || key === "__esModule") return;
843
+ if (key in exports && exports[key] === _ProviderProductEdition[key]) return;
844
+ Object.defineProperty(exports, key, {
845
+ enumerable: true,
846
+ get: function get() {
847
+ return _ProviderProductEdition[key];
848
+ }
849
+ });
850
+ });
851
+
839
852
  var _VerificationCodeResetPassword = require("./components/pages/VerificationCodeResetPassword");
840
853
 
841
854
  Object.keys(_VerificationCodeResetPassword).forEach(function (key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.0.72",
3
+ "version": "21.0.75",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -10,19 +10,26 @@
10
10
  "@testing-library/jest-dom": "^5.11.4",
11
11
  "@testing-library/react": "^11.1.0",
12
12
  "@testing-library/user-event": "^12.1.10",
13
- "aws-amplify": "^4.3.21",
14
- "aws-sdk": "^2.959.0",
13
+ "aws-sdk": "^2.1088.0",
15
14
  "axios": "^0.25.0",
16
15
  "babel-preset-react-app": "^10.0.1",
17
16
  "chart.js": "^3.7.1",
17
+ "draft-js": "^0.11.7",
18
+ "file-saver": "^2.0.5",
19
+ "contentoh-components-library": "^21.0.18",
20
+ "aws-amplify": "^4.3.21",
18
21
  "js-base64": "^3.7.2",
19
22
  "prop-types": "^15.7.2",
20
23
  "react": "^17.0.2",
21
- "react-chartjs-2": "^4.1.0",
24
+ "react-chartjs-2": "^4.0.1",
22
25
  "react-dom": "^17.0.2",
26
+ "react-draft-wysiwyg": "^1.14.7",
27
+ "react-dropzone": "^12.0.4",
23
28
  "react-image-fallback": "^8.0.0",
29
+ "react-quill": "^1.3.5",
24
30
  "react-router-dom": "^5.2.0",
25
31
  "styled-components": "^5.3.3",
32
+ "uuid": "^8.3.2",
26
33
  "web-vitals": "^1.0.1"
27
34
  },
28
35
  "scripts": {
@@ -69,10 +76,10 @@
69
76
  "devDependencies": {
70
77
  "@babel/cli": "^7.17.10",
71
78
  "@babel/core": "^7.16.0",
72
- "@storybook/addon-actions": "^6.4.1",
73
- "@storybook/addon-essentials": "^6.4.1",
74
- "@storybook/addon-links": "^6.4.1",
75
- "@storybook/react": "^6.4.1",
79
+ "@storybook/addon-actions": "^6.5.7",
80
+ "@storybook/addon-essentials": "^6.5.7",
81
+ "@storybook/addon-links": "^6.5.7",
82
+ "@storybook/react": "^6.5.7",
76
83
  "auth": "^0.0.9",
77
84
  "auto": "^10.36.5",
78
85
  "babel-loader": "^8.2.3",
@@ -83,7 +90,7 @@
83
90
  },
84
91
  "description": "contentoh components packed library.",
85
92
  "main": "dist/index.js",
86
- "repository": "git@github.com:Content-oh/components-library.git",
93
+ "repository": "https://git@github.com:Content-oh/components-library.git",
87
94
  "author": "asael06 <asael.mb@hotmail.com>",
88
95
  "license": "MIT"
89
96
  }
@@ -0,0 +1,3 @@
1
+ <svg width="17" height="18" viewBox="0 0 17 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M13.7063 7.61134C13.2246 5.16759 11.0783 3.33301 8.5 3.33301C6.45292 3.33301 4.675 4.49467 3.78958 6.19467C1.6575 6.42134 0 8.22759 0 10.4163C0 12.7609 1.90542 14.6663 4.25 14.6663H13.4583C15.4133 14.6663 17 13.0797 17 11.1247C17 9.25467 15.5479 7.73884 13.7063 7.61134ZM12.0417 9.70801L8.5 13.2497L4.95833 9.70801H7.08333V6.87467H9.91667V9.70801H12.0417Z" fill="#817393"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6.59 0L4 2.59L1.41 0L0 1.41L2.59 4L0 6.59L1.41 8L4 5.41L6.59 8L8 6.59L5.41 4L8 1.41L6.59 0Z" fill="#FBFBFB"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M75.3243 36.333L60.0002 51.6572L44.676 36.333L36.3335 44.6755L51.6577 59.9997L36.3335 75.3238L44.676 83.6663L60.0002 68.3422L75.3243 83.6663L83.6668 75.3238L68.3427 59.9997L83.6668 44.6755L75.3243 36.333ZM60.0002 0.833008C27.281 0.833008 0.833496 27.2805 0.833496 59.9997C0.833496 92.7188 27.281 119.166 60.0002 119.166C92.7193 119.166 119.167 92.7188 119.167 59.9997C119.167 27.2805 92.7193 0.833008 60.0002 0.833008ZM60.0002 107.333C33.9077 107.333 12.6668 86.0922 12.6668 59.9997C12.6668 33.9072 33.9077 12.6663 60.0002 12.6663C86.0927 12.6663 107.334 33.9072 107.334 59.9997C107.334 86.0922 86.0927 107.333 60.0002 107.333Z" fill="#FC3030"/>
3
+ </svg>
@@ -0,0 +1,12 @@
1
+ <svg width="81" height="81" viewBox="0 0 81 81" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clipPath="url(#clip0)">
3
+ <path d="M79.7088 62.5501L48.7485 8.92531C47.0269 5.9435 43.9434 4.16309 40.5 4.16309C37.0567 4.16309 33.973 5.9435 32.2514 8.92531L1.29129 62.5499C-0.43043 65.532 -0.43043 69.0925 1.29129 72.0745C3.01301 75.0565 6.09639 76.8367 9.53983 76.8367H71.4601C74.9034 76.8367 77.9869 75.0563 79.7088 72.0747C81.4305 69.0925 81.4305 65.532 79.7088 62.5501ZM75.599 69.7019C74.7351 71.1982 73.1878 72.0914 71.4601 72.0914H9.53983C7.81194 72.0914 6.26471 71.1982 5.40093 69.7019C4.53714 68.2056 4.53714 66.4192 5.40093 64.9229L36.3614 11.2982C37.2252 9.80191 38.7724 8.9087 40.5001 8.9087C42.2277 8.9087 43.7751 9.80191 44.6389 11.2982L75.5992 64.9229C76.4628 66.4192 76.4628 68.2056 75.599 69.7019Z" fill="#EDD34D"/>
4
+ <path d="M42.8724 27.8452H38.127V51.5729H42.8724V27.8452Z" fill="#EDD34D"/>
5
+ <path d="M40.4997 56.3179C38.7552 56.3179 37.3359 57.7371 37.3359 59.4816C37.3359 61.2261 38.7552 62.6454 40.4997 62.6454C42.2441 62.6454 43.6635 61.2261 43.6635 59.4816C43.6635 57.7371 42.2442 56.3179 40.4997 56.3179Z" fill="#EDD34D"/>
6
+ </g>
7
+ <defs>
8
+ <clipPath id="clip0">
9
+ <rect width="81" height="81" fill="white"/>
10
+ </clipPath>
11
+ </defs>
12
+ </svg>