@oxyhq/services 5.11.12 → 5.12.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 +48 -7
- package/lib/commonjs/core/OxyServices.js +162 -12
- package/lib/commonjs/core/OxyServices.js.map +1 -1
- package/lib/commonjs/i18n/index.js +40 -0
- package/lib/commonjs/i18n/index.js.map +1 -0
- package/lib/commonjs/i18n/locales/en-US.json +681 -0
- package/lib/commonjs/i18n/locales/es-ES.json +689 -0
- package/lib/commonjs/ui/components/GroupedItem.js +2 -1
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +4 -3
- package/lib/commonjs/ui/components/Header.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +110 -103
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +5 -1
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
- package/lib/commonjs/ui/components/Section.js +1 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js +16 -16
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +15 -3
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +10 -4
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +128 -12
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useI18n.js +22 -0
- package/lib/commonjs/ui/hooks/useI18n.js.map +1 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js +11 -131
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +127 -0
- package/lib/commonjs/ui/navigation/routes.js.map +1 -0
- package/lib/commonjs/ui/navigation/types.js +7 -0
- package/lib/commonjs/ui/navigation/types.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +55 -47
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +69 -61
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +378 -37
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +52 -34
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +40 -36
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +105 -78
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +92 -60
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +21 -11
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +30 -8
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +47 -26
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +31 -24
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +11 -7
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +12 -6
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +11 -7
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +15 -11
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +19 -27
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +8 -4
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +14 -10
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +7 -3
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js +19 -14
- package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js +130 -0
- package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js +13 -13
- package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js +14 -20
- package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js +22 -8
- package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignInTotpStep.js +161 -0
- package/lib/commonjs/ui/screens/steps/SignInTotpStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js +12 -6
- package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js +10 -6
- package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js +10 -6
- package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js +34 -4
- package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js +9 -10
- package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +1 -2
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
- package/lib/commonjs/utils/deviceManager.js +1 -1
- package/lib/commonjs/utils/deviceManager.js.map +1 -1
- package/lib/commonjs/utils/validationUtils.js +4 -2
- package/lib/commonjs/utils/validationUtils.js.map +1 -1
- package/lib/module/core/OxyServices.js +162 -12
- package/lib/module/core/OxyServices.js.map +1 -1
- package/lib/module/i18n/index.js +35 -0
- package/lib/module/i18n/index.js.map +1 -0
- package/lib/module/i18n/locales/en-US.json +681 -0
- package/lib/module/i18n/locales/es-ES.json +689 -0
- package/lib/module/ui/components/GroupedItem.js +2 -1
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/Header.js +4 -3
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +109 -103
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +5 -1
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/components/Section.js +1 -1
- package/lib/module/ui/components/StepBasedScreen.js +16 -16
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +15 -3
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +9 -4
- package/lib/module/ui/components/internal/PinInput.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +128 -12
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/useI18n.js +18 -0
- package/lib/module/ui/hooks/useI18n.js.map +1 -0
- package/lib/module/ui/navigation/OxyRouter.js +7 -124
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +122 -0
- package/lib/module/ui/navigation/routes.js.map +1 -0
- package/lib/module/ui/navigation/types.js +19 -1
- package/lib/module/ui/navigation/types.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +55 -47
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +69 -61
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +378 -37
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +52 -34
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +40 -36
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +107 -80
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +92 -60
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +21 -11
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +30 -8
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +47 -26
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +31 -24
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +11 -7
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +12 -6
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +11 -7
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +15 -11
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +19 -27
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +8 -4
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +14 -10
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +7 -3
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/screens/steps/RecoverRequestStep.js +19 -14
- package/lib/module/ui/screens/steps/RecoverRequestStep.js.map +1 -1
- package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js +125 -0
- package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js.map +1 -0
- package/lib/module/ui/screens/steps/RecoverSuccessStep.js +13 -13
- package/lib/module/ui/screens/steps/RecoverSuccessStep.js.map +1 -1
- package/lib/module/ui/screens/steps/RecoverVerifyStep.js +14 -20
- package/lib/module/ui/screens/steps/RecoverVerifyStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignInPasswordStep.js +22 -8
- package/lib/module/ui/screens/steps/SignInPasswordStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignInTotpStep.js +156 -0
- package/lib/module/ui/screens/steps/SignInTotpStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignInUsernameStep.js +12 -6
- package/lib/module/ui/screens/steps/SignInUsernameStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignUpIdentityStep.js +10 -6
- package/lib/module/ui/screens/steps/SignUpIdentityStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignUpSecurityStep.js +10 -6
- package/lib/module/ui/screens/steps/SignUpSecurityStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignUpSummaryStep.js +34 -4
- package/lib/module/ui/screens/steps/SignUpSummaryStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignUpWelcomeStep.js +9 -10
- package/lib/module/ui/screens/steps/SignUpWelcomeStep.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +1 -2
- package/lib/module/ui/styles/authStyles.js.map +1 -1
- package/lib/module/utils/deviceManager.js +1 -1
- package/lib/module/utils/deviceManager.js.map +1 -1
- package/lib/module/utils/validationUtils.js +4 -2
- package/lib/module/utils/validationUtils.js.map +1 -1
- package/lib/typescript/core/OxyServices.d.ts +57 -3
- package/lib/typescript/core/OxyServices.d.ts.map +1 -1
- package/lib/typescript/i18n/index.d.ts +4 -0
- package/lib/typescript/i18n/index.d.ts.map +1 -0
- package/lib/typescript/models/interfaces.d.ts +4 -0
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/ui/components/Header.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -1
- package/lib/typescript/ui/components/StepBasedScreen.d.ts +2 -1
- package/lib/typescript/ui/components/StepBasedScreen.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 +6 -3
- package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +7 -4
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useI18n.d.ts +5 -0
- package/lib/typescript/ui/hooks/useI18n.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/routes.d.ts +9 -0
- package/lib/typescript/ui/navigation/routes.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/types.d.ts +24 -10
- 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/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +2 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts +4 -1
- package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts +24 -0
- package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts +2 -1
- package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts +3 -1
- package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts +1 -0
- package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts +19 -0
- package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts +2 -1
- package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts +2 -1
- package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts +2 -1
- package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts +2 -1
- package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts +2 -1
- package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts.map +1 -1
- package/lib/typescript/ui/styles/authStyles.d.ts +0 -1
- package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -1
- package/lib/typescript/utils/validationUtils.d.ts.map +1 -1
- package/package.json +49 -15
- package/src/core/OxyServices.ts +138 -19
- package/src/i18n/index.ts +39 -0
- package/src/i18n/locales/en-US.json +681 -0
- package/src/i18n/locales/es-ES.json +689 -0
- package/src/models/interfaces.ts +6 -1
- package/src/ui/components/GroupedItem.tsx +2 -1
- package/src/ui/components/Header.tsx +4 -3
- package/src/ui/components/OxyProvider.tsx +105 -112
- package/src/ui/components/ProfileCard.tsx +5 -1
- package/src/ui/components/Section.tsx +1 -1
- package/src/ui/components/StepBasedScreen.tsx +16 -13
- package/src/ui/components/internal/GroupedPillButtons.tsx +10 -6
- package/src/ui/components/internal/PinInput.tsx +15 -6
- package/src/ui/context/OxyContext.tsx +123 -20
- package/src/ui/hooks/useI18n.ts +12 -0
- package/src/ui/navigation/OxyRouter.tsx +15 -134
- package/src/ui/navigation/routes.ts +153 -0
- package/src/ui/navigation/types.ts +28 -10
- package/src/ui/screens/AccountCenterScreen.tsx +47 -45
- package/src/ui/screens/AccountOverviewScreen.tsx +68 -70
- package/src/ui/screens/AccountSettingsScreen.tsx +265 -41
- package/src/ui/screens/AccountSwitcherScreen.tsx +35 -33
- package/src/ui/screens/FeedbackScreen.tsx +39 -37
- package/src/ui/screens/LanguageSelectorScreen.tsx +99 -70
- package/src/ui/screens/PaymentGatewayScreen.tsx +5 -5
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +56 -54
- package/src/ui/screens/ProfileScreen.tsx +14 -8
- package/src/ui/screens/RecoverAccountScreen.tsx +29 -8
- package/src/ui/screens/SignInScreen.tsx +39 -30
- package/src/ui/screens/WelcomeNewUserScreen.tsx +31 -17
- package/src/ui/screens/internal/SignInPasswordStep.tsx +11 -8
- package/src/ui/screens/internal/SignInUsernameStep.tsx +10 -8
- package/src/ui/screens/karma/KarmaAboutScreen.tsx +23 -11
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +21 -11
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +15 -33
- package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +6 -4
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +28 -10
- package/src/ui/screens/karma/KarmaRulesScreen.tsx +5 -3
- package/src/ui/screens/steps/RecoverRequestStep.tsx +20 -17
- package/src/ui/screens/steps/RecoverResetPasswordStep.tsx +133 -0
- package/src/ui/screens/steps/RecoverSuccessStep.tsx +12 -19
- package/src/ui/screens/steps/RecoverVerifyStep.tsx +15 -24
- package/src/ui/screens/steps/SignInPasswordStep.tsx +19 -6
- package/src/ui/screens/steps/SignInTotpStep.tsx +129 -0
- package/src/ui/screens/steps/SignInUsernameStep.tsx +11 -10
- package/src/ui/screens/steps/SignUpIdentityStep.tsx +10 -11
- package/src/ui/screens/steps/SignUpSecurityStep.tsx +10 -11
- package/src/ui/screens/steps/SignUpSummaryStep.tsx +24 -9
- package/src/ui/screens/steps/SignUpWelcomeStep.tsx +8 -14
- package/src/ui/styles/authStyles.ts +0 -1
- package/src/utils/deviceManager.ts +1 -1
- package/src/utils/validationUtils.ts +5 -3
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { OxyServices } from '../../core';
|
|
2
2
|
import type { User } from '../../models/interfaces';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
4
|
import type { QueryClient } from '@tanstack/react-query';
|
|
5
|
+
import type { RouteName } from './routes';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Base props for all screens in the Oxy UI system
|
|
8
9
|
*/
|
|
9
10
|
export interface BaseScreenProps {
|
|
10
11
|
oxyServices: OxyServices;
|
|
11
|
-
navigate: (screen:
|
|
12
|
+
navigate: (screen: RouteName, props?: Record<string, unknown>) => void;
|
|
12
13
|
goBack: () => void;
|
|
13
14
|
onClose?: () => void;
|
|
14
15
|
onAuthenticated?: (user: User) => void;
|
|
@@ -22,22 +23,21 @@ export interface BaseScreenProps {
|
|
|
22
23
|
/**
|
|
23
24
|
* Route configuration for OxyRouter
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
26
|
+
// Route config moved to routes.ts to avoid cycles; re-exported here if needed
|
|
27
|
+
export { routes } from './routes';
|
|
28
|
+
export type { RouteName } from './routes';
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Props for OxyRouter component
|
|
32
32
|
*/
|
|
33
33
|
export interface OxyRouterProps {
|
|
34
34
|
oxyServices: OxyServices;
|
|
35
|
-
initialScreen:
|
|
35
|
+
initialScreen: RouteName;
|
|
36
36
|
onClose?: () => void;
|
|
37
37
|
onAuthenticated?: (user: User) => void;
|
|
38
38
|
theme: 'light' | 'dark';
|
|
39
39
|
adjustSnapPoints?: (snapPoints: string[]) => void;
|
|
40
|
-
navigationRef?: React.MutableRefObject<((screen:
|
|
40
|
+
navigationRef?: React.MutableRefObject<((screen: RouteName, props?: Record<string, unknown>) => void) | null>;
|
|
41
41
|
containerWidth?: number;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -59,7 +59,7 @@ export interface OxyProviderProps {
|
|
|
59
59
|
* Initial screen to display
|
|
60
60
|
* @default "SignIn"
|
|
61
61
|
*/
|
|
62
|
-
initialScreen?:
|
|
62
|
+
initialScreen?: RouteName;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Callback when the bottom sheet is closed
|
|
@@ -83,7 +83,7 @@ export interface OxyProviderProps {
|
|
|
83
83
|
* @deprecated External bottom sheet ref is no longer required as OxyProvider handles the bottom sheet internally
|
|
84
84
|
* @hidden
|
|
85
85
|
*/
|
|
86
|
-
bottomSheetRef?: React.RefObject<
|
|
86
|
+
bottomSheetRef?: React.RefObject<BottomSheetController | null>;
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* Whether to automatically present the bottom sheet when component mounts
|
|
@@ -144,4 +144,22 @@ export interface OxyProviderProps {
|
|
|
144
144
|
* Optional QueryClient instance for React Query. If not provided, a sensible default is created.
|
|
145
145
|
*/
|
|
146
146
|
queryClient?: QueryClient;
|
|
147
|
+
|
|
148
|
+
appInsets?: {
|
|
149
|
+
top: number;
|
|
150
|
+
right: number;
|
|
151
|
+
bottom: number;
|
|
152
|
+
left: number;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Typed imperative controller for the bottom sheet UI
|
|
157
|
+
export interface BottomSheetController {
|
|
158
|
+
present: () => void;
|
|
159
|
+
dismiss: () => void;
|
|
160
|
+
expand: () => void;
|
|
161
|
+
collapse: () => void;
|
|
162
|
+
snapToIndex: (index: number) => void;
|
|
163
|
+
snapToPosition: (position: number | string) => void;
|
|
164
|
+
navigate: (screen: RouteName | string, props?: Record<string, any>) => void;
|
|
147
165
|
}
|
|
@@ -21,6 +21,7 @@ import Section from '../components/Section';
|
|
|
21
21
|
import QuickActions from '../components/QuickActions';
|
|
22
22
|
import GroupedSection from '../components/GroupedSection';
|
|
23
23
|
import GroupedItem from '../components/GroupedItem';
|
|
24
|
+
import { useI18n } from '../hooks/useI18n';
|
|
24
25
|
|
|
25
26
|
const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
26
27
|
onClose,
|
|
@@ -28,6 +29,7 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
28
29
|
navigate,
|
|
29
30
|
}) => {
|
|
30
31
|
const { user, logout, isLoading, sessions, isAuthenticated } = useOxy();
|
|
32
|
+
const { t } = useI18n();
|
|
31
33
|
|
|
32
34
|
const isDarkTheme = theme === 'dark';
|
|
33
35
|
const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
|
|
@@ -45,13 +47,13 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
45
47
|
}
|
|
46
48
|
} catch (error) {
|
|
47
49
|
console.error('Logout failed:', error);
|
|
48
|
-
toast.error('There was a problem signing you out. Please try again.');
|
|
50
|
+
toast.error(t('common.errors.signOutFailed') || 'There was a problem signing you out. Please try again.');
|
|
49
51
|
}
|
|
50
52
|
};
|
|
51
53
|
|
|
52
54
|
const confirmLogout = () => {
|
|
53
55
|
confirmAction(
|
|
54
|
-
'Are you sure you want to sign out?',
|
|
56
|
+
t('common.confirms.signOut') || 'Are you sure you want to sign out?',
|
|
55
57
|
handleLogout
|
|
56
58
|
);
|
|
57
59
|
};
|
|
@@ -59,7 +61,7 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
59
61
|
if (!isAuthenticated) {
|
|
60
62
|
return (
|
|
61
63
|
<View style={[styles.container, { backgroundColor }]}>
|
|
62
|
-
<Text style={[styles.message, { color: textColor }]}>Not signed in</Text>
|
|
64
|
+
<Text style={[styles.message, { color: textColor }]}>{t('common.status.notSignedIn') || 'Not signed in'}</Text>
|
|
63
65
|
</View>
|
|
64
66
|
);
|
|
65
67
|
}
|
|
@@ -87,71 +89,71 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
87
89
|
|
|
88
90
|
<ScrollView style={styles.scrollView} contentContainerStyle={styles.scrollContainer} showsVerticalScrollIndicator={false}>
|
|
89
91
|
{/* Quick Actions */}
|
|
90
|
-
<Section title=
|
|
92
|
+
<Section title={t('accountCenter.sections.quickActions') || 'Quick Actions'} theme={theme} isFirst={true}>
|
|
91
93
|
<QuickActions
|
|
92
94
|
actions={[
|
|
93
|
-
{ id: 'overview', icon: 'person-circle', iconColor: '#007AFF', title: 'Overview', onPress: () => navigate('AccountOverview') },
|
|
94
|
-
{ id: 'settings', icon: 'settings', iconColor: '#5856D6', title: 'Edit Profile', onPress: () => navigate('EditProfile') },
|
|
95
|
-
{ id: 'sessions', icon: 'shield-checkmark', iconColor: '#30D158', title: 'Sessions', onPress: () => navigate('SessionManagement') },
|
|
96
|
-
{ id: 'premium', icon: 'star', iconColor: '#FFD700', title: 'Premium', onPress: () => navigate('PremiumSubscription') },
|
|
97
|
-
...(user?.isPremium ? [{ id: 'billing', icon: 'card', iconColor: '#34C759', title: 'Billing', onPress: () => navigate('') }] : []),
|
|
98
|
-
...(sessions && sessions.length > 1 ? [{ id: 'switch', icon: 'swap-horizontal', iconColor: '#FF9500', title: 'Switch', onPress: () => navigate('AccountSwitcher') }] : []),
|
|
95
|
+
{ id: 'overview', icon: 'person-circle', iconColor: '#007AFF', title: t('accountCenter.quickActions.overview') || 'Overview', onPress: () => navigate('AccountOverview') },
|
|
96
|
+
{ id: 'settings', icon: 'settings', iconColor: '#5856D6', title: t('accountCenter.quickActions.editProfile') || 'Edit Profile', onPress: () => navigate('EditProfile') },
|
|
97
|
+
{ id: 'sessions', icon: 'shield-checkmark', iconColor: '#30D158', title: t('accountCenter.quickActions.sessions') || 'Sessions', onPress: () => navigate('SessionManagement') },
|
|
98
|
+
{ id: 'premium', icon: 'star', iconColor: '#FFD700', title: t('accountCenter.quickActions.premium') || 'Premium', onPress: () => navigate('PremiumSubscription') },
|
|
99
|
+
...(user?.isPremium ? [{ id: 'billing', icon: 'card', iconColor: '#34C759', title: t('accountCenter.quickActions.billing') || 'Billing', onPress: () => navigate('PaymentGateway') }] : []),
|
|
100
|
+
...(sessions && sessions.length > 1 ? [{ id: 'switch', icon: 'swap-horizontal', iconColor: '#FF9500', title: t('accountCenter.quickActions.switch') || 'Switch', onPress: () => navigate('AccountSwitcher') }] : []),
|
|
99
101
|
]}
|
|
100
102
|
theme={theme}
|
|
101
103
|
/>
|
|
102
104
|
</Section>
|
|
103
105
|
|
|
104
106
|
{/* Account Management */}
|
|
105
|
-
<Section title=
|
|
107
|
+
<Section title={t('accountCenter.sections.accountManagement') || 'Account Management'} theme={theme}>
|
|
106
108
|
<GroupedSection
|
|
107
109
|
items={[
|
|
108
110
|
{
|
|
109
111
|
id: 'overview',
|
|
110
112
|
icon: 'person-circle',
|
|
111
113
|
iconColor: '#007AFF',
|
|
112
|
-
title: 'Account Overview',
|
|
113
|
-
subtitle: 'Complete account information',
|
|
114
|
+
title: t('accountCenter.items.accountOverview.title') || 'Account Overview',
|
|
115
|
+
subtitle: t('accountCenter.items.accountOverview.subtitle') || 'Complete account information',
|
|
114
116
|
onPress: () => navigate('AccountOverview'),
|
|
115
117
|
},
|
|
116
118
|
{
|
|
117
119
|
id: 'settings',
|
|
118
120
|
icon: 'settings',
|
|
119
121
|
iconColor: '#5856D6',
|
|
120
|
-
title: 'Edit Profile',
|
|
121
|
-
subtitle: 'Manage your profile and preferences',
|
|
122
|
+
title: t('accountCenter.items.editProfile.title') || 'Edit Profile',
|
|
123
|
+
subtitle: t('accountCenter.items.editProfile.subtitle') || 'Manage your profile and preferences',
|
|
122
124
|
onPress: () => navigate('EditProfile'),
|
|
123
125
|
},
|
|
124
126
|
{
|
|
125
127
|
id: 'sessions',
|
|
126
128
|
icon: 'shield-checkmark',
|
|
127
129
|
iconColor: '#30D158',
|
|
128
|
-
title: 'Manage Sessions',
|
|
129
|
-
subtitle: 'Security and active devices',
|
|
130
|
+
title: t('accountCenter.items.manageSessions.title') || 'Manage Sessions',
|
|
131
|
+
subtitle: t('accountCenter.items.manageSessions.subtitle') || 'Security and active devices',
|
|
130
132
|
onPress: () => navigate('SessionManagement'),
|
|
131
133
|
},
|
|
132
134
|
{
|
|
133
135
|
id: 'files',
|
|
134
136
|
icon: 'folder',
|
|
135
137
|
iconColor: '#FF9500',
|
|
136
|
-
title: 'File Management',
|
|
137
|
-
subtitle: 'Upload, download, and manage your files',
|
|
138
|
+
title: t('accountCenter.items.fileManagement.title') || 'File Management',
|
|
139
|
+
subtitle: t('accountCenter.items.fileManagement.subtitle') || 'Upload, download, and manage your files',
|
|
138
140
|
onPress: () => navigate('FileManagement'),
|
|
139
141
|
},
|
|
140
142
|
{
|
|
141
143
|
id: 'premium',
|
|
142
144
|
icon: 'star',
|
|
143
145
|
iconColor: '#FFD700',
|
|
144
|
-
title: 'Oxy+ Subscriptions',
|
|
145
|
-
subtitle: user?.isPremium ? 'Manage your premium plan' : 'Upgrade to premium features',
|
|
146
|
+
title: t('accountCenter.items.premium.title') || 'Oxy+ Subscriptions',
|
|
147
|
+
subtitle: user?.isPremium ? (t('accountCenter.items.premium.manage') || 'Manage your premium plan') : (t('accountCenter.items.premium.upgrade') || 'Upgrade to premium features'),
|
|
146
148
|
onPress: () => navigate('PremiumSubscription'),
|
|
147
149
|
},
|
|
148
150
|
...(user?.isPremium ? [{
|
|
149
151
|
id: 'billing',
|
|
150
152
|
icon: 'card',
|
|
151
153
|
iconColor: '#34C759',
|
|
152
|
-
title: 'Billing Management',
|
|
153
|
-
subtitle: 'Payment methods and invoices',
|
|
154
|
-
onPress: () => navigate(''),
|
|
154
|
+
title: t('accountCenter.items.billing.title') || 'Billing Management',
|
|
155
|
+
subtitle: t('accountCenter.items.billing.subtitle') || 'Payment methods and invoices',
|
|
156
|
+
onPress: () => navigate('PaymentGateway'),
|
|
155
157
|
}] : []),
|
|
156
158
|
]}
|
|
157
159
|
theme={theme}
|
|
@@ -160,23 +162,23 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
160
162
|
|
|
161
163
|
{/* Multi-Account Management */}
|
|
162
164
|
{sessions && sessions.length > 1 && (
|
|
163
|
-
<Section title=
|
|
165
|
+
<Section title={t('accountCenter.sections.multiAccount') || 'Multi-Account'} theme={theme}>
|
|
164
166
|
<GroupedSection
|
|
165
167
|
items={[
|
|
166
168
|
{
|
|
167
169
|
id: 'switch',
|
|
168
170
|
icon: 'people',
|
|
169
171
|
iconColor: '#FF9500',
|
|
170
|
-
title: 'Switch Account',
|
|
171
|
-
subtitle: `${sessions.length} accounts available`,
|
|
172
|
+
title: t('accountCenter.items.switchAccount.title') || 'Switch Account',
|
|
173
|
+
subtitle: t('accountCenter.items.switchAccount.subtitle', { count: sessions.length }) || `${sessions.length} accounts available`,
|
|
172
174
|
onPress: () => navigate('AccountSwitcher'),
|
|
173
175
|
},
|
|
174
176
|
{
|
|
175
177
|
id: 'add',
|
|
176
178
|
icon: 'person-add',
|
|
177
179
|
iconColor: '#30D158',
|
|
178
|
-
title: 'Add Another Account',
|
|
179
|
-
subtitle: 'Sign in with a different account',
|
|
180
|
+
title: t('accountCenter.items.addAccount.title') || 'Add Another Account',
|
|
181
|
+
subtitle: t('accountCenter.items.addAccount.subtitle') || 'Sign in with a different account',
|
|
180
182
|
onPress: () => navigate('SignIn'),
|
|
181
183
|
},
|
|
182
184
|
]}
|
|
@@ -187,15 +189,15 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
187
189
|
|
|
188
190
|
{/* Single Account Setup */}
|
|
189
191
|
{(!sessions || sessions.length <= 1) && (
|
|
190
|
-
<Section title=
|
|
192
|
+
<Section title={t('accountCenter.sections.addAccount') || 'Add Account'} theme={theme}>
|
|
191
193
|
<GroupedSection
|
|
192
194
|
items={[
|
|
193
195
|
{
|
|
194
196
|
id: 'add',
|
|
195
197
|
icon: 'person-add',
|
|
196
198
|
iconColor: '#30D158',
|
|
197
|
-
title: 'Add Another Account',
|
|
198
|
-
subtitle: 'Sign in with a different account',
|
|
199
|
+
title: t('accountCenter.items.addAccount.title') || 'Add Another Account',
|
|
200
|
+
subtitle: t('accountCenter.items.addAccount.subtitle') || 'Sign in with a different account',
|
|
199
201
|
onPress: () => navigate('SignIn'),
|
|
200
202
|
},
|
|
201
203
|
]}
|
|
@@ -205,39 +207,39 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
205
207
|
)}
|
|
206
208
|
|
|
207
209
|
{/* Additional Options */}
|
|
208
|
-
<Section title=
|
|
210
|
+
<Section title={t('accountCenter.sections.moreOptions') || 'More Options'} theme={theme}>
|
|
209
211
|
<GroupedSection
|
|
210
212
|
items={[
|
|
211
213
|
...(Platform.OS !== 'web' ? [{
|
|
212
214
|
id: 'notifications',
|
|
213
215
|
icon: 'notifications',
|
|
214
216
|
iconColor: '#FF9500',
|
|
215
|
-
title: 'Notifications',
|
|
216
|
-
subtitle: 'Manage notification settings',
|
|
217
|
-
onPress: () => toast.info('Notifications feature coming soon!'),
|
|
217
|
+
title: t('accountCenter.items.notifications.title') || 'Notifications',
|
|
218
|
+
subtitle: t('accountCenter.items.notifications.subtitle') || 'Manage notification settings',
|
|
219
|
+
onPress: () => toast.info(t('accountCenter.items.notifications.coming') || 'Notifications feature coming soon!'),
|
|
218
220
|
}] : []),
|
|
219
221
|
{
|
|
220
222
|
id: 'language',
|
|
221
223
|
icon: 'language',
|
|
222
224
|
iconColor: '#32D74B',
|
|
223
|
-
title: 'Language',
|
|
224
|
-
subtitle: 'Choose your preferred language',
|
|
225
|
+
title: t('language.title') || 'Language',
|
|
226
|
+
subtitle: t('language.subtitle') || 'Choose your preferred language',
|
|
225
227
|
onPress: () => navigate('LanguageSelector'),
|
|
226
228
|
},
|
|
227
229
|
{
|
|
228
230
|
id: 'help',
|
|
229
231
|
icon: 'help-circle',
|
|
230
232
|
iconColor: '#007AFF',
|
|
231
|
-
title: 'Help & Support',
|
|
232
|
-
subtitle: 'Get help and contact support',
|
|
233
|
-
onPress: () => toast.info('Help & Support feature coming soon!'),
|
|
233
|
+
title: t('accountOverview.items.help.title') || 'Help & Support',
|
|
234
|
+
subtitle: t('accountOverview.items.help.subtitle') || 'Get help and contact support',
|
|
235
|
+
onPress: () => toast.info(t('accountOverview.items.help.coming') || 'Help & Support feature coming soon!'),
|
|
234
236
|
},
|
|
235
237
|
{
|
|
236
238
|
id: 'appinfo',
|
|
237
239
|
icon: 'information-circle',
|
|
238
240
|
iconColor: '#8E8E93',
|
|
239
|
-
title: 'App Information',
|
|
240
|
-
subtitle: 'Version and system details',
|
|
241
|
+
title: t('accountCenter.items.appInfo.title') || 'App Information',
|
|
242
|
+
subtitle: t('accountCenter.items.appInfo.subtitle') || 'Version and system details',
|
|
241
243
|
onPress: () => navigate('AppInfo'),
|
|
242
244
|
},
|
|
243
245
|
]}
|
|
@@ -250,7 +252,7 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
250
252
|
<GroupedItem
|
|
251
253
|
icon="log-out"
|
|
252
254
|
iconColor={dangerColor}
|
|
253
|
-
title={isLoading ?
|
|
255
|
+
title={isLoading ? (t('accountCenter.signingOut') || 'Signing out...') : (t('common.actions.signOut') || 'Sign Out')}
|
|
254
256
|
theme={theme}
|
|
255
257
|
onPress={confirmLogout}
|
|
256
258
|
isFirst={true}
|
|
@@ -265,7 +267,7 @@ const AccountCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
265
267
|
|
|
266
268
|
<View style={styles.versionContainer}>
|
|
267
269
|
<Text style={[styles.versionText, { color: isDarkTheme ? '#666666' : '#999999' }]}>
|
|
268
|
-
Version {packageInfo.version}
|
|
270
|
+
{t('accountCenter.version', { version: packageInfo.version }) || `Version ${packageInfo.version}`}
|
|
269
271
|
</Text>
|
|
270
272
|
</View>
|
|
271
273
|
</ScrollView>
|