@oxyhq/services 6.9.46 → 6.10.2
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 +36 -13
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/client.js +0 -20
- package/lib/commonjs/ui/client.js.map +1 -1
- package/lib/commonjs/ui/components/ActingAsBanner.js +0 -4
- package/lib/commonjs/ui/components/ActingAsBanner.js.map +1 -1
- package/lib/commonjs/ui/components/ActivityIndicator.js +1 -1
- package/lib/commonjs/ui/components/ActivityIndicator.js.map +1 -1
- package/lib/commonjs/ui/components/Avatar.js +0 -2
- package/lib/commonjs/ui/components/Avatar.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheet.js +33 -398
- package/lib/commonjs/ui/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +8 -0
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +3 -5
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +0 -5
- package/lib/commonjs/ui/components/Header.js.map +1 -1
- package/lib/commonjs/ui/components/Icon.js +6 -7
- package/lib/commonjs/ui/components/Icon.js.map +1 -1
- package/lib/commonjs/ui/components/IconButton/IconButton.js +1 -5
- package/lib/commonjs/ui/components/IconButton/IconButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyPayButton.js +0 -2
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +100 -37
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +23 -9
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +11 -8
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
- package/lib/commonjs/ui/components/QuickActions.js +2 -2
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -1
- package/lib/commonjs/ui/components/SignInModal.js +139 -284
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js +0 -2
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/commonjs/ui/components/TextField.js +0 -1
- package/lib/commonjs/ui/components/TextField.js.map +1 -1
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js +1 -1
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js +0 -2
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +0 -2
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +80 -76
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +6 -8
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +18 -23
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/styles.js +213 -25
- package/lib/commonjs/ui/components/fileManagement/styles.js.map +1 -1
- package/lib/commonjs/ui/components/logo/LogoIcon.js +63 -0
- package/lib/commonjs/ui/components/logo/LogoIcon.js.map +1 -0
- package/lib/commonjs/ui/components/logo/LogoText.js +50 -0
- package/lib/commonjs/ui/components/logo/LogoText.js.map +1 -0
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +54 -88
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +2 -2
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/paymentStyles.js +2 -10
- package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -1
- package/lib/commonjs/ui/components/styles/overlay.js +7 -9
- package/lib/commonjs/ui/components/styles/overlay.js.map +1 -1
- package/lib/commonjs/ui/components/theming.js +0 -1
- package/lib/commonjs/ui/components/theming.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +34 -21
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +1 -3
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +32 -12
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +10 -5
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationKeys.js +34 -0
- package/lib/commonjs/ui/hooks/mutations/mutationKeys.js.map +1 -0
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +235 -57
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +17 -13
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/index.js +6 -0
- package/lib/commonjs/ui/hooks/queries/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +2 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +80 -3
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js +36 -1
- package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queryClient.js +168 -70
- package/lib/commonjs/ui/hooks/queryClient.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAsyncAction.js +7 -7
- package/lib/commonjs/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +0 -8
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +71 -20
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFileDownloadUrl.js +12 -41
- package/lib/commonjs/ui/hooks/useFileDownloadUrl.js.map +1 -1
- package/lib/commonjs/ui/hooks/useMutationStatus.js +86 -0
- package/lib/commonjs/ui/hooks/useMutationStatus.js.map +1 -0
- package/lib/commonjs/ui/hooks/useOnlineStatus.js +33 -0
- package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSessionSocket.js +101 -130
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSettingToggle.js +4 -4
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/commonjs/ui/index.js +1 -11
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +55 -3
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +16 -16
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +108 -123
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +20 -19
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +204 -161
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +18 -18
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +22 -23
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +939 -0
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js +13 -20
- package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +10 -13
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +4 -4
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +17 -15
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +797 -159
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +8 -9
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +29 -21
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +3 -5
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +5 -5
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +2 -2
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +75 -73
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +32 -21
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +4 -3
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +3 -3
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +57 -56
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +2 -3
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +39 -22
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +18 -21
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +0 -3
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +6 -10
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +6 -6
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +13 -19
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +5 -5
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/server.js +0 -5
- package/lib/commonjs/ui/server.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +0 -5
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
- package/lib/commonjs/ui/styles/index.js +0 -11
- package/lib/commonjs/ui/styles/index.js.map +1 -1
- package/lib/commonjs/ui/styles/spacing.js +1 -42
- package/lib/commonjs/ui/styles/spacing.js.map +1 -1
- package/lib/commonjs/ui/styles/theme.js +0 -4
- package/lib/commonjs/ui/styles/theme.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +58 -39
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/utils/sessionHelpers.js +3 -1
- package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/commonjs/ui/utils/userUtils.js +33 -16
- package/lib/commonjs/ui/utils/userUtils.js.map +1 -1
- package/lib/module/index.js +9 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/client.js +0 -6
- package/lib/module/ui/client.js.map +1 -1
- package/lib/module/ui/components/ActingAsBanner.js +0 -4
- package/lib/module/ui/components/ActingAsBanner.js.map +1 -1
- package/lib/module/ui/components/ActivityIndicator.js +1 -1
- package/lib/module/ui/components/ActivityIndicator.js.map +1 -1
- package/lib/module/ui/components/Avatar.js +0 -2
- package/lib/module/ui/components/Avatar.js.map +1 -1
- package/lib/module/ui/components/BottomSheet.js +35 -400
- package/lib/module/ui/components/BottomSheet.js.map +1 -1
- package/lib/module/ui/components/BottomSheetRouter.js +9 -1
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +2 -4
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/Header.js +0 -5
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/Icon.js +6 -7
- package/lib/module/ui/components/Icon.js.map +1 -1
- package/lib/module/ui/components/IconButton/IconButton.js +1 -5
- package/lib/module/ui/components/IconButton/IconButton.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +0 -2
- package/lib/module/ui/components/OxyPayButton.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +103 -40
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +23 -9
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +11 -8
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/components/QuickActions.js +2 -2
- package/lib/module/ui/components/QuickActions.js.map +1 -1
- package/lib/module/ui/components/SignInModal.js +137 -284
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/components/StepBasedScreen.js +0 -2
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/module/ui/components/TextField.js +0 -1
- package/lib/module/ui/components/TextField.js.map +1 -1
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js +1 -1
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js.map +1 -1
- package/lib/module/ui/components/feedback/feedbackStyles.js +0 -2
- package/lib/module/ui/components/feedback/feedbackStyles.js.map +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js +0 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +80 -75
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +6 -7
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +18 -22
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/fileManagement/styles.js +212 -24
- package/lib/module/ui/components/fileManagement/styles.js.map +1 -1
- package/lib/module/ui/components/logo/LogoIcon.js +56 -0
- package/lib/module/ui/components/logo/LogoIcon.js.map +1 -0
- package/lib/module/ui/components/logo/LogoText.js +43 -0
- package/lib/module/ui/components/logo/LogoText.js.map +1 -0
- package/lib/module/ui/components/modals/DeleteAccountModal.js +55 -88
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/module/ui/components/payment/paymentStyles.js +2 -10
- package/lib/module/ui/components/payment/paymentStyles.js.map +1 -1
- package/lib/module/ui/components/styles/overlay.js +8 -8
- package/lib/module/ui/components/styles/overlay.js.map +1 -1
- package/lib/module/ui/components/theming.js +0 -1
- package/lib/module/ui/components/theming.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +32 -19
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +1 -3
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/index.js +5 -3
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js +6 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationKeys.js +30 -0
- package/lib/module/ui/hooks/mutations/mutationKeys.js.map +1 -0
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +231 -52
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +9 -5
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/index.js +1 -1
- package/lib/module/ui/hooks/queries/index.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +2 -1
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +80 -3
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useSecurityQueries.js +35 -1
- package/lib/module/ui/hooks/queries/useSecurityQueries.js.map +1 -1
- package/lib/module/ui/hooks/queryClient.js +166 -68
- package/lib/module/ui/hooks/queryClient.js.map +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js +3 -3
- package/lib/module/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +0 -3
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +73 -22
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useFileDownloadUrl.js +11 -39
- package/lib/module/ui/hooks/useFileDownloadUrl.js.map +1 -1
- package/lib/module/ui/hooks/useMutationStatus.js +82 -0
- package/lib/module/ui/hooks/useMutationStatus.js.map +1 -0
- package/lib/module/ui/hooks/useOnlineStatus.js +29 -0
- package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -0
- package/lib/module/ui/hooks/useSessionSocket.js +101 -130
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/module/ui/index.js +1 -10
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +54 -2
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +15 -14
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +96 -111
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +19 -18
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +189 -145
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +15 -15
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +14 -15
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +936 -0
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -0
- package/lib/module/ui/screens/CreateManagedAccountScreen.js +11 -18
- package/lib/module/ui/screens/CreateManagedAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +8 -11
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +3 -3
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +14 -12
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +764 -125
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +2 -3
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +26 -17
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -3
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +3 -3
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +2 -2
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +60 -57
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +27 -16
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +4 -3
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +2 -2
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +48 -47
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +2 -3
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +40 -23
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +16 -19
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +0 -3
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +6 -10
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +6 -6
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +13 -19
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +5 -5
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/server.js +0 -4
- package/lib/module/ui/server.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +0 -5
- package/lib/module/ui/styles/authStyles.js.map +1 -1
- package/lib/module/ui/styles/index.js +0 -1
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/module/ui/styles/spacing.js +0 -42
- package/lib/module/ui/styles/spacing.js.map +1 -1
- package/lib/module/ui/styles/theme.js +0 -4
- package/lib/module/ui/styles/theme.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +54 -36
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/utils/sessionHelpers.js +3 -1
- package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/module/ui/utils/userUtils.js +34 -16
- package/lib/module/ui/utils/userUtils.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +7 -3
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/client.d.ts +0 -2
- package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ActingAsBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/Avatar.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts +27 -27
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/Header.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/Icon.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/Icon.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileCard.d.ts +4 -1
- package/lib/typescript/commonjs/ui/components/ProfileCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/TextField/helpers.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/TextField/types.d.ts +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/TextField.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts +0 -1
- package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts +0 -2
- package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/styles.d.ts +200 -17
- package/lib/typescript/commonjs/ui/components/fileManagement/styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/logo/LogoIcon.d.ts +22 -0
- package/lib/typescript/commonjs/ui/components/logo/LogoIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/logo/LogoText.d.ts +22 -0
- package/lib/typescript/commonjs/ui/components/logo/LogoText.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/paymentStyles.d.ts +0 -7
- package/lib/typescript/commonjs/ui/components/payment/paymentStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/styles/overlay.d.ts +3 -1
- package/lib/typescript/commonjs/ui/components/styles/overlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/theming.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/index.d.ts +5 -3
- package/lib/typescript/commonjs/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts +11 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts +25 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +161 -9
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/index.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +1 -0
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +22 -8
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts +13 -3
- package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +7 -5
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts +57 -9
- package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +0 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +10 -2
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useFileDownloadUrl.d.ts +2 -6
- package/lib/typescript/commonjs/ui/hooks/useFileDownloadUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useMutationStatus.d.ts +23 -0
- package/lib/typescript/commonjs/ui/hooks/useMutationStatus.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +13 -0
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSessionSocket.d.ts +1 -2
- package/lib/typescript/commonjs/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +1 -4
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +48 -2
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountOverviewScreen.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.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +49 -0
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/CreateManagedAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/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/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/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/server.d.ts +0 -2
- package/lib/typescript/commonjs/ui/server.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/styles/authStyles.d.ts +0 -4
- package/lib/typescript/commonjs/ui/styles/authStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/styles/index.d.ts +0 -1
- package/lib/typescript/commonjs/ui/styles/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/styles/spacing.d.ts +0 -36
- package/lib/typescript/commonjs/ui/styles/spacing.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/styles/theme.d.ts +0 -1
- package/lib/typescript/commonjs/ui/styles/theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +39 -12
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/sessionHelpers.d.ts +3 -1
- package/lib/typescript/commonjs/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts +19 -18
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +7 -3
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +0 -2
- package/lib/typescript/module/ui/client.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ActingAsBanner.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Avatar.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/BottomSheet.d.ts +27 -27
- package/lib/typescript/module/ui/components/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Header.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Icon.d.ts +3 -2
- package/lib/typescript/module/ui/components/Icon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileCard.d.ts +4 -1
- package/lib/typescript/module/ui/components/ProfileCard.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts +2 -2
- package/lib/typescript/module/ui/components/TextField/helpers.d.ts +2 -2
- package/lib/typescript/module/ui/components/TextField/types.d.ts +0 -1
- package/lib/typescript/module/ui/components/TextField/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField.d.ts +1 -1
- package/lib/typescript/module/ui/components/TextField.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts +0 -1
- package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts +0 -2
- package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts +3 -2
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/styles.d.ts +200 -17
- package/lib/typescript/module/ui/components/fileManagement/styles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/logo/LogoIcon.d.ts +22 -0
- package/lib/typescript/module/ui/components/logo/LogoIcon.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/logo/LogoText.d.ts +22 -0
- package/lib/typescript/module/ui/components/logo/LogoText.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +2 -2
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts +0 -7
- package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/styles/overlay.d.ts +3 -1
- package/lib/typescript/module/ui/components/styles/overlay.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/theming.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/index.d.ts +5 -3
- package/lib/typescript/module/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts +11 -0
- package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts +25 -0
- package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +161 -9
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/index.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/queries/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +1 -0
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +22 -8
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts +13 -3
- package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +7 -5
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queryClient.d.ts +57 -9
- package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +0 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +10 -2
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useFileDownloadUrl.d.ts +2 -6
- package/lib/typescript/module/ui/hooks/useFileDownloadUrl.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useMutationStatus.d.ts +23 -0
- package/lib/typescript/module/ui/hooks/useMutationStatus.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +13 -0
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSessionSocket.d.ts +1 -2
- package/lib/typescript/module/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +1 -4
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +48 -2
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.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 +49 -0
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/CreateManagedAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/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/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/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/server.d.ts +0 -2
- package/lib/typescript/module/ui/server.d.ts.map +1 -1
- package/lib/typescript/module/ui/styles/authStyles.d.ts +0 -4
- package/lib/typescript/module/ui/styles/authStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/styles/index.d.ts +0 -1
- package/lib/typescript/module/ui/styles/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/styles/spacing.d.ts +0 -36
- package/lib/typescript/module/ui/styles/spacing.d.ts.map +1 -1
- package/lib/typescript/module/ui/styles/theme.d.ts +0 -1
- package/lib/typescript/module/ui/styles/theme.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +39 -12
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/sessionHelpers.d.ts +3 -1
- package/lib/typescript/module/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/userUtils.d.ts +19 -18
- package/lib/typescript/module/ui/utils/userUtils.d.ts.map +1 -1
- package/lib/typescript/types/expo-vector-icons.d.ts +7 -4
- package/package.json +64 -31
- package/src/index.ts +11 -4
- package/src/types/expo-vector-icons.d.ts +7 -4
- package/src/ui/client.ts +0 -6
- package/src/ui/components/ActingAsBanner.tsx +0 -4
- package/src/ui/components/ActivityIndicator.tsx +1 -1
- package/src/ui/components/Avatar.tsx +0 -2
- package/src/ui/components/BottomSheet.tsx +41 -440
- package/src/ui/components/BottomSheetRouter.tsx +12 -1
- package/src/ui/components/FollowButton.tsx +2 -4
- package/src/ui/components/Header.tsx +0 -5
- package/src/ui/components/Icon.tsx +12 -6
- package/src/ui/components/IconButton/IconButton.tsx +0 -3
- package/src/ui/components/OxyPayButton.tsx +0 -2
- package/src/ui/components/OxyProvider.tsx +127 -48
- package/src/ui/components/OxySignInButton.tsx +21 -9
- package/src/ui/components/ProfileCard.tsx +13 -10
- package/src/ui/components/QuickActions.tsx +2 -2
- package/src/ui/components/SignInModal.tsx +80 -199
- package/src/ui/components/StepBasedScreen.tsx +0 -2
- package/src/ui/components/TextField/Addons/Outline.tsx +2 -2
- package/src/ui/components/TextField/helpers.tsx +2 -2
- package/src/ui/components/TextField/types.tsx +0 -1
- package/src/ui/components/TextField.tsx +1 -2
- package/src/ui/components/TouchableRipple/TouchableRipple.native.tsx +1 -1
- package/src/ui/components/feedback/feedbackStyles.ts +0 -2
- package/src/ui/components/fileManagement/AnimatedButton.tsx +0 -1
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +71 -65
- package/src/ui/components/fileManagement/FileViewer.tsx +6 -9
- package/src/ui/components/fileManagement/UploadPreview.tsx +21 -25
- package/src/ui/components/fileManagement/styles.ts +206 -18
- package/src/ui/components/logo/LogoIcon.tsx +70 -0
- package/src/ui/components/logo/LogoText.tsx +70 -0
- package/src/ui/components/modals/DeleteAccountModal.tsx +56 -91
- package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
- package/src/ui/components/payment/PaymentReviewStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSuccessStep.tsx +1 -1
- package/src/ui/components/payment/paymentStyles.ts +0 -8
- package/src/ui/components/styles/overlay.tsx +17 -8
- package/src/ui/components/theming.tsx +0 -1
- package/src/ui/components/types.tsx +3 -2
- package/src/ui/context/OxyContext.tsx +34 -19
- package/src/ui/context/hooks/useAuthOperations.ts +1 -3
- package/src/ui/hooks/index.ts +11 -4
- package/src/ui/hooks/mutations/mutationFactory.ts +16 -1
- package/src/ui/hooks/mutations/mutationKeys.ts +28 -0
- package/src/ui/hooks/mutations/useAccountMutations.ts +251 -59
- package/src/ui/hooks/mutations/useServicesMutations.ts +10 -4
- package/src/ui/hooks/queries/index.ts +1 -0
- package/src/ui/hooks/queries/queryKeys.ts +2 -0
- package/src/ui/hooks/queries/useAccountQueries.ts +83 -3
- package/src/ui/hooks/queries/useSecurityQueries.ts +42 -2
- package/src/ui/hooks/queryClient.ts +194 -69
- package/src/ui/hooks/useAsyncAction.ts +3 -3
- package/src/ui/hooks/useAuth.ts +0 -2
- package/src/ui/hooks/useAvatarPicker.ts +108 -27
- package/src/ui/hooks/useFileDownloadUrl.ts +15 -39
- package/src/ui/hooks/useMutationStatus.ts +111 -0
- package/src/ui/hooks/useOnlineStatus.ts +29 -0
- package/src/ui/hooks/useSessionSocket.ts +136 -126
- package/src/ui/hooks/useSettingToggle.ts +1 -1
- package/src/ui/index.ts +0 -12
- package/src/ui/navigation/routes.ts +93 -2
- package/src/ui/screens/AccountCenterScreen.tsx +15 -13
- package/src/ui/screens/AccountOverviewScreen.tsx +94 -104
- package/src/ui/screens/AccountSettingsScreen.tsx +18 -17
- package/src/ui/screens/AccountSwitcherScreen.tsx +331 -298
- package/src/ui/screens/AccountVerificationScreen.tsx +15 -15
- package/src/ui/screens/AppInfoScreen.tsx +8 -13
- package/src/ui/screens/AvatarCropScreen.tsx +1073 -0
- package/src/ui/screens/CreateManagedAccountScreen.tsx +5 -16
- package/src/ui/screens/EditProfileFieldScreen.tsx +5 -10
- package/src/ui/screens/FAQScreen.tsx +3 -3
- package/src/ui/screens/FeedbackScreen.tsx +14 -12
- package/src/ui/screens/FileManagementScreen.tsx +885 -124
- package/src/ui/screens/HelpSupportScreen.tsx +2 -3
- package/src/ui/screens/HistoryViewScreen.tsx +24 -9
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -3
- package/src/ui/screens/LegalDocumentsScreen.tsx +3 -3
- package/src/ui/screens/PaymentGatewayScreen.tsx +2 -2
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +51 -56
- package/src/ui/screens/PrivacySettingsScreen.tsx +22 -20
- package/src/ui/screens/ProfileScreen.tsx +1 -2
- package/src/ui/screens/SavesCollectionsScreen.tsx +2 -2
- package/src/ui/screens/SessionManagementScreen.tsx +35 -47
- package/src/ui/screens/UserLinksScreen.tsx +1 -2
- package/src/ui/screens/UserListScreen.tsx +30 -19
- package/src/ui/screens/WelcomeNewUserScreen.tsx +14 -18
- package/src/ui/screens/karma/KarmaAboutScreen.tsx +0 -3
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +4 -8
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +1 -1
- package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +3 -4
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +13 -18
- package/src/ui/screens/karma/KarmaRulesScreen.tsx +3 -4
- package/src/ui/server.ts +0 -4
- package/src/ui/styles/authStyles.ts +0 -5
- package/src/ui/styles/index.ts +0 -1
- package/src/ui/styles/spacing.ts +0 -43
- package/src/ui/styles/theme.ts +0 -4
- package/src/ui/utils/fileManagement.ts +66 -38
- package/src/ui/utils/sessionHelpers.ts +3 -1
- package/src/ui/utils/userUtils.ts +45 -29
- package/lib/commonjs/lib/sonner-safe.js +0 -32
- package/lib/commonjs/lib/sonner-safe.js.map +0 -1
- package/lib/commonjs/lib/sonner.js +0 -19
- package/lib/commonjs/lib/sonner.js.map +0 -1
- package/lib/commonjs/lib/sonner.native.js +0 -24
- package/lib/commonjs/lib/sonner.native.js.map +0 -1
- package/lib/commonjs/lib/sonner.web.js +0 -24
- package/lib/commonjs/lib/sonner.web.js.map +0 -1
- package/lib/commonjs/ui/hooks/useThemeColors.js +0 -33
- package/lib/commonjs/ui/hooks/useThemeColors.js.map +0 -1
- package/lib/commonjs/ui/hooks/useThemeStyles.js +0 -38
- package/lib/commonjs/ui/hooks/useThemeStyles.js.map +0 -1
- package/lib/commonjs/ui/styles/fonts.js +0 -84
- package/lib/commonjs/ui/styles/fonts.js.map +0 -1
- package/lib/module/lib/sonner-safe.js +0 -29
- package/lib/module/lib/sonner-safe.js.map +0 -1
- package/lib/module/lib/sonner.js +0 -14
- package/lib/module/lib/sonner.js.map +0 -1
- package/lib/module/lib/sonner.native.js +0 -19
- package/lib/module/lib/sonner.native.js.map +0 -1
- package/lib/module/lib/sonner.web.js +0 -19
- package/lib/module/lib/sonner.web.js.map +0 -1
- package/lib/module/ui/hooks/useThemeColors.js +0 -29
- package/lib/module/ui/hooks/useThemeColors.js.map +0 -1
- package/lib/module/ui/hooks/useThemeStyles.js +0 -33
- package/lib/module/ui/hooks/useThemeStyles.js.map +0 -1
- package/lib/module/ui/styles/fonts.js +0 -81
- package/lib/module/ui/styles/fonts.js.map +0 -1
- package/lib/typescript/commonjs/lib/sonner-safe.d.ts +0 -9
- package/lib/typescript/commonjs/lib/sonner-safe.d.ts.map +0 -1
- package/lib/typescript/commonjs/lib/sonner.d.ts +0 -12
- package/lib/typescript/commonjs/lib/sonner.d.ts.map +0 -1
- package/lib/typescript/commonjs/lib/sonner.native.d.ts +0 -15
- package/lib/typescript/commonjs/lib/sonner.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/lib/sonner.web.d.ts +0 -15
- package/lib/typescript/commonjs/lib/sonner.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/useThemeColors.d.ts +0 -87
- package/lib/typescript/commonjs/ui/hooks/useThemeColors.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/useThemeStyles.d.ts +0 -22
- package/lib/typescript/commonjs/ui/hooks/useThemeStyles.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/styles/fonts.d.ts +0 -21
- package/lib/typescript/commonjs/ui/styles/fonts.d.ts.map +0 -1
- package/lib/typescript/module/lib/sonner-safe.d.ts +0 -9
- package/lib/typescript/module/lib/sonner-safe.d.ts.map +0 -1
- package/lib/typescript/module/lib/sonner.d.ts +0 -12
- package/lib/typescript/module/lib/sonner.d.ts.map +0 -1
- package/lib/typescript/module/lib/sonner.native.d.ts +0 -15
- package/lib/typescript/module/lib/sonner.native.d.ts.map +0 -1
- package/lib/typescript/module/lib/sonner.web.d.ts +0 -15
- package/lib/typescript/module/lib/sonner.web.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/useThemeColors.d.ts +0 -87
- package/lib/typescript/module/ui/hooks/useThemeColors.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/useThemeStyles.d.ts +0 -22
- package/lib/typescript/module/ui/hooks/useThemeStyles.d.ts.map +0 -1
- package/lib/typescript/module/ui/styles/fonts.d.ts +0 -21
- package/lib/typescript/module/ui/styles/fonts.d.ts.map +0 -1
- package/src/lib/sonner-safe.ts +0 -31
- package/src/lib/sonner.native.ts +0 -28
- package/src/lib/sonner.ts +0 -11
- package/src/lib/sonner.web.ts +0 -28
- package/src/ui/hooks/useThemeColors.ts +0 -27
- package/src/ui/hooks/useThemeStyles.ts +0 -50
- package/src/ui/styles/fonts.ts +0 -77
|
@@ -7,10 +7,10 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _expoImage = require("expo-image");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var Prompt = _prompt;
|
|
10
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
11
|
+
var _bloom = require("@oxyhq/bloom");
|
|
13
12
|
var _vectorIcons = require("@expo/vector-icons");
|
|
13
|
+
var _core = require("@oxyhq/core");
|
|
14
14
|
var _fileStore = require("../stores/fileStore.js");
|
|
15
15
|
var _Header = _interopRequireDefault(require("../components/Header.js"));
|
|
16
16
|
var _JustifiedPhotoGrid = _interopRequireDefault(require("../components/photogrid/JustifiedPhotoGrid.js"));
|
|
@@ -23,7 +23,6 @@ var _fileManagement = require("../utils/fileManagement.js");
|
|
|
23
23
|
var _FileViewer = require("../components/fileManagement/FileViewer.js");
|
|
24
24
|
var _FileDetailsModal = require("../components/fileManagement/FileDetailsModal.js");
|
|
25
25
|
var _UploadPreview = require("../components/fileManagement/UploadPreview.js");
|
|
26
|
-
var _dialog = require("@oxyhq/bloom/dialog");
|
|
27
26
|
var _styles = require("../components/fileManagement/styles.js");
|
|
28
27
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
28
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -40,11 +39,96 @@ const loadDocumentPicker = async () => {
|
|
|
40
39
|
throw new Error('expo-document-picker is not installed. Please install it: npx expo install expo-document-picker');
|
|
41
40
|
}
|
|
42
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* Extract error message from unknown error type.
|
|
44
|
+
* Delegates to the canonical `getErrorMessage` in `@oxyhq/core` and returns
|
|
45
|
+
* `undefined` for empty results (so callers can fall back to a translated
|
|
46
|
+
* message via `||`).
|
|
47
|
+
*/
|
|
48
|
+
const getErrorMessage = error => {
|
|
49
|
+
if (error == null) return undefined;
|
|
50
|
+
const message = (0, _core.getErrorMessage)(error, '');
|
|
51
|
+
return message ? message : undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* A picker-produced file ready to upload. On web this is a real `File`
|
|
56
|
+
* (carrying an optional `uri` for preview). On native, it's an
|
|
57
|
+
* {@link RNFileDescriptor} — passed straight to FormData by `assetUpload`.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/** Returns the display name for either a web File or an RN descriptor. */
|
|
61
|
+
const candidateName = (candidate, fallback) => candidate.name && typeof candidate.name === 'string' ? candidate.name : fallback;
|
|
43
62
|
|
|
44
|
-
|
|
63
|
+
/** Returns the byte size for either a web File or an RN descriptor (0 if unknown). */
|
|
64
|
+
const candidateSize = candidate => {
|
|
65
|
+
const size = candidate.size;
|
|
66
|
+
return typeof size === 'number' && Number.isFinite(size) ? size : 0;
|
|
67
|
+
};
|
|
45
68
|
|
|
46
|
-
/**
|
|
47
|
-
const
|
|
69
|
+
/** Returns the mime type for either a web File or an RN descriptor. */
|
|
70
|
+
const candidateType = candidate => {
|
|
71
|
+
const value = candidate.type;
|
|
72
|
+
return typeof value === 'string' && value.length > 0 ? value : 'application/octet-stream';
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** Returns the preview URI for an upload candidate, if available. */
|
|
76
|
+
const candidateUri = candidate => {
|
|
77
|
+
const uri = candidate.uri;
|
|
78
|
+
return typeof uri === 'string' && uri.length > 0 ? uri : undefined;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Haptic feedback wrapper. `expo-haptics` is an optional dependency — when not
|
|
83
|
+
* installed (or on web), all calls degrade silently. We resolve the module
|
|
84
|
+
* once and cache the promise so subsequent calls don't repeat the dynamic
|
|
85
|
+
* import. Matches the pattern used by AvatarCropScreen.
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
let hapticsModulePromise = null;
|
|
89
|
+
const getHaptics = () => {
|
|
90
|
+
if (_reactNative.Platform.OS === 'web') return Promise.resolve(null);
|
|
91
|
+
if (hapticsModulePromise) return hapticsModulePromise;
|
|
92
|
+
hapticsModulePromise = (async () => {
|
|
93
|
+
try {
|
|
94
|
+
const mod = await Promise.resolve().then(() => _interopRequireWildcard(require('expo-haptics')));
|
|
95
|
+
if (!mod || typeof mod.impactAsync !== 'function') return null;
|
|
96
|
+
return mod;
|
|
97
|
+
} catch {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
})();
|
|
101
|
+
return hapticsModulePromise;
|
|
102
|
+
};
|
|
103
|
+
const hapticImpact = async style => {
|
|
104
|
+
const h = await getHaptics();
|
|
105
|
+
if (!h) return;
|
|
106
|
+
const styleEnum = style === 'heavy' ? h.ImpactFeedbackStyle.Heavy : style === 'medium' ? h.ImpactFeedbackStyle.Medium : h.ImpactFeedbackStyle.Light;
|
|
107
|
+
try {
|
|
108
|
+
await h.impactAsync(styleEnum);
|
|
109
|
+
} catch {
|
|
110
|
+
// Silent — haptics are non-critical UX polish.
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const hapticSelection = async () => {
|
|
114
|
+
const h = await getHaptics();
|
|
115
|
+
if (!h) return;
|
|
116
|
+
try {
|
|
117
|
+
await h.selectionAsync();
|
|
118
|
+
} catch {
|
|
119
|
+
// Silent.
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const hapticNotification = async type => {
|
|
123
|
+
const h = await getHaptics();
|
|
124
|
+
if (!h) return;
|
|
125
|
+
const typeEnum = type === 'error' ? h.NotificationFeedbackType.Error : type === 'warning' ? h.NotificationFeedbackType.Warning : h.NotificationFeedbackType.Success;
|
|
126
|
+
try {
|
|
127
|
+
await h.notificationAsync(typeEnum);
|
|
128
|
+
} catch {
|
|
129
|
+
// Silent.
|
|
130
|
+
}
|
|
131
|
+
};
|
|
48
132
|
|
|
49
133
|
// Animated button component for smooth transitions
|
|
50
134
|
const AnimatedButton = ({
|
|
@@ -53,7 +137,8 @@ const AnimatedButton = ({
|
|
|
53
137
|
icon,
|
|
54
138
|
primaryColor,
|
|
55
139
|
textColor,
|
|
56
|
-
style
|
|
140
|
+
style,
|
|
141
|
+
accessibilityLabel
|
|
57
142
|
}) => {
|
|
58
143
|
const animatedValue = (0, _react.useRef)(new _reactNative.Animated.Value(isSelected ? 1 : 0)).current;
|
|
59
144
|
(0, _react.useEffect)(() => {
|
|
@@ -68,13 +153,14 @@ const AnimatedButton = ({
|
|
|
68
153
|
inputRange: [0, 1],
|
|
69
154
|
outputRange: ['transparent', primaryColor]
|
|
70
155
|
});
|
|
71
|
-
const iconColor = animatedValue.interpolate({
|
|
72
|
-
inputRange: [0, 1],
|
|
73
|
-
outputRange: [textColor, '#FFFFFF']
|
|
74
|
-
});
|
|
75
156
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
76
157
|
onPress: onPress,
|
|
77
158
|
activeOpacity: 0.7,
|
|
159
|
+
accessibilityRole: "button",
|
|
160
|
+
accessibilityLabel: accessibilityLabel,
|
|
161
|
+
accessibilityState: {
|
|
162
|
+
selected: isSelected
|
|
163
|
+
},
|
|
78
164
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
79
165
|
style: [style, {
|
|
80
166
|
backgroundColor
|
|
@@ -89,6 +175,453 @@ const AnimatedButton = ({
|
|
|
89
175
|
})
|
|
90
176
|
});
|
|
91
177
|
};
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Props for the dedicated photo picker view. Used by FileManagementScreen
|
|
181
|
+
* only when `selectMode + image-only` is active. All callbacks are wired by
|
|
182
|
+
* the parent — this component is purely presentational.
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* A single photo cell. Memoized so re-renders during selection only touch
|
|
187
|
+
* affected cells — selection of one photo must not redraw the whole grid.
|
|
188
|
+
*
|
|
189
|
+
* Apple Photos pattern: when any cell is selected, *non-selected* siblings
|
|
190
|
+
* fade to 0.6 opacity to focus attention on the active selection.
|
|
191
|
+
*/
|
|
192
|
+
const PhotoPickerCell = /*#__PURE__*/_react.default.memo(function PhotoPickerCell(props) {
|
|
193
|
+
const {
|
|
194
|
+
photo,
|
|
195
|
+
size,
|
|
196
|
+
marginRight,
|
|
197
|
+
marginBottom,
|
|
198
|
+
isSelected,
|
|
199
|
+
selectionIndex,
|
|
200
|
+
dim,
|
|
201
|
+
primaryColor,
|
|
202
|
+
thumbUrl,
|
|
203
|
+
enterIndex,
|
|
204
|
+
reduceMotion,
|
|
205
|
+
onPress,
|
|
206
|
+
onLongPress,
|
|
207
|
+
a11yLabel
|
|
208
|
+
} = props;
|
|
209
|
+
|
|
210
|
+
// Cap the cumulative stagger at ~800ms total so the very long grid does
|
|
211
|
+
// not keep fading in late tiles. Beyond ~53 tiles the delay maxes out.
|
|
212
|
+
const STAGGER_PER_CELL_MS = 15;
|
|
213
|
+
const MAX_TOTAL_STAGGER_MS = 800;
|
|
214
|
+
const delay = Math.min(enterIndex * STAGGER_PER_CELL_MS, MAX_TOTAL_STAGGER_MS);
|
|
215
|
+
|
|
216
|
+
// Selection ring pulse animation: 1.0 → 1.05 → 1.0 on transition to
|
|
217
|
+
// selected. Plays at most once per selection change; reduce-motion skips.
|
|
218
|
+
const ringScale = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
219
|
+
const prevSelected = (0, _react.useRef)(isSelected);
|
|
220
|
+
(0, _react.useEffect)(() => {
|
|
221
|
+
if (prevSelected.current === isSelected) return;
|
|
222
|
+
prevSelected.current = isSelected;
|
|
223
|
+
if (!isSelected) {
|
|
224
|
+
ringScale.value = 1;
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
if (reduceMotion) {
|
|
228
|
+
ringScale.value = 1;
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
ringScale.value = (0, _reactNativeReanimated.withSequence)((0, _reactNativeReanimated.withTiming)(1.05, {
|
|
232
|
+
duration: 110
|
|
233
|
+
}), (0, _reactNativeReanimated.withSpring)(1, {
|
|
234
|
+
damping: 14,
|
|
235
|
+
stiffness: 200
|
|
236
|
+
}));
|
|
237
|
+
}, [isSelected, reduceMotion, ringScale]);
|
|
238
|
+
const ringAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
239
|
+
transform: [{
|
|
240
|
+
scale: ringScale.value
|
|
241
|
+
}]
|
|
242
|
+
}));
|
|
243
|
+
const inner = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
244
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
245
|
+
style: [_styles.photoPickerStyles.cellInner, dim && _styles.photoPickerStyles.cellDim],
|
|
246
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
|
|
247
|
+
source: {
|
|
248
|
+
uri: thumbUrl
|
|
249
|
+
},
|
|
250
|
+
style: _styles.photoPickerStyles.cellImage,
|
|
251
|
+
contentFit: "cover",
|
|
252
|
+
transition: 120,
|
|
253
|
+
cachePolicy: "memory-disk",
|
|
254
|
+
accessibilityLabel: photo.filename
|
|
255
|
+
})
|
|
256
|
+
}), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
257
|
+
pointerEvents: "none",
|
|
258
|
+
style: [_styles.photoPickerStyles.cellRing, {
|
|
259
|
+
borderColor: primaryColor
|
|
260
|
+
}, ringAnimatedStyle]
|
|
261
|
+
}), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
262
|
+
pointerEvents: "none",
|
|
263
|
+
style: [_styles.photoPickerStyles.cellBadge, {
|
|
264
|
+
backgroundColor: primaryColor
|
|
265
|
+
}],
|
|
266
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
267
|
+
style: _styles.photoPickerStyles.cellBadgeText,
|
|
268
|
+
children: selectionIndex > 0 ? String(selectionIndex) : ''
|
|
269
|
+
})
|
|
270
|
+
})]
|
|
271
|
+
});
|
|
272
|
+
const cellWrapperStyle = {
|
|
273
|
+
width: size,
|
|
274
|
+
height: size,
|
|
275
|
+
marginRight,
|
|
276
|
+
marginBottom
|
|
277
|
+
};
|
|
278
|
+
if (reduceMotion) {
|
|
279
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
280
|
+
activeOpacity: 0.85,
|
|
281
|
+
onPress: onPress,
|
|
282
|
+
onLongPress: onLongPress,
|
|
283
|
+
style: [_styles.photoPickerStyles.cellWrapper, cellWrapperStyle],
|
|
284
|
+
accessibilityRole: "button",
|
|
285
|
+
accessibilityLabel: a11yLabel,
|
|
286
|
+
accessibilityState: {
|
|
287
|
+
selected: isSelected
|
|
288
|
+
},
|
|
289
|
+
children: inner
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
293
|
+
entering: _reactNativeReanimated.FadeIn.delay(delay).duration(200),
|
|
294
|
+
style: [_styles.photoPickerStyles.cellWrapper, cellWrapperStyle],
|
|
295
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
296
|
+
activeOpacity: 0.85,
|
|
297
|
+
onPress: onPress,
|
|
298
|
+
onLongPress: onLongPress,
|
|
299
|
+
style: {
|
|
300
|
+
flex: 1
|
|
301
|
+
},
|
|
302
|
+
accessibilityRole: "button",
|
|
303
|
+
accessibilityLabel: a11yLabel,
|
|
304
|
+
accessibilityState: {
|
|
305
|
+
selected: isSelected
|
|
306
|
+
},
|
|
307
|
+
children: inner
|
|
308
|
+
})
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
const PhotoPickerView = ({
|
|
312
|
+
photos,
|
|
313
|
+
selectedIds,
|
|
314
|
+
multiSelect,
|
|
315
|
+
maxSelection,
|
|
316
|
+
allowUpload,
|
|
317
|
+
refreshing,
|
|
318
|
+
uploading,
|
|
319
|
+
isPickingDocument,
|
|
320
|
+
uploadProgress,
|
|
321
|
+
hasMore,
|
|
322
|
+
loadingMore,
|
|
323
|
+
reduceMotion,
|
|
324
|
+
getThumbUrl,
|
|
325
|
+
primaryColor,
|
|
326
|
+
isOwner,
|
|
327
|
+
onTogglePhoto,
|
|
328
|
+
onPreviewPhoto,
|
|
329
|
+
onUpload,
|
|
330
|
+
onRefresh,
|
|
331
|
+
onLoadMore,
|
|
332
|
+
onCancel,
|
|
333
|
+
onConfirm,
|
|
334
|
+
t
|
|
335
|
+
}) => {
|
|
336
|
+
const {
|
|
337
|
+
width: windowWidth,
|
|
338
|
+
height: windowHeight
|
|
339
|
+
} = (0, _reactNative.useWindowDimensions)();
|
|
340
|
+
|
|
341
|
+
// Layout: 3 columns phone portrait, 2 columns phone landscape,
|
|
342
|
+
// 4 columns tablet (>= 600 width). Apple Photos-ish.
|
|
343
|
+
const columns = (0, _react.useMemo)(() => {
|
|
344
|
+
if (windowWidth >= 600) return 4;
|
|
345
|
+
// Landscape phone: width > height
|
|
346
|
+
if (windowWidth > windowHeight) return 2;
|
|
347
|
+
return 3;
|
|
348
|
+
}, [windowWidth, windowHeight]);
|
|
349
|
+
const GUTTER = 2;
|
|
350
|
+
const cellSize = (0, _react.useMemo)(() => {
|
|
351
|
+
// (windowWidth - (columns - 1) * GUTTER) / columns, but
|
|
352
|
+
// FlatList in 3-col layout means each row has 2 inter-cell gutters.
|
|
353
|
+
return Math.floor((windowWidth - GUTTER * (columns - 1)) / columns);
|
|
354
|
+
}, [windowWidth, columns]);
|
|
355
|
+
|
|
356
|
+
// Map selectedIds → 1-based selection order for the badge. We freeze a
|
|
357
|
+
// stable order at the time of selection: the order is the insertion
|
|
358
|
+
// order of the Set (which JS preserves natively).
|
|
359
|
+
const selectionOrder = (0, _react.useMemo)(() => {
|
|
360
|
+
const map = new Map();
|
|
361
|
+
let i = 1;
|
|
362
|
+
for (const id of selectedIds) {
|
|
363
|
+
map.set(id, i++);
|
|
364
|
+
}
|
|
365
|
+
return map;
|
|
366
|
+
}, [selectedIds]);
|
|
367
|
+
const hasAnySelection = selectedIds.size > 0;
|
|
368
|
+
|
|
369
|
+
// Compact icon-only upload pill on narrow screens; full pill otherwise.
|
|
370
|
+
const showUploadLabel = windowWidth >= 360;
|
|
371
|
+
|
|
372
|
+
// The bottom sheet renders below the status bar already (its `maxHeight`
|
|
373
|
+
// is capped by `SCREEN_HEIGHT - insets.top`), so the picker MUST NOT add
|
|
374
|
+
// an additional safe-area inset to the header. Header layout:
|
|
375
|
+
// • 28dp drag-handle hit area floats at the very top of the sheet
|
|
376
|
+
// • 56dp app bar sits immediately below the handle
|
|
377
|
+
// Total header zone = 28 + 56 = 84dp from sheet top.
|
|
378
|
+
const HANDLE_ZONE = 28;
|
|
379
|
+
const APP_BAR_HEIGHT = 56;
|
|
380
|
+
const headerHeight = HANDLE_ZONE + APP_BAR_HEIGHT;
|
|
381
|
+
const contentPaddingTop = headerHeight + 4;
|
|
382
|
+
const isEmpty = photos.length === 0;
|
|
383
|
+
const a11yColumnsAnnouncement = (0, _react.useRef)(columns);
|
|
384
|
+
(0, _react.useEffect)(() => {
|
|
385
|
+
if (a11yColumnsAnnouncement.current !== columns) {
|
|
386
|
+
a11yColumnsAnnouncement.current = columns;
|
|
387
|
+
}
|
|
388
|
+
}, [columns]);
|
|
389
|
+
const handleCellPress = (0, _react.useCallback)(photo => {
|
|
390
|
+
if (_reactNative.Platform.OS !== 'web') {
|
|
391
|
+
void hapticImpact('light');
|
|
392
|
+
}
|
|
393
|
+
onTogglePhoto(photo);
|
|
394
|
+
}, [onTogglePhoto]);
|
|
395
|
+
const handleCellLongPress = (0, _react.useCallback)(photo => {
|
|
396
|
+
if (_reactNative.Platform.OS !== 'web') {
|
|
397
|
+
void hapticSelection();
|
|
398
|
+
}
|
|
399
|
+
onPreviewPhoto(photo);
|
|
400
|
+
}, [onPreviewPhoto]);
|
|
401
|
+
const handleConfirm = (0, _react.useCallback)(() => {
|
|
402
|
+
if (multiSelect) {
|
|
403
|
+
if (selectedIds.size === 0) return;
|
|
404
|
+
if (_reactNative.Platform.OS !== 'web') {
|
|
405
|
+
void hapticNotification('success');
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
onConfirm();
|
|
409
|
+
}, [multiSelect, selectedIds.size, onConfirm]);
|
|
410
|
+
|
|
411
|
+
// FlatList renderItem: each cell knows its enterIndex (for stagger).
|
|
412
|
+
const renderItem = (0, _react.useCallback)(({
|
|
413
|
+
item,
|
|
414
|
+
index
|
|
415
|
+
}) => {
|
|
416
|
+
const isSelected = selectedIds.has(item.id);
|
|
417
|
+
const selIndex = isSelected ? selectionOrder.get(item.id) || 0 : 0;
|
|
418
|
+
// Last column gets no right margin; last row no bottom margin
|
|
419
|
+
// (FlatList handles row breaks via numColumns).
|
|
420
|
+
const isLastInRow = (index + 1) % columns === 0;
|
|
421
|
+
const a11yLabel = t(isSelected ? 'fileManagement.a11y.photoCellSelected' : 'fileManagement.a11y.photoCellUnselected', {
|
|
422
|
+
name: item.filename || 'photo'
|
|
423
|
+
});
|
|
424
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(PhotoPickerCell, {
|
|
425
|
+
photo: item,
|
|
426
|
+
size: cellSize,
|
|
427
|
+
marginRight: isLastInRow ? 0 : GUTTER,
|
|
428
|
+
marginBottom: GUTTER,
|
|
429
|
+
isSelected: isSelected,
|
|
430
|
+
selectionIndex: selIndex,
|
|
431
|
+
dim: multiSelect && hasAnySelection && !isSelected,
|
|
432
|
+
primaryColor: primaryColor,
|
|
433
|
+
thumbUrl: getThumbUrl(item, 'thumb'),
|
|
434
|
+
enterIndex: index,
|
|
435
|
+
reduceMotion: reduceMotion,
|
|
436
|
+
onPress: () => handleCellPress(item),
|
|
437
|
+
onLongPress: () => handleCellLongPress(item),
|
|
438
|
+
a11yLabel: a11yLabel
|
|
439
|
+
});
|
|
440
|
+
}, [selectedIds, selectionOrder, columns, cellSize, multiSelect, hasAnySelection, primaryColor, getThumbUrl, reduceMotion, handleCellPress, handleCellLongPress, t]);
|
|
441
|
+
const keyExtractor = (0, _react.useCallback)(item => item.id, []);
|
|
442
|
+
const listFooter = (0, _react.useMemo)(() => {
|
|
443
|
+
if (!loadingMore) return null;
|
|
444
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
445
|
+
style: {
|
|
446
|
+
paddingVertical: 16,
|
|
447
|
+
alignItems: 'center'
|
|
448
|
+
},
|
|
449
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
450
|
+
size: "small",
|
|
451
|
+
color: "#FFFFFF"
|
|
452
|
+
})
|
|
453
|
+
});
|
|
454
|
+
}, [loadingMore]);
|
|
455
|
+
const handleEndReached = (0, _react.useCallback)(() => {
|
|
456
|
+
if (loadingMore || !hasMore) return;
|
|
457
|
+
onLoadMore();
|
|
458
|
+
}, [loadingMore, hasMore, onLoadMore]);
|
|
459
|
+
const confirmDisabled = multiSelect && selectedIds.size === 0;
|
|
460
|
+
const confirmLabel = multiSelect ? t('fileManagement.doneWithCount', {
|
|
461
|
+
count: selectedIds.size
|
|
462
|
+
}) : t('fileManagement.done');
|
|
463
|
+
|
|
464
|
+
// The progress fill width. Guard against zero division.
|
|
465
|
+
const progressFraction = uploadProgress && uploadProgress.total > 0 ? Math.min(1, Math.max(0, uploadProgress.current / uploadProgress.total)) : 0;
|
|
466
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
467
|
+
style: _styles.photoPickerStyles.root,
|
|
468
|
+
children: [isEmpty ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
469
|
+
style: [_styles.photoPickerStyles.empty, {
|
|
470
|
+
paddingTop: contentPaddingTop
|
|
471
|
+
}],
|
|
472
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
473
|
+
style: _styles.photoPickerStyles.emptyIconWrap,
|
|
474
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
475
|
+
name: "image-outline",
|
|
476
|
+
size: 64,
|
|
477
|
+
color: "#FFFFFF"
|
|
478
|
+
})
|
|
479
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
480
|
+
style: [_styles.photoPickerStyles.emptyTitle, {
|
|
481
|
+
color: '#FFFFFF'
|
|
482
|
+
}],
|
|
483
|
+
children: t('fileManagement.photoPicker.emptyTitle')
|
|
484
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
485
|
+
style: [_styles.photoPickerStyles.emptySubtitle, {
|
|
486
|
+
color: '#FFFFFF'
|
|
487
|
+
}],
|
|
488
|
+
children: t('fileManagement.photoPicker.emptySubtitle')
|
|
489
|
+
}), isOwner && allowUpload && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
490
|
+
style: [_styles.photoPickerStyles.emptyCta, {
|
|
491
|
+
backgroundColor: primaryColor
|
|
492
|
+
}],
|
|
493
|
+
onPress: onUpload,
|
|
494
|
+
disabled: uploading || isPickingDocument,
|
|
495
|
+
accessibilityRole: "button",
|
|
496
|
+
accessibilityLabel: t('fileManagement.uploadPhoto'),
|
|
497
|
+
accessibilityState: {
|
|
498
|
+
busy: uploading || isPickingDocument
|
|
499
|
+
},
|
|
500
|
+
children: uploading || isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
501
|
+
size: "small",
|
|
502
|
+
color: "#FFFFFF"
|
|
503
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
504
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
505
|
+
name: "cloud-upload",
|
|
506
|
+
size: 18,
|
|
507
|
+
color: "#FFFFFF"
|
|
508
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
509
|
+
style: _styles.photoPickerStyles.emptyCtaText,
|
|
510
|
+
children: t('fileManagement.uploadPhoto')
|
|
511
|
+
})]
|
|
512
|
+
})
|
|
513
|
+
})]
|
|
514
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
|
|
515
|
+
data: photos,
|
|
516
|
+
renderItem: renderItem,
|
|
517
|
+
keyExtractor: keyExtractor,
|
|
518
|
+
numColumns: columns,
|
|
519
|
+
contentContainerStyle: [_styles.photoPickerStyles.gridContent, {
|
|
520
|
+
paddingTop: contentPaddingTop
|
|
521
|
+
}],
|
|
522
|
+
style: _styles.photoPickerStyles.grid,
|
|
523
|
+
showsVerticalScrollIndicator: false,
|
|
524
|
+
refreshControl: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.RefreshControl, {
|
|
525
|
+
refreshing: refreshing,
|
|
526
|
+
onRefresh: onRefresh,
|
|
527
|
+
tintColor: "#FFFFFF",
|
|
528
|
+
colors: [primaryColor],
|
|
529
|
+
progressViewOffset: contentPaddingTop
|
|
530
|
+
}),
|
|
531
|
+
onEndReached: handleEndReached,
|
|
532
|
+
onEndReachedThreshold: 0.4,
|
|
533
|
+
ListFooterComponent: listFooter,
|
|
534
|
+
removeClippedSubviews: true,
|
|
535
|
+
initialNumToRender: Math.max(12, columns * 6),
|
|
536
|
+
windowSize: 9
|
|
537
|
+
}, `cols-${columns}`), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
538
|
+
style: [_styles.photoPickerStyles.header, {
|
|
539
|
+
paddingTop: HANDLE_ZONE,
|
|
540
|
+
minHeight: headerHeight
|
|
541
|
+
}],
|
|
542
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
543
|
+
style: _styles.photoPickerStyles.headerRow,
|
|
544
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
545
|
+
style: [_styles.photoPickerStyles.headerSide, _styles.photoPickerStyles.headerSideLeft],
|
|
546
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
547
|
+
onPress: onCancel,
|
|
548
|
+
style: _styles.photoPickerStyles.headerCancel,
|
|
549
|
+
accessibilityRole: "button",
|
|
550
|
+
accessibilityLabel: t('fileManagement.a11y.cancelPicker'),
|
|
551
|
+
hitSlop: {
|
|
552
|
+
top: 8,
|
|
553
|
+
bottom: 8,
|
|
554
|
+
left: 8,
|
|
555
|
+
right: 8
|
|
556
|
+
},
|
|
557
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
558
|
+
style: _styles.photoPickerStyles.headerCancelText,
|
|
559
|
+
children: t('fileManagement.cancel')
|
|
560
|
+
})
|
|
561
|
+
})
|
|
562
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
563
|
+
pointerEvents: "none",
|
|
564
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
565
|
+
style: _styles.photoPickerStyles.headerTitle,
|
|
566
|
+
numberOfLines: 1,
|
|
567
|
+
children: t('fileManagement.choosePhoto')
|
|
568
|
+
})
|
|
569
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
570
|
+
style: [_styles.photoPickerStyles.headerSide, _styles.photoPickerStyles.headerSideRight],
|
|
571
|
+
children: multiSelect ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
572
|
+
onPress: handleConfirm,
|
|
573
|
+
disabled: confirmDisabled,
|
|
574
|
+
style: [_styles.photoPickerStyles.headerPrimaryPill, {
|
|
575
|
+
backgroundColor: confirmDisabled ? 'rgba(255,255,255,0.18)' : primaryColor,
|
|
576
|
+
opacity: confirmDisabled ? 0.6 : 1
|
|
577
|
+
}],
|
|
578
|
+
accessibilityRole: "button",
|
|
579
|
+
accessibilityLabel: t('fileManagement.a11y.confirmSelection'),
|
|
580
|
+
accessibilityState: {
|
|
581
|
+
disabled: confirmDisabled
|
|
582
|
+
},
|
|
583
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
584
|
+
style: _styles.photoPickerStyles.headerPrimaryText,
|
|
585
|
+
children: confirmLabel
|
|
586
|
+
})
|
|
587
|
+
}) : isOwner && allowUpload && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
588
|
+
onPress: onUpload,
|
|
589
|
+
disabled: uploading || isPickingDocument,
|
|
590
|
+
style: [_styles.photoPickerStyles.headerPrimaryPill, !showUploadLabel && _styles.photoPickerStyles.headerPrimaryPillIconOnly, {
|
|
591
|
+
backgroundColor: primaryColor
|
|
592
|
+
}],
|
|
593
|
+
accessibilityRole: "button",
|
|
594
|
+
accessibilityLabel: t('fileManagement.a11y.uploadFromDevice'),
|
|
595
|
+
accessibilityState: {
|
|
596
|
+
busy: uploading || isPickingDocument
|
|
597
|
+
},
|
|
598
|
+
children: uploading || isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
599
|
+
size: "small",
|
|
600
|
+
color: "#FFFFFF"
|
|
601
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
602
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
603
|
+
name: "cloud-upload",
|
|
604
|
+
size: 16,
|
|
605
|
+
color: "#FFFFFF"
|
|
606
|
+
}), showUploadLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
607
|
+
style: _styles.photoPickerStyles.headerPrimaryText,
|
|
608
|
+
children: t('fileManagement.upload')
|
|
609
|
+
})]
|
|
610
|
+
})
|
|
611
|
+
})
|
|
612
|
+
})]
|
|
613
|
+
}), uploading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
614
|
+
style: _styles.photoPickerStyles.headerProgressBarTrack,
|
|
615
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
616
|
+
style: [_styles.photoPickerStyles.headerProgressBarFill, {
|
|
617
|
+
width: `${Math.round(progressFraction * 100)}%`,
|
|
618
|
+
backgroundColor: primaryColor
|
|
619
|
+
}]
|
|
620
|
+
})
|
|
621
|
+
})]
|
|
622
|
+
})]
|
|
623
|
+
});
|
|
624
|
+
};
|
|
92
625
|
const FileManagementScreen = ({
|
|
93
626
|
onClose,
|
|
94
627
|
theme,
|
|
@@ -119,9 +652,9 @@ const FileManagementScreen = ({
|
|
|
119
652
|
} = (0, _useI18n.useI18n)();
|
|
120
653
|
const uploadFileMutation = (0, _useAccountMutations.useUploadFile)();
|
|
121
654
|
// Prompt controls
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
const
|
|
655
|
+
const fileDeleteDialog = (0, _bloom.useDialogControl)();
|
|
656
|
+
const bulkDeleteDialog = (0, _bloom.useDialogControl)();
|
|
657
|
+
const visibilityChangeDialog = (0, _bloom.useDialogControl)();
|
|
125
658
|
const [pendingDeleteFile, setPendingDeleteFile] = (0, _react.useState)(null);
|
|
126
659
|
const files = (0, _fileStore.useFiles)();
|
|
127
660
|
// Ensure containerWidth is a number (TypeScript guard)
|
|
@@ -139,14 +672,44 @@ const FileManagementScreen = ({
|
|
|
139
672
|
loadingMore: false
|
|
140
673
|
});
|
|
141
674
|
const [selectedFile, setSelectedFile] = (0, _react.useState)(null);
|
|
142
|
-
const fileDetailsControl = (0,
|
|
675
|
+
const fileDetailsControl = (0, _bloom.useDialogControl)();
|
|
143
676
|
// In selectMode we never open the detailed viewer
|
|
144
677
|
const [openedFile, setOpenedFile] = (0, _react.useState)(null);
|
|
145
678
|
const [fileContent, setFileContent] = (0, _react.useState)(null);
|
|
146
679
|
const [loadingFileContent, setLoadingFileContent] = (0, _react.useState)(false);
|
|
147
680
|
const [showFileDetailsInViewer, setShowFileDetailsInViewer] = (0, _react.useState)(false);
|
|
148
681
|
const [isPickingDocument, setIsPickingDocument] = (0, _react.useState)(false);
|
|
149
|
-
const [
|
|
682
|
+
const [reduceMotion, setReduceMotion] = (0, _react.useState)(false);
|
|
683
|
+
|
|
684
|
+
// Detect reduce-motion preference once on mount + subscribe to changes.
|
|
685
|
+
// Used by `PhotoPickerView` to skip cell stagger animations.
|
|
686
|
+
(0, _react.useEffect)(() => {
|
|
687
|
+
let cancelled = false;
|
|
688
|
+
_reactNative.AccessibilityInfo.isReduceMotionEnabled().then(enabled => {
|
|
689
|
+
if (!cancelled) setReduceMotion(enabled);
|
|
690
|
+
}).catch(() => {
|
|
691
|
+
// Defaults to false; no action needed.
|
|
692
|
+
});
|
|
693
|
+
const sub = _reactNative.AccessibilityInfo.addEventListener('reduceMotionChanged', enabled => {
|
|
694
|
+
setReduceMotion(enabled);
|
|
695
|
+
});
|
|
696
|
+
return () => {
|
|
697
|
+
cancelled = true;
|
|
698
|
+
sub.remove();
|
|
699
|
+
};
|
|
700
|
+
}, []);
|
|
701
|
+
|
|
702
|
+
// Image-only picker mode: when the consumer restricts to image MIME types
|
|
703
|
+
// (e.g. avatar picker), photos grid is the more useful default view.
|
|
704
|
+
const isImageOnlyPicker = (0, _react.useMemo)(() => {
|
|
705
|
+
if (!selectMode) return false;
|
|
706
|
+
if (disabledMimeTypes.length === 0) return false;
|
|
707
|
+
const blocksVideos = disabledMimeTypes.some(mt => mt === 'video/' || mt.startsWith('video/'));
|
|
708
|
+
const blocksAudio = disabledMimeTypes.some(mt => mt === 'audio/' || mt.startsWith('audio/'));
|
|
709
|
+
const blocksDocs = disabledMimeTypes.some(mt => mt === 'application/pdf' || mt === 'application/' || mt.startsWith('application/'));
|
|
710
|
+
return blocksVideos && blocksAudio && blocksDocs;
|
|
711
|
+
}, [disabledMimeTypes, selectMode]);
|
|
712
|
+
const [viewMode, setViewMode] = (0, _react.useState)(isImageOnlyPicker ? 'photos' : 'all');
|
|
150
713
|
const [searchQuery, setSearchQuery] = (0, _react.useState)('');
|
|
151
714
|
const [sortBy, setSortBy] = (0, _react.useState)('date');
|
|
152
715
|
const [sortOrder, setSortOrder] = (0, _react.useState)('desc');
|
|
@@ -210,7 +773,7 @@ const FileManagementScreen = ({
|
|
|
210
773
|
if (disabledMimeTypes.length) {
|
|
211
774
|
const blocked = disabledMimeTypes.some(mt => file.contentType === mt || file.contentType.startsWith(mt.endsWith('/') ? mt : `${mt}/`));
|
|
212
775
|
if (blocked) {
|
|
213
|
-
|
|
776
|
+
_bloom.toast.error(t('fileManagement.toasts.fileTypeBlocked'));
|
|
214
777
|
return;
|
|
215
778
|
}
|
|
216
779
|
}
|
|
@@ -250,7 +813,7 @@ const FileManagementScreen = ({
|
|
|
250
813
|
const already = next.has(file.id);
|
|
251
814
|
if (!already) {
|
|
252
815
|
if (maxSelection && next.size >= maxSelection) {
|
|
253
|
-
|
|
816
|
+
_bloom.toast.error(t('fileManagement.toasts.maxSelection', {
|
|
254
817
|
max: maxSelection
|
|
255
818
|
}));
|
|
256
819
|
return prev;
|
|
@@ -346,13 +909,13 @@ const FileManagementScreen = ({
|
|
|
346
909
|
const response = await oxyServices.listUserFiles(currentPaging.limit, effectiveOffset);
|
|
347
910
|
const assets = (response.files || []).map(f => ({
|
|
348
911
|
id: f.id,
|
|
349
|
-
filename: f.originalName
|
|
350
|
-
contentType: f.mime,
|
|
351
|
-
length: f.size,
|
|
912
|
+
filename: f.originalName ?? f.sha256 ?? '',
|
|
913
|
+
contentType: f.mime ?? '',
|
|
914
|
+
length: f.size ?? 0,
|
|
352
915
|
chunkSize: 0,
|
|
353
|
-
uploadDate: f.createdAt,
|
|
354
|
-
metadata: f.metadata
|
|
355
|
-
variants: f.variants
|
|
916
|
+
uploadDate: f.createdAt ?? '',
|
|
917
|
+
metadata: f.metadata ?? {},
|
|
918
|
+
variants: f.variants ?? []
|
|
356
919
|
}));
|
|
357
920
|
if (mode === 'more') {
|
|
358
921
|
// append
|
|
@@ -379,7 +942,7 @@ const FileManagementScreen = ({
|
|
|
379
942
|
}));
|
|
380
943
|
}
|
|
381
944
|
} catch (error) {
|
|
382
|
-
|
|
945
|
+
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.loadFailed'));
|
|
383
946
|
} finally {
|
|
384
947
|
setLoading(false);
|
|
385
948
|
setRefreshing(false);
|
|
@@ -478,10 +1041,10 @@ const FileManagementScreen = ({
|
|
|
478
1041
|
total: selectedFiles.length
|
|
479
1042
|
});
|
|
480
1043
|
const maxSize = 50 * 1024 * 1024; // 50MB
|
|
481
|
-
const oversizedFiles = selectedFiles.filter(file => file
|
|
1044
|
+
const oversizedFiles = selectedFiles.filter(file => candidateSize(file) > maxSize);
|
|
482
1045
|
if (oversizedFiles.length > 0) {
|
|
483
|
-
const fileList = oversizedFiles.map(f => f
|
|
484
|
-
|
|
1046
|
+
const fileList = oversizedFiles.map(f => candidateName(f, 'file')).join(', ');
|
|
1047
|
+
_bloom.toast.error(t('fileManagement.toasts.filesTooLarge', {
|
|
485
1048
|
files: fileList
|
|
486
1049
|
}));
|
|
487
1050
|
return [];
|
|
@@ -495,12 +1058,14 @@ const FileManagementScreen = ({
|
|
|
495
1058
|
total: selectedFiles.length
|
|
496
1059
|
});
|
|
497
1060
|
const raw = selectedFiles[i];
|
|
498
|
-
const fileName = raw
|
|
1061
|
+
const fileName = candidateName(raw, `file-${i + 1}`);
|
|
1062
|
+
const fileSize = candidateSize(raw);
|
|
1063
|
+
const fileType = candidateType(raw);
|
|
499
1064
|
const optimisticId = `temp-${Date.now()}-${i}-${Math.random().toString(36).substr(2, 9)}`; // Unique ID per file
|
|
500
1065
|
|
|
501
1066
|
try {
|
|
502
1067
|
// Validate file before upload
|
|
503
|
-
if (!raw || !
|
|
1068
|
+
if (!raw || !fileName || fileSize <= 0) {
|
|
504
1069
|
const errorMsg = `Invalid file: ${fileName}`;
|
|
505
1070
|
if (__DEV__) {
|
|
506
1071
|
console.error('Upload validation failed:', {
|
|
@@ -514,9 +1079,9 @@ const FileManagementScreen = ({
|
|
|
514
1079
|
}
|
|
515
1080
|
const optimisticFile = {
|
|
516
1081
|
id: optimisticId,
|
|
517
|
-
filename:
|
|
518
|
-
contentType:
|
|
519
|
-
length:
|
|
1082
|
+
filename: fileName,
|
|
1083
|
+
contentType: fileType,
|
|
1084
|
+
length: fileSize,
|
|
520
1085
|
chunkSize: 0,
|
|
521
1086
|
uploadDate: new Date().toISOString(),
|
|
522
1087
|
metadata: {
|
|
@@ -539,9 +1104,9 @@ const FileManagementScreen = ({
|
|
|
539
1104
|
if (f) {
|
|
540
1105
|
const merged = {
|
|
541
1106
|
id: f.id,
|
|
542
|
-
filename: f.originalName || f.sha256 ||
|
|
543
|
-
contentType: f.mime ||
|
|
544
|
-
length: f.size ||
|
|
1107
|
+
filename: f.originalName || f.sha256 || fileName,
|
|
1108
|
+
contentType: f.mime || fileType,
|
|
1109
|
+
length: f.size || fileSize,
|
|
545
1110
|
chunkSize: 0,
|
|
546
1111
|
uploadDate: f.createdAt || new Date().toISOString(),
|
|
547
1112
|
metadata: f.metadata || {},
|
|
@@ -572,14 +1137,14 @@ const FileManagementScreen = ({
|
|
|
572
1137
|
}
|
|
573
1138
|
} catch (error) {
|
|
574
1139
|
failureCount++;
|
|
575
|
-
const errorMessage = getErrorMessage(error) ||
|
|
1140
|
+
const errorMessage = getErrorMessage(error) || 'Upload failed';
|
|
576
1141
|
const fullError = `${fileName}: ${errorMessage}`;
|
|
577
1142
|
errors.push(fullError);
|
|
578
1143
|
if (__DEV__) {
|
|
579
1144
|
console.error('File upload failed:', {
|
|
580
1145
|
fileName,
|
|
581
|
-
fileSize
|
|
582
|
-
fileType
|
|
1146
|
+
fileSize,
|
|
1147
|
+
fileType,
|
|
583
1148
|
error: errorMessage,
|
|
584
1149
|
stack: error instanceof Error ? error.stack : undefined
|
|
585
1150
|
});
|
|
@@ -592,14 +1157,14 @@ const FileManagementScreen = ({
|
|
|
592
1157
|
|
|
593
1158
|
// Show success/error messages
|
|
594
1159
|
if (successCount > 0) {
|
|
595
|
-
|
|
1160
|
+
_bloom.toast.success(t('fileManagement.toasts.uploadSuccess', {
|
|
596
1161
|
count: successCount
|
|
597
1162
|
}));
|
|
598
1163
|
}
|
|
599
1164
|
if (failureCount > 0) {
|
|
600
1165
|
// Show detailed error message with first few errors
|
|
601
1166
|
const errorDetails = errors.length > 0 ? `\n${errors.slice(0, 3).join('\n')}${errors.length > 3 ? `\n...and ${errors.length - 3} more` : ''}` : '';
|
|
602
|
-
|
|
1167
|
+
_bloom.toast.error(`${t('fileManagement.toasts.uploadFailed', {
|
|
603
1168
|
count: failureCount
|
|
604
1169
|
})}${errorDetails}`);
|
|
605
1170
|
}
|
|
@@ -608,14 +1173,12 @@ const FileManagementScreen = ({
|
|
|
608
1173
|
loadFiles('silent');
|
|
609
1174
|
}, 1200);
|
|
610
1175
|
} catch (error) {
|
|
611
|
-
|
|
1176
|
+
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.uploadError'));
|
|
612
1177
|
} finally {
|
|
613
1178
|
storeSetUploadProgress(null);
|
|
614
1179
|
}
|
|
615
1180
|
return uploadedFiles;
|
|
616
1181
|
};
|
|
617
|
-
|
|
618
|
-
// biome-ignore lint/suspicious/noExplicitAny: Files from document picker may have extra properties like uri
|
|
619
1182
|
const handleFileSelection = (0, _react.useCallback)(async selectedFiles => {
|
|
620
1183
|
const MAX_FILE_SIZE = 100 * 1024 * 1024; // 100MB
|
|
621
1184
|
const processedFiles = [];
|
|
@@ -625,58 +1188,58 @@ const FileManagementScreen = ({
|
|
|
625
1188
|
if (__DEV__) {
|
|
626
1189
|
console.error('Invalid file: file is null or undefined');
|
|
627
1190
|
}
|
|
628
|
-
|
|
1191
|
+
_bloom.toast.error(t('fileManagement.toasts.invalidFileMissing'));
|
|
629
1192
|
continue;
|
|
630
1193
|
}
|
|
631
|
-
|
|
1194
|
+
const name = candidateName(file, '');
|
|
1195
|
+
if (!name) {
|
|
632
1196
|
if (__DEV__) {
|
|
633
1197
|
console.error('Invalid file: missing or invalid name property', file);
|
|
634
1198
|
}
|
|
635
|
-
|
|
1199
|
+
_bloom.toast.error(t('fileManagement.toasts.invalidFileName'));
|
|
636
1200
|
continue;
|
|
637
1201
|
}
|
|
638
|
-
|
|
1202
|
+
const size = file.size;
|
|
1203
|
+
if (size === undefined || size === null || Number.isNaN(size)) {
|
|
639
1204
|
if (__DEV__) {
|
|
640
1205
|
console.error('Invalid file: missing or invalid size property', file);
|
|
641
1206
|
}
|
|
642
|
-
|
|
643
|
-
name
|
|
1207
|
+
_bloom.toast.error(t('fileManagement.toasts.invalidFileSize', {
|
|
1208
|
+
name
|
|
644
1209
|
}));
|
|
645
1210
|
continue;
|
|
646
1211
|
}
|
|
647
|
-
if (
|
|
1212
|
+
if (size <= 0) {
|
|
648
1213
|
if (__DEV__) {
|
|
649
1214
|
console.error('Invalid file: file size is zero or negative', file);
|
|
650
1215
|
}
|
|
651
|
-
|
|
652
|
-
name
|
|
1216
|
+
_bloom.toast.error(t('fileManagement.toasts.fileEmpty', {
|
|
1217
|
+
name
|
|
653
1218
|
}));
|
|
654
1219
|
continue;
|
|
655
1220
|
}
|
|
656
1221
|
|
|
657
1222
|
// Validate file size
|
|
658
|
-
if (
|
|
659
|
-
|
|
660
|
-
name
|
|
1223
|
+
if (size > MAX_FILE_SIZE) {
|
|
1224
|
+
_bloom.toast.error(t('fileManagement.toasts.fileTooLarge', {
|
|
1225
|
+
name,
|
|
661
1226
|
maxSize: (0, _fileManagement.formatFileSize)(MAX_FILE_SIZE)
|
|
662
1227
|
}));
|
|
663
1228
|
continue;
|
|
664
1229
|
}
|
|
665
|
-
|
|
666
|
-
// Ensure file has a type property
|
|
667
|
-
const fileType = file.type || 'application/octet-stream';
|
|
1230
|
+
const fileType = candidateType(file);
|
|
668
1231
|
|
|
669
1232
|
// Generate preview for images - unified approach
|
|
670
1233
|
let preview;
|
|
671
1234
|
if (fileType.startsWith('image/')) {
|
|
672
1235
|
// Try to use file URI from expo-document-picker if available (works on all platforms)
|
|
673
|
-
const fileUri = file
|
|
674
|
-
if (fileUri &&
|
|
1236
|
+
const fileUri = candidateUri(file);
|
|
1237
|
+
if (fileUri && (fileUri.startsWith('file://') || fileUri.startsWith('content://') || fileUri.startsWith('http://') || fileUri.startsWith('https://') || fileUri.startsWith('blob:'))) {
|
|
675
1238
|
preview = fileUri;
|
|
676
1239
|
} else {
|
|
677
|
-
// Fallback: create blob URL if possible (works on web)
|
|
1240
|
+
// Fallback: create blob URL if possible (works on web only)
|
|
678
1241
|
try {
|
|
679
|
-
if (file instanceof File || file instanceof Blob) {
|
|
1242
|
+
if (typeof File !== 'undefined' && file instanceof File || typeof Blob !== 'undefined' && file instanceof Blob) {
|
|
680
1243
|
preview = URL.createObjectURL(file);
|
|
681
1244
|
}
|
|
682
1245
|
} catch (error) {
|
|
@@ -690,20 +1253,20 @@ const FileManagementScreen = ({
|
|
|
690
1253
|
processedFiles.push({
|
|
691
1254
|
file,
|
|
692
1255
|
preview,
|
|
693
|
-
size
|
|
694
|
-
name
|
|
1256
|
+
size,
|
|
1257
|
+
name,
|
|
695
1258
|
type: fileType
|
|
696
1259
|
});
|
|
697
1260
|
}
|
|
698
1261
|
if (processedFiles.length === 0) {
|
|
699
|
-
|
|
1262
|
+
_bloom.toast.error(t('fileManagement.toasts.noValidFiles'));
|
|
700
1263
|
return;
|
|
701
1264
|
}
|
|
702
1265
|
|
|
703
1266
|
// Show preview modal for user to review files before upload
|
|
704
1267
|
setPendingFiles(processedFiles);
|
|
705
1268
|
setShowUploadPreview(true);
|
|
706
|
-
}, []);
|
|
1269
|
+
}, [t]);
|
|
707
1270
|
const handleConfirmUpload = async () => {
|
|
708
1271
|
if (pendingFiles.length === 0) return;
|
|
709
1272
|
setShowUploadPreview(false);
|
|
@@ -751,7 +1314,7 @@ const FileManagementScreen = ({
|
|
|
751
1314
|
}
|
|
752
1315
|
endUpload();
|
|
753
1316
|
} catch (error) {
|
|
754
|
-
|
|
1317
|
+
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.uploadError'));
|
|
755
1318
|
endUpload();
|
|
756
1319
|
}
|
|
757
1320
|
};
|
|
@@ -784,7 +1347,7 @@ const FileManagementScreen = ({
|
|
|
784
1347
|
const handleFileUpload = async () => {
|
|
785
1348
|
// Prevent concurrent document picker calls
|
|
786
1349
|
if (isPickingDocument) {
|
|
787
|
-
|
|
1350
|
+
_bloom.toast.error(t('fileManagement.toasts.waitForSelection'));
|
|
788
1351
|
return;
|
|
789
1352
|
}
|
|
790
1353
|
try {
|
|
@@ -806,7 +1369,7 @@ const FileManagementScreen = ({
|
|
|
806
1369
|
}
|
|
807
1370
|
if (!result.assets || result.assets.length === 0) {
|
|
808
1371
|
setIsPickingDocument(false);
|
|
809
|
-
|
|
1372
|
+
_bloom.toast.error(t('fileManagement.toasts.noFilesSelected'));
|
|
810
1373
|
return;
|
|
811
1374
|
}
|
|
812
1375
|
|
|
@@ -848,7 +1411,7 @@ const FileManagementScreen = ({
|
|
|
848
1411
|
// Show errors if any
|
|
849
1412
|
if (errors.length > 0) {
|
|
850
1413
|
const errorMessage = errors.slice(0, 3).join('\n') + (errors.length > 3 ? `\n...and ${errors.length - 3} more` : '');
|
|
851
|
-
|
|
1414
|
+
_bloom.toast.error(t('fileManagement.toasts.loadSomeFailed', {
|
|
852
1415
|
errors: errorMessage
|
|
853
1416
|
}));
|
|
854
1417
|
}
|
|
@@ -858,7 +1421,7 @@ const FileManagementScreen = ({
|
|
|
858
1421
|
await handleFileSelection(files);
|
|
859
1422
|
} else {
|
|
860
1423
|
// Files were selected but none could be converted
|
|
861
|
-
|
|
1424
|
+
_bloom.toast.error(t('fileManagement.toasts.noFilesProcessed'));
|
|
862
1425
|
}
|
|
863
1426
|
} catch (error) {
|
|
864
1427
|
if (__DEV__) {
|
|
@@ -866,12 +1429,12 @@ const FileManagementScreen = ({
|
|
|
866
1429
|
}
|
|
867
1430
|
if (getErrorMessage(error)?.includes('expo-document-picker') || getErrorMessage(error)?.includes('Different document picking in progress')) {
|
|
868
1431
|
if (getErrorMessage(error)?.includes('Different document picking in progress')) {
|
|
869
|
-
|
|
1432
|
+
_bloom.toast.error(t('fileManagement.toasts.waitForSelection'));
|
|
870
1433
|
} else {
|
|
871
|
-
|
|
1434
|
+
_bloom.toast.error(t('fileManagement.toasts.filePickerNotAvailable'));
|
|
872
1435
|
}
|
|
873
1436
|
} else {
|
|
874
|
-
|
|
1437
|
+
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.selectFilesFailed'));
|
|
875
1438
|
}
|
|
876
1439
|
} finally {
|
|
877
1440
|
// Always reset the picking state, even if there was an error
|
|
@@ -883,8 +1446,8 @@ const FileManagementScreen = ({
|
|
|
883
1446
|
id: fileId,
|
|
884
1447
|
name: filename
|
|
885
1448
|
});
|
|
886
|
-
|
|
887
|
-
}, [
|
|
1449
|
+
fileDeleteDialog.open();
|
|
1450
|
+
}, [fileDeleteDialog]);
|
|
888
1451
|
const handleFileDelete = (0, _react.useCallback)(async () => {
|
|
889
1452
|
if (!pendingDeleteFile) return;
|
|
890
1453
|
const {
|
|
@@ -893,7 +1456,7 @@ const FileManagementScreen = ({
|
|
|
893
1456
|
try {
|
|
894
1457
|
storeSetDeleting(fileId);
|
|
895
1458
|
await oxyServices.deleteFile(fileId);
|
|
896
|
-
|
|
1459
|
+
_bloom.toast.success(t('fileManagement.toasts.deleteSuccess'));
|
|
897
1460
|
|
|
898
1461
|
// Reload files after successful deletion
|
|
899
1462
|
// Optimistic remove
|
|
@@ -903,13 +1466,13 @@ const FileManagementScreen = ({
|
|
|
903
1466
|
} catch (error) {
|
|
904
1467
|
// Provide specific error messages
|
|
905
1468
|
if (getErrorMessage(error)?.includes('File not found') || getErrorMessage(error)?.includes('404')) {
|
|
906
|
-
|
|
1469
|
+
_bloom.toast.error(t('fileManagement.toasts.fileNotFound'));
|
|
907
1470
|
// Still reload files to refresh the list
|
|
908
1471
|
setTimeout(() => loadFiles('silent'), 800);
|
|
909
1472
|
} else if (getErrorMessage(error)?.includes('permission') || getErrorMessage(error)?.includes('403')) {
|
|
910
|
-
|
|
1473
|
+
_bloom.toast.error(t('fileManagement.toasts.noPermission'));
|
|
911
1474
|
} else {
|
|
912
|
-
|
|
1475
|
+
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.deleteFailed'));
|
|
913
1476
|
}
|
|
914
1477
|
} finally {
|
|
915
1478
|
storeSetDeleting(null);
|
|
@@ -918,8 +1481,8 @@ const FileManagementScreen = ({
|
|
|
918
1481
|
}, [pendingDeleteFile, storeSetDeleting, oxyServices, loadFiles, t]);
|
|
919
1482
|
const confirmBulkDelete = (0, _react.useCallback)(() => {
|
|
920
1483
|
if (selectedIds.size === 0) return;
|
|
921
|
-
|
|
922
|
-
}, [selectedIds.size,
|
|
1484
|
+
bulkDeleteDialog.open();
|
|
1485
|
+
}, [selectedIds.size, bulkDeleteDialog]);
|
|
923
1486
|
const handleBulkDelete = (0, _react.useCallback)(async () => {
|
|
924
1487
|
if (selectedIds.size === 0) return;
|
|
925
1488
|
try {
|
|
@@ -943,19 +1506,19 @@ const FileManagementScreen = ({
|
|
|
943
1506
|
const successful = results.filter(r => r.status === 'fulfilled' && r.value.success).length;
|
|
944
1507
|
const failed = results.length - successful;
|
|
945
1508
|
if (successful > 0) {
|
|
946
|
-
|
|
1509
|
+
_bloom.toast.success(t('fileManagement.toasts.bulkDeleteSuccess', {
|
|
947
1510
|
count: successful
|
|
948
1511
|
}));
|
|
949
1512
|
}
|
|
950
1513
|
if (failed > 0) {
|
|
951
|
-
|
|
1514
|
+
_bloom.toast.error(t('fileManagement.toasts.bulkDeleteFailed', {
|
|
952
1515
|
count: failed
|
|
953
1516
|
}));
|
|
954
1517
|
}
|
|
955
1518
|
setSelectedIds(new Set());
|
|
956
1519
|
setTimeout(() => loadFiles('silent'), 800);
|
|
957
1520
|
} catch (error) {
|
|
958
|
-
|
|
1521
|
+
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.bulkDeleteError'));
|
|
959
1522
|
}
|
|
960
1523
|
}, [selectedIds, files, oxyServices, loadFiles]);
|
|
961
1524
|
const handleBulkVisibilityChange = (0, _react.useCallback)(async visibility => {
|
|
@@ -980,7 +1543,7 @@ const FileManagementScreen = ({
|
|
|
980
1543
|
const successful = results.filter(r => r.status === 'fulfilled' && r.value.success).length;
|
|
981
1544
|
const failed = results.length - successful;
|
|
982
1545
|
if (successful > 0) {
|
|
983
|
-
|
|
1546
|
+
_bloom.toast.success(t('fileManagement.toasts.visibilitySuccess', {
|
|
984
1547
|
count: successful,
|
|
985
1548
|
visibility
|
|
986
1549
|
}));
|
|
@@ -995,13 +1558,13 @@ const FileManagementScreen = ({
|
|
|
995
1558
|
});
|
|
996
1559
|
}
|
|
997
1560
|
if (failed > 0) {
|
|
998
|
-
|
|
1561
|
+
_bloom.toast.error(t('fileManagement.toasts.visibilityFailed', {
|
|
999
1562
|
count: failed
|
|
1000
1563
|
}));
|
|
1001
1564
|
}
|
|
1002
1565
|
setTimeout(() => loadFiles('silent'), 800);
|
|
1003
1566
|
} catch (error) {
|
|
1004
|
-
|
|
1567
|
+
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.visibilityError'));
|
|
1005
1568
|
}
|
|
1006
1569
|
}, [selectedIds, oxyServices, files, loadFiles]);
|
|
1007
1570
|
|
|
@@ -1023,7 +1586,7 @@ const FileManagementScreen = ({
|
|
|
1023
1586
|
document.body.appendChild(link);
|
|
1024
1587
|
link.click();
|
|
1025
1588
|
document.body.removeChild(link);
|
|
1026
|
-
|
|
1589
|
+
_bloom.toast.success(t('fileManagement.toasts.downloadStarted'));
|
|
1027
1590
|
} catch (linkError) {
|
|
1028
1591
|
// Fallback to authenticated download
|
|
1029
1592
|
const blob = await oxyServices.getFileContentAsBlob(fileId);
|
|
@@ -1037,16 +1600,16 @@ const FileManagementScreen = ({
|
|
|
1037
1600
|
|
|
1038
1601
|
// Clean up the blob URL
|
|
1039
1602
|
URL.revokeObjectURL(url);
|
|
1040
|
-
|
|
1603
|
+
_bloom.toast.success(t('fileManagement.toasts.downloadSuccess'));
|
|
1041
1604
|
}
|
|
1042
1605
|
} else {
|
|
1043
1606
|
// For mobile, open the URL (user can save from browser)
|
|
1044
1607
|
// Note: This is a simplified approach - for full mobile support,
|
|
1045
1608
|
// consider using expo-file-system or react-native-fs
|
|
1046
|
-
|
|
1609
|
+
_bloom.toast.info(t('fileManagement.toasts.downloadMobile'));
|
|
1047
1610
|
}
|
|
1048
1611
|
} catch (error) {
|
|
1049
|
-
|
|
1612
|
+
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.downloadFailed'));
|
|
1050
1613
|
}
|
|
1051
1614
|
};
|
|
1052
1615
|
const handleFileOpen = async file => {
|
|
@@ -1072,9 +1635,9 @@ const FileManagementScreen = ({
|
|
|
1072
1635
|
}
|
|
1073
1636
|
} catch (error) {
|
|
1074
1637
|
if (getErrorMessage(error)?.includes('404') || getErrorMessage(error)?.includes('not found')) {
|
|
1075
|
-
|
|
1638
|
+
_bloom.toast.error(t('fileManagement.toasts.fileNotFoundContent'));
|
|
1076
1639
|
} else {
|
|
1077
|
-
|
|
1640
|
+
_bloom.toast.error(t('fileManagement.toasts.loadContentFailed'));
|
|
1078
1641
|
}
|
|
1079
1642
|
setFileContent(null);
|
|
1080
1643
|
}
|
|
@@ -1083,7 +1646,7 @@ const FileManagementScreen = ({
|
|
|
1083
1646
|
setFileContent(null);
|
|
1084
1647
|
}
|
|
1085
1648
|
} catch (error) {
|
|
1086
|
-
|
|
1649
|
+
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.openFailed'));
|
|
1087
1650
|
} finally {
|
|
1088
1651
|
setLoadingFileContent(false);
|
|
1089
1652
|
}
|
|
@@ -1985,6 +2548,51 @@ const FileManagementScreen = ({
|
|
|
1985
2548
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonLoader, {});
|
|
1986
2549
|
}
|
|
1987
2550
|
|
|
2551
|
+
// Dedicated flagship-style photo picker view used in the avatar-picker
|
|
2552
|
+
// context (selectMode + image-only filter). The picker is intentionally
|
|
2553
|
+
// minimal: black backdrop, edge-to-edge grid, translucent header. The
|
|
2554
|
+
// standalone file manager (non-picker browse) keeps the existing UI.
|
|
2555
|
+
if (isImageOnlyPicker && !showUploadPreview) {
|
|
2556
|
+
const photosOnly = filteredFiles.filter(file => file.contentType.startsWith('image/'));
|
|
2557
|
+
const isOwner = user?.id === targetUserId;
|
|
2558
|
+
const allowUpload = isOwner && allowUploadInSelectMode;
|
|
2559
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
2560
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(PhotoPickerView, {
|
|
2561
|
+
photos: photosOnly,
|
|
2562
|
+
selectedIds: selectedIds,
|
|
2563
|
+
multiSelect: multiSelect,
|
|
2564
|
+
maxSelection: maxSelection,
|
|
2565
|
+
allowUpload: allowUpload,
|
|
2566
|
+
refreshing: refreshing,
|
|
2567
|
+
uploading: uploading,
|
|
2568
|
+
isPickingDocument: isPickingDocument,
|
|
2569
|
+
uploadProgress: uploadProgress,
|
|
2570
|
+
hasMore: paging.hasMore,
|
|
2571
|
+
loadingMore: paging.loadingMore,
|
|
2572
|
+
reduceMotion: reduceMotion,
|
|
2573
|
+
getThumbUrl: getSafeDownloadUrlCallback,
|
|
2574
|
+
primaryColor: colors.primary,
|
|
2575
|
+
isOwner: isOwner,
|
|
2576
|
+
onTogglePhoto: toggleSelect,
|
|
2577
|
+
onPreviewPhoto: file => showFileDetailsModal(file),
|
|
2578
|
+
onUpload: handleFileUpload,
|
|
2579
|
+
onRefresh: () => loadFiles('refresh'),
|
|
2580
|
+
onLoadMore: () => loadFiles('more'),
|
|
2581
|
+
onCancel: () => {
|
|
2582
|
+
if (onClose) onClose();else goBack?.();
|
|
2583
|
+
},
|
|
2584
|
+
onConfirm: confirmMultiSelection,
|
|
2585
|
+
t: t
|
|
2586
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileDetailsModal.FileDetailsModal, {
|
|
2587
|
+
control: fileDetailsControl,
|
|
2588
|
+
file: selectedFile,
|
|
2589
|
+
onDownload: handleFileDownload,
|
|
2590
|
+
onDelete: confirmFileDelete,
|
|
2591
|
+
isOwner: isOwner
|
|
2592
|
+
})]
|
|
2593
|
+
});
|
|
2594
|
+
}
|
|
2595
|
+
|
|
1988
2596
|
// If a file is opened, show the file viewer
|
|
1989
2597
|
if (!selectMode && openedFile) {
|
|
1990
2598
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
@@ -2072,7 +2680,7 @@ const FileManagementScreen = ({
|
|
|
2072
2680
|
key: 'visibility',
|
|
2073
2681
|
text: t('fileManagement.visibility'),
|
|
2074
2682
|
onPress: () => {
|
|
2075
|
-
|
|
2683
|
+
visibilityChangeDialog.open();
|
|
2076
2684
|
},
|
|
2077
2685
|
icon: 'eye'
|
|
2078
2686
|
}] : undefined,
|
|
@@ -2097,41 +2705,53 @@ const FileManagementScreen = ({
|
|
|
2097
2705
|
icon: viewMode === 'all' ? 'folder' : 'folder-outline',
|
|
2098
2706
|
primaryColor: colors.primary,
|
|
2099
2707
|
textColor: colors.text,
|
|
2100
|
-
style: _styles.fileManagementStyles.viewModeButton
|
|
2708
|
+
style: _styles.fileManagementStyles.viewModeButton,
|
|
2709
|
+
accessibilityLabel: t('fileManagement.a11y.viewAll') || 'Show all files'
|
|
2101
2710
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
|
|
2102
2711
|
isSelected: viewMode === 'photos',
|
|
2103
2712
|
onPress: () => setViewMode('photos'),
|
|
2104
2713
|
icon: viewMode === 'photos' ? 'image-multiple' : 'image-multiple-outline',
|
|
2105
2714
|
primaryColor: colors.primary,
|
|
2106
2715
|
textColor: colors.text,
|
|
2107
|
-
style: _styles.fileManagementStyles.viewModeButton
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2716
|
+
style: _styles.fileManagementStyles.viewModeButton,
|
|
2717
|
+
accessibilityLabel: t('fileManagement.a11y.viewPhotos') || 'Show photos only'
|
|
2718
|
+
}), !isImageOnlyPicker && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
2719
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
|
|
2720
|
+
isSelected: viewMode === 'videos',
|
|
2721
|
+
onPress: () => setViewMode('videos'),
|
|
2722
|
+
icon: viewMode === 'videos' ? 'video' : 'video-outline',
|
|
2723
|
+
primaryColor: colors.primary,
|
|
2724
|
+
textColor: colors.text,
|
|
2725
|
+
style: _styles.fileManagementStyles.viewModeButton,
|
|
2726
|
+
accessibilityLabel: t('fileManagement.a11y.viewVideos') || 'Show videos only'
|
|
2727
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
|
|
2728
|
+
isSelected: viewMode === 'documents',
|
|
2729
|
+
onPress: () => setViewMode('documents'),
|
|
2730
|
+
icon: viewMode === 'documents' ? 'file-document' : 'file-document-outline',
|
|
2731
|
+
primaryColor: colors.primary,
|
|
2732
|
+
textColor: colors.text,
|
|
2733
|
+
style: _styles.fileManagementStyles.viewModeButton,
|
|
2734
|
+
accessibilityLabel: t('fileManagement.a11y.viewDocuments') || 'Show documents only'
|
|
2735
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
|
|
2736
|
+
isSelected: viewMode === 'audio',
|
|
2737
|
+
onPress: () => setViewMode('audio'),
|
|
2738
|
+
icon: viewMode === 'audio' ? 'music-note' : 'music-note-outline',
|
|
2739
|
+
primaryColor: colors.primary,
|
|
2740
|
+
textColor: colors.text,
|
|
2741
|
+
style: _styles.fileManagementStyles.viewModeButton,
|
|
2742
|
+
accessibilityLabel: t('fileManagement.a11y.viewAudio') || 'Show audio only'
|
|
2743
|
+
})]
|
|
2129
2744
|
})]
|
|
2130
2745
|
})
|
|
2131
2746
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
2132
2747
|
style: [_styles.fileManagementStyles.sortButton, {
|
|
2133
2748
|
backgroundColor: colors.card
|
|
2134
2749
|
}],
|
|
2750
|
+
accessibilityRole: "button",
|
|
2751
|
+
accessibilityLabel: t('fileManagement.a11y.sortBy', {
|
|
2752
|
+
field: sortBy,
|
|
2753
|
+
order: sortOrder === 'asc' ? 'ascending' : 'descending'
|
|
2754
|
+
}) || `Sort by ${sortBy}, ${sortOrder === 'asc' ? 'ascending' : 'descending'}`,
|
|
2135
2755
|
onPress: () => {
|
|
2136
2756
|
// Cycle through sort options: date -> size -> name -> type -> date
|
|
2137
2757
|
const sortOrder = ['date', 'size', 'name', 'type'];
|
|
@@ -2153,11 +2773,16 @@ const FileManagementScreen = ({
|
|
|
2153
2773
|
color: colors.textSecondary
|
|
2154
2774
|
})]
|
|
2155
2775
|
}), user?.id === targetUserId && (!selectMode || selectMode && allowUploadInSelectMode) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
2156
|
-
style: [_styles.fileManagementStyles.uploadButton, {
|
|
2776
|
+
style: [_styles.fileManagementStyles.uploadButton, isImageOnlyPicker && _styles.fileManagementStyles.uploadButtonExtended, {
|
|
2157
2777
|
backgroundColor: colors.primary
|
|
2158
2778
|
}],
|
|
2159
2779
|
onPress: handleFileUpload,
|
|
2160
2780
|
disabled: uploading || isPickingDocument,
|
|
2781
|
+
accessibilityRole: "button",
|
|
2782
|
+
accessibilityLabel: isImageOnlyPicker ? t('fileManagement.a11y.uploadFromDevice') || 'Upload photo from device' : t('fileManagement.a11y.uploadFile') || 'Upload file',
|
|
2783
|
+
accessibilityState: {
|
|
2784
|
+
busy: uploading || isPickingDocument
|
|
2785
|
+
},
|
|
2161
2786
|
children: uploading ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2162
2787
|
style: _styles.fileManagementStyles.uploadProgress,
|
|
2163
2788
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
@@ -2170,6 +2795,17 @@ const FileManagementScreen = ({
|
|
|
2170
2795
|
}) : isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
2171
2796
|
size: "small",
|
|
2172
2797
|
color: "#FFFFFF"
|
|
2798
|
+
}) : isImageOnlyPicker ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2799
|
+
style: _styles.fileManagementStyles.uploadButtonContent,
|
|
2800
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
2801
|
+
name: "cloud-upload",
|
|
2802
|
+
size: 18,
|
|
2803
|
+
color: "#FFFFFF"
|
|
2804
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2805
|
+
style: _styles.fileManagementStyles.uploadButtonLabel,
|
|
2806
|
+
numberOfLines: 1,
|
|
2807
|
+
children: t('fileManagement.upload') || 'Upload'
|
|
2808
|
+
})]
|
|
2173
2809
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
2174
2810
|
name: "add",
|
|
2175
2811
|
size: 22,
|
|
@@ -2365,51 +3001,53 @@ const FileManagementScreen = ({
|
|
|
2365
3001
|
color: colors.primary
|
|
2366
3002
|
})]
|
|
2367
3003
|
})
|
|
2368
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
2369
|
-
control:
|
|
3004
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
|
|
3005
|
+
control: fileDeleteDialog,
|
|
2370
3006
|
title: t('fileManagement.deleteFile') || 'Delete File',
|
|
2371
3007
|
description: pendingDeleteFile ? t('fileManagement.confirms.deleteFile', {
|
|
2372
3008
|
filename: pendingDeleteFile.name
|
|
2373
3009
|
}) : '',
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
3010
|
+
actions: [{
|
|
3011
|
+
label: t('fileManagement.confirm') || 'Delete',
|
|
3012
|
+
color: 'destructive',
|
|
3013
|
+
onPress: handleFileDelete
|
|
3014
|
+
}, {
|
|
3015
|
+
label: t('common.cancel') || 'Cancel',
|
|
3016
|
+
color: 'cancel'
|
|
3017
|
+
}]
|
|
3018
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
|
|
3019
|
+
control: bulkDeleteDialog,
|
|
2379
3020
|
title: t('fileManagement.deleteFiles') || 'Delete Files',
|
|
2380
3021
|
description: t('fileManagement.confirms.deleteFiles', {
|
|
2381
3022
|
count: selectedIds.size
|
|
2382
3023
|
}),
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
}),
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
cta: t('common.cancel') || 'Cancel'
|
|
2411
|
-
})]
|
|
2412
|
-
})]
|
|
3024
|
+
actions: [{
|
|
3025
|
+
label: t('fileManagement.confirm') || 'Delete',
|
|
3026
|
+
color: 'destructive',
|
|
3027
|
+
onPress: handleBulkDelete
|
|
3028
|
+
}, {
|
|
3029
|
+
label: t('common.cancel') || 'Cancel',
|
|
3030
|
+
color: 'cancel'
|
|
3031
|
+
}]
|
|
3032
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
|
|
3033
|
+
control: visibilityChangeDialog,
|
|
3034
|
+
title: t('fileManagement.changeVisibility') || 'Change Visibility',
|
|
3035
|
+
description: t('fileManagement.changeVisibilityConfirm', {
|
|
3036
|
+
count: selectedIds.size
|
|
3037
|
+
}),
|
|
3038
|
+
actions: [{
|
|
3039
|
+
label: t('fileManagement.private') || 'Private',
|
|
3040
|
+
onPress: () => handleBulkVisibilityChange('private')
|
|
3041
|
+
}, {
|
|
3042
|
+
label: t('fileManagement.public') || 'Public',
|
|
3043
|
+
onPress: () => handleBulkVisibilityChange('public')
|
|
3044
|
+
}, {
|
|
3045
|
+
label: t('fileManagement.unlisted') || 'Unlisted',
|
|
3046
|
+
onPress: () => handleBulkVisibilityChange('unlisted')
|
|
3047
|
+
}, {
|
|
3048
|
+
label: t('common.cancel') || 'Cancel',
|
|
3049
|
+
color: 'cancel'
|
|
3050
|
+
}]
|
|
2413
3051
|
})]
|
|
2414
3052
|
});
|
|
2415
3053
|
};
|