@oxyhq/services 5.5.9 → 5.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/lib/commonjs/core/index.js +69 -82
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +24 -183
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/node/index.js +0 -2
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +100 -229
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyPayButton.js +131 -0
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +41 -198
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +15 -2
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js +66 -0
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js.map +1 -0
- package/lib/commonjs/ui/components/icon/index.js +7 -0
- package/lib/commonjs/ui/components/icon/index.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +7 -0
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +14 -7
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +108 -0
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -0
- package/lib/commonjs/ui/components/internal/TextField.js +20 -0
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +116 -84
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +2 -15
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +52 -136
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +52 -0
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -0
- package/lib/commonjs/ui/index.js +8 -191
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +52 -60
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +18 -30
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +4 -22
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +90 -39
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +37 -66
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +21 -44
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +44 -23
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +59 -78
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +1588 -0
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +22 -36
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +269 -0
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +47 -69
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +99 -333
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +136 -340
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +192 -0
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +135 -0
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +108 -0
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +126 -0
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js +84 -0
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js +59 -0
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +15 -2
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +66 -0
- package/lib/commonjs/ui/stores/authStore.js.map +1 -0
- package/lib/commonjs/ui/stores/followStore.js +124 -0
- package/lib/commonjs/ui/stores/followStore.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +0 -11
- package/lib/commonjs/ui/styles/index.js.map +1 -1
- package/lib/commonjs/ui/utils/confirmAction.js +28 -0
- package/lib/commonjs/ui/utils/confirmAction.js.map +1 -0
- package/lib/module/core/index.js +69 -81
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +14 -17
- package/lib/module/index.js.map +1 -1
- package/lib/module/node/index.js +0 -3
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +100 -229
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +125 -0
- package/lib/module/ui/components/OxyPayButton.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +42 -199
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +15 -2
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/icon/FAIRWalletIcon.js +60 -0
- package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +1 -0
- package/lib/module/ui/components/icon/index.js +1 -0
- package/lib/module/ui/components/icon/index.js.map +1 -1
- package/lib/module/ui/components/index.js +1 -0
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +15 -8
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +103 -0
- package/lib/module/ui/components/internal/PinInput.js.map +1 -0
- package/lib/module/ui/components/internal/TextField.js +20 -0
- package/lib/module/ui/components/internal/TextField.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +117 -85
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/index.js +1 -2
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +52 -137
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +47 -0
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -0
- package/lib/module/ui/index.js +2 -13
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +53 -61
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +6 -18
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +5 -23
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +91 -40
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +38 -67
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +22 -45
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +44 -23
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +59 -78
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1583 -0
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +23 -37
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +263 -0
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -0
- package/lib/module/ui/screens/SessionManagementScreen.js +47 -69
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +100 -334
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +137 -341
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +186 -0
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +129 -0
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js +102 -0
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js +120 -0
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js +79 -0
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js +54 -0
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +16 -3
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +62 -0
- package/lib/module/ui/stores/authStore.js.map +1 -0
- package/lib/module/ui/stores/followStore.js +120 -0
- package/lib/module/ui/stores/followStore.js.map +1 -0
- package/lib/module/ui/styles/index.js +0 -1
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/module/ui/utils/confirmAction.js +25 -0
- package/lib/module/ui/utils/confirmAction.js.map +1 -0
- package/lib/typescript/core/index.d.ts +28 -10
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +5 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +6 -0
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/models/secureSession.d.ts +0 -1
- package/lib/typescript/models/secureSession.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +0 -1
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/FollowButton.d.ts +1 -77
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyPayButton.d.ts +29 -0
- package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +8 -0
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +1 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/PinInput.d.ts +12 -0
- package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +0 -2
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +1 -2
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useFollow.d.ts +14 -15
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts +11 -0
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +2 -5
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +5 -23
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +27 -0
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +8 -0
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +27 -0
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +26 -0
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts +20 -0
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts +24 -0
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts +15 -0
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts +13 -0
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +16 -0
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -0
- package/lib/typescript/ui/stores/followStore.d.ts +15 -0
- package/lib/typescript/ui/stores/followStore.d.ts.map +1 -0
- package/lib/typescript/ui/styles/index.d.ts +0 -1
- package/lib/typescript/ui/styles/index.d.ts.map +1 -1
- package/lib/typescript/ui/utils/confirmAction.d.ts +7 -0
- package/lib/typescript/ui/utils/confirmAction.d.ts.map +1 -0
- package/package.json +12 -7
- package/src/core/index.ts +78 -88
- package/src/index.ts +8 -45
- package/src/models/interfaces.ts +7 -1
- package/src/models/secureSession.ts +1 -2
- package/src/node/index.ts +0 -3
- package/src/ui/components/FollowButton.tsx +100 -322
- package/src/ui/components/OxyPayButton.tsx +133 -0
- package/src/ui/components/OxyProvider.tsx +39 -201
- package/src/ui/components/OxySignInButton.tsx +13 -2
- package/src/ui/components/icon/FAIRWalletIcon.tsx +49 -0
- package/src/ui/components/icon/index.ts +1 -0
- package/src/ui/components/index.ts +1 -0
- package/src/ui/components/internal/GroupedPillButtons.tsx +12 -8
- package/src/ui/components/internal/PinInput.tsx +102 -0
- package/src/ui/components/internal/TextField.tsx +9 -0
- package/src/ui/context/OxyContext.tsx +74 -91
- package/src/ui/hooks/index.ts +1 -2
- package/src/ui/hooks/useFollow.ts +58 -129
- package/src/ui/hooks/useSessionSocket.ts +50 -0
- package/src/ui/index.ts +2 -37
- package/src/ui/navigation/OxyRouter.tsx +47 -63
- package/src/ui/navigation/types.ts +5 -26
- package/src/ui/screens/AccountCenterScreen.tsx +12 -21
- package/src/ui/screens/AccountOverviewScreen.tsx +6 -30
- package/src/ui/screens/AccountSettingsScreen.tsx +75 -46
- package/src/ui/screens/AccountSwitcherScreen.tsx +46 -88
- package/src/ui/screens/AppInfoScreen.tsx +27 -47
- package/src/ui/screens/FeedbackScreen.tsx +34 -19
- package/src/ui/screens/FileManagementScreen.tsx +293 -321
- package/src/ui/screens/PaymentGatewayScreen.tsx +1315 -0
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +109 -124
- package/src/ui/screens/RecoverAccountScreen.tsx +260 -0
- package/src/ui/screens/SessionManagementScreen.tsx +65 -137
- package/src/ui/screens/SignInScreen.tsx +89 -283
- package/src/ui/screens/SignUpScreen.tsx +138 -291
- package/src/ui/screens/internal/SignInPasswordStep.tsx +179 -0
- package/src/ui/screens/internal/SignInUsernameStep.tsx +139 -0
- package/src/ui/screens/internal/SignUpIdentityStep.tsx +114 -0
- package/src/ui/screens/internal/SignUpSecurityStep.tsx +132 -0
- package/src/ui/screens/internal/SignUpSummaryStep.tsx +66 -0
- package/src/ui/screens/internal/SignUpWelcomeStep.tsx +52 -0
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +13 -3
- package/src/ui/stores/authStore.ts +45 -0
- package/src/ui/stores/followStore.ts +80 -0
- package/src/ui/styles/index.ts +0 -1
- package/src/ui/utils/confirmAction.ts +23 -0
- package/lib/commonjs/ui/components/bottomSheet/index.js +0 -37
- package/lib/commonjs/ui/components/bottomSheet/index.js.map +0 -1
- package/lib/commonjs/ui/hooks/useAuthFetch.js +0 -217
- package/lib/commonjs/ui/hooks/useAuthFetch.js.map +0 -1
- package/lib/commonjs/ui/hooks/useOxyFollow.js +0 -190
- package/lib/commonjs/ui/hooks/useOxyFollow.js.map +0 -1
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +0 -636
- package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +0 -1
- package/lib/commonjs/ui/store/index.js +0 -67
- package/lib/commonjs/ui/store/index.js.map +0 -1
- package/lib/commonjs/ui/store/setupOxyStore.js +0 -63
- package/lib/commonjs/ui/store/setupOxyStore.js.map +0 -1
- package/lib/commonjs/ui/store/slices/authSlice.js +0 -56
- package/lib/commonjs/ui/store/slices/authSlice.js.map +0 -1
- package/lib/commonjs/ui/store/slices/followSlice.js +0 -238
- package/lib/commonjs/ui/store/slices/followSlice.js.map +0 -1
- package/lib/commonjs/ui/store/slices/index.js +0 -129
- package/lib/commonjs/ui/store/slices/index.js.map +0 -1
- package/lib/commonjs/ui/store/slices/types.js +0 -19
- package/lib/commonjs/ui/store/slices/types.js.map +0 -1
- package/lib/commonjs/ui/styles/shadows.js +0 -123
- package/lib/commonjs/ui/styles/shadows.js.map +0 -1
- package/lib/commonjs/utils/polyfills.js +0 -42
- package/lib/commonjs/utils/polyfills.js.map +0 -1
- package/lib/module/ui/components/bottomSheet/index.js +0 -5
- package/lib/module/ui/components/bottomSheet/index.js.map +0 -1
- package/lib/module/ui/hooks/useAuthFetch.js +0 -212
- package/lib/module/ui/hooks/useAuthFetch.js.map +0 -1
- package/lib/module/ui/hooks/useOxyFollow.js +0 -186
- package/lib/module/ui/hooks/useOxyFollow.js.map +0 -1
- package/lib/module/ui/screens/BillingManagementScreen.js +0 -631
- package/lib/module/ui/screens/BillingManagementScreen.js.map +0 -1
- package/lib/module/ui/store/index.js +0 -33
- package/lib/module/ui/store/index.js.map +0 -1
- package/lib/module/ui/store/setupOxyStore.js +0 -59
- package/lib/module/ui/store/setupOxyStore.js.map +0 -1
- package/lib/module/ui/store/slices/authSlice.js +0 -48
- package/lib/module/ui/store/slices/authSlice.js.map +0 -1
- package/lib/module/ui/store/slices/followSlice.js +0 -232
- package/lib/module/ui/store/slices/followSlice.js.map +0 -1
- package/lib/module/ui/store/slices/index.js +0 -11
- package/lib/module/ui/store/slices/index.js.map +0 -1
- package/lib/module/ui/store/slices/types.js +0 -15
- package/lib/module/ui/store/slices/types.js.map +0 -1
- package/lib/module/ui/styles/shadows.js +0 -119
- package/lib/module/ui/styles/shadows.js.map +0 -1
- package/lib/module/utils/polyfills.js +0 -36
- package/lib/module/utils/polyfills.js.map +0 -1
- package/lib/typescript/types/react-redux.d.ts +0 -5
- package/lib/typescript/ui/components/bottomSheet/index.d.ts +0 -4
- package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useAuthFetch.d.ts +0 -34
- package/lib/typescript/ui/hooks/useAuthFetch.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useOxyFollow.d.ts +0 -81
- package/lib/typescript/ui/hooks/useOxyFollow.d.ts.map +0 -1
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +0 -1
- package/lib/typescript/ui/store/index.d.ts +0 -27
- package/lib/typescript/ui/store/index.d.ts.map +0 -1
- package/lib/typescript/ui/store/setupOxyStore.d.ts +0 -29
- package/lib/typescript/ui/store/setupOxyStore.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/authSlice.d.ts +0 -32
- package/lib/typescript/ui/store/slices/authSlice.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/followSlice.d.ts +0 -120
- package/lib/typescript/ui/store/slices/followSlice.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/index.d.ts +0 -9
- package/lib/typescript/ui/store/slices/index.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/types.d.ts +0 -16
- package/lib/typescript/ui/store/slices/types.d.ts.map +0 -1
- package/lib/typescript/ui/styles/shadows.d.ts +0 -233
- package/lib/typescript/ui/styles/shadows.d.ts.map +0 -1
- package/lib/typescript/utils/polyfills.d.ts +0 -6
- package/lib/typescript/utils/polyfills.d.ts.map +0 -1
- package/src/__tests__/backend-middleware.test.ts +0 -209
- package/src/__tests__/polyfills.test.ts +0 -30
- package/src/__tests__/setup.ts +0 -43
- package/src/__tests__/ui/hooks/authfetch-integration.test.ts +0 -197
- package/src/__tests__/ui/hooks/backward-compatibility.test.ts +0 -159
- package/src/__tests__/ui/hooks/real-world-scenarios.test.ts +0 -224
- package/src/__tests__/ui/hooks/url-resolution.test.ts +0 -129
- package/src/__tests__/ui/hooks/useAuthFetch-separation.test.ts +0 -69
- package/src/__tests__/ui/hooks/useAuthFetch.test.ts +0 -70
- package/src/__tests__/ui/hooks/useOxyFollow.test.tsx +0 -92
- package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +0 -112
- package/src/__tests__/ui/store/setupOxyStore.test.ts +0 -50
- package/src/__tests__/validate-structure.js +0 -91
- package/src/__tests__/validation.js +0 -42
- package/src/types/react-redux.d.ts +0 -5
- package/src/ui/components/bottomSheet/index.tsx +0 -14
- package/src/ui/hooks/useAuthFetch.ts +0 -238
- package/src/ui/hooks/useOxyFollow.ts +0 -188
- package/src/ui/screens/BillingManagementScreen.tsx +0 -589
- package/src/ui/store/index.ts +0 -36
- package/src/ui/store/setupOxyStore.ts +0 -58
- package/src/ui/store/slices/authSlice.ts +0 -43
- package/src/ui/store/slices/followSlice.ts +0 -207
- package/src/ui/store/slices/index.ts +0 -31
- package/src/ui/store/slices/types.ts +0 -33
- package/src/ui/styles/shadows.ts +0 -112
- 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;
|
package/src/ui/store/index.ts
DELETED
|
@@ -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
|
-
};
|