@oxyhq/services 5.5.8 → 5.6.0
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/README.md +16 -2
- package/lib/commonjs/core/index.js +69 -82
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +24 -183
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/node/index.js +0 -2
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +100 -229
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyPayButton.js +131 -0
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +41 -198
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +15 -2
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js +66 -0
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js.map +1 -0
- package/lib/commonjs/ui/components/icon/index.js +7 -0
- package/lib/commonjs/ui/components/icon/index.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +7 -0
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +14 -7
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +108 -0
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -0
- package/lib/commonjs/ui/components/internal/TextField.js +20 -0
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +26 -23
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +2 -15
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +52 -136
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +52 -0
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -0
- package/lib/commonjs/ui/index.js +8 -191
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +52 -60
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +18 -30
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +4 -22
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +6 -14
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +37 -66
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +21 -44
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +44 -23
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +59 -78
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +1588 -0
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +22 -36
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +269 -0
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +47 -69
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +99 -333
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +136 -340
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +192 -0
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +135 -0
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +108 -0
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +126 -0
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js +84 -0
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js +59 -0
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +15 -2
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +31 -0
- package/lib/commonjs/ui/stores/authStore.js.map +1 -0
- package/lib/commonjs/ui/stores/followStore.js +124 -0
- package/lib/commonjs/ui/stores/followStore.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +0 -11
- package/lib/commonjs/ui/styles/index.js.map +1 -1
- package/lib/commonjs/ui/utils/confirmAction.js +28 -0
- package/lib/commonjs/ui/utils/confirmAction.js.map +1 -0
- package/lib/module/core/index.js +69 -81
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +14 -17
- package/lib/module/index.js.map +1 -1
- package/lib/module/node/index.js +0 -3
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +100 -229
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +125 -0
- package/lib/module/ui/components/OxyPayButton.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +42 -199
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +15 -2
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/icon/FAIRWalletIcon.js +60 -0
- package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +1 -0
- package/lib/module/ui/components/icon/index.js +1 -0
- package/lib/module/ui/components/icon/index.js.map +1 -1
- package/lib/module/ui/components/index.js +1 -0
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +15 -8
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +103 -0
- package/lib/module/ui/components/internal/PinInput.js.map +1 -0
- package/lib/module/ui/components/internal/TextField.js +20 -0
- package/lib/module/ui/components/internal/TextField.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +26 -23
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/index.js +1 -2
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +52 -137
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +47 -0
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -0
- package/lib/module/ui/index.js +2 -13
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +53 -61
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +6 -18
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +5 -23
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +7 -15
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +38 -67
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +22 -45
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +44 -23
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +59 -78
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1583 -0
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +23 -37
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +263 -0
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -0
- package/lib/module/ui/screens/SessionManagementScreen.js +47 -69
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +100 -334
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +137 -341
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +186 -0
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +129 -0
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js +102 -0
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js +120 -0
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js +79 -0
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js +54 -0
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +16 -3
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +27 -0
- package/lib/module/ui/stores/authStore.js.map +1 -0
- package/lib/module/ui/stores/followStore.js +120 -0
- package/lib/module/ui/stores/followStore.js.map +1 -0
- package/lib/module/ui/styles/index.js +0 -1
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/module/ui/utils/confirmAction.js +25 -0
- package/lib/module/ui/utils/confirmAction.js.map +1 -0
- package/lib/typescript/core/index.d.ts +28 -10
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +5 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/secureSession.d.ts +0 -1
- package/lib/typescript/models/secureSession.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +0 -1
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/FollowButton.d.ts +1 -77
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyPayButton.d.ts +29 -0
- package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +8 -0
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +1 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/PinInput.d.ts +12 -0
- package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +0 -1
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +1 -2
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useFollow.d.ts +14 -15
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts +11 -0
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +2 -5
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +5 -23
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +27 -0
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +8 -0
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +27 -0
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +26 -0
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts +20 -0
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts +24 -0
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts +15 -0
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts +13 -0
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +14 -0
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -0
- package/lib/typescript/ui/stores/followStore.d.ts +15 -0
- package/lib/typescript/ui/stores/followStore.d.ts.map +1 -0
- package/lib/typescript/ui/styles/index.d.ts +0 -1
- package/lib/typescript/ui/styles/index.d.ts.map +1 -1
- package/lib/typescript/ui/utils/confirmAction.d.ts +7 -0
- package/lib/typescript/ui/utils/confirmAction.d.ts.map +1 -0
- package/package.json +12 -7
- package/src/core/index.ts +78 -88
- package/src/index.ts +8 -45
- package/src/models/secureSession.ts +1 -2
- package/src/node/index.ts +0 -3
- package/src/ui/components/FollowButton.tsx +100 -322
- package/src/ui/components/OxyPayButton.tsx +133 -0
- package/src/ui/components/OxyProvider.tsx +39 -201
- package/src/ui/components/OxySignInButton.tsx +13 -2
- package/src/ui/components/icon/FAIRWalletIcon.tsx +49 -0
- package/src/ui/components/icon/index.ts +1 -0
- package/src/ui/components/index.ts +1 -0
- package/src/ui/components/internal/GroupedPillButtons.tsx +12 -8
- package/src/ui/components/internal/PinInput.tsx +102 -0
- package/src/ui/components/internal/TextField.tsx +9 -0
- package/src/ui/context/OxyContext.tsx +26 -26
- package/src/ui/hooks/index.ts +1 -2
- package/src/ui/hooks/useFollow.ts +58 -129
- package/src/ui/hooks/useSessionSocket.ts +50 -0
- package/src/ui/index.ts +2 -37
- package/src/ui/navigation/OxyRouter.tsx +47 -63
- package/src/ui/navigation/types.ts +5 -26
- package/src/ui/screens/AccountCenterScreen.tsx +12 -21
- package/src/ui/screens/AccountOverviewScreen.tsx +6 -30
- package/src/ui/screens/AccountSettingsScreen.tsx +7 -22
- package/src/ui/screens/AccountSwitcherScreen.tsx +46 -88
- package/src/ui/screens/AppInfoScreen.tsx +27 -47
- package/src/ui/screens/FeedbackScreen.tsx +34 -19
- package/src/ui/screens/FileManagementScreen.tsx +293 -321
- package/src/ui/screens/PaymentGatewayScreen.tsx +1315 -0
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +109 -124
- package/src/ui/screens/RecoverAccountScreen.tsx +260 -0
- package/src/ui/screens/SessionManagementScreen.tsx +65 -137
- package/src/ui/screens/SignInScreen.tsx +89 -283
- package/src/ui/screens/SignUpScreen.tsx +138 -291
- package/src/ui/screens/internal/SignInPasswordStep.tsx +179 -0
- package/src/ui/screens/internal/SignInUsernameStep.tsx +139 -0
- package/src/ui/screens/internal/SignUpIdentityStep.tsx +114 -0
- package/src/ui/screens/internal/SignUpSecurityStep.tsx +132 -0
- package/src/ui/screens/internal/SignUpSummaryStep.tsx +66 -0
- package/src/ui/screens/internal/SignUpWelcomeStep.tsx +52 -0
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +13 -3
- package/src/ui/stores/authStore.ts +24 -0
- package/src/ui/stores/followStore.ts +80 -0
- package/src/ui/styles/index.ts +0 -1
- package/src/ui/utils/confirmAction.ts +23 -0
- package/lib/commonjs/ui/components/bottomSheet/index.js +0 -37
- package/lib/commonjs/ui/components/bottomSheet/index.js.map +0 -1
- package/lib/commonjs/ui/hooks/useAuthFetch.js +0 -216
- package/lib/commonjs/ui/hooks/useAuthFetch.js.map +0 -1
- package/lib/commonjs/ui/hooks/useOxyFollow.js +0 -190
- package/lib/commonjs/ui/hooks/useOxyFollow.js.map +0 -1
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +0 -636
- package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +0 -1
- package/lib/commonjs/ui/store/index.js +0 -67
- package/lib/commonjs/ui/store/index.js.map +0 -1
- package/lib/commonjs/ui/store/setupOxyStore.js +0 -63
- package/lib/commonjs/ui/store/setupOxyStore.js.map +0 -1
- package/lib/commonjs/ui/store/slices/authSlice.js +0 -56
- package/lib/commonjs/ui/store/slices/authSlice.js.map +0 -1
- package/lib/commonjs/ui/store/slices/followSlice.js +0 -238
- package/lib/commonjs/ui/store/slices/followSlice.js.map +0 -1
- package/lib/commonjs/ui/store/slices/index.js +0 -129
- package/lib/commonjs/ui/store/slices/index.js.map +0 -1
- package/lib/commonjs/ui/store/slices/types.js +0 -19
- package/lib/commonjs/ui/store/slices/types.js.map +0 -1
- package/lib/commonjs/ui/styles/shadows.js +0 -123
- package/lib/commonjs/ui/styles/shadows.js.map +0 -1
- package/lib/commonjs/utils/polyfills.js +0 -42
- package/lib/commonjs/utils/polyfills.js.map +0 -1
- package/lib/module/ui/components/bottomSheet/index.js +0 -5
- package/lib/module/ui/components/bottomSheet/index.js.map +0 -1
- package/lib/module/ui/hooks/useAuthFetch.js +0 -211
- package/lib/module/ui/hooks/useAuthFetch.js.map +0 -1
- package/lib/module/ui/hooks/useOxyFollow.js +0 -186
- package/lib/module/ui/hooks/useOxyFollow.js.map +0 -1
- package/lib/module/ui/screens/BillingManagementScreen.js +0 -631
- package/lib/module/ui/screens/BillingManagementScreen.js.map +0 -1
- package/lib/module/ui/store/index.js +0 -33
- package/lib/module/ui/store/index.js.map +0 -1
- package/lib/module/ui/store/setupOxyStore.js +0 -59
- package/lib/module/ui/store/setupOxyStore.js.map +0 -1
- package/lib/module/ui/store/slices/authSlice.js +0 -48
- package/lib/module/ui/store/slices/authSlice.js.map +0 -1
- package/lib/module/ui/store/slices/followSlice.js +0 -232
- package/lib/module/ui/store/slices/followSlice.js.map +0 -1
- package/lib/module/ui/store/slices/index.js +0 -11
- package/lib/module/ui/store/slices/index.js.map +0 -1
- package/lib/module/ui/store/slices/types.js +0 -15
- package/lib/module/ui/store/slices/types.js.map +0 -1
- package/lib/module/ui/styles/shadows.js +0 -119
- package/lib/module/ui/styles/shadows.js.map +0 -1
- package/lib/module/utils/polyfills.js +0 -36
- package/lib/module/utils/polyfills.js.map +0 -1
- package/lib/typescript/types/react-redux.d.ts +0 -5
- package/lib/typescript/ui/components/bottomSheet/index.d.ts +0 -4
- package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useAuthFetch.d.ts +0 -34
- package/lib/typescript/ui/hooks/useAuthFetch.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useOxyFollow.d.ts +0 -81
- package/lib/typescript/ui/hooks/useOxyFollow.d.ts.map +0 -1
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +0 -1
- package/lib/typescript/ui/store/index.d.ts +0 -27
- package/lib/typescript/ui/store/index.d.ts.map +0 -1
- package/lib/typescript/ui/store/setupOxyStore.d.ts +0 -29
- package/lib/typescript/ui/store/setupOxyStore.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/authSlice.d.ts +0 -32
- package/lib/typescript/ui/store/slices/authSlice.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/followSlice.d.ts +0 -120
- package/lib/typescript/ui/store/slices/followSlice.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/index.d.ts +0 -9
- package/lib/typescript/ui/store/slices/index.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/types.d.ts +0 -16
- package/lib/typescript/ui/store/slices/types.d.ts.map +0 -1
- package/lib/typescript/ui/styles/shadows.d.ts +0 -233
- package/lib/typescript/ui/styles/shadows.d.ts.map +0 -1
- package/lib/typescript/utils/polyfills.d.ts +0 -6
- package/lib/typescript/utils/polyfills.d.ts.map +0 -1
- package/src/__tests__/backend-middleware.test.ts +0 -209
- package/src/__tests__/polyfills.test.ts +0 -30
- package/src/__tests__/setup.ts +0 -43
- package/src/__tests__/ui/hooks/useAuthFetch.test.ts +0 -70
- package/src/__tests__/ui/hooks/useOxyFollow.test.tsx +0 -92
- package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +0 -112
- package/src/__tests__/ui/store/setupOxyStore.test.ts +0 -50
- package/src/__tests__/validate-structure.js +0 -91
- package/src/__tests__/validation.js +0 -42
- package/src/types/react-redux.d.ts +0 -5
- package/src/ui/components/bottomSheet/index.tsx +0 -14
- package/src/ui/hooks/useAuthFetch.ts +0 -238
- package/src/ui/hooks/useOxyFollow.ts +0 -188
- package/src/ui/screens/BillingManagementScreen.tsx +0 -589
- package/src/ui/store/index.ts +0 -36
- package/src/ui/store/setupOxyStore.ts +0 -58
- package/src/ui/store/slices/authSlice.ts +0 -43
- package/src/ui/store/slices/followSlice.ts +0 -207
- package/src/ui/store/slices/index.ts +0 -31
- package/src/ui/store/slices/types.ts +0 -33
- package/src/ui/styles/shadows.ts +0 -112
- package/src/utils/polyfills.ts +0 -34
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
4
|
-
import { View, Text, TextInput,
|
|
4
|
+
import { View, Text, TextInput, StyleSheet, ActivityIndicator, Platform, KeyboardAvoidingView, ScrollView, Animated, StatusBar } from 'react-native';
|
|
5
5
|
import { useOxy } from '../context/OxyContext';
|
|
6
6
|
import { useThemeColors } from '../styles';
|
|
7
7
|
import { Ionicons } from '@expo/vector-icons';
|
|
8
8
|
import { toast } from '../../lib/sonner';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
import SignUpIdentityStep from './internal/SignUpIdentityStep';
|
|
10
|
+
import SignUpSecurityStep from './internal/SignUpSecurityStep';
|
|
11
|
+
import SignUpSummaryStep from './internal/SignUpSummaryStep';
|
|
12
|
+
import SignUpWelcomeStep from './internal/SignUpWelcomeStep';
|
|
12
13
|
|
|
13
14
|
// Types for better type safety
|
|
14
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -45,9 +46,9 @@ const createStyles = (colors, theme) => StyleSheet.create({
|
|
|
45
46
|
modernTitle: {
|
|
46
47
|
fontFamily: Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
|
|
47
48
|
fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
|
|
48
|
-
fontSize:
|
|
49
|
+
fontSize: 62,
|
|
49
50
|
lineHeight: 48,
|
|
50
|
-
marginBottom:
|
|
51
|
+
marginBottom: 18,
|
|
51
52
|
textAlign: 'left',
|
|
52
53
|
letterSpacing: -1
|
|
53
54
|
},
|
|
@@ -128,6 +129,17 @@ const createStyles = (colors, theme) => StyleSheet.create({
|
|
|
128
129
|
marginTop: 8,
|
|
129
130
|
gap: 8
|
|
130
131
|
},
|
|
132
|
+
belowInputMessage: {
|
|
133
|
+
flexDirection: 'row',
|
|
134
|
+
alignItems: 'center',
|
|
135
|
+
marginTop: 4,
|
|
136
|
+
marginBottom: 0,
|
|
137
|
+
gap: 6
|
|
138
|
+
},
|
|
139
|
+
belowInputText: {
|
|
140
|
+
fontSize: 13,
|
|
141
|
+
fontWeight: '500'
|
|
142
|
+
},
|
|
131
143
|
validationIconContainer: {
|
|
132
144
|
width: 32,
|
|
133
145
|
height: 32,
|
|
@@ -163,15 +175,22 @@ const createStyles = (colors, theme) => StyleSheet.create({
|
|
|
163
175
|
paddingHorizontal: 32,
|
|
164
176
|
borderRadius: 16,
|
|
165
177
|
marginVertical: 8,
|
|
166
|
-
shadowOffset: {
|
|
167
|
-
width: 0,
|
|
168
|
-
height: 4
|
|
169
|
-
},
|
|
170
|
-
shadowOpacity: 0.3,
|
|
171
|
-
shadowRadius: 8,
|
|
172
|
-
elevation: 6,
|
|
173
178
|
gap: 8,
|
|
174
|
-
width: '100%'
|
|
179
|
+
width: '100%',
|
|
180
|
+
...Platform.select({
|
|
181
|
+
web: {
|
|
182
|
+
boxShadow: '0 4px 8px rgba(0,0,0,0.3)'
|
|
183
|
+
},
|
|
184
|
+
default: {
|
|
185
|
+
shadowOffset: {
|
|
186
|
+
width: 0,
|
|
187
|
+
height: 4
|
|
188
|
+
},
|
|
189
|
+
shadowOpacity: 0.3,
|
|
190
|
+
shadowRadius: 8,
|
|
191
|
+
elevation: 6
|
|
192
|
+
}
|
|
193
|
+
})
|
|
175
194
|
},
|
|
176
195
|
buttonText: {
|
|
177
196
|
color: '#FFFFFF',
|
|
@@ -198,14 +217,21 @@ const createStyles = (colors, theme) => StyleSheet.create({
|
|
|
198
217
|
marginVertical: 20,
|
|
199
218
|
borderRadius: 24,
|
|
200
219
|
alignItems: 'center',
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
220
|
+
...Platform.select({
|
|
221
|
+
web: {
|
|
222
|
+
boxShadow: '0 1px 4px rgba(0,0,0,0.04)'
|
|
223
|
+
},
|
|
224
|
+
default: {
|
|
225
|
+
shadowColor: '#000',
|
|
226
|
+
shadowOpacity: 0.04,
|
|
227
|
+
shadowOffset: {
|
|
228
|
+
width: 0,
|
|
229
|
+
height: 1
|
|
230
|
+
},
|
|
231
|
+
shadowRadius: 4,
|
|
232
|
+
elevation: 1
|
|
233
|
+
}
|
|
234
|
+
})
|
|
209
235
|
},
|
|
210
236
|
userInfoText: {
|
|
211
237
|
fontSize: 16,
|
|
@@ -231,13 +257,20 @@ const createStyles = (colors, theme) => StyleSheet.create({
|
|
|
231
257
|
gap: 6,
|
|
232
258
|
minWidth: 70,
|
|
233
259
|
borderWidth: 1,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
260
|
+
...Platform.select({
|
|
261
|
+
web: {
|
|
262
|
+
boxShadow: '0 2px 4px rgba(0,0,0,0.1)'
|
|
263
|
+
},
|
|
264
|
+
default: {
|
|
265
|
+
shadowOffset: {
|
|
266
|
+
width: 0,
|
|
267
|
+
height: 2
|
|
268
|
+
},
|
|
269
|
+
shadowOpacity: 0.1,
|
|
270
|
+
shadowRadius: 4,
|
|
271
|
+
elevation: 2
|
|
272
|
+
}
|
|
273
|
+
})
|
|
241
274
|
},
|
|
242
275
|
backButton: {
|
|
243
276
|
backgroundColor: 'transparent',
|
|
@@ -270,14 +303,21 @@ const createStyles = (colors, theme) => StyleSheet.create({
|
|
|
270
303
|
marginHorizontal: 6,
|
|
271
304
|
borderWidth: 2,
|
|
272
305
|
borderColor: '#fff',
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
306
|
+
...Platform.select({
|
|
307
|
+
web: {
|
|
308
|
+
boxShadow: '0 1px 2px rgba(0,0,0,0.08)'
|
|
309
|
+
},
|
|
310
|
+
default: {
|
|
311
|
+
shadowColor: colors.primary,
|
|
312
|
+
shadowOpacity: 0.08,
|
|
313
|
+
shadowOffset: {
|
|
314
|
+
width: 0,
|
|
315
|
+
height: 1
|
|
316
|
+
},
|
|
317
|
+
shadowRadius: 2,
|
|
318
|
+
elevation: 1
|
|
319
|
+
}
|
|
320
|
+
})
|
|
281
321
|
},
|
|
282
322
|
summaryContainer: {
|
|
283
323
|
padding: 0,
|
|
@@ -699,310 +739,71 @@ const SignUpScreen = ({
|
|
|
699
739
|
}
|
|
700
740
|
}, [formData, isIdentityStepValid, isSecurityStepValid, signUp, onAuthenticated, resetForm]);
|
|
701
741
|
|
|
702
|
-
//
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
opacity: fadeAnim,
|
|
756
|
-
transform: [{
|
|
757
|
-
translateX: slideAnim
|
|
758
|
-
}]
|
|
759
|
-
}],
|
|
760
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
761
|
-
style: styles.modernHeader,
|
|
762
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
763
|
-
style: [styles.stepTitle, {
|
|
764
|
-
color: colors.text
|
|
765
|
-
}],
|
|
766
|
-
children: "Who are you?"
|
|
767
|
-
})
|
|
768
|
-
}), /*#__PURE__*/_jsx(TextField, {
|
|
769
|
-
icon: "person-outline",
|
|
770
|
-
label: "Username",
|
|
771
|
-
value: formData.username,
|
|
772
|
-
onChangeText: text => {
|
|
773
|
-
updateField('username', text);
|
|
774
|
-
setErrorMessage('');
|
|
775
|
-
},
|
|
776
|
-
autoCapitalize: "none",
|
|
777
|
-
autoCorrect: false,
|
|
778
|
-
testID: "username-input",
|
|
779
|
-
colors: colors,
|
|
780
|
-
variant: "filled",
|
|
781
|
-
error: validationState.status === 'invalid' ? validationState.message : undefined,
|
|
782
|
-
loading: validationState.status === 'validating',
|
|
783
|
-
success: validationState.status === 'valid'
|
|
784
|
-
}), /*#__PURE__*/_jsx(ValidationMessage, {
|
|
785
|
-
validationState: validationState,
|
|
786
|
-
colors: colors,
|
|
787
|
-
styles: styles
|
|
788
|
-
}), /*#__PURE__*/_jsx(TextField, {
|
|
789
|
-
icon: "mail-outline",
|
|
790
|
-
label: "Email",
|
|
791
|
-
value: formData.email,
|
|
792
|
-
onChangeText: text => {
|
|
793
|
-
updateField('email', text);
|
|
794
|
-
},
|
|
795
|
-
keyboardType: "email-address",
|
|
796
|
-
autoCapitalize: "none",
|
|
797
|
-
autoCorrect: false,
|
|
798
|
-
testID: "email-input",
|
|
799
|
-
colors: colors,
|
|
800
|
-
variant: "filled",
|
|
801
|
-
error: formData.email && !validateEmail(formData.email) ? 'Please enter a valid email address' : undefined
|
|
802
|
-
}), /*#__PURE__*/_jsx(GroupedPillButtons, {
|
|
803
|
-
buttons: [{
|
|
804
|
-
text: 'Back',
|
|
805
|
-
onPress: prevStep,
|
|
806
|
-
icon: 'arrow-back',
|
|
807
|
-
variant: 'transparent'
|
|
808
|
-
}, {
|
|
809
|
-
text: 'Next',
|
|
810
|
-
onPress: handleIdentityNext,
|
|
811
|
-
icon: 'arrow-forward',
|
|
812
|
-
variant: 'primary'
|
|
813
|
-
}],
|
|
814
|
-
colors: colors
|
|
815
|
-
})]
|
|
816
|
-
}), [fadeAnim, slideAnim, colors, formData, validationState, updateField, setErrorMessage, prevStep, handleIdentityNext, styles]);
|
|
817
|
-
const renderSecurityStep = useCallback(() => /*#__PURE__*/_jsxs(Animated.View, {
|
|
818
|
-
style: [styles.stepContainer, {
|
|
819
|
-
opacity: fadeAnim,
|
|
820
|
-
transform: [{
|
|
821
|
-
translateX: slideAnim
|
|
822
|
-
}]
|
|
823
|
-
}],
|
|
824
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
825
|
-
style: styles.modernHeader,
|
|
826
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
827
|
-
style: [styles.stepTitle, {
|
|
828
|
-
color: colors.text
|
|
829
|
-
}],
|
|
830
|
-
children: "Secure your account"
|
|
831
|
-
})
|
|
832
|
-
}), /*#__PURE__*/_jsx(TextField, {
|
|
833
|
-
icon: "lock-closed-outline",
|
|
834
|
-
label: "Password",
|
|
835
|
-
value: formData.password,
|
|
836
|
-
onChangeText: text => {
|
|
837
|
-
updateField('password', text);
|
|
838
|
-
},
|
|
839
|
-
secureTextEntry: !passwordVisibility.password,
|
|
840
|
-
autoCapitalize: "none",
|
|
841
|
-
autoCorrect: false,
|
|
842
|
-
testID: "password-input",
|
|
843
|
-
colors: colors,
|
|
844
|
-
variant: "filled",
|
|
845
|
-
error: formData.password && !validatePassword(formData.password) ? `Password must be at least ${PASSWORD_MIN_LENGTH} characters` : undefined
|
|
846
|
-
}), /*#__PURE__*/_jsxs(Text, {
|
|
847
|
-
style: [styles.passwordHint, {
|
|
848
|
-
color: colors.secondaryText
|
|
849
|
-
}],
|
|
850
|
-
children: ["Password must be at least ", PASSWORD_MIN_LENGTH, " characters long"]
|
|
851
|
-
}), /*#__PURE__*/_jsx(TextField, {
|
|
852
|
-
icon: "lock-closed-outline",
|
|
853
|
-
label: "Confirm Password",
|
|
854
|
-
value: formData.confirmPassword,
|
|
855
|
-
onChangeText: text => {
|
|
856
|
-
updateField('confirmPassword', text);
|
|
857
|
-
},
|
|
858
|
-
secureTextEntry: !passwordVisibility.confirmPassword,
|
|
859
|
-
autoCapitalize: "none",
|
|
860
|
-
autoCorrect: false,
|
|
861
|
-
testID: "confirm-password-input",
|
|
862
|
-
colors: colors,
|
|
863
|
-
variant: "filled",
|
|
864
|
-
error: formData.confirmPassword && !validatePasswordsMatch(formData.password, formData.confirmPassword) ? 'Passwords do not match' : undefined
|
|
865
|
-
}), /*#__PURE__*/_jsx(GroupedPillButtons, {
|
|
866
|
-
buttons: [{
|
|
867
|
-
text: 'Back',
|
|
868
|
-
onPress: prevStep,
|
|
869
|
-
icon: 'arrow-back',
|
|
870
|
-
variant: 'transparent'
|
|
871
|
-
}, {
|
|
872
|
-
text: 'Next',
|
|
873
|
-
onPress: handleSecurityNext,
|
|
874
|
-
icon: 'arrow-forward',
|
|
875
|
-
variant: 'primary'
|
|
876
|
-
}],
|
|
877
|
-
colors: colors
|
|
878
|
-
})]
|
|
879
|
-
}), [fadeAnim, slideAnim, colors, formData, passwordVisibility, updateField, setErrorMessage, togglePasswordVisibility, prevStep, handleSecurityNext, styles]);
|
|
880
|
-
const renderSummaryStep = useCallback(() => /*#__PURE__*/_jsxs(Animated.View, {
|
|
881
|
-
style: [styles.stepContainer, {
|
|
882
|
-
opacity: fadeAnim,
|
|
883
|
-
transform: [{
|
|
884
|
-
translateX: slideAnim
|
|
885
|
-
}]
|
|
886
|
-
}],
|
|
887
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
888
|
-
style: styles.modernHeader,
|
|
889
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
890
|
-
style: [styles.stepTitle, {
|
|
891
|
-
color: colors.text
|
|
892
|
-
}],
|
|
893
|
-
children: "Ready to join"
|
|
894
|
-
})
|
|
895
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
896
|
-
style: styles.summaryContainer,
|
|
897
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
898
|
-
style: styles.summaryRow,
|
|
899
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
900
|
-
style: [styles.summaryLabel, {
|
|
901
|
-
color: colors.secondaryText
|
|
902
|
-
}],
|
|
903
|
-
children: "Username:"
|
|
904
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
905
|
-
style: [styles.summaryValue, {
|
|
906
|
-
color: colors.text
|
|
907
|
-
}],
|
|
908
|
-
children: formData.username
|
|
909
|
-
})]
|
|
910
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
911
|
-
style: styles.summaryRow,
|
|
912
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
913
|
-
style: [styles.summaryLabel, {
|
|
914
|
-
color: colors.secondaryText
|
|
915
|
-
}],
|
|
916
|
-
children: "Email:"
|
|
917
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
918
|
-
style: [styles.summaryValue, {
|
|
919
|
-
color: colors.text
|
|
920
|
-
}],
|
|
921
|
-
children: formData.email
|
|
922
|
-
})]
|
|
923
|
-
})]
|
|
924
|
-
}), /*#__PURE__*/_jsx(GroupedPillButtons, {
|
|
925
|
-
buttons: [{
|
|
926
|
-
text: 'Back',
|
|
927
|
-
onPress: prevStep,
|
|
928
|
-
icon: 'arrow-back',
|
|
929
|
-
variant: 'transparent'
|
|
930
|
-
}, {
|
|
931
|
-
text: 'Create Account',
|
|
932
|
-
onPress: handleSignUp,
|
|
933
|
-
icon: 'checkmark',
|
|
934
|
-
variant: 'primary',
|
|
935
|
-
disabled: isLoading,
|
|
936
|
-
loading: isLoading,
|
|
937
|
-
testID: 'signup-button'
|
|
938
|
-
}],
|
|
939
|
-
colors: colors
|
|
940
|
-
})]
|
|
941
|
-
}), [fadeAnim, slideAnim, colors, formData, isLoading, handleSignUp, prevStep, styles]);
|
|
942
|
-
|
|
943
|
-
// If user is already authenticated, show user info
|
|
944
|
-
if (user && isAuthenticated) {
|
|
945
|
-
return /*#__PURE__*/_jsxs(KeyboardAvoidingView, {
|
|
946
|
-
style: [styles.container, {
|
|
947
|
-
backgroundColor: colors.background
|
|
948
|
-
}],
|
|
949
|
-
behavior: Platform.OS === 'ios' ? 'padding' : 'height',
|
|
950
|
-
children: [/*#__PURE__*/_jsx(StatusBar, {
|
|
951
|
-
barStyle: theme === 'dark' ? 'light-content' : 'dark-content',
|
|
952
|
-
backgroundColor: colors.background
|
|
953
|
-
}), /*#__PURE__*/_jsxs(ScrollView, {
|
|
954
|
-
contentContainerStyle: styles.scrollContent,
|
|
955
|
-
showsVerticalScrollIndicator: false,
|
|
956
|
-
children: [/*#__PURE__*/_jsxs(Text, {
|
|
957
|
-
style: [styles.welcomeTitle, {
|
|
958
|
-
color: colors.text
|
|
959
|
-
}],
|
|
960
|
-
children: ["Welcome, ", user.username, "!"]
|
|
961
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
962
|
-
style: [styles.userInfoContainer, {
|
|
963
|
-
backgroundColor: colors.inputBackground
|
|
964
|
-
}],
|
|
965
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
966
|
-
style: [styles.userInfoText, {
|
|
967
|
-
color: colors.text
|
|
968
|
-
}],
|
|
969
|
-
children: "You are already signed in."
|
|
970
|
-
}), user.email && /*#__PURE__*/_jsxs(Text, {
|
|
971
|
-
style: [styles.userInfoText, {
|
|
972
|
-
color: colors.secondaryText
|
|
973
|
-
}],
|
|
974
|
-
children: ["Email: ", user.email]
|
|
975
|
-
})]
|
|
976
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
977
|
-
style: styles.actionButtonsContainer,
|
|
978
|
-
children: /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
979
|
-
style: [styles.button, {
|
|
980
|
-
backgroundColor: colors.primary
|
|
981
|
-
}],
|
|
982
|
-
onPress: () => navigate('AccountCenter'),
|
|
983
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
984
|
-
style: styles.buttonText,
|
|
985
|
-
children: "Go to Account Center"
|
|
986
|
-
})
|
|
987
|
-
})
|
|
988
|
-
})]
|
|
989
|
-
})]
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
// Render current step
|
|
742
|
+
// Memoized step components
|
|
743
|
+
const updateFieldString = (field, value) => updateField(field, value);
|
|
744
|
+
const validatePasswordsMatchNoArgs = () => validatePasswordsMatch(formData.password, formData.confirmPassword);
|
|
745
|
+
const togglePasswordVisibilityNoArgs = () => togglePasswordVisibility('password');
|
|
746
|
+
const renderWelcomeStep = useMemo(() => /*#__PURE__*/_jsx(SignUpWelcomeStep, {
|
|
747
|
+
styles: styles,
|
|
748
|
+
fadeAnim: fadeAnim,
|
|
749
|
+
slideAnim: slideAnim,
|
|
750
|
+
colors: colors,
|
|
751
|
+
nextStep: nextStep,
|
|
752
|
+
navigate: navigate
|
|
753
|
+
}), [styles, fadeAnim, slideAnim, colors, nextStep, navigate]);
|
|
754
|
+
const renderIdentityStep = useMemo(() => /*#__PURE__*/_jsx(SignUpIdentityStep, {
|
|
755
|
+
styles: styles,
|
|
756
|
+
fadeAnim: fadeAnim,
|
|
757
|
+
slideAnim: slideAnim,
|
|
758
|
+
colors: colors,
|
|
759
|
+
formData: formData,
|
|
760
|
+
validationState: validationState,
|
|
761
|
+
updateField: updateFieldString,
|
|
762
|
+
setErrorMessage: setErrorMessage,
|
|
763
|
+
prevStep: prevStep,
|
|
764
|
+
handleIdentityNext: handleIdentityNext,
|
|
765
|
+
ValidationMessage: ValidationMessage,
|
|
766
|
+
validateEmail: validateEmail,
|
|
767
|
+
navigate: navigate
|
|
768
|
+
}), [styles, fadeAnim, slideAnim, colors, formData, validationState, updateFieldString, setErrorMessage, prevStep, handleIdentityNext, ValidationMessage, validateEmail, navigate]);
|
|
769
|
+
const renderSecurityStep = useMemo(() => /*#__PURE__*/_jsx(SignUpSecurityStep, {
|
|
770
|
+
styles: styles,
|
|
771
|
+
fadeAnim: fadeAnim,
|
|
772
|
+
slideAnim: slideAnim,
|
|
773
|
+
colors: colors,
|
|
774
|
+
formData: formData,
|
|
775
|
+
passwordVisibility: passwordVisibility,
|
|
776
|
+
updateField: updateFieldString,
|
|
777
|
+
validatePassword: validatePassword,
|
|
778
|
+
validatePasswordsMatch: validatePasswordsMatchNoArgs,
|
|
779
|
+
prevStep: prevStep,
|
|
780
|
+
handleSecurityNext: handleSecurityNext,
|
|
781
|
+
setErrorMessage: setErrorMessage,
|
|
782
|
+
togglePasswordVisibility: togglePasswordVisibilityNoArgs,
|
|
783
|
+
PASSWORD_MIN_LENGTH: PASSWORD_MIN_LENGTH
|
|
784
|
+
}), [styles, fadeAnim, slideAnim, colors, formData, passwordVisibility, updateFieldString, validatePassword, validatePasswordsMatchNoArgs, prevStep, handleSecurityNext, setErrorMessage, togglePasswordVisibilityNoArgs, PASSWORD_MIN_LENGTH]);
|
|
785
|
+
const renderSummaryStep = useMemo(() => /*#__PURE__*/_jsx(SignUpSummaryStep, {
|
|
786
|
+
styles: styles,
|
|
787
|
+
fadeAnim: fadeAnim,
|
|
788
|
+
slideAnim: slideAnim,
|
|
789
|
+
colors: colors,
|
|
790
|
+
formData: formData,
|
|
791
|
+
isLoading: isLoading,
|
|
792
|
+
handleSignUp: handleSignUp,
|
|
793
|
+
prevStep: prevStep
|
|
794
|
+
}), [styles, fadeAnim, slideAnim, colors, formData, isLoading, handleSignUp, prevStep]);
|
|
994
795
|
const renderCurrentStep = useCallback(() => {
|
|
995
796
|
switch (currentStep) {
|
|
996
797
|
case 0:
|
|
997
|
-
return renderWelcomeStep
|
|
798
|
+
return renderWelcomeStep;
|
|
998
799
|
case 1:
|
|
999
|
-
return renderIdentityStep
|
|
800
|
+
return renderIdentityStep;
|
|
1000
801
|
case 2:
|
|
1001
|
-
return renderSecurityStep
|
|
802
|
+
return renderSecurityStep;
|
|
1002
803
|
case 3:
|
|
1003
|
-
return renderSummaryStep
|
|
804
|
+
return renderSummaryStep;
|
|
1004
805
|
default:
|
|
1005
|
-
return renderWelcomeStep
|
|
806
|
+
return renderWelcomeStep;
|
|
1006
807
|
}
|
|
1007
808
|
}, [currentStep, renderWelcomeStep, renderIdentityStep, renderSecurityStep, renderSummaryStep]);
|
|
1008
809
|
return /*#__PURE__*/_jsxs(KeyboardAvoidingView, {
|
|
@@ -1013,16 +814,11 @@ const SignUpScreen = ({
|
|
|
1013
814
|
children: [/*#__PURE__*/_jsx(StatusBar, {
|
|
1014
815
|
barStyle: theme === 'dark' ? 'light-content' : 'dark-content',
|
|
1015
816
|
backgroundColor: colors.background
|
|
1016
|
-
}), /*#__PURE__*/
|
|
817
|
+
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
1017
818
|
contentContainerStyle: styles.scrollContent,
|
|
1018
819
|
showsVerticalScrollIndicator: false,
|
|
1019
820
|
keyboardShouldPersistTaps: "handled",
|
|
1020
|
-
children:
|
|
1021
|
-
currentStep: currentStep,
|
|
1022
|
-
totalSteps: 4,
|
|
1023
|
-
colors: colors,
|
|
1024
|
-
styles: styles
|
|
1025
|
-
}), renderCurrentStep()]
|
|
821
|
+
children: renderCurrentStep()
|
|
1026
822
|
})]
|
|
1027
823
|
});
|
|
1028
824
|
};
|