@oxyhq/services 10.5.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 +24 -31
- 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
|
@@ -6,45 +6,35 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _vectorIcons = require("@expo/vector-icons");
|
|
10
9
|
var _Header = _interopRequireDefault(require("../../components/Header.js"));
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _EmptyState = _interopRequireDefault(require("../../components/EmptyState.js"));
|
|
11
|
+
var _searchInput = require("@oxyhq/bloom/search-input");
|
|
12
|
+
var _accordion = require("@oxyhq/bloom/accordion");
|
|
13
|
+
var _typography = require("@oxyhq/bloom/typography");
|
|
13
14
|
var _theme = require("@oxyhq/bloom/theme");
|
|
14
|
-
var
|
|
15
|
-
var _useColorScheme = require("../../hooks/useColorScheme.js");
|
|
16
|
-
var _theme2 = require("../../constants/theme.js");
|
|
15
|
+
var _useI18n = require("../../hooks/useI18n.js");
|
|
17
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
20
19
|
const FAQ_KEYS = ['what', 'earn', 'lose', 'use', 'transfer', 'support'];
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
|
-
* TrustFAQScreen
|
|
22
|
+
* TrustFAQScreen
|
|
24
23
|
*
|
|
25
|
-
*
|
|
26
|
-
* -
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* - React.memo wrapper to prevent re-renders when props haven't changed
|
|
24
|
+
* Frequently asked questions about Oxy Trust, rendered with the shared Bloom
|
|
25
|
+
* Accordion (single-expand) + SearchInput. Styling is centralized Bloom token
|
|
26
|
+
* classes; the Bloom Accordion owns its own expand/collapse animation, so no
|
|
27
|
+
* `LayoutAnimation` is used here.
|
|
30
28
|
*/
|
|
31
29
|
const TrustFAQScreen = ({
|
|
32
|
-
goBack
|
|
33
|
-
theme
|
|
30
|
+
goBack
|
|
34
31
|
}) => {
|
|
35
32
|
const {
|
|
36
33
|
t
|
|
37
34
|
} = (0, _useI18n.useI18n)();
|
|
38
|
-
const [expanded, setExpanded] = (0, _react.useState)(null);
|
|
39
|
-
const [search, setSearch] = (0, _react.useState)('');
|
|
40
|
-
|
|
41
|
-
// Memoize theme-related calculations to prevent unnecessary recalculations
|
|
42
35
|
const bloomTheme = (0, _theme.useTheme)();
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const colors = _theme2.Colors[normalizedColorScheme];
|
|
46
|
-
|
|
47
|
-
// Memoize filtered FAQs to prevent filtering on every render
|
|
36
|
+
const [search, setSearch] = (0, _react.useState)('');
|
|
37
|
+
const [expanded, setExpanded] = (0, _react.useState)(undefined);
|
|
48
38
|
const faqs = (0, _react.useMemo)(() => FAQ_KEYS.map(key => ({
|
|
49
39
|
id: key,
|
|
50
40
|
q: t(`trust.faq.items.${key}.q`) || '',
|
|
@@ -55,132 +45,52 @@ const TrustFAQScreen = ({
|
|
|
55
45
|
const searchLower = search.toLowerCase();
|
|
56
46
|
return faqs.filter(faq => faq.q.toLowerCase().includes(searchLower) || faq.a.toLowerCase().includes(searchLower));
|
|
57
47
|
}, [search, faqs]);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const handleToggle = (0, _react.useCallback)(id => {
|
|
61
|
-
_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);
|
|
62
|
-
setExpanded(prev => prev === id ? null : id);
|
|
48
|
+
const handleAccordionChange = (0, _react.useCallback)(value => {
|
|
49
|
+
setExpanded(Array.isArray(value) ? value[0] : value);
|
|
63
50
|
}, []);
|
|
64
51
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
65
|
-
|
|
66
|
-
backgroundColor: bloomTheme.colors.background
|
|
67
|
-
}],
|
|
52
|
+
className: "flex-1 bg-bg",
|
|
68
53
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
|
|
69
54
|
title: t('trust.faq.title') || 'Trust FAQ',
|
|
70
55
|
subtitle: t('trust.faq.subtitle') || 'Frequently asked questions about Oxy Trust',
|
|
71
56
|
subtitleVariant: "muted",
|
|
72
57
|
onBack: goBack,
|
|
73
58
|
elevation: "subtle"
|
|
74
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
75
|
-
|
|
59
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
60
|
+
className: "px-screen-margin pt-space-20 pb-space-12",
|
|
61
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_searchInput.SearchInput, {
|
|
62
|
+
label: t('trust.faq.search') || 'Search FAQ...',
|
|
63
|
+
value: search,
|
|
64
|
+
onChangeText: setSearch,
|
|
65
|
+
onClearText: () => setSearch(''),
|
|
66
|
+
accessibilityLabel: "Search Trust FAQ"
|
|
67
|
+
})
|
|
68
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
69
|
+
className: "flex-1 px-screen-margin",
|
|
76
70
|
showsVerticalScrollIndicator: false,
|
|
77
|
-
children:
|
|
78
|
-
|
|
79
|
-
backgroundColor: colors.card
|
|
80
|
-
}],
|
|
81
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
82
|
-
name: "search",
|
|
83
|
-
size: 22,
|
|
84
|
-
color: colors.icon
|
|
85
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
86
|
-
style: [styles.searchInput, {
|
|
87
|
-
color: bloomTheme.colors.text
|
|
88
|
-
}],
|
|
89
|
-
placeholder: t('trust.faq.search') || 'Search FAQ...',
|
|
90
|
-
placeholderTextColor: bloomTheme.colors.textTertiary,
|
|
91
|
-
value: search,
|
|
92
|
-
onChangeText: setSearch,
|
|
93
|
-
returnKeyType: "search"
|
|
94
|
-
})]
|
|
95
|
-
}), filteredFaqs.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
96
|
-
style: [styles.noResults, {
|
|
97
|
-
color: colors.secondaryText
|
|
98
|
-
}],
|
|
99
|
-
children: t('trust.faq.noResults', {
|
|
71
|
+
children: filteredFaqs.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmptyState.default, {
|
|
72
|
+
message: t('trust.faq.noResults', {
|
|
100
73
|
query: search
|
|
101
|
-
}) || `No FAQ items found matching "${search}"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
})
|
|
120
|
-
}), isExpanded && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
121
|
-
style: [styles.answerContainer, {
|
|
122
|
-
backgroundColor: colors.card
|
|
123
|
-
}, isLast && styles.lastAnswerContainer],
|
|
124
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
125
|
-
style: [styles.answer, {
|
|
126
|
-
color: bloomTheme.colors.text
|
|
127
|
-
}],
|
|
128
|
-
children: faq.a
|
|
129
|
-
})
|
|
130
|
-
})]
|
|
131
|
-
}, faq.id);
|
|
132
|
-
})
|
|
133
|
-
})]
|
|
74
|
+
}) || `No FAQ items found matching "${search}"`,
|
|
75
|
+
textColor: bloomTheme.colors.text
|
|
76
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_accordion.Accordion, {
|
|
77
|
+
type: "single",
|
|
78
|
+
value: expanded,
|
|
79
|
+
onValueChange: handleAccordionChange,
|
|
80
|
+
children: filteredFaqs.map(faq => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_accordion.AccordionItem, {
|
|
81
|
+
value: faq.id,
|
|
82
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_accordion.AccordionTrigger, {
|
|
83
|
+
children: faq.q
|
|
84
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_accordion.AccordionContent, {
|
|
85
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
86
|
+
className: "font-sans text-bodyMedium text-text-secondary",
|
|
87
|
+
children: faq.a
|
|
88
|
+
})
|
|
89
|
+
})]
|
|
90
|
+
}, faq.id))
|
|
91
|
+
})
|
|
134
92
|
})]
|
|
135
93
|
});
|
|
136
94
|
};
|
|
137
|
-
const styles = _reactNative.StyleSheet.create({
|
|
138
|
-
container: {
|
|
139
|
-
flex: 1
|
|
140
|
-
},
|
|
141
|
-
contentContainer: {
|
|
142
|
-
paddingHorizontal: 24,
|
|
143
|
-
paddingTop: 20,
|
|
144
|
-
paddingBottom: 40
|
|
145
|
-
},
|
|
146
|
-
searchContainer: {
|
|
147
|
-
flexDirection: 'row',
|
|
148
|
-
alignItems: 'center',
|
|
149
|
-
paddingHorizontal: 14,
|
|
150
|
-
paddingVertical: 10,
|
|
151
|
-
marginBottom: 12,
|
|
152
|
-
borderRadius: 999,
|
|
153
|
-
gap: 10
|
|
154
|
-
},
|
|
155
|
-
searchInput: {
|
|
156
|
-
flex: 1,
|
|
157
|
-
fontSize: 16,
|
|
158
|
-
lineHeight: 20
|
|
159
|
-
},
|
|
160
|
-
groupedSectionContainer: {
|
|
161
|
-
width: '100%'
|
|
162
|
-
},
|
|
163
|
-
faqItemWrapper: {
|
|
164
|
-
width: '100%'
|
|
165
|
-
},
|
|
166
|
-
answerContainer: {
|
|
167
|
-
paddingHorizontal: 10,
|
|
168
|
-
paddingTop: 4,
|
|
169
|
-
paddingBottom: 12
|
|
170
|
-
},
|
|
171
|
-
lastAnswerContainer: {
|
|
172
|
-
borderBottomLeftRadius: 18,
|
|
173
|
-
borderBottomRightRadius: 18
|
|
174
|
-
},
|
|
175
|
-
answer: {
|
|
176
|
-
fontSize: 14,
|
|
177
|
-
lineHeight: 20
|
|
178
|
-
},
|
|
179
|
-
noResults: {
|
|
180
|
-
fontSize: 16,
|
|
181
|
-
marginTop: 32,
|
|
182
|
-
textAlign: 'center'
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
95
|
var _default = exports.default = /*#__PURE__*/_react.default.memo(TrustFAQScreen);
|
|
186
96
|
//# sourceMappingURL=TrustFAQScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_Header","_interopRequireDefault","_EmptyState","_searchInput","_accordion","_typography","_theme","_useI18n","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FAQ_KEYS","TrustFAQScreen","goBack","useI18n","bloomTheme","useTheme","search","setSearch","useState","expanded","setExpanded","undefined","faqs","useMemo","map","key","id","q","a","filteredFaqs","trim","searchLower","toLowerCase","filter","faq","includes","handleAccordionChange","useCallback","value","Array","isArray","jsxs","View","className","children","jsx","title","subtitle","subtitleVariant","onBack","elevation","SearchInput","label","onChangeText","onClearText","accessibilityLabel","ScrollView","showsVerticalScrollIndicator","length","message","query","textColor","colors","text","Accordion","type","onValueChange","AccordionItem","AccordionTrigger","AccordionContent","Text","_default","exports","React","memo"],"sourceRoot":"../../../../../src","sources":["ui/screens/trust/TrustFAQScreen.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -6,162 +6,229 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _core = require("@oxyhq/core");
|
|
10
|
+
var _theme = require("@oxyhq/bloom/theme");
|
|
11
|
+
var _typography = require("@oxyhq/bloom/typography");
|
|
12
|
+
var _chip = require("@oxyhq/bloom/chip");
|
|
13
|
+
var _button = require("@oxyhq/bloom/button");
|
|
14
|
+
var _vectorIcons = require("@expo/vector-icons");
|
|
9
15
|
var _Avatar = _interopRequireDefault(require("../../components/Avatar.js"));
|
|
10
16
|
var _Header = _interopRequireDefault(require("../../components/Header.js"));
|
|
11
17
|
var _useI18n = require("../../hooks/useI18n.js");
|
|
12
|
-
var _theme = require("@oxyhq/bloom/theme");
|
|
13
18
|
var _OxyContext = require("../../context/OxyContext.js");
|
|
14
19
|
var _trustTier = require("./trustTier.js");
|
|
15
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
const AVATAR_SIZE = 40;
|
|
23
|
+
const EMPTY_ICON_SIZE = 64;
|
|
24
|
+
const ERROR_ICON_SIZE = 48;
|
|
25
|
+
/** Ranks within the podium (1–3) get a highlighted row surface. */
|
|
26
|
+
const PODIUM_RANK = 3;
|
|
17
27
|
const TrustLeaderboardScreen = ({
|
|
18
28
|
goBack,
|
|
19
|
-
theme,
|
|
20
29
|
navigate
|
|
21
30
|
}) => {
|
|
22
|
-
// Use useOxy() hook for OxyContext values
|
|
23
31
|
const {
|
|
24
|
-
oxyServices
|
|
32
|
+
oxyServices,
|
|
33
|
+
user: currentUser
|
|
25
34
|
} = (0, _OxyContext.useOxy)();
|
|
26
35
|
const {
|
|
27
|
-
t
|
|
36
|
+
t,
|
|
37
|
+
locale
|
|
28
38
|
} = (0, _useI18n.useI18n)();
|
|
39
|
+
const bloomTheme = (0, _theme.useTheme)();
|
|
29
40
|
const [leaderboard, setLeaderboard] = (0, _react.useState)([]);
|
|
30
41
|
const [isLoading, setIsLoading] = (0, _react.useState)(true);
|
|
31
42
|
const [error, setError] = (0, _react.useState)(null);
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
const primaryColor = '#d169e5';
|
|
35
|
-
(0, _react.useEffect)(() => {
|
|
43
|
+
const currentUserId = currentUser?.id ?? '';
|
|
44
|
+
const loadLeaderboard = (0, _react.useCallback)(() => {
|
|
36
45
|
setIsLoading(true);
|
|
37
46
|
setError(null);
|
|
38
|
-
oxyServices.getReputationLeaderboard().then(data => setLeaderboard(Array.isArray(data) ? data : [])).catch(err =>
|
|
47
|
+
oxyServices.getReputationLeaderboard().then(data => setLeaderboard(Array.isArray(data) ? data : [])).catch(err => {
|
|
48
|
+
_core.logger.error('Failed to load trust leaderboard', err instanceof Error ? err : new Error(String(err)), {
|
|
49
|
+
component: 'TrustLeaderboardScreen'
|
|
50
|
+
});
|
|
51
|
+
setError(err instanceof Error ? err.message : null);
|
|
52
|
+
}).finally(() => setIsLoading(false));
|
|
39
53
|
}, [oxyServices]);
|
|
54
|
+
(0, _react.useEffect)(() => {
|
|
55
|
+
loadLeaderboard();
|
|
56
|
+
}, [loadLeaderboard]);
|
|
57
|
+
const title = t('trust.leaderboard.title') || 'Trust Leaderboard';
|
|
58
|
+
const subtitle = t('trust.leaderboard.subtitle') || 'Top contributors in the community';
|
|
59
|
+
const handleEntryPress = (0, _react.useCallback)(entry => {
|
|
60
|
+
navigate?.('Profile', {
|
|
61
|
+
userId: entry.user.id,
|
|
62
|
+
username: entry.user.username
|
|
63
|
+
});
|
|
64
|
+
}, [navigate]);
|
|
65
|
+
const renderEntry = (0, _react.useCallback)(({
|
|
66
|
+
item
|
|
67
|
+
}) => {
|
|
68
|
+
const displayName = (0, _core.getAccountDisplayName)(item.user, locale);
|
|
69
|
+
const isViewer = currentUserId !== '' && item.user.id === currentUserId;
|
|
70
|
+
const isPodium = item.rank <= PODIUM_RANK;
|
|
71
|
+
// Viewer's own row and podium ranks get a subtle highlighted surface.
|
|
72
|
+
const highlightClass = isViewer || isPodium ? 'bg-fill-secondary' : '';
|
|
73
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
74
|
+
style: styles.row,
|
|
75
|
+
className: `px-screen-margin py-space-12 gap-space-12 rounded-radius-12 ${highlightClass}`,
|
|
76
|
+
onPress: () => handleEntryPress(item),
|
|
77
|
+
activeOpacity: 0.7,
|
|
78
|
+
accessibilityRole: "button",
|
|
79
|
+
accessibilityLabel: `${displayName}, ${t('trust.leaderboard.rankLabel', {
|
|
80
|
+
rank: item.rank
|
|
81
|
+
}) || `rank ${item.rank}`}`,
|
|
82
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
83
|
+
className: "text-text-secondary font-bold text-subtitle text-center",
|
|
84
|
+
style: styles.rank,
|
|
85
|
+
numberOfLines: 1,
|
|
86
|
+
children: item.rank
|
|
87
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
88
|
+
uri: item.user.avatar ? oxyServices.getFileDownloadUrl(item.user.avatar, 'thumb') : undefined,
|
|
89
|
+
name: displayName,
|
|
90
|
+
size: AVATAR_SIZE
|
|
91
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
92
|
+
style: styles.userColumn,
|
|
93
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
94
|
+
className: "text-text font-medium text-base",
|
|
95
|
+
numberOfLines: 1,
|
|
96
|
+
children: displayName
|
|
97
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
98
|
+
style: styles.tierRow,
|
|
99
|
+
className: "mt-space-4",
|
|
100
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_chip.Chip, {
|
|
101
|
+
size: "small",
|
|
102
|
+
variant: "soft",
|
|
103
|
+
color: isPodium ? 'primary' : 'default',
|
|
104
|
+
children: (0, _trustTier.getTrustTierLabel)(item.trustTier, t)
|
|
105
|
+
})
|
|
106
|
+
})]
|
|
107
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
108
|
+
className: "text-text font-bold text-base",
|
|
109
|
+
numberOfLines: 1,
|
|
110
|
+
children: item.total
|
|
111
|
+
})]
|
|
112
|
+
});
|
|
113
|
+
}, [oxyServices, locale, currentUserId, handleEntryPress, t]);
|
|
114
|
+
const keyExtractor = (0, _react.useCallback)((item, index) => item.user.id || `entry-${index}`, []);
|
|
115
|
+
const ItemSeparator = (0, _react.useMemo)(() => () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
116
|
+
style: styles.separator,
|
|
117
|
+
className: "border-b border-border-image"
|
|
118
|
+
}), []);
|
|
119
|
+
if (isLoading) {
|
|
120
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
121
|
+
className: "flex-1 bg-bg",
|
|
122
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
|
|
123
|
+
title: title,
|
|
124
|
+
subtitle: subtitle,
|
|
125
|
+
onBack: goBack,
|
|
126
|
+
elevation: "subtle"
|
|
127
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
128
|
+
style: styles.center,
|
|
129
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
130
|
+
size: "large",
|
|
131
|
+
color: bloomTheme.colors.primary
|
|
132
|
+
})
|
|
133
|
+
})]
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
if (error) {
|
|
137
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
138
|
+
className: "flex-1 bg-bg",
|
|
139
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
|
|
140
|
+
title: title,
|
|
141
|
+
subtitle: subtitle,
|
|
142
|
+
onBack: goBack,
|
|
143
|
+
elevation: "subtle"
|
|
144
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
145
|
+
style: styles.center,
|
|
146
|
+
className: "px-space-32 gap-space-16",
|
|
147
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
148
|
+
name: "alert-circle",
|
|
149
|
+
size: ERROR_ICON_SIZE,
|
|
150
|
+
color: bloomTheme.colors.error
|
|
151
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
152
|
+
className: "text-text-secondary text-base text-center",
|
|
153
|
+
children: error || t('trust.leaderboard.error') || 'Failed to load leaderboard'
|
|
154
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
155
|
+
variant: "primary",
|
|
156
|
+
onPress: loadLeaderboard,
|
|
157
|
+
children: t('common.retry') || 'Retry'
|
|
158
|
+
})]
|
|
159
|
+
})]
|
|
160
|
+
});
|
|
161
|
+
}
|
|
40
162
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
41
|
-
|
|
42
|
-
backgroundColor: bloomTheme.colors.background
|
|
43
|
-
}],
|
|
163
|
+
className: "flex-1 bg-bg",
|
|
44
164
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
|
|
45
|
-
title:
|
|
46
|
-
subtitle:
|
|
165
|
+
title: title,
|
|
166
|
+
subtitle: subtitle,
|
|
47
167
|
onBack: goBack,
|
|
48
168
|
elevation: "subtle"
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
71
|
-
style: [styles.row, {
|
|
72
|
-
borderColor: bloomTheme.colors.border
|
|
73
|
-
}, entry.rank <= 3 && {
|
|
74
|
-
backgroundColor: bloomTheme.colors.primarySubtle
|
|
75
|
-
}],
|
|
76
|
-
onPress: () => navigate?.('Profile', {
|
|
77
|
-
userId: entry.user.id,
|
|
78
|
-
username
|
|
79
|
-
}),
|
|
80
|
-
activeOpacity: 0.7,
|
|
81
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
82
|
-
style: [styles.rank, {
|
|
83
|
-
color: primaryColor
|
|
84
|
-
}],
|
|
85
|
-
children: entry.rank
|
|
86
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
87
|
-
name: username || 'User',
|
|
88
|
-
size: 40,
|
|
89
|
-
style: styles.avatar
|
|
90
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
91
|
-
style: styles.userColumn,
|
|
92
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
93
|
-
style: [styles.username, {
|
|
94
|
-
color: bloomTheme.colors.text
|
|
95
|
-
}],
|
|
96
|
-
numberOfLines: 1,
|
|
97
|
-
children: displayName
|
|
98
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
99
|
-
style: [styles.tier, {
|
|
100
|
-
color: bloomTheme.colors.textTertiary
|
|
101
|
-
}],
|
|
102
|
-
numberOfLines: 1,
|
|
103
|
-
children: (0, _trustTier.getTrustTierLabel)(entry.trustTier, t)
|
|
104
|
-
})]
|
|
105
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
106
|
-
style: [styles.reputation, {
|
|
107
|
-
color: primaryColor
|
|
108
|
-
}],
|
|
109
|
-
children: entry.total
|
|
110
|
-
})]
|
|
111
|
-
}, entry.user.id);
|
|
169
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
|
|
170
|
+
data: leaderboard,
|
|
171
|
+
renderItem: renderEntry,
|
|
172
|
+
keyExtractor: keyExtractor,
|
|
173
|
+
contentContainerStyle: styles.listContent,
|
|
174
|
+
className: "px-space-8 pt-space-12",
|
|
175
|
+
ItemSeparatorComponent: ItemSeparator,
|
|
176
|
+
ListEmptyComponent: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
177
|
+
style: styles.emptyContainer,
|
|
178
|
+
className: "px-space-32 gap-space-8",
|
|
179
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
180
|
+
name: "trophy-outline",
|
|
181
|
+
size: EMPTY_ICON_SIZE,
|
|
182
|
+
color: bloomTheme.colors.textSecondary
|
|
183
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.H6, {
|
|
184
|
+
className: "text-text text-center mt-space-8",
|
|
185
|
+
children: t('trust.leaderboard.empty') || 'No leaderboard data'
|
|
186
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
187
|
+
className: "text-text-secondary text-sm text-center",
|
|
188
|
+
children: t('trust.leaderboard.emptyDesc') || 'Top contributors will appear here as the community grows.'
|
|
189
|
+
})]
|
|
112
190
|
})
|
|
113
191
|
})]
|
|
114
192
|
});
|
|
115
193
|
};
|
|
194
|
+
|
|
195
|
+
// Layout-only styles: flex centering, measured rank column width, separator
|
|
196
|
+
// inset, and row flex layout. Colors, spacing, radius, and typography roles
|
|
197
|
+
// live on Bloom components + NativeWind token classes.
|
|
116
198
|
const styles = _reactNative.StyleSheet.create({
|
|
117
|
-
|
|
118
|
-
flex: 1
|
|
199
|
+
center: {
|
|
200
|
+
flex: 1,
|
|
201
|
+
justifyContent: 'center',
|
|
202
|
+
alignItems: 'center'
|
|
119
203
|
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
204
|
+
listContent: {
|
|
205
|
+
flexGrow: 1,
|
|
206
|
+
paddingBottom: 40
|
|
123
207
|
},
|
|
124
208
|
row: {
|
|
125
209
|
flexDirection: 'row',
|
|
126
|
-
alignItems: 'center'
|
|
127
|
-
paddingVertical: 12,
|
|
128
|
-
paddingHorizontal: 20,
|
|
129
|
-
borderBottomWidth: 1
|
|
210
|
+
alignItems: 'center'
|
|
130
211
|
},
|
|
131
212
|
rank: {
|
|
132
|
-
|
|
133
|
-
width: 32,
|
|
134
|
-
textAlign: 'center',
|
|
135
|
-
fontWeight: 'bold'
|
|
136
|
-
},
|
|
137
|
-
avatar: {
|
|
138
|
-
marginHorizontal: 8
|
|
213
|
+
width: 28
|
|
139
214
|
},
|
|
140
215
|
userColumn: {
|
|
141
|
-
flex: 1
|
|
142
|
-
marginLeft: 8
|
|
143
|
-
},
|
|
144
|
-
username: {
|
|
145
|
-
fontSize: 16
|
|
146
|
-
},
|
|
147
|
-
tier: {
|
|
148
|
-
fontSize: 12,
|
|
149
|
-
marginTop: 1
|
|
216
|
+
flex: 1
|
|
150
217
|
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
marginLeft: 12
|
|
218
|
+
tierRow: {
|
|
219
|
+
flexDirection: 'row',
|
|
220
|
+
alignItems: 'flex-start'
|
|
155
221
|
},
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
222
|
+
// Inset the hairline separator to align with the start of the entry's text
|
|
223
|
+
// content (rank column + avatar + screen margin + gaps).
|
|
224
|
+
separator: {
|
|
225
|
+
marginLeft: 80
|
|
160
226
|
},
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
227
|
+
emptyContainer: {
|
|
228
|
+
flex: 1,
|
|
229
|
+
justifyContent: 'center',
|
|
230
|
+
alignItems: 'center',
|
|
231
|
+
paddingTop: 80
|
|
165
232
|
}
|
|
166
233
|
});
|
|
167
234
|
var _default = exports.default = TrustLeaderboardScreen;
|