@oxyhq/services 22.13.0 → 23.0.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/README.md +1 -1
- package/lib/commonjs/index.js +74 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/deviceNotifications.js +424 -0
- package/lib/commonjs/notifications/deviceNotifications.js.map +1 -0
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +20 -64
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/components/AvatarCameraBadge.js +3 -2
- package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +5 -4
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +5 -6
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInRequestSurface.js +147 -0
- package/lib/commonjs/ui/components/OxySignInRequestSurface.js.map +1 -0
- package/lib/commonjs/ui/components/ProfileButton.js +4 -3
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/SettingsIcon.js +3 -2
- package/lib/commonjs/ui/components/SettingsIcon.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +7 -7
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js +65 -103
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js +0 -2
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/primitives.js +5 -4
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +14 -10
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/types.js +11 -0
- package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +3 -2
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +3 -2
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +15 -14
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +6 -5
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +3 -2
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +6 -6
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +5 -5
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +10 -9
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +4 -3
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +6 -5
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/components/styles/shadow.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +14 -45
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +0 -43
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +3 -4
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/userCache.js +17 -17
- package/lib/commonjs/ui/hooks/queries/userCache.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +4 -2
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useOnlineStatus.js +3 -2
- package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +0 -2
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +4 -3
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +7 -6
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +4 -3
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +3 -2
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +96 -96
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +19 -18
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +4 -29
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +4 -3
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +2 -2
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -3
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +10 -9
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +1 -0
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +12 -13
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +4 -4
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +6 -6
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +4 -3
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileListSection.js +4 -3
- package/lib/commonjs/ui/screens/fileManagement/FileListSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +5 -7
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/UploadBar.js +3 -2
- package/lib/commonjs/ui/screens/fileManagement/UploadBar.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +3 -2
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +5 -4
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +4 -3
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +24 -24
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/utils/netConnectivity.js +28 -0
- package/lib/commonjs/ui/utils/netConnectivity.js.map +1 -0
- package/lib/commonjs/ui/utils/oauthReturn.js +15 -28
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
- package/lib/module/index.js +18 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/deviceNotifications.js +414 -0
- package/lib/module/notifications/deviceNotifications.js.map +1 -0
- package/lib/module/ui/boot/runProviderColdBoot.js +21 -65
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +5 -4
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +5 -6
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInRequestSurface.js +141 -0
- package/lib/module/ui/components/OxySignInRequestSurface.js.map +1 -0
- package/lib/module/ui/components/ProfileButton.js +1 -1
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/SettingsIcon.js +1 -1
- package/lib/module/ui/components/SettingsIcon.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/module/ui/components/authChooser/SignInEntryView.js.map +1 -1
- package/lib/module/ui/components/authChooser/SignInRequestView.js +66 -104
- package/lib/module/ui/components/authChooser/SignInRequestView.js.map +1 -1
- package/lib/module/ui/components/authChooser/TroubleDisclosure.js +0 -2
- package/lib/module/ui/components/authChooser/TroubleDisclosure.js.map +1 -1
- package/lib/module/ui/components/authChooser/primitives.js +1 -1
- package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/module/ui/components/authChooser/requestSurfaces.js +13 -9
- package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -1
- package/lib/module/ui/components/authChooser/types.js +11 -0
- package/lib/module/ui/components/authChooser/types.js.map +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/module/ui/components/styles/shadow.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +16 -47
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +0 -42
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +3 -4
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/module/ui/hooks/queries/userCache.js +17 -17
- package/lib/module/ui/hooks/queries/userCache.js.map +1 -1
- package/lib/module/ui/hooks/useAssets.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +4 -2
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useOnlineStatus.js +3 -2
- package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +0 -2
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +1 -1
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +91 -90
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +2 -1
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +4 -29
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +2 -2
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +1 -0
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +4 -5
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +3 -3
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +5 -6
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileListSection.js +1 -1
- package/lib/module/ui/screens/fileManagement/FileListSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +3 -5
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/UploadBar.js +1 -1
- package/lib/module/ui/screens/fileManagement/UploadBar.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +3 -3
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +25 -25
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/utils/netConnectivity.js +23 -0
- package/lib/module/ui/utils/netConnectivity.js.map +1 -0
- package/lib/module/ui/utils/oauthReturn.js +15 -27
- package/lib/module/ui/utils/oauthReturn.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +5 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +173 -0
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +11 -30
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +5 -3
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts +108 -0
- package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts +18 -18
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts +3 -10
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +8 -4
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +18 -0
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts +6 -6
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +0 -40
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +4 -7
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +0 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +4 -2
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +3 -2
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.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/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +20 -19
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts +17 -0
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +15 -12
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +5 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/notifications/deviceNotifications.d.ts +173 -0
- package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -0
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +11 -30
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +5 -3
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts +108 -0
- package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SettingsIcon.d.ts +1 -1
- package/lib/typescript/module/ui/components/SettingsIcon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts +18 -18
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts +3 -10
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +8 -4
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/types.d.ts +18 -0
- package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/types.d.ts +6 -6
- package/lib/typescript/module/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +0 -40
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +4 -7
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +0 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/userCache.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/queries/userCache.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +4 -2
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +3 -2
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.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/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +20 -19
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts +17 -0
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts +15 -12
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/package.json +18 -8
- package/src/index.ts +32 -0
- package/src/notifications/deviceNotifications.ts +458 -0
- package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +215 -0
- package/src/ui/boot/runProviderColdBoot.ts +24 -101
- package/src/ui/components/AvatarCameraBadge.tsx +1 -1
- package/src/ui/components/OxyAuthChooser.tsx +5 -4
- package/src/ui/components/OxyProvider.tsx +5 -6
- package/src/ui/components/OxySignInRequestSurface.tsx +202 -0
- package/src/ui/components/ProfileButton.tsx +1 -1
- package/src/ui/components/SettingsIcon.tsx +1 -1
- package/src/ui/components/authChooser/AccountsMenuView.tsx +1 -1
- package/src/ui/components/authChooser/SignInEntryView.tsx +9 -3
- package/src/ui/components/authChooser/SignInRequestView.tsx +78 -111
- package/src/ui/components/authChooser/TroubleDisclosure.tsx +3 -11
- package/src/ui/components/authChooser/primitives.tsx +1 -1
- package/src/ui/components/authChooser/requestSurfaces.tsx +15 -11
- package/src/ui/components/authChooser/types.ts +19 -0
- package/src/ui/components/fileManagement/AnimatedButton.tsx +1 -1
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +1 -1
- package/src/ui/components/fileManagement/FileViewer.tsx +1 -1
- package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
- package/src/ui/components/modals/DeleteAccountModal.tsx +1 -1
- package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
- package/src/ui/components/payment/PaymentMethodStep.tsx +1 -1
- package/src/ui/components/payment/PaymentReviewStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSuccessStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSummaryStep.tsx +1 -1
- package/src/ui/components/payment/types.ts +24 -24
- package/src/ui/components/styles/shadow.tsx +2 -2
- package/src/ui/context/OxyContext.tsx +15 -46
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +0 -89
- package/src/ui/context/commitSessionFlow.ts +0 -61
- package/src/ui/context/oxyContextTypes.ts +4 -7
- package/src/ui/context/useOxyAccountGraph.ts +4 -4
- package/src/ui/hooks/queries/userCache.ts +169 -148
- package/src/ui/hooks/useAssets.ts +1 -1
- package/src/ui/hooks/useAsyncAction.ts +2 -2
- package/src/ui/hooks/useAuth.ts +4 -2
- package/src/ui/hooks/useOnlineStatus.ts +3 -2
- package/src/ui/hooks/useSessionManagement.ts +0 -2
- package/src/ui/screens/AccountMembersScreen.tsx +1 -1
- package/src/ui/screens/ConnectedAppsScreen.tsx +1 -1
- package/src/ui/screens/CreateAccountScreen.tsx +1 -1
- package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
- package/src/ui/screens/FAQScreen.tsx +1 -1
- package/src/ui/screens/FeedbackScreen.tsx +740 -574
- package/src/ui/screens/FileManagementScreen.tsx +2 -1
- package/src/ui/screens/HistoryViewScreen.tsx +4 -19
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
- package/src/ui/screens/ManageAccountScreen.tsx +1 -1
- package/src/ui/screens/PaymentGatewayScreen.tsx +1 -1
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +2 -2
- package/src/ui/screens/PrivacySettingsScreen.tsx +1 -0
- package/src/ui/screens/ProfileScreen.tsx +6 -4
- package/src/ui/screens/UserListScreen.tsx +3 -3
- package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
- package/src/ui/screens/fileManagement/FileLibraryError.tsx +1 -1
- package/src/ui/screens/fileManagement/FileListSection.tsx +1 -1
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +3 -2
- package/src/ui/screens/fileManagement/UploadBar.tsx +1 -1
- package/src/ui/screens/trust/TrustCenterScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +4 -3
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
- package/src/ui/types/navigation.ts +20 -19
- package/src/ui/utils/fileManagement.ts +108 -92
- package/src/ui/utils/netConnectivity.ts +27 -0
- package/src/ui/utils/oauthReturn.ts +15 -30
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +0 -48
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/commonjs/ui/utils/crossOriginRestore.js +0 -140
- package/lib/commonjs/ui/utils/crossOriginRestore.js.map +0 -1
- package/lib/module/ui/oauth/legacyRedirectLanes.js +0 -44
- package/lib/module/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/module/ui/utils/crossOriginRestore.js +0 -131
- package/lib/module/ui/utils/crossOriginRestore.js.map +0 -1
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +0 -43
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +0 -1
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +0 -43
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +0 -1
- package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +0 -281
- package/src/ui/oauth/legacyRedirectLanes.ts +0 -43
- package/src/ui/utils/__tests__/crossOriginRestore.test.ts +0 -160
- package/src/ui/utils/crossOriginRestore.ts +0 -168
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import Ionicons from "@expo/vector-icons/Ionicons";
|
|
2
|
+
import type MaterialCommunityIcons from "@expo/vector-icons/MaterialCommunityIcons";
|
|
3
|
+
import { toast } from "@oxyhq/bloom";
|
|
4
|
+
import { Button } from "@oxyhq/bloom/button";
|
|
3
5
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
import type { FeedbackData } from
|
|
6
|
+
SettingsListGroup,
|
|
7
|
+
SettingsListItem,
|
|
8
|
+
} from "@oxyhq/bloom/settings-list";
|
|
9
|
+
import { Switch } from "@oxyhq/bloom/switch";
|
|
10
|
+
import { TextField, TextFieldInput } from "@oxyhq/bloom/text-field";
|
|
11
|
+
import { useTheme } from "@oxyhq/bloom/theme";
|
|
12
|
+
import { H2, Text } from "@oxyhq/bloom/typography";
|
|
13
|
+
import { normalizeTheme } from "@oxyhq/core";
|
|
14
|
+
import { packageInfo } from "@oxyhq/core";
|
|
15
|
+
import type React from "react";
|
|
16
|
+
import { useCallback, useMemo, useRef, useState } from "react";
|
|
17
|
+
import { Animated, Platform, StyleSheet, View } from "react-native";
|
|
18
|
+
import { SettingsIcon } from "../components/SettingsIcon";
|
|
19
|
+
import { useOxy } from "../context/OxyContext";
|
|
20
|
+
import { useI18n } from "../hooks/useI18n";
|
|
21
|
+
import { useSurfaceHeader } from "../hooks/useSurfaceHeader";
|
|
22
|
+
import type { BaseScreenProps } from "../types/navigation";
|
|
23
|
+
|
|
24
|
+
import {
|
|
25
|
+
CATEGORIES,
|
|
26
|
+
FEEDBACK_TYPES,
|
|
27
|
+
PRIORITY_LEVELS,
|
|
28
|
+
} from "../components/feedback/constants";
|
|
29
|
+
import type { FeedbackData } from "../components/feedback/types";
|
|
30
|
+
import { useFeedbackForm } from "../components/feedback/useFeedbackForm";
|
|
28
31
|
|
|
29
32
|
/** Step transition timing — measured animation, not a design token. */
|
|
30
33
|
const STEP_FADE_OUT_MS = 250;
|
|
@@ -36,564 +39,727 @@ const LAST_STEP_INDEX = TOTAL_STEPS - 1;
|
|
|
36
39
|
const SUCCESS_RESET_DELAY_MS = 3000;
|
|
37
40
|
|
|
38
41
|
/** Maps each feedback type to a Bloom theme role + MaterialCommunityIcons glyph. */
|
|
39
|
-
const TYPE_ICON_GLYPH: Record<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
const TYPE_ICON_GLYPH: Record<
|
|
43
|
+
FeedbackData["type"],
|
|
44
|
+
React.ComponentProps<typeof MaterialCommunityIcons>["name"]
|
|
45
|
+
> = {
|
|
46
|
+
bug: "bug",
|
|
47
|
+
feature: "lightbulb-on",
|
|
48
|
+
general: "chat",
|
|
49
|
+
support: "help-circle",
|
|
44
50
|
};
|
|
45
51
|
|
|
46
52
|
/** Maps each priority level to a MaterialCommunityIcons glyph. */
|
|
47
|
-
const PRIORITY_ICON_GLYPH: Record<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
const PRIORITY_ICON_GLYPH: Record<
|
|
54
|
+
FeedbackData["priority"],
|
|
55
|
+
React.ComponentProps<typeof MaterialCommunityIcons>["name"]
|
|
56
|
+
> = {
|
|
57
|
+
low: "arrow-down",
|
|
58
|
+
medium: "minus",
|
|
59
|
+
high: "arrow-up",
|
|
60
|
+
critical: "alert",
|
|
52
61
|
};
|
|
53
62
|
|
|
54
63
|
const FeedbackScreen: React.FC<BaseScreenProps> = ({
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
64
|
+
goBack,
|
|
65
|
+
onClose,
|
|
66
|
+
theme,
|
|
58
67
|
}) => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
68
|
+
const { user, oxyServices } = useOxy();
|
|
69
|
+
const normalizedTheme = normalizeTheme(theme);
|
|
70
|
+
const bloomTheme = useTheme();
|
|
71
|
+
const colors = bloomTheme.colors;
|
|
72
|
+
const { t } = useI18n();
|
|
73
|
+
|
|
74
|
+
useSurfaceHeader({ title: t("feedback.title") || "Feedback" });
|
|
75
|
+
|
|
76
|
+
const {
|
|
77
|
+
feedbackData,
|
|
78
|
+
feedbackState,
|
|
79
|
+
setFeedbackState,
|
|
80
|
+
updateField,
|
|
81
|
+
resetForm,
|
|
82
|
+
} = useFeedbackForm();
|
|
83
|
+
|
|
84
|
+
const [currentStep, setCurrentStep] = useState(0);
|
|
85
|
+
const [, setErrorMessage] = useState("");
|
|
86
|
+
|
|
87
|
+
const fadeAnim = useRef(new Animated.Value(1)).current;
|
|
88
|
+
const slideAnim = useRef(new Animated.Value(0)).current;
|
|
89
|
+
|
|
90
|
+
/** Theme-role color for each feedback type pill. */
|
|
91
|
+
const typeColor = useCallback(
|
|
92
|
+
(id: FeedbackData["type"]): string => {
|
|
93
|
+
switch (id) {
|
|
94
|
+
case "bug":
|
|
95
|
+
return colors.negative;
|
|
96
|
+
case "feature":
|
|
97
|
+
return colors.info;
|
|
98
|
+
case "general":
|
|
99
|
+
return colors.success;
|
|
100
|
+
case "support":
|
|
101
|
+
return colors.warning;
|
|
102
|
+
default:
|
|
103
|
+
return colors.primary;
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
[colors],
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
/** Theme-role color for each priority level. */
|
|
110
|
+
const priorityColor = useCallback(
|
|
111
|
+
(id: FeedbackData["priority"]): string => {
|
|
112
|
+
switch (id) {
|
|
113
|
+
case "low":
|
|
114
|
+
return colors.success;
|
|
115
|
+
case "medium":
|
|
116
|
+
return colors.warning;
|
|
117
|
+
case "high":
|
|
118
|
+
return colors.negative;
|
|
119
|
+
case "critical":
|
|
120
|
+
return colors.negative;
|
|
121
|
+
default:
|
|
122
|
+
return colors.primary;
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
[colors],
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
const animateTransition = useCallback(
|
|
129
|
+
(nextStep: number) => {
|
|
130
|
+
Animated.timing(fadeAnim, {
|
|
131
|
+
toValue: 0,
|
|
132
|
+
duration: STEP_FADE_OUT_MS,
|
|
133
|
+
useNativeDriver: Platform.OS !== "web",
|
|
134
|
+
}).start(() => {
|
|
135
|
+
setCurrentStep(nextStep);
|
|
136
|
+
slideAnim.setValue(STEP_SLIDE_FROM);
|
|
137
|
+
|
|
138
|
+
Animated.parallel([
|
|
139
|
+
Animated.timing(fadeAnim, {
|
|
140
|
+
toValue: 1,
|
|
141
|
+
duration: STEP_FADE_IN_MS,
|
|
142
|
+
useNativeDriver: Platform.OS !== "web",
|
|
143
|
+
}),
|
|
144
|
+
Animated.timing(slideAnim, {
|
|
145
|
+
toValue: 0,
|
|
146
|
+
duration: STEP_SLIDE_IN_MS,
|
|
147
|
+
useNativeDriver: Platform.OS !== "web",
|
|
148
|
+
}),
|
|
149
|
+
]).start();
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
[fadeAnim, slideAnim],
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
const nextStep = useCallback(() => {
|
|
156
|
+
if (currentStep < LAST_STEP_INDEX) {
|
|
157
|
+
animateTransition(currentStep + 1);
|
|
158
|
+
}
|
|
159
|
+
}, [currentStep, animateTransition]);
|
|
160
|
+
|
|
161
|
+
const prevStep = useCallback(() => {
|
|
162
|
+
if (currentStep > 0) {
|
|
163
|
+
animateTransition(currentStep - 1);
|
|
164
|
+
}
|
|
165
|
+
}, [currentStep, animateTransition]);
|
|
166
|
+
|
|
167
|
+
const isTypeStepValid = useCallback(() => {
|
|
168
|
+
return Boolean(feedbackData.type && feedbackData.category);
|
|
169
|
+
}, [feedbackData.type, feedbackData.category]);
|
|
170
|
+
|
|
171
|
+
const isDetailsStepValid = useCallback(() => {
|
|
172
|
+
return Boolean(
|
|
173
|
+
feedbackData.title.trim() && feedbackData.description.trim(),
|
|
174
|
+
);
|
|
175
|
+
}, [feedbackData.title, feedbackData.description]);
|
|
176
|
+
|
|
177
|
+
const isContactStepValid = useCallback(() => {
|
|
178
|
+
return Boolean(feedbackData.contactEmail.trim() || user?.email);
|
|
179
|
+
}, [feedbackData.contactEmail, user?.email]);
|
|
180
|
+
|
|
181
|
+
const handleSubmitFeedback = useCallback(async () => {
|
|
182
|
+
if (!isTypeStepValid() || !isDetailsStepValid() || !isContactStepValid()) {
|
|
183
|
+
toast.error(
|
|
184
|
+
t("feedback.toasts.fillRequired") ||
|
|
185
|
+
"Please fill in all required fields",
|
|
186
|
+
);
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
try {
|
|
191
|
+
setFeedbackState({ status: "submitting", message: "" });
|
|
192
|
+
setErrorMessage("");
|
|
193
|
+
|
|
194
|
+
const feedbackPayload = {
|
|
195
|
+
type: feedbackData.type,
|
|
196
|
+
title: feedbackData.title,
|
|
197
|
+
description: feedbackData.description,
|
|
198
|
+
priority: feedbackData.priority,
|
|
199
|
+
category: feedbackData.category,
|
|
200
|
+
contactEmail: feedbackData.contactEmail || user?.email,
|
|
201
|
+
systemInfo: feedbackData.systemInfo
|
|
202
|
+
? {
|
|
203
|
+
platform: Platform.OS,
|
|
204
|
+
version: Platform.Version?.toString() || "Unknown",
|
|
205
|
+
appVersion: packageInfo.version,
|
|
206
|
+
userId: user?.id,
|
|
207
|
+
username: user?.username,
|
|
208
|
+
timestamp: new Date().toISOString(),
|
|
209
|
+
}
|
|
210
|
+
: undefined,
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
await oxyServices.submitFeedback(feedbackPayload);
|
|
214
|
+
|
|
215
|
+
setFeedbackState({
|
|
216
|
+
status: "success",
|
|
217
|
+
message:
|
|
218
|
+
t("feedback.toasts.submitSuccess") ||
|
|
219
|
+
"Feedback submitted successfully!",
|
|
220
|
+
});
|
|
221
|
+
toast.success(
|
|
222
|
+
t("feedback.toasts.thanks") || "Thank you for your feedback!",
|
|
223
|
+
);
|
|
224
|
+
|
|
225
|
+
setTimeout(() => {
|
|
226
|
+
resetForm();
|
|
227
|
+
setCurrentStep(0);
|
|
228
|
+
}, SUCCESS_RESET_DELAY_MS);
|
|
229
|
+
} catch (error: unknown) {
|
|
230
|
+
const message =
|
|
231
|
+
(error instanceof Error ? error.message : null) ||
|
|
232
|
+
t("feedback.toasts.submitFailed") ||
|
|
233
|
+
"Failed to submit feedback";
|
|
234
|
+
setFeedbackState({ status: "error", message });
|
|
235
|
+
toast.error(message);
|
|
236
|
+
}
|
|
237
|
+
}, [
|
|
238
|
+
feedbackData,
|
|
239
|
+
user,
|
|
240
|
+
oxyServices,
|
|
241
|
+
isTypeStepValid,
|
|
242
|
+
isDetailsStepValid,
|
|
243
|
+
isContactStepValid,
|
|
244
|
+
resetForm,
|
|
245
|
+
setFeedbackState,
|
|
246
|
+
t,
|
|
247
|
+
]);
|
|
248
|
+
|
|
249
|
+
const feedbackTypeData = useMemo(
|
|
250
|
+
() =>
|
|
251
|
+
FEEDBACK_TYPES.map((type) => ({
|
|
252
|
+
...type,
|
|
253
|
+
isSelected: feedbackData.type === type.id,
|
|
254
|
+
})),
|
|
255
|
+
[feedbackData.type],
|
|
256
|
+
);
|
|
257
|
+
|
|
258
|
+
const categoryData = useMemo(
|
|
259
|
+
() =>
|
|
260
|
+
feedbackData.type
|
|
261
|
+
? (CATEGORIES[feedbackData.type] || []).map((cat) => ({
|
|
262
|
+
name: cat,
|
|
263
|
+
isSelected: feedbackData.category === cat,
|
|
264
|
+
}))
|
|
265
|
+
: [],
|
|
266
|
+
[feedbackData.type, feedbackData.category],
|
|
267
|
+
);
|
|
268
|
+
|
|
269
|
+
const priorityData = useMemo(
|
|
270
|
+
() =>
|
|
271
|
+
PRIORITY_LEVELS.map((p) => ({
|
|
272
|
+
...p,
|
|
273
|
+
isSelected: feedbackData.priority === p.id,
|
|
274
|
+
})),
|
|
275
|
+
[feedbackData.priority],
|
|
276
|
+
);
|
|
277
|
+
|
|
278
|
+
const renderProgress = () => (
|
|
279
|
+
<View
|
|
280
|
+
className="flex-row justify-center gap-space-8 pt-space-8 pb-space-16"
|
|
281
|
+
accessibilityRole="progressbar"
|
|
282
|
+
accessibilityLabel={`Step ${currentStep + 1} of ${TOTAL_STEPS}`}
|
|
283
|
+
>
|
|
284
|
+
{Array.from({ length: TOTAL_STEPS }, (_, index) => (
|
|
285
|
+
<View
|
|
286
|
+
key={index}
|
|
287
|
+
className={
|
|
288
|
+
currentStep === index
|
|
289
|
+
? "h-space-8 rounded-radius-max bg-fill-brand"
|
|
290
|
+
: "h-space-8 rounded-radius-max bg-fill-secondary"
|
|
291
|
+
}
|
|
292
|
+
style={
|
|
293
|
+
currentStep === index
|
|
294
|
+
? styles.progressDotActive
|
|
295
|
+
: styles.progressDot
|
|
296
|
+
}
|
|
297
|
+
/>
|
|
298
|
+
))}
|
|
299
|
+
</View>
|
|
300
|
+
);
|
|
301
|
+
|
|
302
|
+
const renderStepHeader = (title: string, subtitle: string) => (
|
|
303
|
+
<View className="w-full gap-space-8 mb-space-24">
|
|
304
|
+
<H2 className="text-headerBold font-headerBold text-text">{title}</H2>
|
|
305
|
+
<Text className="text-body font-body text-text-secondary">
|
|
306
|
+
{subtitle}
|
|
307
|
+
</Text>
|
|
308
|
+
</View>
|
|
309
|
+
);
|
|
310
|
+
|
|
311
|
+
const renderTypeStep = () => (
|
|
312
|
+
<Animated.View
|
|
313
|
+
style={[
|
|
314
|
+
styles.stepContainer,
|
|
315
|
+
{ opacity: fadeAnim, transform: [{ translateX: slideAnim }] },
|
|
316
|
+
]}
|
|
317
|
+
>
|
|
318
|
+
{renderStepHeader(
|
|
319
|
+
t("feedback.type.title") || "What type of feedback?",
|
|
320
|
+
t("feedback.type.subtitle") ||
|
|
321
|
+
"Choose the category that best describes your feedback",
|
|
322
|
+
)}
|
|
323
|
+
|
|
324
|
+
<View className="w-full">
|
|
325
|
+
<SettingsListGroup>
|
|
326
|
+
{feedbackTypeData.map((type) => (
|
|
327
|
+
<SettingsListItem
|
|
328
|
+
key={type.id}
|
|
329
|
+
icon={
|
|
330
|
+
<SettingsIcon
|
|
331
|
+
name={TYPE_ICON_GLYPH[type.id]}
|
|
332
|
+
color={typeColor(type.id)}
|
|
333
|
+
/>
|
|
334
|
+
}
|
|
335
|
+
title={type.label}
|
|
336
|
+
description={type.description}
|
|
337
|
+
onPress={() => {
|
|
338
|
+
updateField("type", type.id);
|
|
339
|
+
updateField("category", "");
|
|
340
|
+
}}
|
|
341
|
+
showChevron={false}
|
|
342
|
+
/>
|
|
343
|
+
))}
|
|
344
|
+
</SettingsListGroup>
|
|
345
|
+
</View>
|
|
346
|
+
|
|
347
|
+
{feedbackData.type ? (
|
|
348
|
+
<View className="w-full mt-space-24">
|
|
349
|
+
<Text className="text-caption font-caption text-text-secondary mb-space-8">
|
|
350
|
+
{t("feedback.category.label") || "Category"}
|
|
351
|
+
</Text>
|
|
352
|
+
<View className="w-full">
|
|
353
|
+
<SettingsListGroup>
|
|
354
|
+
{categoryData.map((cat) => (
|
|
355
|
+
<SettingsListItem
|
|
356
|
+
key={cat.name}
|
|
357
|
+
icon={
|
|
358
|
+
<SettingsIcon
|
|
359
|
+
name={cat.isSelected ? "check-circle" : "circle-outline"}
|
|
360
|
+
color={
|
|
361
|
+
cat.isSelected ? colors.primary : colors.textSecondary
|
|
362
|
+
}
|
|
363
|
+
/>
|
|
364
|
+
}
|
|
365
|
+
title={cat.name}
|
|
366
|
+
onPress={() => updateField("category", cat.name)}
|
|
367
|
+
showChevron={false}
|
|
368
|
+
/>
|
|
369
|
+
))}
|
|
370
|
+
</SettingsListGroup>
|
|
371
|
+
</View>
|
|
372
|
+
</View>
|
|
373
|
+
) : null}
|
|
374
|
+
|
|
375
|
+
<View className="flex-row gap-space-8 mt-space-24 w-full">
|
|
376
|
+
<Button
|
|
377
|
+
variant="secondary"
|
|
378
|
+
onPress={goBack}
|
|
379
|
+
accessibilityLabel="Go back"
|
|
380
|
+
icon={<Ionicons name="arrow-back" size={16} color={colors.text} />}
|
|
381
|
+
style={styles.navButton}
|
|
382
|
+
>
|
|
383
|
+
{t("common.actions.back") || "Back"}
|
|
384
|
+
</Button>
|
|
385
|
+
|
|
386
|
+
<Button
|
|
387
|
+
variant="primary"
|
|
388
|
+
onPress={nextStep}
|
|
389
|
+
disabled={!isTypeStepValid()}
|
|
390
|
+
accessibilityLabel="Continue to next step"
|
|
391
|
+
iconPosition="right"
|
|
392
|
+
icon={
|
|
393
|
+
<Ionicons
|
|
394
|
+
name="arrow-forward"
|
|
395
|
+
size={16}
|
|
396
|
+
color={colors.primaryForeground}
|
|
397
|
+
/>
|
|
398
|
+
}
|
|
399
|
+
style={styles.navButton}
|
|
400
|
+
>
|
|
401
|
+
{t("common.actions.next") || "Next"}
|
|
402
|
+
</Button>
|
|
403
|
+
</View>
|
|
404
|
+
</Animated.View>
|
|
405
|
+
);
|
|
406
|
+
|
|
407
|
+
const renderDetailsStep = () => (
|
|
408
|
+
<Animated.View
|
|
409
|
+
style={[
|
|
410
|
+
styles.stepContainer,
|
|
411
|
+
{ opacity: fadeAnim, transform: [{ translateX: slideAnim }] },
|
|
412
|
+
]}
|
|
413
|
+
>
|
|
414
|
+
{renderStepHeader(
|
|
415
|
+
t("feedback.details.title") || "Tell us more",
|
|
416
|
+
t("feedback.details.subtitle") || "Provide details about your feedback",
|
|
417
|
+
)}
|
|
418
|
+
|
|
419
|
+
<View className="w-full gap-space-16">
|
|
420
|
+
<TextField>
|
|
421
|
+
<TextFieldInput
|
|
422
|
+
floatingLabel
|
|
423
|
+
label={t("feedback.fields.title.label") || "Title"}
|
|
424
|
+
value={feedbackData.title}
|
|
425
|
+
onChangeText={(text) => {
|
|
426
|
+
updateField("title", text);
|
|
427
|
+
setErrorMessage("");
|
|
428
|
+
}}
|
|
429
|
+
placeholder={
|
|
430
|
+
t("feedback.fields.title.placeholder") ||
|
|
431
|
+
"Brief summary of your feedback"
|
|
432
|
+
}
|
|
433
|
+
testID="feedback-title-input"
|
|
434
|
+
accessibilityLabel="Feedback title"
|
|
435
|
+
accessibilityHint="Enter a brief summary of your feedback"
|
|
436
|
+
/>
|
|
437
|
+
</TextField>
|
|
438
|
+
|
|
439
|
+
<TextField>
|
|
440
|
+
<TextFieldInput
|
|
441
|
+
floatingLabel
|
|
442
|
+
multiline
|
|
443
|
+
numberOfLines={6}
|
|
444
|
+
label={t("feedback.fields.description.label") || "Description"}
|
|
445
|
+
value={feedbackData.description}
|
|
446
|
+
onChangeText={(text) => {
|
|
447
|
+
updateField("description", text);
|
|
448
|
+
setErrorMessage("");
|
|
449
|
+
}}
|
|
450
|
+
placeholder={
|
|
451
|
+
t("feedback.fields.description.placeholder") ||
|
|
452
|
+
"Please provide detailed information..."
|
|
453
|
+
}
|
|
454
|
+
testID="feedback-description-input"
|
|
455
|
+
accessibilityLabel="Feedback description"
|
|
456
|
+
accessibilityHint="Provide detailed information about your feedback"
|
|
457
|
+
/>
|
|
458
|
+
</TextField>
|
|
459
|
+
</View>
|
|
460
|
+
|
|
461
|
+
<View className="w-full mt-space-24">
|
|
462
|
+
<Text className="text-caption font-caption text-text-secondary mb-space-8">
|
|
463
|
+
{t("feedback.priority.label") || "Priority Level"}
|
|
464
|
+
</Text>
|
|
465
|
+
<View className="w-full">
|
|
466
|
+
<SettingsListGroup>
|
|
467
|
+
{priorityData.map((p) => (
|
|
468
|
+
<SettingsListItem
|
|
469
|
+
key={p.id}
|
|
470
|
+
icon={
|
|
471
|
+
<SettingsIcon
|
|
472
|
+
name={PRIORITY_ICON_GLYPH[p.id]}
|
|
473
|
+
color={priorityColor(p.id)}
|
|
474
|
+
/>
|
|
475
|
+
}
|
|
476
|
+
title={p.label}
|
|
477
|
+
onPress={() => updateField("priority", p.id)}
|
|
478
|
+
showChevron={false}
|
|
479
|
+
/>
|
|
480
|
+
))}
|
|
481
|
+
</SettingsListGroup>
|
|
482
|
+
</View>
|
|
483
|
+
</View>
|
|
484
|
+
|
|
485
|
+
<View className="flex-row gap-space-8 mt-space-24 w-full">
|
|
486
|
+
<Button
|
|
487
|
+
variant="secondary"
|
|
488
|
+
onPress={prevStep}
|
|
489
|
+
accessibilityLabel="Go back"
|
|
490
|
+
icon={<Ionicons name="arrow-back" size={16} color={colors.text} />}
|
|
491
|
+
style={styles.navButton}
|
|
492
|
+
>
|
|
493
|
+
{t("common.actions.back") || "Back"}
|
|
494
|
+
</Button>
|
|
495
|
+
|
|
496
|
+
<Button
|
|
497
|
+
variant="primary"
|
|
498
|
+
onPress={nextStep}
|
|
499
|
+
disabled={!isDetailsStepValid()}
|
|
500
|
+
accessibilityLabel="Continue to next step"
|
|
501
|
+
iconPosition="right"
|
|
502
|
+
icon={
|
|
503
|
+
<Ionicons
|
|
504
|
+
name="arrow-forward"
|
|
505
|
+
size={16}
|
|
506
|
+
color={colors.primaryForeground}
|
|
507
|
+
/>
|
|
508
|
+
}
|
|
509
|
+
style={styles.navButton}
|
|
510
|
+
>
|
|
511
|
+
{t("common.actions.next") || "Next"}
|
|
512
|
+
</Button>
|
|
513
|
+
</View>
|
|
514
|
+
</Animated.View>
|
|
515
|
+
);
|
|
516
|
+
|
|
517
|
+
const renderContactStep = () => (
|
|
518
|
+
<Animated.View
|
|
519
|
+
style={[
|
|
520
|
+
styles.stepContainer,
|
|
521
|
+
{ opacity: fadeAnim, transform: [{ translateX: slideAnim }] },
|
|
522
|
+
]}
|
|
523
|
+
>
|
|
524
|
+
{renderStepHeader(
|
|
525
|
+
t("feedback.contact.title") || "Contact Information",
|
|
526
|
+
t("feedback.contact.subtitle") || "Help us get back to you",
|
|
527
|
+
)}
|
|
528
|
+
|
|
529
|
+
<View className="w-full">
|
|
530
|
+
<TextField>
|
|
531
|
+
<TextFieldInput
|
|
532
|
+
floatingLabel
|
|
533
|
+
label={t("feedback.fields.email.label") || "Email Address"}
|
|
534
|
+
value={feedbackData.contactEmail}
|
|
535
|
+
onChangeText={(text) => {
|
|
536
|
+
updateField("contactEmail", text);
|
|
537
|
+
setErrorMessage("");
|
|
538
|
+
}}
|
|
539
|
+
placeholder={
|
|
540
|
+
user?.email ||
|
|
541
|
+
t("feedback.fields.email.placeholder") ||
|
|
542
|
+
"Enter your email address"
|
|
543
|
+
}
|
|
544
|
+
keyboardType="email-address"
|
|
545
|
+
autoCapitalize="none"
|
|
546
|
+
autoCorrect={false}
|
|
547
|
+
testID="feedback-email-input"
|
|
548
|
+
accessibilityLabel="Email address"
|
|
549
|
+
accessibilityHint="Enter your email so we can respond"
|
|
550
|
+
/>
|
|
551
|
+
</TextField>
|
|
552
|
+
</View>
|
|
553
|
+
|
|
554
|
+
<View className="w-full mt-space-16">
|
|
555
|
+
<SettingsListGroup>
|
|
556
|
+
<SettingsListItem
|
|
557
|
+
icon={<SettingsIcon name="information" color={colors.info} />}
|
|
558
|
+
title={
|
|
559
|
+
t("feedback.contact.includeSystemInfo") ||
|
|
560
|
+
"Include system information to help us better understand your issue"
|
|
561
|
+
}
|
|
562
|
+
rightElement={
|
|
563
|
+
<Switch
|
|
564
|
+
value={feedbackData.systemInfo}
|
|
565
|
+
onValueChange={(value) => updateField("systemInfo", value)}
|
|
566
|
+
testID="feedback-system-info-switch"
|
|
567
|
+
/>
|
|
568
|
+
}
|
|
569
|
+
showChevron={false}
|
|
570
|
+
/>
|
|
571
|
+
</SettingsListGroup>
|
|
572
|
+
</View>
|
|
573
|
+
|
|
574
|
+
<View className="flex-row gap-space-8 mt-space-24 w-full">
|
|
575
|
+
<Button
|
|
576
|
+
variant="secondary"
|
|
577
|
+
onPress={prevStep}
|
|
578
|
+
accessibilityLabel="Go back"
|
|
579
|
+
icon={<Ionicons name="arrow-back" size={16} color={colors.text} />}
|
|
580
|
+
style={styles.navButton}
|
|
581
|
+
>
|
|
582
|
+
{t("common.actions.back") || "Back"}
|
|
583
|
+
</Button>
|
|
584
|
+
|
|
585
|
+
<Button
|
|
586
|
+
variant="primary"
|
|
587
|
+
onPress={nextStep}
|
|
588
|
+
disabled={!isContactStepValid()}
|
|
589
|
+
accessibilityLabel="Continue to summary"
|
|
590
|
+
iconPosition="right"
|
|
591
|
+
icon={
|
|
592
|
+
<Ionicons
|
|
593
|
+
name="arrow-forward"
|
|
594
|
+
size={16}
|
|
595
|
+
color={colors.primaryForeground}
|
|
596
|
+
/>
|
|
597
|
+
}
|
|
598
|
+
style={styles.navButton}
|
|
599
|
+
>
|
|
600
|
+
{t("common.actions.next") || "Next"}
|
|
601
|
+
</Button>
|
|
602
|
+
</View>
|
|
603
|
+
</Animated.View>
|
|
604
|
+
);
|
|
605
|
+
|
|
606
|
+
const renderSummaryRow = (label: string, value: string | undefined) => (
|
|
607
|
+
<View className="flex-row gap-space-12">
|
|
608
|
+
<Text
|
|
609
|
+
className="text-body font-body text-text-secondary"
|
|
610
|
+
style={styles.summaryLabel}
|
|
611
|
+
>
|
|
612
|
+
{label}
|
|
613
|
+
</Text>
|
|
614
|
+
<Text className="text-body font-body text-text flex-1">{value}</Text>
|
|
615
|
+
</View>
|
|
616
|
+
);
|
|
617
|
+
|
|
618
|
+
const renderSummaryStep = () => (
|
|
619
|
+
<Animated.View
|
|
620
|
+
style={[
|
|
621
|
+
styles.stepContainer,
|
|
622
|
+
{ opacity: fadeAnim, transform: [{ translateX: slideAnim }] },
|
|
623
|
+
]}
|
|
624
|
+
>
|
|
625
|
+
{renderStepHeader(
|
|
626
|
+
t("feedback.summary.title") || "Summary",
|
|
627
|
+
t("feedback.summary.subtitle") ||
|
|
628
|
+
"Please review your feedback before submitting",
|
|
629
|
+
)}
|
|
630
|
+
|
|
631
|
+
<View className="w-full gap-space-12 p-space-16 rounded-radius-20 bg-fill mb-space-24">
|
|
632
|
+
{renderSummaryRow(
|
|
633
|
+
t("feedback.summary.type") || "Type:",
|
|
634
|
+
FEEDBACK_TYPES.find((ft) => ft.id === feedbackData.type)?.label,
|
|
635
|
+
)}
|
|
636
|
+
{renderSummaryRow(
|
|
637
|
+
t("feedback.summary.category") || "Category:",
|
|
638
|
+
feedbackData.category,
|
|
639
|
+
)}
|
|
640
|
+
{renderSummaryRow(
|
|
641
|
+
t("feedback.summary.priority") || "Priority:",
|
|
642
|
+
PRIORITY_LEVELS.find((p) => p.id === feedbackData.priority)?.label,
|
|
643
|
+
)}
|
|
644
|
+
{renderSummaryRow(
|
|
645
|
+
t("feedback.summary.titleField") || "Title:",
|
|
646
|
+
feedbackData.title,
|
|
647
|
+
)}
|
|
648
|
+
{renderSummaryRow(
|
|
649
|
+
t("feedback.summary.contact") || "Contact:",
|
|
650
|
+
feedbackData.contactEmail || user?.email,
|
|
651
|
+
)}
|
|
652
|
+
</View>
|
|
653
|
+
|
|
654
|
+
<Button
|
|
655
|
+
variant="primary"
|
|
656
|
+
onPress={handleSubmitFeedback}
|
|
657
|
+
disabled={feedbackState.status === "submitting"}
|
|
658
|
+
loading={feedbackState.status === "submitting"}
|
|
659
|
+
testID="submit-feedback-button"
|
|
660
|
+
accessibilityLabel="Submit feedback"
|
|
661
|
+
iconPosition="right"
|
|
662
|
+
icon={
|
|
663
|
+
<Ionicons name="send" size={18} color={colors.primaryForeground} />
|
|
664
|
+
}
|
|
665
|
+
style={styles.fullWidthButton}
|
|
666
|
+
>
|
|
667
|
+
{t("feedback.actions.submit") || "Submit Feedback"}
|
|
668
|
+
</Button>
|
|
669
|
+
|
|
670
|
+
<View className="flex-row mt-space-16 w-full">
|
|
671
|
+
<Button
|
|
672
|
+
variant="secondary"
|
|
673
|
+
onPress={prevStep}
|
|
674
|
+
accessibilityLabel="Go back"
|
|
675
|
+
icon={<Ionicons name="arrow-back" size={16} color={colors.text} />}
|
|
676
|
+
style={styles.navButton}
|
|
677
|
+
>
|
|
678
|
+
{t("common.actions.back") || "Back"}
|
|
679
|
+
</Button>
|
|
680
|
+
</View>
|
|
681
|
+
</Animated.View>
|
|
682
|
+
);
|
|
683
|
+
|
|
684
|
+
const renderSuccessStep = () => (
|
|
685
|
+
<Animated.View
|
|
686
|
+
style={[
|
|
687
|
+
styles.stepContainer,
|
|
688
|
+
{ opacity: fadeAnim, transform: [{ translateX: slideAnim }] },
|
|
689
|
+
]}
|
|
690
|
+
>
|
|
691
|
+
<View className="w-full items-center justify-center p-space-32 gap-space-16">
|
|
692
|
+
<View className="p-space-24 rounded-radius-max bg-fill-secondary">
|
|
693
|
+
<Ionicons name="checkmark-circle" size={48} color={colors.success} />
|
|
694
|
+
</View>
|
|
695
|
+
<H2 className="text-headerBold font-headerBold text-text text-center">
|
|
696
|
+
{t("feedback.success.thanks") || "Thank You!"}
|
|
697
|
+
</H2>
|
|
698
|
+
<Text className="text-body font-body text-text-secondary text-center">
|
|
699
|
+
{t("feedback.success.message") ||
|
|
700
|
+
"Your feedback has been submitted successfully. We'll review it and get back to you soon."}
|
|
701
|
+
</Text>
|
|
702
|
+
<Button
|
|
703
|
+
variant="primary"
|
|
704
|
+
onPress={() => {
|
|
705
|
+
resetForm();
|
|
706
|
+
setCurrentStep(0);
|
|
707
|
+
}}
|
|
708
|
+
accessibilityLabel="Submit another feedback"
|
|
709
|
+
style={styles.fullWidthButton}
|
|
710
|
+
>
|
|
711
|
+
{t("feedback.actions.submitAnother") || "Submit Another"}
|
|
712
|
+
</Button>
|
|
713
|
+
</View>
|
|
714
|
+
</Animated.View>
|
|
715
|
+
);
|
|
716
|
+
|
|
717
|
+
const renderCurrentStep = () => {
|
|
718
|
+
if (feedbackState.status === "success") return renderSuccessStep();
|
|
719
|
+
switch (currentStep) {
|
|
720
|
+
case 0:
|
|
721
|
+
return renderTypeStep();
|
|
722
|
+
case 1:
|
|
723
|
+
return renderDetailsStep();
|
|
724
|
+
case 2:
|
|
725
|
+
return renderContactStep();
|
|
726
|
+
case 3:
|
|
727
|
+
return renderSummaryStep();
|
|
728
|
+
default:
|
|
729
|
+
return renderTypeStep();
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
return (
|
|
734
|
+
<>
|
|
735
|
+
<View className="px-screen-margin pt-space-24 pb-space-32">
|
|
736
|
+
{feedbackState.status !== "success" ? renderProgress() : null}
|
|
737
|
+
{renderCurrentStep()}
|
|
738
|
+
</View>
|
|
739
|
+
</>
|
|
740
|
+
);
|
|
575
741
|
};
|
|
576
742
|
|
|
577
743
|
const styles = StyleSheet.create({
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
744
|
+
stepContainer: {
|
|
745
|
+
flex: 1,
|
|
746
|
+
alignItems: "flex-start",
|
|
747
|
+
},
|
|
748
|
+
navButton: {
|
|
749
|
+
flex: 1,
|
|
750
|
+
},
|
|
751
|
+
fullWidthButton: {
|
|
752
|
+
width: "100%",
|
|
753
|
+
},
|
|
754
|
+
summaryLabel: {
|
|
755
|
+
width: 90,
|
|
756
|
+
},
|
|
757
|
+
progressDot: {
|
|
758
|
+
width: 8,
|
|
759
|
+
},
|
|
760
|
+
progressDotActive: {
|
|
761
|
+
width: 24,
|
|
762
|
+
},
|
|
597
763
|
});
|
|
598
764
|
|
|
599
765
|
export default FeedbackScreen;
|