@oxyhq/services 13.0.2 → 13.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 +18 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/AccountMenuButton.js +8 -10
- package/lib/commonjs/ui/components/AccountMenuButton.js.map +1 -1
- package/lib/commonjs/ui/components/AccountSwitcher.js +65 -35
- package/lib/commonjs/ui/components/AccountSwitcher.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +233 -0
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -0
- package/lib/commonjs/ui/components/ProfileMenu.js +374 -0
- package/lib/commonjs/ui/components/ProfileMenu.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +213 -101
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +28 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +2 -2
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +12 -12
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +8 -7
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/index.js +14 -0
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +11 -6
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +3 -3
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +6 -4
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +8 -7
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +13 -13
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +7 -7
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +5 -5
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +17 -18
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +3 -3
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +9 -9
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +4 -4
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +6 -6
- package/lib/commonjs/ui/screens/SearchSettingsScreen.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/trust/TrustCenterScreen.js +4 -4
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +4 -4
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/activeAuthuser.js +76 -8
- package/lib/commonjs/ui/utils/activeAuthuser.js.map +1 -1
- package/lib/module/index.js +5 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/AccountMenuButton.js +8 -10
- package/lib/module/ui/components/AccountMenuButton.js.map +1 -1
- package/lib/module/ui/components/AccountSwitcher.js +65 -35
- package/lib/module/ui/components/AccountSwitcher.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +228 -0
- package/lib/module/ui/components/ProfileButton.js.map +1 -0
- package/lib/module/ui/components/ProfileMenu.js +370 -0
- package/lib/module/ui/components/ProfileMenu.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +214 -102
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +29 -2
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +2 -2
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/usePaymentQueries.js +12 -12
- package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +9 -7
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/index.js +2 -0
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +11 -6
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +3 -3
- package/lib/module/ui/screens/CreateAccountScreen.js +6 -4
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +8 -7
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +13 -13
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +7 -7
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +5 -5
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +17 -18
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +3 -3
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +9 -9
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +1 -1
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +4 -4
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +6 -6
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +6 -6
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +4 -4
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +4 -4
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/utils/activeAuthuser.js +74 -9
- package/lib/module/ui/utils/activeAuthuser.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +4 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts +5 -7
- package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AccountSwitcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/HelperText.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/HelperText.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +46 -0
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ProfileMenu.d.ts +39 -0
- package/lib/typescript/commonjs/ui/components/ProfileMenu.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldAffix.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldIcon.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Label/InputLabel.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Label/LabelBackground.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/TextFieldFlat.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/TextField/TextFieldFlat.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/TextFieldOutlined.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +11 -26
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts +1 -1
- package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +2 -0
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts +3 -3
- package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts +24 -0
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +64 -61
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +26 -26
- package/lib/typescript/module/ui/client.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AccountMenuButton.d.ts +5 -7
- package/lib/typescript/module/ui/components/AccountMenuButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AccountSwitcher.d.ts +1 -1
- package/lib/typescript/module/ui/components/AccountSwitcher.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ActivityIndicator.d.ts +2 -2
- package/lib/typescript/module/ui/components/ActivityIndicator.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +1 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts +4 -3
- package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FontLoader.d.ts +1 -1
- package/lib/typescript/module/ui/components/FontLoader.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/HelperText.d.ts +1 -1
- package/lib/typescript/module/ui/components/HelperText.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Icon.d.ts +1 -1
- package/lib/typescript/module/ui/components/Icon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts +3 -3
- package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/IconButton/utils.d.ts +1 -1
- package/lib/typescript/module/ui/components/IconButton/utils.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyPayButton.d.ts +1 -1
- package/lib/typescript/module/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +46 -0
- package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ProfileMenu.d.ts +39 -0
- package/lib/typescript/module/ui/components/ProfileMenu.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/StepBasedScreen.d.ts +2 -2
- package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Surface.d.ts +2 -2
- package/lib/typescript/module/ui/components/Surface.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts +3 -2
- package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts +3 -2
- package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +3 -3
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts +3 -3
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts +4 -4
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/utils.d.ts +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/utils.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Label/InputLabel.d.ts +2 -2
- package/lib/typescript/module/ui/components/TextField/Label/InputLabel.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Label/LabelBackground.d.ts +3 -2
- package/lib/typescript/module/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/TextFieldFlat.d.ts +3 -2
- package/lib/typescript/module/ui/components/TextField/TextFieldFlat.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/TextFieldOutlined.d.ts +3 -2
- package/lib/typescript/module/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/helpers.d.ts +3 -3
- package/lib/typescript/module/ui/components/TextField/helpers.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/types.d.ts +1 -1
- package/lib/typescript/module/ui/components/TextField/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField.d.ts +4 -4
- package/lib/typescript/module/ui/components/TextField.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts +3 -3
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts +3 -3
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/utils.d.ts +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/utils.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts +3 -3
- package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/accountMenuRows.d.ts +1 -1
- package/lib/typescript/module/ui/components/accountMenuRows.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/feedback/ProgressIndicator.d.ts +1 -1
- package/lib/typescript/module/ui/components/feedback/ProgressIndicator.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/feedback/constants.d.ts +1 -1
- package/lib/typescript/module/ui/components/feedback/constants.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/feedback/useFeedbackForm.d.ts +1 -1
- package/lib/typescript/module/ui/components/feedback/useFeedbackForm.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/constants.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/constants.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/theming.d.ts +1 -1
- package/lib/typescript/module/ui/components/theming.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts +14 -29
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/ThemeContext.d.ts +1 -1
- package/lib/typescript/module/ui/context/ThemeContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +2 -2
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.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 +1 -1
- package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useLanguageManagement.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useLanguageManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useStorage.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useStorage.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +30 -28
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts +4 -4
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts +2 -2
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts +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 +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 +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 +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 +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 +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/server.d.ts +2 -2
- package/lib/typescript/module/ui/server.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/fileManagement.d.ts +1 -1
- package/lib/typescript/module/ui/types/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/activeAuthuser.d.ts +24 -0
- package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/package.json +21 -20
- package/src/index.ts +8 -5
- package/src/ui/components/AccountMenuButton.tsx +9 -11
- package/src/ui/components/AccountSwitcher.tsx +71 -37
- package/src/ui/components/ProfileButton.tsx +270 -0
- package/src/ui/components/ProfileMenu.tsx +416 -0
- package/src/ui/context/OxyContext.tsx +217 -130
- package/src/ui/context/hooks/useAuthOperations.ts +35 -2
- package/src/ui/hooks/queries/useAccountQueries.ts +2 -2
- package/src/ui/hooks/queries/usePaymentQueries.ts +12 -12
- package/src/ui/hooks/queries/useServicesQueries.ts +9 -6
- package/src/ui/index.ts +2 -0
- package/src/ui/screens/AccountSettingsScreen.tsx +9 -5
- package/src/ui/screens/AccountSwitcherScreen.tsx +3 -3
- package/src/ui/screens/CreateAccountScreen.tsx +6 -4
- package/src/ui/screens/EditProfileFieldScreen.tsx +8 -7
- package/src/ui/screens/FileManagementScreen.tsx +13 -13
- package/src/ui/screens/HistoryViewScreen.tsx +7 -7
- package/src/ui/screens/LanguageSelectorScreen.tsx +5 -5
- package/src/ui/screens/ManageAccountScreen.tsx +17 -18
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +3 -3
- package/src/ui/screens/PrivacySettingsScreen.tsx +9 -9
- package/src/ui/screens/ProfileScreen.tsx +1 -1
- package/src/ui/screens/SavesCollectionsScreen.tsx +5 -5
- package/src/ui/screens/SearchSettingsScreen.tsx +6 -6
- package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
- package/src/ui/screens/trust/TrustCenterScreen.tsx +5 -5
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +4 -4
- package/src/ui/utils/__tests__/activeAuthuser.test.ts +75 -0
- package/src/ui/utils/activeAuthuser.ts +74 -8
- package/lib/commonjs/ui/components/ActiveAccountBanner.js +0 -144
- package/lib/commonjs/ui/components/ActiveAccountBanner.js.map +0 -1
- package/lib/module/ui/components/ActiveAccountBanner.js +0 -141
- package/lib/module/ui/components/ActiveAccountBanner.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/ActiveAccountBanner.d.ts +0 -4
- package/lib/typescript/commonjs/ui/components/ActiveAccountBanner.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ActiveAccountBanner.d.ts +0 -4
- package/lib/typescript/module/ui/components/ActiveAccountBanner.d.ts.map +0 -1
- package/src/ui/components/ActiveAccountBanner.tsx +0 -130
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _vectorIcons = require("@expo/vector-icons");
|
|
10
|
+
var _avatar = require("@oxyhq/bloom/avatar");
|
|
11
|
+
var _typography = require("@oxyhq/bloom/typography");
|
|
12
|
+
var _theme = require("@oxyhq/bloom/theme");
|
|
13
|
+
var _core = require("@oxyhq/core");
|
|
14
|
+
var _useAuth = require("../hooks/useAuth.js");
|
|
15
|
+
var _useI18n = require("../hooks/useI18n.js");
|
|
16
|
+
var _ProfileMenu = _interopRequireDefault(require("./ProfileMenu.js"));
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
const isWeb = _reactNative.Platform.OS === 'web';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Fixed popover width used by {@link ProfileMenu} on web. `ProfileButton`
|
|
23
|
+
* mirrors this constant when computing the trigger-relative anchor so the
|
|
24
|
+
* left-edge clamp keeps the panel fully on-screen. Keep the two in sync.
|
|
25
|
+
*/
|
|
26
|
+
const MENU_WIDTH = 300;
|
|
27
|
+
|
|
28
|
+
/** Gutter, in px, kept between the popover and the viewport edges on web. */
|
|
29
|
+
const VIEWPORT_GUTTER = 8;
|
|
30
|
+
/**
|
|
31
|
+
* Self-contained sidebar account trigger, modeled on Bluesky's ProfileCard and
|
|
32
|
+
* the Oxy inbox's `MailboxDrawer` footer. Owns its own open state + anchor
|
|
33
|
+
* measurement, and renders {@link ProfileMenu} (the device-account switcher).
|
|
34
|
+
*
|
|
35
|
+
* Three auth states from {@link useAuth}:
|
|
36
|
+
* - **Undetermined** (`!isAuthResolved || isPrivateApiPending`): a neutral
|
|
37
|
+
* avatar-sized skeleton circle, no press.
|
|
38
|
+
* - **Signed in**: a pressable row — Bloom `Avatar` + display name + `@handle`
|
|
39
|
+
* + an `unfold-more-horizontal` chevron. Press opens the menu upward (web)
|
|
40
|
+
* against the measured trigger, or as a bottom sheet (native).
|
|
41
|
+
* - **Signed out**: a "Sign in" row that calls `useAuth().signIn()`.
|
|
42
|
+
*
|
|
43
|
+
* All display strings resolve through `@oxyhq/core`'s
|
|
44
|
+
* `getAccountDisplayName` / `getAccountFallbackHandle` — no hand-rolled name
|
|
45
|
+
* fallbacks. Avatars pass the bare file id as `source` + `variant="thumb"`, so
|
|
46
|
+
* the app's registered `ImageResolver` builds the thumbnail URL.
|
|
47
|
+
*/
|
|
48
|
+
const ProfileButton = ({
|
|
49
|
+
expanded = true,
|
|
50
|
+
avatarSize,
|
|
51
|
+
onNavigateManage,
|
|
52
|
+
onAddAccount,
|
|
53
|
+
onNavigateProfile,
|
|
54
|
+
onBeforeSessionChange,
|
|
55
|
+
className,
|
|
56
|
+
style
|
|
57
|
+
}) => {
|
|
58
|
+
const {
|
|
59
|
+
user,
|
|
60
|
+
isAuthenticated,
|
|
61
|
+
isAuthResolved,
|
|
62
|
+
isPrivateApiPending,
|
|
63
|
+
signIn
|
|
64
|
+
} = (0, _useAuth.useAuth)();
|
|
65
|
+
const {
|
|
66
|
+
colors
|
|
67
|
+
} = (0, _theme.useTheme)();
|
|
68
|
+
const {
|
|
69
|
+
t,
|
|
70
|
+
locale
|
|
71
|
+
} = (0, _useI18n.useI18n)();
|
|
72
|
+
const [menuOpen, setMenuOpen] = (0, _react.useState)(false);
|
|
73
|
+
const [anchor, setAnchor] = (0, _react.useState)(null);
|
|
74
|
+
|
|
75
|
+
// Trigger ref for the web anchor measurement. RN-Web exposes `measure()` on
|
|
76
|
+
// host views, so we anchor the popover to the button rect and open upward.
|
|
77
|
+
const triggerRef = (0, _react.useRef)(null);
|
|
78
|
+
const resolvedAvatarSize = avatarSize ?? (expanded ? 40 : 32);
|
|
79
|
+
const openMenu = (0, _react.useCallback)(() => {
|
|
80
|
+
if (!isWeb) {
|
|
81
|
+
setAnchor(null);
|
|
82
|
+
setMenuOpen(true);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const node = triggerRef.current;
|
|
86
|
+
if (!node || typeof node.measure !== 'function' || typeof window === 'undefined') {
|
|
87
|
+
setAnchor(null);
|
|
88
|
+
setMenuOpen(true);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
node.measure((_x, _y, _w, _h, pageX, pageY) => {
|
|
92
|
+
if (typeof pageX !== 'number' || typeof pageY !== 'number') {
|
|
93
|
+
setAnchor(null);
|
|
94
|
+
} else {
|
|
95
|
+
// Clamp the panel's left edge inside the viewport gutter.
|
|
96
|
+
const maxLeft = Math.max(VIEWPORT_GUTTER, window.innerWidth - MENU_WIDTH - VIEWPORT_GUTTER);
|
|
97
|
+
const left = Math.min(Math.max(VIEWPORT_GUTTER, pageX), maxLeft);
|
|
98
|
+
// Anchor the panel's BOTTOM edge just above the trigger top so
|
|
99
|
+
// the menu opens upward from this footer button.
|
|
100
|
+
const bottom = Math.max(VIEWPORT_GUTTER, window.innerHeight - pageY + VIEWPORT_GUTTER);
|
|
101
|
+
setAnchor({
|
|
102
|
+
left,
|
|
103
|
+
bottom
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
setMenuOpen(true);
|
|
107
|
+
});
|
|
108
|
+
}, []);
|
|
109
|
+
const handleClose = (0, _react.useCallback)(() => {
|
|
110
|
+
setMenuOpen(false);
|
|
111
|
+
}, []);
|
|
112
|
+
|
|
113
|
+
// ── Undetermined: skeleton circle, no interaction. ──────────────────────
|
|
114
|
+
if (!isAuthResolved || isPrivateApiPending) {
|
|
115
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
116
|
+
className: className,
|
|
117
|
+
style: style,
|
|
118
|
+
accessibilityElementsHidden: true,
|
|
119
|
+
importantForAccessibility: "no-hide-descendants",
|
|
120
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
121
|
+
className: "rounded-full bg-secondary",
|
|
122
|
+
style: {
|
|
123
|
+
width: resolvedAvatarSize,
|
|
124
|
+
height: resolvedAvatarSize
|
|
125
|
+
}
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// ── Signed out: "Sign in" row. ──────────────────────────────────────────
|
|
131
|
+
if (!isAuthenticated || !user) {
|
|
132
|
+
const signInLabel = t('common.actions.signIn') || 'Sign in';
|
|
133
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
134
|
+
className: `flex-row items-center gap-3 rounded-full px-2 py-2 ${className ?? ''}`,
|
|
135
|
+
style: style,
|
|
136
|
+
onPress: () => {
|
|
137
|
+
void signIn();
|
|
138
|
+
},
|
|
139
|
+
accessibilityRole: "button",
|
|
140
|
+
accessibilityLabel: signInLabel,
|
|
141
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
142
|
+
className: "items-center justify-center rounded-full bg-secondary",
|
|
143
|
+
style: {
|
|
144
|
+
width: resolvedAvatarSize,
|
|
145
|
+
height: resolvedAvatarSize
|
|
146
|
+
},
|
|
147
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
148
|
+
name: "login",
|
|
149
|
+
size: Math.round(resolvedAvatarSize * 0.5),
|
|
150
|
+
color: colors.icon
|
|
151
|
+
})
|
|
152
|
+
}), expanded ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
153
|
+
className: "flex-1 font-semibold text-foreground",
|
|
154
|
+
numberOfLines: 1,
|
|
155
|
+
children: signInLabel
|
|
156
|
+
}) : null]
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// ── Signed in: avatar + identity + chevron. ─────────────────────────────
|
|
161
|
+
const displayName = (0, _core.getAccountDisplayName)(user, locale);
|
|
162
|
+
const handle = (0, _core.getAccountFallbackHandle)(user);
|
|
163
|
+
const handleLine = handle ? `@${handle}` : null;
|
|
164
|
+
const avatarNode = /*#__PURE__*/(0, _jsxRuntime.jsx)(_avatar.Avatar, {
|
|
165
|
+
source: user.avatar ?? undefined,
|
|
166
|
+
variant: "thumb",
|
|
167
|
+
name: displayName,
|
|
168
|
+
size: resolvedAvatarSize
|
|
169
|
+
});
|
|
170
|
+
if (!expanded) {
|
|
171
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
172
|
+
className: className,
|
|
173
|
+
style: style,
|
|
174
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
175
|
+
ref: triggerRef,
|
|
176
|
+
className: "rounded-full",
|
|
177
|
+
onPress: openMenu,
|
|
178
|
+
accessibilityRole: "button",
|
|
179
|
+
accessibilityLabel: t('accountSwitcher.switchWhileSignedInAs', {
|
|
180
|
+
name: displayName
|
|
181
|
+
}) || `Switch account, signed in as ${displayName}`,
|
|
182
|
+
children: avatarNode
|
|
183
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProfileMenu.default, {
|
|
184
|
+
open: menuOpen,
|
|
185
|
+
onClose: handleClose,
|
|
186
|
+
anchor: anchor,
|
|
187
|
+
onNavigateManage: onNavigateManage,
|
|
188
|
+
onAddAccount: onAddAccount,
|
|
189
|
+
onNavigateProfile: onNavigateProfile,
|
|
190
|
+
onBeforeSessionChange: onBeforeSessionChange
|
|
191
|
+
})]
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
195
|
+
className: className,
|
|
196
|
+
style: style,
|
|
197
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
198
|
+
ref: triggerRef,
|
|
199
|
+
className: "flex-row items-center gap-3 rounded-full px-2 py-2",
|
|
200
|
+
onPress: openMenu,
|
|
201
|
+
accessibilityRole: "button",
|
|
202
|
+
accessibilityLabel: t('accountSwitcher.switchWhileSignedInAs', {
|
|
203
|
+
name: displayName
|
|
204
|
+
}) || `Switch account, signed in as ${displayName}`,
|
|
205
|
+
children: [avatarNode, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
206
|
+
className: "min-w-0 flex-1",
|
|
207
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
208
|
+
className: "font-bold text-foreground",
|
|
209
|
+
numberOfLines: 1,
|
|
210
|
+
children: displayName
|
|
211
|
+
}), handleLine ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
212
|
+
className: "text-xs text-muted-foreground",
|
|
213
|
+
numberOfLines: 1,
|
|
214
|
+
children: handleLine
|
|
215
|
+
}) : null]
|
|
216
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
217
|
+
name: "unfold-more-horizontal",
|
|
218
|
+
size: 18,
|
|
219
|
+
color: colors.textSecondary
|
|
220
|
+
})]
|
|
221
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProfileMenu.default, {
|
|
222
|
+
open: menuOpen,
|
|
223
|
+
onClose: handleClose,
|
|
224
|
+
anchor: anchor,
|
|
225
|
+
onNavigateManage: onNavigateManage,
|
|
226
|
+
onAddAccount: onAddAccount,
|
|
227
|
+
onNavigateProfile: onNavigateProfile,
|
|
228
|
+
onBeforeSessionChange: onBeforeSessionChange
|
|
229
|
+
})]
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
var _default = exports.default = ProfileButton;
|
|
233
|
+
//# sourceMappingURL=ProfileButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_vectorIcons","_avatar","_typography","_theme","_core","_useAuth","_useI18n","_ProfileMenu","_interopRequireDefault","_jsxRuntime","e","__esModule","default","isWeb","Platform","OS","MENU_WIDTH","VIEWPORT_GUTTER","ProfileButton","expanded","avatarSize","onNavigateManage","onAddAccount","onNavigateProfile","onBeforeSessionChange","className","style","user","isAuthenticated","isAuthResolved","isPrivateApiPending","signIn","useAuth","colors","useTheme","t","locale","useI18n","menuOpen","setMenuOpen","useState","anchor","setAnchor","triggerRef","useRef","resolvedAvatarSize","openMenu","useCallback","node","current","measure","window","_x","_y","_w","_h","pageX","pageY","maxLeft","Math","max","innerWidth","left","min","bottom","innerHeight","handleClose","jsx","View","accessibilityElementsHidden","importantForAccessibility","children","width","height","signInLabel","jsxs","Pressable","onPress","accessibilityRole","accessibilityLabel","MaterialCommunityIcons","name","size","round","color","icon","Text","numberOfLines","displayName","getAccountDisplayName","handle","getAccountFallbackHandle","handleLine","avatarNode","Avatar","source","avatar","undefined","variant","ref","open","onClose","textSecondary","_default","exports"],"sourceRoot":"../../../../src","sources":["ui/components/ProfileButton.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAA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UAAC7D,SAAS,EAAC,+BAA+B;UAAC8D,aAAa,EAAE,CAAE;UAAAhB,QAAA,EAC5DqB;QAAU,CACT,CAAC,GACP,IAAI;MAAA,CACN,CAAC,eACP,IAAAnF,WAAA,CAAA0D,GAAA,EAACnE,YAAA,CAAAgF,sBAAsB;QACnBC,IAAI,EAAC,wBAAwB;QAC7BC,IAAI,EAAE,EAAG;QACTE,KAAK,EAAEnD,MAAM,CAACqE;MAAc,CAC/B,CAAC;IAAA,CACK,CAAC,eACZ,IAAA7F,WAAA,CAAA0D,GAAA,EAAC5D,YAAA,CAAAK,OAAW;MACRwF,IAAI,EAAE9D,QAAS;MACf+D,OAAO,EAAEnC,WAAY;MACrBzB,MAAM,EAAEA,MAAO;MACfpB,gBAAgB,EAAEA,gBAAiB;MACnCC,YAAY,EAAEA,YAAa;MAC3BC,iBAAiB,EAAEA,iBAAkB;MACrCC,qBAAqB,EAAEA;IAAsB,CAChD,CAAC;EAAA,CACA,CAAC;AAEf,CAAC;AAAC,IAAA+E,QAAA,GAAAC,OAAA,CAAA5F,OAAA,GAEaM,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _vectorIcons = require("@expo/vector-icons");
|
|
10
|
+
var _avatar = require("@oxyhq/bloom/avatar");
|
|
11
|
+
var _typography = require("@oxyhq/bloom/typography");
|
|
12
|
+
var _theme = require("@oxyhq/bloom/theme");
|
|
13
|
+
var _bloom = require("@oxyhq/bloom");
|
|
14
|
+
var _divider = require("@oxyhq/bloom/divider");
|
|
15
|
+
var _core = require("@oxyhq/core");
|
|
16
|
+
var _OxyContext = require("../context/OxyContext.js");
|
|
17
|
+
var _useI18n = require("../hooks/useI18n.js");
|
|
18
|
+
var _useDeviceAccounts = require("../hooks/useDeviceAccounts.js");
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
+
const isWeb = _reactNative.Platform.OS === 'web';
|
|
21
|
+
|
|
22
|
+
/** Fixed popover width on web. `ProfileButton` mirrors this when anchoring. */
|
|
23
|
+
const MENU_WIDTH = 300;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Web-only anchor. `ProfileButton` measures its trigger and anchors the panel's
|
|
27
|
+
* BOTTOM-LEFT corner so the menu opens UPWARD from the sidebar footer. Native
|
|
28
|
+
* ignores the anchor and docks the panel to the bottom as a sheet.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Clean device-account switcher, modeled on the inbox `AccountMenu` but written
|
|
33
|
+
* fresh with NativeWind classNames + Bloom primitives. Lists every account
|
|
34
|
+
* signed in on this device (from {@link useDeviceAccounts}); tapping a row
|
|
35
|
+
* switches, and each inactive row carries a sign-out icon. Below the list:
|
|
36
|
+
* Add account, Manage account, optional View profile, and Sign out of all.
|
|
37
|
+
*
|
|
38
|
+
* Renders as an upward-opening popover anchored to the trigger on web, and a
|
|
39
|
+
* bottom-sheet style modal on native.
|
|
40
|
+
*/
|
|
41
|
+
const ProfileMenu = ({
|
|
42
|
+
open,
|
|
43
|
+
onClose,
|
|
44
|
+
anchor,
|
|
45
|
+
onNavigateManage,
|
|
46
|
+
onAddAccount,
|
|
47
|
+
onNavigateProfile,
|
|
48
|
+
onBeforeSessionChange
|
|
49
|
+
}) => {
|
|
50
|
+
const {
|
|
51
|
+
activeSessionId,
|
|
52
|
+
switchSession,
|
|
53
|
+
logoutAll,
|
|
54
|
+
removeSession
|
|
55
|
+
} = (0, _OxyContext.useOxy)();
|
|
56
|
+
const {
|
|
57
|
+
t
|
|
58
|
+
} = (0, _useI18n.useI18n)();
|
|
59
|
+
const {
|
|
60
|
+
colors
|
|
61
|
+
} = (0, _theme.useTheme)();
|
|
62
|
+
const {
|
|
63
|
+
accounts
|
|
64
|
+
} = (0, _useDeviceAccounts.useDeviceAccounts)();
|
|
65
|
+
const [busySessionId, setBusySessionId] = (0, _react.useState)(null);
|
|
66
|
+
const [removingSessionId, setRemovingSessionId] = (0, _react.useState)(null);
|
|
67
|
+
const [signingOutAll, setSigningOutAll] = (0, _react.useState)(false);
|
|
68
|
+
const signOutAllDialog = (0, _bloom.useDialogControl)();
|
|
69
|
+
const isSwitching = busySessionId !== null;
|
|
70
|
+
const actionDisabled = isSwitching || removingSessionId !== null || signingOutAll;
|
|
71
|
+
|
|
72
|
+
// Switch to a non-active account through the SDK's canonical switch path.
|
|
73
|
+
const handleSwitch = (0, _react.useCallback)(async sessionId => {
|
|
74
|
+
if (sessionId === activeSessionId || busySessionId) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
setBusySessionId(sessionId);
|
|
78
|
+
try {
|
|
79
|
+
await onBeforeSessionChange?.();
|
|
80
|
+
await switchSession(sessionId);
|
|
81
|
+
_bloom.toast.success(t('accountSwitcher.toasts.switchSuccess') || 'Switched account');
|
|
82
|
+
onClose();
|
|
83
|
+
} catch (error) {
|
|
84
|
+
if (!(0, _core.isDev)()) {
|
|
85
|
+
_core.logger.warn('Switch account failed', {
|
|
86
|
+
component: 'ProfileMenu'
|
|
87
|
+
}, error);
|
|
88
|
+
}
|
|
89
|
+
_bloom.toast.error(t('accountSwitcher.toasts.switchFailed') || 'Failed to switch account');
|
|
90
|
+
} finally {
|
|
91
|
+
setBusySessionId(null);
|
|
92
|
+
}
|
|
93
|
+
}, [activeSessionId, busySessionId, switchSession, t, onClose, onBeforeSessionChange]);
|
|
94
|
+
|
|
95
|
+
// Sign out a specific inactive account without switching/clearing the active
|
|
96
|
+
// one. The menu stays open so the user can keep managing accounts.
|
|
97
|
+
const handleRemove = (0, _react.useCallback)(async sessionId => {
|
|
98
|
+
if (sessionId === activeSessionId || removingSessionId) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
setRemovingSessionId(sessionId);
|
|
102
|
+
try {
|
|
103
|
+
await removeSession(sessionId);
|
|
104
|
+
_bloom.toast.success(t('common.actions.signedOut') || 'Signed out');
|
|
105
|
+
} catch (error) {
|
|
106
|
+
_core.logger.warn('Remove account failed', {
|
|
107
|
+
component: 'ProfileMenu'
|
|
108
|
+
}, error);
|
|
109
|
+
_bloom.toast.error(t('common.errors.signOutFailed') || 'Failed to sign out');
|
|
110
|
+
} finally {
|
|
111
|
+
setRemovingSessionId(null);
|
|
112
|
+
}
|
|
113
|
+
}, [activeSessionId, removingSessionId, removeSession, t]);
|
|
114
|
+
const performSignOutAll = (0, _react.useCallback)(async () => {
|
|
115
|
+
if (signingOutAll) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
setSigningOutAll(true);
|
|
119
|
+
try {
|
|
120
|
+
await onBeforeSessionChange?.();
|
|
121
|
+
await logoutAll();
|
|
122
|
+
_bloom.toast.success(t('accountSwitcher.toasts.signOutAllSuccess') || 'Signed out of all accounts');
|
|
123
|
+
onClose();
|
|
124
|
+
} catch (error) {
|
|
125
|
+
_core.logger.warn('Sign out all failed', {
|
|
126
|
+
component: 'ProfileMenu'
|
|
127
|
+
}, error);
|
|
128
|
+
_bloom.toast.error(t('common.errors.signOutAllFailed') || 'Failed to sign out of all accounts');
|
|
129
|
+
} finally {
|
|
130
|
+
setSigningOutAll(false);
|
|
131
|
+
}
|
|
132
|
+
}, [signingOutAll, logoutAll, t, onClose, onBeforeSessionChange]);
|
|
133
|
+
|
|
134
|
+
// Escape-to-close (web only).
|
|
135
|
+
(0, _react.useEffect)(() => {
|
|
136
|
+
if (!open || !isWeb || typeof document === 'undefined') {
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
const onKey = event => {
|
|
140
|
+
if (event.key === 'Escape') {
|
|
141
|
+
event.stopPropagation();
|
|
142
|
+
onClose();
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
document.addEventListener('keydown', onKey, true);
|
|
146
|
+
return () => document.removeEventListener('keydown', onKey, true);
|
|
147
|
+
}, [open, onClose]);
|
|
148
|
+
if (!open) {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Web: anchor the panel's bottom-left corner to the measured trigger, falling
|
|
153
|
+
// back to a bottom-left placement when no anchor was captured. Native ignores
|
|
154
|
+
// this (the panel docks to the bottom via the overlay's flex-end).
|
|
155
|
+
const panelAnchorStyle = isWeb ? {
|
|
156
|
+
position: 'absolute',
|
|
157
|
+
width: MENU_WIDTH,
|
|
158
|
+
left: anchor?.left ?? 8,
|
|
159
|
+
bottom: anchor?.bottom ?? 8
|
|
160
|
+
} : undefined;
|
|
161
|
+
const content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable
|
|
162
|
+
// Swallow taps inside the panel so they never reach the overlay's
|
|
163
|
+
// outside-tap-to-close handler.
|
|
164
|
+
, {
|
|
165
|
+
onPress: () => undefined,
|
|
166
|
+
className: isWeb ? 'overflow-hidden rounded-2xl border border-border bg-background' : 'overflow-hidden rounded-t-3xl bg-background pb-3',
|
|
167
|
+
style: [panelAnchorStyle, !isWeb ? {
|
|
168
|
+
maxHeight: '85%'
|
|
169
|
+
} : {
|
|
170
|
+
maxHeight: '85%'
|
|
171
|
+
}, styles.shadow],
|
|
172
|
+
accessibilityRole: "menu",
|
|
173
|
+
accessibilityLabel: t('accountMenu.label') || 'Account menu',
|
|
174
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
|
|
175
|
+
className: "grow-0",
|
|
176
|
+
contentContainerClassName: "py-1",
|
|
177
|
+
showsVerticalScrollIndicator: false,
|
|
178
|
+
children: [accounts.map(account => {
|
|
179
|
+
const isActive = account.isCurrent;
|
|
180
|
+
const isBusy = busySessionId === account.sessionId;
|
|
181
|
+
const isRemoving = removingSessionId === account.sessionId;
|
|
182
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
183
|
+
accessibilityRole: "menuitem",
|
|
184
|
+
accessibilityLabel: account.displayName,
|
|
185
|
+
accessibilityState: {
|
|
186
|
+
selected: isActive
|
|
187
|
+
},
|
|
188
|
+
onPress: () => handleSwitch(account.sessionId),
|
|
189
|
+
disabled: isActive || isBusy || isSwitching,
|
|
190
|
+
className: `flex-row items-center gap-3 px-4 py-2.5 ${isActive ? 'bg-secondary' : ''} ${isSwitching && !isActive ? 'opacity-40' : ''}`,
|
|
191
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_avatar.Avatar, {
|
|
192
|
+
source: account.user.avatar ?? undefined,
|
|
193
|
+
uri: account.avatarUrl,
|
|
194
|
+
variant: "thumb",
|
|
195
|
+
name: account.displayName,
|
|
196
|
+
size: isActive ? 40 : 32
|
|
197
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
198
|
+
className: "min-w-0 flex-1",
|
|
199
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
200
|
+
className: `text-foreground ${isActive ? 'font-semibold' : 'font-medium'}`,
|
|
201
|
+
numberOfLines: 1,
|
|
202
|
+
children: account.displayName
|
|
203
|
+
}), account.email ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
204
|
+
className: "text-xs text-muted-foreground",
|
|
205
|
+
numberOfLines: 1,
|
|
206
|
+
children: account.email
|
|
207
|
+
}) : null]
|
|
208
|
+
}), isBusy ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
209
|
+
color: colors.primary,
|
|
210
|
+
size: "small"
|
|
211
|
+
}) : isActive ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
212
|
+
name: "check",
|
|
213
|
+
size: 20,
|
|
214
|
+
color: colors.primary
|
|
215
|
+
}) : isRemoving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
216
|
+
color: colors.textSecondary,
|
|
217
|
+
size: "small"
|
|
218
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
219
|
+
accessibilityRole: "button",
|
|
220
|
+
accessibilityLabel: t('accountMenu.signOutAccount', {
|
|
221
|
+
name: account.displayName
|
|
222
|
+
}) || `Sign out ${account.displayName}`,
|
|
223
|
+
onPress: () => handleRemove(account.sessionId),
|
|
224
|
+
disabled: actionDisabled,
|
|
225
|
+
hitSlop: {
|
|
226
|
+
top: 8,
|
|
227
|
+
bottom: 8,
|
|
228
|
+
left: 8,
|
|
229
|
+
right: 8
|
|
230
|
+
},
|
|
231
|
+
className: "h-7 w-7 items-center justify-center rounded-full opacity-60",
|
|
232
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
233
|
+
name: "logout",
|
|
234
|
+
size: 18,
|
|
235
|
+
color: colors.textSecondary
|
|
236
|
+
})
|
|
237
|
+
})]
|
|
238
|
+
}, `account-${account.sessionId}`);
|
|
239
|
+
}), isSwitching ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
240
|
+
className: "flex-row items-center justify-center gap-2 py-2",
|
|
241
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
242
|
+
color: colors.textSecondary,
|
|
243
|
+
size: "small"
|
|
244
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
245
|
+
className: "text-xs font-medium text-muted-foreground",
|
|
246
|
+
children: t('accountMenu.switching') || 'Switching account…'
|
|
247
|
+
})]
|
|
248
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_divider.Divider, {
|
|
249
|
+
color: colors.border,
|
|
250
|
+
spacing: 4
|
|
251
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionRow, {
|
|
252
|
+
icon: "account-plus-outline",
|
|
253
|
+
iconColor: colors.icon,
|
|
254
|
+
label: t('accountMenu.addAnother') || 'Add another account',
|
|
255
|
+
disabled: actionDisabled,
|
|
256
|
+
onPress: () => {
|
|
257
|
+
onClose();
|
|
258
|
+
onAddAccount();
|
|
259
|
+
}
|
|
260
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionRow, {
|
|
261
|
+
icon: "cog-outline",
|
|
262
|
+
iconColor: colors.icon,
|
|
263
|
+
label: t('accountMenu.manage') || 'Manage your Oxy Account',
|
|
264
|
+
disabled: actionDisabled,
|
|
265
|
+
onPress: () => {
|
|
266
|
+
onClose();
|
|
267
|
+
onNavigateManage();
|
|
268
|
+
}
|
|
269
|
+
}), onNavigateProfile ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionRow, {
|
|
270
|
+
icon: "account-outline",
|
|
271
|
+
iconColor: colors.icon,
|
|
272
|
+
label: t('accountMenu.viewProfile') || 'View profile',
|
|
273
|
+
disabled: actionDisabled,
|
|
274
|
+
onPress: () => {
|
|
275
|
+
onClose();
|
|
276
|
+
onNavigateProfile();
|
|
277
|
+
}
|
|
278
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_divider.Divider, {
|
|
279
|
+
color: colors.border,
|
|
280
|
+
spacing: 4
|
|
281
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
282
|
+
accessibilityRole: "menuitem",
|
|
283
|
+
accessibilityLabel: t('accountMenu.signOutAll') || 'Sign out of all accounts',
|
|
284
|
+
onPress: () => signOutAllDialog.open(),
|
|
285
|
+
disabled: actionDisabled,
|
|
286
|
+
className: `flex-row items-center gap-3 px-4 py-3 ${actionDisabled ? 'opacity-40' : ''}`,
|
|
287
|
+
children: [signingOutAll ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
288
|
+
color: colors.error,
|
|
289
|
+
size: "small"
|
|
290
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
291
|
+
name: "logout",
|
|
292
|
+
size: 18,
|
|
293
|
+
color: colors.error
|
|
294
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
295
|
+
className: "font-medium",
|
|
296
|
+
style: {
|
|
297
|
+
color: colors.error
|
|
298
|
+
},
|
|
299
|
+
children: t('accountMenu.signOutAll') || 'Sign out of all accounts'
|
|
300
|
+
})]
|
|
301
|
+
})]
|
|
302
|
+
})
|
|
303
|
+
});
|
|
304
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Modal, {
|
|
305
|
+
visible: open,
|
|
306
|
+
transparent: true,
|
|
307
|
+
animationType: isWeb ? 'fade' : 'slide',
|
|
308
|
+
onRequestClose: onClose,
|
|
309
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
310
|
+
accessibilityRole: "button",
|
|
311
|
+
accessibilityLabel: t('common.actions.close') || 'Close',
|
|
312
|
+
onPress: onClose,
|
|
313
|
+
className: isWeb ? 'flex-1 relative' : 'flex-1 justify-end',
|
|
314
|
+
style: !isWeb ? styles.nativeScrim : undefined,
|
|
315
|
+
children: content
|
|
316
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
|
|
317
|
+
control: signOutAllDialog,
|
|
318
|
+
title: t('accountMenu.signOutAll') || 'Sign out of all accounts',
|
|
319
|
+
description: t('common.confirms.signOutAll') || 'Are you sure you want to sign out of all accounts?',
|
|
320
|
+
actions: [{
|
|
321
|
+
label: t('accountMenu.signOutAll') || 'Sign out of all accounts',
|
|
322
|
+
color: 'destructive',
|
|
323
|
+
onPress: performSignOutAll
|
|
324
|
+
}, {
|
|
325
|
+
label: t('common.cancel') || 'Cancel',
|
|
326
|
+
color: 'cancel'
|
|
327
|
+
}]
|
|
328
|
+
})]
|
|
329
|
+
});
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
/** Bottom-section action row (Add account / Manage / View profile). */
|
|
333
|
+
const ActionRow = ({
|
|
334
|
+
icon,
|
|
335
|
+
iconColor,
|
|
336
|
+
label,
|
|
337
|
+
disabled,
|
|
338
|
+
onPress
|
|
339
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
340
|
+
accessibilityRole: "menuitem",
|
|
341
|
+
accessibilityLabel: label,
|
|
342
|
+
onPress: onPress,
|
|
343
|
+
disabled: disabled,
|
|
344
|
+
className: `flex-row items-center gap-3 px-4 py-3 ${disabled ? 'opacity-40' : ''}`,
|
|
345
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
346
|
+
name: icon,
|
|
347
|
+
size: 20,
|
|
348
|
+
color: iconColor
|
|
349
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
350
|
+
className: "font-medium text-foreground",
|
|
351
|
+
children: label
|
|
352
|
+
})]
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
// The panel's drop shadow and the native scrim are the only values with no
|
|
356
|
+
// NativeWind class equivalent in this package (dynamic elevation + rgba scrim),
|
|
357
|
+
// so they stay as small inline objects rather than raw class-replaceable styles.
|
|
358
|
+
const styles = {
|
|
359
|
+
shadow: {
|
|
360
|
+
shadowColor: '#000',
|
|
361
|
+
shadowOpacity: 0.18,
|
|
362
|
+
shadowRadius: 24,
|
|
363
|
+
shadowOffset: {
|
|
364
|
+
width: 0,
|
|
365
|
+
height: 8
|
|
366
|
+
},
|
|
367
|
+
elevation: 12
|
|
368
|
+
},
|
|
369
|
+
nativeScrim: {
|
|
370
|
+
backgroundColor: 'rgba(0,0,0,0.32)'
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
var _default = exports.default = ProfileMenu;
|
|
374
|
+
//# sourceMappingURL=ProfileMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_vectorIcons","_avatar","_typography","_theme","_bloom","_divider","_core","_OxyContext","_useI18n","_useDeviceAccounts","_jsxRuntime","isWeb","Platform","OS","MENU_WIDTH","ProfileMenu","open","onClose","anchor","onNavigateManage","onAddAccount","onNavigateProfile","onBeforeSessionChange","activeSessionId","switchSession","logoutAll","removeSession","useOxy","t","useI18n","colors","useTheme","accounts","useDeviceAccounts","busySessionId","setBusySessionId","useState","removingSessionId","setRemovingSessionId","signingOutAll","setSigningOutAll","signOutAllDialog","useDialogControl","isSwitching","actionDisabled","handleSwitch","useCallback","sessionId","toast","success","error","isDev","loggerUtil","warn","component","handleRemove","performSignOutAll","useEffect","document","undefined","onKey","event","key","stopPropagation","addEventListener","removeEventListener","panelAnchorStyle","position","width","left","bottom","content","jsx","Pressable","onPress","className","style","maxHeight","styles","shadow","accessibilityRole","accessibilityLabel","children","jsxs","ScrollView","contentContainerClassName","showsVerticalScrollIndicator","map","account","isActive","isCurrent","isBusy","isRemoving","displayName","accessibilityState","selected","disabled","Avatar","source","user","avatar","uri","avatarUrl","variant","name","size","View","Text","numberOfLines","email","ActivityIndicator","color","primary","MaterialCommunityIcons","textSecondary","hitSlop","top","right","Divider","border","spacing","ActionRow","icon","iconColor","label","Modal","visible","transparent","animationType","onRequestClose","nativeScrim","Dialog","control","title","description","actions","shadowColor","shadowOpacity","shadowRadius","shadowOffset","height","elevation","backgroundColor","_default","exports","default"],"sourceRoot":"../../../../src","sources":["ui/components/ProfileMenu.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAA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