@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,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { useCallback, useMemo } from 'react';
|
|
4
|
-
import { View,
|
|
4
|
+
import { View, ScrollView } from 'react-native';
|
|
5
5
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
6
|
import { Switch } from '@oxyhq/bloom/switch';
|
|
7
7
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
@@ -12,9 +12,6 @@ import { useOxy } from "../context/OxyContext.js";
|
|
|
12
12
|
import { useCurrentUser } from "../hooks/queries/useAccountQueries.js";
|
|
13
13
|
import { useUpdateNotificationPreferences } from "../hooks/mutations/useAccountMutations.js";
|
|
14
14
|
import { useSettingToggles } from "../hooks/useSettingToggle.js";
|
|
15
|
-
import { useColorScheme } from "../hooks/useColorScheme.js";
|
|
16
|
-
import { Colors } from "../constants/theme.js";
|
|
17
|
-
import { normalizeColorScheme, normalizeTheme } from '@oxyhq/core';
|
|
18
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
16
|
const DEFAULT_VALUES = {
|
|
20
17
|
pushEnabled: true,
|
|
@@ -33,15 +30,12 @@ const DEFAULT_VALUES = {
|
|
|
33
30
|
*/
|
|
34
31
|
const NotificationsScreen = ({
|
|
35
32
|
onClose,
|
|
36
|
-
theme,
|
|
37
33
|
goBack
|
|
38
34
|
}) => {
|
|
39
35
|
const bloomTheme = useTheme();
|
|
40
36
|
const {
|
|
41
37
|
t
|
|
42
38
|
} = useI18n();
|
|
43
|
-
const colorScheme = useColorScheme();
|
|
44
|
-
const palette = useMemo(() => Colors[normalizeColorScheme(colorScheme, normalizeTheme(theme))], [colorScheme, theme]);
|
|
45
39
|
const {
|
|
46
40
|
isAuthenticated
|
|
47
41
|
} = useOxy();
|
|
@@ -77,93 +71,81 @@ const NotificationsScreen = ({
|
|
|
77
71
|
});
|
|
78
72
|
const isSaving = savingKeys.size > 0;
|
|
79
73
|
return /*#__PURE__*/_jsxs(View, {
|
|
80
|
-
|
|
81
|
-
backgroundColor: bloomTheme.colors.background
|
|
82
|
-
}],
|
|
74
|
+
className: "flex-1 bg-bg",
|
|
83
75
|
children: [/*#__PURE__*/_jsx(Header, {
|
|
84
76
|
title: t('notifications.title') || 'Notifications',
|
|
85
77
|
onBack: goBack || onClose,
|
|
86
78
|
variant: "minimal",
|
|
87
79
|
elevation: "subtle"
|
|
88
|
-
}), /*#__PURE__*/
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
80
|
+
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
81
|
+
className: "flex-1",
|
|
82
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
83
|
+
className: "px-screen-margin pb-space-24",
|
|
84
|
+
children: [/*#__PURE__*/_jsxs(SettingsListGroup, {
|
|
85
|
+
title: t('notifications.sections.channels') || 'Channels',
|
|
86
|
+
children: [/*#__PURE__*/_jsx(SettingsListItem, {
|
|
87
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
88
|
+
name: "bell",
|
|
89
|
+
color: bloomTheme.colors.primary
|
|
90
|
+
}),
|
|
91
|
+
title: t('notifications.items.push.title') || 'Push notifications',
|
|
92
|
+
description: t('notifications.items.push.subtitle') || 'Real-time alerts on your devices',
|
|
93
|
+
rightElement: /*#__PURE__*/_jsx(Switch, {
|
|
94
|
+
value: values.pushEnabled,
|
|
95
|
+
onValueChange: () => toggle('pushEnabled'),
|
|
96
|
+
disabled: isSaving
|
|
97
|
+
}),
|
|
98
|
+
showChevron: false
|
|
99
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
100
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
101
|
+
name: "email",
|
|
102
|
+
color: bloomTheme.colors.info
|
|
103
|
+
}),
|
|
104
|
+
title: t('notifications.items.emailDigest.title') || 'Email digest',
|
|
105
|
+
description: t('notifications.items.emailDigest.subtitle') || 'Periodic summary of your account activity',
|
|
106
|
+
rightElement: /*#__PURE__*/_jsx(Switch, {
|
|
107
|
+
value: values.emailDigest,
|
|
108
|
+
onValueChange: () => toggle('emailDigest'),
|
|
109
|
+
disabled: isSaving
|
|
110
|
+
}),
|
|
111
|
+
showChevron: false
|
|
112
|
+
})]
|
|
113
|
+
}), /*#__PURE__*/_jsx(SettingsListGroup, {
|
|
114
|
+
title: t('notifications.sections.alerts') || 'Alerts',
|
|
115
|
+
children: /*#__PURE__*/_jsx(SettingsListItem, {
|
|
116
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
117
|
+
name: "shield-check",
|
|
118
|
+
color: bloomTheme.colors.success
|
|
119
|
+
}),
|
|
120
|
+
title: t('notifications.items.securityAlerts.title') || 'Security alerts',
|
|
121
|
+
description: t('notifications.items.securityAlerts.subtitle') || 'Sign-ins, recovery codes, and key changes',
|
|
122
|
+
rightElement: /*#__PURE__*/_jsx(Switch, {
|
|
123
|
+
value: values.securityAlerts,
|
|
124
|
+
onValueChange: () => toggle('securityAlerts'),
|
|
125
|
+
disabled: isSaving
|
|
126
|
+
}),
|
|
127
|
+
showChevron: false
|
|
128
|
+
})
|
|
129
|
+
}), /*#__PURE__*/_jsx(SettingsListGroup, {
|
|
130
|
+
title: t('notifications.sections.marketing') || 'Marketing',
|
|
131
|
+
children: /*#__PURE__*/_jsx(SettingsListItem, {
|
|
132
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
133
|
+
name: "megaphone",
|
|
134
|
+
color: bloomTheme.colors.secondary
|
|
135
|
+
}),
|
|
136
|
+
title: t('notifications.items.marketingEmails.title') || 'Marketing emails',
|
|
137
|
+
description: t('notifications.items.marketingEmails.subtitle') || 'Product news and occasional offers',
|
|
138
|
+
rightElement: /*#__PURE__*/_jsx(Switch, {
|
|
139
|
+
value: values.marketingEmails,
|
|
140
|
+
onValueChange: () => toggle('marketingEmails'),
|
|
141
|
+
disabled: isSaving
|
|
142
|
+
}),
|
|
143
|
+
showChevron: false
|
|
144
|
+
})
|
|
119
145
|
})]
|
|
120
|
-
})
|
|
121
|
-
title: t('notifications.sections.alerts') || 'Alerts',
|
|
122
|
-
children: /*#__PURE__*/_jsx(SettingsListItem, {
|
|
123
|
-
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
124
|
-
name: "shield-check",
|
|
125
|
-
color: palette.iconSecurity
|
|
126
|
-
}),
|
|
127
|
-
title: t('notifications.items.securityAlerts.title') || 'Security alerts',
|
|
128
|
-
description: t('notifications.items.securityAlerts.subtitle') || 'Sign-ins, recovery codes, and key changes',
|
|
129
|
-
rightElement: /*#__PURE__*/_jsx(Switch, {
|
|
130
|
-
value: values.securityAlerts,
|
|
131
|
-
onValueChange: () => toggle('securityAlerts'),
|
|
132
|
-
disabled: isSaving
|
|
133
|
-
}),
|
|
134
|
-
showChevron: false
|
|
135
|
-
})
|
|
136
|
-
}), /*#__PURE__*/_jsx(SettingsListGroup, {
|
|
137
|
-
title: t('notifications.sections.marketing') || 'Marketing',
|
|
138
|
-
children: /*#__PURE__*/_jsx(SettingsListItem, {
|
|
139
|
-
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
140
|
-
name: "megaphone",
|
|
141
|
-
color: palette.iconSharing
|
|
142
|
-
}),
|
|
143
|
-
title: t('notifications.items.marketingEmails.title') || 'Marketing emails',
|
|
144
|
-
description: t('notifications.items.marketingEmails.subtitle') || 'Product news and occasional offers',
|
|
145
|
-
rightElement: /*#__PURE__*/_jsx(Switch, {
|
|
146
|
-
value: values.marketingEmails,
|
|
147
|
-
onValueChange: () => toggle('marketingEmails'),
|
|
148
|
-
disabled: isSaving
|
|
149
|
-
}),
|
|
150
|
-
showChevron: false
|
|
151
|
-
})
|
|
152
|
-
})]
|
|
146
|
+
})
|
|
153
147
|
})]
|
|
154
148
|
});
|
|
155
149
|
};
|
|
156
|
-
const styles = StyleSheet.create({
|
|
157
|
-
container: {
|
|
158
|
-
flex: 1
|
|
159
|
-
},
|
|
160
|
-
scroll: {
|
|
161
|
-
flex: 1
|
|
162
|
-
},
|
|
163
|
-
scrollContent: {
|
|
164
|
-
paddingHorizontal: 16,
|
|
165
|
-
paddingBottom: 24
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
150
|
export default /*#__PURE__*/React.memo(NotificationsScreen);
|
|
169
151
|
//# sourceMappingURL=NotificationsScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useMemo","View","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","View","ScrollView","SettingsListGroup","SettingsListItem","Switch","useTheme","Header","SettingsIcon","useI18n","useOxy","useCurrentUser","useUpdateNotificationPreferences","useSettingToggles","jsx","_jsx","jsxs","_jsxs","DEFAULT_VALUES","pushEnabled","emailDigest","securityAlerts","marketingEmails","NotificationsScreen","onClose","goBack","bloomTheme","t","isAuthenticated","data","user","enabled","updateMutation","initialValues","prefs","notificationPreferences","handleSave","key","value","patch","mutateAsync","values","toggle","savingKeys","onSave","errorMessage","isSaving","size","className","children","title","onBack","variant","elevation","icon","name","color","colors","primary","description","rightElement","onValueChange","disabled","showChevron","info","success","secondary","memo"],"sourceRoot":"../../../../src","sources":["ui/screens/NotificationsScreen.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,iBAAiB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAChF,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,QAAQ,QAAQ,oBAAoB;AAG7C,OAAOC,MAAM,MAAM,yBAAsB;AACzC,SAASC,YAAY,QAAQ,+BAA4B;AACzD,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,SAASC,MAAM,QAAQ,0BAAuB;A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B,MAAM,CAAC,gBAAgB,CAAE;cAC9CoB,QAAQ,EAAEhB;YAAS,CACtB,CACJ;YACDiB,WAAW,EAAE;UAAM,CACtB;QAAC,CACa,CAAC,eAEpBhD,IAAA,CAACZ,iBAAiB;UACd+C,KAAK,EAAEvB,CAAC,CAAC,kCAAkC,CAAC,IAAI,WAAY;UAAAsB,QAAA,eAE5DlC,IAAA,CAACX,gBAAgB;YACbkD,IAAI,eACAvC,IAAA,CAACP,YAAY;cACT+C,IAAI,EAAC,WAAW;cAChBC,KAAK,EAAE9B,UAAU,CAAC+B,MAAM,CAACS;YAAU,CACtC,CACJ;YACDhB,KAAK,EACDvB,CAAC,CAAC,2CAA2C,CAAC,IAC3C,kBACN;YACDgC,WAAW,EACPhC,CAAC,CAAC,8CAA8C,CAAC,IAC9C,oCACN;YACDiC,YAAY,eACR7C,IAAA,CAACV,MAAM;cACHiC,KAAK,EAAEG,MAAM,CAACnB,eAAgB;cAC9BuC,aAAa,EAAEA,CAAA,KAAMnB,MAAM,CAAC,iBAAiB,CAAE;cAC/CoB,QAAQ,EAAEhB;YAAS,CACtB,CACJ;YACDiB,WAAW,EAAE;UAAM,CACtB;QAAC,CACa,CAAC;MAAA,CAClB;IAAC,CACC,CAAC;EAAA,CACX,CAAC;AAEf,CAAC;AAED,4BAAejE,KAAK,CAACqE,IAAI,CAAC5C,mBAAmB,CAAC","ignoreList":[]}
|
|
@@ -17,13 +17,17 @@
|
|
|
17
17
|
* identity; this screen should NOT be used within the Accounts app itself.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { View,
|
|
20
|
+
import { View, Linking } from 'react-native';
|
|
21
21
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
22
22
|
import { Button } from '@oxyhq/bloom/button';
|
|
23
23
|
import { Loading } from '@oxyhq/bloom/loading';
|
|
24
|
+
import { H4, Text } from '@oxyhq/bloom/typography';
|
|
25
|
+
import { IconCircle } from '@oxyhq/bloom/icon-circle';
|
|
26
|
+
import * as Icons from '@oxyhq/bloom/icons';
|
|
24
27
|
import { useOxy } from "../context/OxyContext.js";
|
|
25
28
|
import OxyLogo from "../components/OxyLogo.js";
|
|
26
29
|
import AnotherDeviceQR from "../components/AnotherDeviceQR.js";
|
|
30
|
+
import LoadingState from "../components/LoadingState.js";
|
|
27
31
|
import { useOxyAuthSession, OXY_ACCOUNTS_WEB_URL } from "../hooks/useOxyAuthSession.js";
|
|
28
32
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
33
|
const OxyAuthScreen = ({
|
|
@@ -38,190 +42,121 @@ const OxyAuthScreen = ({
|
|
|
38
42
|
} = useOxy();
|
|
39
43
|
const {
|
|
40
44
|
qrData,
|
|
45
|
+
qrPayload,
|
|
41
46
|
isLoading,
|
|
42
47
|
error,
|
|
43
48
|
isWaiting,
|
|
44
49
|
openAuthApproval,
|
|
50
|
+
openSameDeviceApproval,
|
|
45
51
|
retry
|
|
46
52
|
} = useOxyAuthSession(oxyServices, clientId, switchSession, {
|
|
47
53
|
onSignedIn: onAuthenticated
|
|
48
54
|
});
|
|
49
55
|
if (isLoading) {
|
|
50
|
-
return /*#__PURE__*/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
})
|
|
57
|
-
style: styles.loadingText,
|
|
58
|
-
className: "text-muted-foreground",
|
|
59
|
-
children: "Preparing sign in..."
|
|
60
|
-
})]
|
|
56
|
+
return /*#__PURE__*/_jsx(View, {
|
|
57
|
+
className: "flex-1 items-center justify-center bg-bg",
|
|
58
|
+
children: /*#__PURE__*/_jsx(LoadingState, {
|
|
59
|
+
size: "large",
|
|
60
|
+
color: bloomTheme.colors.primary,
|
|
61
|
+
message: "Preparing sign in..."
|
|
62
|
+
})
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
65
|
if (error) {
|
|
64
66
|
return /*#__PURE__*/_jsxs(View, {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
className: "text-destructive",
|
|
67
|
+
className: "flex-1 items-center justify-center bg-bg px-screen-margin gap-space-16",
|
|
68
|
+
children: [/*#__PURE__*/_jsx(IconCircle, {
|
|
69
|
+
icon: Icons.Warning_Stroke2_Corner0_Rounded
|
|
70
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
71
|
+
className: "font-sans text-body text-text-secondary text-center",
|
|
71
72
|
children: error
|
|
72
73
|
}), /*#__PURE__*/_jsx(Button, {
|
|
73
74
|
variant: "primary",
|
|
75
|
+
fullWidth: true,
|
|
76
|
+
className: "w-full",
|
|
74
77
|
onPress: retry,
|
|
75
|
-
|
|
78
|
+
icon: /*#__PURE__*/_jsx(Icons.ArrowRotateClockwise_Stroke2_Corner0_Rounded, {
|
|
79
|
+
size: "sm",
|
|
80
|
+
style: {
|
|
81
|
+
color: bloomTheme.colors.primaryForeground
|
|
82
|
+
}
|
|
83
|
+
}),
|
|
76
84
|
children: "Try Again"
|
|
77
85
|
})]
|
|
78
86
|
});
|
|
79
87
|
}
|
|
80
88
|
return /*#__PURE__*/_jsxs(View, {
|
|
81
|
-
|
|
82
|
-
backgroundColor: bloomTheme.colors.background
|
|
83
|
-
}],
|
|
89
|
+
className: "flex-1 items-center justify-center bg-bg px-screen-margin",
|
|
84
90
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
85
|
-
|
|
91
|
+
className: "items-center mb-space-24 gap-space-12",
|
|
86
92
|
children: [/*#__PURE__*/_jsx(OxyLogo, {
|
|
87
93
|
variant: "icon",
|
|
88
|
-
size:
|
|
89
|
-
}), /*#__PURE__*/_jsx(
|
|
90
|
-
|
|
91
|
-
className: "text-foreground",
|
|
94
|
+
size: 56
|
|
95
|
+
}), /*#__PURE__*/_jsx(H4, {
|
|
96
|
+
className: "text-headerBold font-headerBold text-text text-center",
|
|
92
97
|
children: "Sign in to Oxy"
|
|
93
98
|
}), /*#__PURE__*/_jsx(Text, {
|
|
94
|
-
|
|
95
|
-
className: "text-muted-foreground",
|
|
99
|
+
className: "font-sans text-body text-text-secondary text-center",
|
|
96
100
|
children: "Continue with your Oxy identity to sign in securely"
|
|
97
101
|
})]
|
|
98
102
|
}), /*#__PURE__*/_jsx(Button, {
|
|
99
103
|
variant: "primary",
|
|
104
|
+
size: "large",
|
|
105
|
+
fullWidth: true,
|
|
106
|
+
className: "w-full",
|
|
100
107
|
onPress: openAuthApproval,
|
|
101
108
|
icon: /*#__PURE__*/_jsx(OxyLogo, {
|
|
102
109
|
variant: "icon",
|
|
103
110
|
size: 20,
|
|
104
|
-
fillColor: bloomTheme.colors.primaryForeground
|
|
105
|
-
style: styles.buttonIcon
|
|
111
|
+
fillColor: bloomTheme.colors.primaryForeground
|
|
106
112
|
}),
|
|
107
|
-
style: styles.primaryButton,
|
|
108
113
|
children: "Continue with Oxy"
|
|
114
|
+
}), qrPayload && /*#__PURE__*/_jsx(Button, {
|
|
115
|
+
variant: "secondary",
|
|
116
|
+
size: "large",
|
|
117
|
+
fullWidth: true,
|
|
118
|
+
className: "w-full mt-space-12",
|
|
119
|
+
onPress: openSameDeviceApproval,
|
|
120
|
+
icon: /*#__PURE__*/_jsx(OxyLogo, {
|
|
121
|
+
variant: "icon",
|
|
122
|
+
size: 20,
|
|
123
|
+
fillColor: bloomTheme.colors.text
|
|
124
|
+
}),
|
|
125
|
+
children: "Sign in with the Oxy app"
|
|
109
126
|
}), isWaiting && /*#__PURE__*/_jsxs(View, {
|
|
110
|
-
|
|
127
|
+
className: "flex-row items-center mt-space-16 gap-space-8",
|
|
111
128
|
children: [/*#__PURE__*/_jsx(Loading, {
|
|
112
|
-
size: "small"
|
|
113
|
-
style: styles.statusSpinner
|
|
129
|
+
size: "small"
|
|
114
130
|
}), /*#__PURE__*/_jsx(Text, {
|
|
115
|
-
|
|
116
|
-
className: "text-muted-foreground",
|
|
131
|
+
className: "font-sans text-body text-text-secondary",
|
|
117
132
|
children: "Waiting for authorization..."
|
|
118
133
|
})]
|
|
119
134
|
}), /*#__PURE__*/_jsx(View, {
|
|
120
|
-
|
|
135
|
+
className: "w-full mt-space-24",
|
|
121
136
|
children: /*#__PURE__*/_jsx(AnotherDeviceQR, {
|
|
122
|
-
qrData: qrData
|
|
137
|
+
qrData: qrData,
|
|
138
|
+
qrPayload: qrPayload
|
|
123
139
|
})
|
|
124
140
|
}), /*#__PURE__*/_jsxs(View, {
|
|
125
|
-
|
|
126
|
-
children: [/*#__PURE__*/
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
141
|
+
className: "flex-row flex-wrap justify-center items-center mt-space-24",
|
|
142
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
143
|
+
className: "font-sans text-body text-text-secondary",
|
|
144
|
+
children: "Don't have an Oxy account?"
|
|
145
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
146
|
+
variant: "text",
|
|
147
|
+
size: "small",
|
|
131
148
|
onPress: () => Linking.openURL(OXY_ACCOUNTS_WEB_URL),
|
|
132
|
-
|
|
133
|
-
children:
|
|
134
|
-
style: styles.footerLink,
|
|
135
|
-
className: "text-primary",
|
|
136
|
-
children: "Create one"
|
|
137
|
-
})
|
|
149
|
+
accessibilityLabel: "Create an Oxy account",
|
|
150
|
+
children: "Create one"
|
|
138
151
|
})]
|
|
139
|
-
}), goBack && /*#__PURE__*/_jsx(
|
|
140
|
-
|
|
152
|
+
}), goBack && /*#__PURE__*/_jsx(Button, {
|
|
153
|
+
variant: "text",
|
|
141
154
|
onPress: goBack,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
className: "text-muted-foreground",
|
|
146
|
-
children: "Cancel"
|
|
147
|
-
})
|
|
155
|
+
className: "mt-space-8",
|
|
156
|
+
accessibilityLabel: "Cancel",
|
|
157
|
+
children: "Cancel"
|
|
148
158
|
})]
|
|
149
159
|
});
|
|
150
160
|
};
|
|
151
|
-
const styles = StyleSheet.create({
|
|
152
|
-
container: {
|
|
153
|
-
flex: 1,
|
|
154
|
-
padding: 24,
|
|
155
|
-
alignItems: 'center',
|
|
156
|
-
justifyContent: 'center'
|
|
157
|
-
},
|
|
158
|
-
header: {
|
|
159
|
-
alignItems: 'center',
|
|
160
|
-
marginBottom: 28
|
|
161
|
-
},
|
|
162
|
-
title: {
|
|
163
|
-
fontSize: 24,
|
|
164
|
-
fontWeight: 'bold',
|
|
165
|
-
marginTop: 16,
|
|
166
|
-
textAlign: 'center'
|
|
167
|
-
},
|
|
168
|
-
subtitle: {
|
|
169
|
-
fontSize: 14,
|
|
170
|
-
marginTop: 8,
|
|
171
|
-
textAlign: 'center'
|
|
172
|
-
},
|
|
173
|
-
primaryButton: {
|
|
174
|
-
width: '100%',
|
|
175
|
-
borderRadius: 12
|
|
176
|
-
},
|
|
177
|
-
buttonIcon: {
|
|
178
|
-
marginRight: 10
|
|
179
|
-
},
|
|
180
|
-
statusContainer: {
|
|
181
|
-
flexDirection: 'row',
|
|
182
|
-
alignItems: 'center',
|
|
183
|
-
marginTop: 20
|
|
184
|
-
},
|
|
185
|
-
statusSpinner: {
|
|
186
|
-
flex: undefined
|
|
187
|
-
},
|
|
188
|
-
statusText: {
|
|
189
|
-
marginLeft: 8,
|
|
190
|
-
fontSize: 14
|
|
191
|
-
},
|
|
192
|
-
qrSection: {
|
|
193
|
-
width: '100%',
|
|
194
|
-
marginTop: 24
|
|
195
|
-
},
|
|
196
|
-
footer: {
|
|
197
|
-
flexDirection: 'row',
|
|
198
|
-
flexWrap: 'wrap',
|
|
199
|
-
justifyContent: 'center',
|
|
200
|
-
marginTop: 28
|
|
201
|
-
},
|
|
202
|
-
footerText: {
|
|
203
|
-
fontSize: 14
|
|
204
|
-
},
|
|
205
|
-
footerLink: {
|
|
206
|
-
fontSize: 14,
|
|
207
|
-
fontWeight: '600'
|
|
208
|
-
},
|
|
209
|
-
cancelButton: {
|
|
210
|
-
marginTop: 16,
|
|
211
|
-
padding: 12
|
|
212
|
-
},
|
|
213
|
-
cancelText: {
|
|
214
|
-
fontSize: 14
|
|
215
|
-
},
|
|
216
|
-
loadingText: {
|
|
217
|
-
marginTop: 16,
|
|
218
|
-
fontSize: 14
|
|
219
|
-
},
|
|
220
|
-
errorText: {
|
|
221
|
-
fontSize: 14,
|
|
222
|
-
textAlign: 'center',
|
|
223
|
-
marginBottom: 16
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
161
|
export default OxyAuthScreen;
|
|
227
162
|
//# sourceMappingURL=OxyAuthScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","
|
|
1
|
+
{"version":3,"names":["View","Linking","useTheme","Button","Loading","H4","Text","IconCircle","Icons","useOxy","OxyLogo","AnotherDeviceQR","LoadingState","useOxyAuthSession","OXY_ACCOUNTS_WEB_URL","jsx","_jsx","jsxs","_jsxs","OxyAuthScreen","goBack","onAuthenticated","bloomTheme","oxyServices","switchSession","clientId","qrData","qrPayload","isLoading","error","isWaiting","openAuthApproval","openSameDeviceApproval","retry","onSignedIn","className","children","size","color","colors","primary","message","icon","Warning_Stroke2_Corner0_Rounded","variant","fullWidth","onPress","ArrowRotateClockwise_Stroke2_Corner0_Rounded","style","primaryForeground","fillColor","text","openURL","accessibilityLabel"],"sourceRoot":"../../../../src","sources":["ui/screens/OxyAuthScreen.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,IAAI,EAAEC,OAAO,QAAQ,cAAc;AAE5C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,SAASC,EAAE,EAAEC,IAAI,QAAQ,yBAAyB;AAClD,SAASC,UAAU,QAAQ,0BAA0B;AACrD,OAAO,KAAKC,KAAK,MAAM,oBAAoB;AAC3C,SAASC,MAAM,QAAQ,0BAAuB;AAC9C,OAAOC,OAAO,MAAM,0BAAuB;AAC3C,OAAO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|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useState, useRef, useMemo, useCallback } from 'react';
|
|
4
|
-
import { View,
|
|
4
|
+
import { View, ScrollView, Animated, Platform, useWindowDimensions } from 'react-native';
|
|
5
5
|
import { useThemeColors } from "../styles/theme.js";
|
|
6
6
|
import { normalizeTheme } from '@oxyhq/core';
|
|
7
7
|
import { Button } from '@oxyhq/bloom/button';
|
|
8
|
+
import { useTheme } from '@oxyhq/bloom/theme';
|
|
9
|
+
import { H4 } from '@oxyhq/bloom/typography';
|
|
8
10
|
import { Ionicons } from '@expo/vector-icons';
|
|
9
11
|
import { useI18n } from "../hooks/useI18n.js";
|
|
10
12
|
import QRCode from 'react-native-qrcode-svg';
|
|
@@ -14,7 +16,6 @@ import PaymentDetailsStep from "../components/payment/PaymentDetailsStep.js";
|
|
|
14
16
|
import PaymentReviewStep from "../components/payment/PaymentReviewStep.js";
|
|
15
17
|
import PaymentSuccessStep from "../components/payment/PaymentSuccessStep.js";
|
|
16
18
|
import { PAYMENT_METHODS } from "../components/payment/constants.js";
|
|
17
|
-
import { createPaymentStyles } from "../components/payment/paymentStyles.js";
|
|
18
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
20
|
const getUniqueItemTypes = items => {
|
|
20
21
|
const types = items.map(item => item.type);
|
|
@@ -57,11 +58,13 @@ const PaymentGatewayScreen = props => {
|
|
|
57
58
|
const scaleAnim = useRef(new Animated.Value(1)).current;
|
|
58
59
|
const progressAnim = useRef(new Animated.Value(0.2)).current;
|
|
59
60
|
const normalizedTheme = normalizeTheme(theme);
|
|
61
|
+
// `colors` (PaymentColors) is the contract the wizard step components consume.
|
|
60
62
|
const colors = useThemeColors(normalizedTheme);
|
|
63
|
+
// Bloom theme drives screen-shell icon roles (no hardcoded hex).
|
|
64
|
+
const bloomTheme = useTheme();
|
|
61
65
|
const {
|
|
62
66
|
t
|
|
63
67
|
} = useI18n();
|
|
64
|
-
const styles = useMemo(() => createPaymentStyles(colors), [colors]);
|
|
65
68
|
|
|
66
69
|
// Determine if the payment is for a recurring item (subscription)
|
|
67
70
|
const isRecurring = paymentItems.length > 0 && paymentItems[0].type === 'subscription';
|
|
@@ -160,9 +163,13 @@ const PaymentGatewayScreen = props => {
|
|
|
160
163
|
// Validate amount
|
|
161
164
|
if (!amount || Number.isNaN(Number(amount)) || Number(amount) <= 0) {
|
|
162
165
|
return /*#__PURE__*/_jsxs(View, {
|
|
163
|
-
|
|
164
|
-
children: [/*#__PURE__*/_jsx(
|
|
165
|
-
|
|
166
|
+
className: "flex-1 bg-bg items-center justify-center px-screen-margin gap-space-24",
|
|
167
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
168
|
+
name: "alert-circle-outline",
|
|
169
|
+
size: 48,
|
|
170
|
+
color: bloomTheme.colors.error
|
|
171
|
+
}), /*#__PURE__*/_jsx(H4, {
|
|
172
|
+
className: "text-text text-center",
|
|
166
173
|
children: t('payment.errors.invalidAmount')
|
|
167
174
|
}), /*#__PURE__*/_jsx(Button, {
|
|
168
175
|
variant: "primary",
|
|
@@ -250,11 +257,10 @@ const PaymentGatewayScreen = props => {
|
|
|
250
257
|
}
|
|
251
258
|
};
|
|
252
259
|
return /*#__PURE__*/_jsx(View, {
|
|
253
|
-
|
|
254
|
-
backgroundColor: colors.background
|
|
255
|
-
}],
|
|
260
|
+
className: "flex-1 bg-bg",
|
|
256
261
|
children: /*#__PURE__*/_jsx(ScrollView, {
|
|
257
|
-
|
|
262
|
+
className: "flex-1",
|
|
263
|
+
contentContainerClassName: "p-space-16",
|
|
258
264
|
showsVerticalScrollIndicator: false,
|
|
259
265
|
children: renderCurrentStep()
|
|
260
266
|
})
|