@oxyhq/services 5.21.7 → 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 (392) 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/i18n/locales/en-US.json +3 -3
  21. package/lib/commonjs/i18n/locales/es-ES.json +240 -19
  22. package/lib/commonjs/ui/components/Avatar.js +1 -1
  23. package/lib/commonjs/ui/components/Avatar.js.map +1 -1
  24. package/lib/commonjs/ui/components/FollowButton.js +1 -1
  25. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  26. package/lib/commonjs/ui/components/FontLoader.js +34 -34
  27. package/lib/commonjs/ui/components/FontLoader.js.map +1 -1
  28. package/lib/commonjs/ui/components/Header.js +4 -4
  29. package/lib/commonjs/ui/components/Header.js.map +1 -1
  30. package/lib/commonjs/ui/components/OxyPayButton.js +1 -1
  31. package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
  32. package/lib/commonjs/ui/components/OxySignInButton.js +2 -1
  33. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  34. package/lib/commonjs/ui/components/ProfileCard.js +1 -1
  35. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
  36. package/lib/commonjs/ui/components/SectionTitle.js +1 -1
  37. package/lib/commonjs/ui/components/SectionTitle.js.map +1 -1
  38. package/lib/commonjs/ui/components/StepBasedScreen.js +2 -1
  39. package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
  40. package/lib/commonjs/ui/components/feedback/feedbackStyles.js +2 -1
  41. package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +1 -1
  42. package/lib/commonjs/ui/components/fileManagement/styles.js +17 -17
  43. package/lib/commonjs/ui/components/fileManagement/styles.js.map +1 -1
  44. package/lib/commonjs/ui/components/payment/paymentStyles.js +7 -7
  45. package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -1
  46. package/lib/commonjs/ui/navigation/routes.js +2 -0
  47. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  48. package/lib/commonjs/ui/screens/AccountCenterScreen.js +4 -2
  49. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  50. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +13 -5
  51. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  52. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +273 -1820
  53. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  54. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +1 -1
  55. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  56. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +3 -1
  57. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  58. package/lib/commonjs/ui/screens/AppInfoScreen.js +2 -2
  59. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  60. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +640 -0
  61. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -0
  62. package/lib/commonjs/ui/screens/FileManagementScreen.js +39 -21
  63. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  64. package/lib/commonjs/ui/screens/HistoryViewScreen.js +9 -3
  65. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  66. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +4 -2
  67. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  68. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +3 -1
  69. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  70. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +11 -12
  71. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  72. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +12 -4
  73. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  74. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +3 -1
  75. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  76. package/lib/commonjs/ui/screens/SessionManagementScreen.js +15 -5
  77. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  78. package/lib/commonjs/ui/screens/UserLinksScreen.js +3 -1
  79. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  80. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +2 -1
  81. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  82. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +2 -4
  83. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  84. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -3
  85. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  86. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +3 -3
  87. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  88. package/lib/commonjs/ui/styles/authStyles.js +5 -4
  89. package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
  90. package/lib/commonjs/ui/styles/fonts.js +27 -27
  91. package/lib/commonjs/ui/styles/fonts.js.map +1 -1
  92. package/lib/commonjs/ui/styles/theme.js +3 -3
  93. package/lib/commonjs/ui/styles/theme.js.map +1 -1
  94. package/lib/commonjs/web.js +682 -0
  95. package/lib/commonjs/web.js.map +1 -0
  96. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  97. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  98. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  99. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  100. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  101. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  102. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  103. package/lib/module/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  104. package/lib/module/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  105. package/lib/module/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  106. package/lib/module/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  107. package/lib/module/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  108. package/lib/module/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  109. package/lib/module/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  110. package/lib/module/core/HttpService.js +87 -2
  111. package/lib/module/core/HttpService.js.map +1 -1
  112. package/lib/module/core/mixins/OxyServices.assets.js +3 -1
  113. package/lib/module/core/mixins/OxyServices.assets.js.map +1 -1
  114. package/lib/module/i18n/locales/en-US.json +3 -3
  115. package/lib/module/i18n/locales/es-ES.json +240 -19
  116. package/lib/module/ui/components/Avatar.js +1 -1
  117. package/lib/module/ui/components/Avatar.js.map +1 -1
  118. package/lib/module/ui/components/FollowButton.js +1 -1
  119. package/lib/module/ui/components/FollowButton.js.map +1 -1
  120. package/lib/module/ui/components/FontLoader.js +34 -34
  121. package/lib/module/ui/components/FontLoader.js.map +1 -1
  122. package/lib/module/ui/components/Header.js +4 -4
  123. package/lib/module/ui/components/Header.js.map +1 -1
  124. package/lib/module/ui/components/OxyPayButton.js +1 -1
  125. package/lib/module/ui/components/OxyPayButton.js.map +1 -1
  126. package/lib/module/ui/components/OxySignInButton.js +2 -1
  127. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  128. package/lib/module/ui/components/ProfileCard.js +1 -1
  129. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  130. package/lib/module/ui/components/SectionTitle.js +1 -1
  131. package/lib/module/ui/components/SectionTitle.js.map +1 -1
  132. package/lib/module/ui/components/StepBasedScreen.js +2 -1
  133. package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
  134. package/lib/module/ui/components/feedback/feedbackStyles.js +2 -1
  135. package/lib/module/ui/components/feedback/feedbackStyles.js.map +1 -1
  136. package/lib/module/ui/components/fileManagement/styles.js +17 -17
  137. package/lib/module/ui/components/fileManagement/styles.js.map +1 -1
  138. package/lib/module/ui/components/payment/paymentStyles.js +7 -7
  139. package/lib/module/ui/components/payment/paymentStyles.js.map +1 -1
  140. package/lib/module/ui/navigation/routes.js +2 -0
  141. package/lib/module/ui/navigation/routes.js.map +1 -1
  142. package/lib/module/ui/screens/AccountCenterScreen.js +4 -2
  143. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  144. package/lib/module/ui/screens/AccountOverviewScreen.js +13 -5
  145. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  146. package/lib/module/ui/screens/AccountSettingsScreen.js +277 -1824
  147. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  148. package/lib/module/ui/screens/AccountSwitcherScreen.js +1 -1
  149. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  150. package/lib/module/ui/screens/AccountVerificationScreen.js +3 -1
  151. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  152. package/lib/module/ui/screens/AppInfoScreen.js +2 -2
  153. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  154. package/lib/module/ui/screens/EditProfileFieldScreen.js +635 -0
  155. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -0
  156. package/lib/module/ui/screens/FileManagementScreen.js +39 -21
  157. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  158. package/lib/module/ui/screens/HistoryViewScreen.js +9 -3
  159. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  160. package/lib/module/ui/screens/LanguageSelectorScreen.js +4 -2
  161. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  162. package/lib/module/ui/screens/LegalDocumentsScreen.js +3 -1
  163. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  164. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +11 -12
  165. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  166. package/lib/module/ui/screens/PrivacySettingsScreen.js +12 -4
  167. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  168. package/lib/module/ui/screens/SearchSettingsScreen.js +3 -1
  169. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  170. package/lib/module/ui/screens/SessionManagementScreen.js +15 -5
  171. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  172. package/lib/module/ui/screens/UserLinksScreen.js +3 -1
  173. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  174. package/lib/module/ui/screens/WelcomeNewUserScreen.js +2 -1
  175. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  176. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +2 -4
  177. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  178. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -3
  179. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  180. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +3 -3
  181. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  182. package/lib/module/ui/styles/authStyles.js +5 -4
  183. package/lib/module/ui/styles/authStyles.js.map +1 -1
  184. package/lib/module/ui/styles/fonts.js +27 -27
  185. package/lib/module/ui/styles/fonts.js.map +1 -1
  186. package/lib/module/ui/styles/theme.js +3 -3
  187. package/lib/module/ui/styles/theme.js.map +1 -1
  188. package/lib/module/web.js +75 -0
  189. package/lib/module/web.js.map +1 -0
  190. package/lib/typescript/commonjs/core/HttpService.d.ts +5 -0
  191. package/lib/typescript/commonjs/core/HttpService.d.ts.map +1 -1
  192. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/ui/components/StepBasedScreen.d.ts.map +1 -1
  194. package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts.map +1 -1
  195. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  196. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  197. package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  198. package/lib/typescript/commonjs/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  199. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  200. package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  201. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts +13 -0
  202. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  204. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  205. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  206. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  207. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  208. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  209. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  210. package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  211. package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
  212. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  213. package/lib/typescript/commonjs/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
  214. package/lib/typescript/commonjs/ui/styles/fonts.d.ts +7 -7
  215. package/lib/typescript/commonjs/ui/styles/theme.d.ts.map +1 -1
  216. package/lib/typescript/commonjs/web.d.ts +54 -0
  217. package/lib/typescript/commonjs/web.d.ts.map +1 -0
  218. package/lib/typescript/module/core/HttpService.d.ts +5 -0
  219. package/lib/typescript/module/core/HttpService.d.ts.map +1 -1
  220. package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
  221. package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
  222. package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts.map +1 -1
  223. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  224. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  225. package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  226. package/lib/typescript/module/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  227. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  228. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  229. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +13 -0
  230. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -0
  231. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  232. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  233. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  234. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  235. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  236. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  237. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  238. package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  239. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  240. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  241. package/lib/typescript/module/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
  242. package/lib/typescript/module/ui/styles/fonts.d.ts +7 -7
  243. package/lib/typescript/module/ui/styles/theme.d.ts.map +1 -1
  244. package/lib/typescript/module/web.d.ts +54 -0
  245. package/lib/typescript/module/web.d.ts.map +1 -0
  246. package/package.json +27 -41
  247. package/src/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  248. package/src/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  249. package/src/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  250. package/src/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  251. package/src/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  252. package/src/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  253. package/src/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  254. package/src/core/HttpService.ts +91 -0
  255. package/src/core/mixins/OxyServices.assets.ts +1 -1
  256. package/src/i18n/locales/en-US.json +3 -3
  257. package/src/i18n/locales/es-ES.json +240 -19
  258. package/src/ui/components/Avatar.tsx +1 -1
  259. package/src/ui/components/FollowButton.tsx +1 -1
  260. package/src/ui/components/FontLoader.tsx +34 -34
  261. package/src/ui/components/Header.tsx +4 -4
  262. package/src/ui/components/OxyPayButton.tsx +1 -1
  263. package/src/ui/components/OxySignInButton.tsx +2 -1
  264. package/src/ui/components/ProfileCard.tsx +1 -1
  265. package/src/ui/components/SectionTitle.tsx +1 -1
  266. package/src/ui/components/StepBasedScreen.tsx +2 -1
  267. package/src/ui/components/feedback/feedbackStyles.ts +2 -1
  268. package/src/ui/components/fileManagement/styles.ts +17 -17
  269. package/src/ui/components/payment/paymentStyles.ts +7 -7
  270. package/src/ui/navigation/routes.ts +3 -0
  271. package/src/ui/screens/AccountCenterScreen.tsx +4 -2
  272. package/src/ui/screens/AccountOverviewScreen.tsx +13 -5
  273. package/src/ui/screens/AccountSettingsScreen.tsx +35 -1511
  274. package/src/ui/screens/AccountSwitcherScreen.tsx +1 -1
  275. package/src/ui/screens/AccountVerificationScreen.tsx +3 -1
  276. package/src/ui/screens/AppInfoScreen.tsx +2 -2
  277. package/src/ui/screens/EditProfileFieldScreen.tsx +685 -0
  278. package/src/ui/screens/FileManagementScreen.tsx +33 -15
  279. package/src/ui/screens/HistoryViewScreen.tsx +9 -3
  280. package/src/ui/screens/LanguageSelectorScreen.tsx +4 -2
  281. package/src/ui/screens/LegalDocumentsScreen.tsx +3 -1
  282. package/src/ui/screens/PremiumSubscriptionScreen.tsx +11 -13
  283. package/src/ui/screens/PrivacySettingsScreen.tsx +12 -4
  284. package/src/ui/screens/SearchSettingsScreen.tsx +3 -1
  285. package/src/ui/screens/SessionManagementScreen.tsx +15 -5
  286. package/src/ui/screens/UserLinksScreen.tsx +3 -1
  287. package/src/ui/screens/WelcomeNewUserScreen.tsx +2 -1
  288. package/src/ui/screens/karma/KarmaAboutScreen.tsx +6 -8
  289. package/src/ui/screens/karma/KarmaCenterScreen.tsx +3 -3
  290. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +3 -3
  291. package/src/ui/styles/authStyles.ts +4 -4
  292. package/src/ui/styles/fonts.ts +26 -26
  293. package/src/ui/styles/theme.ts +3 -5
  294. package/src/web.ts +230 -0
  295. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  296. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  297. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  298. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  299. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  300. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  301. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  302. package/lib/commonjs/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  303. package/lib/commonjs/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  304. package/lib/commonjs/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  305. package/lib/commonjs/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  306. package/lib/commonjs/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  307. package/lib/commonjs/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  308. package/lib/commonjs/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  309. package/lib/commonjs/ui/components/profile/EditBioModal.js +0 -49
  310. package/lib/commonjs/ui/components/profile/EditBioModal.js.map +0 -1
  311. package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js +0 -54
  312. package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js.map +0 -1
  313. package/lib/commonjs/ui/components/profile/EditEmailModal.js +0 -57
  314. package/lib/commonjs/ui/components/profile/EditEmailModal.js.map +0 -1
  315. package/lib/commonjs/ui/components/profile/EditFieldModal.js +0 -412
  316. package/lib/commonjs/ui/components/profile/EditFieldModal.js.map +0 -1
  317. package/lib/commonjs/ui/components/profile/EditLinksModal.js +0 -315
  318. package/lib/commonjs/ui/components/profile/EditLinksModal.js.map +0 -1
  319. package/lib/commonjs/ui/components/profile/EditLocationModal.js +0 -91
  320. package/lib/commonjs/ui/components/profile/EditLocationModal.js.map +0 -1
  321. package/lib/commonjs/ui/components/profile/EditUsernameModal.js +0 -55
  322. package/lib/commonjs/ui/components/profile/EditUsernameModal.js.map +0 -1
  323. package/lib/module/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  324. package/lib/module/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  325. package/lib/module/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  326. package/lib/module/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  327. package/lib/module/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  328. package/lib/module/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  329. package/lib/module/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  330. package/lib/module/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  331. package/lib/module/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  332. package/lib/module/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  333. package/lib/module/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  334. package/lib/module/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  335. package/lib/module/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  336. package/lib/module/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  337. package/lib/module/ui/components/profile/EditBioModal.js +0 -43
  338. package/lib/module/ui/components/profile/EditBioModal.js.map +0 -1
  339. package/lib/module/ui/components/profile/EditDisplayNameModal.js +0 -48
  340. package/lib/module/ui/components/profile/EditDisplayNameModal.js.map +0 -1
  341. package/lib/module/ui/components/profile/EditEmailModal.js +0 -51
  342. package/lib/module/ui/components/profile/EditEmailModal.js.map +0 -1
  343. package/lib/module/ui/components/profile/EditFieldModal.js +0 -406
  344. package/lib/module/ui/components/profile/EditFieldModal.js.map +0 -1
  345. package/lib/module/ui/components/profile/EditLinksModal.js +0 -309
  346. package/lib/module/ui/components/profile/EditLinksModal.js.map +0 -1
  347. package/lib/module/ui/components/profile/EditLocationModal.js +0 -85
  348. package/lib/module/ui/components/profile/EditLocationModal.js.map +0 -1
  349. package/lib/module/ui/components/profile/EditUsernameModal.js +0 -49
  350. package/lib/module/ui/components/profile/EditUsernameModal.js.map +0 -1
  351. package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts +0 -11
  352. package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts.map +0 -1
  353. package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts +0 -12
  354. package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts.map +0 -1
  355. package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts +0 -11
  356. package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts.map +0 -1
  357. package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts +0 -110
  358. package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts.map +0 -1
  359. package/lib/typescript/commonjs/ui/components/profile/EditLinksModal.d.ts +0 -18
  360. package/lib/typescript/commonjs/ui/components/profile/EditLinksModal.d.ts.map +0 -1
  361. package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts +0 -21
  362. package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts.map +0 -1
  363. package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts +0 -11
  364. package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts.map +0 -1
  365. package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts +0 -11
  366. package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts.map +0 -1
  367. package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts +0 -12
  368. package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts.map +0 -1
  369. package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts +0 -11
  370. package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts.map +0 -1
  371. package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts +0 -110
  372. package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts.map +0 -1
  373. package/lib/typescript/module/ui/components/profile/EditLinksModal.d.ts +0 -18
  374. package/lib/typescript/module/ui/components/profile/EditLinksModal.d.ts.map +0 -1
  375. package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts +0 -21
  376. package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts.map +0 -1
  377. package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts +0 -11
  378. package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts.map +0 -1
  379. package/src/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  380. package/src/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  381. package/src/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  382. package/src/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  383. package/src/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  384. package/src/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  385. package/src/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  386. package/src/ui/components/profile/EditBioModal.tsx +0 -46
  387. package/src/ui/components/profile/EditDisplayNameModal.tsx +0 -56
  388. package/src/ui/components/profile/EditEmailModal.tsx +0 -57
  389. package/src/ui/components/profile/EditFieldModal.tsx +0 -465
  390. package/src/ui/components/profile/EditLinksModal.tsx +0 -316
  391. package/src/ui/components/profile/EditLocationModal.tsx +0 -91
  392. package/src/ui/components/profile/EditUsernameModal.tsx +0 -55
@@ -0,0 +1,640 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _vectorIcons = require("@expo/vector-icons");
10
+ var _useThemeStyles = require("../hooks/useThemeStyles.js");
11
+ var _useColorScheme = require("../hooks/use-color-scheme.js");
12
+ var _themeUtils = require("../utils/themeUtils.js");
13
+ var _index = require("../components/index.js");
14
+ var _useI18n = require("../hooks/useI18n.js");
15
+ var _OxyContext = require("../context/OxyContext.js");
16
+ var _useProfileEditing = require("../hooks/useProfileEditing.js");
17
+ var _fonts = require("../styles/fonts.js");
18
+ var _sonner = require("../../lib/sonner.js");
19
+ var _validationUtils = require("../../utils/validationUtils.js");
20
+ var _jsxRuntime = require("react/jsx-runtime");
21
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
22
+ /**
23
+ * Field types supported by EditProfileFieldScreen
24
+ */
25
+
26
+ /**
27
+ * Field configuration for each field type
28
+ */
29
+
30
+ /**
31
+ * EditProfileFieldScreen - A dedicated screen for editing profile fields
32
+ *
33
+ * Navigate to this screen with a fieldType prop to edit that specific field.
34
+ *
35
+ * @example
36
+ * navigate('EditProfileField', { fieldType: 'username' })
37
+ */
38
+ const EditProfileFieldScreen = ({
39
+ goBack,
40
+ onClose,
41
+ theme,
42
+ fieldType = 'displayName'
43
+ }) => {
44
+ const {
45
+ user
46
+ } = (0, _OxyContext.useOxy)();
47
+ const {
48
+ t
49
+ } = (0, _useI18n.useI18n)();
50
+ const {
51
+ saveProfile,
52
+ updateField,
53
+ isSaving
54
+ } = (0, _useProfileEditing.useProfileEditing)();
55
+ const colorScheme = (0, _useColorScheme.useColorScheme)();
56
+ const normalizedTheme = (0, _themeUtils.normalizeTheme)(theme);
57
+ const themeStyles = (0, _useThemeStyles.useThemeStyles)(normalizedTheme, colorScheme);
58
+ const colors = themeStyles.colors;
59
+
60
+ // State for field values
61
+ const [fieldValues, setFieldValues] = (0, _react.useState)({});
62
+ const [fieldErrors, setFieldErrors] = (0, _react.useState)({});
63
+
64
+ // State for list fields (locations, links)
65
+ const [listItems, setListItems] = (0, _react.useState)([]);
66
+ const [newItemValue, setNewItemValue] = (0, _react.useState)('');
67
+
68
+ // Get field configuration based on fieldType
69
+ const fieldConfig = (0, _react.useMemo)(() => {
70
+ switch (fieldType) {
71
+ case 'displayName':
72
+ return {
73
+ title: t('editProfile.items.displayName.title') || 'Display Name',
74
+ subtitle: t('editProfile.items.displayName.subtitle') || 'This is how your name will appear to others',
75
+ fields: [{
76
+ key: 'displayName',
77
+ label: t('editProfile.items.displayName.firstName') || 'First Name',
78
+ placeholder: t('editProfile.items.displayName.firstNamePlaceholder') || 'Enter first name'
79
+ }, {
80
+ key: 'lastName',
81
+ label: t('editProfile.items.displayName.lastName') || 'Last Name',
82
+ placeholder: t('editProfile.items.displayName.lastNamePlaceholder') || 'Enter last name (optional)'
83
+ }]
84
+ };
85
+ case 'username':
86
+ return {
87
+ title: t('editProfile.items.username.title') || 'Username',
88
+ subtitle: t('editProfile.items.username.subtitle') || 'Your unique identifier on the platform',
89
+ fields: [{
90
+ key: 'username',
91
+ label: t('editProfile.items.username.label') || 'Username',
92
+ placeholder: t('editProfile.items.username.placeholder') || 'Choose a username',
93
+ validation: value => {
94
+ if (!value.trim()) {
95
+ return t('editProfile.items.username.required') || 'Username is required';
96
+ }
97
+ if (value.length < 3) {
98
+ return t('editProfile.items.username.tooShort') || 'Username must be at least 3 characters';
99
+ }
100
+ return undefined;
101
+ },
102
+ inputProps: {
103
+ autoCapitalize: 'none',
104
+ autoCorrect: false
105
+ }
106
+ }]
107
+ };
108
+ case 'email':
109
+ return {
110
+ title: t('editProfile.items.email.title') || 'Email',
111
+ subtitle: t('editProfile.items.email.subtitle') || 'Your primary email address',
112
+ fields: [{
113
+ key: 'email',
114
+ label: t('editProfile.items.email.label') || 'Email Address',
115
+ placeholder: t('editProfile.items.email.placeholder') || 'Enter your email address',
116
+ type: 'email',
117
+ validation: value => {
118
+ if (!_validationUtils.EMAIL_REGEX.test(value)) {
119
+ return t('editProfile.items.email.invalid') || 'Please enter a valid email address';
120
+ }
121
+ return undefined;
122
+ },
123
+ inputProps: {
124
+ keyboardType: 'email-address',
125
+ autoCapitalize: 'none',
126
+ autoCorrect: false
127
+ }
128
+ }]
129
+ };
130
+ case 'bio':
131
+ return {
132
+ title: t('editProfile.items.bio.title') || 'Bio',
133
+ subtitle: t('editProfile.items.bio.subtitle') || 'Tell people a bit about yourself',
134
+ fields: [{
135
+ key: 'bio',
136
+ label: t('editProfile.items.bio.label') || 'Bio',
137
+ placeholder: t('editProfile.items.bio.placeholder') || 'Tell people about yourself...',
138
+ type: 'textarea',
139
+ inputProps: {
140
+ multiline: true,
141
+ numberOfLines: 6,
142
+ textAlignVertical: 'top'
143
+ }
144
+ }]
145
+ };
146
+ case 'phone':
147
+ return {
148
+ title: t('editProfile.items.phone.title') || 'Phone Number',
149
+ subtitle: t('editProfile.items.phone.subtitle') || 'Your contact phone number',
150
+ fields: [{
151
+ key: 'phone',
152
+ label: t('editProfile.items.phone.label') || 'Phone Number',
153
+ placeholder: t('editProfile.items.phone.placeholder') || 'Enter your phone number',
154
+ inputProps: {
155
+ keyboardType: 'phone-pad',
156
+ autoCapitalize: 'none',
157
+ autoCorrect: false
158
+ }
159
+ }]
160
+ };
161
+ case 'address':
162
+ return {
163
+ title: t('editProfile.items.address.title') || 'Address',
164
+ subtitle: t('editProfile.items.address.subtitle') || 'Your physical address',
165
+ fields: [{
166
+ key: 'address',
167
+ label: t('editProfile.items.address.label') || 'Address',
168
+ placeholder: t('editProfile.items.address.placeholder') || 'Enter your address',
169
+ type: 'textarea',
170
+ inputProps: {
171
+ multiline: true,
172
+ numberOfLines: 3,
173
+ textAlignVertical: 'top'
174
+ }
175
+ }]
176
+ };
177
+ case 'birthday':
178
+ return {
179
+ title: t('editProfile.items.birthday.title') || 'Birthday',
180
+ subtitle: t('editProfile.items.birthday.subtitle') || 'Your date of birth',
181
+ fields: [{
182
+ key: 'birthday',
183
+ label: t('editProfile.items.birthday.label') || 'Birthday',
184
+ placeholder: t('editProfile.items.birthday.placeholder') || 'YYYY-MM-DD',
185
+ inputProps: {
186
+ autoCapitalize: 'none',
187
+ autoCorrect: false
188
+ }
189
+ }]
190
+ };
191
+ case 'locations':
192
+ return {
193
+ title: t('editProfile.items.locations.title') || 'Locations',
194
+ subtitle: t('editProfile.items.locations.subtitle') || 'Places you\'ve been or live',
195
+ fields: [],
196
+ isList: true
197
+ };
198
+ case 'links':
199
+ return {
200
+ title: t('editProfile.items.links.title') || 'Links',
201
+ subtitle: t('editProfile.items.links.subtitle') || 'Share your website, social profiles, etc.',
202
+ fields: [],
203
+ isList: true
204
+ };
205
+ default:
206
+ return {
207
+ title: 'Edit Field',
208
+ fields: []
209
+ };
210
+ }
211
+ }, [fieldType, t]);
212
+
213
+ // Initialize field values from user data
214
+ (0, _react.useEffect)(() => {
215
+ if (!user) return;
216
+
217
+ // Cast user to any to access dynamic properties
218
+ const userData = user;
219
+ if (fieldConfig.isList) {
220
+ if (fieldType === 'locations') {
221
+ const locations = Array.isArray(userData.locations) ? userData.locations : [];
222
+ setListItems(locations.map((loc, i) => ({
223
+ id: loc.id || `location-${i}`,
224
+ name: loc.name || '',
225
+ ...loc
226
+ })));
227
+ } else if (fieldType === 'links') {
228
+ const linksMetadata = Array.isArray(userData.linksMetadata) ? userData.linksMetadata : [];
229
+ const links = Array.isArray(userData.links) ? userData.links : [];
230
+ // Use linksMetadata if available, otherwise convert links array
231
+ if (linksMetadata.length > 0) {
232
+ setListItems(linksMetadata.map((link, i) => ({
233
+ id: link.id || `link-${i}`,
234
+ url: link.url || link.link || '',
235
+ title: link.title || '',
236
+ ...link
237
+ })));
238
+ } else {
239
+ setListItems(links.map((item, i) => {
240
+ const url = typeof item === 'string' ? item : item.link || item.url || '';
241
+ return {
242
+ id: `link-${i}`,
243
+ url,
244
+ title: url.replace(/^https?:\/\//, '').replace(/\/$/, '')
245
+ };
246
+ }));
247
+ }
248
+ }
249
+ } else {
250
+ const initialValues = {};
251
+ fieldConfig.fields.forEach(field => {
252
+ if (field.key === 'displayName') {
253
+ initialValues[field.key] = String(userData.displayName || userData.name?.first || '');
254
+ } else if (field.key === 'lastName') {
255
+ initialValues[field.key] = String(userData.lastName || userData.name?.last || '');
256
+ } else if (field.key === 'birthday') {
257
+ initialValues[field.key] = String(userData.birthday || userData.dateOfBirth || '');
258
+ } else if (field.key === 'address') {
259
+ initialValues[field.key] = String(userData.address || userData.location || '');
260
+ } else {
261
+ initialValues[field.key] = String(userData[field.key] || '');
262
+ }
263
+ });
264
+ setFieldValues(initialValues);
265
+ }
266
+ }, [user, fieldConfig, fieldType]);
267
+
268
+ // Field change handler
269
+ const handleFieldChange = (0, _react.useCallback)((key, value) => {
270
+ setFieldValues(prev => ({
271
+ ...prev,
272
+ [key]: value
273
+ }));
274
+ if (fieldErrors[key]) {
275
+ setFieldErrors(prev => ({
276
+ ...prev,
277
+ [key]: undefined
278
+ }));
279
+ }
280
+ }, [fieldErrors]);
281
+
282
+ // Validate all fields
283
+ const validateFields = (0, _react.useCallback)(() => {
284
+ const errors = {};
285
+ let isValid = true;
286
+ fieldConfig.fields.forEach(field => {
287
+ if (field.validation) {
288
+ const error = field.validation(fieldValues[field.key] || '');
289
+ if (error) {
290
+ errors[field.key] = error;
291
+ isValid = false;
292
+ }
293
+ }
294
+ });
295
+ setFieldErrors(errors);
296
+ return isValid;
297
+ }, [fieldConfig.fields, fieldValues]);
298
+
299
+ // Add item to list
300
+ const handleAddItem = (0, _react.useCallback)(() => {
301
+ if (!newItemValue.trim()) return;
302
+ if (fieldType === 'locations') {
303
+ const newItem = {
304
+ id: `location-${Date.now()}`,
305
+ name: newItemValue.trim()
306
+ };
307
+ setListItems(prev => [...prev, newItem]);
308
+ } else if (fieldType === 'links') {
309
+ const newItem = {
310
+ id: `link-${Date.now()}`,
311
+ url: newItemValue.trim(),
312
+ title: newItemValue.replace(/^https?:\/\//, '').replace(/\/$/, '')
313
+ };
314
+ setListItems(prev => [...prev, newItem]);
315
+ }
316
+ setNewItemValue('');
317
+ }, [newItemValue, fieldType]);
318
+
319
+ // Remove item from list
320
+ const handleRemoveItem = (0, _react.useCallback)(id => {
321
+ setListItems(prev => prev.filter(item => item.id !== id));
322
+ }, []);
323
+
324
+ // Save handler
325
+ const handleSave = async () => {
326
+ if (fieldConfig.isList) {
327
+ let success = false;
328
+ if (fieldType === 'locations') {
329
+ success = await saveProfile({
330
+ locations: listItems
331
+ });
332
+ } else if (fieldType === 'links') {
333
+ success = await saveProfile({
334
+ linksMetadata: listItems,
335
+ links: listItems.map(item => item.url)
336
+ });
337
+ }
338
+ if (success) {
339
+ _sonner.toast.success(t('common.saved') || 'Saved successfully');
340
+ (onClose || goBack)?.();
341
+ }
342
+ } else {
343
+ if (!validateFields()) return;
344
+ let success = false;
345
+ if (fieldType === 'displayName') {
346
+ success = await saveProfile({
347
+ displayName: fieldValues.displayName,
348
+ lastName: fieldValues.lastName
349
+ });
350
+ } else {
351
+ const key = fieldConfig.fields[0]?.key;
352
+ if (key) {
353
+ success = await updateField(key, fieldValues[key]);
354
+ }
355
+ }
356
+ if (success) {
357
+ _sonner.toast.success(t('common.saved') || 'Saved successfully');
358
+ (onClose || goBack)?.();
359
+ }
360
+ }
361
+ };
362
+
363
+ // Render a single field input
364
+ const renderField = (field, index) => {
365
+ const isTextarea = field.type === 'textarea';
366
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
367
+ style: styles.inputGroup,
368
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
369
+ style: [styles.label, {
370
+ color: colors.text
371
+ }],
372
+ children: field.label
373
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
374
+ style: [isTextarea ? styles.textArea : styles.input, {
375
+ backgroundColor: colors.card,
376
+ color: colors.text,
377
+ borderColor: fieldErrors[field.key] ? '#FF3B30' : colors.border
378
+ }],
379
+ value: fieldValues[field.key] || '',
380
+ onChangeText: value => handleFieldChange(field.key, value),
381
+ placeholder: field.placeholder,
382
+ placeholderTextColor: colors.secondaryText,
383
+ autoFocus: index === 0,
384
+ selectionColor: colors.tint,
385
+ ...field.inputProps
386
+ }), fieldErrors[field.key] && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
387
+ style: styles.errorText,
388
+ children: fieldErrors[field.key]
389
+ })]
390
+ }, field.key);
391
+ };
392
+
393
+ // Render list content (locations or links)
394
+ const renderListContent = () => {
395
+ const addLabel = fieldType === 'locations' ? t('editProfile.items.locations.add') || 'Add Location' : t('editProfile.items.links.add') || 'Add Link';
396
+ const placeholder = fieldType === 'locations' ? t('editProfile.items.locations.placeholder') || 'Enter location name' : t('editProfile.items.links.placeholder') || 'Enter URL';
397
+ const listTitle = fieldType === 'locations' ? t('editProfile.items.locations.yourLocations') || 'Your Locations' : t('editProfile.items.links.yourLinks') || 'Your Links';
398
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
399
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
400
+ style: styles.inputGroup,
401
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
402
+ style: [styles.label, {
403
+ color: colors.text
404
+ }],
405
+ children: addLabel
406
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
407
+ style: styles.addItemRow,
408
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
409
+ style: [styles.input, {
410
+ backgroundColor: colors.card,
411
+ color: colors.text,
412
+ borderColor: colors.border,
413
+ flex: 1
414
+ }],
415
+ value: newItemValue,
416
+ onChangeText: setNewItemValue,
417
+ placeholder: placeholder,
418
+ placeholderTextColor: colors.secondaryText,
419
+ selectionColor: colors.tint,
420
+ autoCapitalize: "none",
421
+ autoCorrect: false,
422
+ onSubmitEditing: handleAddItem,
423
+ returnKeyType: "done",
424
+ keyboardType: fieldType === 'links' ? 'url' : 'default'
425
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
426
+ style: [styles.addButton, {
427
+ backgroundColor: newItemValue.trim() ? colors.tint : colors.border
428
+ }],
429
+ onPress: handleAddItem,
430
+ disabled: !newItemValue.trim(),
431
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
432
+ name: "add",
433
+ size: 20,
434
+ color: "#fff"
435
+ })
436
+ })]
437
+ })]
438
+ }), listItems.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
439
+ style: styles.listSection,
440
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
441
+ style: [styles.listTitle, {
442
+ color: colors.text
443
+ }],
444
+ children: [listTitle, " (", listItems.length, ")"]
445
+ }), listItems.map(item => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
446
+ style: [styles.listItem, {
447
+ backgroundColor: colors.card,
448
+ borderColor: colors.border
449
+ }],
450
+ children: [fieldType === 'links' && item.image && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
451
+ source: {
452
+ uri: item.image
453
+ },
454
+ style: styles.linkImage
455
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
456
+ style: styles.listItemContent,
457
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
458
+ style: [styles.listItemTitle, {
459
+ color: colors.text
460
+ }],
461
+ numberOfLines: 1,
462
+ children: fieldType === 'locations' ? item.name : item.title || item.url
463
+ }), fieldType === 'links' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
464
+ style: [styles.listItemSubtitle, {
465
+ color: colors.secondaryText
466
+ }],
467
+ numberOfLines: 1,
468
+ children: item.url
469
+ })]
470
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
471
+ onPress: () => handleRemoveItem(item.id),
472
+ style: styles.removeButton,
473
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
474
+ name: "trash-outline",
475
+ size: 18,
476
+ color: "#FF3B30"
477
+ })
478
+ })]
479
+ }, item.id))]
480
+ })]
481
+ });
482
+ };
483
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.KeyboardAvoidingView, {
484
+ style: [styles.container, {
485
+ backgroundColor: normalizedTheme === 'dark' ? '#000000' : '#F5F5F5'
486
+ }],
487
+ behavior: _reactNative.Platform.OS === 'ios' ? 'padding' : undefined,
488
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Header, {
489
+ title: "",
490
+ subtitle: "",
491
+ theme: normalizedTheme,
492
+ onBack: onClose || goBack,
493
+ variant: "minimal",
494
+ elevation: "none",
495
+ rightAction: {
496
+ text: isSaving ? t('common.saving') || 'Saving...' : t('common.save') || 'Save',
497
+ onPress: handleSave,
498
+ disabled: isSaving,
499
+ loading: isSaving
500
+ }
501
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
502
+ style: styles.content,
503
+ contentContainerStyle: styles.contentContainer,
504
+ showsVerticalScrollIndicator: false,
505
+ keyboardShouldPersistTaps: "handled",
506
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
507
+ style: styles.titleContainer,
508
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
509
+ style: [styles.bigTitle, {
510
+ color: colors.text
511
+ }],
512
+ children: fieldConfig.title
513
+ }), fieldConfig.subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
514
+ style: [styles.bigSubtitle, {
515
+ color: colors.secondaryText
516
+ }],
517
+ children: fieldConfig.subtitle
518
+ })]
519
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
520
+ style: [styles.formCard, {
521
+ backgroundColor: colors.card
522
+ }],
523
+ children: fieldConfig.isList ? renderListContent() : fieldConfig.fields.map(renderField)
524
+ })]
525
+ })]
526
+ });
527
+ };
528
+ const styles = _reactNative.StyleSheet.create({
529
+ container: {
530
+ flex: 1
531
+ },
532
+ content: {
533
+ flex: 1
534
+ },
535
+ contentContainer: {
536
+ padding: 16,
537
+ paddingTop: 24,
538
+ paddingBottom: 40
539
+ },
540
+ titleContainer: {
541
+ marginBottom: 24
542
+ },
543
+ bigTitle: {
544
+ fontSize: 34,
545
+ fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
546
+ fontFamily: _fonts.fontFamilies.interBold,
547
+ lineHeight: 40,
548
+ marginBottom: 8,
549
+ letterSpacing: -0.5
550
+ },
551
+ bigSubtitle: {
552
+ fontSize: 16,
553
+ lineHeight: 22,
554
+ opacity: 0.7,
555
+ marginTop: 4
556
+ },
557
+ formCard: {
558
+ borderRadius: 16,
559
+ padding: 16,
560
+ gap: 16
561
+ },
562
+ inputGroup: {
563
+ gap: 8
564
+ },
565
+ label: {
566
+ fontSize: 14,
567
+ fontWeight: '600',
568
+ fontFamily: _fonts.fontFamilies.interSemiBold
569
+ },
570
+ input: {
571
+ borderWidth: _reactNative.StyleSheet.hairlineWidth,
572
+ borderRadius: 12,
573
+ padding: 16,
574
+ fontSize: 16,
575
+ minHeight: 52
576
+ },
577
+ textArea: {
578
+ borderWidth: _reactNative.StyleSheet.hairlineWidth,
579
+ borderRadius: 12,
580
+ padding: 16,
581
+ fontSize: 16,
582
+ minHeight: 140
583
+ },
584
+ errorText: {
585
+ fontSize: 12,
586
+ color: '#FF3B30',
587
+ marginTop: 4
588
+ },
589
+ addItemRow: {
590
+ flexDirection: 'row',
591
+ gap: 8,
592
+ alignItems: 'center'
593
+ },
594
+ addButton: {
595
+ width: 52,
596
+ height: 52,
597
+ borderRadius: 12,
598
+ alignItems: 'center',
599
+ justifyContent: 'center'
600
+ },
601
+ listSection: {
602
+ marginTop: 8
603
+ },
604
+ listTitle: {
605
+ fontSize: 16,
606
+ fontWeight: '600',
607
+ fontFamily: _fonts.fontFamilies.interSemiBold,
608
+ marginBottom: 12
609
+ },
610
+ listItem: {
611
+ flexDirection: 'row',
612
+ alignItems: 'center',
613
+ padding: 16,
614
+ borderRadius: 12,
615
+ borderWidth: _reactNative.StyleSheet.hairlineWidth,
616
+ gap: 12,
617
+ marginBottom: 8
618
+ },
619
+ listItemContent: {
620
+ flex: 1,
621
+ gap: 4
622
+ },
623
+ listItemTitle: {
624
+ fontSize: 16,
625
+ fontWeight: '500'
626
+ },
627
+ listItemSubtitle: {
628
+ fontSize: 13
629
+ },
630
+ linkImage: {
631
+ width: 40,
632
+ height: 40,
633
+ borderRadius: 8
634
+ },
635
+ removeButton: {
636
+ padding: 8
637
+ }
638
+ });
639
+ var _default = exports.default = /*#__PURE__*/_react.default.memo(EditProfileFieldScreen);
640
+ //# sourceMappingURL=EditProfileFieldScreen.js.map