@oxyhq/services 22.8.7 → 22.10.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 +24 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +150 -0
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/commonjs/ui/components/OxyAuthChooser.js +137 -40
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyConsentScreen.js +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +9 -29
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +1 -1
- package/lib/commonjs/ui/components/RequireOxyAuth.js +1 -1
- package/lib/commonjs/ui/components/SurfaceHeaderAction.js +63 -0
- package/lib/commonjs/ui/components/SurfaceHeaderAction.js.map +1 -0
- package/lib/commonjs/ui/components/SurfaceScreen.js +193 -0
- package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +46 -29
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +47 -23
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +22 -12
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js +83 -0
- package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +49 -4
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +34 -39
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js +46 -0
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +1 -1
- package/lib/commonjs/ui/navigation/accountDialogManager.js +14 -2
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +38 -56
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +7 -57
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaceBackBridge.js +68 -0
- package/lib/commonjs/ui/navigation/surfaceBackBridge.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaceNavStack.js +98 -0
- package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js +152 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaces.js +256 -0
- package/lib/commonjs/ui/navigation/surfaces.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +214 -283
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +88 -118
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +22 -36
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +219 -226
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +10 -14
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +24 -39
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +136 -158
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +29 -36
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +101 -109
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +10 -15
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +8 -16
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +219 -206
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +62 -69
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +63 -79
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +69 -98
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +8 -14
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +77 -94
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +99 -134
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/NotificationsScreen.js +69 -76
- package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -8
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PreferencesScreen.js +67 -74
- package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +55 -91
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +291 -304
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +100 -114
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +38 -45
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +44 -57
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +24 -31
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +14 -24
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +9 -7
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +66 -75
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +111 -139
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +13 -20
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +14 -27
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +68 -85
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +28 -36
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/types/surfaceScreen.js +6 -0
- package/lib/commonjs/ui/types/surfaceScreen.js.map +1 -0
- package/lib/module/index.js +12 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +145 -0
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/module/ui/components/OxyAuthChooser.js +137 -40
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyConsentScreen.js +1 -1
- package/lib/module/ui/components/OxyProvider.js +10 -30
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +1 -1
- package/lib/module/ui/components/RequireOxyAuth.js +1 -1
- package/lib/module/ui/components/SurfaceHeaderAction.js +58 -0
- package/lib/module/ui/components/SurfaceHeaderAction.js.map +1 -0
- package/lib/module/ui/components/SurfaceScreen.js +188 -0
- package/lib/module/ui/components/SurfaceScreen.js.map +1 -0
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +46 -29
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +46 -23
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/oxyAuthChooserStyles.js +22 -12
- package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/module/ui/components/surfaces/ActionSheetSurface.js +78 -0
- package/lib/module/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +49 -4
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +34 -39
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useSurfaceHeader.js +42 -0
- package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -0
- package/lib/module/ui/hooks/useSwitchableAccounts.js +1 -1
- package/lib/module/ui/navigation/accountDialogManager.js +14 -2
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/module/ui/navigation/bottomSheetManager.js +37 -53
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +6 -56
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/navigation/surfaceBackBridge.js +63 -0
- package/lib/module/ui/navigation/surfaceBackBridge.js.map +1 -0
- package/lib/module/ui/navigation/surfaceNavStack.js +95 -0
- package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -0
- package/lib/module/ui/navigation/surfaceRegistry.js +146 -0
- package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -0
- package/lib/module/ui/navigation/surfaces.js +244 -0
- package/lib/module/ui/navigation/surfaces.js.map +1 -0
- package/lib/module/ui/screens/AccountMembersScreen.js +218 -286
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +92 -121
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +25 -38
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +220 -227
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +10 -14
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +26 -40
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +139 -160
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +32 -38
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +102 -110
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +11 -15
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +10 -17
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +222 -208
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +64 -70
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +65 -81
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +71 -99
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +10 -15
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +78 -94
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +102 -137
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/NotificationsScreen.js +71 -77
- package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +4 -9
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PreferencesScreen.js +69 -75
- package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +58 -93
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +293 -305
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +102 -116
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +40 -46
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +46 -58
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +26 -32
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +14 -24
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +8 -7
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustAboutScreen.js +67 -75
- package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +112 -139
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustFAQScreen.js +15 -21
- package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +14 -26
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +69 -85
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js +30 -37
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/module/ui/types/surfaceScreen.js +4 -0
- package/lib/module/ui/types/surfaceScreen.js.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts +39 -0
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +3 -3
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts +16 -0
- package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +26 -0
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +17 -2
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +19 -9
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
- package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +7 -11
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +31 -0
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +14 -2
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +24 -16
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +2 -60
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts +16 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts +51 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +135 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +79 -0
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +0 -4
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +8 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts +38 -0
- package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts +39 -0
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +3 -3
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts +3 -2
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +2 -2
- package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +1 -1
- package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts +16 -0
- package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +26 -0
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +17 -2
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +19 -9
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
- package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +7 -11
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +31 -0
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +14 -2
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +24 -16
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +2 -60
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts +16 -0
- package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts +51 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +135 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaces.d.ts +79 -0
- package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +0 -4
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +8 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/surfaceScreen.d.ts +38 -0
- package/lib/typescript/module/ui/types/surfaceScreen.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +12 -5
- package/src/ui/components/OxyAccountDialogScreen.tsx +148 -0
- package/src/ui/components/OxyAuthChooser.tsx +153 -33
- package/src/ui/components/OxyConsentScreen.tsx +1 -1
- package/src/ui/components/OxyProvider.tsx +12 -34
- package/src/ui/components/ProfileButton.tsx +2 -2
- package/src/ui/components/RequireOxyAuth.tsx +1 -1
- package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
- package/src/ui/components/SurfaceScreen.tsx +226 -0
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
- package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
- package/src/ui/components/oxyAuthChooserStyles.ts +22 -12
- package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
- package/src/ui/context/OxyContext.tsx +43 -3
- package/src/ui/hooks/useAvatarPicker.ts +53 -66
- package/src/ui/hooks/useSurfaceHeader.ts +56 -0
- package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
- package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +39 -0
- package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +68 -0
- package/src/ui/navigation/accountDialogManager.ts +14 -2
- package/src/ui/navigation/bottomSheetManager.ts +46 -73
- package/src/ui/navigation/routes.ts +7 -106
- package/src/ui/navigation/surfaceBackBridge.ts +69 -0
- package/src/ui/navigation/surfaceNavStack.ts +110 -0
- package/src/ui/navigation/surfaceRegistry.ts +240 -0
- package/src/ui/navigation/surfaces.ts +272 -0
- package/src/ui/screens/AccountMembersScreen.tsx +39 -100
- package/src/ui/screens/AccountSettingsScreen.tsx +32 -54
- package/src/ui/screens/AccountVerificationScreen.tsx +23 -51
- package/src/ui/screens/AppInfoScreen.tsx +6 -13
- package/src/ui/screens/AvatarCropScreen.tsx +8 -17
- package/src/ui/screens/ConnectedAppsScreen.tsx +39 -60
- package/src/ui/screens/CreateAccountScreen.tsx +13 -39
- package/src/ui/screens/EditProfileFieldScreen.tsx +30 -48
- package/src/ui/screens/EditProfileScreen.tsx +7 -16
- package/src/ui/screens/FAQScreen.tsx +9 -13
- package/src/ui/screens/FeedbackScreen.tsx +8 -22
- package/src/ui/screens/FileManagementScreen.tsx +191 -188
- package/src/ui/screens/HelpSupportScreen.tsx +7 -13
- package/src/ui/screens/HistoryViewScreen.tsx +26 -31
- package/src/ui/screens/LanguageSelectorScreen.tsx +12 -46
- package/src/ui/screens/LearnMoreUsernamesScreen.tsx +8 -16
- package/src/ui/screens/LegalDocumentsScreen.tsx +7 -22
- package/src/ui/screens/ManageAccountScreen.tsx +96 -165
- package/src/ui/screens/NotificationsScreen.tsx +7 -13
- package/src/ui/screens/PaymentGatewayScreen.tsx +3 -10
- package/src/ui/screens/PreferencesScreen.tsx +7 -13
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +52 -90
- package/src/ui/screens/PrivacySettingsScreen.tsx +9 -21
- package/src/ui/screens/ProfileScreen.tsx +9 -11
- package/src/ui/screens/SavesCollectionsScreen.tsx +7 -13
- package/src/ui/screens/SearchSettingsScreen.tsx +9 -21
- package/src/ui/screens/UserLinksScreen.tsx +7 -14
- package/src/ui/screens/UserListScreen.tsx +2 -5
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
- package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +9 -7
- package/src/ui/screens/trust/TrustAboutScreen.tsx +10 -17
- package/src/ui/screens/trust/TrustCenterScreen.tsx +9 -28
- package/src/ui/screens/trust/TrustFAQScreen.tsx +15 -18
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +3 -5
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +11 -26
- package/src/ui/screens/trust/TrustRulesScreen.tsx +10 -13
- package/src/ui/types/navigation.ts +8 -0
- package/src/ui/types/surfaceScreen.ts +38 -0
- package/lib/commonjs/ui/components/BottomSheet.js +0 -49
- package/lib/commonjs/ui/components/BottomSheet.js.map +0 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +0 -298
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +0 -1
- package/lib/commonjs/ui/components/Header.js +0 -305
- package/lib/commonjs/ui/components/Header.js.map +0 -1
- package/lib/commonjs/ui/components/OxyAccountDialog.js +0 -259
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/module/ui/components/BottomSheet.js +0 -45
- package/lib/module/ui/components/BottomSheet.js.map +0 -1
- package/lib/module/ui/components/BottomSheetRouter.js +0 -292
- package/lib/module/ui/components/BottomSheetRouter.js.map +0 -1
- package/lib/module/ui/components/Header.js +0 -299
- package/lib/module/ui/components/Header.js.map +0 -1
- package/lib/module/ui/components/OxyAccountDialog.js +0 -254
- package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts +0 -29
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts +0 -9
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Header.d.ts +0 -33
- package/lib/typescript/commonjs/ui/components/Header.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts +0 -37
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BottomSheet.d.ts +0 -29
- package/lib/typescript/module/ui/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +0 -9
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Header.d.ts +0 -33
- package/lib/typescript/module/ui/components/Header.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts +0 -37
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/src/ui/components/BottomSheet.tsx +0 -48
- package/src/ui/components/BottomSheetRouter.tsx +0 -310
- package/src/ui/components/Header.tsx +0 -224
- package/src/ui/components/OxyAccountDialog.tsx +0 -243
- package/src/ui/navigation/__tests__/getSheetConfig.test.ts +0 -36
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useCallback, useMemo, useState } from 'react';
|
|
4
|
-
import { View,
|
|
4
|
+
import { View, TouchableOpacity, ActivityIndicator } from 'react-native';
|
|
5
5
|
import { Ionicons } from '@expo/vector-icons';
|
|
6
6
|
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
7
|
-
import { toast
|
|
7
|
+
import { toast } from '@oxyhq/bloom';
|
|
8
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
8
9
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
9
|
-
import {
|
|
10
|
+
import { Text } from '@oxyhq/bloom/typography';
|
|
10
11
|
import { Button } from '@oxyhq/bloom/button';
|
|
11
12
|
import { TextField, TextFieldInput } from '@oxyhq/bloom/text-field';
|
|
12
13
|
import { Divider } from '@oxyhq/bloom/divider';
|
|
13
|
-
import { logger as loggerUtil } from '@oxyhq/core';
|
|
14
|
-
import Header from "../components/Header.js";
|
|
15
14
|
import { useOxy } from "../context/OxyContext.js";
|
|
16
15
|
import { useI18n } from "../hooks/useI18n.js";
|
|
16
|
+
import { useSurfaceHeader } from "../hooks/useSurfaceHeader.js";
|
|
17
17
|
|
|
18
18
|
/** Roles assignable via invite / role change — everything except `owner`. */
|
|
19
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
20
|
const ASSIGNABLE_ROLES = ['admin', 'editor', 'developer', 'billing', 'viewer'];
|
|
21
21
|
const errorMessage = (error, fallback) => error instanceof Error && error.message ? error.message : fallback;
|
|
22
22
|
const isUserNotFound = error => {
|
|
@@ -39,6 +39,10 @@ const AccountMembersScreen = ({
|
|
|
39
39
|
const {
|
|
40
40
|
t
|
|
41
41
|
} = useI18n();
|
|
42
|
+
useSurfaceHeader({
|
|
43
|
+
title: t('accounts.members.title') || 'Members',
|
|
44
|
+
subtitle: t('accounts.members.subtitle') || 'People with access to this account.'
|
|
45
|
+
});
|
|
42
46
|
const {
|
|
43
47
|
oxyServices,
|
|
44
48
|
canUsePrivateApi
|
|
@@ -141,10 +145,6 @@ const AccountMembersScreen = ({
|
|
|
141
145
|
toast.error(errorMessage(error, t('accounts.members.toasts.transferFailed') || 'Failed to transfer ownership'));
|
|
142
146
|
}
|
|
143
147
|
});
|
|
144
|
-
const [memberToRemove, setMemberToRemove] = useState(null);
|
|
145
|
-
const [memberToPromote, setMemberToPromote] = useState(null);
|
|
146
|
-
const removeDialog = useDialogControl();
|
|
147
|
-
const transferDialog = useDialogControl();
|
|
148
148
|
const handleInvite = useCallback(() => {
|
|
149
149
|
const usernameOrEmail = inviteIdentifier.trim();
|
|
150
150
|
if (!usernameOrEmail) {
|
|
@@ -166,298 +166,230 @@ const AccountMembersScreen = ({
|
|
|
166
166
|
role
|
|
167
167
|
});
|
|
168
168
|
}, [updateMutation]);
|
|
169
|
-
const confirmRemove = useCallback(member => {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
169
|
+
const confirmRemove = useCallback(async member => {
|
|
170
|
+
const confirmed = await surfaces.confirm({
|
|
171
|
+
title: t('accounts.members.removeConfirm.title') || 'Remove member',
|
|
172
|
+
message: t('accounts.members.removeConfirm.description') || 'Remove this member from the account? They will lose all access.',
|
|
173
|
+
confirmLabel: t('accounts.members.actions.remove') || 'Remove',
|
|
174
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
175
|
+
destructive: true
|
|
176
|
+
});
|
|
177
|
+
if (confirmed) removeMutation.mutate(member._id);
|
|
178
|
+
}, [removeMutation, t]);
|
|
179
|
+
const confirmTransfer = useCallback(async member => {
|
|
180
|
+
const confirmed = await surfaces.confirm({
|
|
181
|
+
title: t('accounts.members.transferConfirm.title') || 'Transfer ownership',
|
|
182
|
+
message: t('accounts.members.transferConfirm.description') || 'Transfer ownership of this account to this member? You will be demoted to admin. This cannot be undone.',
|
|
183
|
+
confirmLabel: t('accounts.members.actions.transfer') || 'Transfer ownership',
|
|
184
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
185
|
+
destructive: true
|
|
186
|
+
});
|
|
187
|
+
if (confirmed) transferMutation.mutate(member.memberUserId);
|
|
188
|
+
}, [transferMutation, t]);
|
|
178
189
|
if (!id) {
|
|
179
|
-
return /*#__PURE__*/
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
title: title,
|
|
183
|
-
onBack: goBack,
|
|
184
|
-
onClose: onClose,
|
|
185
|
-
showBackButton: true,
|
|
186
|
-
showCloseButton: true,
|
|
187
|
-
elevation: "subtle"
|
|
188
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
189
|
-
className: "flex-1 items-center justify-center px-screen-margin",
|
|
190
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
191
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
192
|
+
className: "items-center justify-center px-screen-margin py-space-40",
|
|
190
193
|
children: /*#__PURE__*/_jsx(Text, {
|
|
191
194
|
className: "text-body font-body text-text-secondary text-center",
|
|
192
195
|
children: t('accounts.members.errors.missingAccount') || 'No account selected.'
|
|
193
196
|
})
|
|
194
|
-
})
|
|
197
|
+
})
|
|
195
198
|
});
|
|
196
199
|
}
|
|
197
200
|
return /*#__PURE__*/_jsxs(View, {
|
|
198
|
-
className: "
|
|
199
|
-
children: [/*#__PURE__*/_jsx(
|
|
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
|
-
autoCorrect: false,
|
|
245
|
-
autoComplete: "off"
|
|
246
|
-
})
|
|
247
|
-
}), inviteError ? /*#__PURE__*/_jsx(Text, {
|
|
248
|
-
className: "text-caption font-caption px-space-4",
|
|
201
|
+
className: "px-screen-margin pt-space-16 pb-space-32 gap-space-24",
|
|
202
|
+
children: [!accountQuery.isLoading && !canRead ? /*#__PURE__*/_jsx(Text, {
|
|
203
|
+
className: "text-body font-body text-text-secondary text-center py-space-24",
|
|
204
|
+
children: t('accounts.members.errors.noPermission') || 'You do not have permission to view members.'
|
|
205
|
+
}) : null, canInvite ? /*#__PURE__*/_jsxs(View, {
|
|
206
|
+
className: "gap-space-12 p-space-16 rounded-radius-20 bg-fill",
|
|
207
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
208
|
+
className: "text-body font-bodyBold text-text",
|
|
209
|
+
children: t('accounts.members.invite.title') || 'Add a member'
|
|
210
|
+
}), /*#__PURE__*/_jsx(TextField, {
|
|
211
|
+
isInvalid: !!inviteError,
|
|
212
|
+
children: /*#__PURE__*/_jsx(TextFieldInput, {
|
|
213
|
+
floatingLabel: true,
|
|
214
|
+
label: t('accounts.members.invite.identifierLabel') || 'Username or email',
|
|
215
|
+
value: inviteIdentifier,
|
|
216
|
+
onChangeText: value => {
|
|
217
|
+
setInviteIdentifier(value);
|
|
218
|
+
if (inviteError) setInviteError(null);
|
|
219
|
+
},
|
|
220
|
+
isInvalid: !!inviteError,
|
|
221
|
+
autoCapitalize: "none",
|
|
222
|
+
autoCorrect: false,
|
|
223
|
+
autoComplete: "off"
|
|
224
|
+
})
|
|
225
|
+
}), inviteError ? /*#__PURE__*/_jsx(Text, {
|
|
226
|
+
className: "text-caption font-caption px-space-4",
|
|
227
|
+
style: {
|
|
228
|
+
color: colors.negative
|
|
229
|
+
},
|
|
230
|
+
children: inviteError
|
|
231
|
+
}) : null, /*#__PURE__*/_jsx(Text, {
|
|
232
|
+
className: "text-caption font-caption text-text-secondary px-space-4",
|
|
233
|
+
children: t('accounts.members.invite.roleLabel') || 'Role'
|
|
234
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
235
|
+
className: "flex-row flex-wrap gap-space-8",
|
|
236
|
+
children: ASSIGNABLE_ROLES.map(role => {
|
|
237
|
+
const selected = role === inviteRole;
|
|
238
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
239
|
+
accessibilityRole: "radio",
|
|
240
|
+
accessibilityState: {
|
|
241
|
+
selected
|
|
242
|
+
},
|
|
243
|
+
accessibilityLabel: roleLabel(role),
|
|
244
|
+
onPress: () => setInviteRole(role),
|
|
245
|
+
activeOpacity: 0.7,
|
|
246
|
+
className: "px-space-12 py-space-8 rounded-radius-full",
|
|
249
247
|
style: {
|
|
250
|
-
|
|
248
|
+
backgroundColor: selected ? colors.primary : colors.card,
|
|
249
|
+
borderWidth: 1,
|
|
250
|
+
borderColor: selected ? colors.primary : colors.border
|
|
251
251
|
},
|
|
252
|
-
children:
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
252
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
253
|
+
className: "text-caption font-bodyBold",
|
|
254
|
+
style: {
|
|
255
|
+
color: selected ? colors.background : colors.text
|
|
256
|
+
},
|
|
257
|
+
children: roleLabel(role)
|
|
258
|
+
})
|
|
259
|
+
}, role);
|
|
260
|
+
})
|
|
261
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
262
|
+
variant: "primary",
|
|
263
|
+
onPress: handleInvite,
|
|
264
|
+
disabled: inviteMutation.isPending || !inviteIdentifier.trim(),
|
|
265
|
+
loading: inviteMutation.isPending,
|
|
266
|
+
accessibilityLabel: t('accounts.members.invite.submit') || 'Add member',
|
|
267
|
+
className: "w-full",
|
|
268
|
+
children: t('accounts.members.invite.submit') || 'Add member'
|
|
269
|
+
})]
|
|
270
|
+
}) : null, canRead ? /*#__PURE__*/_jsx(View, {
|
|
271
|
+
className: "gap-space-8",
|
|
272
|
+
children: membersQuery.isLoading ? /*#__PURE__*/_jsx(View, {
|
|
273
|
+
className: "items-center py-space-24",
|
|
274
|
+
children: /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
275
|
+
color: colors.primary
|
|
276
|
+
})
|
|
277
|
+
}) : members.length === 0 ? /*#__PURE__*/_jsx(Text, {
|
|
278
|
+
className: "text-body font-body text-text-secondary text-center py-space-24",
|
|
279
|
+
children: t('accounts.members.empty') || 'No members yet.'
|
|
280
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
281
|
+
className: "rounded-radius-20 bg-fill overflow-hidden",
|
|
282
|
+
children: members.map((member, index) => {
|
|
283
|
+
const isOwner = member.role === 'owner';
|
|
284
|
+
const isLastOwner = isOwner && ownerCount <= 1;
|
|
285
|
+
const canEditThisRole = canUpdate && !isOwner;
|
|
286
|
+
const canRemoveThisMember = canRemove && !isLastOwner && (!isOwner || canTransfer);
|
|
287
|
+
const canTransferToThis = canTransfer && !isOwner && member.status === 'active';
|
|
288
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
289
|
+
children: [index > 0 ? /*#__PURE__*/_jsx(Divider, {
|
|
290
|
+
color: colors.border,
|
|
291
|
+
spacing: 0
|
|
292
|
+
}) : null, /*#__PURE__*/_jsxs(View, {
|
|
293
|
+
className: "p-space-16 gap-space-8",
|
|
294
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
295
|
+
className: "flex-row items-center gap-space-8",
|
|
296
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
297
|
+
className: "text-body font-bodyBold text-text flex-1",
|
|
298
|
+
numberOfLines: 1,
|
|
299
|
+
children: member.memberUserId
|
|
300
|
+
}), isOwner ? /*#__PURE__*/_jsx(View, {
|
|
301
|
+
className: "px-space-8 py-space-4 rounded-radius-full",
|
|
276
302
|
style: {
|
|
277
|
-
|
|
303
|
+
backgroundColor: colors.primarySubtle
|
|
278
304
|
},
|
|
279
|
-
children:
|
|
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
|
-
className: "flex-row items-center gap-space-8",
|
|
318
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
319
|
-
className: "text-body font-bodyBold text-text flex-1",
|
|
320
|
-
numberOfLines: 1,
|
|
321
|
-
children: member.memberUserId
|
|
322
|
-
}), isOwner ? /*#__PURE__*/_jsx(View, {
|
|
323
|
-
className: "px-space-8 py-space-4 rounded-radius-full",
|
|
324
|
-
style: {
|
|
325
|
-
backgroundColor: colors.primarySubtle
|
|
326
|
-
},
|
|
327
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
328
|
-
className: "text-caption font-bodyBold",
|
|
329
|
-
style: {
|
|
330
|
-
color: colors.primary
|
|
331
|
-
},
|
|
332
|
-
children: roleLabel('owner')
|
|
333
|
-
})
|
|
334
|
-
}) : null, member.status !== 'active' ? /*#__PURE__*/_jsx(View, {
|
|
335
|
-
className: "px-space-8 py-space-4 rounded-radius-full",
|
|
305
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
306
|
+
className: "text-caption font-bodyBold",
|
|
307
|
+
style: {
|
|
308
|
+
color: colors.primary
|
|
309
|
+
},
|
|
310
|
+
children: roleLabel('owner')
|
|
311
|
+
})
|
|
312
|
+
}) : null, member.status !== 'active' ? /*#__PURE__*/_jsx(View, {
|
|
313
|
+
className: "px-space-8 py-space-4 rounded-radius-full",
|
|
314
|
+
style: {
|
|
315
|
+
backgroundColor: colors.card
|
|
316
|
+
},
|
|
317
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
318
|
+
className: "text-caption font-caption capitalize text-text-secondary",
|
|
319
|
+
children: member.status
|
|
320
|
+
})
|
|
321
|
+
}) : null]
|
|
322
|
+
}), canEditThisRole ? /*#__PURE__*/_jsx(View, {
|
|
323
|
+
className: "flex-row flex-wrap gap-space-8",
|
|
324
|
+
children: ASSIGNABLE_ROLES.map(role => {
|
|
325
|
+
const selected = role === member.role;
|
|
326
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
327
|
+
accessibilityRole: "radio",
|
|
328
|
+
accessibilityState: {
|
|
329
|
+
selected
|
|
330
|
+
},
|
|
331
|
+
accessibilityLabel: roleLabel(role),
|
|
332
|
+
onPress: () => handleChangeRole(member, role),
|
|
333
|
+
disabled: updateMutation.isPending,
|
|
334
|
+
activeOpacity: 0.7,
|
|
335
|
+
className: "px-space-12 py-space-4 rounded-radius-full",
|
|
336
|
+
style: {
|
|
337
|
+
backgroundColor: selected ? colors.primary : colors.card,
|
|
338
|
+
borderWidth: 1,
|
|
339
|
+
borderColor: selected ? colors.primary : colors.border
|
|
340
|
+
},
|
|
341
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
342
|
+
className: "text-caption font-bodyBold",
|
|
336
343
|
style: {
|
|
337
|
-
|
|
344
|
+
color: selected ? colors.background : colors.text
|
|
338
345
|
},
|
|
339
|
-
children:
|
|
340
|
-
className: "text-caption font-caption capitalize text-text-secondary",
|
|
341
|
-
children: member.status
|
|
342
|
-
})
|
|
343
|
-
}) : null]
|
|
344
|
-
}), canEditThisRole ? /*#__PURE__*/_jsx(View, {
|
|
345
|
-
className: "flex-row flex-wrap gap-space-8",
|
|
346
|
-
children: ASSIGNABLE_ROLES.map(role => {
|
|
347
|
-
const selected = role === member.role;
|
|
348
|
-
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
349
|
-
accessibilityRole: "radio",
|
|
350
|
-
accessibilityState: {
|
|
351
|
-
selected
|
|
352
|
-
},
|
|
353
|
-
accessibilityLabel: roleLabel(role),
|
|
354
|
-
onPress: () => handleChangeRole(member, role),
|
|
355
|
-
disabled: updateMutation.isPending,
|
|
356
|
-
activeOpacity: 0.7,
|
|
357
|
-
className: "px-space-12 py-space-4 rounded-radius-full",
|
|
358
|
-
style: {
|
|
359
|
-
backgroundColor: selected ? colors.primary : colors.card,
|
|
360
|
-
borderWidth: 1,
|
|
361
|
-
borderColor: selected ? colors.primary : colors.border
|
|
362
|
-
},
|
|
363
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
364
|
-
className: "text-caption font-bodyBold",
|
|
365
|
-
style: {
|
|
366
|
-
color: selected ? colors.background : colors.text
|
|
367
|
-
},
|
|
368
|
-
children: roleLabel(role)
|
|
369
|
-
})
|
|
370
|
-
}, role);
|
|
346
|
+
children: roleLabel(role)
|
|
371
347
|
})
|
|
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
|
-
})
|
|
348
|
+
}, role);
|
|
349
|
+
})
|
|
350
|
+
}) : !isOwner ? /*#__PURE__*/_jsx(Text, {
|
|
351
|
+
className: "text-caption font-caption text-text-secondary",
|
|
352
|
+
children: roleLabel(member.role)
|
|
353
|
+
}) : null, canTransferToThis || canRemoveThisMember ? /*#__PURE__*/_jsxs(View, {
|
|
354
|
+
className: "flex-row gap-space-16 pt-space-4",
|
|
355
|
+
children: [canTransferToThis ? /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
356
|
+
accessibilityRole: "button",
|
|
357
|
+
accessibilityLabel: t('accounts.members.actions.transfer') || 'Transfer ownership',
|
|
358
|
+
onPress: () => confirmTransfer(member),
|
|
359
|
+
activeOpacity: 0.7,
|
|
360
|
+
className: "flex-row items-center gap-space-4",
|
|
361
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
362
|
+
name: "swap-horizontal-outline",
|
|
363
|
+
size: 16,
|
|
364
|
+
color: colors.icon
|
|
365
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
366
|
+
className: "text-caption font-bodyBold text-text-secondary",
|
|
367
|
+
children: t('accounts.members.actions.transfer') || 'Transfer ownership'
|
|
368
|
+
})]
|
|
369
|
+
}) : null, canRemoveThisMember ? /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
370
|
+
accessibilityRole: "button",
|
|
371
|
+
accessibilityLabel: t('accounts.members.actions.remove') || 'Remove member',
|
|
372
|
+
onPress: () => confirmRemove(member),
|
|
373
|
+
activeOpacity: 0.7,
|
|
374
|
+
className: "flex-row items-center gap-space-4",
|
|
375
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
376
|
+
name: "trash-outline",
|
|
377
|
+
size: 16,
|
|
378
|
+
color: colors.error
|
|
379
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
380
|
+
className: "text-caption font-bodyBold",
|
|
381
|
+
style: {
|
|
382
|
+
color: colors.error
|
|
383
|
+
},
|
|
384
|
+
children: t('accounts.members.actions.remove') || 'Remove'
|
|
385
|
+
})]
|
|
386
|
+
}) : null]
|
|
387
|
+
}) : null]
|
|
388
|
+
})]
|
|
389
|
+
}, member._id);
|
|
390
|
+
})
|
|
415
391
|
})
|
|
416
|
-
})
|
|
417
|
-
control: removeDialog,
|
|
418
|
-
title: t('accounts.members.removeConfirm.title') || 'Remove member',
|
|
419
|
-
description: t('accounts.members.removeConfirm.description') || 'Remove this member from the account? They will lose all access.',
|
|
420
|
-
actions: [{
|
|
421
|
-
label: t('accounts.members.actions.remove') || 'Remove',
|
|
422
|
-
color: 'destructive',
|
|
423
|
-
onPress: () => {
|
|
424
|
-
const target = memberToRemove;
|
|
425
|
-
setMemberToRemove(null);
|
|
426
|
-
if (target) {
|
|
427
|
-
removeMutation.mutate(target._id);
|
|
428
|
-
} else {
|
|
429
|
-
loggerUtil.debug('Remove confirmed with no pending member', {
|
|
430
|
-
component: 'AccountMembersScreen'
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}, {
|
|
435
|
-
label: t('common.cancel') || 'Cancel',
|
|
436
|
-
color: 'cancel'
|
|
437
|
-
}]
|
|
438
|
-
}), /*#__PURE__*/_jsx(Dialog, {
|
|
439
|
-
control: transferDialog,
|
|
440
|
-
title: t('accounts.members.transferConfirm.title') || 'Transfer ownership',
|
|
441
|
-
description: t('accounts.members.transferConfirm.description') || 'Transfer ownership of this account to this member? You will be demoted to admin. This cannot be undone.',
|
|
442
|
-
actions: [{
|
|
443
|
-
label: t('accounts.members.actions.transfer') || 'Transfer ownership',
|
|
444
|
-
color: 'destructive',
|
|
445
|
-
onPress: () => {
|
|
446
|
-
const target = memberToPromote;
|
|
447
|
-
setMemberToPromote(null);
|
|
448
|
-
if (target) {
|
|
449
|
-
transferMutation.mutate(target.memberUserId);
|
|
450
|
-
} else {
|
|
451
|
-
loggerUtil.debug('Transfer confirmed with no pending member', {
|
|
452
|
-
component: 'AccountMembersScreen'
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
}, {
|
|
457
|
-
label: t('common.cancel') || 'Cancel',
|
|
458
|
-
color: 'cancel'
|
|
459
|
-
}]
|
|
460
|
-
})]
|
|
392
|
+
}) : null]
|
|
461
393
|
});
|
|
462
394
|
};
|
|
463
395
|
export default AccountMembersScreen;
|