contentoh-components-library 21.0.61 → 21.0.64
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.
- package/dist/components/molecules/LoginPasswordStrength/index.js +3 -3
- package/dist/components/molecules/LoginPasswordStrength/styles.js +1 -1
- package/dist/components/molecules/RegistrationSecondStep/index.js +9 -5
- package/dist/components/molecules/RegistrationSecondStep/styles.js +1 -1
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +6 -5
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/styles.js +1 -1
- package/dist/components/organisms/ChangePassword/index.js +5 -4
- package/package.json +1 -1
- package/src/components/molecules/LoginPasswordStrength/index.js +3 -3
- package/src/components/molecules/LoginPasswordStrength/styles.js +3 -2
- package/src/components/molecules/RegistrationSecondStep/index.js +8 -2
- package/src/components/molecules/RegistrationSecondStep/styles.js +6 -1
- package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +1 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/styles.js +3 -0
- package/src/components/organisms/ChangePassword/index.js +14 -13
|
@@ -77,7 +77,7 @@ var LoginPasswordStrength = function LoginPasswordStrength(_ref) {
|
|
|
77
77
|
}), emptyPassword && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
78
78
|
children: "La contrase\xF1a debe ser minimo de 8 caracteres"
|
|
79
79
|
})]
|
|
80
|
-
}
|
|
80
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
81
81
|
className: "divPasswordStrength",
|
|
82
82
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ItemPasswordStrength, {
|
|
83
83
|
paso: 1,
|
|
@@ -112,7 +112,7 @@ var LoginPasswordStrength = function LoginPasswordStrength(_ref) {
|
|
|
112
112
|
children: "Fuerte"
|
|
113
113
|
})]
|
|
114
114
|
})]
|
|
115
|
-
}
|
|
115
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
116
116
|
className: "user",
|
|
117
117
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
118
118
|
inputType: "password",
|
|
@@ -124,7 +124,7 @@ var LoginPasswordStrength = function LoginPasswordStrength(_ref) {
|
|
|
124
124
|
}), !emptyConfirmPassword && !emptyPassword && !matchPasswords && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
125
125
|
children: "La contrase\xF1a no coincide"
|
|
126
126
|
})]
|
|
127
|
-
}
|
|
127
|
+
})]
|
|
128
128
|
});
|
|
129
129
|
};
|
|
130
130
|
|
|
@@ -15,7 +15,7 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject, _templateObject2, _templateObject3;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n .divPasswordStrength {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: 30px;\n & + * {\n margin-top: 40px;\n }\n }\n label {\n color: red;\n margin-top: 3px;\n margin-left: 15px;\n font-family: ", ";\n font-size: 11px;\n }\n & + *{\n margin-top: 20px;\n }\n"])), _variables.FontFamily.Raleway_700);
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n margin-bottom: 15px;\n .divPasswordStrength {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: 30px;\n & + * {\n margin-top: 40px;\n }\n }\n label {\n color: red;\n margin-top: 3px;\n margin-left: 15px;\n font-family: ", ";\n font-size: 11px;\n }\n & + * {\n margin-top: 20px;\n }\n"])), _variables.FontFamily.Raleway_700);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
21
21
|
|
|
@@ -58,10 +58,11 @@ var RegistrationSecondStep = function RegistrationSecondStep(props) {
|
|
|
58
58
|
var validateForm = function validateForm(evt, valid) {
|
|
59
59
|
evt.preventDefault();
|
|
60
60
|
var password = document.querySelector("#newPasswordInput").value;
|
|
61
|
+
!termsCheck && (valid = false);
|
|
62
|
+
!privacyCheck && (valid = false);
|
|
61
63
|
|
|
62
64
|
if (valid) {
|
|
63
|
-
|
|
64
|
-
!privacyCheck && (valid = false);
|
|
65
|
+
console.log(valid);
|
|
65
66
|
nuevoUsuario.password = password;
|
|
66
67
|
sessionStorage.setItem("nuevoRegistro", JSON.stringify(nuevoUsuario));
|
|
67
68
|
valid && props.setPaso(3);
|
|
@@ -125,16 +126,19 @@ var RegistrationSecondStep = function RegistrationSecondStep(props) {
|
|
|
125
126
|
text: "Todos los datos estan protegidos.",
|
|
126
127
|
headerType: "date-header"
|
|
127
128
|
})]
|
|
128
|
-
}, "7"), /*#__PURE__*/(0, _jsxRuntime.
|
|
129
|
+
}, "7"), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
129
130
|
className: "button-end",
|
|
130
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
131
|
+
children: [(!termsCheck || !privacyCheck) && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
132
|
+
className: "terms",
|
|
133
|
+
children: "*Aceptar los t\xE9rminos y condiciones y el aviso de privacidad"
|
|
134
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
131
135
|
buttonType: "general-default-button",
|
|
132
136
|
label: "Enviar",
|
|
133
137
|
onClick: function onClick(e) {
|
|
134
138
|
var flag = validate(e);
|
|
135
139
|
validateForm(e, flag);
|
|
136
140
|
}
|
|
137
|
-
})
|
|
141
|
+
})]
|
|
138
142
|
}, "8"), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
139
143
|
className: "progress-bar",
|
|
140
144
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -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 .button-end {\n
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 50%;\n height: 100vh;\n .button-end {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n .general-default-button {\n width: 160px;\n }\n .terms{\n margin-bottom: 5px;\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-check {\n width: 33.33%;\n background-color: ", ";\n }\n .progress-bar-second-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: 33.33%;\n }\n }\n .date-header {\n margin-left: 33.33%;\n }\n .checkbox-terms {\n display: flex;\n margin-bottom: 5px;\n input {\n cursor: pointer;\n & + * {\n margin-left: 15px;\n }\n }\n }\n .label-terms {\n color: rgb(129, 115, 147);\n font-size: 13px;\n line-height: 24px;\n font-weight: 700;\n cursor: pointer;\n margin-left: 25px;\n & + * {\n margin-top: 5px;\n }\n }\n"])), _variables.GlobalColors.exported);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -96,22 +96,23 @@ var VerificationCodeResetPasswordLogin = function VerificationCodeResetPasswordL
|
|
|
96
96
|
sessionStorage.setItem("email", JSON.stringify(email));
|
|
97
97
|
sessionStorage.setItem("resetPasswordProcess", JSON.stringify("true"));
|
|
98
98
|
props.setPaso(5);
|
|
99
|
+
setEmptyVerificationCode(false);
|
|
99
100
|
setResend(true);
|
|
100
|
-
_context.next =
|
|
101
|
+
_context.next = 16;
|
|
101
102
|
break;
|
|
102
103
|
|
|
103
|
-
case
|
|
104
|
-
_context.prev =
|
|
104
|
+
case 12:
|
|
105
|
+
_context.prev = 12;
|
|
105
106
|
_context.t0 = _context["catch"](2);
|
|
106
107
|
setAwsError(_context.t0.code);
|
|
107
108
|
console.log(_context.t0.message);
|
|
108
109
|
|
|
109
|
-
case
|
|
110
|
+
case 16:
|
|
110
111
|
case "end":
|
|
111
112
|
return _context.stop();
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
|
-
}, _callee, null, [[2,
|
|
115
|
+
}, _callee, null, [[2, 12]]);
|
|
115
116
|
}));
|
|
116
117
|
|
|
117
118
|
return function validateResend(_x) {
|
|
@@ -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 height: 100vh;\n width: 50%;\n align-items: center;\n justify-content: center;\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);
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n height: 100vh;\n width: 50%;\n align-items: center;\n justify-content: center;\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 .resendTrue{\n color: ", ";\n }\n"])), _variables.GlobalColors.secondary_magenta, _variables.FontFamily.Raleway, _variables.GlobalColors.magenta_s2, _variables.FontFamily.AvenirNext, _variables.GlobalColors.exported);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -67,16 +67,17 @@ var ChangePassword = function ChangePassword(props) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
valid = true;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
|
|
71
|
+
if (password.length < 8 || confirmPassword === "" || password !== confirmPassword) {
|
|
72
|
+
valid = false;
|
|
73
|
+
}
|
|
73
74
|
|
|
74
75
|
if (valid) {
|
|
75
76
|
sessionStorage.setItem("newPassword", JSON.stringify(password));
|
|
76
77
|
!sessionStorage.getItem("resetPasswordProcess") ? props.setPaso(9) : props.setPaso(11);
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
case
|
|
80
|
+
case 9:
|
|
80
81
|
case "end":
|
|
81
82
|
return _context.stop();
|
|
82
83
|
}
|
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@ export const LoginPasswordStrength = ({
|
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
48
|
<Container>
|
|
49
|
-
<div className="user"
|
|
49
|
+
<div className="user">
|
|
50
50
|
<TagAndInput
|
|
51
51
|
inputType={"password"}
|
|
52
52
|
inputId={"newPasswordInput"}
|
|
@@ -57,7 +57,7 @@ export const LoginPasswordStrength = ({
|
|
|
57
57
|
<label>La contraseña debe ser minimo de 8 caracteres</label>
|
|
58
58
|
)}
|
|
59
59
|
</div>
|
|
60
|
-
<div className="divPasswordStrength"
|
|
60
|
+
<div className="divPasswordStrength">
|
|
61
61
|
<ItemPasswordStrength paso={1}>
|
|
62
62
|
<Password level={1} passwordStrength={passwordStrength} />
|
|
63
63
|
{passwordStrength === 1 && <p>Baja</p>}
|
|
@@ -75,7 +75,7 @@ export const LoginPasswordStrength = ({
|
|
|
75
75
|
{passwordStrength === 4 && <p>Fuerte</p>}
|
|
76
76
|
</ItemPasswordStrength>
|
|
77
77
|
</div>
|
|
78
|
-
<div className="user"
|
|
78
|
+
<div className="user">
|
|
79
79
|
<TagAndInput
|
|
80
80
|
inputType={"password"}
|
|
81
81
|
inputId={"confirmPasswordInput"}
|
|
@@ -3,6 +3,7 @@ import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
|
3
3
|
|
|
4
4
|
export const Container = styled.div`
|
|
5
5
|
width: 100%;
|
|
6
|
+
margin-bottom: 15px;
|
|
6
7
|
.divPasswordStrength {
|
|
7
8
|
width: 100%;
|
|
8
9
|
display: flex;
|
|
@@ -20,7 +21,7 @@ export const Container = styled.div`
|
|
|
20
21
|
font-family: ${FontFamily.Raleway_700};
|
|
21
22
|
font-size: 11px;
|
|
22
23
|
}
|
|
23
|
-
& + *{
|
|
24
|
+
& + * {
|
|
24
25
|
margin-top: 20px;
|
|
25
26
|
}
|
|
26
27
|
`;
|
|
@@ -87,4 +88,4 @@ export const ItemPasswordStrength = styled.div`
|
|
|
87
88
|
}
|
|
88
89
|
}};
|
|
89
90
|
}
|
|
90
|
-
`;
|
|
91
|
+
`;
|
|
@@ -18,9 +18,10 @@ export const RegistrationSecondStep = (props) => {
|
|
|
18
18
|
const validateForm = (evt, valid) => {
|
|
19
19
|
evt.preventDefault();
|
|
20
20
|
const password = document.querySelector("#newPasswordInput").value;
|
|
21
|
+
!termsCheck && (valid = false);
|
|
22
|
+
!privacyCheck && (valid = false);
|
|
21
23
|
if (valid) {
|
|
22
|
-
|
|
23
|
-
!privacyCheck && (valid = false);
|
|
24
|
+
console.log(valid)
|
|
24
25
|
nuevoUsuario.password = password;
|
|
25
26
|
sessionStorage.setItem("nuevoRegistro", JSON.stringify(nuevoUsuario));
|
|
26
27
|
valid && props.setPaso(3);
|
|
@@ -92,6 +93,11 @@ export const RegistrationSecondStep = (props) => {
|
|
|
92
93
|
/>
|
|
93
94
|
</div>,
|
|
94
95
|
<div className="button-end" key="8">
|
|
96
|
+
{(!termsCheck || !privacyCheck) && (
|
|
97
|
+
<label className="terms">
|
|
98
|
+
*Aceptar los términos y condiciones y el aviso de privacidad
|
|
99
|
+
</label>
|
|
100
|
+
)}
|
|
95
101
|
<Button
|
|
96
102
|
buttonType={"general-default-button"}
|
|
97
103
|
label={"Enviar"}
|
|
@@ -6,10 +6,15 @@ export const Container = styled.div`
|
|
|
6
6
|
width: 50%;
|
|
7
7
|
height: 100vh;
|
|
8
8
|
.button-end {
|
|
9
|
-
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
align-items: flex-end;
|
|
10
12
|
.general-default-button {
|
|
11
13
|
width: 160px;
|
|
12
14
|
}
|
|
15
|
+
.terms{
|
|
16
|
+
margin-bottom: 5px;
|
|
17
|
+
}
|
|
13
18
|
& + * {
|
|
14
19
|
margin-top: 10px;
|
|
15
20
|
}
|
|
@@ -54,6 +54,7 @@ export const VerificationCodeResetPasswordLogin = (props) => {
|
|
|
54
54
|
sessionStorage.setItem("email", JSON.stringify(email));
|
|
55
55
|
sessionStorage.setItem("resetPasswordProcess", JSON.stringify("true"));
|
|
56
56
|
props.setPaso(5);
|
|
57
|
+
setEmptyVerificationCode(false);
|
|
57
58
|
setResend(true);
|
|
58
59
|
} catch (err) {
|
|
59
60
|
setAwsError(err.code);
|
|
@@ -8,7 +8,6 @@ import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
|
8
8
|
import { GradientPanel } from "../../atoms/GradientPanel";
|
|
9
9
|
|
|
10
10
|
export const ChangePassword = (props) => {
|
|
11
|
-
|
|
12
11
|
const [emptyPassword, setEmptyPassword] = useState(false);
|
|
13
12
|
const [emptyConfirmPassword, setEmptyConfirmPassword] = useState(false);
|
|
14
13
|
const [matchPasswords, setMatchPasswords] = useState(true);
|
|
@@ -17,9 +16,7 @@ export const ChangePassword = (props) => {
|
|
|
17
16
|
e.preventDefault();
|
|
18
17
|
let password = document.querySelector("#newPasswordInput").value;
|
|
19
18
|
password.length < 8 ? setEmptyPassword(true) : setEmptyPassword(false);
|
|
20
|
-
let confirmPassword = document.querySelector(
|
|
21
|
-
"#confirmPasswordInput"
|
|
22
|
-
).value;
|
|
19
|
+
let confirmPassword = document.querySelector("#confirmPasswordInput").value;
|
|
23
20
|
confirmPassword === ""
|
|
24
21
|
? setEmptyConfirmPassword(true)
|
|
25
22
|
: setEmptyConfirmPassword(false);
|
|
@@ -29,14 +26,18 @@ export const ChangePassword = (props) => {
|
|
|
29
26
|
setMatchPasswords(false);
|
|
30
27
|
}
|
|
31
28
|
let valid = true;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
if (
|
|
30
|
+
password.length < 8 ||
|
|
31
|
+
confirmPassword === "" ||
|
|
32
|
+
password !== confirmPassword
|
|
33
|
+
) {
|
|
34
|
+
valid = false;
|
|
35
|
+
}
|
|
35
36
|
if (valid) {
|
|
36
37
|
sessionStorage.setItem("newPassword", JSON.stringify(password));
|
|
37
38
|
!sessionStorage.getItem("resetPasswordProcess")
|
|
38
39
|
? props.setPaso(9)
|
|
39
|
-
|
|
40
|
+
: props.setPaso(11);
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
43
|
|
|
@@ -66,11 +67,11 @@ export const ChangePassword = (props) => {
|
|
|
66
67
|
];
|
|
67
68
|
return (
|
|
68
69
|
<Container>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
<GradientPanel
|
|
71
|
+
panelColor={GlobalColors.white}
|
|
72
|
+
componentsArray={loginRight}
|
|
73
|
+
panelType={"home-login"}
|
|
74
|
+
></GradientPanel>
|
|
74
75
|
</Container>
|
|
75
76
|
);
|
|
76
77
|
};
|