@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.
Files changed (322) hide show
  1. package/README.md +48 -7
  2. package/lib/commonjs/core/OxyServices.js +168 -5
  3. package/lib/commonjs/core/OxyServices.js.map +1 -1
  4. package/lib/commonjs/i18n/index.js +40 -0
  5. package/lib/commonjs/i18n/index.js.map +1 -0
  6. package/lib/commonjs/i18n/locales/en-US.json +681 -0
  7. package/lib/commonjs/i18n/locales/es-ES.json +689 -0
  8. package/lib/commonjs/ui/components/GroupedItem.js +2 -1
  9. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  10. package/lib/commonjs/ui/components/Header.js +4 -3
  11. package/lib/commonjs/ui/components/Header.js.map +1 -1
  12. package/lib/commonjs/ui/components/OxyProvider.js +110 -103
  13. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  14. package/lib/commonjs/ui/components/ProfileCard.js +5 -1
  15. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
  16. package/lib/commonjs/ui/components/Section.js +1 -1
  17. package/lib/commonjs/ui/components/StepBasedScreen.js +16 -16
  18. package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
  19. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +15 -3
  20. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
  21. package/lib/commonjs/ui/components/internal/PinInput.js +10 -4
  22. package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
  23. package/lib/commonjs/ui/context/OxyContext.js +128 -12
  24. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  25. package/lib/commonjs/ui/hooks/useI18n.js +22 -0
  26. package/lib/commonjs/ui/hooks/useI18n.js.map +1 -0
  27. package/lib/commonjs/ui/navigation/OxyRouter.js +11 -131
  28. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  29. package/lib/commonjs/ui/navigation/routes.js +127 -0
  30. package/lib/commonjs/ui/navigation/routes.js.map +1 -0
  31. package/lib/commonjs/ui/navigation/types.js +7 -0
  32. package/lib/commonjs/ui/navigation/types.js.map +1 -1
  33. package/lib/commonjs/ui/screens/AccountCenterScreen.js +55 -47
  34. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  35. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +69 -61
  36. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  37. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +378 -37
  38. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  39. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +52 -34
  40. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  41. package/lib/commonjs/ui/screens/FeedbackScreen.js +40 -36
  42. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  43. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +105 -78
  44. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  45. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +1 -1
  46. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +92 -60
  48. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/ProfileScreen.js +21 -11
  50. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/RecoverAccountScreen.js +30 -8
  52. package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/SignInScreen.js +47 -26
  54. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +31 -24
  56. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +11 -7
  58. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  59. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +12 -6
  60. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  61. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +11 -7
  62. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  63. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +15 -11
  64. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  65. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +19 -27
  66. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  67. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +8 -4
  68. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +14 -10
  70. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  71. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +7 -3
  72. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js +19 -14
  74. package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js.map +1 -1
  75. package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js +130 -0
  76. package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js.map +1 -0
  77. package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js +13 -13
  78. package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js.map +1 -1
  79. package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js +14 -20
  80. package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js.map +1 -1
  81. package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js +22 -8
  82. package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js.map +1 -1
  83. package/lib/commonjs/ui/screens/steps/SignInTotpStep.js +161 -0
  84. package/lib/commonjs/ui/screens/steps/SignInTotpStep.js.map +1 -0
  85. package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js +12 -6
  86. package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js.map +1 -1
  87. package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js +10 -6
  88. package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js.map +1 -1
  89. package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js +10 -6
  90. package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js.map +1 -1
  91. package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js +34 -4
  92. package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js.map +1 -1
  93. package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js +9 -10
  94. package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js.map +1 -1
  95. package/lib/commonjs/ui/styles/authStyles.js +1 -2
  96. package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
  97. package/lib/commonjs/utils/deviceManager.js +1 -1
  98. package/lib/commonjs/utils/deviceManager.js.map +1 -1
  99. package/lib/commonjs/utils/validationUtils.js +4 -2
  100. package/lib/commonjs/utils/validationUtils.js.map +1 -1
  101. package/lib/module/core/OxyServices.js +168 -5
  102. package/lib/module/core/OxyServices.js.map +1 -1
  103. package/lib/module/i18n/index.js +35 -0
  104. package/lib/module/i18n/index.js.map +1 -0
  105. package/lib/module/i18n/locales/en-US.json +681 -0
  106. package/lib/module/i18n/locales/es-ES.json +689 -0
  107. package/lib/module/ui/components/GroupedItem.js +2 -1
  108. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  109. package/lib/module/ui/components/Header.js +4 -3
  110. package/lib/module/ui/components/Header.js.map +1 -1
  111. package/lib/module/ui/components/OxyProvider.js +109 -103
  112. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  113. package/lib/module/ui/components/ProfileCard.js +5 -1
  114. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  115. package/lib/module/ui/components/Section.js +1 -1
  116. package/lib/module/ui/components/StepBasedScreen.js +16 -16
  117. package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
  118. package/lib/module/ui/components/internal/GroupedPillButtons.js +15 -3
  119. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
  120. package/lib/module/ui/components/internal/PinInput.js +9 -4
  121. package/lib/module/ui/components/internal/PinInput.js.map +1 -1
  122. package/lib/module/ui/context/OxyContext.js +128 -12
  123. package/lib/module/ui/context/OxyContext.js.map +1 -1
  124. package/lib/module/ui/hooks/useI18n.js +18 -0
  125. package/lib/module/ui/hooks/useI18n.js.map +1 -0
  126. package/lib/module/ui/navigation/OxyRouter.js +7 -124
  127. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  128. package/lib/module/ui/navigation/routes.js +122 -0
  129. package/lib/module/ui/navigation/routes.js.map +1 -0
  130. package/lib/module/ui/navigation/types.js +19 -1
  131. package/lib/module/ui/navigation/types.js.map +1 -1
  132. package/lib/module/ui/screens/AccountCenterScreen.js +55 -47
  133. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  134. package/lib/module/ui/screens/AccountOverviewScreen.js +69 -61
  135. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  136. package/lib/module/ui/screens/AccountSettingsScreen.js +378 -37
  137. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  138. package/lib/module/ui/screens/AccountSwitcherScreen.js +52 -34
  139. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  140. package/lib/module/ui/screens/FeedbackScreen.js +40 -36
  141. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  142. package/lib/module/ui/screens/LanguageSelectorScreen.js +107 -80
  143. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  144. package/lib/module/ui/screens/PaymentGatewayScreen.js +1 -1
  145. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  146. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +92 -60
  147. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  148. package/lib/module/ui/screens/ProfileScreen.js +21 -11
  149. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  150. package/lib/module/ui/screens/RecoverAccountScreen.js +30 -8
  151. package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
  152. package/lib/module/ui/screens/SignInScreen.js +47 -26
  153. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  154. package/lib/module/ui/screens/WelcomeNewUserScreen.js +31 -24
  155. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  156. package/lib/module/ui/screens/internal/SignInPasswordStep.js +11 -7
  157. package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  158. package/lib/module/ui/screens/internal/SignInUsernameStep.js +12 -6
  159. package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  160. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +11 -7
  161. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  162. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +15 -11
  163. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  164. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +19 -27
  165. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  166. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +8 -4
  167. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  168. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +14 -10
  169. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  170. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +7 -3
  171. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  172. package/lib/module/ui/screens/steps/RecoverRequestStep.js +19 -14
  173. package/lib/module/ui/screens/steps/RecoverRequestStep.js.map +1 -1
  174. package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js +125 -0
  175. package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js.map +1 -0
  176. package/lib/module/ui/screens/steps/RecoverSuccessStep.js +13 -13
  177. package/lib/module/ui/screens/steps/RecoverSuccessStep.js.map +1 -1
  178. package/lib/module/ui/screens/steps/RecoverVerifyStep.js +14 -20
  179. package/lib/module/ui/screens/steps/RecoverVerifyStep.js.map +1 -1
  180. package/lib/module/ui/screens/steps/SignInPasswordStep.js +22 -8
  181. package/lib/module/ui/screens/steps/SignInPasswordStep.js.map +1 -1
  182. package/lib/module/ui/screens/steps/SignInTotpStep.js +156 -0
  183. package/lib/module/ui/screens/steps/SignInTotpStep.js.map +1 -0
  184. package/lib/module/ui/screens/steps/SignInUsernameStep.js +12 -6
  185. package/lib/module/ui/screens/steps/SignInUsernameStep.js.map +1 -1
  186. package/lib/module/ui/screens/steps/SignUpIdentityStep.js +10 -6
  187. package/lib/module/ui/screens/steps/SignUpIdentityStep.js.map +1 -1
  188. package/lib/module/ui/screens/steps/SignUpSecurityStep.js +10 -6
  189. package/lib/module/ui/screens/steps/SignUpSecurityStep.js.map +1 -1
  190. package/lib/module/ui/screens/steps/SignUpSummaryStep.js +34 -4
  191. package/lib/module/ui/screens/steps/SignUpSummaryStep.js.map +1 -1
  192. package/lib/module/ui/screens/steps/SignUpWelcomeStep.js +9 -10
  193. package/lib/module/ui/screens/steps/SignUpWelcomeStep.js.map +1 -1
  194. package/lib/module/ui/styles/authStyles.js +1 -2
  195. package/lib/module/ui/styles/authStyles.js.map +1 -1
  196. package/lib/module/utils/deviceManager.js +1 -1
  197. package/lib/module/utils/deviceManager.js.map +1 -1
  198. package/lib/module/utils/validationUtils.js +4 -2
  199. package/lib/module/utils/validationUtils.js.map +1 -1
  200. package/lib/typescript/core/OxyServices.d.ts +58 -3
  201. package/lib/typescript/core/OxyServices.d.ts.map +1 -1
  202. package/lib/typescript/i18n/index.d.ts +4 -0
  203. package/lib/typescript/i18n/index.d.ts.map +1 -0
  204. package/lib/typescript/models/interfaces.d.ts +4 -0
  205. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  206. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  207. package/lib/typescript/ui/components/Header.d.ts.map +1 -1
  208. package/lib/typescript/ui/components/OxyProvider.d.ts +1 -1
  209. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  210. package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -1
  211. package/lib/typescript/ui/components/StepBasedScreen.d.ts +2 -1
  212. package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -1
  213. package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
  214. package/lib/typescript/ui/components/internal/PinInput.d.ts +6 -3
  215. package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -1
  216. package/lib/typescript/ui/context/OxyContext.d.ts +7 -4
  217. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  218. package/lib/typescript/ui/hooks/useI18n.d.ts +5 -0
  219. package/lib/typescript/ui/hooks/useI18n.d.ts.map +1 -0
  220. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  221. package/lib/typescript/ui/navigation/routes.d.ts +9 -0
  222. package/lib/typescript/ui/navigation/routes.d.ts.map +1 -0
  223. package/lib/typescript/ui/navigation/types.d.ts +24 -10
  224. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  225. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  226. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  227. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  228. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  229. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
  230. package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  231. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  232. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
  233. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
  234. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  235. package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  236. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +2 -1
  237. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
  238. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
  239. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
  240. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
  241. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
  242. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
  243. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
  244. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
  245. package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts +4 -1
  246. package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts.map +1 -1
  247. package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts +24 -0
  248. package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts.map +1 -0
  249. package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts +2 -1
  250. package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts.map +1 -1
  251. package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts +3 -1
  252. package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts.map +1 -1
  253. package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts +1 -0
  254. package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts.map +1 -1
  255. package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts +19 -0
  256. package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts.map +1 -0
  257. package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts +2 -1
  258. package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts.map +1 -1
  259. package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts +2 -1
  260. package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts.map +1 -1
  261. package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts +2 -1
  262. package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts.map +1 -1
  263. package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts +2 -1
  264. package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts.map +1 -1
  265. package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts +2 -1
  266. package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts.map +1 -1
  267. package/lib/typescript/ui/styles/authStyles.d.ts +0 -1
  268. package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -1
  269. package/lib/typescript/utils/validationUtils.d.ts.map +1 -1
  270. package/package.json +48 -14
  271. package/src/core/OxyServices.ts +143 -9
  272. package/src/i18n/index.ts +39 -0
  273. package/src/i18n/locales/en-US.json +681 -0
  274. package/src/i18n/locales/es-ES.json +689 -0
  275. package/src/models/interfaces.ts +6 -1
  276. package/src/ui/components/GroupedItem.tsx +2 -1
  277. package/src/ui/components/Header.tsx +4 -3
  278. package/src/ui/components/OxyProvider.tsx +105 -112
  279. package/src/ui/components/ProfileCard.tsx +5 -1
  280. package/src/ui/components/Section.tsx +1 -1
  281. package/src/ui/components/StepBasedScreen.tsx +16 -13
  282. package/src/ui/components/internal/GroupedPillButtons.tsx +10 -6
  283. package/src/ui/components/internal/PinInput.tsx +15 -6
  284. package/src/ui/context/OxyContext.tsx +123 -20
  285. package/src/ui/hooks/useI18n.ts +12 -0
  286. package/src/ui/navigation/OxyRouter.tsx +15 -134
  287. package/src/ui/navigation/routes.ts +153 -0
  288. package/src/ui/navigation/types.ts +28 -10
  289. package/src/ui/screens/AccountCenterScreen.tsx +47 -45
  290. package/src/ui/screens/AccountOverviewScreen.tsx +68 -70
  291. package/src/ui/screens/AccountSettingsScreen.tsx +265 -41
  292. package/src/ui/screens/AccountSwitcherScreen.tsx +35 -33
  293. package/src/ui/screens/FeedbackScreen.tsx +39 -37
  294. package/src/ui/screens/LanguageSelectorScreen.tsx +99 -70
  295. package/src/ui/screens/PaymentGatewayScreen.tsx +5 -5
  296. package/src/ui/screens/PremiumSubscriptionScreen.tsx +56 -54
  297. package/src/ui/screens/ProfileScreen.tsx +14 -8
  298. package/src/ui/screens/RecoverAccountScreen.tsx +29 -8
  299. package/src/ui/screens/SignInScreen.tsx +39 -30
  300. package/src/ui/screens/WelcomeNewUserScreen.tsx +31 -17
  301. package/src/ui/screens/internal/SignInPasswordStep.tsx +11 -8
  302. package/src/ui/screens/internal/SignInUsernameStep.tsx +10 -8
  303. package/src/ui/screens/karma/KarmaAboutScreen.tsx +23 -11
  304. package/src/ui/screens/karma/KarmaCenterScreen.tsx +21 -11
  305. package/src/ui/screens/karma/KarmaFAQScreen.tsx +15 -33
  306. package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +6 -4
  307. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +28 -10
  308. package/src/ui/screens/karma/KarmaRulesScreen.tsx +5 -3
  309. package/src/ui/screens/steps/RecoverRequestStep.tsx +20 -17
  310. package/src/ui/screens/steps/RecoverResetPasswordStep.tsx +133 -0
  311. package/src/ui/screens/steps/RecoverSuccessStep.tsx +12 -19
  312. package/src/ui/screens/steps/RecoverVerifyStep.tsx +15 -24
  313. package/src/ui/screens/steps/SignInPasswordStep.tsx +19 -6
  314. package/src/ui/screens/steps/SignInTotpStep.tsx +129 -0
  315. package/src/ui/screens/steps/SignInUsernameStep.tsx +11 -10
  316. package/src/ui/screens/steps/SignUpIdentityStep.tsx +10 -11
  317. package/src/ui/screens/steps/SignUpSecurityStep.tsx +10 -11
  318. package/src/ui/screens/steps/SignUpSummaryStep.tsx +24 -9
  319. package/src/ui/screens/steps/SignUpWelcomeStep.tsx +8 -14
  320. package/src/ui/styles/authStyles.ts +0 -1
  321. package/src/utils/deviceManager.ts +1 -1
  322. 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: 'fr',
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
- // Use OxyContext to set language (this handles storage and app-wide updates)
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(`Language changed to ${selectedLang?.name || languageId}`);
145
+ toast.success(t('language.changed', { lang: selectedLang?.name || languageId }));
126
146
 
127
147
  setIsLoading(false);
128
- goBack();
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
- icon: language.icon,
143
- iconColor: language.color,
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: colors.background }]}>
175
+ <View style={[styles.container, { backgroundColor: '#f2f2f2' }]}>
155
176
  <Header
156
- title="Language"
157
- subtitle="Choose your preferred language"
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
- <View style={styles.section}>
165
- <Text style={[styles.sectionTitle, { color: colors.secondaryText }]}>
166
- Available Languages
167
- </Text>
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
- Select your preferred language. Changes will be applied across the entire application.
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
- </View>
229
+ </Section>
179
230
 
180
- {/* Information section */}
181
- <View style={styles.infoSection}>
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
- </View>
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: 24,
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
- fontSize: 24,
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('AccountOverviewScreen');
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;