contentoh-components-library 21.0.31 → 21.0.32

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 (213) hide show
  1. package/.env.development +4 -17
  2. package/.env.production +1 -14
  3. package/CHANGELOG.md +33 -31
  4. package/dist/assets/images/carouselImagesLogin/login2.svg +117 -0
  5. package/dist/assets/images/carouselImagesLogin/login3.svg +147 -0
  6. package/dist/assets/images/carouselImagesLogin/loginImage.svg +301 -0
  7. package/dist/components/atoms/AsignationOption/index.js +5 -9
  8. package/dist/components/atoms/AsignationOption/styles.js +1 -1
  9. package/dist/components/atoms/CheckBox/index.js +2 -4
  10. package/dist/components/atoms/GeneralButton/index.js +0 -5
  11. package/dist/components/atoms/GeneralButton/styles.js +2 -4
  12. package/dist/components/atoms/GeneralInput/index.js +24 -73
  13. package/dist/components/atoms/GeneralInput/styles.js +1 -7
  14. package/dist/components/atoms/GenericModal/index.js +2 -4
  15. package/dist/components/atoms/GenericModal/styles.js +1 -1
  16. package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +36 -0
  17. package/dist/components/atoms/ListCommercialRetailers/index.js +64 -0
  18. package/dist/components/atoms/ListCommercialRetailers/styles.js +20 -0
  19. package/dist/components/atoms/Loading/Loading.stories.js +28 -0
  20. package/dist/components/atoms/Loading/index.js +2 -1
  21. package/dist/components/atoms/Loading/styles.js +4 -8
  22. package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +37 -0
  23. package/dist/components/atoms/MenuCommercialRetailers/index.js +25 -0
  24. package/dist/components/{molecules/RetailerSelector → atoms/MenuCommercialRetailers}/styles.js +1 -1
  25. package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +28 -0
  26. package/dist/components/atoms/MenuProductImage/index.js +88 -0
  27. package/dist/components/atoms/MenuProductImage/styles.js +20 -0
  28. package/dist/components/atoms/PriorityFlag/index.js +1 -1
  29. package/dist/components/atoms/ProductImage/styles.js +1 -1
  30. package/dist/components/atoms/ProgressBar/index.js +2 -2
  31. package/dist/components/atoms/ProgressBar/styles.js +5 -3
  32. package/dist/components/atoms/ScreenHeader/index.js +1 -1
  33. package/dist/components/atoms/ScreenHeader/styles.js +1 -1
  34. package/dist/components/atoms/StatusTag/index.js +2 -37
  35. package/dist/components/atoms/StatusTag/styles.js +1 -1
  36. package/dist/components/atoms/ValidationPanel/index.js +3 -4
  37. package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +22 -0
  38. package/dist/components/atoms/VerticalSideMenuMainPage/index.js +49 -0
  39. package/dist/components/atoms/{Commentary → VerticalSideMenuMainPage}/styles.js +1 -6
  40. package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +25 -0
  41. package/dist/components/molecules/ApproveRejetPanel/index.js +49 -0
  42. package/dist/components/{atoms/CharCounter → molecules/ApproveRejetPanel}/styles.js +1 -3
  43. package/dist/components/molecules/AvatarAndValidation/index.js +7 -17
  44. package/dist/components/molecules/AvatarAndValidation/styles.js +1 -1
  45. package/dist/components/molecules/CarouselImagesLogin/index.js +40 -42
  46. package/dist/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +28 -0
  47. package/dist/components/molecules/EmailResetPasswordLogin/index.js +155 -0
  48. package/dist/components/molecules/EmailResetPasswordLogin/styles.js +20 -0
  49. package/dist/components/molecules/FeaturesBar/index.js +1 -1
  50. package/dist/components/molecules/GalleryElement/index.js +21 -80
  51. package/dist/components/molecules/GalleryElement/styles.js +1 -1
  52. package/dist/components/molecules/GalleryHeader/index.js +6 -28
  53. package/dist/components/molecules/GalleryHeader/styles.js +1 -1
  54. package/dist/components/molecules/ImageSelector/index.js +4 -2
  55. package/dist/components/molecules/ProductNameHeader/index.js +2 -1
  56. package/dist/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +28 -0
  57. package/dist/components/molecules/RegistrationFirstStep/index.js +336 -0
  58. package/dist/components/molecules/RegistrationFirstStep/styles.js +20 -0
  59. package/dist/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +28 -0
  60. package/dist/components/molecules/RegistrationSecondStep/index.js +156 -0
  61. package/dist/components/molecules/RegistrationSecondStep/styles.js +20 -0
  62. package/dist/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +28 -0
  63. package/dist/components/molecules/RegistrationThirdStep/index.js +161 -0
  64. package/dist/components/molecules/RegistrationThirdStep/styles.js +20 -0
  65. package/dist/components/{atoms/CharCounter/CharCounter.stories.js → molecules/SignInLogin/SignInLogin.stories.js} +7 -10
  66. package/dist/components/molecules/SignInLogin/index.js +292 -0
  67. package/dist/components/molecules/SignInLogin/styles.js +20 -0
  68. package/dist/components/molecules/StatusAsignationInfo/index.js +25 -46
  69. package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
  70. package/dist/components/molecules/TableHeader/index.js +5 -12
  71. package/dist/components/molecules/TableHeader/styles.js +1 -1
  72. package/dist/components/molecules/TagAndInput/index.js +2 -26
  73. package/dist/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +28 -0
  74. package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +104 -0
  75. package/dist/components/molecules/VerificationCodeResetPasswordLogin/styles.js +20 -0
  76. package/dist/components/molecules/VerificationCodeResetPasswordLogin/utils.js +69 -0
  77. package/dist/components/{atoms/InputFormatter/Wysiwyg.stories.js → organisms/ChangePassword/ChangePassword.stories.js} +7 -9
  78. package/dist/components/organisms/ChangePassword/index.js +113 -0
  79. package/dist/components/organisms/ChangePassword/styles.js +18 -0
  80. package/dist/components/organisms/FullProductNameHeader/index.js +8 -32
  81. package/dist/components/organisms/FullTabsMenu/index.js +5 -18
  82. package/dist/components/organisms/ImageDataTable/index.js +14 -90
  83. package/dist/components/organisms/InputGroup/index.js +13 -34
  84. package/dist/components/organisms/InputGroup/styles.js +1 -1
  85. package/dist/components/organisms/ProductImageModal/index.js +11 -15
  86. package/dist/components/organisms/ProductImageModal/styles.js +1 -1
  87. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +347 -109
  88. package/dist/components/pages/RetailerProductEdition/index.js +59 -1589
  89. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  90. package/dist/global-files/data.js +53 -212
  91. package/dist/global-files/global-styles.css +0 -1
  92. package/dist/global-files/variables.js +0 -1
  93. package/dist/index.js +238 -30
  94. package/package.json +11 -12
  95. package/src/components/atoms/AsignationOption/index.js +5 -7
  96. package/src/components/atoms/AsignationOption/styles.js +1 -9
  97. package/src/components/atoms/CheckBox/index.js +2 -8
  98. package/src/components/atoms/GeneralButton/index.js +2 -9
  99. package/src/components/atoms/GeneralButton/styles.js +0 -23
  100. package/src/components/atoms/GeneralInput/index.js +21 -71
  101. package/src/components/atoms/GeneralInput/styles.js +1 -11
  102. package/src/components/atoms/GenericModal/index.js +2 -2
  103. package/src/components/atoms/GenericModal/styles.js +2 -10
  104. package/src/components/atoms/Loading/Loading.stories.js +10 -0
  105. package/src/components/atoms/Loading/index.js +5 -4
  106. package/src/components/atoms/Loading/styles.js +43 -43
  107. package/src/components/atoms/PriorityFlag/index.js +1 -1
  108. package/src/components/atoms/ProductImage/styles.js +1 -1
  109. package/src/components/atoms/ProgressBar/index.js +2 -2
  110. package/src/components/atoms/ProgressBar/styles.js +3 -54
  111. package/src/components/atoms/ScreenHeader/index.js +3 -7
  112. package/src/components/atoms/ScreenHeader/styles.js +2 -9
  113. package/src/components/atoms/StatusTag/index.js +2 -30
  114. package/src/components/atoms/StatusTag/styles.js +3 -15
  115. package/src/components/atoms/ValidationPanel/index.js +3 -3
  116. package/src/components/molecules/AvatarAndValidation/index.js +6 -24
  117. package/src/components/molecules/AvatarAndValidation/styles.js +1 -1
  118. package/src/components/molecules/CarouselImagesLogin/index.js +34 -37
  119. package/src/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +11 -0
  120. package/src/components/molecules/EmailResetPasswordLogin/index.js +86 -0
  121. package/src/components/molecules/EmailResetPasswordLogin/styles.js +23 -0
  122. package/src/components/molecules/FeaturesBar/index.js +7 -10
  123. package/src/components/molecules/GalleryElement/index.js +36 -75
  124. package/src/components/molecules/GalleryElement/styles.js +11 -38
  125. package/src/components/molecules/GalleryHeader/index.js +8 -14
  126. package/src/components/molecules/GalleryHeader/styles.js +0 -16
  127. package/src/components/molecules/ImageSelector/index.js +3 -2
  128. package/src/components/molecules/ProductNameHeader/index.js +2 -1
  129. package/src/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +11 -0
  130. package/src/components/molecules/RegistrationFirstStep/index.js +242 -0
  131. package/src/components/molecules/RegistrationFirstStep/styles.js +81 -0
  132. package/src/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +11 -0
  133. package/src/components/molecules/RegistrationSecondStep/index.js +97 -0
  134. package/src/components/molecules/RegistrationSecondStep/styles.js +59 -0
  135. package/src/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +11 -0
  136. package/src/components/molecules/RegistrationThirdStep/index.js +109 -0
  137. package/src/components/molecules/RegistrationThirdStep/styles.js +44 -0
  138. package/src/components/molecules/SignInLogin/SignInLogin.stories.js +11 -0
  139. package/src/components/molecules/SignInLogin/index.js +205 -0
  140. package/src/components/molecules/SignInLogin/styles.js +78 -0
  141. package/src/components/molecules/StatusAsignationInfo/index.js +38 -62
  142. package/src/components/molecules/StatusAsignationInfo/styles.js +2 -12
  143. package/src/components/molecules/TableHeader/index.js +3 -16
  144. package/src/components/molecules/TableHeader/styles.js +0 -5
  145. package/src/components/molecules/TagAndInput/index.js +0 -24
  146. package/src/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +11 -0
  147. package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +78 -0
  148. package/src/components/molecules/VerificationCodeResetPasswordLogin/styles.js +49 -0
  149. package/src/components/molecules/VerificationCodeResetPasswordLogin/utils.js +56 -0
  150. package/src/components/organisms/ChangePassword/ChangePassword.stories.js +11 -0
  151. package/src/components/organisms/ChangePassword/index.js +63 -0
  152. package/src/components/organisms/ChangePassword/styles.js +16 -0
  153. package/src/components/organisms/FullProductNameHeader/index.js +7 -28
  154. package/src/components/organisms/FullTabsMenu/index.js +3 -15
  155. package/src/components/organisms/ImageDataTable/index.js +11 -89
  156. package/src/components/organisms/InputGroup/index.js +11 -46
  157. package/src/components/organisms/InputGroup/styles.js +0 -3
  158. package/src/components/organisms/ProductImageModal/index.js +12 -20
  159. package/src/components/organisms/ProductImageModal/styles.js +0 -3
  160. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +343 -117
  161. package/src/components/pages/RetailerProductEdition/index.js +46 -1225
  162. package/src/components/pages/RetailerProductEdition/styles.js +4 -67
  163. package/src/global-files/data.js +57 -156
  164. package/src/global-files/global-styles.css +0 -1
  165. package/src/global-files/variables.js +0 -1
  166. package/src/index.js +17 -1
  167. package/dist/assets/images/generalButton/downloadIcon.svg +0 -3
  168. package/dist/assets/images/modalsSVGs/attributesSent.svg +0 -208
  169. package/dist/assets/images/modalsSVGs/descriptionSent.svg +0 -237
  170. package/dist/assets/images/modalsSVGs/providerSent.svg +0 -445
  171. package/dist/assets/images/modalsSVGs/uploadingImages.svg +0 -148
  172. package/dist/components/atoms/CharCounter/index.js +0 -22
  173. package/dist/components/atoms/Commentary/Commentary.stories.js +0 -1
  174. package/dist/components/atoms/Commentary/index.js +0 -23
  175. package/dist/components/atoms/Input/index.js +0 -26
  176. package/dist/components/atoms/Input/style.js +0 -26
  177. package/dist/components/atoms/InputFormatter/index.js +0 -185
  178. package/dist/components/atoms/InputFormatter/styles.js +0 -33
  179. package/dist/components/atoms/LabelToInput/index.js +0 -53
  180. package/dist/components/atoms/LabelToInput/style.js +0 -22
  181. package/dist/components/atoms/Percent/Percent.stories.js +0 -39
  182. package/dist/components/atoms/Percent/index.js +0 -39
  183. package/dist/components/atoms/Percent/styles.js +0 -20
  184. package/dist/components/atoms/Select/index.js +0 -39
  185. package/dist/components/atoms/Select/style.js +0 -32
  186. package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +0 -48
  187. package/dist/components/molecules/RetailerSelector/index.js +0 -74
  188. package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +0 -31
  189. package/dist/components/molecules/TextAndGradient/index.js +0 -36
  190. package/dist/components/molecules/TextAndGradient/styles.js +0 -18
  191. package/src/assets/images/generalButton/downloadIcon.svg +0 -3
  192. package/src/assets/images/modalsSVGs/attributesSent.svg +0 -208
  193. package/src/assets/images/modalsSVGs/descriptionSent.svg +0 -237
  194. package/src/assets/images/modalsSVGs/providerSent.svg +0 -445
  195. package/src/assets/images/modalsSVGs/uploadingImages.svg +0 -148
  196. package/src/components/atoms/CharCounter/CharCounter.stories.js +0 -11
  197. package/src/components/atoms/CharCounter/index.js +0 -13
  198. package/src/components/atoms/CharCounter/styles.js +0 -10
  199. package/src/components/atoms/Commentary/Commentary.stories.js +0 -0
  200. package/src/components/atoms/Commentary/index.js +0 -9
  201. package/src/components/atoms/Commentary/styles.js +0 -16
  202. package/src/components/atoms/Input/index.js +0 -15
  203. package/src/components/atoms/Input/style.js +0 -31
  204. package/src/components/atoms/InputFormatter/Wysiwyg.stories.js +0 -12
  205. package/src/components/atoms/InputFormatter/index.js +0 -141
  206. package/src/components/atoms/InputFormatter/styles.js +0 -40
  207. package/src/components/atoms/LabelToInput/index.js +0 -26
  208. package/src/components/atoms/LabelToInput/style.js +0 -41
  209. package/src/components/atoms/Select/index.js +0 -35
  210. package/src/components/atoms/Select/style.js +0 -76
  211. package/src/components/molecules/RetailerSelector/RetailerSelector.stories.js +0 -35
  212. package/src/components/molecules/RetailerSelector/index.js +0 -63
  213. package/src/components/molecules/RetailerSelector/styles.js +0 -18
@@ -0,0 +1,104 @@
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.VerificationCodeResetPasswordLogin = void 0;
9
+
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
11
+
12
+ var _styles = require("./styles");
13
+
14
+ var _GradientPanel = require("../../atoms/GradientPanel");
15
+
16
+ var _react = require("react");
17
+
18
+ var _LogoImage = require("../../atoms/LogoImage");
19
+
20
+ var _ScreenHeader = require("../../atoms/ScreenHeader");
21
+
22
+ var _variables = require("../../../global-files/variables");
23
+
24
+ var _GeneralInput = require("../../atoms/GeneralInput");
25
+
26
+ var _GeneralButton = require("../../atoms/GeneralButton");
27
+
28
+ var _utils = require("./utils");
29
+
30
+ var _jsxRuntime = require("react/jsx-runtime");
31
+
32
+ var VerificationCodeResetPasswordLogin = function VerificationCodeResetPasswordLogin() {
33
+ var _useState = (0, _react.useState)(false),
34
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
35
+ emptyVerificationCode = _useState2[0],
36
+ setEmptyVerificationCode = _useState2[1];
37
+
38
+ var _useState3 = (0, _react.useState)(),
39
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
40
+ inputCodeVerificationAll = _useState4[0],
41
+ setInputCodeVerificationAll = _useState4[1];
42
+
43
+ var inputPositions = [1, 2, 3, 4, 5, 6];
44
+ (0, _react.useEffect)(function () {
45
+ setInputCodeVerificationAll(document.querySelectorAll("[id^='verificationCodeInput']"));
46
+ }, []);
47
+ var loginRight = [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoImage.LogoImage, {}, "1"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
48
+ className: "credenciales",
49
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
50
+ fontFamily: _variables.FontFamily.AvenirNext,
51
+ color: _variables.GlobalColors.s5,
52
+ text: "Ingresa tus credenciales"
53
+ })
54
+ }, "2"), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
55
+ className: "user",
56
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
57
+ text: "Ingresa el código de verificación enviado a:",
58
+ headerType: "input-name-header"
59
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
60
+ className: "verification-code",
61
+ children: inputPositions.map(function (position) {
62
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralInput.GeneralInput, {
63
+ inputId: "verificationCodeInput".concat(position),
64
+ inputType: "text",
65
+ inputPlaceholder: "X",
66
+ validateInput: _utils.validateInput,
67
+ inputsArray: inputCodeVerificationAll,
68
+ position: position,
69
+ maxLength: "1"
70
+ });
71
+ })
72
+ }), emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
73
+ children: "Ingrese su c\xF3digo de verificaci\xF3n"
74
+ })]
75
+ }, "3"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
76
+ className: "resend-code",
77
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
78
+ children: "Reenviar c\xF3digo de verificaci\xF3n"
79
+ })
80
+ }, "4"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
81
+ className: "button-center",
82
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
83
+ buttonType: "general-default-button",
84
+ label: "Enviar",
85
+ onClick: function onClick(e) {
86
+ return (0, _utils.validate)(inputCodeVerificationAll, setEmptyVerificationCode);
87
+ }
88
+ })
89
+ }, "5"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
90
+ className: "reset-password",
91
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
92
+ children: "Regresar..."
93
+ })
94
+ }, "6")];
95
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
96
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GradientPanel.GradientPanel, {
97
+ componentsArray: loginRight,
98
+ panelType: "home-login",
99
+ panelColor: _variables.GlobalColors.white
100
+ })
101
+ });
102
+ };
103
+
104
+ exports.VerificationCodeResetPasswordLogin = VerificationCodeResetPasswordLogin;
@@ -0,0 +1,20 @@
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.Container = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
+
12
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
+
14
+ var _variables = require("../../../global-files/variables");
15
+
16
+ var _templateObject;
17
+
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n height: 100%;\n width: 50%;\n .button-center {\n text-align: center;\n .general-default-button {\n width: 160px;\n }\n }\n .reset-password {\n text-align: center;\n margin: 15px !important;\n color: ", ";\n cursor: pointer;\n font-weight: bold;\n font-family: ", ";\n font-size: 13px;\n }\n .resend-code {\n margin-top: 8px !important;\n color: ", ";\n font-family: ", ";\n font-size: 11px;\n text-decoration: underline rgb(228, 81, 172);\n cursor: pointer;\n & + * {\n margin-top: 30px;\n }\n }\n .verification-code {\n display: flex;\n text-align: center;\n margin: auto;\n margin-top: 10px;\n input[type=\"number\"]::-webkit-inner-spin-button,\n input[type=\"number\"]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n input {\n width: 70%;\n text-align: center;\n }\n }\n"])), _variables.GlobalColors.secondary_magenta, _variables.FontFamily.Raleway, _variables.GlobalColors.magenta_s2, _variables.FontFamily.AvenirNext);
19
+
20
+ exports.Container = Container;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.validateInput = exports.validate = void 0;
7
+
8
+ /**
9
+ *
10
+ * @param {event} e event received triggered by verification code input
11
+ * @param {number} index index position from the verification code(VC) input array (i.e. digit 1,2,3 etc...)
12
+ * @param {array<html nodes>} inputsArray array which contains every VC digit input (used to change focus on input change)
13
+ */
14
+ var validateInput = function validateInput(e, index, inputsArray) {
15
+ var isValid = false;
16
+ var inputNotEmpty = e.target.value.length > 0;
17
+
18
+ if (inputNotEmpty) {
19
+ if (validateInputNumber(e) !== null) {
20
+ isValid = true;
21
+ nextInputFocus(inputsArray, index++);
22
+ }
23
+ }
24
+
25
+ return isValid ? e.target.value : "";
26
+ };
27
+ /**
28
+ *
29
+ * @param {event} e event received triggered by verification code input
30
+ * @returns {boolean} if digit is a number
31
+ */
32
+
33
+
34
+ exports.validateInput = validateInput;
35
+
36
+ var validateInputNumber = function validateInputNumber(e) {
37
+ return (e.target.value || String.fromCharCode(e.keyCode)).match(/[0-9]{1}/);
38
+ };
39
+ /**
40
+ *
41
+ * @param {array<html nodes>} inputsArray array which contains every VC digit input (used to change focus on input change)
42
+ * @param {number} index index position from the verification code(VC) input array (i.e. digit 1,2,3 etc...)
43
+ * changes focus to next input if digit typed is a number and there wasn't any before
44
+ */
45
+
46
+
47
+ var nextInputFocus = function nextInputFocus(inputsArray, index) {
48
+ var _inputsArray$index;
49
+
50
+ var button = document.getElementsByClassName("general-default-button");
51
+ inputsArray !== null && inputsArray !== void 0 && inputsArray.length && index === (inputsArray === null || inputsArray === void 0 ? void 0 : inputsArray.length) ? button[0].focus() : (_inputsArray$index = inputsArray[index]) === null || _inputsArray$index === void 0 ? void 0 : _inputsArray$index.focus();
52
+ };
53
+ /**
54
+ *
55
+ * @param {array<html nodes>} inputsArray array which contains every VC digit input (used to check if there's any empty)
56
+ * @param {function} setEmptyVerificationCode function to update flag which handles if there's an empty char
57
+ * updates emptyVerificationFlag from father component
58
+ */
59
+
60
+
61
+ var validate = function validate(inputsArray, setEmptyVerificationCode) {
62
+ var contInputEmpty = 0;
63
+ inputsArray.forEach(function (element) {
64
+ element.value === "" ? 0 : contInputEmpty++;
65
+ });
66
+ contInputEmpty === inputsArray.length ? setEmptyVerificationCode(false) : setEmptyVerificationCode(true);
67
+ };
68
+
69
+ exports.validate = validate;
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.default = exports.DefaultInputFormatter = void 0;
8
+ exports.default = exports.ChangePasswordDefault = void 0;
9
9
 
10
10
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
11
 
@@ -14,17 +14,15 @@ var _index = require("./index");
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
 
16
16
  var _default = {
17
- title: "Components/atoms/InputFormatter",
18
- component: _index.InputFormatter
17
+ title: "Components/organisms/ChangePassword",
18
+ component: _index.ChangePassword
19
19
  };
20
20
  exports.default = _default;
21
21
 
22
22
  var Template = function Template(args) {
23
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.InputFormatter, (0, _objectSpread2.default)({}, args));
23
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ChangePassword, (0, _objectSpread2.default)({}, args));
24
24
  };
25
25
 
26
- var DefaultInputFormatter = Template.bind({});
27
- exports.DefaultInputFormatter = DefaultInputFormatter;
28
- DefaultInputFormatter.args = {
29
- text: "hola mundo"
30
- };
26
+ var ChangePasswordDefault = Template.bind({});
27
+ exports.ChangePasswordDefault = ChangePasswordDefault;
28
+ ChangePasswordDefault.args = {};
@@ -0,0 +1,113 @@
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.ChangePassword = void 0;
9
+
10
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
+
12
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
13
+
14
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
15
+
16
+ var _styles = require("./styles");
17
+
18
+ var _LoginPasswordStrength = require("../../molecules/LoginPasswordStrength");
19
+
20
+ var _react = require("react");
21
+
22
+ var _GeneralButton = require("../../atoms/GeneralButton");
23
+
24
+ var _LogoImage = require("../../atoms/LogoImage");
25
+
26
+ var _ScreenHeader = require("../../atoms/ScreenHeader");
27
+
28
+ var _variables = require("../../../global-files/variables");
29
+
30
+ var _GradientPanel = require("../../atoms/GradientPanel");
31
+
32
+ var _jsxRuntime = require("react/jsx-runtime");
33
+
34
+ var ChangePassword = function ChangePassword() {
35
+ var _useState = (0, _react.useState)(false),
36
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
37
+ emptyPassword = _useState2[0],
38
+ setEmptyPassword = _useState2[1];
39
+
40
+ var _useState3 = (0, _react.useState)(false),
41
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
42
+ emptyConfirmPassword = _useState4[0],
43
+ setEmptyConfirmPassword = _useState4[1];
44
+
45
+ var _useState5 = (0, _react.useState)(true),
46
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
47
+ matchPasswords = _useState6[0],
48
+ setMatchPasswords = _useState6[1];
49
+
50
+ var validate = /*#__PURE__*/function () {
51
+ var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
52
+ var password, confirmPassword;
53
+ return _regenerator.default.wrap(function _callee$(_context) {
54
+ while (1) {
55
+ switch (_context.prev = _context.next) {
56
+ case 0:
57
+ e.preventDefault();
58
+ password = document.querySelector("#newPasswordInput").value;
59
+ password.length < 8 ? setEmptyPassword(true) : setEmptyPassword(false);
60
+ confirmPassword = document.querySelector("#confirmPasswordInput").value;
61
+ confirmPassword === "" ? setEmptyConfirmPassword(true) : setEmptyConfirmPassword(false);
62
+
63
+ if (password === confirmPassword) {
64
+ setMatchPasswords(true);
65
+ } else {
66
+ setMatchPasswords(false);
67
+ }
68
+
69
+ case 6:
70
+ case "end":
71
+ return _context.stop();
72
+ }
73
+ }
74
+ }, _callee);
75
+ }));
76
+
77
+ return function validate(_x) {
78
+ return _ref.apply(this, arguments);
79
+ };
80
+ }();
81
+
82
+ var loginRight = [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoImage.LogoImage, {}, "1"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
83
+ className: "credenciales",
84
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
85
+ fontFamily: _variables.FontFamily.AvenirNext,
86
+ color: _variables.GlobalColors.s5,
87
+ text: "Ingresa tus credenciales"
88
+ })
89
+ }, "2"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LoginPasswordStrength.LoginPasswordStrength, {
90
+ emptyPassword: emptyPassword,
91
+ emptyConfirmPassword: emptyConfirmPassword,
92
+ matchPasswords: matchPasswords,
93
+ textTittle: "Ingresa tus credenciales"
94
+ }, "3"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
95
+ className: "button-center",
96
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
97
+ buttonType: "general-default-button",
98
+ label: "Enviar",
99
+ onClick: function onClick(e) {
100
+ return validate(e);
101
+ }
102
+ })
103
+ }, "4")];
104
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
105
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GradientPanel.GradientPanel, {
106
+ panelColor: _variables.GlobalColors.white,
107
+ componentsArray: loginRight,
108
+ panelType: "home-login"
109
+ })
110
+ });
111
+ };
112
+
113
+ exports.ChangePassword = ChangePassword;
@@ -0,0 +1,18 @@
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.Container = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
+
12
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
+
14
+ var _templateObject;
15
+
16
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 50%;\n height: 100vh;\n .button-center {\n text-align: center;\n position: absolute;\n bottom: 5%;\n left: calc(75% - 80px);\n .general-default-button {\n width: 160px;\n }\n }\n"])));
17
+
18
+ exports.Container = Container;
@@ -16,46 +16,22 @@ var _AvatarAndValidation = require("../../molecules/AvatarAndValidation");
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
 
18
18
  var FullProductNameHeader = function FullProductNameHeader(_ref) {
19
- var _headerData$article, _headerData$article2, _headerData$article3, _headerData$article4, _headerData$article5;
20
-
21
- var headerData = _ref.headerData,
22
- percent = _ref.percent,
23
- activeRetailer = _ref.activeRetailer,
24
- setActiveRetailer = _ref.setActiveRetailer,
25
- approveRejectButtons = _ref.approveRejectButtons,
26
- sendToFacilitator = _ref.sendToFacilitator,
27
- auditorAssigned = _ref.auditorAssigned,
28
- userAssigned = _ref.userAssigned;
19
+ var headerData = _ref.headerData;
29
20
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
30
21
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductNameHeader.ProductNameHeader, {
31
- productName: headerData === null || headerData === void 0 ? void 0 : (_headerData$article = headerData.article) === null || _headerData$article === void 0 ? void 0 : _headerData$article.name,
22
+ productName: headerData === null || headerData === void 0 ? void 0 : headerData.name,
32
23
  statusType: headerData === null || headerData === void 0 ? void 0 : headerData.status,
33
- percent: percent === null || percent === void 0 ? void 0 : percent.toFixed(0),
34
- priority: headerData === null || headerData === void 0 ? void 0 : headerData.prio,
35
- date: new Date(headerData === null || headerData === void 0 ? void 0 : (_headerData$article2 = headerData.article) === null || _headerData$article2 === void 0 ? void 0 : _headerData$article2.timestamp).toLocaleDateString()
24
+ percent: headerData === null || headerData === void 0 ? void 0 : headerData.percent,
25
+ backgroundColor: headerData === null || headerData === void 0 ? void 0 : headerData.backgroundColor,
26
+ priority: headerData === null || headerData === void 0 ? void 0 : headerData.priority,
27
+ date: headerData === null || headerData === void 0 ? void 0 : headerData.date
36
28
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
37
29
  className: "features-bar-container",
38
30
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FeaturesBar.FeaturesBar, {
39
- features: [{
40
- feature: "Categoría",
41
- value: headerData === null || headerData === void 0 ? void 0 : (_headerData$article3 = headerData.article) === null || _headerData$article3 === void 0 ? void 0 : _headerData$article3.category
42
- }, {
43
- feature: "Prov",
44
- value: headerData === null || headerData === void 0 ? void 0 : (_headerData$article4 = headerData.article) === null || _headerData$article4 === void 0 ? void 0 : _headerData$article4.company_name
45
- }, {
46
- feature: "UPC",
47
- value: headerData === null || headerData === void 0 ? void 0 : (_headerData$article5 = headerData.article) === null || _headerData$article5 === void 0 ? void 0 : _headerData$article5.upc
48
- }]
31
+ features: headerData === null || headerData === void 0 ? void 0 : headerData.features
49
32
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AvatarAndValidation.AvatarAndValidation, {
50
- retailers: headerData === null || headerData === void 0 ? void 0 : headerData.retailers,
51
33
  avatarData: headerData === null || headerData === void 0 ? void 0 : headerData.avatarData,
52
- validation: headerData === null || headerData === void 0 ? void 0 : headerData.validation,
53
- activeRetailer: activeRetailer,
54
- setActiveRetailer: setActiveRetailer,
55
- approveRejectButtons: approveRejectButtons,
56
- sendToFacilitator: sendToFacilitator,
57
- auditorAssigned: auditorAssigned,
58
- userAssigned: userAssigned
34
+ validation: headerData === null || headerData === void 0 ? void 0 : headerData.validation
59
35
  })]
60
36
  })]
61
37
  });
@@ -21,17 +21,10 @@ var _jsxRuntime = require("react/jsx-runtime");
21
21
 
22
22
  var FullTabsMenu = function FullTabsMenu(_ref) {
23
23
  var tabsSections = _ref.tabsSections,
24
- _ref$status = _ref.status,
25
- status = _ref$status === void 0 ? "" : _ref$status,
26
- activeTab = _ref.activeTab,
24
+ status = _ref.status,
25
+ profileImage = _ref.profileImage,
27
26
  setActiveTab = _ref.setActiveTab,
28
- setImageLayout = _ref.setImageLayout,
29
- assig = _ref.assig,
30
- setAssignation = _ref.setAssignation,
31
- isRetailer = _ref.isRetailer,
32
- downloadImages = _ref.downloadImages,
33
- askToDeleteImages = _ref.askToDeleteImages,
34
- onClickSave = _ref.onClickSave;
27
+ setImageLayout = _ref.setImageLayout;
35
28
 
36
29
  var _useState = (0, _react.useState)(false),
37
30
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -45,15 +38,9 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
45
38
  setActiveTab: setActiveTab
46
39
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.StatusAsignationInfo, {
47
40
  status: status,
48
- activeTab: activeTab,
41
+ image: profileImage,
49
42
  setImageLayout: setImageLayout,
50
- imagesSection: imagesSection,
51
- assignationsImages: assig,
52
- setAssignation: setAssignation,
53
- isRetailer: isRetailer,
54
- downloadImages: downloadImages,
55
- onClickSave: onClickSave,
56
- askToDeleteImages: askToDeleteImages
43
+ imagesSection: imagesSection
57
44
  })]
58
45
  });
59
46
  };
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -11,101 +9,27 @@ var _styles = require("./styles");
11
9
 
12
10
  var _TableHeader = require("../../molecules/TableHeader");
13
11
 
14
- var _styles2 = require("../../molecules/TableRow/styles");
15
-
16
- var _ScreenHeader = require("../../atoms/ScreenHeader");
17
-
18
- var _LabelToInput = _interopRequireDefault(require("../../atoms/LabelToInput"));
12
+ var _TableRow = require("../../molecules/TableRow");
19
13
 
20
14
  var _jsxRuntime = require("react/jsx-runtime");
21
15
 
22
16
  var ImageDataTable = function ImageDataTable(_ref) {
23
- var _lists$inputs, _lists$inputs$find, _lists$imagePackaging, _lists$imagePackaging2, _lists$imageType, _lists$imageType$find, _lists$attrForImgs$re;
24
-
25
- var activeImage = _ref.activeImage,
26
- darkMode = _ref.darkMode,
27
- lists = _ref.lists,
28
- retailerSelected = _ref.retailerSelected,
29
- setImages = _ref.setImages,
30
- assignationsImages = _ref.assignationsImages,
31
- imagesStatus = _ref.imagesStatus,
32
- setAssignation = _ref.setAssignation,
33
- isRetailer = _ref.isRetailer,
34
- onClickSave = _ref.onClickSave;
17
+ var headerInfo = _ref.headerInfo,
18
+ imageData = _ref.imageData,
19
+ activeImage = _ref.activeImage,
20
+ darkMode = _ref.darkMode;
35
21
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
36
22
  darkMode: darkMode,
37
23
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TableHeader.TableHeader, {
38
- imagesStatus: imagesStatus,
39
- activeImage: activeImage,
40
- assignationsImages: assignationsImages,
41
- setAssignation: setAssignation,
42
- isRetailer: isRetailer,
43
- onClickSave: onClickSave
44
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles2.Container, {
45
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
46
- headerType: "table-row-text",
47
- text: "Tipo de toma"
48
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
49
- headerType: "table-row-text gray-table-row",
50
- text: (lists === null || lists === void 0 ? void 0 : (_lists$inputs = lists.inputs) === null || _lists$inputs === void 0 ? void 0 : (_lists$inputs$find = _lists$inputs.find(function (f) {
51
- return f.id === +(activeImage === null || activeImage === void 0 ? void 0 : activeImage.image_id);
52
- })) === null || _lists$inputs$find === void 0 ? void 0 : _lists$inputs$find.name) || "-"
53
- })]
54
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles2.Container, {
55
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
56
- headerType: "table-row-text",
57
- text: "Tipo de empaque"
58
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
59
- headerType: "table-row-text gray-table-row",
60
- text: (lists === null || lists === void 0 ? void 0 : (_lists$imagePackaging = lists.imagePackagingType) === null || _lists$imagePackaging === void 0 ? void 0 : (_lists$imagePackaging2 = _lists$imagePackaging.find(function (f) {
61
- return f.id === +(activeImage === null || activeImage === void 0 ? void 0 : activeImage.packing_type);
62
- })) === null || _lists$imagePackaging2 === void 0 ? void 0 : _lists$imagePackaging2.name) || "-"
63
- })]
64
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles2.Container, {
65
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
66
- headerType: "table-row-text",
67
- text: "Tipo de imagen"
68
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
69
- headerType: "table-row-text gray-table-row",
70
- text: (lists === null || lists === void 0 ? void 0 : (_lists$imageType = lists.imageType) === null || _lists$imageType === void 0 ? void 0 : (_lists$imageType$find = _lists$imageType.find(function (f) {
71
- return f.id === +(activeImage === null || activeImage === void 0 ? void 0 : activeImage.image_type);
72
- })) === null || _lists$imageType$find === void 0 ? void 0 : _lists$imageType$find.name) || "-"
73
- })]
74
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles2.Container, {
75
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
76
- headerType: "table-row-text",
77
- text: "Formato"
78
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
79
- headerType: "table-row-text",
80
- text: (activeImage === null || activeImage === void 0 ? void 0 : activeImage.ext) || "-"
81
- })]
82
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles2.Container, {
83
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
84
- headerType: "table-row-text",
85
- text: "Tama\xF1o de imagen"
86
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
87
- headerType: "table-row-text",
88
- text: activeImage !== null && activeImage !== void 0 && activeImage.width && activeImage.height ? "".concat(activeImage === null || activeImage === void 0 ? void 0 : activeImage.width, "x").concat(activeImage === null || activeImage === void 0 ? void 0 : activeImage.height, "px") : "-"
89
- })]
90
- }), retailerSelected && (lists === null || lists === void 0 ? void 0 : lists.attrForImgs) && (lists === null || lists === void 0 ? void 0 : (_lists$attrForImgs$re = lists.attrForImgs[retailerSelected]) === null || _lists$attrForImgs$re === void 0 ? void 0 : _lists$attrForImgs$re.map(function (attr, index) {
91
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles2.Container, {
92
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
93
- headerType: "table-row-text",
94
- text: (attr === null || attr === void 0 ? void 0 : attr.name) || "-"
95
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LabelToInput.default, {
96
- width: "100px",
97
- defaultValue: attr === null || attr === void 0 ? void 0 : attr.value,
98
- onChange: function onChange(e) {
99
- setImages({
100
- action: "changeAttrValue",
101
- retailer: retailerSelected,
102
- index: index,
103
- value: e.target.value || "-"
104
- });
105
- }
106
- })]
107
- }, "row-" + index);
108
- }))]
24
+ headerInfo: headerInfo,
25
+ activeImage: activeImage
26
+ }), imageData === null || imageData === void 0 ? void 0 : imageData.map(function (attribute, index) {
27
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TableRow.TableRow, {
28
+ feature: attribute.feature,
29
+ value: attribute.value,
30
+ valueType: index < 2
31
+ }, index);
32
+ })]
109
33
  });
110
34
  };
111
35
 
@@ -20,14 +20,7 @@ var InputGroup = function InputGroup(_ref) {
20
20
  inputGroup = _ref$inputGroup === void 0 ? {} : _ref$inputGroup,
21
21
  activeSection = _ref.activeSection,
22
22
  _ref$dataInputs = _ref.dataInputs,
23
- dataInputs = _ref$dataInputs === void 0 ? {} : _ref$dataInputs,
24
- updatedDescriptions = _ref.updatedDescriptions,
25
- setUpdatedDescriptions = _ref.setUpdatedDescriptions,
26
- updatedDatasheets = _ref.updatedDatasheets,
27
- setUpdatedDatasheets = _ref.setUpdatedDatasheets,
28
- articleId = _ref.articleId,
29
- version = _ref.version,
30
- dinamicHeight = _ref.dinamicHeight;
23
+ dataInputs = _ref$dataInputs === void 0 ? {} : _ref$dataInputs;
31
24
 
32
25
  var inputTypeValue = function inputTypeValue(type) {
33
26
  switch (type) {
@@ -44,41 +37,27 @@ var InputGroup = function InputGroup(_ref) {
44
37
 
45
38
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
46
39
  className: activeSection === "Ficha técnica" ? "datasheets-layout" : "descriptions-layout",
47
- children: [(inputGroup === null || inputGroup === void 0 ? void 0 : inputGroup.dataGroup) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
40
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
48
41
  headerType: "retailer-name-header",
49
42
  text: inputGroup === null || inputGroup === void 0 ? void 0 : inputGroup.dataGroup
50
43
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
51
44
  className: "inputs-container",
52
45
  children: inputGroup === null || inputGroup === void 0 ? void 0 : (_inputGroup$inputs = inputGroup.inputs) === null || _inputGroup$inputs === void 0 ? void 0 : _inputGroup$inputs.map(function (input, index) {
53
- var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4, _dataInputs$input5, _dataInputs$input6, _dataInputs$input7, _dataInputs$input8, _dataInputs$input9, _dataInputs$input10;
46
+ var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4;
54
47
 
55
48
  return activeSection === "Ficha técnica" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
56
- inputId: (_dataInputs$input3 = dataInputs[input]) === null || _dataInputs$input3 === void 0 ? void 0 : _dataInputs$input3.id,
57
- version: version,
58
- inputType: inputTypeValue((_dataInputs$input4 = dataInputs[input]) === null || _dataInputs$input4 === void 0 ? void 0 : _dataInputs$input4.type),
59
- label: ((_dataInputs$input5 = dataInputs[input]) === null || _dataInputs$input5 === void 0 ? void 0 : _dataInputs$input5.name) + ((_dataInputs$input6 = dataInputs[input]) !== null && _dataInputs$input6 !== void 0 && _dataInputs$input6.required ? "*" : ""),
60
- value: (_dataInputs$input7 = dataInputs[input]) === null || _dataInputs$input7 === void 0 ? void 0 : _dataInputs$input7.value,
61
- inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
62
- articleId: articleId,
63
- isRequired: (_dataInputs$input8 = dataInputs[input]) === null || _dataInputs$input8 === void 0 ? void 0 : _dataInputs$input8.required,
64
- updatedDatasheets: updatedDatasheets,
65
- setUpdatedDatasheets: setUpdatedDatasheets,
66
- maxChar: (_dataInputs$input9 = dataInputs[input]) !== null && _dataInputs$input9 !== void 0 && _dataInputs$input9.max_chars ? (_dataInputs$input10 = dataInputs[input]) === null || _dataInputs$input10 === void 0 ? void 0 : _dataInputs$input10.max_chars : 999
67
- }, index + "-" + ((_dataInputs$input = dataInputs[input]) === null || _dataInputs$input === void 0 ? void 0 : _dataInputs$input.value) + "-" + ((_dataInputs$input2 = dataInputs[input]) === null || _dataInputs$input2 === void 0 ? void 0 : _dataInputs$input2.id)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
68
- inputId: input.id,
69
- index: index,
49
+ inputId: "datasheet-" + ((_dataInputs$input = dataInputs[input]) === null || _dataInputs$input === void 0 ? void 0 : _dataInputs$input.id) + "-" + index,
50
+ inputType: inputTypeValue((_dataInputs$input2 = dataInputs[input]) === null || _dataInputs$input2 === void 0 ? void 0 : _dataInputs$input2.type),
51
+ label: (_dataInputs$input3 = dataInputs[input]) === null || _dataInputs$input3 === void 0 ? void 0 : _dataInputs$input3.name,
52
+ value: (_dataInputs$input4 = dataInputs[input]) === null || _dataInputs$input4 === void 0 ? void 0 : _dataInputs$input4.value,
53
+ inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder
54
+ }, index) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
55
+ inputId: "description-" + (input === null || input === void 0 ? void 0 : input.id) + "-" + index,
70
56
  inputType: "textarea",
71
- label: (input === null || input === void 0 ? void 0 : input.name) + (input.required ? "*" : ""),
57
+ label: input === null || input === void 0 ? void 0 : input.name,
72
58
  value: input === null || input === void 0 ? void 0 : input.value,
73
- isRequired: input.required,
74
- maxChar: input.max_chars,
75
- inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
76
- updatedDescriptions: updatedDescriptions,
77
- setUpdatedDescriptions: setUpdatedDescriptions,
78
- articleId: articleId,
79
- version: version,
80
- dinamicHeight: dinamicHeight
81
- }, index + "-" + (input === null || input === void 0 ? void 0 : input.value));
59
+ inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder
60
+ }, index);
82
61
  })
83
62
  })]
84
63
  });