@oxyhq/services 5.13.12 → 5.13.15
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/lib/commonjs/core/OxyServices.js +159 -0
- package/lib/commonjs/core/OxyServices.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +1 -47
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +239 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/utils/apiUtils.js +0 -14
- package/lib/commonjs/utils/apiUtils.js.map +1 -1
- package/lib/commonjs/utils/asyncUtils.js +0 -20
- package/lib/commonjs/utils/asyncUtils.js.map +1 -1
- package/lib/module/core/OxyServices.js +159 -0
- package/lib/module/core/OxyServices.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +1 -47
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/navigation/types.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +241 -3
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/utils/apiUtils.js +0 -13
- package/lib/module/utils/apiUtils.js.map +1 -1
- package/lib/module/utils/asyncUtils.js +0 -20
- package/lib/module/utils/asyncUtils.js.map +1 -1
- package/lib/typescript/core/OxyServices.d.ts +65 -1
- package/lib/typescript/core/OxyServices.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +26 -0
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +0 -6
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +0 -1
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/utils/apiUtils.d.ts +0 -7
- package/lib/typescript/utils/apiUtils.d.ts.map +1 -1
- package/lib/typescript/utils/asyncUtils.d.ts +0 -11
- package/lib/typescript/utils/asyncUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/OxyServices.ts +174 -1
- package/src/index.ts +4 -0
- package/src/models/interfaces.ts +28 -0
- package/src/ui/context/OxyContext.tsx +0 -54
- package/src/ui/navigation/types.ts +0 -1
- package/src/ui/screens/PrivacySettingsScreen.tsx +240 -2
- package/src/utils/apiUtils.ts +0 -14
- package/src/utils/asyncUtils.ts +0 -20
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +0 -192
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +0 -1
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +0 -142
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +0 -1
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +0 -113
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +0 -1
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +0 -132
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +0 -1
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js +0 -83
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js.map +0 -1
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js +0 -58
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js.map +0 -1
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +0 -186
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +0 -1
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +0 -136
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +0 -1
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js +0 -108
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +0 -1
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js +0 -127
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +0 -1
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js +0 -78
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js.map +0 -1
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js +0 -53
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js.map +0 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +0 -28
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +0 -25
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts +0 -20
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts +0 -24
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts +0 -15
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts +0 -13
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts.map +0 -1
- package/src/ui/screens/internal/SignInPasswordStep.tsx +0 -184
- package/src/ui/screens/internal/SignInUsernameStep.tsx +0 -145
- package/src/ui/screens/internal/SignUpIdentityStep.tsx +0 -112
- package/src/ui/screens/internal/SignUpSecurityStep.tsx +0 -132
- package/src/ui/screens/internal/SignUpSummaryStep.tsx +0 -66
- package/src/ui/screens/internal/SignUpWelcomeStep.tsx +0 -52
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { View, Text, Animated } from 'react-native';
|
|
4
|
-
import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
|
|
5
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
const SignUpSummaryStep = ({
|
|
7
|
-
styles,
|
|
8
|
-
fadeAnim,
|
|
9
|
-
slideAnim,
|
|
10
|
-
colors,
|
|
11
|
-
formData,
|
|
12
|
-
isLoading,
|
|
13
|
-
handleSignUp,
|
|
14
|
-
prevStep
|
|
15
|
-
}) => /*#__PURE__*/_jsxs(Animated.View, {
|
|
16
|
-
style: [styles.stepContainer, {
|
|
17
|
-
opacity: fadeAnim,
|
|
18
|
-
transform: [{
|
|
19
|
-
translateX: slideAnim
|
|
20
|
-
}]
|
|
21
|
-
}],
|
|
22
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
23
|
-
style: styles.modernHeader,
|
|
24
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
25
|
-
style: [styles.stepTitle, {
|
|
26
|
-
color: colors.text
|
|
27
|
-
}],
|
|
28
|
-
children: "Ready to join"
|
|
29
|
-
})
|
|
30
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
31
|
-
style: styles.summaryContainer,
|
|
32
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
33
|
-
style: styles.summaryRow,
|
|
34
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
35
|
-
style: [styles.summaryLabel, {
|
|
36
|
-
color: colors.secondaryText
|
|
37
|
-
}],
|
|
38
|
-
children: "Username:"
|
|
39
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
40
|
-
style: [styles.summaryValue, {
|
|
41
|
-
color: colors.text
|
|
42
|
-
}],
|
|
43
|
-
children: formData.username
|
|
44
|
-
})]
|
|
45
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
46
|
-
style: styles.summaryRow,
|
|
47
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
48
|
-
style: [styles.summaryLabel, {
|
|
49
|
-
color: colors.secondaryText
|
|
50
|
-
}],
|
|
51
|
-
children: "Email:"
|
|
52
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
53
|
-
style: [styles.summaryValue, {
|
|
54
|
-
color: colors.text
|
|
55
|
-
}],
|
|
56
|
-
children: formData.email
|
|
57
|
-
})]
|
|
58
|
-
})]
|
|
59
|
-
}), /*#__PURE__*/_jsx(GroupedPillButtons, {
|
|
60
|
-
buttons: [{
|
|
61
|
-
text: 'Back',
|
|
62
|
-
onPress: prevStep,
|
|
63
|
-
icon: 'arrow-back',
|
|
64
|
-
variant: 'transparent'
|
|
65
|
-
}, {
|
|
66
|
-
text: 'Create Account',
|
|
67
|
-
onPress: handleSignUp,
|
|
68
|
-
icon: 'checkmark',
|
|
69
|
-
variant: 'primary',
|
|
70
|
-
disabled: isLoading,
|
|
71
|
-
loading: isLoading,
|
|
72
|
-
testID: 'signup-button'
|
|
73
|
-
}],
|
|
74
|
-
colors: colors
|
|
75
|
-
})]
|
|
76
|
-
});
|
|
77
|
-
export default SignUpSummaryStep;
|
|
78
|
-
//# sourceMappingURL=SignUpSummaryStep.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["View","Text","Animated","GroupedPillButtons","jsx","_jsx","jsxs","_jsxs","SignUpSummaryStep","styles","fadeAnim","slideAnim","colors","formData","isLoading","handleSignUp","prevStep","style","stepContainer","opacity","transform","translateX","children","modernHeader","stepTitle","color","text","summaryContainer","summaryRow","summaryLabel","secondaryText","summaryValue","username","email","buttons","onPress","icon","variant","disabled","loading","testID"],"sourceRoot":"../../../../../src","sources":["ui/screens/internal/SignUpSummaryStep.tsx"],"mappings":";;AACA,SAASA,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAA0B,cAAc;AACrE,OAAOC,kBAAkB,MAAM,8CAA8C;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAa9E,MAAMC,iBAAmD,GAAGA,CAAC;EACzDC,MAAM;EACNC,QAAQ;EACRC,SAAS;EACTC,MAAM;EACNC,QAAQ;EACRC,SAAS;EACTC,YAAY;EACZC;AACJ,CAAC,kBACGT,KAAA,CAACL,QAAQ,CAACF,IAAI;EAACiB,KAAK,EAAE,CAClBR,MAAM,CAACS,aAAa,EACpB;IAAEC,OAAO,EAAET,QAAQ;IAAEU,SAAS,EAAE,CAAC;MAAEC,UAAU,EAAEV;IAAU,CAAC;EAAE,CAAC,CAC/D;EAAAW,QAAA,gBACEjB,IAAA,CAACL,IAAI;IAACiB,KAAK,EAAER,MAAM,CAACc,YAAa;IAAAD,QAAA,eAC7BjB,IAAA,CAACJ,IAAI;MAACgB,KAAK,EAAE,CAACR,MAAM,CAACe,SAAS,EAAE;QAAEC,KAAK,EAAEb,MAAM,CAACc;MAAK,CAAC,CAAE;MAAAJ,QAAA,EAAC;IAAa,CAAM;EAAC,CAC3E,CAAC,eACPf,KAAA,CAACP,IAAI;IAACiB,KAAK,EAAER,MAAM,CAACkB,gBAAiB;IAAAL,QAAA,gBACjCf,KAAA,CAACP,IAAI;MAACiB,KAAK,EAAER,MAAM,CAACmB,UAAW;MAAAN,QAAA,gBAC3BjB,IAAA,CAACJ,IAAI;QAACgB,KAAK,EAAE,CAACR,MAAM,CAACoB,YAAY,EAAE;UAAEJ,KAAK,EAAEb,MAAM,CAACkB;QAAc,CAAC,CAAE;QAAAR,QAAA,EAAC;MAAS,CAAM,CAAC,eACrFjB,IAAA,CAACJ,IAAI;QAACgB,KAAK,EAAE,CAACR,MAAM,CAACsB,YAAY,EAAE;UAAEN,KAAK,EAAEb,MAAM,CAACc;QAAK,CAAC,CAAE;QAAAJ,QAAA,EAAET,QAAQ,CAACmB;MAAQ,CAAO,CAAC;IAAA,CACpF,CAAC,eACPzB,KAAA,CAACP,IAAI;MAACiB,KAAK,EAAER,MAAM,CAACmB,UAAW;MAAAN,QAAA,gBAC3BjB,IAAA,CAACJ,IAAI;QAACgB,KAAK,EAAE,CAACR,MAAM,CAACoB,YAAY,EAAE;UAAEJ,KAAK,EAAEb,MAAM,CAACkB;QAAc,CAAC,CAAE;QAAAR,QAAA,EAAC;MAAM,CAAM,CAAC,eAClFjB,IAAA,CAACJ,IAAI;QAACgB,KAAK,EAAE,CAACR,MAAM,CAACsB,YAAY,EAAE;UAAEN,KAAK,EAAEb,MAAM,CAACc;QAAK,CAAC,CAAE;QAAAJ,QAAA,EAAET,QAAQ,CAACoB;MAAK,CAAO,CAAC;IAAA,CACjF,CAAC;EAAA,CACL,CAAC,eACP5B,IAAA,CAACF,kBAAkB;IACf+B,OAAO,EAAE,CACL;MACIR,IAAI,EAAE,MAAM;MACZS,OAAO,EAAEnB,QAAQ;MACjBoB,IAAI,EAAE,YAAY;MAClBC,OAAO,EAAE;IACb,CAAC,EACD;MACIX,IAAI,EAAE,gBAAgB;MACtBS,OAAO,EAAEpB,YAAY;MACrBqB,IAAI,EAAE,WAAW;MACjBC,OAAO,EAAE,SAAS;MAClBC,QAAQ,EAAExB,SAAS;MACnByB,OAAO,EAAEzB,SAAS;MAClB0B,MAAM,EAAE;IACZ,CAAC,CACH;IACF5B,MAAM,EAAEA;EAAO,CAClB,CAAC;AAAA,CACS,CAClB;AAED,eAAeJ,iBAAiB","ignoreList":[]}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { View, Text, Animated } from 'react-native';
|
|
4
|
-
import HighFive from '../../../assets/illustrations/HighFive';
|
|
5
|
-
import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
const SignUpWelcomeStep = ({
|
|
8
|
-
styles,
|
|
9
|
-
fadeAnim,
|
|
10
|
-
slideAnim,
|
|
11
|
-
colors,
|
|
12
|
-
nextStep,
|
|
13
|
-
navigate
|
|
14
|
-
}) => /*#__PURE__*/_jsxs(Animated.View, {
|
|
15
|
-
style: [styles.stepContainer, {
|
|
16
|
-
opacity: fadeAnim,
|
|
17
|
-
transform: [{
|
|
18
|
-
translateX: slideAnim
|
|
19
|
-
}]
|
|
20
|
-
}],
|
|
21
|
-
children: [/*#__PURE__*/_jsx(HighFive, {
|
|
22
|
-
width: 100,
|
|
23
|
-
height: 100
|
|
24
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
25
|
-
style: styles.modernHeader,
|
|
26
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
27
|
-
style: [styles.modernTitle, {
|
|
28
|
-
color: colors.text
|
|
29
|
-
}],
|
|
30
|
-
children: "Welcome to Oxy"
|
|
31
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
32
|
-
style: [styles.modernSubtitle, {
|
|
33
|
-
color: colors.secondaryText
|
|
34
|
-
}],
|
|
35
|
-
children: "We're excited to have you join us. Let's get your account set up in just a few easy steps."
|
|
36
|
-
})]
|
|
37
|
-
}), /*#__PURE__*/_jsx(GroupedPillButtons, {
|
|
38
|
-
buttons: [{
|
|
39
|
-
text: 'Sign In',
|
|
40
|
-
onPress: () => navigate('SignIn'),
|
|
41
|
-
icon: 'log-in-outline',
|
|
42
|
-
variant: 'transparent'
|
|
43
|
-
}, {
|
|
44
|
-
text: 'Get Started',
|
|
45
|
-
onPress: nextStep,
|
|
46
|
-
icon: 'arrow-forward',
|
|
47
|
-
variant: 'primary'
|
|
48
|
-
}],
|
|
49
|
-
colors: colors
|
|
50
|
-
})]
|
|
51
|
-
});
|
|
52
|
-
export default SignUpWelcomeStep;
|
|
53
|
-
//# sourceMappingURL=SignUpWelcomeStep.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["View","Text","Animated","HighFive","GroupedPillButtons","jsx","_jsx","jsxs","_jsxs","SignUpWelcomeStep","styles","fadeAnim","slideAnim","colors","nextStep","navigate","style","stepContainer","opacity","transform","translateX","children","width","height","modernHeader","modernTitle","color","text","modernSubtitle","secondaryText","buttons","onPress","icon","variant"],"sourceRoot":"../../../../../src","sources":["ui/screens/internal/SignUpWelcomeStep.tsx"],"mappings":";;AACA,SAASA,IAAI,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,cAAc;AACnD,OAAOC,QAAQ,MAAM,wCAAwC;AAC7D,OAAOC,kBAAkB,MAAM,8CAA8C;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAW9E,MAAMC,iBAAmD,GAAGA,CAAC;EACzDC,MAAM;EACNC,QAAQ;EACRC,SAAS;EACTC,MAAM;EACNC,QAAQ;EACRC;AACJ,CAAC,kBACGP,KAAA,CAACN,QAAQ,CAACF,IAAI;EAACgB,KAAK,EAAE,CAClBN,MAAM,CAACO,aAAa,EACpB;IAAEC,OAAO,EAAEP,QAAQ;IAAEQ,SAAS,EAAE,CAAC;MAAEC,UAAU,EAAER;IAAU,CAAC;EAAE,CAAC,CAC/D;EAAAS,QAAA,gBACEf,IAAA,CAACH,QAAQ;IAACmB,KAAK,EAAE,GAAI;IAACC,MAAM,EAAE;EAAI,CAAE,CAAC,eACrCf,KAAA,CAACR,IAAI;IAACgB,KAAK,EAAEN,MAAM,CAACc,YAAa;IAAAH,QAAA,gBAC7Bf,IAAA,CAACL,IAAI;MAACe,KAAK,EAAE,CAACN,MAAM,CAACe,WAAW,EAAE;QAAEC,KAAK,EAAEb,MAAM,CAACc;MAAK,CAAC,CAAE;MAAAN,QAAA,EAAC;IAAc,CAAM,CAAC,eAChFf,IAAA,CAACL,IAAI;MAACe,KAAK,EAAE,CAACN,MAAM,CAACkB,cAAc,EAAE;QAAEF,KAAK,EAAEb,MAAM,CAACgB;MAAc,CAAC,CAAE;MAAAR,QAAA,EAAC;IAA0F,CAAM,CAAC;EAAA,CACtK,CAAC,eACPf,IAAA,CAACF,kBAAkB;IACf0B,OAAO,EAAE,CACL;MACIH,IAAI,EAAE,SAAS;MACfI,OAAO,EAAEA,CAAA,KAAMhB,QAAQ,CAAC,QAAQ,CAAC;MACjCiB,IAAI,EAAE,gBAAgB;MACtBC,OAAO,EAAE;IACb,CAAC,EACD;MACIN,IAAI,EAAE,aAAa;MACnBI,OAAO,EAAEjB,QAAQ;MACjBkB,IAAI,EAAE,eAAe;MACrBC,OAAO,EAAE;IACb,CAAC,CACH;IACFpB,MAAM,EAAEA;EAAO,CAClB,CAAC;AAAA,CACS,CAClB;AAED,eAAeJ,iBAAiB","ignoreList":[]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { RouteName } from '../../navigation/routes';
|
|
3
|
-
import { SharedValue } from 'react-native-reanimated';
|
|
4
|
-
interface SignInPasswordStepProps {
|
|
5
|
-
styles: any;
|
|
6
|
-
fadeAnim: SharedValue<number>;
|
|
7
|
-
slideAnim: SharedValue<number>;
|
|
8
|
-
scaleAnim: SharedValue<number>;
|
|
9
|
-
colors: any;
|
|
10
|
-
userProfile: any;
|
|
11
|
-
username: string;
|
|
12
|
-
theme: string;
|
|
13
|
-
logoAnim: SharedValue<number>;
|
|
14
|
-
errorMessage: string;
|
|
15
|
-
isInputFocused: boolean;
|
|
16
|
-
password: string;
|
|
17
|
-
showPassword: boolean;
|
|
18
|
-
handleInputFocus: () => void;
|
|
19
|
-
handleInputBlur: () => void;
|
|
20
|
-
handlePasswordChange: (text: string) => void;
|
|
21
|
-
handleSignIn: () => void;
|
|
22
|
-
isLoading: boolean;
|
|
23
|
-
prevStep: () => void;
|
|
24
|
-
navigate: (screen: RouteName, props?: Record<string, any>) => void;
|
|
25
|
-
}
|
|
26
|
-
declare const SignInPasswordStep: React.FC<SignInPasswordStepProps>;
|
|
27
|
-
export default SignInPasswordStep;
|
|
28
|
-
//# sourceMappingURL=SignInPasswordStep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignInPasswordStep.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/internal/SignInPasswordStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAiB,EAEb,WAAW,EACd,MAAM,yBAAyB,CAAC;AAQjC,UAAU,uBAAuB;IAC7B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,MAAM,EAAE,GAAG,CAAC;IACZ,WAAW,EAAE,GAAG,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;CACtE;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+IzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import { SharedValue } from 'react-native-reanimated';
|
|
3
|
-
interface SignInUsernameStepProps {
|
|
4
|
-
styles: any;
|
|
5
|
-
fadeAnim: SharedValue<number>;
|
|
6
|
-
slideAnim: SharedValue<number>;
|
|
7
|
-
scaleAnim: SharedValue<number>;
|
|
8
|
-
colors: any;
|
|
9
|
-
isAddAccountMode: boolean;
|
|
10
|
-
user: any;
|
|
11
|
-
errorMessage: string;
|
|
12
|
-
isInputFocused: boolean;
|
|
13
|
-
username: string;
|
|
14
|
-
validationStatus: 'idle' | 'validating' | 'valid' | 'invalid';
|
|
15
|
-
userProfile: any;
|
|
16
|
-
isValidating: boolean;
|
|
17
|
-
handleInputFocus: () => void;
|
|
18
|
-
handleInputBlur: () => void;
|
|
19
|
-
handleUsernameChange: (text: string) => void;
|
|
20
|
-
handleUsernameContinue: () => void;
|
|
21
|
-
navigate: any;
|
|
22
|
-
}
|
|
23
|
-
declare const SignInUsernameStep: React.FC<SignInUsernameStepProps>;
|
|
24
|
-
export default SignInUsernameStep;
|
|
25
|
-
//# sourceMappingURL=SignInUsernameStep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignInUsernameStep.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/internal/SignInUsernameStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAiB,EAEb,WAAW,EACd,MAAM,yBAAyB,CAAC;AAOjC,UAAU,uBAAuB;IAC7B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,MAAM,EAAE,GAAG,CAAC;IACZ,gBAAgB,EAAE,OAAO,CAAC;IAC1B,IAAI,EAAE,GAAG,CAAC;IACV,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,CAAC;IAC9D,WAAW,EAAE,GAAG,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,QAAQ,EAAE,GAAG,CAAC;CACjB;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA4GzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import { Animated } from 'react-native';
|
|
3
|
-
interface SignUpIdentityStepProps {
|
|
4
|
-
styles: any;
|
|
5
|
-
fadeAnim: Animated.Value;
|
|
6
|
-
slideAnim: Animated.Value;
|
|
7
|
-
colors: any;
|
|
8
|
-
formData: any;
|
|
9
|
-
validationState: any;
|
|
10
|
-
updateField: (field: string, value: string) => void;
|
|
11
|
-
setErrorMessage: (msg: string) => void;
|
|
12
|
-
prevStep: () => void;
|
|
13
|
-
handleIdentityNext: () => void;
|
|
14
|
-
ValidationMessage: React.FC<any>;
|
|
15
|
-
validateEmail: (email: string) => boolean;
|
|
16
|
-
navigate: any;
|
|
17
|
-
}
|
|
18
|
-
declare const SignUpIdentityStep: React.FC<SignUpIdentityStepProps>;
|
|
19
|
-
export default SignUpIdentityStep;
|
|
20
|
-
//# sourceMappingURL=SignUpIdentityStep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpIdentityStep.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/internal/SignUpIdentityStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAc,QAAQ,EAAoC,MAAM,cAAc,CAAC;AAMtF,UAAU,uBAAuB;IAC7B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IACzB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,GAAG,CAAC;IACd,eAAe,EAAE,GAAG,CAAC;IACrB,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACjC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,QAAQ,EAAE,GAAG,CAAC;CACjB;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAqFzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import { Animated } from 'react-native';
|
|
3
|
-
interface SignUpSecurityStepProps {
|
|
4
|
-
styles: any;
|
|
5
|
-
fadeAnim: Animated.Value;
|
|
6
|
-
slideAnim: Animated.Value;
|
|
7
|
-
colors: any;
|
|
8
|
-
formData: any;
|
|
9
|
-
passwordVisibility: {
|
|
10
|
-
password: boolean;
|
|
11
|
-
confirmPassword: boolean;
|
|
12
|
-
};
|
|
13
|
-
updateField: (field: string, value: string) => void;
|
|
14
|
-
validatePassword: (password: string) => boolean;
|
|
15
|
-
validatePasswordsMatch: (password: string, confirmPassword: string) => boolean;
|
|
16
|
-
prevStep: () => void;
|
|
17
|
-
handleSecurityNext: () => void;
|
|
18
|
-
setErrorMessage: (msg: string) => void;
|
|
19
|
-
togglePasswordVisibility: () => void;
|
|
20
|
-
PASSWORD_MIN_LENGTH: number;
|
|
21
|
-
}
|
|
22
|
-
declare const SignUpSecurityStep: React.FC<SignUpSecurityStepProps>;
|
|
23
|
-
export default SignUpSecurityStep;
|
|
24
|
-
//# sourceMappingURL=SignUpSecurityStep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpSecurityStep.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/internal/SignUpSecurityStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAc,QAAQ,EAAkB,MAAM,cAAc,CAAC;AAKpE,UAAU,uBAAuB;IAC7B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IACzB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,GAAG,CAAC;IACd,kBAAkB,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,eAAe,EAAE,OAAO,CAAA;KAAE,CAAC;IACpE,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAChD,sBAAsB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/E,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,wBAAwB,EAAE,MAAM,IAAI,CAAC;IACrC,mBAAmB,EAAE,MAAM,CAAC;CAC/B;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAyGzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import { Animated } from 'react-native';
|
|
3
|
-
interface SignUpSummaryStepProps {
|
|
4
|
-
styles: any;
|
|
5
|
-
fadeAnim: Animated.Value;
|
|
6
|
-
slideAnim: Animated.Value;
|
|
7
|
-
colors: any;
|
|
8
|
-
formData: any;
|
|
9
|
-
isLoading: boolean;
|
|
10
|
-
handleSignUp: () => void;
|
|
11
|
-
prevStep: () => void;
|
|
12
|
-
}
|
|
13
|
-
declare const SignUpSummaryStep: React.FC<SignUpSummaryStepProps>;
|
|
14
|
-
export default SignUpSummaryStep;
|
|
15
|
-
//# sourceMappingURL=SignUpSummaryStep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpSummaryStep.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/internal/SignUpSummaryStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAc,QAAQ,EAAoB,MAAM,cAAc,CAAC;AAGtE,UAAU,sBAAsB;IAC5B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IACzB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,GAAG,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAgDvD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import { Animated } from 'react-native';
|
|
3
|
-
interface SignUpWelcomeStepProps {
|
|
4
|
-
styles: any;
|
|
5
|
-
fadeAnim: Animated.Value;
|
|
6
|
-
slideAnim: Animated.Value;
|
|
7
|
-
colors: any;
|
|
8
|
-
nextStep: () => void;
|
|
9
|
-
navigate: any;
|
|
10
|
-
}
|
|
11
|
-
declare const SignUpWelcomeStep: React.FC<SignUpWelcomeStepProps>;
|
|
12
|
-
export default SignUpWelcomeStep;
|
|
13
|
-
//# sourceMappingURL=SignUpWelcomeStep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpWelcomeStep.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/internal/SignUpWelcomeStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAc,QAAQ,EAAE,MAAM,cAAc,CAAC;AAIpD,UAAU,sBAAsB;IAC5B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IACzB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,GAAG,CAAC;CACjB;AAED,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAmCvD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { RouteName } from '../../navigation/routes';
|
|
3
|
-
import { useRef, useCallback, useEffect } from 'react';
|
|
4
|
-
import { View, Text, TouchableOpacity, type TextInput, StatusBar } from 'react-native';
|
|
5
|
-
import Animated, {
|
|
6
|
-
useAnimatedStyle,
|
|
7
|
-
SharedValue,
|
|
8
|
-
} from 'react-native-reanimated';
|
|
9
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
10
|
-
import Avatar from '../../components/Avatar';
|
|
11
|
-
import { useI18n } from '../../hooks/useI18n';
|
|
12
|
-
import { useOxy } from '../../context/OxyContext';
|
|
13
|
-
import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
|
|
14
|
-
import TextField from '../../components/internal/TextField';
|
|
15
|
-
|
|
16
|
-
interface SignInPasswordStepProps {
|
|
17
|
-
styles: any;
|
|
18
|
-
fadeAnim: SharedValue<number>;
|
|
19
|
-
slideAnim: SharedValue<number>;
|
|
20
|
-
scaleAnim: SharedValue<number>;
|
|
21
|
-
colors: any;
|
|
22
|
-
userProfile: any;
|
|
23
|
-
username: string;
|
|
24
|
-
theme: string;
|
|
25
|
-
logoAnim: SharedValue<number>;
|
|
26
|
-
errorMessage: string;
|
|
27
|
-
isInputFocused: boolean;
|
|
28
|
-
password: string;
|
|
29
|
-
showPassword: boolean;
|
|
30
|
-
handleInputFocus: () => void;
|
|
31
|
-
handleInputBlur: () => void;
|
|
32
|
-
handlePasswordChange: (text: string) => void;
|
|
33
|
-
handleSignIn: () => void;
|
|
34
|
-
isLoading: boolean;
|
|
35
|
-
prevStep: () => void;
|
|
36
|
-
navigate: (screen: RouteName, props?: Record<string, any>) => void;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const SignInPasswordStep: React.FC<SignInPasswordStepProps> = ({
|
|
40
|
-
styles,
|
|
41
|
-
fadeAnim,
|
|
42
|
-
slideAnim,
|
|
43
|
-
scaleAnim,
|
|
44
|
-
colors,
|
|
45
|
-
userProfile,
|
|
46
|
-
username,
|
|
47
|
-
theme,
|
|
48
|
-
logoAnim,
|
|
49
|
-
errorMessage,
|
|
50
|
-
isInputFocused,
|
|
51
|
-
password,
|
|
52
|
-
showPassword,
|
|
53
|
-
handleInputFocus,
|
|
54
|
-
handleInputBlur,
|
|
55
|
-
handlePasswordChange,
|
|
56
|
-
handleSignIn: parentHandleSignIn,
|
|
57
|
-
isLoading,
|
|
58
|
-
prevStep,
|
|
59
|
-
navigate,
|
|
60
|
-
}) => {
|
|
61
|
-
const inputRef = useRef<TextInput>(null);
|
|
62
|
-
const { t } = useI18n();
|
|
63
|
-
const { oxyServices } = useOxy();
|
|
64
|
-
|
|
65
|
-
// Animated styles - properly memoized to prevent re-renders
|
|
66
|
-
const containerAnimatedStyle = useAnimatedStyle(() => {
|
|
67
|
-
return {
|
|
68
|
-
opacity: fadeAnim.value,
|
|
69
|
-
transform: [
|
|
70
|
-
{ translateX: slideAnim.value },
|
|
71
|
-
{ scale: scaleAnim.value }
|
|
72
|
-
]
|
|
73
|
-
};
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
const logoAnimatedStyle = useAnimatedStyle(() => {
|
|
77
|
-
return {
|
|
78
|
-
transform: [{ scale: logoAnim.value }]
|
|
79
|
-
};
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
// Focus password input on error or when step becomes active
|
|
83
|
-
useEffect(() => {
|
|
84
|
-
if (errorMessage) {
|
|
85
|
-
setTimeout(() => {
|
|
86
|
-
inputRef.current?.focus();
|
|
87
|
-
}, 0);
|
|
88
|
-
}
|
|
89
|
-
}, [errorMessage]);
|
|
90
|
-
|
|
91
|
-
const handleSignIn = useCallback(() => {
|
|
92
|
-
if (!password || errorMessage) {
|
|
93
|
-
setTimeout(() => {
|
|
94
|
-
inputRef.current?.focus();
|
|
95
|
-
}, 0);
|
|
96
|
-
}
|
|
97
|
-
parentHandleSignIn();
|
|
98
|
-
}, [password, errorMessage, parentHandleSignIn]);
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<Animated.View style={[
|
|
102
|
-
styles.stepContainer,
|
|
103
|
-
containerAnimatedStyle
|
|
104
|
-
]}>
|
|
105
|
-
<View style={styles.modernUserProfileContainer}>
|
|
106
|
-
<Animated.View style={logoAnimatedStyle}>
|
|
107
|
-
<Avatar
|
|
108
|
-
name={userProfile?.displayName || userProfile?.name || username}
|
|
109
|
-
size={100}
|
|
110
|
-
theme={theme as 'light' | 'dark'}
|
|
111
|
-
backgroundColor={colors.primary + '20'}
|
|
112
|
-
uri={userProfile?.avatar && oxyServices ? oxyServices.getFileDownloadUrl(userProfile.avatar, 'thumb') : undefined}
|
|
113
|
-
/>
|
|
114
|
-
</Animated.View>
|
|
115
|
-
<Text style={[styles.modernUserDisplayName, { color: colors.text }]}>
|
|
116
|
-
{userProfile?.displayName || userProfile?.name || username}
|
|
117
|
-
</Text>
|
|
118
|
-
<Text style={[styles.modernUsernameSubtext, { color: colors.secondaryText }]}>
|
|
119
|
-
@{username}
|
|
120
|
-
</Text>
|
|
121
|
-
</View>
|
|
122
|
-
<View style={styles.modernInputContainer}>
|
|
123
|
-
<TextField
|
|
124
|
-
ref={inputRef}
|
|
125
|
-
label={t('common.labels.password')}
|
|
126
|
-
leading={<Ionicons name="lock-closed-outline" size={24} color={colors.secondaryText} />}
|
|
127
|
-
value={password}
|
|
128
|
-
onChangeText={handlePasswordChange}
|
|
129
|
-
onFocus={handleInputFocus}
|
|
130
|
-
onBlur={handleInputBlur}
|
|
131
|
-
secureTextEntry={!showPassword}
|
|
132
|
-
autoCapitalize="none"
|
|
133
|
-
autoCorrect={false}
|
|
134
|
-
testID="password-input"
|
|
135
|
-
variant="filled"
|
|
136
|
-
error={errorMessage || undefined}
|
|
137
|
-
onSubmitEditing={handleSignIn}
|
|
138
|
-
autoFocus
|
|
139
|
-
/>
|
|
140
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 16 }}>
|
|
141
|
-
<Text style={[styles.footerText, { color: colors.text }]}>{t('signin.forgotPrompt') || 'Forgot your password?'} </Text>
|
|
142
|
-
<TouchableOpacity onPress={() => navigate('RecoverAccount', {
|
|
143
|
-
returnTo: 'SignIn',
|
|
144
|
-
returnStep: 1,
|
|
145
|
-
returnData: { username, userProfile }
|
|
146
|
-
})}>
|
|
147
|
-
<Text style={[styles.modernLinkText, { color: colors.primary }]}>{t('common.links.recoverAccount')}</Text>
|
|
148
|
-
</TouchableOpacity>
|
|
149
|
-
</View>
|
|
150
|
-
</View>
|
|
151
|
-
<GroupedPillButtons
|
|
152
|
-
buttons={[
|
|
153
|
-
{
|
|
154
|
-
text: t('common.actions.back'),
|
|
155
|
-
onPress: prevStep,
|
|
156
|
-
icon: 'arrow-back',
|
|
157
|
-
variant: 'transparent',
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
text: t('common.actions.signIn'),
|
|
161
|
-
onPress: handleSignIn,
|
|
162
|
-
icon: 'log-in',
|
|
163
|
-
variant: 'primary',
|
|
164
|
-
loading: isLoading,
|
|
165
|
-
testID: 'login-button',
|
|
166
|
-
},
|
|
167
|
-
]}
|
|
168
|
-
colors={colors}
|
|
169
|
-
/>
|
|
170
|
-
<View style={styles.securityNotice}>
|
|
171
|
-
<Ionicons name="shield-checkmark" size={14} color={colors.secondaryText} />
|
|
172
|
-
<Text style={[styles.securityText, { color: colors.secondaryText }]}>
|
|
173
|
-
{t('signin.security.dataSecure') || 'Your data is encrypted and secure'}
|
|
174
|
-
</Text>
|
|
175
|
-
</View>
|
|
176
|
-
<StatusBar
|
|
177
|
-
barStyle={theme === 'dark' ? 'light-content' : 'dark-content'}
|
|
178
|
-
backgroundColor={colors.background}
|
|
179
|
-
/>
|
|
180
|
-
</Animated.View>
|
|
181
|
-
);
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
export default SignInPasswordStep;
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import { useRef } from 'react';
|
|
3
|
-
import { type TextInput, View, Text } from 'react-native';
|
|
4
|
-
import Animated, {
|
|
5
|
-
useAnimatedStyle,
|
|
6
|
-
SharedValue,
|
|
7
|
-
} from 'react-native-reanimated';
|
|
8
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
9
|
-
import { useI18n } from '../../hooks/useI18n';
|
|
10
|
-
import HighFive from '../../../assets/illustrations/HighFive';
|
|
11
|
-
import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
|
|
12
|
-
import TextField from '../../components/internal/TextField';
|
|
13
|
-
|
|
14
|
-
interface SignInUsernameStepProps {
|
|
15
|
-
styles: any;
|
|
16
|
-
fadeAnim: SharedValue<number>;
|
|
17
|
-
slideAnim: SharedValue<number>;
|
|
18
|
-
scaleAnim: SharedValue<number>;
|
|
19
|
-
colors: any;
|
|
20
|
-
isAddAccountMode: boolean;
|
|
21
|
-
user: any;
|
|
22
|
-
errorMessage: string;
|
|
23
|
-
isInputFocused: boolean;
|
|
24
|
-
username: string;
|
|
25
|
-
validationStatus: 'idle' | 'validating' | 'valid' | 'invalid';
|
|
26
|
-
userProfile: any;
|
|
27
|
-
isValidating: boolean;
|
|
28
|
-
handleInputFocus: () => void;
|
|
29
|
-
handleInputBlur: () => void;
|
|
30
|
-
handleUsernameChange: (text: string) => void;
|
|
31
|
-
handleUsernameContinue: () => void;
|
|
32
|
-
navigate: any;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const SignInUsernameStep: React.FC<SignInUsernameStepProps> = ({
|
|
36
|
-
styles,
|
|
37
|
-
fadeAnim,
|
|
38
|
-
slideAnim,
|
|
39
|
-
scaleAnim,
|
|
40
|
-
colors,
|
|
41
|
-
isAddAccountMode,
|
|
42
|
-
user,
|
|
43
|
-
errorMessage,
|
|
44
|
-
isInputFocused,
|
|
45
|
-
username,
|
|
46
|
-
validationStatus,
|
|
47
|
-
userProfile,
|
|
48
|
-
isValidating,
|
|
49
|
-
handleInputFocus,
|
|
50
|
-
handleInputBlur,
|
|
51
|
-
handleUsernameChange,
|
|
52
|
-
handleUsernameContinue: parentHandleUsernameContinue,
|
|
53
|
-
navigate,
|
|
54
|
-
}) => {
|
|
55
|
-
const inputRef = useRef<TextInput>(null);
|
|
56
|
-
const { t } = useI18n();
|
|
57
|
-
|
|
58
|
-
// Animated styles - properly memoized to prevent re-renders
|
|
59
|
-
const animatedStyle = useAnimatedStyle(() => {
|
|
60
|
-
return {
|
|
61
|
-
opacity: fadeAnim.value,
|
|
62
|
-
transform: [
|
|
63
|
-
{ translateX: slideAnim.value },
|
|
64
|
-
{ scale: scaleAnim.value }
|
|
65
|
-
]
|
|
66
|
-
};
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
const handleUsernameContinue = () => {
|
|
70
|
-
if (!username || validationStatus === 'invalid') {
|
|
71
|
-
setTimeout(() => {
|
|
72
|
-
inputRef.current?.focus();
|
|
73
|
-
}, 0);
|
|
74
|
-
}
|
|
75
|
-
parentHandleUsernameContinue();
|
|
76
|
-
};
|
|
77
|
-
return (
|
|
78
|
-
<Animated.View style={[
|
|
79
|
-
styles.stepContainer,
|
|
80
|
-
animatedStyle
|
|
81
|
-
]}>
|
|
82
|
-
<HighFive width={100} height={100} />
|
|
83
|
-
<View style={styles.modernHeader}>
|
|
84
|
-
<Text style={[styles.modernTitle, { color: colors.text }]}>
|
|
85
|
-
{isAddAccountMode ? (t('signin.addAccountTitle') || 'Add Another Account') : (t('signin.title') || 'Sign In')}
|
|
86
|
-
</Text>
|
|
87
|
-
<Text style={[styles.modernSubtitle, { color: colors.secondaryText }]}>
|
|
88
|
-
{isAddAccountMode
|
|
89
|
-
? (t('signin.addAccountSubtitle') || 'Sign in with another account')
|
|
90
|
-
: (t('signin.subtitle') || 'Sign in to continue your journey')
|
|
91
|
-
}
|
|
92
|
-
</Text>
|
|
93
|
-
</View>
|
|
94
|
-
{isAddAccountMode && (
|
|
95
|
-
<View style={[styles.modernInfoCard, { backgroundColor: colors.inputBackground }]}>
|
|
96
|
-
<Ionicons name="information-circle" size={20} color={colors.primary} />
|
|
97
|
-
<Text style={[styles.modernInfoText, { color: colors.text }]}>
|
|
98
|
-
{t('signin.currentlySignedInAs') || 'Currently signed in as'} <Text style={{ fontWeight: 'bold' }}>{user?.name?.full || user?.username}</Text>
|
|
99
|
-
</Text>
|
|
100
|
-
</View>
|
|
101
|
-
)}
|
|
102
|
-
<View style={styles.modernInputContainer}>
|
|
103
|
-
<TextField
|
|
104
|
-
ref={inputRef}
|
|
105
|
-
label={t('common.labels.username')}
|
|
106
|
-
leading={<Ionicons name="person-outline" size={24} color={colors.secondaryText} />}
|
|
107
|
-
value={username}
|
|
108
|
-
onChangeText={handleUsernameChange}
|
|
109
|
-
onFocus={handleInputFocus}
|
|
110
|
-
onBlur={handleInputBlur}
|
|
111
|
-
autoCapitalize="none"
|
|
112
|
-
autoCorrect={false}
|
|
113
|
-
testID="username-input"
|
|
114
|
-
variant="filled"
|
|
115
|
-
error={validationStatus === 'invalid' ? errorMessage : undefined}
|
|
116
|
-
loading={validationStatus === 'validating'}
|
|
117
|
-
success={validationStatus === 'valid'}
|
|
118
|
-
onSubmitEditing={handleUsernameContinue}
|
|
119
|
-
autoFocus
|
|
120
|
-
/>
|
|
121
|
-
</View>
|
|
122
|
-
<GroupedPillButtons
|
|
123
|
-
buttons={[
|
|
124
|
-
{
|
|
125
|
-
text: t('common.links.signUp') || 'Sign Up',
|
|
126
|
-
onPress: () => navigate('SignUp'),
|
|
127
|
-
icon: 'person-add',
|
|
128
|
-
variant: 'transparent',
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
text: t('common.actions.continue'),
|
|
132
|
-
onPress: handleUsernameContinue,
|
|
133
|
-
icon: 'arrow-forward',
|
|
134
|
-
variant: 'primary',
|
|
135
|
-
loading: isValidating,
|
|
136
|
-
testID: 'username-next-button',
|
|
137
|
-
},
|
|
138
|
-
]}
|
|
139
|
-
colors={colors}
|
|
140
|
-
/>
|
|
141
|
-
</Animated.View>
|
|
142
|
-
);
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export default SignInUsernameStep;
|