@oxyhq/services 11.0.0 → 11.1.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.
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/AccountMenu.js +9 -5
- package/lib/commonjs/ui/components/AccountMenu.js.map +1 -1
- package/lib/commonjs/ui/components/AnotherDeviceQR.js +51 -56
- package/lib/commonjs/ui/components/AnotherDeviceQR.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +1 -0
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +18 -5
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +23 -7
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/SignInModal.js +20 -1
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +19 -9
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +4 -2
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +153 -19
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +6 -17
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +5 -5
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +38 -38
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +2 -2
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +3 -3
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +16 -12
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +10 -6
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queryClient.js +6 -5
- package/lib/commonjs/ui/hooks/queryClient.js.map +1 -1
- package/lib/commonjs/ui/hooks/useOxyAuthSession.js +40 -2
- package/lib/commonjs/ui/hooks/useOxyAuthSession.js.map +1 -1
- package/lib/commonjs/ui/hooks/useProfileEditing.js +21 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +3 -3
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +100 -108
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +227 -273
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +10 -4
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +20 -37
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js +89 -201
- package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +80 -208
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +56 -208
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +303 -352
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +20 -20
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +77 -89
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +43 -58
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +67 -90
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +77 -177
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +113 -107
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +55 -114
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/NotificationsScreen.js +67 -85
- package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +71 -135
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +15 -9
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PreferencesScreen.js +65 -83
- package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +378 -1023
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +294 -242
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +192 -305
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +57 -97
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +41 -41
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +17 -24
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +83 -214
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +115 -77
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +70 -57
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +136 -332
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +47 -137
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +182 -115
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +138 -214
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +54 -92
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/activeAuthuser.js +15 -9
- package/lib/commonjs/ui/utils/activeAuthuser.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/AccountMenu.js +10 -6
- package/lib/module/ui/components/AccountMenu.js.map +1 -1
- package/lib/module/ui/components/AnotherDeviceQR.js +50 -56
- package/lib/module/ui/components/AnotherDeviceQR.js.map +1 -1
- package/lib/module/ui/components/BottomSheetRouter.js +2 -1
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +18 -5
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +23 -7
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/SignInModal.js +20 -1
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +19 -9
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +4 -2
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +154 -20
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +6 -17
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js +5 -5
- package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +38 -38
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +2 -2
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +3 -3
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/usePaymentQueries.js +16 -12
- package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +9 -6
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/hooks/queryClient.js +6 -5
- package/lib/module/ui/hooks/queryClient.js.map +1 -1
- package/lib/module/ui/hooks/useOxyAuthSession.js +40 -2
- package/lib/module/ui/hooks/useOxyAuthSession.js.map +1 -1
- package/lib/module/ui/hooks/useProfileEditing.js +21 -0
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +4 -3
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +101 -109
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +228 -275
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +10 -4
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +19 -39
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateManagedAccountScreen.js +90 -202
- package/lib/module/ui/screens/CreateManagedAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +77 -205
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +55 -207
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +301 -350
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +20 -20
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +78 -90
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +44 -59
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +68 -91
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +75 -177
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +116 -108
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +52 -112
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/NotificationsScreen.js +68 -86
- package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +69 -134
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +16 -10
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PreferencesScreen.js +66 -84
- package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +366 -1012
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +295 -243
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +189 -302
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +58 -98
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +42 -42
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +18 -25
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +81 -212
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +114 -76
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustAboutScreen.js +69 -57
- package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +135 -332
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustFAQScreen.js +48 -138
- package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +184 -117
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +132 -208
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js +58 -94
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/module/ui/utils/activeAuthuser.js +15 -9
- package/lib/module/ui/utils/activeAuthuser.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +1 -1
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts +2 -0
- package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AnotherDeviceQR.d.ts +12 -2
- package/lib/typescript/commonjs/ui/components/AnotherDeviceQR.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.native.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +34 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +3 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +3 -3
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useOxyAuthSession.d.ts +22 -0
- package/lib/typescript/commonjs/ui/hooks/useOxyAuthSession.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts +3 -0
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts +2 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/CreateManagedAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AccountMenu.d.ts +2 -0
- package/lib/typescript/module/ui/components/AccountMenu.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AnotherDeviceQR.d.ts +12 -2
- package/lib/typescript/module/ui/components/AnotherDeviceQR.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts +3 -2
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts +34 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +3 -0
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +3 -3
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useOxyAuthSession.d.ts +22 -0
- package/lib/typescript/module/ui/hooks/useOxyAuthSession.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts +3 -0
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +2 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/CreateManagedAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +1 -1
- package/lib/typescript/types/expo-haptics.d.ts +42 -0
- package/package.json +8 -3
- package/src/index.ts +1 -0
- package/src/types/expo-haptics.d.ts +42 -0
- package/src/ui/components/AccountMenu.tsx +11 -5
- package/src/ui/components/AnotherDeviceQR.tsx +53 -45
- package/src/ui/components/BottomSheetRouter.tsx +2 -1
- package/src/ui/components/FollowButton.tsx +24 -5
- package/src/ui/components/OxyProvider.tsx +22 -8
- package/src/ui/components/SignInModal.tsx +21 -2
- package/src/ui/components/TouchableRipple/TouchableRipple.native.tsx +1 -1
- package/src/ui/components/fileManagement/FileViewer.tsx +9 -9
- package/src/ui/components/fileManagement/UploadPreview.tsx +2 -2
- package/src/ui/context/OxyContext.tsx +178 -21
- package/src/ui/context/hooks/useAuthOperations.ts +6 -17
- package/src/ui/hooks/mutations/mutationFactory.ts +5 -5
- package/src/ui/hooks/mutations/useAccountMutations.ts +38 -38
- package/src/ui/hooks/mutations/useServicesMutations.ts +2 -2
- package/src/ui/hooks/queries/queryKeys.ts +6 -3
- package/src/ui/hooks/queries/useAccountQueries.ts +1 -1
- package/src/ui/hooks/queries/usePaymentQueries.ts +12 -12
- package/src/ui/hooks/queries/useServicesQueries.ts +9 -6
- package/src/ui/hooks/queryClient.ts +5 -5
- package/src/ui/hooks/useOxyAuthSession.ts +76 -2
- package/src/ui/hooks/useProfileEditing.ts +24 -0
- package/src/ui/hooks/useSessionManagement.ts +9 -6
- package/src/ui/screens/AccountVerificationScreen.tsx +101 -113
- package/src/ui/screens/AppInfoScreen.tsx +200 -238
- package/src/ui/screens/AvatarCropScreen.tsx +17 -4
- package/src/ui/screens/ConnectedAppsScreen.tsx +16 -34
- package/src/ui/screens/CreateManagedAccountScreen.tsx +94 -170
- package/src/ui/screens/EditProfileFieldScreen.tsx +77 -190
- package/src/ui/screens/FAQScreen.tsx +77 -208
- package/src/ui/screens/FeedbackScreen.tsx +330 -239
- package/src/ui/screens/FileManagementScreen.tsx +20 -20
- package/src/ui/screens/HelpSupportScreen.tsx +67 -82
- package/src/ui/screens/HistoryViewScreen.tsx +32 -38
- package/src/ui/screens/LanguageSelectorScreen.tsx +79 -93
- package/src/ui/screens/LearnMoreUsernamesScreen.tsx +81 -164
- package/src/ui/screens/LegalDocumentsScreen.tsx +184 -123
- package/src/ui/screens/ManageAccountScreen.tsx +48 -114
- package/src/ui/screens/NotificationsScreen.tsx +107 -106
- package/src/ui/screens/OxyAuthScreen.tsx +76 -109
- package/src/ui/screens/PaymentGatewayScreen.tsx +16 -7
- package/src/ui/screens/PreferencesScreen.tsx +96 -116
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +419 -872
- package/src/ui/screens/PrivacySettingsScreen.tsx +203 -185
- package/src/ui/screens/ProfileScreen.tsx +158 -200
- package/src/ui/screens/SavesCollectionsScreen.tsx +78 -125
- package/src/ui/screens/SearchSettingsScreen.tsx +52 -41
- package/src/ui/screens/UserLinksScreen.tsx +18 -25
- package/src/ui/screens/UserListScreen.tsx +95 -188
- package/src/ui/screens/WelcomeNewUserScreen.tsx +109 -36
- package/src/ui/screens/trust/TrustAboutScreen.tsx +52 -41
- package/src/ui/screens/trust/TrustCenterScreen.tsx +184 -222
- package/src/ui/screens/trust/TrustFAQScreen.tsx +64 -124
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +190 -67
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +147 -182
- package/src/ui/screens/trust/TrustRulesScreen.tsx +77 -50
- package/src/ui/utils/activeAuthuser.ts +15 -9
- package/src/ui/utils/avatarUtils.ts +1 -1
- package/lib/commonjs/ui/components/feedback/FormInput.js +0 -72
- package/lib/commonjs/ui/components/feedback/FormInput.js.map +0 -1
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js +0 -261
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +0 -1
- package/lib/module/ui/components/feedback/FormInput.js +0 -67
- package/lib/module/ui/components/feedback/FormInput.js.map +0 -1
- package/lib/module/ui/components/feedback/feedbackStyles.js +0 -256
- package/lib/module/ui/components/feedback/feedbackStyles.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/feedback/FormInput.d.ts +0 -20
- package/lib/typescript/commonjs/ui/components/feedback/FormInput.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts +0 -279
- package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/feedback/FormInput.d.ts +0 -20
- package/lib/typescript/module/ui/components/feedback/FormInput.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts +0 -279
- package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts.map +0 -1
- package/src/ui/components/feedback/FormInput.tsx +0 -84
- package/src/ui/components/feedback/feedbackStyles.ts +0 -246
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useState, useEffect, useCallback, useMemo } from 'react';
|
|
4
|
-
import { View,
|
|
4
|
+
import { View, ScrollView, ActivityIndicator } from 'react-native';
|
|
5
5
|
import { Dialog, toast, useDialogControl } from '@oxyhq/bloom';
|
|
6
|
+
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
8
|
+
import { Chip } from '@oxyhq/bloom/chip';
|
|
9
|
+
import { H2, H4, H5, Text } from '@oxyhq/bloom/typography';
|
|
10
|
+
import { BenefitList, BenefitRow } from '@oxyhq/bloom/benefit-list';
|
|
11
|
+
import { SegmentedControl, SegmentedControlItem, SegmentedControlItemText } from '@oxyhq/bloom/segmented-control';
|
|
6
12
|
import { Ionicons } from '@expo/vector-icons';
|
|
13
|
+
import Header from "../components/Header.js";
|
|
7
14
|
import { useI18n } from "../hooks/useI18n.js";
|
|
8
|
-
import { useTheme } from '@oxyhq/bloom/theme';
|
|
9
15
|
import { useOxy } from "../context/OxyContext.js";
|
|
10
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
const TAB_PLANS = 'plans';
|
|
18
|
+
const TAB_FEATURES = 'features';
|
|
19
|
+
const BILLING_MONTH = 'month';
|
|
20
|
+
const BILLING_YEAR = 'year';
|
|
21
|
+
/** Yearly billing discount applied when extrapolating a monthly price. */
|
|
22
|
+
const YEARLY_DISCOUNT = 0.8;
|
|
23
|
+
const MONTHS_PER_YEAR = 12;
|
|
24
|
+
/** Simulated payment latency for the mocked subscribe/feature flows (ms). */
|
|
25
|
+
const SUBSCRIBE_DELAY_MS = 2000;
|
|
26
|
+
const FEATURE_DELAY_MS = 1500;
|
|
27
|
+
/** One subscription period for the mocked renewal date (30 days, in ms). */
|
|
28
|
+
const PERIOD_MS = 30 * 24 * 60 * 60 * 1000;
|
|
29
|
+
const FEATURE_CATEGORIES = ['analytics', 'customization', 'content', 'networking', 'productivity'];
|
|
11
30
|
const PremiumSubscriptionScreen = ({
|
|
12
31
|
onClose,
|
|
13
|
-
theme,
|
|
14
32
|
navigate,
|
|
15
33
|
goBack
|
|
16
34
|
}) => {
|
|
17
35
|
// Use useOxy() hook for OxyContext values
|
|
18
36
|
const {
|
|
19
|
-
user
|
|
20
|
-
oxyServices
|
|
37
|
+
user
|
|
21
38
|
} = useOxy();
|
|
22
39
|
const [loading, setLoading] = useState(true);
|
|
23
40
|
const [subscription, setSubscription] = useState(null);
|
|
@@ -25,30 +42,20 @@ const PremiumSubscriptionScreen = ({
|
|
|
25
42
|
const [individualFeatures, setIndividualFeatures] = useState([]);
|
|
26
43
|
const [selectedPlan, setSelectedPlan] = useState(null);
|
|
27
44
|
const [processingPayment, setProcessingPayment] = useState(false);
|
|
28
|
-
const [billingInterval, setBillingInterval] = useState(
|
|
29
|
-
const [activeTab, setActiveTab] = useState(
|
|
45
|
+
const [billingInterval, setBillingInterval] = useState(BILLING_MONTH);
|
|
46
|
+
const [activeTab, setActiveTab] = useState(TAB_PLANS);
|
|
30
47
|
const [currentAppPackage, setCurrentAppPackage] = useState('mention'); // Default to mention for demo
|
|
31
48
|
const [pendingUnsubscribeFeatureId, setPendingUnsubscribeFeatureId] = useState(null);
|
|
32
49
|
const {
|
|
33
50
|
t
|
|
34
51
|
} = useI18n();
|
|
35
52
|
const bloomTheme = useTheme();
|
|
53
|
+
const colors = bloomTheme.colors;
|
|
36
54
|
|
|
37
55
|
// Prompt controls
|
|
38
56
|
const cancelSubscriptionDialog = useDialogControl();
|
|
39
57
|
const unsubscribeFeatureDialog = useDialogControl();
|
|
40
58
|
|
|
41
|
-
// Extract commonly used colors for readability
|
|
42
|
-
const textColor = bloomTheme.colors.text;
|
|
43
|
-
const backgroundColor = bloomTheme.colors.background;
|
|
44
|
-
const secondaryBackgroundColor = bloomTheme.colors.backgroundSecondary;
|
|
45
|
-
const borderColor = bloomTheme.colors.border;
|
|
46
|
-
const primaryColor = bloomTheme.colors.primary;
|
|
47
|
-
const successColor = bloomTheme.colors.success;
|
|
48
|
-
const dangerColor = bloomTheme.colors.error;
|
|
49
|
-
const isDarkTheme = bloomTheme.isDark;
|
|
50
|
-
const warningColor = bloomTheme.colors.warning;
|
|
51
|
-
|
|
52
59
|
// Oxy+ subscription plans
|
|
53
60
|
const mockPlans = [{
|
|
54
61
|
id: 'mention-plus',
|
|
@@ -233,7 +240,7 @@ const PremiumSubscriptionScreen = ({
|
|
|
233
240
|
planId: 'oxy-insider',
|
|
234
241
|
status: 'active',
|
|
235
242
|
currentPeriodStart: new Date().toISOString(),
|
|
236
|
-
currentPeriodEnd: new Date(Date.now() +
|
|
243
|
+
currentPeriodEnd: new Date(Date.now() + PERIOD_MS).toISOString(),
|
|
237
244
|
cancelAtPeriodEnd: false
|
|
238
245
|
};
|
|
239
246
|
setSubscription(currentSubscription);
|
|
@@ -257,13 +264,10 @@ const PremiumSubscriptionScreen = ({
|
|
|
257
264
|
setLoading(false);
|
|
258
265
|
}
|
|
259
266
|
};
|
|
260
|
-
const handlePlanSelection = planId => {
|
|
261
|
-
setSelectedPlan(planId);
|
|
262
|
-
};
|
|
263
267
|
const handleSubscribe = async planId => {
|
|
264
268
|
try {
|
|
265
|
-
const
|
|
266
|
-
if (!
|
|
269
|
+
const planToSubscribe = mockPlans.find(plan => plan.id === planId);
|
|
270
|
+
if (!planToSubscribe?.applicableApps.includes(currentAppPackage)) {
|
|
267
271
|
toast.error(t('premium.toasts.planUnavailable', {
|
|
268
272
|
app: currentAppPackage
|
|
269
273
|
}) || `This plan is not available for the current app (${currentAppPackage})`);
|
|
@@ -273,15 +277,16 @@ const PremiumSubscriptionScreen = ({
|
|
|
273
277
|
toast.error(t('premium.toasts.mentionOnly') || 'Mention+ is only available in the Mention app');
|
|
274
278
|
return;
|
|
275
279
|
}
|
|
280
|
+
setSelectedPlan(planId);
|
|
276
281
|
setProcessingPayment(true);
|
|
277
|
-
await new Promise(resolve => setTimeout(resolve,
|
|
282
|
+
await new Promise(resolve => setTimeout(resolve, SUBSCRIBE_DELAY_MS));
|
|
278
283
|
toast.success(t('premium.toasts.activated') || 'Subscription activated successfully!');
|
|
279
284
|
setSubscription({
|
|
280
285
|
id: `sub_${Date.now()}`,
|
|
281
286
|
planId,
|
|
282
287
|
status: 'active',
|
|
283
288
|
currentPeriodStart: new Date().toISOString(),
|
|
284
|
-
currentPeriodEnd: new Date(Date.now() +
|
|
289
|
+
currentPeriodEnd: new Date(Date.now() + PERIOD_MS).toISOString(),
|
|
285
290
|
cancelAtPeriodEnd: false
|
|
286
291
|
});
|
|
287
292
|
loadSubscriptionData();
|
|
@@ -308,7 +313,7 @@ const PremiumSubscriptionScreen = ({
|
|
|
308
313
|
toast.error(t('premium.toasts.cancelFailed') || 'Failed to cancel subscription');
|
|
309
314
|
}
|
|
310
315
|
}, [t]);
|
|
311
|
-
const handleReactivateSubscription = async () => {
|
|
316
|
+
const handleReactivateSubscription = useCallback(async () => {
|
|
312
317
|
try {
|
|
313
318
|
setSubscription(prev => prev ? {
|
|
314
319
|
...prev,
|
|
@@ -318,9 +323,9 @@ const PremiumSubscriptionScreen = ({
|
|
|
318
323
|
} catch (error) {
|
|
319
324
|
toast.error(t('premium.toasts.reactivateFailed') || 'Failed to reactivate subscription');
|
|
320
325
|
}
|
|
321
|
-
};
|
|
322
|
-
const formatPrice = (price,
|
|
323
|
-
const yearlyPrice = interval === 'year' ? price : price *
|
|
326
|
+
}, [t]);
|
|
327
|
+
const formatPrice = (price, interval) => {
|
|
328
|
+
const yearlyPrice = interval === 'year' ? price : price * MONTHS_PER_YEAR * YEARLY_DISCOUNT;
|
|
324
329
|
const displayPrice = billingInterval === 'year' ? yearlyPrice : price;
|
|
325
330
|
return {
|
|
326
331
|
price: displayPrice,
|
|
@@ -334,21 +339,21 @@ const PremiumSubscriptionScreen = ({
|
|
|
334
339
|
};
|
|
335
340
|
const handleFeatureSubscribe = async featureId => {
|
|
336
341
|
try {
|
|
337
|
-
const
|
|
338
|
-
if (!
|
|
342
|
+
const featureToSubscribe = mockIndividualFeatures.find(feature => feature.id === featureId);
|
|
343
|
+
if (!featureToSubscribe?.applicableApps.includes(currentAppPackage)) {
|
|
339
344
|
toast.error(`This feature is not available for the current app (${currentAppPackage})`);
|
|
340
345
|
return;
|
|
341
346
|
}
|
|
342
|
-
if (
|
|
343
|
-
const hasExactMatch =
|
|
344
|
-
if (!hasExactMatch &&
|
|
345
|
-
const requiredApp =
|
|
346
|
-
toast.error(`${
|
|
347
|
+
if (featureToSubscribe.appScope === 'specific') {
|
|
348
|
+
const hasExactMatch = featureToSubscribe.applicableApps.length === 1 && featureToSubscribe.applicableApps[0] === currentAppPackage;
|
|
349
|
+
if (!hasExactMatch && featureToSubscribe.applicableApps.length === 1) {
|
|
350
|
+
const requiredApp = featureToSubscribe.applicableApps[0];
|
|
351
|
+
toast.error(`${featureToSubscribe.name} is only available in the ${requiredApp} app`);
|
|
347
352
|
return;
|
|
348
353
|
}
|
|
349
354
|
}
|
|
350
355
|
setProcessingPayment(true);
|
|
351
|
-
await new Promise(resolve => setTimeout(resolve,
|
|
356
|
+
await new Promise(resolve => setTimeout(resolve, FEATURE_DELAY_MS));
|
|
352
357
|
setIndividualFeatures(prev => prev.map(feature => feature.id === featureId ? {
|
|
353
358
|
...feature,
|
|
354
359
|
isSubscribed: true
|
|
@@ -388,188 +393,114 @@ const PremiumSubscriptionScreen = ({
|
|
|
388
393
|
}
|
|
389
394
|
}, [pendingUnsubscribeFeatureId, individualFeatures, t]);
|
|
390
395
|
const pendingUnsubscribeFeature = useMemo(() => individualFeatures.find(f => f.id === pendingUnsubscribeFeatureId), [individualFeatures, pendingUnsubscribeFeatureId]);
|
|
391
|
-
const
|
|
392
|
-
const
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
'oxy-studio': 'Oxy Studio'
|
|
400
|
-
};
|
|
401
|
-
return appNames[packageName] || packageName;
|
|
396
|
+
const getAppDisplayName = packageName => {
|
|
397
|
+
const appNames = {
|
|
398
|
+
'mention': 'Mention',
|
|
399
|
+
'oxy-social': 'Oxy Social',
|
|
400
|
+
'oxy-workspace': 'Oxy Workspace',
|
|
401
|
+
'oxy-creator': 'Oxy Creator',
|
|
402
|
+
'oxy-analytics': 'Oxy Analytics',
|
|
403
|
+
'oxy-studio': 'Oxy Studio'
|
|
402
404
|
};
|
|
403
|
-
return
|
|
404
|
-
style: [styles.header, {
|
|
405
|
-
borderBottomColor: borderColor
|
|
406
|
-
}],
|
|
407
|
-
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
408
|
-
style: styles.backButton,
|
|
409
|
-
onPress: goBack,
|
|
410
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
411
|
-
name: "arrow-back",
|
|
412
|
-
size: 24,
|
|
413
|
-
color: textColor
|
|
414
|
-
})
|
|
415
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
416
|
-
style: styles.headerTitleContainer,
|
|
417
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
418
|
-
style: [styles.headerTitle, {
|
|
419
|
-
color: textColor
|
|
420
|
-
}],
|
|
421
|
-
children: t('premium.title') || 'Oxy+ Subscriptions'
|
|
422
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
423
|
-
style: [styles.currentAppText, {
|
|
424
|
-
color: bloomTheme.colors.textSecondary
|
|
425
|
-
}],
|
|
426
|
-
children: t('premium.forApp', {
|
|
427
|
-
app: getAppDisplayName(currentAppPackage)
|
|
428
|
-
}) || `for ${getAppDisplayName(currentAppPackage)}`
|
|
429
|
-
})]
|
|
430
|
-
}), onClose && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
431
|
-
style: styles.closeButton,
|
|
432
|
-
onPress: onClose,
|
|
433
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
434
|
-
name: "close",
|
|
435
|
-
size: 24,
|
|
436
|
-
color: textColor
|
|
437
|
-
})
|
|
438
|
-
})]
|
|
439
|
-
});
|
|
405
|
+
return appNames[packageName] || packageName;
|
|
440
406
|
};
|
|
441
407
|
const renderCurrentSubscription = () => {
|
|
442
408
|
if (!subscription) return null;
|
|
443
409
|
const currentPlan = getCurrentPlan();
|
|
444
410
|
if (!currentPlan) return null;
|
|
445
|
-
const
|
|
411
|
+
const statusChipColor = subscription.status === 'active' ? 'success' : subscription.status === 'trialing' ? 'warning' : 'error';
|
|
446
412
|
return /*#__PURE__*/_jsxs(View, {
|
|
447
|
-
|
|
448
|
-
children: [/*#__PURE__*/_jsx(
|
|
449
|
-
|
|
450
|
-
color: textColor
|
|
451
|
-
}],
|
|
413
|
+
className: "mb-space-24",
|
|
414
|
+
children: [/*#__PURE__*/_jsx(H5, {
|
|
415
|
+
className: "text-text mb-space-12",
|
|
452
416
|
children: t('premium.current.title') || 'Current Subscription'
|
|
453
417
|
}), /*#__PURE__*/_jsxs(View, {
|
|
454
|
-
|
|
455
|
-
backgroundColor: secondaryBackgroundColor,
|
|
456
|
-
borderColor
|
|
457
|
-
}],
|
|
418
|
+
className: "bg-fill border border-border-image rounded-radius-20 p-space-20 shadow-s",
|
|
458
419
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
459
|
-
|
|
420
|
+
className: "flex-row justify-between items-start mb-space-12",
|
|
460
421
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
422
|
+
className: "flex-1 pr-space-12",
|
|
423
|
+
children: [/*#__PURE__*/_jsx(H4, {
|
|
424
|
+
className: "text-text",
|
|
425
|
+
numberOfLines: 1,
|
|
465
426
|
children: currentPlan.name
|
|
466
|
-
}), /*#__PURE__*/
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
}],
|
|
470
|
-
children: ["$", currentPlan.price, "/month"]
|
|
427
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
428
|
+
className: "text-text-secondary text-sm mt-space-2",
|
|
429
|
+
children: `$${currentPlan.price}/month`
|
|
471
430
|
})]
|
|
472
|
-
}), /*#__PURE__*/_jsx(
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
children:
|
|
477
|
-
style: styles.statusText,
|
|
478
|
-
children: subscription.status.toUpperCase()
|
|
479
|
-
})
|
|
431
|
+
}), /*#__PURE__*/_jsx(Chip, {
|
|
432
|
+
variant: "soft",
|
|
433
|
+
color: statusChipColor,
|
|
434
|
+
size: "small",
|
|
435
|
+
children: subscription.status.toUpperCase()
|
|
480
436
|
})]
|
|
481
437
|
}), /*#__PURE__*/_jsx(Text, {
|
|
482
|
-
|
|
483
|
-
color: bloomTheme.colors.textSecondary
|
|
484
|
-
}],
|
|
438
|
+
className: "text-text-secondary text-sm mb-space-16",
|
|
485
439
|
children: t('premium.current.renewsOn', {
|
|
486
440
|
date: new Date(subscription.currentPeriodEnd).toLocaleDateString()
|
|
487
441
|
}) || `Renews on ${new Date(subscription.currentPeriodEnd).toLocaleDateString()}`
|
|
488
442
|
}), subscription.cancelAtPeriodEnd && /*#__PURE__*/_jsxs(View, {
|
|
489
|
-
|
|
443
|
+
className: "flex-row items-center bg-fill-secondary rounded-radius-12 p-space-12 mb-space-16",
|
|
490
444
|
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
491
445
|
name: "warning",
|
|
492
446
|
size: 16,
|
|
493
|
-
color:
|
|
447
|
+
color: colors.warning
|
|
494
448
|
}), /*#__PURE__*/_jsx(Text, {
|
|
495
|
-
|
|
496
|
-
color: warningColor
|
|
497
|
-
}],
|
|
449
|
+
className: "text-text-secondary text-sm ml-space-8 flex-1",
|
|
498
450
|
children: t('premium.current.willCancelOn', {
|
|
499
451
|
date: new Date(subscription.currentPeriodEnd).toLocaleDateString()
|
|
500
452
|
}) || `Subscription will cancel on ${new Date(subscription.currentPeriodEnd).toLocaleDateString()}`
|
|
501
453
|
})]
|
|
502
454
|
}), /*#__PURE__*/_jsxs(View, {
|
|
503
|
-
|
|
504
|
-
children: [subscription.cancelAtPeriodEnd ? /*#__PURE__*/_jsx(
|
|
505
|
-
|
|
506
|
-
backgroundColor: successColor
|
|
507
|
-
}],
|
|
455
|
+
className: "flex-row gap-space-12",
|
|
456
|
+
children: [subscription.cancelAtPeriodEnd ? /*#__PURE__*/_jsx(Button, {
|
|
457
|
+
variant: "primary",
|
|
508
458
|
onPress: handleReactivateSubscription,
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
style: [styles.actionButton, {
|
|
515
|
-
backgroundColor: dangerColor
|
|
516
|
-
}],
|
|
459
|
+
className: "flex-1",
|
|
460
|
+
accessibilityLabel: t('premium.actions.reactivate') || 'Reactivate',
|
|
461
|
+
children: t('premium.actions.reactivate') || 'Reactivate'
|
|
462
|
+
}) : /*#__PURE__*/_jsx(Button, {
|
|
463
|
+
variant: "destructive",
|
|
517
464
|
onPress: confirmCancelSubscription,
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
children:
|
|
527
|
-
style: [styles.actionButtonText, {
|
|
528
|
-
color: textColor
|
|
529
|
-
}],
|
|
530
|
-
children: t('premium.actions.manageBilling') || 'Manage Billing'
|
|
531
|
-
})
|
|
465
|
+
className: "flex-1",
|
|
466
|
+
accessibilityLabel: t('premium.actions.cancelSubBtn') || 'Cancel Subscription',
|
|
467
|
+
children: t('premium.actions.cancelSubBtn') || 'Cancel Subscription'
|
|
468
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
469
|
+
variant: "outline",
|
|
470
|
+
onPress: () => navigate?.('PaymentGateway'),
|
|
471
|
+
className: "flex-1",
|
|
472
|
+
accessibilityLabel: t('premium.actions.manageBilling') || 'Manage Billing',
|
|
473
|
+
children: t('premium.actions.manageBilling') || 'Manage Billing'
|
|
532
474
|
})]
|
|
533
475
|
})]
|
|
534
476
|
})]
|
|
535
477
|
});
|
|
536
478
|
};
|
|
537
479
|
const renderBillingToggle = () => /*#__PURE__*/_jsxs(View, {
|
|
538
|
-
|
|
539
|
-
children: [/*#__PURE__*/_jsxs(
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
children: /*#__PURE__*/_jsx(
|
|
547
|
-
style: [styles.billingOptionText, {
|
|
548
|
-
color: billingInterval === 'month' ? bloomTheme.colors.negativeForeground : textColor
|
|
549
|
-
}],
|
|
480
|
+
className: "mb-space-24",
|
|
481
|
+
children: [/*#__PURE__*/_jsxs(SegmentedControl, {
|
|
482
|
+
label: t('premium.billing.label') || 'Billing period',
|
|
483
|
+
type: "tabs",
|
|
484
|
+
value: billingInterval,
|
|
485
|
+
onChange: setBillingInterval,
|
|
486
|
+
children: [/*#__PURE__*/_jsx(SegmentedControlItem, {
|
|
487
|
+
value: BILLING_MONTH,
|
|
488
|
+
children: /*#__PURE__*/_jsx(SegmentedControlItemText, {
|
|
550
489
|
children: t('premium.billing.monthly') || 'Monthly'
|
|
551
490
|
})
|
|
552
|
-
}), /*#__PURE__*/_jsx(
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
}],
|
|
556
|
-
onPress: () => setBillingInterval('year'),
|
|
557
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
558
|
-
style: [styles.billingOptionText, {
|
|
559
|
-
color: billingInterval === 'year' ? bloomTheme.colors.negativeForeground : textColor
|
|
560
|
-
}],
|
|
491
|
+
}), /*#__PURE__*/_jsx(SegmentedControlItem, {
|
|
492
|
+
value: BILLING_YEAR,
|
|
493
|
+
children: /*#__PURE__*/_jsx(SegmentedControlItemText, {
|
|
561
494
|
children: t('premium.billing.yearly') || 'Yearly'
|
|
562
495
|
})
|
|
563
496
|
})]
|
|
564
497
|
}), billingInterval === 'year' && /*#__PURE__*/_jsx(Text, {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
}],
|
|
568
|
-
children: t('premium.billing.saveYearly') || '💰 Save 20% with yearly billing'
|
|
498
|
+
className: "text-text-secondary text-sm text-center mt-space-12 font-medium",
|
|
499
|
+
children: t('premium.billing.saveYearly') || 'Save 20% with yearly billing'
|
|
569
500
|
})]
|
|
570
501
|
});
|
|
571
502
|
const renderPlanCard = plan => {
|
|
572
|
-
const pricing = formatPrice(plan.price, plan.
|
|
503
|
+
const pricing = formatPrice(plan.price, plan.interval);
|
|
573
504
|
const isSelected = selectedPlan === plan.id;
|
|
574
505
|
const isCurrentPlan = subscription?.planId === plan.id;
|
|
575
506
|
const isAppSpecific = plan.appScope === 'specific' && plan.applicableApps.length === 1;
|
|
@@ -605,174 +536,134 @@ const PremiumSubscriptionScreen = ({
|
|
|
605
536
|
};
|
|
606
537
|
const availability = getAvailabilityStatus();
|
|
607
538
|
return /*#__PURE__*/_jsxs(View, {
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
borderColor
|
|
611
|
-
}, isSelected && {
|
|
612
|
-
borderColor: primaryColor,
|
|
539
|
+
className: `bg-fill border border-border-image rounded-radius-20 p-space-20 mb-space-16 shadow-s ${!availability.available ? 'opacity-60' : ''}`,
|
|
540
|
+
style: isSelected || plan.isPopular ? {
|
|
541
|
+
borderColor: colors.primary,
|
|
613
542
|
borderWidth: 2
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
style: [styles.appSpecificBadge, {
|
|
627
|
-
backgroundColor: isAvailableForCurrentApp ? successColor : warningColor
|
|
628
|
-
}],
|
|
629
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
630
|
-
style: styles.appSpecificText,
|
|
543
|
+
} : undefined,
|
|
544
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
545
|
+
className: "flex-row flex-wrap gap-space-8 mb-space-12",
|
|
546
|
+
children: [plan.isPopular && /*#__PURE__*/_jsx(Chip, {
|
|
547
|
+
variant: "solid",
|
|
548
|
+
color: "primary",
|
|
549
|
+
size: "small",
|
|
550
|
+
children: t('premium.plan.badge.mostPopular') || 'Most Popular'
|
|
551
|
+
}), isAppSpecific && /*#__PURE__*/_jsx(Chip, {
|
|
552
|
+
variant: "soft",
|
|
553
|
+
color: isAvailableForCurrentApp ? 'success' : 'warning',
|
|
554
|
+
size: "small",
|
|
631
555
|
children: isAvailableForCurrentApp ? t('premium.plan.badge.appExclusive') || 'App Exclusive' : t('premium.plan.badge.notAvailable') || 'Not Available'
|
|
632
|
-
})
|
|
556
|
+
})]
|
|
633
557
|
}), /*#__PURE__*/_jsxs(View, {
|
|
634
|
-
|
|
635
|
-
children: [/*#__PURE__*/_jsx(
|
|
636
|
-
|
|
637
|
-
color: textColor
|
|
638
|
-
}],
|
|
558
|
+
className: "mb-space-16",
|
|
559
|
+
children: [/*#__PURE__*/_jsx(H4, {
|
|
560
|
+
className: "text-text mb-space-4",
|
|
639
561
|
children: plan.name
|
|
640
562
|
}), /*#__PURE__*/_jsx(Text, {
|
|
641
|
-
|
|
642
|
-
color: bloomTheme.colors.textSecondary
|
|
643
|
-
}],
|
|
563
|
+
className: "text-text-secondary text-sm",
|
|
644
564
|
children: plan.description
|
|
645
565
|
}), /*#__PURE__*/_jsx(Text, {
|
|
646
|
-
|
|
647
|
-
color: bloomTheme.colors.textTertiary
|
|
648
|
-
}],
|
|
566
|
+
className: "text-text-tertiary text-xs mt-space-4 italic",
|
|
649
567
|
children: getAppScopeText()
|
|
650
568
|
}), !availability.available && /*#__PURE__*/_jsx(Text, {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
569
|
+
className: "text-xs mt-space-4 font-medium",
|
|
570
|
+
style: {
|
|
571
|
+
color: colors.error
|
|
572
|
+
},
|
|
654
573
|
children: availability.reason
|
|
655
574
|
})]
|
|
656
575
|
}), /*#__PURE__*/_jsxs(View, {
|
|
657
|
-
|
|
658
|
-
children: [/*#__PURE__*/_jsx(
|
|
659
|
-
|
|
660
|
-
color: textColor
|
|
661
|
-
}],
|
|
576
|
+
className: "flex-row items-baseline mb-space-20",
|
|
577
|
+
children: [/*#__PURE__*/_jsx(H2, {
|
|
578
|
+
className: "text-text",
|
|
662
579
|
children: pricing.formatted
|
|
663
580
|
}), /*#__PURE__*/_jsx(Text, {
|
|
664
|
-
|
|
665
|
-
color: bloomTheme.colors.textSecondary
|
|
666
|
-
}],
|
|
581
|
+
className: "text-text-secondary text-sm ml-space-4",
|
|
667
582
|
children: t('premium.plan.perInterval', {
|
|
668
583
|
interval: pricing.interval
|
|
669
584
|
}) || `per ${pricing.interval}`
|
|
670
585
|
})]
|
|
671
|
-
}), /*#__PURE__*/_jsx(
|
|
672
|
-
|
|
673
|
-
children: plan.features.map((feature, index) => /*#__PURE__*/
|
|
674
|
-
|
|
675
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
586
|
+
}), /*#__PURE__*/_jsx(BenefitList, {
|
|
587
|
+
className: "mb-space-24",
|
|
588
|
+
children: plan.features.map((feature, index) => /*#__PURE__*/_jsx(BenefitRow, {
|
|
589
|
+
icon: /*#__PURE__*/_jsx(Ionicons, {
|
|
676
590
|
name: "checkmark",
|
|
677
|
-
size:
|
|
678
|
-
color:
|
|
679
|
-
}),
|
|
680
|
-
|
|
681
|
-
color: textColor
|
|
682
|
-
}],
|
|
683
|
-
children: feature
|
|
684
|
-
})]
|
|
591
|
+
size: 18,
|
|
592
|
+
color: colors.success
|
|
593
|
+
}),
|
|
594
|
+
label: feature
|
|
685
595
|
}, index))
|
|
686
|
-
}), isCurrentPlan ? /*#__PURE__*/_jsx(
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
})
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
style: [styles.selectPlanButton, {
|
|
706
|
-
backgroundColor: plan.isPopular ? primaryColor : borderColor
|
|
707
|
-
}],
|
|
596
|
+
}), isCurrentPlan ? /*#__PURE__*/_jsx(Button, {
|
|
597
|
+
variant: "secondary",
|
|
598
|
+
disabled: true,
|
|
599
|
+
icon: /*#__PURE__*/_jsx(Ionicons, {
|
|
600
|
+
name: "checkmark-circle",
|
|
601
|
+
size: 18,
|
|
602
|
+
color: colors.success
|
|
603
|
+
}),
|
|
604
|
+
accessibilityLabel: t('premium.plan.current') || 'Current Plan',
|
|
605
|
+
className: "w-full",
|
|
606
|
+
children: t('premium.plan.current') || 'Current Plan'
|
|
607
|
+
}) : !availability.available ? /*#__PURE__*/_jsx(Button, {
|
|
608
|
+
variant: "secondary",
|
|
609
|
+
disabled: true,
|
|
610
|
+
accessibilityLabel: t('premium.plan.notAvailableInApp') || 'Not Available in Current App',
|
|
611
|
+
className: "w-full",
|
|
612
|
+
children: t('premium.plan.notAvailableInApp') || 'Not Available in Current App'
|
|
613
|
+
}) : /*#__PURE__*/_jsx(Button, {
|
|
614
|
+
variant: plan.isPopular ? 'primary' : 'secondary',
|
|
708
615
|
onPress: () => handleSubscribe(plan.id),
|
|
709
616
|
disabled: processingPayment,
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
})
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
name: plan.name
|
|
719
|
-
}) || `Subscribe to ${plan.name}`
|
|
720
|
-
})
|
|
617
|
+
loading: processingPayment && isSelected,
|
|
618
|
+
accessibilityLabel: t('premium.actions.subscribeTo', {
|
|
619
|
+
name: plan.name
|
|
620
|
+
}) || `Subscribe to ${plan.name}`,
|
|
621
|
+
className: "w-full",
|
|
622
|
+
children: t('premium.actions.subscribeTo', {
|
|
623
|
+
name: plan.name
|
|
624
|
+
}) || `Subscribe to ${plan.name}`
|
|
721
625
|
})]
|
|
722
626
|
}, plan.id);
|
|
723
627
|
};
|
|
724
628
|
const renderTabNavigation = () => /*#__PURE__*/_jsx(View, {
|
|
725
|
-
|
|
726
|
-
children: /*#__PURE__*/_jsxs(
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
}],
|
|
735
|
-
onPress: () => setActiveTab('plans'),
|
|
736
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
737
|
-
style: [styles.tabText, {
|
|
738
|
-
color: activeTab === 'plans' ? primaryColor : textColor
|
|
739
|
-
}],
|
|
629
|
+
className: "mb-space-24",
|
|
630
|
+
children: /*#__PURE__*/_jsxs(SegmentedControl, {
|
|
631
|
+
label: t('premium.tabs.label') || 'Subscription type',
|
|
632
|
+
type: "tabs",
|
|
633
|
+
value: activeTab,
|
|
634
|
+
onChange: setActiveTab,
|
|
635
|
+
children: [/*#__PURE__*/_jsx(SegmentedControlItem, {
|
|
636
|
+
value: TAB_PLANS,
|
|
637
|
+
children: /*#__PURE__*/_jsx(SegmentedControlItemText, {
|
|
740
638
|
children: t('premium.tabs.plans') || 'Full Plans'
|
|
741
639
|
})
|
|
742
|
-
}), /*#__PURE__*/_jsx(
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
borderBottomWidth: 2
|
|
746
|
-
}],
|
|
747
|
-
onPress: () => setActiveTab('features'),
|
|
748
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
749
|
-
style: [styles.tabText, {
|
|
750
|
-
color: activeTab === 'features' ? primaryColor : textColor
|
|
751
|
-
}],
|
|
640
|
+
}), /*#__PURE__*/_jsx(SegmentedControlItem, {
|
|
641
|
+
value: TAB_FEATURES,
|
|
642
|
+
children: /*#__PURE__*/_jsx(SegmentedControlItemText, {
|
|
752
643
|
children: t('premium.tabs.features') || 'Individual Features'
|
|
753
644
|
})
|
|
754
645
|
})]
|
|
755
646
|
})
|
|
756
647
|
});
|
|
757
648
|
const renderFeatureCard = feature => {
|
|
758
|
-
const pricing = formatPrice(feature.price, feature.
|
|
649
|
+
const pricing = formatPrice(feature.price, feature.interval);
|
|
759
650
|
const isSubscribed = feature.isSubscribed;
|
|
760
651
|
const isIncludedInCurrentPlan = feature.isIncludedInCurrentPlan;
|
|
761
652
|
const canPurchase = feature.canBePurchasedSeparately && !isIncludedInCurrentPlan;
|
|
762
653
|
const getCategoryColor = category => {
|
|
763
654
|
switch (category) {
|
|
764
655
|
case 'analytics':
|
|
765
|
-
return
|
|
656
|
+
return colors.warning;
|
|
766
657
|
case 'customization':
|
|
767
|
-
return
|
|
658
|
+
return colors.secondary;
|
|
768
659
|
case 'content':
|
|
769
|
-
return
|
|
660
|
+
return colors.success;
|
|
770
661
|
case 'networking':
|
|
771
|
-
return
|
|
662
|
+
return colors.info;
|
|
772
663
|
case 'productivity':
|
|
773
|
-
return
|
|
664
|
+
return colors.error;
|
|
774
665
|
default:
|
|
775
|
-
return
|
|
666
|
+
return colors.primary;
|
|
776
667
|
}
|
|
777
668
|
};
|
|
778
669
|
const getCategoryIcon = category => {
|
|
@@ -800,199 +691,149 @@ const PremiumSubscriptionScreen = ({
|
|
|
800
691
|
}) || `Available in: ${feature.applicableApps.join(', ')}`;
|
|
801
692
|
};
|
|
802
693
|
return /*#__PURE__*/_jsxs(View, {
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
borderColor
|
|
806
|
-
}, isSubscribed && {
|
|
807
|
-
borderColor: successColor,
|
|
694
|
+
className: "bg-fill border border-border-image rounded-radius-12 p-space-16 mb-space-12 shadow-s",
|
|
695
|
+
style: isIncludedInCurrentPlan ? {
|
|
696
|
+
borderColor: colors.primary,
|
|
808
697
|
borderWidth: 2
|
|
809
|
-
}
|
|
810
|
-
borderColor:
|
|
698
|
+
} : isSubscribed ? {
|
|
699
|
+
borderColor: colors.success,
|
|
811
700
|
borderWidth: 2
|
|
812
|
-
}
|
|
701
|
+
} : undefined,
|
|
813
702
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
814
|
-
|
|
703
|
+
className: "flex-row items-start mb-space-12",
|
|
815
704
|
children: [/*#__PURE__*/_jsx(View, {
|
|
816
|
-
|
|
705
|
+
className: "bg-fill-secondary rounded-radius-max items-center justify-center mr-space-12",
|
|
706
|
+
style: {
|
|
707
|
+
width: 40,
|
|
708
|
+
height: 40
|
|
709
|
+
},
|
|
817
710
|
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
818
711
|
name: getCategoryIcon(feature.category),
|
|
819
712
|
size: 24,
|
|
820
713
|
color: getCategoryColor(feature.category)
|
|
821
714
|
})
|
|
822
715
|
}), /*#__PURE__*/_jsxs(View, {
|
|
823
|
-
|
|
716
|
+
className: "flex-1",
|
|
824
717
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
825
|
-
|
|
826
|
-
children: [/*#__PURE__*/_jsx(
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
}],
|
|
718
|
+
className: "flex-row items-center justify-between mb-space-4",
|
|
719
|
+
children: [/*#__PURE__*/_jsx(H5, {
|
|
720
|
+
className: "text-text flex-1 pr-space-8",
|
|
721
|
+
numberOfLines: 1,
|
|
830
722
|
children: feature.name
|
|
831
|
-
}), isIncludedInCurrentPlan && /*#__PURE__*/_jsx(
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
children:
|
|
836
|
-
style: styles.includedBadgeText,
|
|
837
|
-
children: "Included"
|
|
838
|
-
})
|
|
723
|
+
}), isIncludedInCurrentPlan && /*#__PURE__*/_jsx(Chip, {
|
|
724
|
+
variant: "solid",
|
|
725
|
+
color: "primary",
|
|
726
|
+
size: "small",
|
|
727
|
+
children: t('premium.feature.included') || 'Included'
|
|
839
728
|
})]
|
|
840
729
|
}), /*#__PURE__*/_jsx(Text, {
|
|
841
|
-
|
|
842
|
-
color: bloomTheme.colors.textSecondary
|
|
843
|
-
}],
|
|
730
|
+
className: "text-text-secondary text-sm",
|
|
844
731
|
children: feature.description
|
|
845
732
|
}), /*#__PURE__*/_jsx(Text, {
|
|
846
|
-
|
|
847
|
-
color: bloomTheme.colors.textTertiary
|
|
848
|
-
}],
|
|
733
|
+
className: "text-text-tertiary text-xs mt-space-4 italic",
|
|
849
734
|
children: getAppScopeText()
|
|
850
735
|
})]
|
|
851
736
|
})]
|
|
852
737
|
}), !isIncludedInCurrentPlan && /*#__PURE__*/_jsxs(View, {
|
|
853
|
-
|
|
854
|
-
children: [/*#__PURE__*/_jsx(
|
|
855
|
-
|
|
856
|
-
color: textColor
|
|
857
|
-
}],
|
|
738
|
+
className: "items-center mb-space-16",
|
|
739
|
+
children: [/*#__PURE__*/_jsx(H4, {
|
|
740
|
+
className: "text-text",
|
|
858
741
|
children: pricing.formatted
|
|
859
742
|
}), /*#__PURE__*/_jsx(Text, {
|
|
860
|
-
|
|
861
|
-
color: bloomTheme.colors.textSecondary
|
|
862
|
-
}],
|
|
743
|
+
className: "text-text-secondary text-sm mt-space-2",
|
|
863
744
|
children: t('premium.plan.perInterval', {
|
|
864
745
|
interval: pricing.interval
|
|
865
746
|
}) || `per ${pricing.interval}`
|
|
866
747
|
})]
|
|
867
|
-
}), isIncludedInCurrentPlan ? /*#__PURE__*/
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
748
|
+
}), isIncludedInCurrentPlan ? /*#__PURE__*/_jsx(Button, {
|
|
749
|
+
variant: "primary",
|
|
750
|
+
disabled: true,
|
|
751
|
+
icon: /*#__PURE__*/_jsx(Ionicons, {
|
|
872
752
|
name: "checkmark-circle",
|
|
873
753
|
size: 16,
|
|
874
|
-
color:
|
|
875
|
-
}),
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
754
|
+
color: colors.primaryForeground
|
|
755
|
+
}),
|
|
756
|
+
accessibilityLabel: t('premium.feature.includedInPlan') || 'Included in your plan',
|
|
757
|
+
className: "w-full",
|
|
758
|
+
children: t('premium.feature.includedInPlan') || 'Included in your plan'
|
|
879
759
|
}) : isSubscribed ? /*#__PURE__*/_jsxs(View, {
|
|
880
|
-
|
|
881
|
-
children: [/*#__PURE__*/
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
760
|
+
className: "flex-row gap-space-8",
|
|
761
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
762
|
+
variant: "secondary",
|
|
763
|
+
disabled: true,
|
|
764
|
+
icon: /*#__PURE__*/_jsx(Ionicons, {
|
|
886
765
|
name: "checkmark",
|
|
887
766
|
size: 16,
|
|
888
|
-
color:
|
|
889
|
-
}),
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
}), /*#__PURE__*/_jsx(
|
|
894
|
-
|
|
895
|
-
borderColor: dangerColor
|
|
896
|
-
}],
|
|
767
|
+
color: colors.success
|
|
768
|
+
}),
|
|
769
|
+
accessibilityLabel: t('premium.feature.subscribed') || 'Subscribed',
|
|
770
|
+
className: "flex-1",
|
|
771
|
+
children: t('premium.feature.subscribed') || 'Subscribed'
|
|
772
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
773
|
+
variant: "outline",
|
|
897
774
|
onPress: () => confirmFeatureUnsubscribe(feature.id),
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
}],
|
|
902
|
-
children: t('premium.actions.unsubscribe') || 'Unsubscribe'
|
|
903
|
-
})
|
|
775
|
+
accessibilityLabel: t('premium.actions.unsubscribe') || 'Unsubscribe',
|
|
776
|
+
className: "flex-1",
|
|
777
|
+
children: t('premium.actions.unsubscribe') || 'Unsubscribe'
|
|
904
778
|
})]
|
|
905
|
-
}) : canPurchase ? /*#__PURE__*/_jsx(
|
|
906
|
-
|
|
907
|
-
backgroundColor: primaryColor
|
|
908
|
-
}],
|
|
779
|
+
}) : canPurchase ? /*#__PURE__*/_jsx(Button, {
|
|
780
|
+
variant: "primary",
|
|
909
781
|
onPress: () => handleFeatureSubscribe(feature.id),
|
|
910
782
|
disabled: processingPayment,
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
}],
|
|
922
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
923
|
-
style: [styles.unavailableText, {
|
|
924
|
-
color: bloomTheme.colors.textTertiary
|
|
925
|
-
}],
|
|
926
|
-
children: "Only available in subscription plans"
|
|
927
|
-
})
|
|
783
|
+
loading: processingPayment,
|
|
784
|
+
accessibilityLabel: t('premium.actions.subscribe') || 'Subscribe',
|
|
785
|
+
className: "w-full",
|
|
786
|
+
children: t('premium.actions.subscribe') || 'Subscribe'
|
|
787
|
+
}) : /*#__PURE__*/_jsx(Button, {
|
|
788
|
+
variant: "secondary",
|
|
789
|
+
disabled: true,
|
|
790
|
+
accessibilityLabel: t('premium.feature.plansOnly') || 'Only available in subscription plans',
|
|
791
|
+
className: "w-full",
|
|
792
|
+
children: t('premium.feature.plansOnly') || 'Only available in subscription plans'
|
|
928
793
|
})]
|
|
929
794
|
}, feature.id);
|
|
930
795
|
};
|
|
931
|
-
const renderIndividualFeatures = () => {
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
children:
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
children:
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
style: [styles.categoryTitle, {
|
|
952
|
-
color: textColor
|
|
953
|
-
}],
|
|
954
|
-
children: category.charAt(0).toUpperCase() + category.slice(1)
|
|
955
|
-
}), categoryFeatures.map(renderFeatureCard)]
|
|
956
|
-
}, category);
|
|
957
|
-
})]
|
|
958
|
-
});
|
|
959
|
-
};
|
|
960
|
-
|
|
961
|
-
// Add this for testing different app contexts (remove in production)
|
|
962
|
-
const [showAppSwitcher, setShowAppSwitcher] = useState(__DEV__); // Only show in development
|
|
796
|
+
const renderIndividualFeatures = () => /*#__PURE__*/_jsxs(View, {
|
|
797
|
+
className: "mb-space-24",
|
|
798
|
+
children: [/*#__PURE__*/_jsx(H4, {
|
|
799
|
+
className: "text-text mb-space-8",
|
|
800
|
+
children: t('premium.features.title') || 'Individual Features'
|
|
801
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
802
|
+
className: "text-text-secondary text-base mb-space-16",
|
|
803
|
+
children: t('premium.features.subtitle') || 'Subscribe to specific features you need. Some features are included in subscription plans.'
|
|
804
|
+
}), FEATURE_CATEGORIES.map(category => {
|
|
805
|
+
const categoryFeatures = individualFeatures.filter(f => f.category === category);
|
|
806
|
+
if (categoryFeatures.length === 0) return null;
|
|
807
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
808
|
+
className: "mb-space-24",
|
|
809
|
+
children: [/*#__PURE__*/_jsx(H5, {
|
|
810
|
+
className: "text-text mb-space-12",
|
|
811
|
+
children: category.charAt(0).toUpperCase() + category.slice(1)
|
|
812
|
+
}), categoryFeatures.map(renderFeatureCard)]
|
|
813
|
+
}, category);
|
|
814
|
+
})]
|
|
815
|
+
});
|
|
963
816
|
|
|
817
|
+
// Show different app contexts for testing (development only).
|
|
818
|
+
const [showAppSwitcher] = useState(__DEV__);
|
|
964
819
|
const renderAppSwitcher = () => {
|
|
965
820
|
if (!showAppSwitcher) return null;
|
|
966
821
|
const testApps = ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator'];
|
|
967
822
|
return /*#__PURE__*/_jsxs(View, {
|
|
968
|
-
|
|
969
|
-
backgroundColor: bloomTheme.colors.backgroundSecondary,
|
|
970
|
-
borderColor
|
|
971
|
-
}],
|
|
823
|
+
className: "bg-fill-secondary border border-border-image rounded-radius-12 p-space-16 mb-space-24",
|
|
972
824
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
}],
|
|
976
|
-
children: "\uD83E\uDDEA Test App Context (Dev Only)"
|
|
825
|
+
className: "text-text-secondary text-sm font-medium mb-space-12",
|
|
826
|
+
children: t('premium.dev.appContext') || 'Test App Context (Dev Only)'
|
|
977
827
|
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
978
828
|
horizontal: true,
|
|
979
829
|
showsHorizontalScrollIndicator: false,
|
|
980
830
|
children: /*#__PURE__*/_jsx(View, {
|
|
981
|
-
|
|
982
|
-
children: testApps.map(app => /*#__PURE__*/_jsx(
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
onPress: () => {
|
|
988
|
-
setCurrentAppPackage(app);
|
|
989
|
-
},
|
|
990
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
991
|
-
style: [styles.appSwitcherButtonText, {
|
|
992
|
-
color: currentAppPackage === app ? bloomTheme.colors.negativeForeground : textColor
|
|
993
|
-
}],
|
|
994
|
-
children: app
|
|
995
|
-
})
|
|
831
|
+
className: "flex-row gap-space-8",
|
|
832
|
+
children: testApps.map(app => /*#__PURE__*/_jsx(Chip, {
|
|
833
|
+
variant: currentAppPackage === app ? 'solid' : 'outlined',
|
|
834
|
+
color: "primary",
|
|
835
|
+
onPress: () => setCurrentAppPackage(app),
|
|
836
|
+
children: app
|
|
996
837
|
}, app))
|
|
997
838
|
})
|
|
998
839
|
})]
|
|
@@ -1000,126 +841,96 @@ const PremiumSubscriptionScreen = ({
|
|
|
1000
841
|
};
|
|
1001
842
|
if (loading) {
|
|
1002
843
|
return /*#__PURE__*/_jsxs(View, {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
844
|
+
className: "flex-1 bg-bg",
|
|
845
|
+
children: [/*#__PURE__*/_jsx(Header, {
|
|
846
|
+
title: t('premium.title') || 'Oxy+ Subscriptions',
|
|
847
|
+
subtitle: t('premium.forApp', {
|
|
848
|
+
app: getAppDisplayName(currentAppPackage)
|
|
849
|
+
}) || `for ${getAppDisplayName(currentAppPackage)}`,
|
|
850
|
+
onBack: goBack || onClose,
|
|
851
|
+
onClose: onClose,
|
|
852
|
+
showCloseButton: !!onClose,
|
|
853
|
+
elevation: "subtle"
|
|
854
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
855
|
+
className: "flex-1 items-center justify-center px-screen-margin",
|
|
856
|
+
children: [/*#__PURE__*/_jsx(ActivityIndicator, {
|
|
857
|
+
size: "large",
|
|
858
|
+
color: colors.primary
|
|
859
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
860
|
+
className: "text-text-secondary text-base text-center mt-space-16",
|
|
861
|
+
children: t('premium.loading') || 'Loading subscription plans...'
|
|
862
|
+
})]
|
|
1015
863
|
})]
|
|
1016
864
|
});
|
|
1017
865
|
}
|
|
1018
866
|
return /*#__PURE__*/_jsxs(View, {
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
867
|
+
className: "flex-1 bg-bg",
|
|
868
|
+
children: [/*#__PURE__*/_jsx(Header, {
|
|
869
|
+
title: t('premium.title') || 'Oxy+ Subscriptions',
|
|
870
|
+
subtitle: t('premium.forApp', {
|
|
871
|
+
app: getAppDisplayName(currentAppPackage)
|
|
872
|
+
}) || `for ${getAppDisplayName(currentAppPackage)}`,
|
|
873
|
+
onBack: goBack || onClose,
|
|
874
|
+
onClose: onClose,
|
|
875
|
+
showCloseButton: !!onClose,
|
|
876
|
+
elevation: "subtle"
|
|
877
|
+
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
878
|
+
className: "flex-1",
|
|
879
|
+
contentContainerClassName: "px-screen-margin pb-space-32",
|
|
1024
880
|
showsVerticalScrollIndicator: false,
|
|
1025
|
-
children:
|
|
1026
|
-
|
|
1027
|
-
children: [/*#__PURE__*/
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
}]
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
children:
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
children: t('premium.benefits.performance.title') || 'Enhanced Performance'
|
|
1071
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1072
|
-
style: [styles.benefitDescription, {
|
|
1073
|
-
color: bloomTheme.colors.textSecondary
|
|
1074
|
-
}],
|
|
1075
|
-
children: t('premium.benefits.performance.desc') || 'Faster processing and priority access to our servers'
|
|
1076
|
-
})]
|
|
1077
|
-
})]
|
|
1078
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1079
|
-
style: styles.benefitItem,
|
|
1080
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1081
|
-
name: "shield-checkmark",
|
|
1082
|
-
size: 24,
|
|
1083
|
-
color: successColor
|
|
1084
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1085
|
-
style: styles.benefitContent,
|
|
1086
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
1087
|
-
style: [styles.benefitTitle, {
|
|
1088
|
-
color: textColor
|
|
1089
|
-
}],
|
|
1090
|
-
children: t('premium.benefits.security.title') || 'Advanced Security'
|
|
1091
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1092
|
-
style: [styles.benefitDescription, {
|
|
1093
|
-
color: bloomTheme.colors.textSecondary
|
|
1094
|
-
}],
|
|
1095
|
-
children: t('premium.benefits.security.desc') || 'Enhanced encryption and security features'
|
|
1096
|
-
})]
|
|
1097
|
-
})]
|
|
1098
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1099
|
-
style: styles.benefitItem,
|
|
1100
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1101
|
-
name: "headset",
|
|
1102
|
-
size: 24,
|
|
1103
|
-
color: warningColor
|
|
1104
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1105
|
-
style: styles.benefitContent,
|
|
881
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
882
|
+
className: "pt-space-20",
|
|
883
|
+
children: [renderAppSwitcher(), subscription && renderCurrentSubscription(), !subscription && /*#__PURE__*/_jsxs(View, {
|
|
884
|
+
className: "mb-space-24",
|
|
885
|
+
children: [/*#__PURE__*/_jsx(H2, {
|
|
886
|
+
className: "text-text mb-space-8",
|
|
887
|
+
children: t('premium.choosePlan') || 'Choose Your Plan'
|
|
888
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
889
|
+
className: "text-text-secondary text-base",
|
|
890
|
+
children: t('premium.choosePlanSubtitle') || 'Unlock premium features and take your experience to the next level'
|
|
891
|
+
})]
|
|
892
|
+
}), !subscription && renderTabNavigation(), !subscription && activeTab === TAB_PLANS && renderBillingToggle(), activeTab === TAB_PLANS ? /*#__PURE__*/_jsxs(View, {
|
|
893
|
+
className: "mb-space-24",
|
|
894
|
+
children: [!subscription && /*#__PURE__*/_jsx(H4, {
|
|
895
|
+
className: "text-text mb-space-12",
|
|
896
|
+
children: t('premium.availablePlans') || 'Available Plans'
|
|
897
|
+
}), plans.map(renderPlanCard)]
|
|
898
|
+
}) : renderIndividualFeatures(), /*#__PURE__*/_jsxs(View, {
|
|
899
|
+
className: "mb-space-24",
|
|
900
|
+
children: [/*#__PURE__*/_jsx(H4, {
|
|
901
|
+
className: "text-text mb-space-12",
|
|
902
|
+
children: t('premium.why') || 'Why Go Premium?'
|
|
903
|
+
}), /*#__PURE__*/_jsx(BenefitList, {
|
|
904
|
+
children: [{
|
|
905
|
+
icon: 'flash',
|
|
906
|
+
color: colors.primary,
|
|
907
|
+
title: t('premium.benefits.performance.title') || 'Enhanced Performance',
|
|
908
|
+
desc: t('premium.benefits.performance.desc') || 'Faster processing and priority access to our servers'
|
|
909
|
+
}, {
|
|
910
|
+
icon: 'shield-checkmark',
|
|
911
|
+
color: colors.success,
|
|
912
|
+
title: t('premium.benefits.security.title') || 'Advanced Security',
|
|
913
|
+
desc: t('premium.benefits.security.desc') || 'Enhanced encryption and security features'
|
|
914
|
+
}, {
|
|
915
|
+
icon: 'headset',
|
|
916
|
+
color: colors.warning,
|
|
917
|
+
title: t('premium.benefits.support.title') || 'Priority Support',
|
|
918
|
+
desc: t('premium.benefits.support.desc') || 'Get help faster with our premium support team'
|
|
919
|
+
}].map(benefit => /*#__PURE__*/_jsxs(BenefitRow, {
|
|
920
|
+
icon: /*#__PURE__*/_jsx(Ionicons, {
|
|
921
|
+
name: benefit.icon,
|
|
922
|
+
size: 18,
|
|
923
|
+
color: benefit.color
|
|
924
|
+
}),
|
|
925
|
+
accessibilityLabel: `${benefit.title}. ${benefit.desc}`,
|
|
1106
926
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
1112
|
-
style: [styles.benefitDescription, {
|
|
1113
|
-
color: bloomTheme.colors.textSecondary
|
|
1114
|
-
}],
|
|
1115
|
-
children: t('premium.benefits.support.desc') || 'Get help faster with our premium support team'
|
|
1116
|
-
})]
|
|
1117
|
-
})]
|
|
927
|
+
className: "text-text font-medium text-sm",
|
|
928
|
+
children: benefit.title
|
|
929
|
+
}), `\n${benefit.desc}`]
|
|
930
|
+
}, benefit.title))
|
|
1118
931
|
})]
|
|
1119
932
|
})]
|
|
1120
|
-
})
|
|
1121
|
-
style: styles.bottomSpacing
|
|
1122
|
-
})]
|
|
933
|
+
})
|
|
1123
934
|
}), /*#__PURE__*/_jsx(Dialog, {
|
|
1124
935
|
control: cancelSubscriptionDialog,
|
|
1125
936
|
title: t('premium.confirms.cancelSubTitle') || 'Cancel Subscription',
|
|
@@ -1149,462 +960,5 @@ const PremiumSubscriptionScreen = ({
|
|
|
1149
960
|
})]
|
|
1150
961
|
});
|
|
1151
962
|
};
|
|
1152
|
-
const styles = StyleSheet.create({
|
|
1153
|
-
container: {
|
|
1154
|
-
flex: 1
|
|
1155
|
-
},
|
|
1156
|
-
header: {
|
|
1157
|
-
flexDirection: 'row',
|
|
1158
|
-
alignItems: 'center',
|
|
1159
|
-
justifyContent: 'space-between',
|
|
1160
|
-
paddingHorizontal: 20,
|
|
1161
|
-
paddingTop: 20,
|
|
1162
|
-
paddingBottom: 16,
|
|
1163
|
-
borderBottomWidth: 1
|
|
1164
|
-
},
|
|
1165
|
-
backButton: {
|
|
1166
|
-
padding: 8
|
|
1167
|
-
},
|
|
1168
|
-
headerTitle: {
|
|
1169
|
-
fontSize: 20,
|
|
1170
|
-
fontWeight: '600'
|
|
1171
|
-
},
|
|
1172
|
-
headerTitleContainer: {
|
|
1173
|
-
flex: 1,
|
|
1174
|
-
alignItems: 'center'
|
|
1175
|
-
},
|
|
1176
|
-
currentAppText: {
|
|
1177
|
-
fontSize: 14,
|
|
1178
|
-
marginTop: 2,
|
|
1179
|
-
fontStyle: 'italic'
|
|
1180
|
-
},
|
|
1181
|
-
closeButton: {
|
|
1182
|
-
padding: 8
|
|
1183
|
-
},
|
|
1184
|
-
content: {
|
|
1185
|
-
flex: 1
|
|
1186
|
-
},
|
|
1187
|
-
section: {
|
|
1188
|
-
padding: 20
|
|
1189
|
-
},
|
|
1190
|
-
sectionTitle: {
|
|
1191
|
-
fontSize: 24,
|
|
1192
|
-
fontWeight: 'bold',
|
|
1193
|
-
marginBottom: 8
|
|
1194
|
-
},
|
|
1195
|
-
sectionSubtitle: {
|
|
1196
|
-
fontSize: 16,
|
|
1197
|
-
lineHeight: 22
|
|
1198
|
-
},
|
|
1199
|
-
loadingText: {
|
|
1200
|
-
fontSize: 16,
|
|
1201
|
-
textAlign: 'center',
|
|
1202
|
-
marginTop: 16
|
|
1203
|
-
},
|
|
1204
|
-
currentSubscriptionCard: {
|
|
1205
|
-
borderRadius: 16,
|
|
1206
|
-
padding: 20,
|
|
1207
|
-
borderWidth: 1
|
|
1208
|
-
},
|
|
1209
|
-
subscriptionHeader: {
|
|
1210
|
-
flexDirection: 'row',
|
|
1211
|
-
justifyContent: 'space-between',
|
|
1212
|
-
alignItems: 'flex-start',
|
|
1213
|
-
marginBottom: 12
|
|
1214
|
-
},
|
|
1215
|
-
planName: {
|
|
1216
|
-
fontSize: 20,
|
|
1217
|
-
fontWeight: 'bold',
|
|
1218
|
-
marginBottom: 4
|
|
1219
|
-
},
|
|
1220
|
-
planPrice: {
|
|
1221
|
-
fontSize: 16,
|
|
1222
|
-
fontWeight: '600'
|
|
1223
|
-
},
|
|
1224
|
-
statusBadge: {
|
|
1225
|
-
paddingHorizontal: 12,
|
|
1226
|
-
paddingVertical: 4,
|
|
1227
|
-
borderRadius: 12
|
|
1228
|
-
},
|
|
1229
|
-
statusText: {
|
|
1230
|
-
color: '#FFFFFF',
|
|
1231
|
-
fontSize: 12,
|
|
1232
|
-
fontWeight: '600'
|
|
1233
|
-
},
|
|
1234
|
-
subscriptionDetail: {
|
|
1235
|
-
fontSize: 14,
|
|
1236
|
-
marginBottom: 16
|
|
1237
|
-
},
|
|
1238
|
-
cancelNotice: {
|
|
1239
|
-
flexDirection: 'row',
|
|
1240
|
-
alignItems: 'center',
|
|
1241
|
-
padding: 12,
|
|
1242
|
-
backgroundColor: 'rgba(255, 149, 0, 0.1)',
|
|
1243
|
-
borderRadius: 8,
|
|
1244
|
-
marginBottom: 16
|
|
1245
|
-
},
|
|
1246
|
-
cancelText: {
|
|
1247
|
-
fontSize: 14,
|
|
1248
|
-
marginLeft: 8,
|
|
1249
|
-
flex: 1
|
|
1250
|
-
},
|
|
1251
|
-
subscriptionActions: {
|
|
1252
|
-
flexDirection: 'row',
|
|
1253
|
-
gap: 12
|
|
1254
|
-
},
|
|
1255
|
-
actionButton: {
|
|
1256
|
-
flex: 1,
|
|
1257
|
-
paddingVertical: 12,
|
|
1258
|
-
paddingHorizontal: 16,
|
|
1259
|
-
borderRadius: 8,
|
|
1260
|
-
alignItems: 'center'
|
|
1261
|
-
},
|
|
1262
|
-
secondaryButton: {
|
|
1263
|
-
backgroundColor: 'transparent',
|
|
1264
|
-
borderWidth: 1
|
|
1265
|
-
},
|
|
1266
|
-
actionButtonText: {
|
|
1267
|
-
color: '#FFFFFF',
|
|
1268
|
-
fontSize: 14,
|
|
1269
|
-
fontWeight: '600'
|
|
1270
|
-
},
|
|
1271
|
-
billingToggle: {
|
|
1272
|
-
flexDirection: 'row',
|
|
1273
|
-
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
1274
|
-
borderRadius: 8,
|
|
1275
|
-
padding: 4,
|
|
1276
|
-
marginBottom: 12
|
|
1277
|
-
},
|
|
1278
|
-
billingOption: {
|
|
1279
|
-
flex: 1,
|
|
1280
|
-
paddingVertical: 12,
|
|
1281
|
-
borderRadius: 6,
|
|
1282
|
-
alignItems: 'center'
|
|
1283
|
-
},
|
|
1284
|
-
billingOptionText: {
|
|
1285
|
-
fontSize: 16,
|
|
1286
|
-
fontWeight: '600'
|
|
1287
|
-
},
|
|
1288
|
-
savingsText: {
|
|
1289
|
-
fontSize: 14,
|
|
1290
|
-
textAlign: 'center',
|
|
1291
|
-
fontWeight: '600'
|
|
1292
|
-
},
|
|
1293
|
-
planCard: {
|
|
1294
|
-
borderRadius: 16,
|
|
1295
|
-
padding: 20,
|
|
1296
|
-
marginBottom: 16,
|
|
1297
|
-
borderWidth: 1,
|
|
1298
|
-
position: 'relative'
|
|
1299
|
-
},
|
|
1300
|
-
popularPlan: {
|
|
1301
|
-
borderWidth: 2
|
|
1302
|
-
},
|
|
1303
|
-
popularBadge: {
|
|
1304
|
-
position: 'absolute',
|
|
1305
|
-
top: -1,
|
|
1306
|
-
left: 20,
|
|
1307
|
-
right: 20,
|
|
1308
|
-
paddingVertical: 8,
|
|
1309
|
-
borderTopLeftRadius: 16,
|
|
1310
|
-
borderTopRightRadius: 16,
|
|
1311
|
-
alignItems: 'center'
|
|
1312
|
-
},
|
|
1313
|
-
popularText: {
|
|
1314
|
-
color: '#FFFFFF',
|
|
1315
|
-
fontSize: 12,
|
|
1316
|
-
fontWeight: 'bold'
|
|
1317
|
-
},
|
|
1318
|
-
planHeader: {
|
|
1319
|
-
marginBottom: 16,
|
|
1320
|
-
marginTop: 16
|
|
1321
|
-
},
|
|
1322
|
-
planDescription: {
|
|
1323
|
-
fontSize: 14,
|
|
1324
|
-
lineHeight: 20
|
|
1325
|
-
},
|
|
1326
|
-
planAppScope: {
|
|
1327
|
-
fontSize: 12,
|
|
1328
|
-
fontStyle: 'italic',
|
|
1329
|
-
marginTop: 4
|
|
1330
|
-
},
|
|
1331
|
-
planPricing: {
|
|
1332
|
-
flexDirection: 'row',
|
|
1333
|
-
alignItems: 'baseline',
|
|
1334
|
-
marginBottom: 20
|
|
1335
|
-
},
|
|
1336
|
-
planInterval: {
|
|
1337
|
-
fontSize: 14,
|
|
1338
|
-
marginLeft: 4
|
|
1339
|
-
},
|
|
1340
|
-
planFeatures: {
|
|
1341
|
-
marginBottom: 24
|
|
1342
|
-
},
|
|
1343
|
-
featureItem: {
|
|
1344
|
-
flexDirection: 'row',
|
|
1345
|
-
alignItems: 'center',
|
|
1346
|
-
marginBottom: 8
|
|
1347
|
-
},
|
|
1348
|
-
featureText: {
|
|
1349
|
-
fontSize: 14,
|
|
1350
|
-
marginLeft: 8,
|
|
1351
|
-
flex: 1
|
|
1352
|
-
},
|
|
1353
|
-
selectPlanButton: {
|
|
1354
|
-
paddingVertical: 16,
|
|
1355
|
-
borderRadius: 12,
|
|
1356
|
-
alignItems: 'center'
|
|
1357
|
-
},
|
|
1358
|
-
selectPlanText: {
|
|
1359
|
-
fontSize: 16,
|
|
1360
|
-
fontWeight: '600'
|
|
1361
|
-
},
|
|
1362
|
-
currentPlanButton: {
|
|
1363
|
-
paddingVertical: 16,
|
|
1364
|
-
borderRadius: 12,
|
|
1365
|
-
alignItems: 'center'
|
|
1366
|
-
},
|
|
1367
|
-
currentPlanText: {
|
|
1368
|
-
color: '#FFFFFF',
|
|
1369
|
-
fontSize: 16,
|
|
1370
|
-
fontWeight: '600'
|
|
1371
|
-
},
|
|
1372
|
-
benefitsCard: {
|
|
1373
|
-
borderRadius: 16,
|
|
1374
|
-
padding: 20,
|
|
1375
|
-
borderWidth: 1
|
|
1376
|
-
},
|
|
1377
|
-
benefitItem: {
|
|
1378
|
-
flexDirection: 'row',
|
|
1379
|
-
alignItems: 'flex-start',
|
|
1380
|
-
marginBottom: 20
|
|
1381
|
-
},
|
|
1382
|
-
benefitContent: {
|
|
1383
|
-
marginLeft: 16,
|
|
1384
|
-
flex: 1
|
|
1385
|
-
},
|
|
1386
|
-
benefitTitle: {
|
|
1387
|
-
fontSize: 16,
|
|
1388
|
-
fontWeight: '600',
|
|
1389
|
-
marginBottom: 4
|
|
1390
|
-
},
|
|
1391
|
-
benefitDescription: {
|
|
1392
|
-
fontSize: 14,
|
|
1393
|
-
lineHeight: 20
|
|
1394
|
-
},
|
|
1395
|
-
bottomSpacing: {
|
|
1396
|
-
height: 40
|
|
1397
|
-
},
|
|
1398
|
-
tabContainer: {
|
|
1399
|
-
flexDirection: 'row',
|
|
1400
|
-
borderBottomWidth: 1,
|
|
1401
|
-
marginBottom: 20
|
|
1402
|
-
},
|
|
1403
|
-
tab: {
|
|
1404
|
-
flex: 1,
|
|
1405
|
-
paddingVertical: 12,
|
|
1406
|
-
paddingHorizontal: 16,
|
|
1407
|
-
alignItems: 'center'
|
|
1408
|
-
},
|
|
1409
|
-
tabText: {
|
|
1410
|
-
fontSize: 16,
|
|
1411
|
-
fontWeight: '600'
|
|
1412
|
-
},
|
|
1413
|
-
featureCard: {
|
|
1414
|
-
borderRadius: 12,
|
|
1415
|
-
borderWidth: 1,
|
|
1416
|
-
padding: 16,
|
|
1417
|
-
marginBottom: 12
|
|
1418
|
-
},
|
|
1419
|
-
featureHeader: {
|
|
1420
|
-
flexDirection: 'row',
|
|
1421
|
-
alignItems: 'flex-start',
|
|
1422
|
-
marginBottom: 12
|
|
1423
|
-
},
|
|
1424
|
-
featureIconContainer: {
|
|
1425
|
-
width: 40,
|
|
1426
|
-
height: 40,
|
|
1427
|
-
borderRadius: 20,
|
|
1428
|
-
backgroundColor: 'rgba(0, 122, 255, 0.1)',
|
|
1429
|
-
justifyContent: 'center',
|
|
1430
|
-
alignItems: 'center',
|
|
1431
|
-
marginRight: 12
|
|
1432
|
-
},
|
|
1433
|
-
featureInfo: {
|
|
1434
|
-
flex: 1
|
|
1435
|
-
},
|
|
1436
|
-
featureName: {
|
|
1437
|
-
fontSize: 16,
|
|
1438
|
-
fontWeight: '600',
|
|
1439
|
-
marginBottom: 4
|
|
1440
|
-
},
|
|
1441
|
-
featureDescription: {
|
|
1442
|
-
fontSize: 14,
|
|
1443
|
-
lineHeight: 20
|
|
1444
|
-
},
|
|
1445
|
-
featurePricing: {
|
|
1446
|
-
alignItems: 'center',
|
|
1447
|
-
marginBottom: 16
|
|
1448
|
-
},
|
|
1449
|
-
featurePrice: {
|
|
1450
|
-
fontSize: 20,
|
|
1451
|
-
fontWeight: 'bold'
|
|
1452
|
-
},
|
|
1453
|
-
featureInterval: {
|
|
1454
|
-
fontSize: 14,
|
|
1455
|
-
marginTop: 2
|
|
1456
|
-
},
|
|
1457
|
-
featureActions: {
|
|
1458
|
-
flexDirection: 'row',
|
|
1459
|
-
gap: 8
|
|
1460
|
-
},
|
|
1461
|
-
subscribedButton: {
|
|
1462
|
-
flex: 1,
|
|
1463
|
-
flexDirection: 'row',
|
|
1464
|
-
justifyContent: 'center',
|
|
1465
|
-
alignItems: 'center',
|
|
1466
|
-
paddingVertical: 12,
|
|
1467
|
-
borderRadius: 8,
|
|
1468
|
-
gap: 6
|
|
1469
|
-
},
|
|
1470
|
-
subscribedText: {
|
|
1471
|
-
color: '#FFFFFF',
|
|
1472
|
-
fontSize: 16,
|
|
1473
|
-
fontWeight: '600'
|
|
1474
|
-
},
|
|
1475
|
-
unsubscribeButton: {
|
|
1476
|
-
flex: 1,
|
|
1477
|
-
justifyContent: 'center',
|
|
1478
|
-
alignItems: 'center',
|
|
1479
|
-
paddingVertical: 12,
|
|
1480
|
-
borderRadius: 8,
|
|
1481
|
-
borderWidth: 1
|
|
1482
|
-
},
|
|
1483
|
-
unsubscribeText: {
|
|
1484
|
-
fontSize: 16,
|
|
1485
|
-
fontWeight: '600'
|
|
1486
|
-
},
|
|
1487
|
-
subscribeFeatureButton: {
|
|
1488
|
-
justifyContent: 'center',
|
|
1489
|
-
alignItems: 'center',
|
|
1490
|
-
paddingVertical: 12,
|
|
1491
|
-
borderRadius: 8
|
|
1492
|
-
},
|
|
1493
|
-
subscribeFeatureText: {
|
|
1494
|
-
color: '#FFFFFF',
|
|
1495
|
-
fontSize: 16,
|
|
1496
|
-
fontWeight: '600'
|
|
1497
|
-
},
|
|
1498
|
-
categorySection: {
|
|
1499
|
-
marginBottom: 24
|
|
1500
|
-
},
|
|
1501
|
-
categoryTitle: {
|
|
1502
|
-
fontSize: 18,
|
|
1503
|
-
fontWeight: '600',
|
|
1504
|
-
marginBottom: 12
|
|
1505
|
-
},
|
|
1506
|
-
featureNameRow: {
|
|
1507
|
-
flexDirection: 'row',
|
|
1508
|
-
alignItems: 'center',
|
|
1509
|
-
justifyContent: 'space-between',
|
|
1510
|
-
marginBottom: 4
|
|
1511
|
-
},
|
|
1512
|
-
includedBadge: {
|
|
1513
|
-
paddingHorizontal: 8,
|
|
1514
|
-
paddingVertical: 2,
|
|
1515
|
-
borderRadius: 12,
|
|
1516
|
-
marginLeft: 8
|
|
1517
|
-
},
|
|
1518
|
-
includedBadgeText: {
|
|
1519
|
-
color: '#FFFFFF',
|
|
1520
|
-
fontSize: 10,
|
|
1521
|
-
fontWeight: '600',
|
|
1522
|
-
textTransform: 'uppercase'
|
|
1523
|
-
},
|
|
1524
|
-
appScopeText: {
|
|
1525
|
-
fontSize: 12,
|
|
1526
|
-
marginTop: 4,
|
|
1527
|
-
fontStyle: 'italic'
|
|
1528
|
-
},
|
|
1529
|
-
includedInPlanButton: {
|
|
1530
|
-
flexDirection: 'row',
|
|
1531
|
-
justifyContent: 'center',
|
|
1532
|
-
alignItems: 'center',
|
|
1533
|
-
paddingVertical: 12,
|
|
1534
|
-
borderRadius: 8,
|
|
1535
|
-
gap: 6
|
|
1536
|
-
},
|
|
1537
|
-
includedInPlanText: {
|
|
1538
|
-
color: '#FFFFFF',
|
|
1539
|
-
fontSize: 14,
|
|
1540
|
-
fontWeight: '600'
|
|
1541
|
-
},
|
|
1542
|
-
unavailableButton: {
|
|
1543
|
-
justifyContent: 'center',
|
|
1544
|
-
alignItems: 'center',
|
|
1545
|
-
paddingVertical: 12,
|
|
1546
|
-
borderRadius: 8
|
|
1547
|
-
},
|
|
1548
|
-
unavailableText: {
|
|
1549
|
-
fontSize: 14,
|
|
1550
|
-
fontWeight: '500',
|
|
1551
|
-
textAlign: 'center'
|
|
1552
|
-
},
|
|
1553
|
-
appSpecificBadge: {
|
|
1554
|
-
position: 'absolute',
|
|
1555
|
-
top: 16,
|
|
1556
|
-
right: 16,
|
|
1557
|
-
paddingHorizontal: 8,
|
|
1558
|
-
paddingVertical: 4,
|
|
1559
|
-
borderRadius: 12,
|
|
1560
|
-
zIndex: 1
|
|
1561
|
-
},
|
|
1562
|
-
appSpecificText: {
|
|
1563
|
-
color: '#FFFFFF',
|
|
1564
|
-
fontSize: 12,
|
|
1565
|
-
fontWeight: '600'
|
|
1566
|
-
},
|
|
1567
|
-
planRestrictionText: {
|
|
1568
|
-
fontSize: 12,
|
|
1569
|
-
fontWeight: '500',
|
|
1570
|
-
marginTop: 4,
|
|
1571
|
-
fontStyle: 'italic'
|
|
1572
|
-
},
|
|
1573
|
-
unavailablePlanButton: {
|
|
1574
|
-
paddingVertical: 16,
|
|
1575
|
-
borderRadius: 12,
|
|
1576
|
-
alignItems: 'center'
|
|
1577
|
-
},
|
|
1578
|
-
unavailablePlanText: {
|
|
1579
|
-
fontSize: 16,
|
|
1580
|
-
fontWeight: '600'
|
|
1581
|
-
},
|
|
1582
|
-
appSwitcher: {
|
|
1583
|
-
padding: 16,
|
|
1584
|
-
borderBottomWidth: 1,
|
|
1585
|
-
margin: 16,
|
|
1586
|
-
borderRadius: 12,
|
|
1587
|
-
borderWidth: 1
|
|
1588
|
-
},
|
|
1589
|
-
appSwitcherTitle: {
|
|
1590
|
-
fontSize: 14,
|
|
1591
|
-
fontWeight: '600',
|
|
1592
|
-
marginBottom: 12
|
|
1593
|
-
},
|
|
1594
|
-
appSwitcherButtons: {
|
|
1595
|
-
flexDirection: 'row',
|
|
1596
|
-
gap: 8
|
|
1597
|
-
},
|
|
1598
|
-
appSwitcherButton: {
|
|
1599
|
-
paddingHorizontal: 12,
|
|
1600
|
-
paddingVertical: 6,
|
|
1601
|
-
borderRadius: 8,
|
|
1602
|
-
borderWidth: 1
|
|
1603
|
-
},
|
|
1604
|
-
appSwitcherButtonText: {
|
|
1605
|
-
fontSize: 12,
|
|
1606
|
-
fontWeight: '500'
|
|
1607
|
-
}
|
|
1608
|
-
});
|
|
1609
963
|
export default PremiumSubscriptionScreen;
|
|
1610
964
|
//# sourceMappingURL=PremiumSubscriptionScreen.js.map
|