@oxyhq/services 5.11.12 → 5.12.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 +48 -7
- package/lib/commonjs/core/OxyServices.js +168 -5
- 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 +168 -5
- 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 +58 -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 +48 -14
- package/src/core/OxyServices.ts +143 -9
- 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
|
@@ -13,12 +13,13 @@ import { useOxy } from '../context/OxyContext';
|
|
|
13
13
|
import { useThemeColors } from '../styles';
|
|
14
14
|
import { Ionicons } from '@expo/vector-icons';
|
|
15
15
|
import { toast } from '../../lib/sonner';
|
|
16
|
-
import { Header, GroupedSection } from '../components';
|
|
16
|
+
import { Header, Section, GroupedSection } from '../components';
|
|
17
|
+
import { useI18n } from '../hooks/useI18n';
|
|
17
18
|
|
|
18
19
|
// Supported languages with their metadata
|
|
19
20
|
const SUPPORTED_LANGUAGES = [
|
|
20
21
|
{
|
|
21
|
-
id: 'en',
|
|
22
|
+
id: 'en-US',
|
|
22
23
|
name: 'English',
|
|
23
24
|
nativeName: 'English',
|
|
24
25
|
flag: '🇺🇸',
|
|
@@ -26,7 +27,7 @@ const SUPPORTED_LANGUAGES = [
|
|
|
26
27
|
color: '#007AFF',
|
|
27
28
|
},
|
|
28
29
|
{
|
|
29
|
-
id: 'es',
|
|
30
|
+
id: 'es-ES',
|
|
30
31
|
name: 'Spanish',
|
|
31
32
|
nativeName: 'Español',
|
|
32
33
|
flag: '🇪🇸',
|
|
@@ -34,7 +35,15 @@ const SUPPORTED_LANGUAGES = [
|
|
|
34
35
|
color: '#FF3B30',
|
|
35
36
|
},
|
|
36
37
|
{
|
|
37
|
-
id: '
|
|
38
|
+
id: 'ca-ES',
|
|
39
|
+
name: 'Catalan',
|
|
40
|
+
nativeName: 'Català',
|
|
41
|
+
flag: '🇪🇸',
|
|
42
|
+
icon: 'language-outline',
|
|
43
|
+
color: '#0CA678',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'fr-FR',
|
|
38
47
|
name: 'French',
|
|
39
48
|
nativeName: 'Français',
|
|
40
49
|
flag: '🇫🇷',
|
|
@@ -42,7 +51,7 @@ const SUPPORTED_LANGUAGES = [
|
|
|
42
51
|
color: '#5856D6',
|
|
43
52
|
},
|
|
44
53
|
{
|
|
45
|
-
id: 'de',
|
|
54
|
+
id: 'de-DE',
|
|
46
55
|
name: 'German',
|
|
47
56
|
nativeName: 'Deutsch',
|
|
48
57
|
flag: '🇩🇪',
|
|
@@ -50,7 +59,7 @@ const SUPPORTED_LANGUAGES = [
|
|
|
50
59
|
color: '#FF9500',
|
|
51
60
|
},
|
|
52
61
|
{
|
|
53
|
-
id: 'it',
|
|
62
|
+
id: 'it-IT',
|
|
54
63
|
name: 'Italian',
|
|
55
64
|
nativeName: 'Italiano',
|
|
56
65
|
flag: '🇮🇹',
|
|
@@ -58,7 +67,7 @@ const SUPPORTED_LANGUAGES = [
|
|
|
58
67
|
color: '#34C759',
|
|
59
68
|
},
|
|
60
69
|
{
|
|
61
|
-
id: 'pt',
|
|
70
|
+
id: 'pt-PT',
|
|
62
71
|
name: 'Portuguese',
|
|
63
72
|
nativeName: 'Português',
|
|
64
73
|
flag: '🇵🇹',
|
|
@@ -66,7 +75,7 @@ const SUPPORTED_LANGUAGES = [
|
|
|
66
75
|
color: '#AF52DE',
|
|
67
76
|
},
|
|
68
77
|
{
|
|
69
|
-
id: 'ja',
|
|
78
|
+
id: 'ja-JP',
|
|
70
79
|
name: 'Japanese',
|
|
71
80
|
nativeName: '日本語',
|
|
72
81
|
flag: '🇯🇵',
|
|
@@ -74,7 +83,7 @@ const SUPPORTED_LANGUAGES = [
|
|
|
74
83
|
color: '#FF2D92',
|
|
75
84
|
},
|
|
76
85
|
{
|
|
77
|
-
id: 'ko',
|
|
86
|
+
id: 'ko-KR',
|
|
78
87
|
name: 'Korean',
|
|
79
88
|
nativeName: '한국어',
|
|
80
89
|
flag: '🇰🇷',
|
|
@@ -82,7 +91,7 @@ const SUPPORTED_LANGUAGES = [
|
|
|
82
91
|
color: '#32D74B',
|
|
83
92
|
},
|
|
84
93
|
{
|
|
85
|
-
id: 'zh',
|
|
94
|
+
id: 'zh-CN',
|
|
86
95
|
name: 'Chinese',
|
|
87
96
|
nativeName: '中文',
|
|
88
97
|
flag: '🇨🇳',
|
|
@@ -90,7 +99,7 @@ const SUPPORTED_LANGUAGES = [
|
|
|
90
99
|
color: '#FF9F0A',
|
|
91
100
|
},
|
|
92
101
|
{
|
|
93
|
-
id: 'ar',
|
|
102
|
+
id: 'ar-SA',
|
|
94
103
|
name: 'Arabic',
|
|
95
104
|
nativeName: 'العربية',
|
|
96
105
|
flag: '🇸🇦',
|
|
@@ -103,10 +112,12 @@ interface LanguageSelectorScreenProps extends BaseScreenProps { }
|
|
|
103
112
|
|
|
104
113
|
const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
|
|
105
114
|
goBack,
|
|
115
|
+
onClose,
|
|
106
116
|
theme,
|
|
107
117
|
navigate,
|
|
108
118
|
}) => {
|
|
109
|
-
const { user, currentLanguage, setLanguage } = useOxy();
|
|
119
|
+
const { user, currentLanguage, setLanguage, oxyServices, isAuthenticated } = useOxy();
|
|
120
|
+
const { t } = useI18n();
|
|
110
121
|
const colors = useThemeColors(theme);
|
|
111
122
|
const [isLoading, setIsLoading] = useState(false);
|
|
112
123
|
|
|
@@ -118,14 +129,24 @@ const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
|
|
|
118
129
|
setIsLoading(true);
|
|
119
130
|
|
|
120
131
|
try {
|
|
121
|
-
//
|
|
132
|
+
// If signed in, persist preference to backend user settings
|
|
133
|
+
if (isAuthenticated && user?.id) {
|
|
134
|
+
try {
|
|
135
|
+
await oxyServices.updateProfile({ language: languageId });
|
|
136
|
+
} catch (e: any) {
|
|
137
|
+
console.warn('Failed to update language on server, falling back to local storage', e);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Always persist locally for immediate UX and for guests
|
|
122
142
|
await setLanguage(languageId);
|
|
123
143
|
|
|
124
144
|
const selectedLang = SUPPORTED_LANGUAGES.find(lang => lang.id === languageId);
|
|
125
|
-
toast.success(
|
|
145
|
+
toast.success(t('language.changed', { lang: selectedLang?.name || languageId }));
|
|
126
146
|
|
|
127
147
|
setIsLoading(false);
|
|
128
|
-
|
|
148
|
+
// Close the bottom sheet if possible; otherwise, go back
|
|
149
|
+
if (onClose) onClose(); else goBack();
|
|
129
150
|
|
|
130
151
|
} catch (error) {
|
|
131
152
|
console.error('Error saving language preference:', error);
|
|
@@ -139,46 +160,76 @@ const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
|
|
|
139
160
|
id: language.id,
|
|
140
161
|
title: language.name,
|
|
141
162
|
subtitle: language.nativeName,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
selected: currentLanguage === language.id,
|
|
145
|
-
onPress: () => handleLanguageSelect(language.id),
|
|
146
|
-
customContent: (
|
|
147
|
-
<View style={styles.languageFlag}>
|
|
163
|
+
customIcon: (
|
|
164
|
+
<View style={[styles.languageFlag, { backgroundColor: `${language.color}20` }]}>
|
|
148
165
|
<Text style={styles.flagEmoji}>{language.flag}</Text>
|
|
149
166
|
</View>
|
|
150
167
|
),
|
|
168
|
+
iconColor: language.color,
|
|
169
|
+
selected: currentLanguage === language.id,
|
|
170
|
+
onPress: () => handleLanguageSelect(language.id),
|
|
171
|
+
dense: true,
|
|
151
172
|
}));
|
|
152
173
|
|
|
153
174
|
return (
|
|
154
|
-
<View style={[styles.container, { backgroundColor:
|
|
175
|
+
<View style={[styles.container, { backgroundColor: '#f2f2f2' }]}>
|
|
155
176
|
<Header
|
|
156
|
-
title=
|
|
157
|
-
subtitle=
|
|
177
|
+
title={t('language.title')}
|
|
178
|
+
subtitle={t('language.subtitle')}
|
|
158
179
|
theme={theme}
|
|
159
|
-
onBack={goBack}
|
|
180
|
+
onBack={onClose || goBack}
|
|
181
|
+
variant="minimal"
|
|
160
182
|
elevation="subtle"
|
|
161
183
|
/>
|
|
162
184
|
|
|
163
185
|
<ScrollView style={styles.content} showsVerticalScrollIndicator={false}>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
186
|
+
{/* Current selection */}
|
|
187
|
+
{currentLanguage && (
|
|
188
|
+
<Section title={t('language.current')} theme={theme} isFirst={true}>
|
|
189
|
+
{(() => {
|
|
190
|
+
const current = SUPPORTED_LANGUAGES.find(lang => lang.id === currentLanguage);
|
|
191
|
+
if (!current) return null;
|
|
192
|
+
return (
|
|
193
|
+
<GroupedSection
|
|
194
|
+
items={[
|
|
195
|
+
{
|
|
196
|
+
id: `current-${current.id}`,
|
|
197
|
+
title: current.name,
|
|
198
|
+
subtitle: current.nativeName,
|
|
199
|
+
customIcon: (
|
|
200
|
+
<View style={[styles.languageFlag, { backgroundColor: `${current.color}20` }]}>
|
|
201
|
+
<Text style={styles.flagEmoji}>{current.flag}</Text>
|
|
202
|
+
</View>
|
|
203
|
+
),
|
|
204
|
+
iconColor: current.color,
|
|
205
|
+
selected: false,
|
|
206
|
+
showChevron: false,
|
|
207
|
+
dense: true,
|
|
208
|
+
disabled: true,
|
|
209
|
+
},
|
|
210
|
+
]}
|
|
211
|
+
theme={theme}
|
|
212
|
+
/>
|
|
213
|
+
);
|
|
214
|
+
})()}
|
|
215
|
+
</Section>
|
|
216
|
+
)}
|
|
217
|
+
|
|
218
|
+
{/* Available languages */}
|
|
219
|
+
<Section title={t('language.available')} theme={theme}>
|
|
168
220
|
<Text style={[styles.sectionDescription, { color: colors.secondaryText }]}>
|
|
169
|
-
|
|
221
|
+
{t('language.subtitle')}
|
|
170
222
|
</Text>
|
|
171
|
-
|
|
172
223
|
<View style={styles.languageList}>
|
|
173
224
|
<GroupedSection
|
|
174
225
|
items={languageItems}
|
|
175
226
|
theme={theme}
|
|
176
227
|
/>
|
|
177
228
|
</View>
|
|
178
|
-
</
|
|
229
|
+
</Section>
|
|
179
230
|
|
|
180
|
-
{/* Information
|
|
181
|
-
<
|
|
231
|
+
{/* Information */}
|
|
232
|
+
<Section theme={theme}>
|
|
182
233
|
<View style={[styles.infoCard, {
|
|
183
234
|
backgroundColor: colors.inputBackground,
|
|
184
235
|
borderColor: colors.border
|
|
@@ -196,38 +247,7 @@ const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
|
|
|
196
247
|
• You can change this setting anytime
|
|
197
248
|
</Text>
|
|
198
249
|
</View>
|
|
199
|
-
</
|
|
200
|
-
|
|
201
|
-
{/* Current selection indicator */}
|
|
202
|
-
{currentLanguage && (
|
|
203
|
-
<View style={styles.currentSection}>
|
|
204
|
-
<Text style={[styles.currentLabel, { color: colors.secondaryText }]}>
|
|
205
|
-
Current Language
|
|
206
|
-
</Text>
|
|
207
|
-
<View style={[styles.currentLanguage, {
|
|
208
|
-
backgroundColor: colors.inputBackground,
|
|
209
|
-
borderColor: colors.primary
|
|
210
|
-
}]}>
|
|
211
|
-
{(() => {
|
|
212
|
-
const current = SUPPORTED_LANGUAGES.find(lang => lang.id === currentLanguage);
|
|
213
|
-
return current ? (
|
|
214
|
-
<>
|
|
215
|
-
<Text style={styles.currentFlag}>{current.flag}</Text>
|
|
216
|
-
<View style={styles.currentInfo}>
|
|
217
|
-
<Text style={[styles.currentName, { color: colors.text }]}>
|
|
218
|
-
{current.name}
|
|
219
|
-
</Text>
|
|
220
|
-
<Text style={[styles.currentNative, { color: colors.secondaryText }]}>
|
|
221
|
-
{current.nativeName}
|
|
222
|
-
</Text>
|
|
223
|
-
</View>
|
|
224
|
-
<Ionicons name="checkmark-circle" size={20} color={colors.primary} />
|
|
225
|
-
</>
|
|
226
|
-
) : null;
|
|
227
|
-
})()}
|
|
228
|
-
</View>
|
|
229
|
-
</View>
|
|
230
|
-
)}
|
|
250
|
+
</Section>
|
|
231
251
|
</ScrollView>
|
|
232
252
|
</View>
|
|
233
253
|
);
|
|
@@ -258,12 +278,14 @@ const styles = StyleSheet.create({
|
|
|
258
278
|
marginTop: 8,
|
|
259
279
|
},
|
|
260
280
|
languageFlag: {
|
|
281
|
+
width: 38,
|
|
282
|
+
height: 38,
|
|
283
|
+
borderRadius: 19,
|
|
261
284
|
alignItems: 'center',
|
|
262
285
|
justifyContent: 'center',
|
|
263
|
-
marginRight: 8,
|
|
264
286
|
},
|
|
265
287
|
flagEmoji: {
|
|
266
|
-
fontSize:
|
|
288
|
+
fontSize: 18,
|
|
267
289
|
},
|
|
268
290
|
infoSection: {
|
|
269
291
|
marginBottom: 24,
|
|
@@ -303,9 +325,16 @@ const styles = StyleSheet.create({
|
|
|
303
325
|
borderWidth: 2,
|
|
304
326
|
},
|
|
305
327
|
currentFlag: {
|
|
306
|
-
|
|
328
|
+
width: 38,
|
|
329
|
+
height: 38,
|
|
330
|
+
borderRadius: 19,
|
|
331
|
+
alignItems: 'center',
|
|
332
|
+
justifyContent: 'center',
|
|
307
333
|
marginRight: 12,
|
|
308
334
|
},
|
|
335
|
+
currentFlagEmoji: {
|
|
336
|
+
fontSize: 18,
|
|
337
|
+
},
|
|
309
338
|
currentInfo: {
|
|
310
339
|
flex: 1,
|
|
311
340
|
},
|
|
@@ -319,4 +348,4 @@ const styles = StyleSheet.create({
|
|
|
319
348
|
},
|
|
320
349
|
});
|
|
321
350
|
|
|
322
|
-
export default LanguageSelectorScreen;
|
|
351
|
+
export default LanguageSelectorScreen;
|
|
@@ -280,7 +280,7 @@ const PaymentGatewayScreen: React.FC<PaymentGatewayScreenProps> = (props) => {
|
|
|
280
280
|
if (onPaymentResult) {
|
|
281
281
|
onPaymentResult({ success: true });
|
|
282
282
|
}
|
|
283
|
-
navigate('
|
|
283
|
+
navigate('AccountOverview');
|
|
284
284
|
}, [onPaymentResult, navigate]);
|
|
285
285
|
|
|
286
286
|
// Handle close/cancel: return failure result if payment is not completed
|
|
@@ -343,14 +343,14 @@ const PaymentGatewayScreen: React.FC<PaymentGatewayScreenProps> = (props) => {
|
|
|
343
343
|
RNIap.initConnection()
|
|
344
344
|
.then(() => RNIap.getProducts({ skus: IAP_PRODUCT_IDS }))
|
|
345
345
|
.then(setIapProducts)
|
|
346
|
-
.catch(e => setIapError(e.message))
|
|
346
|
+
.catch((e: any) => setIapError(e.message))
|
|
347
347
|
.finally(() => setIapLoading(false));
|
|
348
|
-
purchaseUpdateSub = RNIap.purchaseUpdatedListener((purchase) => {
|
|
348
|
+
purchaseUpdateSub = RNIap.purchaseUpdatedListener((purchase: any) => {
|
|
349
349
|
setIapPurchase(purchase);
|
|
350
350
|
setSuccess(true);
|
|
351
351
|
nextStep();
|
|
352
352
|
});
|
|
353
|
-
purchaseErrorSub = RNIap.purchaseErrorListener((err) => {
|
|
353
|
+
purchaseErrorSub = RNIap.purchaseErrorListener((err: any) => {
|
|
354
354
|
setIapError(err.message);
|
|
355
355
|
});
|
|
356
356
|
return () => {
|
|
@@ -1616,4 +1616,4 @@ const createStyles = (colors: any, theme: string) => StyleSheet.create({
|
|
|
1616
1616
|
},
|
|
1617
1617
|
});
|
|
1618
1618
|
|
|
1619
|
-
export default PaymentGatewayScreen;
|
|
1619
|
+
export default PaymentGatewayScreen;
|