@oxyhq/services 5.21.6 → 5.22.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.
Files changed (478) hide show
  1. package/README.md +201 -2
  2. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  3. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  4. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  5. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  6. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  7. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  8. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  9. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  10. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  11. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  12. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  13. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  14. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  15. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  16. package/lib/commonjs/core/HttpService.js +87 -2
  17. package/lib/commonjs/core/HttpService.js.map +1 -1
  18. package/lib/commonjs/core/mixins/OxyServices.assets.js +3 -1
  19. package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -1
  20. package/lib/commonjs/crypto/keyManager.js +67 -22
  21. package/lib/commonjs/crypto/keyManager.js.map +1 -1
  22. package/lib/commonjs/i18n/locales/en-US.json +3 -3
  23. package/lib/commonjs/i18n/locales/es-ES.json +240 -19
  24. package/lib/commonjs/index.js +66 -0
  25. package/lib/commonjs/index.js.map +1 -1
  26. package/lib/commonjs/ui/components/Avatar.js +1 -1
  27. package/lib/commonjs/ui/components/Avatar.js.map +1 -1
  28. package/lib/commonjs/ui/components/FollowButton.js +1 -1
  29. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  30. package/lib/commonjs/ui/components/FontLoader.js +34 -34
  31. package/lib/commonjs/ui/components/FontLoader.js.map +1 -1
  32. package/lib/commonjs/ui/components/Header.js +4 -4
  33. package/lib/commonjs/ui/components/Header.js.map +1 -1
  34. package/lib/commonjs/ui/components/OxyPayButton.js +1 -1
  35. package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
  36. package/lib/commonjs/ui/components/OxySignInButton.js +2 -1
  37. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  38. package/lib/commonjs/ui/components/ProfileCard.js +1 -1
  39. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
  40. package/lib/commonjs/ui/components/SectionTitle.js +1 -1
  41. package/lib/commonjs/ui/components/SectionTitle.js.map +1 -1
  42. package/lib/commonjs/ui/components/StepBasedScreen.js +2 -1
  43. package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
  44. package/lib/commonjs/ui/components/feedback/feedbackStyles.js +2 -1
  45. package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +1 -1
  46. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +57 -0
  47. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -0
  48. package/lib/commonjs/ui/components/fileManagement/styles.js +17 -17
  49. package/lib/commonjs/ui/components/fileManagement/styles.js.map +1 -1
  50. package/lib/commonjs/ui/components/payment/paymentStyles.js +7 -7
  51. package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -1
  52. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +177 -0
  53. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -0
  54. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +10 -123
  55. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  56. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +2 -32
  57. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  58. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +2 -31
  59. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  60. package/lib/commonjs/ui/hooks/useFileFiltering.js +76 -0
  61. package/lib/commonjs/ui/hooks/useFileFiltering.js.map +1 -0
  62. package/lib/commonjs/ui/navigation/routes.js +2 -0
  63. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  64. package/lib/commonjs/ui/screens/AccountCenterScreen.js +4 -2
  65. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  66. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +13 -5
  67. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  68. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +273 -1820
  69. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  70. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +1 -1
  71. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  72. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +3 -1
  73. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  74. package/lib/commonjs/ui/screens/AppInfoScreen.js +2 -2
  75. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  76. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +640 -0
  77. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -0
  78. package/lib/commonjs/ui/screens/FileManagementScreen.js +41 -23
  79. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  80. package/lib/commonjs/ui/screens/HistoryViewScreen.js +9 -3
  81. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  82. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +4 -2
  83. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  84. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +3 -1
  85. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  86. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +11 -12
  87. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  88. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +12 -4
  89. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  90. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +3 -1
  91. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  92. package/lib/commonjs/ui/screens/SessionManagementScreen.js +15 -5
  93. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  94. package/lib/commonjs/ui/screens/UserLinksScreen.js +3 -1
  95. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  96. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +2 -1
  97. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  98. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +2 -4
  99. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  100. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -3
  101. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  102. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +3 -3
  103. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  104. package/lib/commonjs/ui/styles/authStyles.js +5 -4
  105. package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
  106. package/lib/commonjs/ui/styles/fonts.js +27 -27
  107. package/lib/commonjs/ui/styles/fonts.js.map +1 -1
  108. package/lib/commonjs/ui/styles/theme.js +3 -3
  109. package/lib/commonjs/ui/styles/theme.js.map +1 -1
  110. package/lib/commonjs/ui/utils/authHelpers.js +164 -0
  111. package/lib/commonjs/ui/utils/authHelpers.js.map +1 -0
  112. package/lib/commonjs/ui/utils/avatarUtils.js +18 -61
  113. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  114. package/lib/commonjs/web.js +682 -0
  115. package/lib/commonjs/web.js.map +1 -0
  116. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  117. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  118. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  119. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  120. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  121. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  122. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  123. package/lib/module/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  124. package/lib/module/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  125. package/lib/module/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  126. package/lib/module/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  127. package/lib/module/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  128. package/lib/module/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  129. package/lib/module/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  130. package/lib/module/core/HttpService.js +87 -2
  131. package/lib/module/core/HttpService.js.map +1 -1
  132. package/lib/module/core/mixins/OxyServices.assets.js +3 -1
  133. package/lib/module/core/mixins/OxyServices.assets.js.map +1 -1
  134. package/lib/module/crypto/keyManager.js +67 -22
  135. package/lib/module/crypto/keyManager.js.map +1 -1
  136. package/lib/module/i18n/locales/en-US.json +3 -3
  137. package/lib/module/i18n/locales/es-ES.json +240 -19
  138. package/lib/module/index.js +6 -0
  139. package/lib/module/index.js.map +1 -1
  140. package/lib/module/ui/components/Avatar.js +1 -1
  141. package/lib/module/ui/components/Avatar.js.map +1 -1
  142. package/lib/module/ui/components/FollowButton.js +1 -1
  143. package/lib/module/ui/components/FollowButton.js.map +1 -1
  144. package/lib/module/ui/components/FontLoader.js +34 -34
  145. package/lib/module/ui/components/FontLoader.js.map +1 -1
  146. package/lib/module/ui/components/Header.js +4 -4
  147. package/lib/module/ui/components/Header.js.map +1 -1
  148. package/lib/module/ui/components/OxyPayButton.js +1 -1
  149. package/lib/module/ui/components/OxyPayButton.js.map +1 -1
  150. package/lib/module/ui/components/OxySignInButton.js +2 -1
  151. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  152. package/lib/module/ui/components/ProfileCard.js +1 -1
  153. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  154. package/lib/module/ui/components/SectionTitle.js +1 -1
  155. package/lib/module/ui/components/SectionTitle.js.map +1 -1
  156. package/lib/module/ui/components/StepBasedScreen.js +2 -1
  157. package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
  158. package/lib/module/ui/components/feedback/feedbackStyles.js +2 -1
  159. package/lib/module/ui/components/feedback/feedbackStyles.js.map +1 -1
  160. package/lib/module/ui/components/fileManagement/AnimatedButton.js +50 -0
  161. package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -0
  162. package/lib/module/ui/components/fileManagement/styles.js +17 -17
  163. package/lib/module/ui/components/fileManagement/styles.js.map +1 -1
  164. package/lib/module/ui/components/payment/paymentStyles.js +7 -7
  165. package/lib/module/ui/components/payment/paymentStyles.js.map +1 -1
  166. package/lib/module/ui/hooks/mutations/mutationFactory.js +173 -0
  167. package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -0
  168. package/lib/module/ui/hooks/mutations/useAccountMutations.js +10 -122
  169. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  170. package/lib/module/ui/hooks/queries/useAccountQueries.js +2 -32
  171. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  172. package/lib/module/ui/hooks/queries/useServicesQueries.js +2 -31
  173. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  174. package/lib/module/ui/hooks/useFileFiltering.js +72 -0
  175. package/lib/module/ui/hooks/useFileFiltering.js.map +1 -0
  176. package/lib/module/ui/navigation/routes.js +2 -0
  177. package/lib/module/ui/navigation/routes.js.map +1 -1
  178. package/lib/module/ui/screens/AccountCenterScreen.js +4 -2
  179. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  180. package/lib/module/ui/screens/AccountOverviewScreen.js +13 -5
  181. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  182. package/lib/module/ui/screens/AccountSettingsScreen.js +277 -1824
  183. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  184. package/lib/module/ui/screens/AccountSwitcherScreen.js +1 -1
  185. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  186. package/lib/module/ui/screens/AccountVerificationScreen.js +3 -1
  187. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  188. package/lib/module/ui/screens/AppInfoScreen.js +2 -2
  189. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  190. package/lib/module/ui/screens/EditProfileFieldScreen.js +635 -0
  191. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -0
  192. package/lib/module/ui/screens/FileManagementScreen.js +41 -23
  193. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  194. package/lib/module/ui/screens/HistoryViewScreen.js +9 -3
  195. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  196. package/lib/module/ui/screens/LanguageSelectorScreen.js +4 -2
  197. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  198. package/lib/module/ui/screens/LegalDocumentsScreen.js +3 -1
  199. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  200. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +11 -12
  201. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  202. package/lib/module/ui/screens/PrivacySettingsScreen.js +12 -4
  203. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  204. package/lib/module/ui/screens/SearchSettingsScreen.js +3 -1
  205. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  206. package/lib/module/ui/screens/SessionManagementScreen.js +15 -5
  207. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  208. package/lib/module/ui/screens/UserLinksScreen.js +3 -1
  209. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  210. package/lib/module/ui/screens/WelcomeNewUserScreen.js +2 -1
  211. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  212. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +2 -4
  213. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  214. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -3
  215. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  216. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +3 -3
  217. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  218. package/lib/module/ui/styles/authStyles.js +5 -4
  219. package/lib/module/ui/styles/authStyles.js.map +1 -1
  220. package/lib/module/ui/styles/fonts.js +27 -27
  221. package/lib/module/ui/styles/fonts.js.map +1 -1
  222. package/lib/module/ui/styles/theme.js +3 -3
  223. package/lib/module/ui/styles/theme.js.map +1 -1
  224. package/lib/module/ui/utils/authHelpers.js +154 -0
  225. package/lib/module/ui/utils/authHelpers.js.map +1 -0
  226. package/lib/module/ui/utils/avatarUtils.js +18 -61
  227. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  228. package/lib/module/web.js +75 -0
  229. package/lib/module/web.js.map +1 -0
  230. package/lib/typescript/commonjs/core/HttpService.d.ts +5 -0
  231. package/lib/typescript/commonjs/core/HttpService.d.ts.map +1 -1
  232. package/lib/typescript/commonjs/crypto/keyManager.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/index.d.ts +6 -0
  234. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/ui/components/StepBasedScreen.d.ts.map +1 -1
  237. package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts +16 -0
  239. package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -0
  240. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts +76 -0
  241. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts.map +1 -0
  242. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +29 -4
  243. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +1 -1
  245. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +1 -1
  247. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts +29 -0
  249. package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  251. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts +13 -0
  257. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/ui/styles/fonts.d.ts +7 -7
  270. package/lib/typescript/commonjs/ui/styles/theme.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/ui/utils/authHelpers.d.ts +99 -0
  272. package/lib/typescript/commonjs/ui/utils/authHelpers.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/web.d.ts +54 -0
  275. package/lib/typescript/commonjs/web.d.ts.map +1 -0
  276. package/lib/typescript/module/core/HttpService.d.ts +5 -0
  277. package/lib/typescript/module/core/HttpService.d.ts.map +1 -1
  278. package/lib/typescript/module/crypto/keyManager.d.ts.map +1 -1
  279. package/lib/typescript/module/index.d.ts +6 -0
  280. package/lib/typescript/module/index.d.ts.map +1 -1
  281. package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
  282. package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
  283. package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts.map +1 -1
  284. package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts +16 -0
  285. package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -0
  286. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts +76 -0
  287. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts.map +1 -0
  288. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +29 -4
  289. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  290. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +1 -1
  291. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  292. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +1 -1
  293. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  294. package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts +29 -0
  295. package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts.map +1 -0
  296. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  297. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  298. package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  299. package/lib/typescript/module/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  300. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  301. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  302. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +13 -0
  303. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -0
  304. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  305. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  306. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  307. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  308. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  309. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  310. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  311. package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  312. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  313. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  314. package/lib/typescript/module/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
  315. package/lib/typescript/module/ui/styles/fonts.d.ts +7 -7
  316. package/lib/typescript/module/ui/styles/theme.d.ts.map +1 -1
  317. package/lib/typescript/module/ui/utils/authHelpers.d.ts +99 -0
  318. package/lib/typescript/module/ui/utils/authHelpers.d.ts.map +1 -0
  319. package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
  320. package/lib/typescript/module/web.d.ts +54 -0
  321. package/lib/typescript/module/web.d.ts.map +1 -0
  322. package/package.json +27 -41
  323. package/src/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  324. package/src/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  325. package/src/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  326. package/src/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  327. package/src/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  328. package/src/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  329. package/src/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  330. package/src/core/HttpService.ts +91 -0
  331. package/src/core/mixins/OxyServices.assets.ts +1 -1
  332. package/src/crypto/keyManager.ts +23 -22
  333. package/src/i18n/locales/en-US.json +3 -3
  334. package/src/i18n/locales/es-ES.json +240 -19
  335. package/src/index.ts +25 -0
  336. package/src/ui/components/Avatar.tsx +1 -1
  337. package/src/ui/components/FollowButton.tsx +1 -1
  338. package/src/ui/components/FontLoader.tsx +34 -34
  339. package/src/ui/components/Header.tsx +4 -4
  340. package/src/ui/components/OxyPayButton.tsx +1 -1
  341. package/src/ui/components/OxySignInButton.tsx +2 -1
  342. package/src/ui/components/ProfileCard.tsx +1 -1
  343. package/src/ui/components/SectionTitle.tsx +1 -1
  344. package/src/ui/components/StepBasedScreen.tsx +2 -1
  345. package/src/ui/components/feedback/feedbackStyles.ts +2 -1
  346. package/src/ui/components/fileManagement/AnimatedButton.tsx +56 -0
  347. package/src/ui/components/fileManagement/styles.ts +17 -17
  348. package/src/ui/components/payment/paymentStyles.ts +7 -7
  349. package/src/ui/hooks/mutations/mutationFactory.ts +215 -0
  350. package/src/ui/hooks/mutations/useAccountMutations.ts +48 -136
  351. package/src/ui/hooks/queries/useAccountQueries.ts +6 -33
  352. package/src/ui/hooks/queries/useServicesQueries.ts +6 -32
  353. package/src/ui/hooks/useFileFiltering.ts +115 -0
  354. package/src/ui/navigation/routes.ts +3 -0
  355. package/src/ui/screens/AccountCenterScreen.tsx +4 -2
  356. package/src/ui/screens/AccountOverviewScreen.tsx +13 -5
  357. package/src/ui/screens/AccountSettingsScreen.tsx +35 -1511
  358. package/src/ui/screens/AccountSwitcherScreen.tsx +1 -1
  359. package/src/ui/screens/AccountVerificationScreen.tsx +3 -1
  360. package/src/ui/screens/AppInfoScreen.tsx +2 -2
  361. package/src/ui/screens/EditProfileFieldScreen.tsx +685 -0
  362. package/src/ui/screens/FileManagementScreen.tsx +35 -17
  363. package/src/ui/screens/HistoryViewScreen.tsx +9 -3
  364. package/src/ui/screens/LanguageSelectorScreen.tsx +4 -2
  365. package/src/ui/screens/LegalDocumentsScreen.tsx +3 -1
  366. package/src/ui/screens/PremiumSubscriptionScreen.tsx +11 -13
  367. package/src/ui/screens/PrivacySettingsScreen.tsx +12 -4
  368. package/src/ui/screens/SearchSettingsScreen.tsx +3 -1
  369. package/src/ui/screens/SessionManagementScreen.tsx +15 -5
  370. package/src/ui/screens/UserLinksScreen.tsx +3 -1
  371. package/src/ui/screens/WelcomeNewUserScreen.tsx +2 -1
  372. package/src/ui/screens/karma/KarmaAboutScreen.tsx +6 -8
  373. package/src/ui/screens/karma/KarmaCenterScreen.tsx +3 -3
  374. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +3 -3
  375. package/src/ui/styles/authStyles.ts +4 -4
  376. package/src/ui/styles/fonts.ts +26 -26
  377. package/src/ui/styles/theme.ts +3 -5
  378. package/src/ui/utils/authHelpers.ts +183 -0
  379. package/src/ui/utils/avatarUtils.ts +25 -65
  380. package/src/web.ts +230 -0
  381. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  382. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  383. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  384. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  385. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  386. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  387. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  388. package/lib/commonjs/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  389. package/lib/commonjs/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  390. package/lib/commonjs/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  391. package/lib/commonjs/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  392. package/lib/commonjs/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  393. package/lib/commonjs/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  394. package/lib/commonjs/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  395. package/lib/commonjs/ui/components/profile/EditBioModal.js +0 -181
  396. package/lib/commonjs/ui/components/profile/EditBioModal.js.map +0 -1
  397. package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js +0 -204
  398. package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js.map +0 -1
  399. package/lib/commonjs/ui/components/profile/EditEmailModal.js +0 -184
  400. package/lib/commonjs/ui/components/profile/EditEmailModal.js.map +0 -1
  401. package/lib/commonjs/ui/components/profile/EditFieldModal.js +0 -412
  402. package/lib/commonjs/ui/components/profile/EditFieldModal.js.map +0 -1
  403. package/lib/commonjs/ui/components/profile/EditLinksModal.js +0 -315
  404. package/lib/commonjs/ui/components/profile/EditLinksModal.js.map +0 -1
  405. package/lib/commonjs/ui/components/profile/EditLocationModal.js +0 -273
  406. package/lib/commonjs/ui/components/profile/EditLocationModal.js.map +0 -1
  407. package/lib/commonjs/ui/components/profile/EditUsernameModal.js +0 -180
  408. package/lib/commonjs/ui/components/profile/EditUsernameModal.js.map +0 -1
  409. package/lib/module/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  410. package/lib/module/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  411. package/lib/module/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  412. package/lib/module/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  413. package/lib/module/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  414. package/lib/module/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  415. package/lib/module/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  416. package/lib/module/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  417. package/lib/module/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  418. package/lib/module/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  419. package/lib/module/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  420. package/lib/module/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  421. package/lib/module/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  422. package/lib/module/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  423. package/lib/module/ui/components/profile/EditBioModal.js +0 -175
  424. package/lib/module/ui/components/profile/EditBioModal.js.map +0 -1
  425. package/lib/module/ui/components/profile/EditDisplayNameModal.js +0 -198
  426. package/lib/module/ui/components/profile/EditDisplayNameModal.js.map +0 -1
  427. package/lib/module/ui/components/profile/EditEmailModal.js +0 -178
  428. package/lib/module/ui/components/profile/EditEmailModal.js.map +0 -1
  429. package/lib/module/ui/components/profile/EditFieldModal.js +0 -406
  430. package/lib/module/ui/components/profile/EditFieldModal.js.map +0 -1
  431. package/lib/module/ui/components/profile/EditLinksModal.js +0 -309
  432. package/lib/module/ui/components/profile/EditLinksModal.js.map +0 -1
  433. package/lib/module/ui/components/profile/EditLocationModal.js +0 -267
  434. package/lib/module/ui/components/profile/EditLocationModal.js.map +0 -1
  435. package/lib/module/ui/components/profile/EditUsernameModal.js +0 -174
  436. package/lib/module/ui/components/profile/EditUsernameModal.js.map +0 -1
  437. package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts +0 -11
  438. package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts.map +0 -1
  439. package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts +0 -12
  440. package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts.map +0 -1
  441. package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts +0 -11
  442. package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts.map +0 -1
  443. package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts +0 -110
  444. package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts.map +0 -1
  445. package/lib/typescript/commonjs/ui/components/profile/EditLinksModal.d.ts +0 -18
  446. package/lib/typescript/commonjs/ui/components/profile/EditLinksModal.d.ts.map +0 -1
  447. package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts +0 -20
  448. package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts.map +0 -1
  449. package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts +0 -11
  450. package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts.map +0 -1
  451. package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts +0 -11
  452. package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts.map +0 -1
  453. package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts +0 -12
  454. package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts.map +0 -1
  455. package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts +0 -11
  456. package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts.map +0 -1
  457. package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts +0 -110
  458. package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts.map +0 -1
  459. package/lib/typescript/module/ui/components/profile/EditLinksModal.d.ts +0 -18
  460. package/lib/typescript/module/ui/components/profile/EditLinksModal.d.ts.map +0 -1
  461. package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts +0 -20
  462. package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts.map +0 -1
  463. package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts +0 -11
  464. package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts.map +0 -1
  465. package/src/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  466. package/src/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  467. package/src/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  468. package/src/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  469. package/src/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  470. package/src/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  471. package/src/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  472. package/src/ui/components/profile/EditBioModal.tsx +0 -184
  473. package/src/ui/components/profile/EditDisplayNameModal.tsx +0 -203
  474. package/src/ui/components/profile/EditEmailModal.tsx +0 -188
  475. package/src/ui/components/profile/EditFieldModal.tsx +0 -465
  476. package/src/ui/components/profile/EditLinksModal.tsx +0 -316
  477. package/src/ui/components/profile/EditLocationModal.tsx +0 -278
  478. package/src/ui/components/profile/EditUsernameModal.tsx +0 -183
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditUsernameModal.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/profile/EditUsernameModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAiBnD,UAAU,sBAAsB;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAqF9D,CAAC"}
@@ -1,184 +0,0 @@
1
- import React, { useState, useEffect } from 'react';
2
- import {
3
- View,
4
- Text,
5
- TextInput,
6
- TouchableOpacity,
7
- StyleSheet,
8
- Modal,
9
- Platform,
10
- } from 'react-native';
11
- import { Ionicons } from '@expo/vector-icons';
12
- import { useThemeStyles } from '../../hooks/useThemeStyles';
13
- import { useColorScheme } from '../../hooks/use-color-scheme';
14
- import { useI18n } from '../../hooks/useI18n';
15
- import { fontFamilies } from '../../styles/fonts';
16
- import { useProfileEditing } from '../../hooks/useProfileEditing';
17
-
18
- interface EditBioModalProps {
19
- visible: boolean;
20
- onClose: () => void;
21
- initialValue?: string;
22
- theme?: 'light' | 'dark';
23
- onSave?: () => void;
24
- }
25
-
26
- export const EditBioModal: React.FC<EditBioModalProps> = ({
27
- visible,
28
- onClose,
29
- initialValue = '',
30
- theme = 'light',
31
- onSave,
32
- }) => {
33
- const { t } = useI18n();
34
- const colorScheme = useColorScheme();
35
- const themeStyles = useThemeStyles(theme || 'light', colorScheme);
36
- const colors = themeStyles.colors;
37
- const { updateField, isSaving } = useProfileEditing();
38
-
39
- const [bio, setBio] = useState(initialValue);
40
-
41
- useEffect(() => {
42
- if (visible) {
43
- setBio(initialValue);
44
- }
45
- }, [visible, initialValue]);
46
-
47
- const handleSave = async () => {
48
- const success = await updateField('bio', bio);
49
- if (success) {
50
- onSave?.();
51
- onClose();
52
- }
53
- };
54
-
55
- return (
56
- <Modal
57
- visible={visible}
58
- animationType="slide"
59
- transparent={true}
60
- onRequestClose={onClose}
61
- >
62
- <View style={styles.modalOverlay}>
63
- <View style={[styles.modalContent, { backgroundColor: colors.background }]}>
64
- <View style={styles.modalHeader}>
65
- <TouchableOpacity onPress={onClose} style={styles.closeButton}>
66
- <Ionicons name="close" size={24} color={colors.text} />
67
- </TouchableOpacity>
68
- <Text style={[styles.modalTitle, { color: colors.text }]}>
69
- {t('editProfile.items.bio.title') || 'Bio'}
70
- </Text>
71
- <TouchableOpacity
72
- onPress={handleSave}
73
- disabled={isSaving}
74
- style={[styles.saveButton, { opacity: isSaving ? 0.5 : 1 }]}
75
- >
76
- <Text style={[styles.saveButtonText, { color: colors.tint }]}>
77
- {isSaving ? 'Saving...' : 'Save'}
78
- </Text>
79
- </TouchableOpacity>
80
- </View>
81
-
82
- <View style={styles.modalBody}>
83
- <View style={styles.inputGroup}>
84
- <Text style={[styles.label, { color: colors.text }]}>
85
- {t('editProfile.items.bio.label') || 'Bio'}
86
- </Text>
87
- <TextInput
88
- style={[
89
- styles.textArea,
90
- {
91
- backgroundColor: colors.card,
92
- color: colors.text,
93
- borderColor: colors.border,
94
- },
95
- ]}
96
- value={bio}
97
- onChangeText={setBio}
98
- placeholder={t('editProfile.items.bio.placeholder') || 'Tell people about yourself...'}
99
- placeholderTextColor={colors.secondaryText}
100
- autoFocus
101
- multiline
102
- numberOfLines={6}
103
- textAlignVertical="top"
104
- selectionColor={colors.tint}
105
- />
106
- </View>
107
- </View>
108
- </View>
109
- </View>
110
- </Modal>
111
- );
112
- };
113
-
114
- const styles = StyleSheet.create({
115
- modalOverlay: {
116
- flex: 1,
117
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
118
- justifyContent: 'flex-end',
119
- },
120
- modalContent: {
121
- borderTopLeftRadius: 20,
122
- borderTopRightRadius: 20,
123
- paddingTop: Platform.OS === 'ios' ? 20 : 16,
124
- maxHeight: '80%',
125
- },
126
- modalHeader: {
127
- flexDirection: 'row',
128
- alignItems: 'center',
129
- justifyContent: 'space-between',
130
- paddingHorizontal: 16,
131
- paddingBottom: 16,
132
- borderBottomWidth: StyleSheet.hairlineWidth,
133
- borderBottomColor: '#E5E5EA',
134
- },
135
- closeButton: {
136
- width: 40,
137
- height: 40,
138
- alignItems: 'center',
139
- justifyContent: 'center',
140
- },
141
- modalTitle: {
142
- fontSize: 18,
143
- fontWeight: '600',
144
- fontFamily: fontFamilies.phuduSemiBold,
145
- flex: 1,
146
- textAlign: 'center',
147
- },
148
- saveButton: {
149
- paddingHorizontal: 16,
150
- paddingVertical: 8,
151
- },
152
- saveButtonText: {
153
- fontSize: 16,
154
- fontWeight: '600',
155
- fontFamily: fontFamilies.phuduSemiBold,
156
- },
157
- modalBody: {
158
- padding: 16,
159
- gap: 16,
160
- },
161
- inputGroup: {
162
- gap: 8,
163
- },
164
- label: {
165
- fontSize: 14,
166
- fontWeight: '600',
167
- fontFamily: fontFamilies.phuduSemiBold,
168
- },
169
- textArea: {
170
- borderWidth: StyleSheet.hairlineWidth,
171
- borderRadius: 12,
172
- padding: 16,
173
- fontSize: 16,
174
- minHeight: 120,
175
- },
176
- });
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
@@ -1,203 +0,0 @@
1
- import React, { useState, useEffect } from 'react';
2
- import {
3
- View,
4
- Text,
5
- TextInput,
6
- TouchableOpacity,
7
- StyleSheet,
8
- Modal,
9
- Platform,
10
- } from 'react-native';
11
- import { Ionicons } from '@expo/vector-icons';
12
- import { useThemeStyles } from '../../hooks/useThemeStyles';
13
- import { useColorScheme } from '../../hooks/use-color-scheme';
14
- import { useI18n } from '../../hooks/useI18n';
15
- import { fontFamilies } from '../../styles/fonts';
16
- import { useProfileEditing } from '../../hooks/useProfileEditing';
17
-
18
- interface EditDisplayNameModalProps {
19
- visible: boolean;
20
- onClose: () => void;
21
- initialDisplayName?: string;
22
- initialLastName?: string;
23
- theme?: 'light' | 'dark';
24
- onSave?: () => void;
25
- }
26
-
27
- export const EditDisplayNameModal: React.FC<EditDisplayNameModalProps> = ({
28
- visible,
29
- onClose,
30
- initialDisplayName = '',
31
- initialLastName = '',
32
- theme = 'light',
33
- onSave,
34
- }) => {
35
- const { t } = useI18n();
36
- const colorScheme = useColorScheme();
37
- const themeStyles = useThemeStyles(theme || 'light', colorScheme);
38
- const colors = themeStyles.colors;
39
- const { saveProfile, isSaving } = useProfileEditing();
40
-
41
- const [displayName, setDisplayName] = useState(initialDisplayName);
42
- const [lastName, setLastName] = useState(initialLastName);
43
-
44
- useEffect(() => {
45
- if (visible) {
46
- setDisplayName(initialDisplayName);
47
- setLastName(initialLastName);
48
- }
49
- }, [visible, initialDisplayName, initialLastName]);
50
-
51
- const handleSave = async () => {
52
- const updates = {
53
- displayName,
54
- lastName,
55
- };
56
- const success = await saveProfile(updates);
57
- if (success) {
58
- onSave?.();
59
- onClose();
60
- }
61
- };
62
-
63
- return (
64
- <Modal
65
- visible={visible}
66
- animationType="slide"
67
- transparent={true}
68
- onRequestClose={onClose}
69
- >
70
- <View style={styles.modalOverlay}>
71
- <View style={[styles.modalContent, { backgroundColor: colors.background }]}>
72
- <View style={styles.modalHeader}>
73
- <TouchableOpacity onPress={onClose} style={styles.closeButton}>
74
- <Ionicons name="close" size={24} color={colors.text} />
75
- </TouchableOpacity>
76
- <Text style={[styles.modalTitle, { color: colors.text }]}>
77
- {t('editProfile.items.displayName.title') || 'Display Name'}
78
- </Text>
79
- <TouchableOpacity
80
- onPress={handleSave}
81
- disabled={isSaving}
82
- style={[styles.saveButton, { opacity: isSaving ? 0.5 : 1 }]}
83
- >
84
- <Text style={[styles.saveButtonText, { color: colors.tint }]}>
85
- {isSaving ? 'Saving...' : 'Save'}
86
- </Text>
87
- </TouchableOpacity>
88
- </View>
89
-
90
- <View style={styles.modalBody}>
91
- <View style={styles.inputGroup}>
92
- <Text style={[styles.label, { color: colors.text }]}>
93
- {t('editProfile.items.displayName.firstName') || 'First Name'}
94
- </Text>
95
- <TextInput
96
- style={[
97
- styles.input,
98
- {
99
- backgroundColor: colors.card,
100
- color: colors.text,
101
- borderColor: colors.border,
102
- },
103
- ]}
104
- value={displayName}
105
- onChangeText={setDisplayName}
106
- placeholder={t('editProfile.items.displayName.firstNamePlaceholder') || 'Enter first name'}
107
- placeholderTextColor={colors.secondaryText}
108
- autoFocus
109
- selectionColor={colors.tint}
110
- />
111
- </View>
112
-
113
- <View style={styles.inputGroup}>
114
- <Text style={[styles.label, { color: colors.text }]}>
115
- {t('editProfile.items.displayName.lastName') || 'Last Name'}
116
- </Text>
117
- <TextInput
118
- style={[
119
- styles.input,
120
- {
121
- backgroundColor: colors.card,
122
- color: colors.text,
123
- borderColor: colors.border,
124
- },
125
- ]}
126
- value={lastName}
127
- onChangeText={setLastName}
128
- placeholder={t('editProfile.items.displayName.lastNamePlaceholder') || 'Enter last name (optional)'}
129
- placeholderTextColor={colors.secondaryText}
130
- selectionColor={colors.tint}
131
- />
132
- </View>
133
- </View>
134
- </View>
135
- </View>
136
- </Modal>
137
- );
138
- };
139
-
140
- const styles = StyleSheet.create({
141
- modalOverlay: {
142
- flex: 1,
143
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
144
- justifyContent: 'flex-end',
145
- },
146
- modalContent: {
147
- borderTopLeftRadius: 20,
148
- borderTopRightRadius: 20,
149
- paddingTop: Platform.OS === 'ios' ? 20 : 16,
150
- maxHeight: '80%',
151
- },
152
- modalHeader: {
153
- flexDirection: 'row',
154
- alignItems: 'center',
155
- justifyContent: 'space-between',
156
- paddingHorizontal: 16,
157
- paddingBottom: 16,
158
- borderBottomWidth: StyleSheet.hairlineWidth,
159
- borderBottomColor: '#E5E5EA',
160
- },
161
- closeButton: {
162
- width: 40,
163
- height: 40,
164
- alignItems: 'center',
165
- justifyContent: 'center',
166
- },
167
- modalTitle: {
168
- fontSize: 18,
169
- fontWeight: '600',
170
- fontFamily: fontFamilies.phuduSemiBold,
171
- flex: 1,
172
- textAlign: 'center',
173
- },
174
- saveButton: {
175
- paddingHorizontal: 16,
176
- paddingVertical: 8,
177
- },
178
- saveButtonText: {
179
- fontSize: 16,
180
- fontWeight: '600',
181
- fontFamily: fontFamilies.phuduSemiBold,
182
- },
183
- modalBody: {
184
- padding: 16,
185
- gap: 16,
186
- },
187
- inputGroup: {
188
- gap: 8,
189
- },
190
- label: {
191
- fontSize: 14,
192
- fontWeight: '600',
193
- fontFamily: fontFamilies.phuduSemiBold,
194
- },
195
- input: {
196
- borderWidth: StyleSheet.hairlineWidth,
197
- borderRadius: 12,
198
- padding: 16,
199
- fontSize: 16,
200
- minHeight: 52,
201
- },
202
- });
203
-
@@ -1,188 +0,0 @@
1
- import React, { useState, useEffect } from 'react';
2
- import {
3
- View,
4
- Text,
5
- TextInput,
6
- TouchableOpacity,
7
- StyleSheet,
8
- Modal,
9
- Platform,
10
- } from 'react-native';
11
- import { Ionicons } from '@expo/vector-icons';
12
- import { useThemeStyles } from '../../hooks/useThemeStyles';
13
- import { useColorScheme } from '../../hooks/use-color-scheme';
14
- import { useI18n } from '../../hooks/useI18n';
15
- import { fontFamilies } from '../../styles/fonts';
16
- import { useProfileEditing } from '../../hooks/useProfileEditing';
17
-
18
- interface EditEmailModalProps {
19
- visible: boolean;
20
- onClose: () => void;
21
- initialValue?: string;
22
- theme?: 'light' | 'dark';
23
- onSave?: () => void;
24
- }
25
-
26
- export const EditEmailModal: React.FC<EditEmailModalProps> = ({
27
- visible,
28
- onClose,
29
- initialValue = '',
30
- theme = 'light',
31
- onSave,
32
- }) => {
33
- const { t } = useI18n();
34
- const colorScheme = useColorScheme();
35
- const themeStyles = useThemeStyles(theme || 'light', colorScheme);
36
- const colors = themeStyles.colors;
37
- const { updateField, isSaving } = useProfileEditing();
38
-
39
- const [email, setEmail] = useState(initialValue);
40
-
41
- useEffect(() => {
42
- if (visible) {
43
- setEmail(initialValue);
44
- }
45
- }, [visible, initialValue]);
46
-
47
- const handleSave = async () => {
48
- const success = await updateField('email', email);
49
- if (success) {
50
- onSave?.();
51
- onClose();
52
- }
53
- };
54
-
55
- const isValidEmail = (email: string) => {
56
- return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
57
- };
58
-
59
- return (
60
- <Modal
61
- visible={visible}
62
- animationType="slide"
63
- transparent={true}
64
- onRequestClose={onClose}
65
- >
66
- <View style={styles.modalOverlay}>
67
- <View style={[styles.modalContent, { backgroundColor: colors.background }]}>
68
- <View style={styles.modalHeader}>
69
- <TouchableOpacity onPress={onClose} style={styles.closeButton}>
70
- <Ionicons name="close" size={24} color={colors.text} />
71
- </TouchableOpacity>
72
- <Text style={[styles.modalTitle, { color: colors.text }]}>
73
- {t('editProfile.items.email.title') || 'Email'}
74
- </Text>
75
- <TouchableOpacity
76
- onPress={handleSave}
77
- disabled={isSaving || !isValidEmail(email)}
78
- style={[styles.saveButton, { opacity: (isSaving || !isValidEmail(email)) ? 0.5 : 1 }]}
79
- >
80
- <Text style={[styles.saveButtonText, { color: colors.tint }]}>
81
- {isSaving ? 'Saving...' : 'Save'}
82
- </Text>
83
- </TouchableOpacity>
84
- </View>
85
-
86
- <View style={styles.modalBody}>
87
- <View style={styles.inputGroup}>
88
- <Text style={[styles.label, { color: colors.text }]}>
89
- {t('editProfile.items.email.label') || 'Email Address'}
90
- </Text>
91
- <TextInput
92
- style={[
93
- styles.input,
94
- {
95
- backgroundColor: colors.card,
96
- color: colors.text,
97
- borderColor: colors.border,
98
- },
99
- ]}
100
- value={email}
101
- onChangeText={setEmail}
102
- placeholder={t('editProfile.items.email.placeholder') || 'Enter your email address'}
103
- placeholderTextColor={colors.secondaryText}
104
- autoFocus
105
- keyboardType="email-address"
106
- autoCapitalize="none"
107
- autoCorrect={false}
108
- selectionColor={colors.tint}
109
- />
110
- </View>
111
- </View>
112
- </View>
113
- </View>
114
- </Modal>
115
- );
116
- };
117
-
118
- const styles = StyleSheet.create({
119
- modalOverlay: {
120
- flex: 1,
121
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
122
- justifyContent: 'flex-end',
123
- },
124
- modalContent: {
125
- borderTopLeftRadius: 20,
126
- borderTopRightRadius: 20,
127
- paddingTop: Platform.OS === 'ios' ? 20 : 16,
128
- maxHeight: '80%',
129
- },
130
- modalHeader: {
131
- flexDirection: 'row',
132
- alignItems: 'center',
133
- justifyContent: 'space-between',
134
- paddingHorizontal: 16,
135
- paddingBottom: 16,
136
- borderBottomWidth: StyleSheet.hairlineWidth,
137
- borderBottomColor: '#E5E5EA',
138
- },
139
- closeButton: {
140
- width: 40,
141
- height: 40,
142
- alignItems: 'center',
143
- justifyContent: 'center',
144
- },
145
- modalTitle: {
146
- fontSize: 18,
147
- fontWeight: '600',
148
- fontFamily: fontFamilies.phuduSemiBold,
149
- flex: 1,
150
- textAlign: 'center',
151
- },
152
- saveButton: {
153
- paddingHorizontal: 16,
154
- paddingVertical: 8,
155
- },
156
- saveButtonText: {
157
- fontSize: 16,
158
- fontWeight: '600',
159
- fontFamily: fontFamilies.phuduSemiBold,
160
- },
161
- modalBody: {
162
- padding: 16,
163
- gap: 16,
164
- },
165
- inputGroup: {
166
- gap: 8,
167
- },
168
- label: {
169
- fontSize: 14,
170
- fontWeight: '600',
171
- fontFamily: fontFamilies.phuduSemiBold,
172
- },
173
- input: {
174
- borderWidth: StyleSheet.hairlineWidth,
175
- borderRadius: 12,
176
- padding: 16,
177
- fontSize: 16,
178
- minHeight: 52,
179
- },
180
- });
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-