@oxyhq/services 5.11.10 → 5.11.11
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/ui/components/AnimationExample.js +1 -1
- package/lib/commonjs/ui/components/AnimationExample.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +2 -2
- package/lib/commonjs/ui/components/Header.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/StepBasedScreen.README.md +337 -0
- package/lib/commonjs/ui/components/StepBasedScreen.js +361 -0
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -0
- package/lib/commonjs/ui/components/icon/OxyIcon.js +3 -3
- package/lib/commonjs/ui/components/icon/OxyIcon.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +7 -7
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +55 -55
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +87 -219
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +138 -235
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +139 -742
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +3 -3
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +2 -2
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js +110 -0
- package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js +138 -0
- package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js +141 -0
- package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js +165 -0
- package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js +150 -0
- package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js +171 -0
- package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js +163 -0
- package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js +170 -0
- package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js +72 -0
- package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js.map +1 -0
- package/lib/module/ui/components/AnimationExample.js +1 -1
- package/lib/module/ui/components/AnimationExample.js.map +1 -1
- package/lib/module/ui/components/Header.js +2 -2
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/Section.js.map +1 -1
- package/lib/module/ui/components/SectionTitle.js.map +1 -1
- package/lib/module/ui/components/StepBasedScreen.README.md +337 -0
- package/lib/module/ui/components/StepBasedScreen.js +356 -0
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -0
- package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +1 -1
- package/lib/module/ui/components/icon/OxyIcon.js +3 -3
- package/lib/module/ui/components/icon/OxyIcon.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +1 -1
- package/lib/module/ui/components/internal/PinInput.js.map +1 -1
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +7 -7
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +55 -55
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +91 -222
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +140 -237
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +141 -743
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +3 -3
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +2 -2
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/module/ui/screens/steps/RecoverRequestStep.js +105 -0
- package/lib/module/ui/screens/steps/RecoverRequestStep.js.map +1 -0
- package/lib/module/ui/screens/steps/RecoverSuccessStep.js +133 -0
- package/lib/module/ui/screens/steps/RecoverSuccessStep.js.map +1 -0
- package/lib/module/ui/screens/steps/RecoverVerifyStep.js +136 -0
- package/lib/module/ui/screens/steps/RecoverVerifyStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignInPasswordStep.js +160 -0
- package/lib/module/ui/screens/steps/SignInPasswordStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignInUsernameStep.js +145 -0
- package/lib/module/ui/screens/steps/SignInUsernameStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignUpIdentityStep.js +166 -0
- package/lib/module/ui/screens/steps/SignUpIdentityStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignUpSecurityStep.js +158 -0
- package/lib/module/ui/screens/steps/SignUpSecurityStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignUpSummaryStep.js +165 -0
- package/lib/module/ui/screens/steps/SignUpSummaryStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignUpWelcomeStep.js +67 -0
- package/lib/module/ui/screens/steps/SignUpWelcomeStep.js.map +1 -0
- package/lib/typescript/models/interfaces.d.ts +4 -3
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/ui/components/AnimationExample.d.ts +1 -1
- package/lib/typescript/ui/components/AnimationExample.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyPayButton.d.ts +2 -2
- package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/Section.d.ts +2 -1
- package/lib/typescript/ui/components/Section.d.ts.map +1 -1
- package/lib/typescript/ui/components/SectionTitle.d.ts +2 -1
- package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -1
- package/lib/typescript/ui/components/StepBasedScreen.d.ts +24 -0
- package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +2 -1
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -1
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts +1 -1
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/PinInput.d.ts +9 -1
- package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +2 -1
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +2 -9
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts +21 -0
- package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts +18 -0
- package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts +24 -0
- package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts +27 -0
- package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts +27 -0
- package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts +25 -0
- package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts +26 -0
- package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts +16 -0
- package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts +13 -0
- package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts.map +1 -0
- package/package.json +2 -3
- package/src/models/interfaces.ts +5 -3
- package/src/ui/components/AnimationExample.tsx +9 -8
- package/src/ui/components/Header.tsx +2 -2
- package/src/ui/components/OxyPayButton.tsx +2 -2
- package/src/ui/components/OxyProvider.tsx +1 -1
- package/src/ui/components/Section.tsx +7 -7
- package/src/ui/components/SectionTitle.tsx +2 -2
- package/src/ui/components/StepBasedScreen.README.md +337 -0
- package/src/ui/components/StepBasedScreen.tsx +417 -0
- package/src/ui/components/icon/FAIRWalletIcon.tsx +2 -2
- package/src/ui/components/icon/OxyIcon.tsx +10 -11
- package/src/ui/components/internal/PinInput.tsx +13 -4
- package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +1 -1
- package/src/ui/context/OxyContext.tsx +12 -11
- package/src/ui/screens/PaymentGatewayScreen.tsx +2 -2
- package/src/ui/screens/ProfileScreen.tsx +54 -54
- package/src/ui/screens/RecoverAccountScreen.tsx +98 -211
- package/src/ui/screens/SignInScreen.tsx +148 -271
- package/src/ui/screens/SignUpScreen.tsx +146 -748
- package/src/ui/screens/internal/SignInPasswordStep.tsx +3 -3
- package/src/ui/screens/internal/SignInUsernameStep.tsx +2 -2
- package/src/ui/screens/steps/RecoverRequestStep.tsx +130 -0
- package/src/ui/screens/steps/RecoverSuccessStep.tsx +131 -0
- package/src/ui/screens/steps/RecoverVerifyStep.tsx +153 -0
- package/src/ui/screens/steps/SignInPasswordStep.tsx +172 -0
- package/src/ui/screens/steps/SignInUsernameStep.tsx +176 -0
- package/src/ui/screens/steps/SignUpIdentityStep.tsx +204 -0
- package/src/ui/screens/steps/SignUpSecurityStep.tsx +191 -0
- package/src/ui/screens/steps/SignUpSummaryStep.tsx +130 -0
- package/src/ui/screens/steps/SignUpWelcomeStep.tsx +65 -0
|
@@ -1,241 +1,110 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useState,
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { jsx as _jsx
|
|
3
|
+
import { useState, useCallback } from 'react';
|
|
4
|
+
import { useThemeColors } from '../styles';
|
|
5
|
+
import StepBasedScreen from '../components/StepBasedScreen';
|
|
6
|
+
import RecoverRequestStep from './steps/RecoverRequestStep';
|
|
7
|
+
import RecoverVerifyStep from './steps/RecoverVerifyStep';
|
|
8
|
+
import RecoverSuccessStep from './steps/RecoverSuccessStep';
|
|
9
|
+
|
|
10
|
+
// Constants
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
const PIN_LENGTH = 6;
|
|
13
|
+
|
|
14
|
+
// Main component
|
|
13
15
|
const RecoverAccountScreen = ({
|
|
14
16
|
navigate,
|
|
15
17
|
goBack,
|
|
16
18
|
theme,
|
|
17
|
-
|
|
18
|
-
returnStep,
|
|
19
|
-
returnData
|
|
19
|
+
oxyServices
|
|
20
20
|
}) => {
|
|
21
|
+
const colors = useThemeColors(theme);
|
|
22
|
+
|
|
23
|
+
// Form state
|
|
21
24
|
const [identifier, setIdentifier] = useState('');
|
|
25
|
+
const [verificationCode, setVerificationCode] = useState('');
|
|
22
26
|
const [isLoading, setIsLoading] = useState(false);
|
|
23
27
|
const [errorMessage, setErrorMessage] = useState('');
|
|
24
28
|
const [successMessage, setSuccessMessage] = useState('');
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
|
|
30
|
+
// Handle back navigation
|
|
31
|
+
const handleBack = useCallback(() => {
|
|
32
|
+
navigate('SignIn');
|
|
33
|
+
}, [navigate]);
|
|
34
|
+
|
|
35
|
+
// Step configurations
|
|
36
|
+
const steps = [{
|
|
37
|
+
id: 'request',
|
|
38
|
+
component: RecoverRequestStep,
|
|
39
|
+
canProceed: () => identifier.trim().length >= 3,
|
|
40
|
+
onEnter: () => {
|
|
41
|
+
// Reset messages when entering request step
|
|
42
|
+
setErrorMessage('');
|
|
43
|
+
setSuccessMessage('');
|
|
37
44
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
}, {
|
|
46
|
+
id: 'verify',
|
|
47
|
+
component: RecoverVerifyStep,
|
|
48
|
+
canProceed: () => verificationCode.length === PIN_LENGTH,
|
|
49
|
+
onEnter: () => {
|
|
50
|
+
// Simulate sending verification code
|
|
51
|
+
setIsLoading(true);
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
setIsLoading(false);
|
|
54
|
+
setSuccessMessage('A 6-digit code has been sent to your email or phone.');
|
|
55
|
+
}, 1000);
|
|
46
56
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
54
|
-
const handleVerifyCode = async () => {
|
|
55
|
-
setErrorMessage('');
|
|
56
|
-
setSuccessMessage('');
|
|
57
|
-
if (code.length !== PIN_LENGTH) {
|
|
58
|
-
setErrorMessage('Please enter the 6-digit code.');
|
|
59
|
-
return;
|
|
57
|
+
}, {
|
|
58
|
+
id: 'success',
|
|
59
|
+
component: RecoverSuccessStep,
|
|
60
|
+
canProceed: () => true,
|
|
61
|
+
onEnter: () => {
|
|
62
|
+
setSuccessMessage('Your account has been verified! You can now reset your password.');
|
|
60
63
|
}
|
|
61
|
-
|
|
62
|
-
setTimeout(() => {
|
|
63
|
-
setIsLoading(false);
|
|
64
|
-
if (code === '123456') {
|
|
65
|
-
// Simulate correct code
|
|
66
|
-
setStep('done');
|
|
67
|
-
setSuccessMessage('Your account has been verified! You can now reset your password.');
|
|
68
|
-
} else {
|
|
69
|
-
setErrorMessage('Invalid code. Please try again.');
|
|
70
|
-
}
|
|
71
|
-
}, 1200);
|
|
72
|
-
};
|
|
64
|
+
}];
|
|
73
65
|
|
|
74
|
-
//
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
117
|
-
contentContainerStyle: styles.scrollContent,
|
|
118
|
-
showsVerticalScrollIndicator: false,
|
|
119
|
-
keyboardShouldPersistTaps: "handled",
|
|
120
|
-
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
121
|
-
style: [styles.stepContainer, {
|
|
122
|
-
opacity: fadeAnim,
|
|
123
|
-
transform: [{
|
|
124
|
-
translateX: slideAnim
|
|
125
|
-
}]
|
|
126
|
-
}],
|
|
127
|
-
children: [/*#__PURE__*/_jsx(HighFive, {
|
|
128
|
-
width: 100,
|
|
129
|
-
height: 100
|
|
130
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
131
|
-
style: styles.modernHeader,
|
|
132
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
133
|
-
style: [styles.modernTitle, {
|
|
134
|
-
color: colors.text
|
|
135
|
-
}],
|
|
136
|
-
children: "Recover Account"
|
|
137
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
138
|
-
style: [styles.modernSubtitle, {
|
|
139
|
-
color: colors.secondaryText
|
|
140
|
-
}],
|
|
141
|
-
children: "Enter your email or username to receive a 6-digit code."
|
|
142
|
-
})]
|
|
143
|
-
}), step === 'request' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
144
|
-
children: [/*#__PURE__*/_jsx(TextField, {
|
|
145
|
-
ref: identifierRef,
|
|
146
|
-
label: "Email or Username",
|
|
147
|
-
leading: /*#__PURE__*/_jsx(Ionicons, {
|
|
148
|
-
name: "mail-outline",
|
|
149
|
-
size: 24,
|
|
150
|
-
color: colors.secondaryText
|
|
151
|
-
}),
|
|
152
|
-
value: identifier,
|
|
153
|
-
onChangeText: setIdentifier,
|
|
154
|
-
autoCapitalize: "none",
|
|
155
|
-
autoCorrect: false,
|
|
156
|
-
variant: "filled",
|
|
157
|
-
error: errorMessage || undefined,
|
|
158
|
-
editable: !isLoading,
|
|
159
|
-
autoFocus: true,
|
|
160
|
-
testID: "recover-identifier-input",
|
|
161
|
-
onSubmitEditing: handleRequestWithFocus
|
|
162
|
-
}), /*#__PURE__*/_jsx(GroupedPillButtons, {
|
|
163
|
-
buttons: [{
|
|
164
|
-
text: 'Back',
|
|
165
|
-
onPress: handleBack,
|
|
166
|
-
icon: 'arrow-back',
|
|
167
|
-
variant: 'transparent'
|
|
168
|
-
}, {
|
|
169
|
-
text: 'Send Code',
|
|
170
|
-
onPress: handleRequest,
|
|
171
|
-
icon: 'mail-open-outline',
|
|
172
|
-
variant: 'primary',
|
|
173
|
-
loading: isLoading,
|
|
174
|
-
disabled: isLoading
|
|
175
|
-
}],
|
|
176
|
-
colors: colors
|
|
177
|
-
})]
|
|
178
|
-
}), step === 'code' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
179
|
-
children: [/*#__PURE__*/_jsx(PinInput, {
|
|
180
|
-
value: code,
|
|
181
|
-
onChange: setCode,
|
|
182
|
-
length: PIN_LENGTH,
|
|
183
|
-
disabled: isLoading,
|
|
184
|
-
autoFocus: true,
|
|
185
|
-
colors: colors
|
|
186
|
-
}), successMessage && /*#__PURE__*/_jsxs(View, {
|
|
187
|
-
style: styles.belowInputMessage,
|
|
188
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
189
|
-
name: "checkmark-circle",
|
|
190
|
-
size: 16,
|
|
191
|
-
color: colors.success
|
|
192
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
193
|
-
style: [styles.belowInputText, {
|
|
194
|
-
color: colors.success
|
|
195
|
-
}],
|
|
196
|
-
children: successMessage
|
|
197
|
-
})]
|
|
198
|
-
}), errorMessage ? /*#__PURE__*/_jsx(Text, {
|
|
199
|
-
style: [styles.successText, {
|
|
200
|
-
color: colors.error,
|
|
201
|
-
marginBottom: 12
|
|
202
|
-
}],
|
|
203
|
-
children: errorMessage
|
|
204
|
-
}) : null, /*#__PURE__*/_jsx(GroupedPillButtons, {
|
|
205
|
-
buttons: [{
|
|
206
|
-
text: 'Back',
|
|
207
|
-
onPress: handleBack,
|
|
208
|
-
icon: 'arrow-back',
|
|
209
|
-
variant: 'transparent'
|
|
210
|
-
}, {
|
|
211
|
-
text: 'Verify Code',
|
|
212
|
-
onPress: handleVerifyCode,
|
|
213
|
-
icon: 'checkmark-circle-outline',
|
|
214
|
-
variant: 'primary',
|
|
215
|
-
loading: isLoading,
|
|
216
|
-
disabled: isLoading
|
|
217
|
-
}],
|
|
218
|
-
colors: colors
|
|
219
|
-
})]
|
|
220
|
-
}), step === 'done' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
221
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
222
|
-
style: [styles.successText, {
|
|
223
|
-
color: colors.success,
|
|
224
|
-
marginBottom: 24
|
|
225
|
-
}],
|
|
226
|
-
children: successMessage
|
|
227
|
-
}), /*#__PURE__*/_jsx(GroupedPillButtons, {
|
|
228
|
-
buttons: [{
|
|
229
|
-
text: 'Back',
|
|
230
|
-
onPress: handleBack,
|
|
231
|
-
icon: 'arrow-back',
|
|
232
|
-
variant: 'primary'
|
|
233
|
-
}],
|
|
234
|
-
colors: colors
|
|
235
|
-
})]
|
|
236
|
-
})]
|
|
237
|
-
})
|
|
238
|
-
})]
|
|
66
|
+
// Handle completion
|
|
67
|
+
const handleComplete = useCallback(stepData => {
|
|
68
|
+
// Final step completed - could navigate to password reset
|
|
69
|
+
console.log('Account recovery completed');
|
|
70
|
+
}, []);
|
|
71
|
+
|
|
72
|
+
// Step data for the reusable component
|
|
73
|
+
const stepData = [
|
|
74
|
+
// Request step
|
|
75
|
+
{
|
|
76
|
+
identifier,
|
|
77
|
+
setIdentifier,
|
|
78
|
+
errorMessage,
|
|
79
|
+
setErrorMessage,
|
|
80
|
+
isLoading,
|
|
81
|
+
setIsLoading
|
|
82
|
+
},
|
|
83
|
+
// Verify step
|
|
84
|
+
{
|
|
85
|
+
verificationCode,
|
|
86
|
+
setVerificationCode,
|
|
87
|
+
errorMessage,
|
|
88
|
+
setErrorMessage,
|
|
89
|
+
successMessage,
|
|
90
|
+
setSuccessMessage,
|
|
91
|
+
isLoading,
|
|
92
|
+
setIsLoading
|
|
93
|
+
},
|
|
94
|
+
// Success step
|
|
95
|
+
{
|
|
96
|
+
successMessage
|
|
97
|
+
}];
|
|
98
|
+
return /*#__PURE__*/_jsx(StepBasedScreen, {
|
|
99
|
+
steps: steps,
|
|
100
|
+
stepData: stepData,
|
|
101
|
+
onComplete: handleComplete,
|
|
102
|
+
navigate: navigate,
|
|
103
|
+
goBack: handleBack,
|
|
104
|
+
theme: theme,
|
|
105
|
+
oxyServices: oxyServices,
|
|
106
|
+
showProgressIndicator: true,
|
|
107
|
+
enableAnimations: true
|
|
239
108
|
});
|
|
240
109
|
};
|
|
241
110
|
export default RecoverAccountScreen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","
|
|
1
|
+
{"version":3,"names":["useState","useCallback","useThemeColors","StepBasedScreen","RecoverRequestStep","RecoverVerifyStep","RecoverSuccessStep","jsx","_jsx","PIN_LENGTH","RecoverAccountScreen","navigate","goBack","theme","oxyServices","colors","identifier","setIdentifier","verificationCode","setVerificationCode","isLoading","setIsLoading","errorMessage","setErrorMessage","successMessage","setSuccessMessage","handleBack","steps","id","component","canProceed","trim","length","onEnter","setTimeout","handleComplete","stepData","console","log","onComplete","showProgressIndicator","enableAnimations"],"sourceRoot":"../../../../src","sources":["ui/screens/RecoverAccountScreen.tsx"],"mappings":";;AACA,SA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