@ttoss/react-auth 2.4.0 → 2.4.2
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/esm/index.js +9 -3
- package/dist/index.d.ts +2 -1
- package/i18n/compiled/en.json +6 -0
- package/i18n/lang/en.json +3 -0
- package/package.json +10 -10
package/dist/esm/index.js
CHANGED
|
@@ -750,7 +750,13 @@ var AuthSignUp = props => {
|
|
|
750
750
|
"value": "Passwords are not the same"
|
|
751
751
|
}]
|
|
752
752
|
})),
|
|
753
|
-
signUpTerms:
|
|
753
|
+
signUpTerms: props.signUpTerms?.isRequired ? yup5.boolean().required(intl.formatMessage({
|
|
754
|
+
id: "qnQYqN",
|
|
755
|
+
defaultMessage: [{
|
|
756
|
+
"type": 0,
|
|
757
|
+
"value": "You must accept the terms and conditions"
|
|
758
|
+
}]
|
|
759
|
+
})) : yup5.boolean()
|
|
754
760
|
});
|
|
755
761
|
}, [intl, props.signUpTerms?.isRequired]);
|
|
756
762
|
const signUpTermsLabel = React5.useMemo(() => {
|
|
@@ -764,8 +770,8 @@ var AuthSignUp = props => {
|
|
|
764
770
|
"value": "By signing up, you agree to the following Terms and Conditions."
|
|
765
771
|
}]
|
|
766
772
|
});
|
|
767
|
-
const termsLinks = props.signUpTerms.
|
|
768
|
-
const finalPunctuation = index ===
|
|
773
|
+
const termsLinks = props.signUpTerms.terms.map((term, index, terms) => {
|
|
774
|
+
const finalPunctuation = index === terms.length - 1 ? "." : ", ";
|
|
769
775
|
return /* @__PURE__ */jsxs5(React5.Fragment, {
|
|
770
776
|
children: [/* @__PURE__ */jsx8(Link3, {
|
|
771
777
|
href: term.url,
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ type OnSignUpInput = {
|
|
|
15
15
|
email: string;
|
|
16
16
|
password: string;
|
|
17
17
|
confirmPassword: string;
|
|
18
|
+
signUpTerms?: boolean;
|
|
18
19
|
};
|
|
19
20
|
type OnSignUp = (input: OnSignUpInput) => void;
|
|
20
21
|
type OnConfirmSignUp = (input: {
|
|
@@ -35,7 +36,7 @@ type AuthSignUpProps = {
|
|
|
35
36
|
onReturnToSignIn: () => void;
|
|
36
37
|
signUpTerms?: {
|
|
37
38
|
isRequired: boolean;
|
|
38
|
-
|
|
39
|
+
terms: {
|
|
39
40
|
label: string;
|
|
40
41
|
url: string;
|
|
41
42
|
}[];
|
package/i18n/compiled/en.json
CHANGED
package/i18n/lang/en.json
CHANGED
|
@@ -122,6 +122,9 @@
|
|
|
122
122
|
"defaultMessage": "Sign up",
|
|
123
123
|
"description": "Title on sign up."
|
|
124
124
|
},
|
|
125
|
+
"qnQYqN": {
|
|
126
|
+
"defaultMessage": "You must accept the terms and conditions"
|
|
127
|
+
},
|
|
125
128
|
"D1C6fR": {
|
|
126
129
|
"defaultMessage": "Field must be at least {min} characters",
|
|
127
130
|
"description": "Min length field",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/react-auth",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"description": "ttoss authentication module for React apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@xstate/react": "^3.2.2",
|
|
29
29
|
"xstate": "^4.38.3",
|
|
30
|
-
"@ttoss/forms": "^0.
|
|
30
|
+
"@ttoss/forms": "^0.28.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"aws-amplify": "^6.0.0",
|
|
34
34
|
"react": ">=16.8.0",
|
|
35
|
-
"@ttoss/
|
|
36
|
-
"@ttoss/react-notifications": "^1.24.
|
|
37
|
-
"@ttoss/
|
|
35
|
+
"@ttoss/ui": "^5.1.0",
|
|
36
|
+
"@ttoss/react-notifications": "^1.24.66",
|
|
37
|
+
"@ttoss/react-i18n": "^2.0.9"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@jest/globals": "^29.7.0",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"jest": "^29.7.0",
|
|
44
44
|
"react": "^19.0.0",
|
|
45
45
|
"tsup": "^8.3.5",
|
|
46
|
-
"@ttoss/config": "^1.35.2",
|
|
47
46
|
"@ttoss/cloud-auth": "^0.12.27",
|
|
48
|
-
"@ttoss/
|
|
47
|
+
"@ttoss/config": "^1.35.2",
|
|
49
48
|
"@ttoss/react-i18n": "^2.0.9",
|
|
50
|
-
"@ttoss/react-notifications": "^1.24.
|
|
51
|
-
"@ttoss/
|
|
52
|
-
"@ttoss/ui": "^5.0
|
|
49
|
+
"@ttoss/react-notifications": "^1.24.66",
|
|
50
|
+
"@ttoss/i18n-cli": "^0.7.26",
|
|
51
|
+
"@ttoss/ui": "^5.1.0",
|
|
52
|
+
"@ttoss/test-utils": "^2.1.22"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
55
55
|
"React",
|