@oxyhq/services 5.5.8 → 5.6.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 (388) hide show
  1. package/README.md +16 -2
  2. package/lib/commonjs/core/index.js +69 -82
  3. package/lib/commonjs/core/index.js.map +1 -1
  4. package/lib/commonjs/index.js +24 -183
  5. package/lib/commonjs/index.js.map +1 -1
  6. package/lib/commonjs/node/index.js +0 -2
  7. package/lib/commonjs/node/index.js.map +1 -1
  8. package/lib/commonjs/ui/components/FollowButton.js +100 -229
  9. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  10. package/lib/commonjs/ui/components/OxyPayButton.js +131 -0
  11. package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -0
  12. package/lib/commonjs/ui/components/OxyProvider.js +41 -198
  13. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  14. package/lib/commonjs/ui/components/OxySignInButton.js +15 -2
  15. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  16. package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js +66 -0
  17. package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js.map +1 -0
  18. package/lib/commonjs/ui/components/icon/index.js +7 -0
  19. package/lib/commonjs/ui/components/icon/index.js.map +1 -1
  20. package/lib/commonjs/ui/components/index.js +7 -0
  21. package/lib/commonjs/ui/components/index.js.map +1 -1
  22. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +14 -7
  23. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
  24. package/lib/commonjs/ui/components/internal/PinInput.js +108 -0
  25. package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -0
  26. package/lib/commonjs/ui/components/internal/TextField.js +20 -0
  27. package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
  28. package/lib/commonjs/ui/context/OxyContext.js +26 -23
  29. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  30. package/lib/commonjs/ui/hooks/index.js +2 -15
  31. package/lib/commonjs/ui/hooks/index.js.map +1 -1
  32. package/lib/commonjs/ui/hooks/useFollow.js +52 -136
  33. package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
  34. package/lib/commonjs/ui/hooks/useSessionSocket.js +52 -0
  35. package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -0
  36. package/lib/commonjs/ui/index.js +8 -191
  37. package/lib/commonjs/ui/index.js.map +1 -1
  38. package/lib/commonjs/ui/navigation/OxyRouter.js +52 -60
  39. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  40. package/lib/commonjs/ui/screens/AccountCenterScreen.js +18 -30
  41. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  42. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +4 -22
  43. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  44. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +6 -14
  45. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  46. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +37 -66
  47. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  48. package/lib/commonjs/ui/screens/AppInfoScreen.js +21 -44
  49. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  50. package/lib/commonjs/ui/screens/FeedbackScreen.js +44 -23
  51. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  52. package/lib/commonjs/ui/screens/FileManagementScreen.js +59 -78
  53. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  54. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +1588 -0
  55. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -0
  56. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +22 -36
  57. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  58. package/lib/commonjs/ui/screens/RecoverAccountScreen.js +269 -0
  59. package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -0
  60. package/lib/commonjs/ui/screens/SessionManagementScreen.js +47 -69
  61. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  62. package/lib/commonjs/ui/screens/SignInScreen.js +99 -333
  63. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  64. package/lib/commonjs/ui/screens/SignUpScreen.js +136 -340
  65. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  66. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +192 -0
  67. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -0
  68. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +135 -0
  69. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -0
  70. package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +108 -0
  71. package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
  72. package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +126 -0
  73. package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
  74. package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js +84 -0
  75. package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
  76. package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js +59 -0
  77. package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
  78. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +15 -2
  79. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  80. package/lib/commonjs/ui/stores/authStore.js +31 -0
  81. package/lib/commonjs/ui/stores/authStore.js.map +1 -0
  82. package/lib/commonjs/ui/stores/followStore.js +124 -0
  83. package/lib/commonjs/ui/stores/followStore.js.map +1 -0
  84. package/lib/commonjs/ui/styles/index.js +0 -11
  85. package/lib/commonjs/ui/styles/index.js.map +1 -1
  86. package/lib/commonjs/ui/utils/confirmAction.js +28 -0
  87. package/lib/commonjs/ui/utils/confirmAction.js.map +1 -0
  88. package/lib/module/core/index.js +69 -81
  89. package/lib/module/core/index.js.map +1 -1
  90. package/lib/module/index.js +14 -17
  91. package/lib/module/index.js.map +1 -1
  92. package/lib/module/node/index.js +0 -3
  93. package/lib/module/node/index.js.map +1 -1
  94. package/lib/module/ui/components/FollowButton.js +100 -229
  95. package/lib/module/ui/components/FollowButton.js.map +1 -1
  96. package/lib/module/ui/components/OxyPayButton.js +125 -0
  97. package/lib/module/ui/components/OxyPayButton.js.map +1 -0
  98. package/lib/module/ui/components/OxyProvider.js +42 -199
  99. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  100. package/lib/module/ui/components/OxySignInButton.js +15 -2
  101. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  102. package/lib/module/ui/components/icon/FAIRWalletIcon.js +60 -0
  103. package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +1 -0
  104. package/lib/module/ui/components/icon/index.js +1 -0
  105. package/lib/module/ui/components/icon/index.js.map +1 -1
  106. package/lib/module/ui/components/index.js +1 -0
  107. package/lib/module/ui/components/index.js.map +1 -1
  108. package/lib/module/ui/components/internal/GroupedPillButtons.js +15 -8
  109. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
  110. package/lib/module/ui/components/internal/PinInput.js +103 -0
  111. package/lib/module/ui/components/internal/PinInput.js.map +1 -0
  112. package/lib/module/ui/components/internal/TextField.js +20 -0
  113. package/lib/module/ui/components/internal/TextField.js.map +1 -1
  114. package/lib/module/ui/context/OxyContext.js +26 -23
  115. package/lib/module/ui/context/OxyContext.js.map +1 -1
  116. package/lib/module/ui/hooks/index.js +1 -2
  117. package/lib/module/ui/hooks/index.js.map +1 -1
  118. package/lib/module/ui/hooks/useFollow.js +52 -137
  119. package/lib/module/ui/hooks/useFollow.js.map +1 -1
  120. package/lib/module/ui/hooks/useSessionSocket.js +47 -0
  121. package/lib/module/ui/hooks/useSessionSocket.js.map +1 -0
  122. package/lib/module/ui/index.js +2 -13
  123. package/lib/module/ui/index.js.map +1 -1
  124. package/lib/module/ui/navigation/OxyRouter.js +53 -61
  125. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  126. package/lib/module/ui/screens/AccountCenterScreen.js +6 -18
  127. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  128. package/lib/module/ui/screens/AccountOverviewScreen.js +5 -23
  129. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  130. package/lib/module/ui/screens/AccountSettingsScreen.js +7 -15
  131. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  132. package/lib/module/ui/screens/AccountSwitcherScreen.js +38 -67
  133. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  134. package/lib/module/ui/screens/AppInfoScreen.js +22 -45
  135. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  136. package/lib/module/ui/screens/FeedbackScreen.js +44 -23
  137. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  138. package/lib/module/ui/screens/FileManagementScreen.js +59 -78
  139. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  140. package/lib/module/ui/screens/PaymentGatewayScreen.js +1583 -0
  141. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -0
  142. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +23 -37
  143. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  144. package/lib/module/ui/screens/RecoverAccountScreen.js +263 -0
  145. package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -0
  146. package/lib/module/ui/screens/SessionManagementScreen.js +47 -69
  147. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  148. package/lib/module/ui/screens/SignInScreen.js +100 -334
  149. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  150. package/lib/module/ui/screens/SignUpScreen.js +137 -341
  151. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  152. package/lib/module/ui/screens/internal/SignInPasswordStep.js +186 -0
  153. package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -0
  154. package/lib/module/ui/screens/internal/SignInUsernameStep.js +129 -0
  155. package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -0
  156. package/lib/module/ui/screens/internal/SignUpIdentityStep.js +102 -0
  157. package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
  158. package/lib/module/ui/screens/internal/SignUpSecurityStep.js +120 -0
  159. package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
  160. package/lib/module/ui/screens/internal/SignUpSummaryStep.js +79 -0
  161. package/lib/module/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
  162. package/lib/module/ui/screens/internal/SignUpWelcomeStep.js +54 -0
  163. package/lib/module/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
  164. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +16 -3
  165. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  166. package/lib/module/ui/stores/authStore.js +27 -0
  167. package/lib/module/ui/stores/authStore.js.map +1 -0
  168. package/lib/module/ui/stores/followStore.js +120 -0
  169. package/lib/module/ui/stores/followStore.js.map +1 -0
  170. package/lib/module/ui/styles/index.js +0 -1
  171. package/lib/module/ui/styles/index.js.map +1 -1
  172. package/lib/module/ui/utils/confirmAction.js +25 -0
  173. package/lib/module/ui/utils/confirmAction.js.map +1 -0
  174. package/lib/typescript/core/index.d.ts +28 -10
  175. package/lib/typescript/core/index.d.ts.map +1 -1
  176. package/lib/typescript/index.d.ts +5 -4
  177. package/lib/typescript/index.d.ts.map +1 -1
  178. package/lib/typescript/models/secureSession.d.ts +0 -1
  179. package/lib/typescript/models/secureSession.d.ts.map +1 -1
  180. package/lib/typescript/node/index.d.ts +0 -1
  181. package/lib/typescript/node/index.d.ts.map +1 -1
  182. package/lib/typescript/ui/components/FollowButton.d.ts +1 -77
  183. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
  184. package/lib/typescript/ui/components/OxyPayButton.d.ts +29 -0
  185. package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -0
  186. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  187. package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -1
  188. package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +8 -0
  189. package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -0
  190. package/lib/typescript/ui/components/icon/index.d.ts +1 -0
  191. package/lib/typescript/ui/components/icon/index.d.ts.map +1 -1
  192. package/lib/typescript/ui/components/index.d.ts +1 -0
  193. package/lib/typescript/ui/components/index.d.ts.map +1 -1
  194. package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
  195. package/lib/typescript/ui/components/internal/PinInput.d.ts +12 -0
  196. package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -0
  197. package/lib/typescript/ui/components/internal/TextField.d.ts +1 -0
  198. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
  199. package/lib/typescript/ui/context/OxyContext.d.ts +0 -1
  200. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  201. package/lib/typescript/ui/hooks/index.d.ts +1 -2
  202. package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
  203. package/lib/typescript/ui/hooks/useFollow.d.ts +14 -15
  204. package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
  205. package/lib/typescript/ui/hooks/useSessionSocket.d.ts +11 -0
  206. package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -0
  207. package/lib/typescript/ui/index.d.ts +2 -5
  208. package/lib/typescript/ui/index.d.ts.map +1 -1
  209. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  210. package/lib/typescript/ui/navigation/types.d.ts +5 -23
  211. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  212. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  213. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  214. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  215. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  216. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  217. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
  218. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
  219. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +27 -0
  220. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -0
  221. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  222. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +8 -0
  223. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -0
  224. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  225. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  226. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
  227. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +27 -0
  228. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -0
  229. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +26 -0
  230. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -0
  231. package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts +20 -0
  232. package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -0
  233. package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts +24 -0
  234. package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -0
  235. package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts +15 -0
  236. package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts.map +1 -0
  237. package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts +13 -0
  238. package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts.map +1 -0
  239. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
  240. package/lib/typescript/ui/stores/authStore.d.ts +14 -0
  241. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -0
  242. package/lib/typescript/ui/stores/followStore.d.ts +15 -0
  243. package/lib/typescript/ui/stores/followStore.d.ts.map +1 -0
  244. package/lib/typescript/ui/styles/index.d.ts +0 -1
  245. package/lib/typescript/ui/styles/index.d.ts.map +1 -1
  246. package/lib/typescript/ui/utils/confirmAction.d.ts +7 -0
  247. package/lib/typescript/ui/utils/confirmAction.d.ts.map +1 -0
  248. package/package.json +12 -7
  249. package/src/core/index.ts +78 -88
  250. package/src/index.ts +8 -45
  251. package/src/models/secureSession.ts +1 -2
  252. package/src/node/index.ts +0 -3
  253. package/src/ui/components/FollowButton.tsx +100 -322
  254. package/src/ui/components/OxyPayButton.tsx +133 -0
  255. package/src/ui/components/OxyProvider.tsx +39 -201
  256. package/src/ui/components/OxySignInButton.tsx +13 -2
  257. package/src/ui/components/icon/FAIRWalletIcon.tsx +49 -0
  258. package/src/ui/components/icon/index.ts +1 -0
  259. package/src/ui/components/index.ts +1 -0
  260. package/src/ui/components/internal/GroupedPillButtons.tsx +12 -8
  261. package/src/ui/components/internal/PinInput.tsx +102 -0
  262. package/src/ui/components/internal/TextField.tsx +9 -0
  263. package/src/ui/context/OxyContext.tsx +26 -26
  264. package/src/ui/hooks/index.ts +1 -2
  265. package/src/ui/hooks/useFollow.ts +58 -129
  266. package/src/ui/hooks/useSessionSocket.ts +50 -0
  267. package/src/ui/index.ts +2 -37
  268. package/src/ui/navigation/OxyRouter.tsx +47 -63
  269. package/src/ui/navigation/types.ts +5 -26
  270. package/src/ui/screens/AccountCenterScreen.tsx +12 -21
  271. package/src/ui/screens/AccountOverviewScreen.tsx +6 -30
  272. package/src/ui/screens/AccountSettingsScreen.tsx +7 -22
  273. package/src/ui/screens/AccountSwitcherScreen.tsx +46 -88
  274. package/src/ui/screens/AppInfoScreen.tsx +27 -47
  275. package/src/ui/screens/FeedbackScreen.tsx +34 -19
  276. package/src/ui/screens/FileManagementScreen.tsx +293 -321
  277. package/src/ui/screens/PaymentGatewayScreen.tsx +1315 -0
  278. package/src/ui/screens/PremiumSubscriptionScreen.tsx +109 -124
  279. package/src/ui/screens/RecoverAccountScreen.tsx +260 -0
  280. package/src/ui/screens/SessionManagementScreen.tsx +65 -137
  281. package/src/ui/screens/SignInScreen.tsx +89 -283
  282. package/src/ui/screens/SignUpScreen.tsx +138 -291
  283. package/src/ui/screens/internal/SignInPasswordStep.tsx +179 -0
  284. package/src/ui/screens/internal/SignInUsernameStep.tsx +139 -0
  285. package/src/ui/screens/internal/SignUpIdentityStep.tsx +114 -0
  286. package/src/ui/screens/internal/SignUpSecurityStep.tsx +132 -0
  287. package/src/ui/screens/internal/SignUpSummaryStep.tsx +66 -0
  288. package/src/ui/screens/internal/SignUpWelcomeStep.tsx +52 -0
  289. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +13 -3
  290. package/src/ui/stores/authStore.ts +24 -0
  291. package/src/ui/stores/followStore.ts +80 -0
  292. package/src/ui/styles/index.ts +0 -1
  293. package/src/ui/utils/confirmAction.ts +23 -0
  294. package/lib/commonjs/ui/components/bottomSheet/index.js +0 -37
  295. package/lib/commonjs/ui/components/bottomSheet/index.js.map +0 -1
  296. package/lib/commonjs/ui/hooks/useAuthFetch.js +0 -216
  297. package/lib/commonjs/ui/hooks/useAuthFetch.js.map +0 -1
  298. package/lib/commonjs/ui/hooks/useOxyFollow.js +0 -190
  299. package/lib/commonjs/ui/hooks/useOxyFollow.js.map +0 -1
  300. package/lib/commonjs/ui/screens/BillingManagementScreen.js +0 -636
  301. package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +0 -1
  302. package/lib/commonjs/ui/store/index.js +0 -67
  303. package/lib/commonjs/ui/store/index.js.map +0 -1
  304. package/lib/commonjs/ui/store/setupOxyStore.js +0 -63
  305. package/lib/commonjs/ui/store/setupOxyStore.js.map +0 -1
  306. package/lib/commonjs/ui/store/slices/authSlice.js +0 -56
  307. package/lib/commonjs/ui/store/slices/authSlice.js.map +0 -1
  308. package/lib/commonjs/ui/store/slices/followSlice.js +0 -238
  309. package/lib/commonjs/ui/store/slices/followSlice.js.map +0 -1
  310. package/lib/commonjs/ui/store/slices/index.js +0 -129
  311. package/lib/commonjs/ui/store/slices/index.js.map +0 -1
  312. package/lib/commonjs/ui/store/slices/types.js +0 -19
  313. package/lib/commonjs/ui/store/slices/types.js.map +0 -1
  314. package/lib/commonjs/ui/styles/shadows.js +0 -123
  315. package/lib/commonjs/ui/styles/shadows.js.map +0 -1
  316. package/lib/commonjs/utils/polyfills.js +0 -42
  317. package/lib/commonjs/utils/polyfills.js.map +0 -1
  318. package/lib/module/ui/components/bottomSheet/index.js +0 -5
  319. package/lib/module/ui/components/bottomSheet/index.js.map +0 -1
  320. package/lib/module/ui/hooks/useAuthFetch.js +0 -211
  321. package/lib/module/ui/hooks/useAuthFetch.js.map +0 -1
  322. package/lib/module/ui/hooks/useOxyFollow.js +0 -186
  323. package/lib/module/ui/hooks/useOxyFollow.js.map +0 -1
  324. package/lib/module/ui/screens/BillingManagementScreen.js +0 -631
  325. package/lib/module/ui/screens/BillingManagementScreen.js.map +0 -1
  326. package/lib/module/ui/store/index.js +0 -33
  327. package/lib/module/ui/store/index.js.map +0 -1
  328. package/lib/module/ui/store/setupOxyStore.js +0 -59
  329. package/lib/module/ui/store/setupOxyStore.js.map +0 -1
  330. package/lib/module/ui/store/slices/authSlice.js +0 -48
  331. package/lib/module/ui/store/slices/authSlice.js.map +0 -1
  332. package/lib/module/ui/store/slices/followSlice.js +0 -232
  333. package/lib/module/ui/store/slices/followSlice.js.map +0 -1
  334. package/lib/module/ui/store/slices/index.js +0 -11
  335. package/lib/module/ui/store/slices/index.js.map +0 -1
  336. package/lib/module/ui/store/slices/types.js +0 -15
  337. package/lib/module/ui/store/slices/types.js.map +0 -1
  338. package/lib/module/ui/styles/shadows.js +0 -119
  339. package/lib/module/ui/styles/shadows.js.map +0 -1
  340. package/lib/module/utils/polyfills.js +0 -36
  341. package/lib/module/utils/polyfills.js.map +0 -1
  342. package/lib/typescript/types/react-redux.d.ts +0 -5
  343. package/lib/typescript/ui/components/bottomSheet/index.d.ts +0 -4
  344. package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +0 -1
  345. package/lib/typescript/ui/hooks/useAuthFetch.d.ts +0 -34
  346. package/lib/typescript/ui/hooks/useAuthFetch.d.ts.map +0 -1
  347. package/lib/typescript/ui/hooks/useOxyFollow.d.ts +0 -81
  348. package/lib/typescript/ui/hooks/useOxyFollow.d.ts.map +0 -1
  349. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +0 -5
  350. package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +0 -1
  351. package/lib/typescript/ui/store/index.d.ts +0 -27
  352. package/lib/typescript/ui/store/index.d.ts.map +0 -1
  353. package/lib/typescript/ui/store/setupOxyStore.d.ts +0 -29
  354. package/lib/typescript/ui/store/setupOxyStore.d.ts.map +0 -1
  355. package/lib/typescript/ui/store/slices/authSlice.d.ts +0 -32
  356. package/lib/typescript/ui/store/slices/authSlice.d.ts.map +0 -1
  357. package/lib/typescript/ui/store/slices/followSlice.d.ts +0 -120
  358. package/lib/typescript/ui/store/slices/followSlice.d.ts.map +0 -1
  359. package/lib/typescript/ui/store/slices/index.d.ts +0 -9
  360. package/lib/typescript/ui/store/slices/index.d.ts.map +0 -1
  361. package/lib/typescript/ui/store/slices/types.d.ts +0 -16
  362. package/lib/typescript/ui/store/slices/types.d.ts.map +0 -1
  363. package/lib/typescript/ui/styles/shadows.d.ts +0 -233
  364. package/lib/typescript/ui/styles/shadows.d.ts.map +0 -1
  365. package/lib/typescript/utils/polyfills.d.ts +0 -6
  366. package/lib/typescript/utils/polyfills.d.ts.map +0 -1
  367. package/src/__tests__/backend-middleware.test.ts +0 -209
  368. package/src/__tests__/polyfills.test.ts +0 -30
  369. package/src/__tests__/setup.ts +0 -43
  370. package/src/__tests__/ui/hooks/useAuthFetch.test.ts +0 -70
  371. package/src/__tests__/ui/hooks/useOxyFollow.test.tsx +0 -92
  372. package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +0 -112
  373. package/src/__tests__/ui/store/setupOxyStore.test.ts +0 -50
  374. package/src/__tests__/validate-structure.js +0 -91
  375. package/src/__tests__/validation.js +0 -42
  376. package/src/types/react-redux.d.ts +0 -5
  377. package/src/ui/components/bottomSheet/index.tsx +0 -14
  378. package/src/ui/hooks/useAuthFetch.ts +0 -238
  379. package/src/ui/hooks/useOxyFollow.ts +0 -188
  380. package/src/ui/screens/BillingManagementScreen.tsx +0 -589
  381. package/src/ui/store/index.ts +0 -36
  382. package/src/ui/store/setupOxyStore.ts +0 -58
  383. package/src/ui/store/slices/authSlice.ts +0 -43
  384. package/src/ui/store/slices/followSlice.ts +0 -207
  385. package/src/ui/store/slices/index.ts +0 -31
  386. package/src/ui/store/slices/types.ts +0 -33
  387. package/src/ui/styles/shadows.ts +0 -112
  388. package/src/utils/polyfills.ts +0 -34
@@ -1,589 +0,0 @@
1
- import React, { useState, useEffect } from 'react';
2
- import {
3
- View,
4
- Text,
5
- TouchableOpacity,
6
- StyleSheet,
7
- ScrollView,
8
- ActivityIndicator,
9
- Alert,
10
- Platform,
11
- } from 'react-native';
12
- import { BaseScreenProps } from '../navigation/types';
13
- import { useOxy } from '../context/OxyContext';
14
- import { fontFamilies } from '../styles/fonts';
15
- import { toast } from '../../lib/sonner';
16
- import { Ionicons } from '@expo/vector-icons';
17
-
18
- interface PaymentMethod {
19
- id: string;
20
- type: 'card' | 'paypal' | 'bank';
21
- last4?: string;
22
- brand?: string;
23
- expiryMonth?: number;
24
- expiryYear?: number;
25
- isDefault: boolean;
26
- }
27
-
28
- interface Invoice {
29
- id: string;
30
- date: string;
31
- amount: number;
32
- currency: string;
33
- status: 'paid' | 'pending' | 'failed';
34
- description: string;
35
- downloadUrl?: string;
36
- }
37
-
38
- const BillingManagementScreen: React.FC<BaseScreenProps> = ({
39
- onClose,
40
- theme,
41
- navigate,
42
- goBack,
43
- }) => {
44
- const { user } = useOxy();
45
- const [loading, setLoading] = useState(true);
46
- const [paymentMethods, setPaymentMethods] = useState<PaymentMethod[]>([]);
47
- const [invoices, setInvoices] = useState<Invoice[]>([]);
48
- const [processingPayment, setProcessingPayment] = useState(false);
49
-
50
- const isDarkTheme = theme === 'dark';
51
- const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
52
- const backgroundColor = isDarkTheme ? '#121212' : '#FFFFFF';
53
- const secondaryBackgroundColor = isDarkTheme ? '#222222' : '#F5F5F5';
54
- const borderColor = isDarkTheme ? '#444444' : '#E0E0E0';
55
- const primaryColor = '#007AFF';
56
- const successColor = '#30D158';
57
- const warningColor = '#FF9500';
58
- const dangerColor = '#FF3B30';
59
-
60
- // Mock data
61
- const mockPaymentMethods: PaymentMethod[] = [
62
- {
63
- id: 'pm_1',
64
- type: 'card',
65
- last4: '4242',
66
- brand: 'Visa',
67
- expiryMonth: 12,
68
- expiryYear: 2027,
69
- isDefault: true
70
- },
71
- {
72
- id: 'pm_2',
73
- type: 'paypal',
74
- isDefault: false
75
- }
76
- ];
77
-
78
- const mockInvoices: Invoice[] = [
79
- {
80
- id: 'inv_1',
81
- date: '2024-12-01',
82
- amount: 19.99,
83
- currency: 'USD',
84
- status: 'paid',
85
- description: 'Pro Plan - Monthly'
86
- },
87
- {
88
- id: 'inv_2',
89
- date: '2024-11-01',
90
- amount: 19.99,
91
- currency: 'USD',
92
- status: 'paid',
93
- description: 'Pro Plan - Monthly'
94
- },
95
- {
96
- id: 'inv_3',
97
- date: '2024-10-01',
98
- amount: 19.99,
99
- currency: 'USD',
100
- status: 'paid',
101
- description: 'Pro Plan - Monthly'
102
- }
103
- ];
104
-
105
- useEffect(() => {
106
- loadBillingData();
107
- }, []);
108
-
109
- const loadBillingData = async () => {
110
- try {
111
- setLoading(true);
112
-
113
- // Simulate API calls
114
- await new Promise(resolve => setTimeout(resolve, 1000));
115
-
116
- setPaymentMethods(mockPaymentMethods);
117
- setInvoices(mockInvoices);
118
- } catch (error) {
119
- console.error('Failed to load billing data:', error);
120
- toast.error('Failed to load billing information');
121
- } finally {
122
- setLoading(false);
123
- }
124
- };
125
-
126
- const handleAddPaymentMethod = () => {
127
- Alert.alert(
128
- 'Add Payment Method',
129
- 'This would open a secure payment form to add a new payment method.',
130
- [{ text: 'OK' }]
131
- );
132
- };
133
-
134
- const handleSetDefaultPaymentMethod = async (methodId: string) => {
135
- try {
136
- setPaymentMethods(prev => prev.map(method => ({
137
- ...method,
138
- isDefault: method.id === methodId
139
- })));
140
- toast.success('Default payment method updated');
141
- } catch (error) {
142
- toast.error('Failed to update payment method');
143
- }
144
- };
145
-
146
- const handleRemovePaymentMethod = (methodId: string) => {
147
- Alert.alert(
148
- 'Remove Payment Method',
149
- 'Are you sure you want to remove this payment method?',
150
- [
151
- { text: 'Cancel', style: 'cancel' },
152
- {
153
- text: 'Remove',
154
- style: 'destructive',
155
- onPress: async () => {
156
- try {
157
- setPaymentMethods(prev => prev.filter(method => method.id !== methodId));
158
- toast.success('Payment method removed');
159
- } catch (error) {
160
- toast.error('Failed to remove payment method');
161
- }
162
- }
163
- }
164
- ]
165
- );
166
- };
167
-
168
- const handleDownloadInvoice = (invoice: Invoice) => {
169
- toast.info('Invoice download would start here');
170
- };
171
-
172
- const getPaymentMethodIcon = (method: PaymentMethod) => {
173
- switch (method.type) {
174
- case 'card':
175
- return method.brand?.toLowerCase() === 'visa' ? 'card' : 'card-outline';
176
- case 'paypal':
177
- return 'logo-paypal';
178
- case 'bank':
179
- return 'business';
180
- default:
181
- return 'card';
182
- }
183
- };
184
-
185
- const getPaymentMethodDisplay = (method: PaymentMethod) => {
186
- switch (method.type) {
187
- case 'card':
188
- return `${method.brand} •••• ${method.last4}`;
189
- case 'paypal':
190
- return 'PayPal';
191
- case 'bank':
192
- return 'Bank Transfer';
193
- default:
194
- return 'Unknown';
195
- }
196
- };
197
-
198
- const getStatusColor = (status: string) => {
199
- switch (status) {
200
- case 'paid':
201
- return successColor;
202
- case 'pending':
203
- return warningColor;
204
- case 'failed':
205
- return dangerColor;
206
- default:
207
- return textColor;
208
- }
209
- };
210
-
211
- if (loading) {
212
- return (
213
- <View style={[styles.container, { backgroundColor, justifyContent: 'center' }]}>
214
- <ActivityIndicator size="large" color={primaryColor} />
215
- <Text style={[styles.loadingText, { color: textColor }]}>Loading billing information...</Text>
216
- </View>
217
- );
218
- }
219
-
220
- return (
221
- <View style={[styles.container, { backgroundColor }]}>
222
- {/* Header */}
223
- <View style={[styles.header, { borderBottomColor: borderColor }]}>
224
- <TouchableOpacity style={styles.backButton} onPress={goBack}>
225
- <Ionicons name="arrow-back" size={24} color={textColor} />
226
- </TouchableOpacity>
227
- <Text style={[styles.headerTitle, { color: textColor }]}>Billing Management</Text>
228
- {onClose && (
229
- <TouchableOpacity style={styles.closeButton} onPress={onClose}>
230
- <Ionicons name="close" size={24} color={textColor} />
231
- </TouchableOpacity>
232
- )}
233
- </View>
234
-
235
- <ScrollView style={styles.content} showsVerticalScrollIndicator={false}>
236
- {/* Payment Methods */}
237
- <View style={styles.section}>
238
- <View style={styles.sectionHeader}>
239
- <Text style={[styles.sectionTitle, { color: textColor }]}>Payment Methods</Text>
240
- <TouchableOpacity
241
- style={[styles.addButton, { backgroundColor: primaryColor }]}
242
- onPress={handleAddPaymentMethod}
243
- >
244
- <Ionicons name="add" size={20} color="#FFFFFF" />
245
- <Text style={styles.addButtonText}>Add</Text>
246
- </TouchableOpacity>
247
- </View>
248
-
249
- {paymentMethods.map((method) => (
250
- <View
251
- key={method.id}
252
- style={[styles.paymentMethodCard, { backgroundColor: secondaryBackgroundColor, borderColor }]}
253
- >
254
- <View style={styles.paymentMethodHeader}>
255
- <View style={styles.paymentMethodInfo}>
256
- <Ionicons
257
- name={getPaymentMethodIcon(method)}
258
- size={24}
259
- color={primaryColor}
260
- style={styles.paymentMethodIcon}
261
- />
262
- <View>
263
- <Text style={[styles.paymentMethodName, { color: textColor }]}>
264
- {getPaymentMethodDisplay(method)}
265
- </Text>
266
- {method.type === 'card' && (
267
- <Text style={[styles.paymentMethodExpiry, { color: isDarkTheme ? '#BBBBBB' : '#666666' }]}>
268
- Expires {method.expiryMonth}/{method.expiryYear}
269
- </Text>
270
- )}
271
- {method.isDefault && (
272
- <View style={[styles.defaultBadge, { backgroundColor: successColor }]}>
273
- <Text style={styles.defaultText}>Default</Text>
274
- </View>
275
- )}
276
- </View>
277
- </View>
278
-
279
- <View style={styles.paymentMethodActions}>
280
- {!method.isDefault && (
281
- <TouchableOpacity
282
- style={[styles.actionButton, { borderColor }]}
283
- onPress={() => handleSetDefaultPaymentMethod(method.id)}
284
- >
285
- <Text style={[styles.actionButtonText, { color: textColor }]}>
286
- Set Default
287
- </Text>
288
- </TouchableOpacity>
289
- )}
290
- <TouchableOpacity
291
- style={[styles.actionButton, { borderColor: dangerColor }]}
292
- onPress={() => handleRemovePaymentMethod(method.id)}
293
- >
294
- <Text style={[styles.actionButtonText, { color: dangerColor }]}>
295
- Remove
296
- </Text>
297
- </TouchableOpacity>
298
- </View>
299
- </View>
300
- </View>
301
- ))}
302
- </View>
303
-
304
- {/* Billing History */}
305
- <View style={styles.section}>
306
- <Text style={[styles.sectionTitle, { color: textColor }]}>Billing History</Text>
307
-
308
- {invoices.map((invoice) => (
309
- <View
310
- key={invoice.id}
311
- style={[styles.invoiceCard, { backgroundColor: secondaryBackgroundColor, borderColor }]}
312
- >
313
- <View style={styles.invoiceHeader}>
314
- <View style={styles.invoiceInfo}>
315
- <Text style={[styles.invoiceDescription, { color: textColor }]}>
316
- {invoice.description}
317
- </Text>
318
- <Text style={[styles.invoiceDate, { color: isDarkTheme ? '#BBBBBB' : '#666666' }]}>
319
- {new Date(invoice.date).toLocaleDateString()}
320
- </Text>
321
- </View>
322
-
323
- <View style={styles.invoiceAmount}>
324
- <Text style={[styles.invoicePrice, { color: textColor }]}>
325
- ${invoice.amount.toFixed(2)}
326
- </Text>
327
- <View style={[styles.statusBadge, { backgroundColor: getStatusColor(invoice.status) }]}>
328
- <Text style={styles.statusText}>
329
- {invoice.status.toUpperCase()}
330
- </Text>
331
- </View>
332
- </View>
333
- </View>
334
-
335
- <View style={styles.invoiceActions}>
336
- <TouchableOpacity
337
- style={[styles.downloadButton, { borderColor }]}
338
- onPress={() => handleDownloadInvoice(invoice)}
339
- >
340
- <Ionicons name="download" size={16} color={primaryColor} />
341
- <Text style={[styles.downloadButtonText, { color: primaryColor }]}>
342
- Download
343
- </Text>
344
- </TouchableOpacity>
345
- </View>
346
- </View>
347
- ))}
348
- </View>
349
-
350
- {/* Billing Information */}
351
- <View style={styles.section}>
352
- <Text style={[styles.sectionTitle, { color: textColor }]}>Billing Information</Text>
353
-
354
- <View style={[styles.billingInfoCard, { backgroundColor: secondaryBackgroundColor, borderColor }]}>
355
- <View style={styles.billingInfoItem}>
356
- <Ionicons name="business" size={20} color={primaryColor} />
357
- <View style={styles.billingInfoContent}>
358
- <Text style={[styles.billingInfoLabel, { color: textColor }]}>Billing Address</Text>
359
- <Text style={[styles.billingInfoValue, { color: isDarkTheme ? '#BBBBBB' : '#666666' }]}>
360
- Update your billing address
361
- </Text>
362
- </View>
363
- <TouchableOpacity>
364
- <Ionicons name="chevron-forward" size={20} color={isDarkTheme ? '#666666' : '#999999'} />
365
- </TouchableOpacity>
366
- </View>
367
-
368
- <View style={styles.billingInfoItem}>
369
- <Ionicons name="receipt" size={20} color={primaryColor} />
370
- <View style={styles.billingInfoContent}>
371
- <Text style={[styles.billingInfoLabel, { color: textColor }]}>Tax Information</Text>
372
- <Text style={[styles.billingInfoValue, { color: isDarkTheme ? '#BBBBBB' : '#666666' }]}>
373
- Manage tax settings
374
- </Text>
375
- </View>
376
- <TouchableOpacity>
377
- <Ionicons name="chevron-forward" size={20} color={isDarkTheme ? '#666666' : '#999999'} />
378
- </TouchableOpacity>
379
- </View>
380
- </View>
381
- </View>
382
-
383
- <View style={styles.bottomSpacing} />
384
- </ScrollView>
385
- </View>
386
- );
387
- };
388
-
389
- const styles = StyleSheet.create({
390
- container: {
391
- flex: 1,
392
- },
393
- header: {
394
- flexDirection: 'row',
395
- alignItems: 'center',
396
- justifyContent: 'space-between',
397
- paddingHorizontal: 20,
398
- paddingTop: 20,
399
- paddingBottom: 16,
400
- borderBottomWidth: 1,
401
- },
402
- backButton: {
403
- padding: 8,
404
- },
405
- headerTitle: {
406
- fontSize: 20,
407
- fontWeight: '600',
408
- fontFamily: fontFamilies.phuduSemiBold,
409
- },
410
- closeButton: {
411
- padding: 8,
412
- },
413
- content: {
414
- flex: 1,
415
- },
416
- section: {
417
- padding: 20,
418
- },
419
- sectionHeader: {
420
- flexDirection: 'row',
421
- justifyContent: 'space-between',
422
- alignItems: 'center',
423
- marginBottom: 16,
424
- },
425
- sectionTitle: {
426
- fontSize: 20,
427
- fontWeight: 'bold',
428
- fontFamily: fontFamilies.phuduBold,
429
- },
430
- addButton: {
431
- flexDirection: 'row',
432
- alignItems: 'center',
433
- paddingHorizontal: 12,
434
- paddingVertical: 8,
435
- borderRadius: 8,
436
- },
437
- addButtonText: {
438
- color: '#FFFFFF',
439
- fontSize: 14,
440
- fontWeight: '600',
441
- marginLeft: 4,
442
- },
443
- loadingText: {
444
- fontSize: 16,
445
- textAlign: 'center',
446
- marginTop: 16,
447
- },
448
- paymentMethodCard: {
449
- borderRadius: 12,
450
- padding: 16,
451
- marginBottom: 12,
452
- borderWidth: 1,
453
- },
454
- paymentMethodHeader: {
455
- flexDirection: 'row',
456
- justifyContent: 'space-between',
457
- alignItems: 'flex-start',
458
- },
459
- paymentMethodInfo: {
460
- flexDirection: 'row',
461
- alignItems: 'flex-start',
462
- flex: 1,
463
- },
464
- paymentMethodIcon: {
465
- marginRight: 12,
466
- marginTop: 2,
467
- },
468
- paymentMethodName: {
469
- fontSize: 16,
470
- fontWeight: '600',
471
- marginBottom: 4,
472
- },
473
- paymentMethodExpiry: {
474
- fontSize: 14,
475
- marginBottom: 8,
476
- },
477
- defaultBadge: {
478
- paddingHorizontal: 8,
479
- paddingVertical: 2,
480
- borderRadius: 4,
481
- alignSelf: 'flex-start',
482
- },
483
- defaultText: {
484
- color: '#FFFFFF',
485
- fontSize: 12,
486
- fontWeight: '600',
487
- },
488
- paymentMethodActions: {
489
- flexDirection: 'row',
490
- gap: 8,
491
- },
492
- actionButton: {
493
- paddingHorizontal: 12,
494
- paddingVertical: 6,
495
- borderRadius: 6,
496
- borderWidth: 1,
497
- },
498
- actionButtonText: {
499
- fontSize: 12,
500
- fontWeight: '600',
501
- },
502
- invoiceCard: {
503
- borderRadius: 12,
504
- padding: 16,
505
- marginBottom: 12,
506
- borderWidth: 1,
507
- },
508
- invoiceHeader: {
509
- flexDirection: 'row',
510
- justifyContent: 'space-between',
511
- alignItems: 'flex-start',
512
- marginBottom: 12,
513
- },
514
- invoiceInfo: {
515
- flex: 1,
516
- },
517
- invoiceDescription: {
518
- fontSize: 16,
519
- fontWeight: '600',
520
- marginBottom: 4,
521
- },
522
- invoiceDate: {
523
- fontSize: 14,
524
- },
525
- invoiceAmount: {
526
- alignItems: 'flex-end',
527
- },
528
- invoicePrice: {
529
- fontSize: 16,
530
- fontWeight: '600',
531
- marginBottom: 4,
532
- },
533
- statusBadge: {
534
- paddingHorizontal: 8,
535
- paddingVertical: 2,
536
- borderRadius: 4,
537
- },
538
- statusText: {
539
- color: '#FFFFFF',
540
- fontSize: 12,
541
- fontWeight: '600',
542
- },
543
- invoiceActions: {
544
- flexDirection: 'row',
545
- justifyContent: 'flex-end',
546
- },
547
- downloadButton: {
548
- flexDirection: 'row',
549
- alignItems: 'center',
550
- paddingHorizontal: 12,
551
- paddingVertical: 6,
552
- borderRadius: 6,
553
- borderWidth: 1,
554
- },
555
- downloadButtonText: {
556
- fontSize: 12,
557
- fontWeight: '600',
558
- marginLeft: 4,
559
- },
560
- billingInfoCard: {
561
- borderRadius: 12,
562
- borderWidth: 1,
563
- overflow: 'hidden',
564
- },
565
- billingInfoItem: {
566
- flexDirection: 'row',
567
- alignItems: 'center',
568
- padding: 16,
569
- borderBottomWidth: 1,
570
- borderBottomColor: 'rgba(0, 0, 0, 0.05)',
571
- },
572
- billingInfoContent: {
573
- flex: 1,
574
- marginLeft: 12,
575
- },
576
- billingInfoLabel: {
577
- fontSize: 16,
578
- fontWeight: '600',
579
- marginBottom: 4,
580
- },
581
- billingInfoValue: {
582
- fontSize: 14,
583
- },
584
- bottomSpacing: {
585
- height: 40,
586
- },
587
- });
588
-
589
- export default BillingManagementScreen;
@@ -1,36 +0,0 @@
1
- /**
2
- * OxyHQ Services Redux Store
3
- * Framework-agnostic, tree-shakable Redux integration
4
- *
5
- * This module exports individual slices, reducers, actions, selectors, and helpers
6
- * for easy integration into any Redux store without internal dependencies.
7
- */
8
-
9
- // Export individual slices and their components
10
- export * from './slices';
11
-
12
- // Export setup helper for easy integration
13
- export { setupOxyStore, oxyReducers } from './setupOxyStore';
14
-
15
- // Export types for external store integration
16
- export type { AuthState, FollowState } from './slices/types';
17
-
18
- // For backward compatibility: create a legacy store instance
19
- // This will be deprecated in favor of setupOxyStore()
20
- import { configureStore } from '@reduxjs/toolkit';
21
- import { setupOxyStore } from './setupOxyStore';
22
-
23
- /**
24
- * @deprecated Use setupOxyStore() instead to integrate with your app's store
25
- * This internal store will be removed in a future version
26
- */
27
- export const store = configureStore({
28
- reducer: setupOxyStore(),
29
- });
30
-
31
- export type RootState = ReturnType<typeof store.getState>;
32
- export type AppDispatch = typeof store.dispatch;
33
-
34
- // Legacy selector (deprecated)
35
- export const selectIsUserBeingFetched = (state: RootState, userId: string) =>
36
- state.follow.fetchingUsers[userId] ?? false;
@@ -1,58 +0,0 @@
1
- import { authReducer } from './slices/authSlice';
2
- import { followReducer } from './slices/followSlice';
3
-
4
- /**
5
- * Setup helper for Oxy Store
6
- * Returns all Oxy reducers ready to be spread into a host app's Redux store
7
- *
8
- * Usage:
9
- * ```ts
10
- * const store = configureStore({
11
- * reducer: {
12
- * ...setupOxyStore(),
13
- * appSpecificReducer,
14
- * },
15
- * });
16
- * ```
17
- */
18
- export function setupOxyStore() {
19
- return {
20
- auth: authReducer,
21
- follow: followReducer,
22
- };
23
- }
24
-
25
- /**
26
- * Tree-shakable version where you can pick specific reducers
27
- *
28
- * Usage:
29
- * ```ts
30
- * const store = configureStore({
31
- * reducer: {
32
- * ...setupOxyStore.pick('auth'), // Only include auth
33
- * // or
34
- * ...setupOxyStore.pick('auth', 'follow'), // Include both
35
- * appSpecificReducer,
36
- * },
37
- * });
38
- * ```
39
- */
40
- setupOxyStore.pick = function(...keys: Array<'auth' | 'follow'>) {
41
- const allReducers = setupOxyStore();
42
- const pickedReducers = {} as Partial<ReturnType<typeof setupOxyStore>>;
43
-
44
- for (const key of keys) {
45
- if (key in allReducers) {
46
- // Use bracket notation with explicit typing
47
- (pickedReducers as Record<string, any>)[key] = allReducers[key];
48
- }
49
- }
50
-
51
- return pickedReducers;
52
- };
53
-
54
- // Export individual reducers for maximum flexibility
55
- export const oxyReducers = {
56
- auth: authReducer,
57
- follow: followReducer,
58
- };