@oxyhq/services 5.5.9 → 5.6.1
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 +116 -84
- 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 +90 -39
- 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 +66 -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 +117 -85
- 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 +91 -40
- 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 +62 -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/interfaces.d.ts +6 -0
- package/lib/typescript/models/interfaces.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 -2
- 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 +16 -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/interfaces.ts +7 -1
- 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 +74 -91
- 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 +75 -46
- 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 +45 -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 -217
- 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 -212
- 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/authfetch-integration.test.ts +0 -197
- package/src/__tests__/ui/hooks/backward-compatibility.test.ts +0 -159
- package/src/__tests__/ui/hooks/real-world-scenarios.test.ts +0 -224
- package/src/__tests__/ui/hooks/url-resolution.test.ts +0 -129
- package/src/__tests__/ui/hooks/useAuthFetch-separation.test.ts +0 -69
- 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
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import React, { useRef, useCallback, useEffect } from 'react';
|
|
2
|
+
import { View, Text, Animated, TouchableOpacity, TextInput, StatusBar } from 'react-native';
|
|
3
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
4
|
+
import Avatar from '../../components/Avatar';
|
|
5
|
+
import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
|
|
6
|
+
import TextField from '../../components/internal/TextField';
|
|
7
|
+
import { useNavigation } from '@react-navigation/native';
|
|
8
|
+
|
|
9
|
+
interface SignInPasswordStepProps {
|
|
10
|
+
styles: any;
|
|
11
|
+
fadeAnim: Animated.Value;
|
|
12
|
+
slideAnim: Animated.Value;
|
|
13
|
+
scaleAnim: Animated.Value;
|
|
14
|
+
colors: any;
|
|
15
|
+
userProfile: any;
|
|
16
|
+
username: string;
|
|
17
|
+
theme: string;
|
|
18
|
+
logoAnim: Animated.Value;
|
|
19
|
+
errorMessage: string;
|
|
20
|
+
inputScaleAnim: Animated.Value;
|
|
21
|
+
isInputFocused: boolean;
|
|
22
|
+
password: string;
|
|
23
|
+
showPassword: boolean;
|
|
24
|
+
handleInputFocus: () => void;
|
|
25
|
+
handleInputBlur: () => void;
|
|
26
|
+
handlePasswordChange: (text: string) => void;
|
|
27
|
+
handleSignIn: () => void;
|
|
28
|
+
isLoading: boolean;
|
|
29
|
+
prevStep: () => void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const SignInPasswordStep: React.FC<SignInPasswordStepProps> = ({
|
|
33
|
+
styles,
|
|
34
|
+
fadeAnim,
|
|
35
|
+
slideAnim,
|
|
36
|
+
scaleAnim,
|
|
37
|
+
colors,
|
|
38
|
+
userProfile,
|
|
39
|
+
username,
|
|
40
|
+
theme,
|
|
41
|
+
logoAnim,
|
|
42
|
+
errorMessage,
|
|
43
|
+
inputScaleAnim,
|
|
44
|
+
isInputFocused,
|
|
45
|
+
password,
|
|
46
|
+
showPassword,
|
|
47
|
+
handleInputFocus,
|
|
48
|
+
handleInputBlur,
|
|
49
|
+
handlePasswordChange,
|
|
50
|
+
handleSignIn: parentHandleSignIn,
|
|
51
|
+
isLoading,
|
|
52
|
+
prevStep,
|
|
53
|
+
}) => {
|
|
54
|
+
const navigation = useNavigation();
|
|
55
|
+
const inputRef = useRef<TextInput>(null);
|
|
56
|
+
|
|
57
|
+
const navigate = useCallback((screen: string) => {
|
|
58
|
+
navigation.navigate(screen as never);
|
|
59
|
+
}, [navigation]);
|
|
60
|
+
|
|
61
|
+
// Focus password input on error or when step becomes active
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (errorMessage) {
|
|
64
|
+
setTimeout(() => {
|
|
65
|
+
inputRef.current?.focus();
|
|
66
|
+
}, 0);
|
|
67
|
+
}
|
|
68
|
+
}, [errorMessage]);
|
|
69
|
+
|
|
70
|
+
const handleSignIn = useCallback(() => {
|
|
71
|
+
if (!password || errorMessage) {
|
|
72
|
+
setTimeout(() => {
|
|
73
|
+
inputRef.current?.focus();
|
|
74
|
+
}, 0);
|
|
75
|
+
}
|
|
76
|
+
parentHandleSignIn();
|
|
77
|
+
}, [password, errorMessage, parentHandleSignIn]);
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<Animated.View style={[
|
|
81
|
+
styles.stepContainer,
|
|
82
|
+
{
|
|
83
|
+
opacity: fadeAnim,
|
|
84
|
+
transform: [
|
|
85
|
+
{ translateX: slideAnim },
|
|
86
|
+
{ scale: scaleAnim }
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
]}>
|
|
90
|
+
<View style={styles.modernUserProfileContainer}>
|
|
91
|
+
<Animated.View style={[
|
|
92
|
+
styles.avatarContainer,
|
|
93
|
+
{ transform: [{ scale: logoAnim }] }
|
|
94
|
+
]}>
|
|
95
|
+
<Avatar
|
|
96
|
+
uri={userProfile?.avatar}
|
|
97
|
+
name={userProfile?.displayName || userProfile?.name || username}
|
|
98
|
+
size={100}
|
|
99
|
+
theme={theme as 'light' | 'dark'}
|
|
100
|
+
style={styles.modernUserAvatar}
|
|
101
|
+
/>
|
|
102
|
+
<View style={[styles.statusIndicator, { backgroundColor: colors.primary }]} />
|
|
103
|
+
</Animated.View>
|
|
104
|
+
<Text style={[styles.modernUserDisplayName, { color: colors.text }]}>
|
|
105
|
+
{userProfile?.displayName || userProfile?.name || username}
|
|
106
|
+
</Text>
|
|
107
|
+
<Text style={[styles.modernUsernameSubtext, { color: colors.secondaryText }]}>
|
|
108
|
+
@{username}
|
|
109
|
+
</Text>
|
|
110
|
+
<View style={[styles.welcomeBackBadge, { backgroundColor: colors.primary + '15' }]}>
|
|
111
|
+
<Ionicons name="checkmark-circle" size={16} color={colors.primary} />
|
|
112
|
+
<Text style={[styles.welcomeBackText, { color: colors.primary }]}>
|
|
113
|
+
Welcome back!
|
|
114
|
+
</Text>
|
|
115
|
+
</View>
|
|
116
|
+
</View>
|
|
117
|
+
<Animated.View style={[
|
|
118
|
+
styles.modernInputContainer,
|
|
119
|
+
{ transform: [{ scale: inputScaleAnim }] }
|
|
120
|
+
]}>
|
|
121
|
+
<TextField
|
|
122
|
+
ref={inputRef}
|
|
123
|
+
label="Password"
|
|
124
|
+
icon="lock-closed-outline"
|
|
125
|
+
value={password}
|
|
126
|
+
onChangeText={handlePasswordChange}
|
|
127
|
+
onFocus={handleInputFocus}
|
|
128
|
+
onBlur={handleInputBlur}
|
|
129
|
+
secureTextEntry={!showPassword}
|
|
130
|
+
autoCapitalize="none"
|
|
131
|
+
autoCorrect={false}
|
|
132
|
+
testID="password-input"
|
|
133
|
+
colors={colors}
|
|
134
|
+
variant="filled"
|
|
135
|
+
error={errorMessage || undefined}
|
|
136
|
+
onSubmitEditing={handleSignIn}
|
|
137
|
+
autoFocus
|
|
138
|
+
/>
|
|
139
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 16 }}>
|
|
140
|
+
<Text style={[styles.footerText, { color: colors.text }]}>Forgot your password? </Text>
|
|
141
|
+
<TouchableOpacity onPress={() => navigate('RecoverAccount')}>
|
|
142
|
+
<Text style={[styles.modernLinkText, { color: colors.primary }]}>Recover your account</Text>
|
|
143
|
+
</TouchableOpacity>
|
|
144
|
+
</View>
|
|
145
|
+
</Animated.View>
|
|
146
|
+
<GroupedPillButtons
|
|
147
|
+
buttons={[
|
|
148
|
+
{
|
|
149
|
+
text: 'Back',
|
|
150
|
+
onPress: prevStep,
|
|
151
|
+
icon: 'arrow-back',
|
|
152
|
+
variant: 'transparent',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
text: 'Sign In',
|
|
156
|
+
onPress: handleSignIn,
|
|
157
|
+
icon: 'log-in',
|
|
158
|
+
variant: 'primary',
|
|
159
|
+
loading: isLoading,
|
|
160
|
+
testID: 'login-button',
|
|
161
|
+
},
|
|
162
|
+
]}
|
|
163
|
+
colors={colors}
|
|
164
|
+
/>
|
|
165
|
+
<View style={styles.securityNotice}>
|
|
166
|
+
<Ionicons name="shield-checkmark" size={14} color={colors.secondaryText} />
|
|
167
|
+
<Text style={[styles.securityText, { color: colors.secondaryText }]}>
|
|
168
|
+
Your data is encrypted and secure
|
|
169
|
+
</Text>
|
|
170
|
+
</View>
|
|
171
|
+
<StatusBar
|
|
172
|
+
barStyle={theme === 'dark' ? 'light-content' : 'dark-content'}
|
|
173
|
+
backgroundColor={colors.background}
|
|
174
|
+
/>
|
|
175
|
+
</Animated.View>
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export default SignInPasswordStep;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { TextInput, View, Text, Animated } from 'react-native';
|
|
3
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
4
|
+
import HighFive from '../../../assets/illustrations/HighFive';
|
|
5
|
+
import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
|
|
6
|
+
import TextField from '../../components/internal/TextField';
|
|
7
|
+
|
|
8
|
+
interface SignInUsernameStepProps {
|
|
9
|
+
styles: any;
|
|
10
|
+
fadeAnim: Animated.Value;
|
|
11
|
+
slideAnim: Animated.Value;
|
|
12
|
+
scaleAnim: Animated.Value;
|
|
13
|
+
colors: any;
|
|
14
|
+
isAddAccountMode: boolean;
|
|
15
|
+
user: any;
|
|
16
|
+
errorMessage: string;
|
|
17
|
+
inputScaleAnim: Animated.Value;
|
|
18
|
+
isInputFocused: boolean;
|
|
19
|
+
username: string;
|
|
20
|
+
validationStatus: 'idle' | 'validating' | 'valid' | 'invalid';
|
|
21
|
+
userProfile: any;
|
|
22
|
+
isValidating: boolean;
|
|
23
|
+
handleInputFocus: () => void;
|
|
24
|
+
handleInputBlur: () => void;
|
|
25
|
+
handleUsernameChange: (text: string) => void;
|
|
26
|
+
handleUsernameContinue: () => void;
|
|
27
|
+
navigate: any;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const SignInUsernameStep: React.FC<SignInUsernameStepProps> = ({
|
|
31
|
+
styles,
|
|
32
|
+
fadeAnim,
|
|
33
|
+
slideAnim,
|
|
34
|
+
scaleAnim,
|
|
35
|
+
colors,
|
|
36
|
+
isAddAccountMode,
|
|
37
|
+
user,
|
|
38
|
+
errorMessage,
|
|
39
|
+
inputScaleAnim,
|
|
40
|
+
isInputFocused,
|
|
41
|
+
username,
|
|
42
|
+
validationStatus,
|
|
43
|
+
userProfile,
|
|
44
|
+
isValidating,
|
|
45
|
+
handleInputFocus,
|
|
46
|
+
handleInputBlur,
|
|
47
|
+
handleUsernameChange,
|
|
48
|
+
handleUsernameContinue: parentHandleUsernameContinue,
|
|
49
|
+
navigate,
|
|
50
|
+
}) => {
|
|
51
|
+
const inputRef = useRef<TextInput>(null);
|
|
52
|
+
const handleUsernameContinue = () => {
|
|
53
|
+
if (!username || validationStatus === 'invalid') {
|
|
54
|
+
setTimeout(() => {
|
|
55
|
+
inputRef.current?.focus();
|
|
56
|
+
}, 0);
|
|
57
|
+
}
|
|
58
|
+
parentHandleUsernameContinue();
|
|
59
|
+
};
|
|
60
|
+
return (
|
|
61
|
+
<Animated.View style={[
|
|
62
|
+
styles.stepContainer,
|
|
63
|
+
{
|
|
64
|
+
opacity: fadeAnim,
|
|
65
|
+
transform: [
|
|
66
|
+
{ translateX: slideAnim },
|
|
67
|
+
{ scale: scaleAnim }
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
]}>
|
|
71
|
+
<HighFive width={100} height={100} />
|
|
72
|
+
<View style={styles.modernHeader}>
|
|
73
|
+
<Text style={[styles.modernTitle, { color: colors.text }]}>
|
|
74
|
+
{isAddAccountMode ? 'Add Another Account' : 'Sign In'}
|
|
75
|
+
</Text>
|
|
76
|
+
<Text style={[styles.modernSubtitle, { color: colors.secondaryText }]}>
|
|
77
|
+
{isAddAccountMode
|
|
78
|
+
? 'Sign in with another account'
|
|
79
|
+
: 'Sign in to continue your journey'
|
|
80
|
+
}
|
|
81
|
+
</Text>
|
|
82
|
+
</View>
|
|
83
|
+
{isAddAccountMode && (
|
|
84
|
+
<View style={[styles.modernInfoCard, { backgroundColor: colors.inputBackground }]}>
|
|
85
|
+
<Ionicons name="information-circle" size={20} color={colors.primary} />
|
|
86
|
+
<Text style={[styles.modernInfoText, { color: colors.text }]}>
|
|
87
|
+
Currently signed in as <Text style={{ fontWeight: 'bold' }}>{user?.username}</Text>
|
|
88
|
+
</Text>
|
|
89
|
+
</View>
|
|
90
|
+
)}
|
|
91
|
+
<Animated.View style={[
|
|
92
|
+
styles.modernInputContainer,
|
|
93
|
+
{ transform: [{ scale: inputScaleAnim }] }
|
|
94
|
+
]}>
|
|
95
|
+
<TextField
|
|
96
|
+
ref={inputRef}
|
|
97
|
+
label="Username"
|
|
98
|
+
icon="person-outline"
|
|
99
|
+
value={username}
|
|
100
|
+
onChangeText={handleUsernameChange}
|
|
101
|
+
onFocus={handleInputFocus}
|
|
102
|
+
onBlur={handleInputBlur}
|
|
103
|
+
autoCapitalize="none"
|
|
104
|
+
autoCorrect={false}
|
|
105
|
+
testID="username-input"
|
|
106
|
+
colors={colors}
|
|
107
|
+
variant="filled"
|
|
108
|
+
error={validationStatus === 'invalid' ? errorMessage : undefined}
|
|
109
|
+
loading={validationStatus === 'validating'}
|
|
110
|
+
success={validationStatus === 'valid'}
|
|
111
|
+
validMessage={validationStatus === 'valid' && userProfile ? `Welcome back, ${userProfile.displayName || userProfile.name || username}!` : undefined}
|
|
112
|
+
onSubmitEditing={handleUsernameContinue}
|
|
113
|
+
autoFocus
|
|
114
|
+
/>
|
|
115
|
+
</Animated.View>
|
|
116
|
+
<GroupedPillButtons
|
|
117
|
+
buttons={[
|
|
118
|
+
{
|
|
119
|
+
text: 'Sign Up',
|
|
120
|
+
onPress: () => navigate('SignUp'),
|
|
121
|
+
icon: 'person-add',
|
|
122
|
+
variant: 'transparent',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
text: 'Continue',
|
|
126
|
+
onPress: handleUsernameContinue,
|
|
127
|
+
icon: 'arrow-forward',
|
|
128
|
+
variant: 'primary',
|
|
129
|
+
loading: isValidating,
|
|
130
|
+
testID: 'username-next-button',
|
|
131
|
+
},
|
|
132
|
+
]}
|
|
133
|
+
colors={colors}
|
|
134
|
+
/>
|
|
135
|
+
</Animated.View>
|
|
136
|
+
);
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export default SignInUsernameStep;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { View, Text, Animated, TouchableOpacity, TextInput } from 'react-native';
|
|
3
|
+
import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
|
|
4
|
+
import TextField from '../../components/internal/TextField';
|
|
5
|
+
import HighFive from '../../../assets/illustrations/HighFive';
|
|
6
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
7
|
+
|
|
8
|
+
interface SignUpIdentityStepProps {
|
|
9
|
+
styles: any;
|
|
10
|
+
fadeAnim: Animated.Value;
|
|
11
|
+
slideAnim: Animated.Value;
|
|
12
|
+
colors: any;
|
|
13
|
+
formData: any;
|
|
14
|
+
validationState: any;
|
|
15
|
+
updateField: (field: string, value: string) => void;
|
|
16
|
+
setErrorMessage: (msg: string) => void;
|
|
17
|
+
prevStep: () => void;
|
|
18
|
+
handleIdentityNext: () => void;
|
|
19
|
+
ValidationMessage: React.FC<any>;
|
|
20
|
+
validateEmail: (email: string) => boolean;
|
|
21
|
+
navigate: any;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const SignUpIdentityStep: React.FC<SignUpIdentityStepProps> = ({
|
|
25
|
+
styles,
|
|
26
|
+
fadeAnim,
|
|
27
|
+
slideAnim,
|
|
28
|
+
colors,
|
|
29
|
+
formData,
|
|
30
|
+
validationState,
|
|
31
|
+
updateField,
|
|
32
|
+
setErrorMessage,
|
|
33
|
+
prevStep,
|
|
34
|
+
handleIdentityNext: parentHandleIdentityNext,
|
|
35
|
+
ValidationMessage,
|
|
36
|
+
validateEmail,
|
|
37
|
+
navigate,
|
|
38
|
+
}) => {
|
|
39
|
+
const inputRef = useRef<TextInput>(null);
|
|
40
|
+
const handleIdentityNext = () => {
|
|
41
|
+
if (!formData.username || validationState.status === 'invalid') {
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
inputRef.current?.focus();
|
|
44
|
+
}, 0);
|
|
45
|
+
}
|
|
46
|
+
parentHandleIdentityNext();
|
|
47
|
+
};
|
|
48
|
+
return (
|
|
49
|
+
<Animated.View style={[
|
|
50
|
+
styles.stepContainer,
|
|
51
|
+
{ opacity: fadeAnim, transform: [{ translateX: slideAnim }] }
|
|
52
|
+
]}>
|
|
53
|
+
<View style={styles.modernHeader}>
|
|
54
|
+
<Text style={[styles.stepTitle, { color: colors.text }]}>Who are you?</Text>
|
|
55
|
+
</View>
|
|
56
|
+
<TextField
|
|
57
|
+
ref={inputRef}
|
|
58
|
+
icon="person-outline"
|
|
59
|
+
label="Username"
|
|
60
|
+
value={formData.username}
|
|
61
|
+
onChangeText={(text) => {
|
|
62
|
+
updateField('username', text);
|
|
63
|
+
setErrorMessage('');
|
|
64
|
+
}}
|
|
65
|
+
autoCapitalize="none"
|
|
66
|
+
autoCorrect={false}
|
|
67
|
+
testID="username-input"
|
|
68
|
+
colors={colors}
|
|
69
|
+
variant="filled"
|
|
70
|
+
error={validationState.status === 'invalid' ? validationState.message : undefined}
|
|
71
|
+
loading={validationState.status === 'validating'}
|
|
72
|
+
success={validationState.status === 'valid'}
|
|
73
|
+
validMessage={validationState.status === 'valid' ? 'Looks good!' : undefined}
|
|
74
|
+
onSubmitEditing={handleIdentityNext}
|
|
75
|
+
autoFocus
|
|
76
|
+
/>
|
|
77
|
+
<ValidationMessage validationState={validationState} colors={colors} styles={styles} />
|
|
78
|
+
<TextField
|
|
79
|
+
icon="mail-outline"
|
|
80
|
+
label="Email"
|
|
81
|
+
value={formData.email}
|
|
82
|
+
onChangeText={(text) => {
|
|
83
|
+
updateField('email', text);
|
|
84
|
+
}}
|
|
85
|
+
keyboardType="email-address"
|
|
86
|
+
autoCapitalize="none"
|
|
87
|
+
autoCorrect={false}
|
|
88
|
+
testID="email-input"
|
|
89
|
+
colors={colors}
|
|
90
|
+
variant="filled"
|
|
91
|
+
error={formData.email && !validateEmail(formData.email) ? 'Please enter a valid email address' : undefined}
|
|
92
|
+
/>
|
|
93
|
+
<GroupedPillButtons
|
|
94
|
+
buttons={[
|
|
95
|
+
{
|
|
96
|
+
text: 'Back',
|
|
97
|
+
onPress: prevStep,
|
|
98
|
+
icon: 'arrow-back',
|
|
99
|
+
variant: 'transparent',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
text: 'Next',
|
|
103
|
+
onPress: handleIdentityNext,
|
|
104
|
+
icon: 'arrow-forward',
|
|
105
|
+
variant: 'primary',
|
|
106
|
+
},
|
|
107
|
+
]}
|
|
108
|
+
colors={colors}
|
|
109
|
+
/>
|
|
110
|
+
</Animated.View>
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export default SignUpIdentityStep;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import React, { useRef, useCallback, useEffect } from 'react';
|
|
2
|
+
import { View, Text, Animated, TextInput } from 'react-native';
|
|
3
|
+
import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
|
|
4
|
+
import TextField from '../../components/internal/TextField';
|
|
5
|
+
|
|
6
|
+
interface SignUpSecurityStepProps {
|
|
7
|
+
styles: any;
|
|
8
|
+
fadeAnim: Animated.Value;
|
|
9
|
+
slideAnim: Animated.Value;
|
|
10
|
+
colors: any;
|
|
11
|
+
formData: any;
|
|
12
|
+
passwordVisibility: { password: boolean; confirmPassword: boolean };
|
|
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
|
+
|
|
23
|
+
const SignUpSecurityStep: React.FC<SignUpSecurityStepProps> = ({
|
|
24
|
+
styles,
|
|
25
|
+
fadeAnim,
|
|
26
|
+
slideAnim,
|
|
27
|
+
colors,
|
|
28
|
+
formData,
|
|
29
|
+
passwordVisibility,
|
|
30
|
+
updateField,
|
|
31
|
+
validatePassword,
|
|
32
|
+
validatePasswordsMatch,
|
|
33
|
+
prevStep,
|
|
34
|
+
handleSecurityNext: parentHandleSecurityNext,
|
|
35
|
+
setErrorMessage,
|
|
36
|
+
togglePasswordVisibility,
|
|
37
|
+
PASSWORD_MIN_LENGTH,
|
|
38
|
+
}) => {
|
|
39
|
+
const passwordRef = useRef<TextInput>(null);
|
|
40
|
+
const confirmPasswordRef = useRef<TextInput>(null);
|
|
41
|
+
|
|
42
|
+
// Focus the first invalid field on error or when step becomes active
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (formData.password && typeof formData.password === 'string' && !validatePassword(formData.password)) {
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
passwordRef.current?.focus();
|
|
47
|
+
}, 0);
|
|
48
|
+
} else if (formData.confirmPassword && typeof formData.confirmPassword === 'string' && !validatePasswordsMatch(formData.password, formData.confirmPassword)) {
|
|
49
|
+
setTimeout(() => {
|
|
50
|
+
confirmPasswordRef.current?.focus();
|
|
51
|
+
}, 0);
|
|
52
|
+
}
|
|
53
|
+
}, [formData.password, formData.confirmPassword, validatePassword, validatePasswordsMatch]);
|
|
54
|
+
|
|
55
|
+
const handleSecurityNext = useCallback(() => {
|
|
56
|
+
if (!formData.password || !validatePassword(formData.password)) {
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
passwordRef.current?.focus();
|
|
59
|
+
}, 0);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!formData.confirmPassword || !validatePasswordsMatch(formData.password, formData.confirmPassword)) {
|
|
63
|
+
setTimeout(() => {
|
|
64
|
+
confirmPasswordRef.current?.focus();
|
|
65
|
+
}, 0);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
parentHandleSecurityNext();
|
|
69
|
+
}, [formData.password, formData.confirmPassword, validatePassword, validatePasswordsMatch, parentHandleSecurityNext]);
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<Animated.View style={[
|
|
73
|
+
styles.stepContainer,
|
|
74
|
+
{ opacity: fadeAnim, transform: [{ translateX: slideAnim }] }
|
|
75
|
+
]}>
|
|
76
|
+
<View style={styles.modernHeader}>
|
|
77
|
+
<Text style={[styles.stepTitle, { color: colors.text }]}>Secure your account</Text>
|
|
78
|
+
</View>
|
|
79
|
+
<TextField
|
|
80
|
+
ref={passwordRef}
|
|
81
|
+
icon="lock-closed-outline"
|
|
82
|
+
label="Password"
|
|
83
|
+
value={formData.password}
|
|
84
|
+
onChangeText={text => updateField('password', text)}
|
|
85
|
+
secureTextEntry={!passwordVisibility.password}
|
|
86
|
+
autoCapitalize="none"
|
|
87
|
+
autoCorrect={false}
|
|
88
|
+
testID="password-input"
|
|
89
|
+
colors={colors}
|
|
90
|
+
variant="filled"
|
|
91
|
+
error={formData.password && typeof formData.password === 'string' && !validatePassword(formData.password) ? `Password must be at least ${PASSWORD_MIN_LENGTH} characters` : undefined}
|
|
92
|
+
onSubmitEditing={() => confirmPasswordRef.current?.focus()}
|
|
93
|
+
autoFocus
|
|
94
|
+
/>
|
|
95
|
+
<Text style={[styles.passwordHint, { color: colors.secondaryText }]}>Password must be at least {PASSWORD_MIN_LENGTH} characters long</Text>
|
|
96
|
+
<TextField
|
|
97
|
+
ref={confirmPasswordRef}
|
|
98
|
+
icon="lock-closed-outline"
|
|
99
|
+
label="Confirm Password"
|
|
100
|
+
value={formData.confirmPassword}
|
|
101
|
+
onChangeText={text => updateField('confirmPassword', text)}
|
|
102
|
+
secureTextEntry={!passwordVisibility.confirmPassword}
|
|
103
|
+
autoCapitalize="none"
|
|
104
|
+
autoCorrect={false}
|
|
105
|
+
testID="confirm-password-input"
|
|
106
|
+
colors={colors}
|
|
107
|
+
variant="filled"
|
|
108
|
+
error={formData.confirmPassword && typeof formData.confirmPassword === 'string' && !validatePasswordsMatch(formData.password, formData.confirmPassword) ? 'Passwords do not match' : undefined}
|
|
109
|
+
onSubmitEditing={handleSecurityNext}
|
|
110
|
+
/>
|
|
111
|
+
<GroupedPillButtons
|
|
112
|
+
buttons={[
|
|
113
|
+
{
|
|
114
|
+
text: 'Back',
|
|
115
|
+
onPress: prevStep,
|
|
116
|
+
icon: 'arrow-back',
|
|
117
|
+
variant: 'transparent',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
text: 'Next',
|
|
121
|
+
onPress: handleSecurityNext,
|
|
122
|
+
icon: 'arrow-forward',
|
|
123
|
+
variant: 'primary',
|
|
124
|
+
},
|
|
125
|
+
]}
|
|
126
|
+
colors={colors}
|
|
127
|
+
/>
|
|
128
|
+
</Animated.View>
|
|
129
|
+
);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export default SignUpSecurityStep;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, Animated, TouchableOpacity } from 'react-native';
|
|
3
|
+
import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
|
|
4
|
+
|
|
5
|
+
interface SignUpSummaryStepProps {
|
|
6
|
+
styles: any;
|
|
7
|
+
fadeAnim: Animated.Value;
|
|
8
|
+
slideAnim: Animated.Value;
|
|
9
|
+
colors: any;
|
|
10
|
+
formData: any;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
handleSignUp: () => void;
|
|
13
|
+
prevStep: () => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const SignUpSummaryStep: React.FC<SignUpSummaryStepProps> = ({
|
|
17
|
+
styles,
|
|
18
|
+
fadeAnim,
|
|
19
|
+
slideAnim,
|
|
20
|
+
colors,
|
|
21
|
+
formData,
|
|
22
|
+
isLoading,
|
|
23
|
+
handleSignUp,
|
|
24
|
+
prevStep,
|
|
25
|
+
}) => (
|
|
26
|
+
<Animated.View style={[
|
|
27
|
+
styles.stepContainer,
|
|
28
|
+
{ opacity: fadeAnim, transform: [{ translateX: slideAnim }] }
|
|
29
|
+
]}>
|
|
30
|
+
<View style={styles.modernHeader}>
|
|
31
|
+
<Text style={[styles.stepTitle, { color: colors.text }]}>Ready to join</Text>
|
|
32
|
+
</View>
|
|
33
|
+
<View style={styles.summaryContainer}>
|
|
34
|
+
<View style={styles.summaryRow}>
|
|
35
|
+
<Text style={[styles.summaryLabel, { color: colors.secondaryText }]}>Username:</Text>
|
|
36
|
+
<Text style={[styles.summaryValue, { color: colors.text }]}>{formData.username}</Text>
|
|
37
|
+
</View>
|
|
38
|
+
<View style={styles.summaryRow}>
|
|
39
|
+
<Text style={[styles.summaryLabel, { color: colors.secondaryText }]}>Email:</Text>
|
|
40
|
+
<Text style={[styles.summaryValue, { color: colors.text }]}>{formData.email}</Text>
|
|
41
|
+
</View>
|
|
42
|
+
</View>
|
|
43
|
+
<GroupedPillButtons
|
|
44
|
+
buttons={[
|
|
45
|
+
{
|
|
46
|
+
text: 'Back',
|
|
47
|
+
onPress: prevStep,
|
|
48
|
+
icon: 'arrow-back',
|
|
49
|
+
variant: 'transparent',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
text: 'Create Account',
|
|
53
|
+
onPress: handleSignUp,
|
|
54
|
+
icon: 'checkmark',
|
|
55
|
+
variant: 'primary',
|
|
56
|
+
disabled: isLoading,
|
|
57
|
+
loading: isLoading,
|
|
58
|
+
testID: 'signup-button',
|
|
59
|
+
},
|
|
60
|
+
]}
|
|
61
|
+
colors={colors}
|
|
62
|
+
/>
|
|
63
|
+
</Animated.View>
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
export default SignUpSummaryStep;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, Animated } from 'react-native';
|
|
3
|
+
import HighFive from '../../../assets/illustrations/HighFive';
|
|
4
|
+
import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
|
|
5
|
+
|
|
6
|
+
interface SignUpWelcomeStepProps {
|
|
7
|
+
styles: any;
|
|
8
|
+
fadeAnim: Animated.Value;
|
|
9
|
+
slideAnim: Animated.Value;
|
|
10
|
+
colors: any;
|
|
11
|
+
nextStep: () => void;
|
|
12
|
+
navigate: any;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const SignUpWelcomeStep: React.FC<SignUpWelcomeStepProps> = ({
|
|
16
|
+
styles,
|
|
17
|
+
fadeAnim,
|
|
18
|
+
slideAnim,
|
|
19
|
+
colors,
|
|
20
|
+
nextStep,
|
|
21
|
+
navigate,
|
|
22
|
+
}) => (
|
|
23
|
+
<Animated.View style={[
|
|
24
|
+
styles.stepContainer,
|
|
25
|
+
{ opacity: fadeAnim, transform: [{ translateX: slideAnim }] }
|
|
26
|
+
]}>
|
|
27
|
+
<HighFive width={100} height={100} />
|
|
28
|
+
<View style={styles.modernHeader}>
|
|
29
|
+
<Text style={[styles.modernTitle, { color: colors.text }]}>Welcome to Oxy</Text>
|
|
30
|
+
<Text style={[styles.modernSubtitle, { color: colors.secondaryText }]}>We're excited to have you join us. Let's get your account set up in just a few easy steps.</Text>
|
|
31
|
+
</View>
|
|
32
|
+
<GroupedPillButtons
|
|
33
|
+
buttons={[
|
|
34
|
+
{
|
|
35
|
+
text: 'Sign In',
|
|
36
|
+
onPress: () => navigate('SignIn'),
|
|
37
|
+
icon: 'log-in-outline',
|
|
38
|
+
variant: 'transparent',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
text: 'Get Started',
|
|
42
|
+
onPress: nextStep,
|
|
43
|
+
icon: 'arrow-forward',
|
|
44
|
+
variant: 'primary',
|
|
45
|
+
},
|
|
46
|
+
]}
|
|
47
|
+
colors={colors}
|
|
48
|
+
/>
|
|
49
|
+
</Animated.View>
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export default SignUpWelcomeStep;
|