contentoh-components-library 21.0.39 → 21.0.42

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 (32) hide show
  1. package/dist/components/atoms/GeneralInput/index.js +2 -6
  2. package/dist/components/atoms/GradientPanel/styles.js +1 -1
  3. package/dist/components/atoms/Loading/index.js +5 -3
  4. package/dist/components/atoms/Loading/styles.js +1 -1
  5. package/dist/components/molecules/LoginPasswordStrength/index.js +2 -8
  6. package/dist/components/molecules/RegistrationFirstStep/index.js +78 -135
  7. package/dist/components/molecules/RegistrationFirstStep/styles.js +1 -1
  8. package/dist/components/molecules/RegistrationSecondStep/index.js +42 -110
  9. package/dist/components/molecules/RegistrationThirdStep/index.js +19 -33
  10. package/dist/components/molecules/SignInLogin/styles.js +1 -1
  11. package/dist/components/molecules/TagAndInput/index.js +2 -6
  12. package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +115 -9
  13. package/dist/components/molecules/VerificationCodeResetPasswordLogin/utils.js +2 -2
  14. package/dist/components/organisms/ChangePassword/index.js +13 -3
  15. package/dist/components/organisms/ChangePassword/styles.js +1 -1
  16. package/package.json +2 -2
  17. package/src/components/atoms/GeneralInput/index.js +0 -4
  18. package/src/components/atoms/GradientPanel/styles.js +1 -0
  19. package/src/components/atoms/Loading/index.js +2 -0
  20. package/src/components/atoms/Loading/styles.js +12 -3
  21. package/src/components/molecules/EmailResetPasswordLogin/index.js +0 -1
  22. package/src/components/molecules/LoginPasswordStrength/index.js +0 -5
  23. package/src/components/molecules/RegistrationFirstStep/index.js +91 -136
  24. package/src/components/molecules/RegistrationFirstStep/styles.js +4 -1
  25. package/src/components/molecules/RegistrationSecondStep/index.js +51 -86
  26. package/src/components/molecules/RegistrationThirdStep/index.js +14 -1
  27. package/src/components/molecules/SignInLogin/styles.js +1 -0
  28. package/src/components/molecules/TagAndInput/index.js +0 -4
  29. package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +103 -11
  30. package/src/components/molecules/VerificationCodeResetPasswordLogin/utils.js +2 -4
  31. package/src/components/organisms/ChangePassword/index.js +16 -3
  32. package/src/components/organisms/ChangePassword/styles.js +1 -2
@@ -28,9 +28,7 @@ var GeneralInput = function GeneralInput(_ref) {
28
28
  inputsArray = _ref.inputsArray,
29
29
  maxLength = _ref.maxLength,
30
30
  inputSize = _ref.inputSize,
31
- onChange = _ref.onChange,
32
- required = _ref.required,
33
- defaultValue = _ref.defaultValue;
31
+ required = _ref.required;
34
32
 
35
33
  var _useState = (0, _react.useState)({
36
34
  value: inputValue !== null && inputValue !== void 0 ? inputValue : ""
@@ -67,9 +65,7 @@ var GeneralInput = function GeneralInput(_ref) {
67
65
  return onHandleChange(e);
68
66
  },
69
67
  maxLength: maxLength && maxLength,
70
- onChange: onChange,
71
- required: required,
72
- defaultValue: defaultValue
68
+ required: required
73
69
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)("textarea", {
74
70
  name: inputName,
75
71
  id: inputId,
@@ -15,7 +15,7 @@ var _variables = require("../../../global-files/variables");
15
15
 
16
16
  var _templateObject;
17
17
 
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n label {\n color: red;\n margin-top: 3px;\n margin-left: 15px;\n font-family: ", ";\n font-size: 11px;\n }\n &.home-panel {\n text-align: center;\n h2 {\n & + * {\n margin-top: 20px;\n }\n }\n p {\n font-family: ", ";\n color: ", ";\n font-size: 18px;\n line-height: 21px;\n letter-spacing: -0.015em;\n & + * {\n margin-top: 20px;\n }\n }\n }\n\n &.home-login {\n .credenciales {\n & + * {\n margin-top: 30px;\n }\n }\n .user {\n & + * {\n margin-top: 20px;\n }\n }\n .password {\n & + * {\n margin-top: 20px;\n }\n }\n .select {\n display: flex;\n justify-content: space-between;\n .active-right {\n font-family: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n letter-spacing: -0.015em;\n color: ", ";\n }\n & + * {\n margin-top: 50px;\n }\n }\n .button-right {\n text-align: right;\n & + * {\n margin-top: 55px;\n }\n }\n .new-login {\n p {\n font-family: ", ";\n text-align: right;\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n color: ", ";\n span {\n color: ", ";\n }\n }\n }\n }\n &.home-card {\n position: relative;\n .plan {\n text-align: center;\n & + * {\n margin-top: 40px;\n }\n }\n .arrowimage {\n position: absolute;\n top: 50px;\n left: 40px;\n }\n .general-text {\n font-family: ", ";\n font-size: 14px;\n line-height: 19px;\n text-align: center;\n letter-spacing: -0.015em;\n & + * {\n margin-top: 50px;\n }\n }\n .payment-register {\n & + * {\n margin-top: 50px;\n }\n }\n .button-continuar {\n text-align: center;\n & + * {\n margin-top: 35px;\n }\n }\n .continue {\n text-align: center;\n font-family: ", ";\n font-size: 14px;\n line-height: 19px;\n letter-spacing: -0.015em;\n text-decoration-line: underline;\n color: ", ";\n }\n }\n .main-container{\n max-width: 80%;\n max-height: 80%;\n }\n"])), function (_ref) {
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n label {\n color: red;\n margin-top: 3px;\n margin-left: 15px;\n font-family: ", ";\n font-size: 11px;\n }\n &.home-panel {\n text-align: center;\n h2 {\n & + * {\n margin-top: 20px;\n }\n }\n p {\n font-family: ", ";\n color: ", ";\n font-size: 18px;\n line-height: 21px;\n letter-spacing: -0.015em;\n & + * {\n margin-top: 20px;\n }\n }\n }\n\n &.home-login {\n width: 100%;\n .credenciales {\n & + * {\n margin-top: 30px;\n }\n }\n .user {\n & + * {\n margin-top: 20px;\n }\n }\n .password {\n & + * {\n margin-top: 20px;\n }\n }\n .select {\n display: flex;\n justify-content: space-between;\n .active-right {\n font-family: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n letter-spacing: -0.015em;\n color: ", ";\n }\n & + * {\n margin-top: 50px;\n }\n }\n .button-right {\n text-align: right;\n & + * {\n margin-top: 55px;\n }\n }\n .new-login {\n p {\n font-family: ", ";\n text-align: right;\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n color: ", ";\n span {\n color: ", ";\n }\n }\n }\n }\n &.home-card {\n position: relative;\n .plan {\n text-align: center;\n & + * {\n margin-top: 40px;\n }\n }\n .arrowimage {\n position: absolute;\n top: 50px;\n left: 40px;\n }\n .general-text {\n font-family: ", ";\n font-size: 14px;\n line-height: 19px;\n text-align: center;\n letter-spacing: -0.015em;\n & + * {\n margin-top: 50px;\n }\n }\n .payment-register {\n & + * {\n margin-top: 50px;\n }\n }\n .button-continuar {\n text-align: center;\n & + * {\n margin-top: 35px;\n }\n }\n .continue {\n text-align: center;\n font-family: ", ";\n font-size: 14px;\n line-height: 19px;\n letter-spacing: -0.015em;\n text-decoration-line: underline;\n color: ", ";\n }\n }\n .main-container{\n max-width: 80%;\n max-height: 80%;\n }\n"])), function (_ref) {
19
19
  var panelColor = _ref.panelColor;
20
20
  return panelColor ? panelColor : "linear-gradient(180deg, #E33AA9 0%, #3B1366 100%)";
21
21
  }, _variables.FontFamily.Raleway_700, _variables.FontFamily.AvenirNext, function (_ref2) {
@@ -7,11 +7,13 @@ exports.Loading = void 0;
7
7
 
8
8
  var _styles = require("./styles");
9
9
 
10
+ var _LogoImage = require("../LogoImage");
11
+
10
12
  var _jsxRuntime = require("react/jsx-runtime");
11
13
 
12
14
  var Loading = function Loading() {
13
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
14
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
15
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
16
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoImage.LogoImage, {}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
15
17
  className: "loader",
16
18
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
17
19
  className: "first"
@@ -20,7 +22,7 @@ var Loading = function Loading() {
20
22
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
21
23
  className: "third"
22
24
  })]
23
- })
25
+ })]
24
26
  });
25
27
  };
26
28
 
@@ -13,6 +13,6 @@ 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 justify-content: center;\n align-items: center;\n height: 100%;\n width: 50%;\n .loader {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 50%;\n span {\n display: inline-block;\n border-radius: 100%;\n margin-left: 5px;\n opacity: 1;\n }\n .first {\n background-color: #ff75cf;\n }\n .second {\n background-color: #e33aa9;\n }\n .third {\n background-color: #b12d84;\n }\n span:nth-child(1) {\n width: 16px;\n height: 16px;\n animation: opacitychange 1s ease-in-out infinite;\n }\n span:nth-child(2) {\n width: 18px;\n height: 18px;\n\n animation: opacitychange 1s ease-in-out 0.33s infinite;\n }\n span:nth-child(3) {\n width: 20px;\n height: 20px;\n\n animation: opacitychange 1s ease-in-out 0.66s infinite;\n }\n @keyframes opacitychange {\n 0%,\n 100% {\n opacity: 0;\n }\n 60% {\n opacity: 1;\n }\n }\n }\n"])));
16
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n justify-content: center;\n align-items: center;\n height: 100vh;\n width: 50%;\n position: relative;\n img {\n width: 60%;\n position: absolute;\n bottom: 55%;\n left: 10%;\n }\n .loader {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 10%;\n width: 50%;\n position: absolute;\n bottom: 45%;\n left:10%;\n span {\n display: inline-block;\n border-radius: 100%;\n margin-left: 5px;\n opacity: 1;\n }\n .first {\n background-color: #ff75cf;\n }\n .second {\n background-color: #e33aa9;\n }\n .third {\n background-color: #b12d84;\n }\n span:nth-child(1) {\n width: 16px;\n height: 16px;\n animation: opacitychange 1s ease-in-out infinite;\n }\n span:nth-child(2) {\n width: 18px;\n height: 18px;\n\n animation: opacitychange 1s ease-in-out 0.33s infinite;\n }\n span:nth-child(3) {\n width: 20px;\n height: 20px;\n\n animation: opacitychange 1s ease-in-out 0.66s infinite;\n }\n @keyframes opacitychange {\n 0%,\n 100% {\n opacity: 0;\n }\n 60% {\n opacity: 1;\n }\n }\n }\n"])));
17
17
 
18
18
  exports.Container = Container;
@@ -21,7 +21,6 @@ var LoginPasswordStrength = function LoginPasswordStrength(_ref) {
21
21
  var emptyPassword = _ref.emptyPassword,
22
22
  emptyConfirmPassword = _ref.emptyConfirmPassword,
23
23
  matchPasswords = _ref.matchPasswords,
24
- onChange = _ref.onChange,
25
24
  required = _ref.required;
26
25
 
27
26
  var _useState = (0, _react.useState)(0),
@@ -62,9 +61,6 @@ var LoginPasswordStrength = function LoginPasswordStrength(_ref) {
62
61
  });
63
62
  break;
64
63
 
65
- case "confirmPasswordInput":
66
- break;
67
-
68
64
  default:
69
65
  return;
70
66
  }
@@ -77,8 +73,7 @@ var LoginPasswordStrength = function LoginPasswordStrength(_ref) {
77
73
  inputType: "password",
78
74
  inputId: "newPasswordInput",
79
75
  label: "Ingrese su nueva contraseña",
80
- required: required,
81
- onChange: onChange
76
+ required: required
82
77
  }), emptyPassword && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
83
78
  children: "La contrase\xF1a debe ser minimo de 8 caracteres"
84
79
  })]
@@ -123,8 +118,7 @@ var LoginPasswordStrength = function LoginPasswordStrength(_ref) {
123
118
  inputType: "password",
124
119
  inputId: "confirmPasswordInput",
125
120
  label: "Confirme la nueva contraseña",
126
- required: required,
127
- onChange: onChange
121
+ required: required
128
122
  }), emptyConfirmPassword && !emptyPassword && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
129
123
  children: "Confirme la contrase\xF1a"
130
124
  }), !emptyConfirmPassword && !emptyPassword && !matchPasswords && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
@@ -55,30 +55,25 @@ var RegistrationFirstStep = function RegistrationFirstStep(props) {
55
55
  emptyPhone = _useState10[0],
56
56
  setEmptyPhone = _useState10[1];
57
57
 
58
- var _useState11 = (0, _react.useState)(true),
58
+ var _useState11 = (0, _react.useState)(false),
59
59
  _useState12 = (0, _slicedToArray2.default)(_useState11, 2),
60
60
  emptyCountry = _useState12[0],
61
61
  setEmptyCountry = _useState12[1];
62
62
 
63
63
  var _useState13 = (0, _react.useState)(false),
64
64
  _useState14 = (0, _slicedToArray2.default)(_useState13, 2),
65
- showErrors = _useState14[0],
66
- setShowErrors = _useState14[1];
65
+ invalidEmail = _useState14[0],
66
+ setInvalidEmail = _useState14[1];
67
67
 
68
68
  var _useState15 = (0, _react.useState)(false),
69
69
  _useState16 = (0, _slicedToArray2.default)(_useState15, 2),
70
- regError = _useState16[0],
71
- setRegError = _useState16[1];
70
+ phoneFormatError = _useState16[0],
71
+ setPhoneFormatError = _useState16[1];
72
72
 
73
73
  var _useState17 = (0, _react.useState)(false),
74
74
  _useState18 = (0, _slicedToArray2.default)(_useState17, 2),
75
- phoneFormatError = _useState18[0],
76
- setPhoneFormatError = _useState18[1];
77
-
78
- var _useState19 = (0, _react.useState)(false),
79
- _useState20 = (0, _slicedToArray2.default)(_useState19, 2),
80
- emailFormatError = _useState20[0],
81
- setEmailFormatError = _useState20[1];
75
+ regError = _useState18[0],
76
+ setRegError = _useState18[1];
82
77
 
83
78
  (0, _react.useEffect)(function () {
84
79
  JSON.parse(sessionStorage.getItem("nuevoRegistro")).name === "" && sessionStorage.removeItem("registrationError");
@@ -96,79 +91,54 @@ var RegistrationFirstStep = function RegistrationFirstStep(props) {
96
91
  sessionStorage.getItem("resetPasswordProcess") && sessionStorage.getItem("resetPasswordProcess");
97
92
  }, []);
98
93
 
99
- var updateInfo = function updateInfo(e, newValue) {
100
- var nuevoUsuario = JSON.parse(sessionStorage.getItem("nuevoRegistro"));
94
+ var validate = function validate(evt) {
95
+ var valid = true;
96
+ evt.preventDefault();
97
+ var name = document.querySelector("#nameInput").value;
98
+ var lastName = document.querySelector("#lastNameInput").value;
99
+ var email = document.querySelector("#emailInput").value;
100
+ var job = document.querySelector("#jobInput").value;
101
+ var phone = document.querySelector("#phoneInput").value;
102
+ var country = document.querySelector("#countrySelect").value;
103
+ name === "" ? setEmptyName(true) : setEmptyName(false);
104
+ lastName === "" ? setEmptyLastName(true) : setEmptyLastName(false);
105
+ email === "" ? setEmptyEmail(true) : setEmptyEmail(false);
106
+ job === "" ? setEmptyJob(true) : setEmptyJob(false);
107
+ phone === "" ? setEmptyPhone(true) : setEmptyPhone(false);
108
+ !/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(email) ? setInvalidEmail(true) : setInvalidEmail(false);
109
+ var invalidPhone = true;
110
+ country === "value" ? setEmptyCountry(true) : setEmptyCountry(false);
111
+ Array.from(phone).forEach(function (digit, i) {
112
+ phone.charCodeAt(i) < 48 ? setPhoneFormatError(true) : invalidPhone = false;
113
+ phone.charCodeAt(i) > 57 ? setPhoneFormatError(true) : invalidPhone = false;
114
+ });
101
115
 
102
- switch (e.target.id) {
103
- case "nameInput":
104
- nuevoUsuario.name = newValue;
105
- newValue === "" ? setEmptyName(true) : setEmptyName(false);
106
- break;
107
-
108
- case "lastNameInput":
109
- nuevoUsuario.lastName = newValue;
110
- newValue === "" ? setEmptyLastName(true) : setEmptyLastName(false);
111
- break;
112
-
113
- case "emailInput":
114
- nuevoUsuario.email = newValue;
115
- newValue === "" ? setEmptyEmail(true) : setEmptyEmail(false);
116
-
117
- if (!/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(newValue)) {
118
- setEmailFormatError(true);
119
- } else {
120
- setEmailFormatError(false);
121
- }
122
-
123
- break;
124
-
125
- case "jobInput":
126
- nuevoUsuario.position = newValue;
127
- newValue === "" ? setEmptyJob(true) : setEmptyJob(false);
128
- break;
129
-
130
- case "phoneInput":
131
- Array.from(newValue).forEach(function (digit, i) {
132
- newValue.charCodeAt(i) < 48 ? setPhoneFormatError(true) : setPhoneFormatError(false);
133
- newValue.charCodeAt(i) > 57 ? setPhoneFormatError(true) : setPhoneFormatError(false);
134
- });
135
- nuevoUsuario.phone = "".concat(JSON.parse(sessionStorage.getItem("countryCodeSelect"))).concat(newValue);
136
- newValue === "" ? setEmptyPhone(true) : setEmptyPhone(false);
137
- break;
138
-
139
- case "countrySelect":
140
- nuevoUsuario.country = newValue;
141
- newValue === "" || newValue === "Selecciona tu país" ? setEmptyCountry(true) : setEmptyCountry(false);
142
- break;
143
-
144
- case "countryCodeSelect":
145
- sessionStorage.setItem("countryCode", JSON.stringify(newValue));
146
- nuevoUsuario.phone = "".concat(JSON.parse(sessionStorage.getItem("countryCode"))).concat(document.querySelector("#phoneInput").value);
147
- break;
148
-
149
- default:
150
- return;
151
- }
116
+ if (name === "" || lastName === "" || email === "" || job === "" || phone === "" || country === "value" || !/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(email) || invalidPhone) {
117
+ valid = false;
118
+ } else valid = true;
152
119
 
153
- sessionStorage.setItem("nuevoRegistro", JSON.stringify(nuevoUsuario));
120
+ return valid;
154
121
  };
155
122
 
156
- var validateForm = function validateForm(evt) {
157
- var valid = true;
123
+ var validateForm = function validateForm(evt, valid) {
124
+ var countryCode = document.querySelector("#countryCodeSelect").value;
158
125
  evt.preventDefault();
159
- setShowErrors(true);
160
- emptyName && (valid = false);
161
- emptyLastName && (valid = false);
162
- emptyEmail && (valid = false);
163
- emptyJob && (valid = false);
164
- emptyPhone && (valid = false);
165
- emptyCountry && (valid = false);
166
- phoneFormatError && (valid = false);
167
- emailFormatError && (valid = false);
168
- !regError && valid && props.setPaso(function (paso) {
169
- return props.paso + 1;
170
- });
171
- regError && valid && props.setPaso(4);
126
+ var nuevoUsuario = JSON.parse(sessionStorage.getItem("nuevoRegistro"));
127
+
128
+ if (valid) {
129
+ sessionStorage.setItem("countryCode", JSON.stringify(countryCode));
130
+ nuevoUsuario.name = name;
131
+ nuevoUsuario.lastName = lastName;
132
+ nuevoUsuario.email = email;
133
+ nuevoUsuario.position = job;
134
+ nuevoUsuario.phone = "".concat(JSON.parse(sessionStorage.getItem("countryCode"))).concat(phone);
135
+ nuevoUsuario.country = country;
136
+ sessionStorage.setItem("nuevoRegistro", JSON.stringify(nuevoUsuario));
137
+ !regError && valid && props.setPaso(function (paso) {
138
+ return props.paso + 1;
139
+ });
140
+ regError && valid && props.setPaso(4);
141
+ }
172
142
  };
173
143
 
174
144
  var loginRight = [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoImage.LogoImage, {}, "1"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -187,54 +157,37 @@ var RegistrationFirstStep = function RegistrationFirstStep(props) {
187
157
  inputId: "nameInput",
188
158
  label: "Nombre",
189
159
  inputPlaceHolder: "Nombre",
190
- defaultValue: JSON.parse(sessionStorage.getItem("nuevoRegistro")).name,
191
- required: "required",
192
- onInput: function onInput(e) {
193
- return updateInfo(e, e.target.value);
194
- }
160
+ required: "required"
195
161
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
196
162
  inputType: "text",
197
163
  inputId: "lastNameInput",
198
164
  label: "Apellido",
199
165
  inputPlaceHolder: "Apellido",
200
- defaultValue: JSON.parse(sessionStorage.getItem("nuevoRegistro")).lastName,
201
- required: "required",
202
- onChange: function onChange(e) {
203
- return updateInfo(e, e.target.value);
204
- }
166
+ required: "required"
205
167
  })]
206
- }), emptyName && showErrors && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
168
+ }), emptyName && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
207
169
  children: "Ingrese su nombre"
208
- }), emptyLastName && showErrors && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
170
+ }), emptyLastName && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
209
171
  children: "Ingrese sus apellidos"
210
172
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
211
173
  inputType: "text",
212
174
  inputId: "emailInput",
213
175
  label: "Correo electrónico",
214
176
  inputPlaceHolder: "username@contentoh.com",
215
- required: "required",
216
- defaultValue: JSON.parse(sessionStorage.getItem("nuevoRegistro")).email,
217
- id: "emailInput",
218
- onChange: function onChange(e) {
219
- return updateInfo(e, e.target.value);
220
- }
177
+ required: "required"
221
178
  }), regError && JSON.parse(sessionStorage.getItem("registrationError")) === "emailExists" && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
222
179
  children: "Ya existe una cuenta asociada a este correo"
223
- }), emptyEmail && showErrors && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
180
+ }), emptyEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
224
181
  children: "Ingrese su email"
225
- }), emailFormatError && showErrors && !emptyEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
182
+ }), invalidEmail && !emptyEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
226
183
  children: "Ingrese un correo v\xE1lido"
227
184
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
228
185
  inputType: "text",
229
186
  inputId: "jobInput",
230
187
  label: "Puesto laboral",
231
188
  inputPlaceHolder: "Puesto dentro de la empresa",
232
- defaultValue: JSON.parse(sessionStorage.getItem("nuevoRegistro")).position,
233
- required: "required",
234
- onChange: function onChange(e) {
235
- return updateInfo(e, e.target.value);
236
- }
237
- }), emptyJob && showErrors && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
189
+ required: "required"
190
+ }), emptyJob && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
238
191
  children: "Ingrese su puesto"
239
192
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
240
193
  text: "Teléfono",
@@ -268,18 +221,13 @@ var RegistrationFirstStep = function RegistrationFirstStep(props) {
268
221
  inputId: "phoneInput",
269
222
  inputType: "text",
270
223
  inputPlaceholder: "Teléfono",
271
- defaultValue: //phone without countryCode
272
- JSON.parse(sessionStorage.getItem("nuevoRegistro")).phone.substring(JSON.parse(sessionStorage.getItem("countryCode")).length, JSON.parse(sessionStorage.getItem("nuevoRegistro")).phone.length - 1),
273
- required: "required",
274
- onChange: function onChange(e) {
275
- return updateInfo(e, e.target.value);
276
- }
224
+ required: "required"
277
225
  })]
278
226
  }), regError && JSON.parse(sessionStorage.getItem("registrationError")) === "phoneFormatError" && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
279
227
  children: "Introduzca un n\xFAmero v\xE1lido"
280
- }), emptyPhone && showErrors && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
228
+ }), emptyPhone && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
281
229
  children: "Ingrese su n\xFAmero de tel\xE9fono"
282
- }), phoneFormatError && showErrors && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
230
+ }), phoneFormatError && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
283
231
  children: "Introduzca un n\xFAmero valido ( Solo numeros )"
284
232
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
285
233
  text: "País",
@@ -288,40 +236,36 @@ var RegistrationFirstStep = function RegistrationFirstStep(props) {
288
236
  name: "select",
289
237
  className: "country-options",
290
238
  id: "countrySelect",
291
- defaultValue: JSON.parse(sessionStorage.getItem("nuevoRegistro")).country,
292
- onChange: function onChange(e) {
293
- return updateInfo(e, e.target.value);
294
- },
295
239
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
296
- value: "value1",
240
+ value: "value",
297
241
  selected: true,
298
242
  children: "Selecciona tu pa\xEDs"
299
243
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
300
- value: "value2",
244
+ value: "Argentina",
301
245
  children: "Argentina"
302
246
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
303
- value: "value3",
247
+ value: "Colombia",
304
248
  children: "Colombia"
305
249
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
306
- value: "value2",
250
+ value: "Ecuador",
307
251
  children: "Ecuador"
308
252
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
309
- value: "value3",
253
+ value: "El Salvador",
310
254
  children: "El Salvador"
311
255
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
312
- value: "value2",
256
+ value: "Honduras",
313
257
  children: "Honduras"
314
258
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
315
- value: "value3",
259
+ value: "M\xE9xico",
316
260
  children: "M\xE9xico"
317
261
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
318
- value: "value2",
262
+ value: "Panam\xE1",
319
263
  children: "Panam\xE1"
320
264
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
321
- value: "value3",
265
+ value: "Per\xFA",
322
266
  children: "Per\xFA"
323
267
  })]
324
- }), emptyEmail && showErrors && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
268
+ }), emptyCountry && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
325
269
  children: "Seleccione su pa\xEDs"
326
270
  })]
327
271
  }, "3"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -330,7 +274,8 @@ var RegistrationFirstStep = function RegistrationFirstStep(props) {
330
274
  buttonType: "general-default-button",
331
275
  label: "Enviar",
332
276
  onClick: function onClick(e) {
333
- return validateForm(e);
277
+ var flag = validate(e);
278
+ validateForm(e, flag);
334
279
  }
335
280
  })
336
281
  }, "4"), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -357,12 +302,10 @@ var RegistrationFirstStep = function RegistrationFirstStep(props) {
357
302
  })
358
303
  }, "7")];
359
304
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
360
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
361
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GradientPanel.GradientPanel, {
362
- componentsArray: loginRight,
363
- panelType: "home-login",
364
- panelColor: _variables.GlobalColors.white
365
- })
305
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GradientPanel.GradientPanel, {
306
+ componentsArray: loginRight,
307
+ panelType: "home-login",
308
+ panelColor: _variables.GlobalColors.white
366
309
  })
367
310
  });
368
311
  };
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
15
15
 
16
16
  var _templateObject;
17
17
 
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 50%;\n height: 100vh;\n .user {\n .name-registration-user {\n display: flex;\n justify-content: space-between;\n input {\n width: 160px;\n }\n }\n .input-name-header {\n margin-bottom: 4px;\n margin-top: 12px;\n }\n .phone-registration-user {\n display: flex;\n justify-content: space-between;\n .phone-options {\n width: 80px;\n }\n input {\n width: 100%;\n }\n & + * {\n margin-top: 10px;\n }\n }\n .country-options,\n .phone-options {\n width: 100%;\n border: 1px solid ", ";\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n font-size: 12px;\n line-height: 15px;\n padding: 10px;\n outline: none;\n border-radius: 2px;\n resize: none;\n &:focus {\n border: 1px solid ", ";\n }\n }\n }\n .button-end {\n text-align: end;\n .general-default-button {\n width: 160px;\n }\n & + * {\n margin-top: 10px;\n }\n }\n .progress-bar {\n width: 100%;\n height: 8px;\n display: flex;\n justify-content: space-between;\n .progress-bar-first-step {\n width: 33.33%;\n background-color: rgb(196, 196, 196);\n }\n .progress-bar-registration {\n background-color: rgb(226, 226, 226);\n width: 66.66%;\n }\n }\n .date-header {\n .new-login {\n & + * {\n margin-top: 20px;\n }\n }\n }\n"])), _variables.GlobalColors.s2, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4, _variables.GlobalColors.magenta_s2);
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 50%;\n height: 100vh;\n .user {\n .name-registration-user {\n display: flex;\n justify-content: space-between;\n input {\n width: 160px;\n }\n }\n .input-name-header {\n margin-bottom: 4px;\n margin-top: 12px;\n }\n .phone-registration-user {\n display: flex;\n justify-content: space-between;\n .phone-options {\n width: 80px;\n }\n input {\n width: 100%;\n }\n & + * {\n margin-top: 10px;\n }\n }\n .country-options,\n .phone-options {\n width: 100%;\n border: 1px solid ", ";\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n font-size: 12px;\n line-height: 15px;\n padding: 10px;\n outline: none;\n border-radius: 2px;\n resize: none;\n &:focus {\n border: 1px solid ", ";\n }\n }\n }\n .button-end {\n text-align: end;\n .general-default-button {\n width: 160px;\n }\n & + * {\n margin-top: 10px;\n }\n }\n .progress-bar {\n width: 100%;\n height: 8px;\n display: flex;\n justify-content: space-between;\n .progress-bar-first-step {\n width: 33.33%;\n background-color: rgb(196, 196, 196);\n }\n .progress-bar-registration {\n background-color: rgb(226, 226, 226);\n width: 66.66%;\n }\n }\n .date-header {\n .new-login {\n & + * {\n margin-top: 20px;\n }\n }\n }\n .pre-registro {\n cursor: pointer;\n }\n"])), _variables.GlobalColors.s2, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4, _variables.GlobalColors.magenta_s2);
19
19
 
20
20
  exports.Container = Container;