@oxyhq/services 6.9.46 → 6.10.1
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
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react';
|
|
4
|
-
import { View, Text, TouchableOpacity, StyleSheet, ScrollView, ActivityIndicator, RefreshControl, TextInput, Image, Animated, Easing } from 'react-native';
|
|
4
|
+
import { View, Text, TouchableOpacity, StyleSheet, ScrollView, ActivityIndicator, RefreshControl, TextInput, Image, Animated, Easing, FlatList, AccessibilityInfo, Platform, useWindowDimensions } from 'react-native';
|
|
5
5
|
import { Image as ExpoImage } from 'expo-image';
|
|
6
|
+
import Reanimated, { FadeIn, useAnimatedStyle, useSharedValue, withSequence, withSpring, withTiming } from 'react-native-reanimated';
|
|
6
7
|
// Lazy load expo-document-picker (optional dependency)
|
|
7
8
|
// This allows the screen to work even if expo-document-picker is not installed
|
|
8
9
|
let DocumentPicker = null;
|
|
@@ -15,12 +16,9 @@ const loadDocumentPicker = async () => {
|
|
|
15
16
|
throw new Error('expo-document-picker is not installed. Please install it: npx expo install expo-document-picker');
|
|
16
17
|
}
|
|
17
18
|
};
|
|
18
|
-
import { toast } from '
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
22
|
-
// @ts-ignore - MaterialCommunityIcons is available at runtime
|
|
23
|
-
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
19
|
+
import { Dialog, toast, useDialogControl } from '@oxyhq/bloom';
|
|
20
|
+
import { Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
|
|
21
|
+
import { getErrorMessage as getOxyErrorMessage } from '@oxyhq/core';
|
|
24
22
|
import { useFileStore, useFiles, useUploading as useUploadingStore, useUploadAggregateProgress, useDeleting as useDeletingStore } from "../stores/fileStore.js";
|
|
25
23
|
import Header from "../components/Header.js";
|
|
26
24
|
import JustifiedPhotoGrid from "../components/photogrid/JustifiedPhotoGrid.js";
|
|
@@ -33,11 +31,98 @@ import { convertDocumentPickerAssetToFile, formatFileSize, getFileIcon, getSafeD
|
|
|
33
31
|
import { FileViewer } from "../components/fileManagement/FileViewer.js";
|
|
34
32
|
import { FileDetailsModal } from "../components/fileManagement/FileDetailsModal.js";
|
|
35
33
|
import { UploadPreview } from "../components/fileManagement/UploadPreview.js";
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
import { fileManagementStyles, photoPickerStyles } from "../components/fileManagement/styles.js";
|
|
35
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
36
|
+
/**
|
|
37
|
+
* Extract error message from unknown error type.
|
|
38
|
+
* Delegates to the canonical `getErrorMessage` in `@oxyhq/core` and returns
|
|
39
|
+
* `undefined` for empty results (so callers can fall back to a translated
|
|
40
|
+
* message via `||`).
|
|
41
|
+
*/
|
|
42
|
+
const getErrorMessage = error => {
|
|
43
|
+
if (error == null) return undefined;
|
|
44
|
+
const message = getOxyErrorMessage(error, '');
|
|
45
|
+
return message ? message : undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* A picker-produced file ready to upload. On web this is a real `File`
|
|
50
|
+
* (carrying an optional `uri` for preview). On native, it's an
|
|
51
|
+
* {@link RNFileDescriptor} — passed straight to FormData by `assetUpload`.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
/** Returns the display name for either a web File or an RN descriptor. */
|
|
55
|
+
const candidateName = (candidate, fallback) => candidate.name && typeof candidate.name === 'string' ? candidate.name : fallback;
|
|
56
|
+
|
|
57
|
+
/** Returns the byte size for either a web File or an RN descriptor (0 if unknown). */
|
|
58
|
+
const candidateSize = candidate => {
|
|
59
|
+
const size = candidate.size;
|
|
60
|
+
return typeof size === 'number' && Number.isFinite(size) ? size : 0;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** Returns the mime type for either a web File or an RN descriptor. */
|
|
64
|
+
const candidateType = candidate => {
|
|
65
|
+
const value = candidate.type;
|
|
66
|
+
return typeof value === 'string' && value.length > 0 ? value : 'application/octet-stream';
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** Returns the preview URI for an upload candidate, if available. */
|
|
70
|
+
const candidateUri = candidate => {
|
|
71
|
+
const uri = candidate.uri;
|
|
72
|
+
return typeof uri === 'string' && uri.length > 0 ? uri : undefined;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Haptic feedback wrapper. `expo-haptics` is an optional dependency — when not
|
|
77
|
+
* installed (or on web), all calls degrade silently. We resolve the module
|
|
78
|
+
* once and cache the promise so subsequent calls don't repeat the dynamic
|
|
79
|
+
* import. Matches the pattern used by AvatarCropScreen.
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
let hapticsModulePromise = null;
|
|
83
|
+
const getHaptics = () => {
|
|
84
|
+
if (Platform.OS === 'web') return Promise.resolve(null);
|
|
85
|
+
if (hapticsModulePromise) return hapticsModulePromise;
|
|
86
|
+
hapticsModulePromise = (async () => {
|
|
87
|
+
try {
|
|
88
|
+
const mod = await import('expo-haptics');
|
|
89
|
+
if (!mod || typeof mod.impactAsync !== 'function') return null;
|
|
90
|
+
return mod;
|
|
91
|
+
} catch {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
})();
|
|
95
|
+
return hapticsModulePromise;
|
|
96
|
+
};
|
|
97
|
+
const hapticImpact = async style => {
|
|
98
|
+
const h = await getHaptics();
|
|
99
|
+
if (!h) return;
|
|
100
|
+
const styleEnum = style === 'heavy' ? h.ImpactFeedbackStyle.Heavy : style === 'medium' ? h.ImpactFeedbackStyle.Medium : h.ImpactFeedbackStyle.Light;
|
|
101
|
+
try {
|
|
102
|
+
await h.impactAsync(styleEnum);
|
|
103
|
+
} catch {
|
|
104
|
+
// Silent — haptics are non-critical UX polish.
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
const hapticSelection = async () => {
|
|
108
|
+
const h = await getHaptics();
|
|
109
|
+
if (!h) return;
|
|
110
|
+
try {
|
|
111
|
+
await h.selectionAsync();
|
|
112
|
+
} catch {
|
|
113
|
+
// Silent.
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
const hapticNotification = async type => {
|
|
117
|
+
const h = await getHaptics();
|
|
118
|
+
if (!h) return;
|
|
119
|
+
const typeEnum = type === 'error' ? h.NotificationFeedbackType.Error : type === 'warning' ? h.NotificationFeedbackType.Warning : h.NotificationFeedbackType.Success;
|
|
120
|
+
try {
|
|
121
|
+
await h.notificationAsync(typeEnum);
|
|
122
|
+
} catch {
|
|
123
|
+
// Silent.
|
|
124
|
+
}
|
|
125
|
+
};
|
|
41
126
|
|
|
42
127
|
// Animated button component for smooth transitions
|
|
43
128
|
const AnimatedButton = ({
|
|
@@ -46,7 +131,8 @@ const AnimatedButton = ({
|
|
|
46
131
|
icon,
|
|
47
132
|
primaryColor,
|
|
48
133
|
textColor,
|
|
49
|
-
style
|
|
134
|
+
style,
|
|
135
|
+
accessibilityLabel
|
|
50
136
|
}) => {
|
|
51
137
|
const animatedValue = useRef(new Animated.Value(isSelected ? 1 : 0)).current;
|
|
52
138
|
useEffect(() => {
|
|
@@ -61,13 +147,14 @@ const AnimatedButton = ({
|
|
|
61
147
|
inputRange: [0, 1],
|
|
62
148
|
outputRange: ['transparent', primaryColor]
|
|
63
149
|
});
|
|
64
|
-
const iconColor = animatedValue.interpolate({
|
|
65
|
-
inputRange: [0, 1],
|
|
66
|
-
outputRange: [textColor, '#FFFFFF']
|
|
67
|
-
});
|
|
68
150
|
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
69
151
|
onPress: onPress,
|
|
70
152
|
activeOpacity: 0.7,
|
|
153
|
+
accessibilityRole: "button",
|
|
154
|
+
accessibilityLabel: accessibilityLabel,
|
|
155
|
+
accessibilityState: {
|
|
156
|
+
selected: isSelected
|
|
157
|
+
},
|
|
71
158
|
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
72
159
|
style: [style, {
|
|
73
160
|
backgroundColor
|
|
@@ -82,6 +169,453 @@ const AnimatedButton = ({
|
|
|
82
169
|
})
|
|
83
170
|
});
|
|
84
171
|
};
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Props for the dedicated photo picker view. Used by FileManagementScreen
|
|
175
|
+
* only when `selectMode + image-only` is active. All callbacks are wired by
|
|
176
|
+
* the parent — this component is purely presentational.
|
|
177
|
+
*/
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* A single photo cell. Memoized so re-renders during selection only touch
|
|
181
|
+
* affected cells — selection of one photo must not redraw the whole grid.
|
|
182
|
+
*
|
|
183
|
+
* Apple Photos pattern: when any cell is selected, *non-selected* siblings
|
|
184
|
+
* fade to 0.6 opacity to focus attention on the active selection.
|
|
185
|
+
*/
|
|
186
|
+
const PhotoPickerCell = /*#__PURE__*/React.memo(function PhotoPickerCell(props) {
|
|
187
|
+
const {
|
|
188
|
+
photo,
|
|
189
|
+
size,
|
|
190
|
+
marginRight,
|
|
191
|
+
marginBottom,
|
|
192
|
+
isSelected,
|
|
193
|
+
selectionIndex,
|
|
194
|
+
dim,
|
|
195
|
+
primaryColor,
|
|
196
|
+
thumbUrl,
|
|
197
|
+
enterIndex,
|
|
198
|
+
reduceMotion,
|
|
199
|
+
onPress,
|
|
200
|
+
onLongPress,
|
|
201
|
+
a11yLabel
|
|
202
|
+
} = props;
|
|
203
|
+
|
|
204
|
+
// Cap the cumulative stagger at ~800ms total so the very long grid does
|
|
205
|
+
// not keep fading in late tiles. Beyond ~53 tiles the delay maxes out.
|
|
206
|
+
const STAGGER_PER_CELL_MS = 15;
|
|
207
|
+
const MAX_TOTAL_STAGGER_MS = 800;
|
|
208
|
+
const delay = Math.min(enterIndex * STAGGER_PER_CELL_MS, MAX_TOTAL_STAGGER_MS);
|
|
209
|
+
|
|
210
|
+
// Selection ring pulse animation: 1.0 → 1.05 → 1.0 on transition to
|
|
211
|
+
// selected. Plays at most once per selection change; reduce-motion skips.
|
|
212
|
+
const ringScale = useSharedValue(1);
|
|
213
|
+
const prevSelected = useRef(isSelected);
|
|
214
|
+
useEffect(() => {
|
|
215
|
+
if (prevSelected.current === isSelected) return;
|
|
216
|
+
prevSelected.current = isSelected;
|
|
217
|
+
if (!isSelected) {
|
|
218
|
+
ringScale.value = 1;
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
if (reduceMotion) {
|
|
222
|
+
ringScale.value = 1;
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
ringScale.value = withSequence(withTiming(1.05, {
|
|
226
|
+
duration: 110
|
|
227
|
+
}), withSpring(1, {
|
|
228
|
+
damping: 14,
|
|
229
|
+
stiffness: 200
|
|
230
|
+
}));
|
|
231
|
+
}, [isSelected, reduceMotion, ringScale]);
|
|
232
|
+
const ringAnimatedStyle = useAnimatedStyle(() => ({
|
|
233
|
+
transform: [{
|
|
234
|
+
scale: ringScale.value
|
|
235
|
+
}]
|
|
236
|
+
}));
|
|
237
|
+
const inner = /*#__PURE__*/_jsxs(_Fragment, {
|
|
238
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
239
|
+
style: [photoPickerStyles.cellInner, dim && photoPickerStyles.cellDim],
|
|
240
|
+
children: /*#__PURE__*/_jsx(ExpoImage, {
|
|
241
|
+
source: {
|
|
242
|
+
uri: thumbUrl
|
|
243
|
+
},
|
|
244
|
+
style: photoPickerStyles.cellImage,
|
|
245
|
+
contentFit: "cover",
|
|
246
|
+
transition: 120,
|
|
247
|
+
cachePolicy: "memory-disk",
|
|
248
|
+
accessibilityLabel: photo.filename
|
|
249
|
+
})
|
|
250
|
+
}), isSelected && /*#__PURE__*/_jsx(Reanimated.View, {
|
|
251
|
+
pointerEvents: "none",
|
|
252
|
+
style: [photoPickerStyles.cellRing, {
|
|
253
|
+
borderColor: primaryColor
|
|
254
|
+
}, ringAnimatedStyle]
|
|
255
|
+
}), isSelected && /*#__PURE__*/_jsx(View, {
|
|
256
|
+
pointerEvents: "none",
|
|
257
|
+
style: [photoPickerStyles.cellBadge, {
|
|
258
|
+
backgroundColor: primaryColor
|
|
259
|
+
}],
|
|
260
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
261
|
+
style: photoPickerStyles.cellBadgeText,
|
|
262
|
+
children: selectionIndex > 0 ? String(selectionIndex) : ''
|
|
263
|
+
})
|
|
264
|
+
})]
|
|
265
|
+
});
|
|
266
|
+
const cellWrapperStyle = {
|
|
267
|
+
width: size,
|
|
268
|
+
height: size,
|
|
269
|
+
marginRight,
|
|
270
|
+
marginBottom
|
|
271
|
+
};
|
|
272
|
+
if (reduceMotion) {
|
|
273
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
274
|
+
activeOpacity: 0.85,
|
|
275
|
+
onPress: onPress,
|
|
276
|
+
onLongPress: onLongPress,
|
|
277
|
+
style: [photoPickerStyles.cellWrapper, cellWrapperStyle],
|
|
278
|
+
accessibilityRole: "button",
|
|
279
|
+
accessibilityLabel: a11yLabel,
|
|
280
|
+
accessibilityState: {
|
|
281
|
+
selected: isSelected
|
|
282
|
+
},
|
|
283
|
+
children: inner
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
return /*#__PURE__*/_jsx(Reanimated.View, {
|
|
287
|
+
entering: FadeIn.delay(delay).duration(200),
|
|
288
|
+
style: [photoPickerStyles.cellWrapper, cellWrapperStyle],
|
|
289
|
+
children: /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
290
|
+
activeOpacity: 0.85,
|
|
291
|
+
onPress: onPress,
|
|
292
|
+
onLongPress: onLongPress,
|
|
293
|
+
style: {
|
|
294
|
+
flex: 1
|
|
295
|
+
},
|
|
296
|
+
accessibilityRole: "button",
|
|
297
|
+
accessibilityLabel: a11yLabel,
|
|
298
|
+
accessibilityState: {
|
|
299
|
+
selected: isSelected
|
|
300
|
+
},
|
|
301
|
+
children: inner
|
|
302
|
+
})
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
const PhotoPickerView = ({
|
|
306
|
+
photos,
|
|
307
|
+
selectedIds,
|
|
308
|
+
multiSelect,
|
|
309
|
+
maxSelection,
|
|
310
|
+
allowUpload,
|
|
311
|
+
refreshing,
|
|
312
|
+
uploading,
|
|
313
|
+
isPickingDocument,
|
|
314
|
+
uploadProgress,
|
|
315
|
+
hasMore,
|
|
316
|
+
loadingMore,
|
|
317
|
+
reduceMotion,
|
|
318
|
+
getThumbUrl,
|
|
319
|
+
primaryColor,
|
|
320
|
+
isOwner,
|
|
321
|
+
onTogglePhoto,
|
|
322
|
+
onPreviewPhoto,
|
|
323
|
+
onUpload,
|
|
324
|
+
onRefresh,
|
|
325
|
+
onLoadMore,
|
|
326
|
+
onCancel,
|
|
327
|
+
onConfirm,
|
|
328
|
+
t
|
|
329
|
+
}) => {
|
|
330
|
+
const {
|
|
331
|
+
width: windowWidth,
|
|
332
|
+
height: windowHeight
|
|
333
|
+
} = useWindowDimensions();
|
|
334
|
+
|
|
335
|
+
// Layout: 3 columns phone portrait, 2 columns phone landscape,
|
|
336
|
+
// 4 columns tablet (>= 600 width). Apple Photos-ish.
|
|
337
|
+
const columns = useMemo(() => {
|
|
338
|
+
if (windowWidth >= 600) return 4;
|
|
339
|
+
// Landscape phone: width > height
|
|
340
|
+
if (windowWidth > windowHeight) return 2;
|
|
341
|
+
return 3;
|
|
342
|
+
}, [windowWidth, windowHeight]);
|
|
343
|
+
const GUTTER = 2;
|
|
344
|
+
const cellSize = useMemo(() => {
|
|
345
|
+
// (windowWidth - (columns - 1) * GUTTER) / columns, but
|
|
346
|
+
// FlatList in 3-col layout means each row has 2 inter-cell gutters.
|
|
347
|
+
return Math.floor((windowWidth - GUTTER * (columns - 1)) / columns);
|
|
348
|
+
}, [windowWidth, columns]);
|
|
349
|
+
|
|
350
|
+
// Map selectedIds → 1-based selection order for the badge. We freeze a
|
|
351
|
+
// stable order at the time of selection: the order is the insertion
|
|
352
|
+
// order of the Set (which JS preserves natively).
|
|
353
|
+
const selectionOrder = useMemo(() => {
|
|
354
|
+
const map = new Map();
|
|
355
|
+
let i = 1;
|
|
356
|
+
for (const id of selectedIds) {
|
|
357
|
+
map.set(id, i++);
|
|
358
|
+
}
|
|
359
|
+
return map;
|
|
360
|
+
}, [selectedIds]);
|
|
361
|
+
const hasAnySelection = selectedIds.size > 0;
|
|
362
|
+
|
|
363
|
+
// Compact icon-only upload pill on narrow screens; full pill otherwise.
|
|
364
|
+
const showUploadLabel = windowWidth >= 360;
|
|
365
|
+
|
|
366
|
+
// The bottom sheet renders below the status bar already (its `maxHeight`
|
|
367
|
+
// is capped by `SCREEN_HEIGHT - insets.top`), so the picker MUST NOT add
|
|
368
|
+
// an additional safe-area inset to the header. Header layout:
|
|
369
|
+
// • 28dp drag-handle hit area floats at the very top of the sheet
|
|
370
|
+
// • 56dp app bar sits immediately below the handle
|
|
371
|
+
// Total header zone = 28 + 56 = 84dp from sheet top.
|
|
372
|
+
const HANDLE_ZONE = 28;
|
|
373
|
+
const APP_BAR_HEIGHT = 56;
|
|
374
|
+
const headerHeight = HANDLE_ZONE + APP_BAR_HEIGHT;
|
|
375
|
+
const contentPaddingTop = headerHeight + 4;
|
|
376
|
+
const isEmpty = photos.length === 0;
|
|
377
|
+
const a11yColumnsAnnouncement = useRef(columns);
|
|
378
|
+
useEffect(() => {
|
|
379
|
+
if (a11yColumnsAnnouncement.current !== columns) {
|
|
380
|
+
a11yColumnsAnnouncement.current = columns;
|
|
381
|
+
}
|
|
382
|
+
}, [columns]);
|
|
383
|
+
const handleCellPress = useCallback(photo => {
|
|
384
|
+
if (Platform.OS !== 'web') {
|
|
385
|
+
void hapticImpact('light');
|
|
386
|
+
}
|
|
387
|
+
onTogglePhoto(photo);
|
|
388
|
+
}, [onTogglePhoto]);
|
|
389
|
+
const handleCellLongPress = useCallback(photo => {
|
|
390
|
+
if (Platform.OS !== 'web') {
|
|
391
|
+
void hapticSelection();
|
|
392
|
+
}
|
|
393
|
+
onPreviewPhoto(photo);
|
|
394
|
+
}, [onPreviewPhoto]);
|
|
395
|
+
const handleConfirm = useCallback(() => {
|
|
396
|
+
if (multiSelect) {
|
|
397
|
+
if (selectedIds.size === 0) return;
|
|
398
|
+
if (Platform.OS !== 'web') {
|
|
399
|
+
void hapticNotification('success');
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
onConfirm();
|
|
403
|
+
}, [multiSelect, selectedIds.size, onConfirm]);
|
|
404
|
+
|
|
405
|
+
// FlatList renderItem: each cell knows its enterIndex (for stagger).
|
|
406
|
+
const renderItem = useCallback(({
|
|
407
|
+
item,
|
|
408
|
+
index
|
|
409
|
+
}) => {
|
|
410
|
+
const isSelected = selectedIds.has(item.id);
|
|
411
|
+
const selIndex = isSelected ? selectionOrder.get(item.id) || 0 : 0;
|
|
412
|
+
// Last column gets no right margin; last row no bottom margin
|
|
413
|
+
// (FlatList handles row breaks via numColumns).
|
|
414
|
+
const isLastInRow = (index + 1) % columns === 0;
|
|
415
|
+
const a11yLabel = t(isSelected ? 'fileManagement.a11y.photoCellSelected' : 'fileManagement.a11y.photoCellUnselected', {
|
|
416
|
+
name: item.filename || 'photo'
|
|
417
|
+
});
|
|
418
|
+
return /*#__PURE__*/_jsx(PhotoPickerCell, {
|
|
419
|
+
photo: item,
|
|
420
|
+
size: cellSize,
|
|
421
|
+
marginRight: isLastInRow ? 0 : GUTTER,
|
|
422
|
+
marginBottom: GUTTER,
|
|
423
|
+
isSelected: isSelected,
|
|
424
|
+
selectionIndex: selIndex,
|
|
425
|
+
dim: multiSelect && hasAnySelection && !isSelected,
|
|
426
|
+
primaryColor: primaryColor,
|
|
427
|
+
thumbUrl: getThumbUrl(item, 'thumb'),
|
|
428
|
+
enterIndex: index,
|
|
429
|
+
reduceMotion: reduceMotion,
|
|
430
|
+
onPress: () => handleCellPress(item),
|
|
431
|
+
onLongPress: () => handleCellLongPress(item),
|
|
432
|
+
a11yLabel: a11yLabel
|
|
433
|
+
});
|
|
434
|
+
}, [selectedIds, selectionOrder, columns, cellSize, multiSelect, hasAnySelection, primaryColor, getThumbUrl, reduceMotion, handleCellPress, handleCellLongPress, t]);
|
|
435
|
+
const keyExtractor = useCallback(item => item.id, []);
|
|
436
|
+
const listFooter = useMemo(() => {
|
|
437
|
+
if (!loadingMore) return null;
|
|
438
|
+
return /*#__PURE__*/_jsx(View, {
|
|
439
|
+
style: {
|
|
440
|
+
paddingVertical: 16,
|
|
441
|
+
alignItems: 'center'
|
|
442
|
+
},
|
|
443
|
+
children: /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
444
|
+
size: "small",
|
|
445
|
+
color: "#FFFFFF"
|
|
446
|
+
})
|
|
447
|
+
});
|
|
448
|
+
}, [loadingMore]);
|
|
449
|
+
const handleEndReached = useCallback(() => {
|
|
450
|
+
if (loadingMore || !hasMore) return;
|
|
451
|
+
onLoadMore();
|
|
452
|
+
}, [loadingMore, hasMore, onLoadMore]);
|
|
453
|
+
const confirmDisabled = multiSelect && selectedIds.size === 0;
|
|
454
|
+
const confirmLabel = multiSelect ? t('fileManagement.doneWithCount', {
|
|
455
|
+
count: selectedIds.size
|
|
456
|
+
}) : t('fileManagement.done');
|
|
457
|
+
|
|
458
|
+
// The progress fill width. Guard against zero division.
|
|
459
|
+
const progressFraction = uploadProgress && uploadProgress.total > 0 ? Math.min(1, Math.max(0, uploadProgress.current / uploadProgress.total)) : 0;
|
|
460
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
461
|
+
style: photoPickerStyles.root,
|
|
462
|
+
children: [isEmpty ? /*#__PURE__*/_jsxs(View, {
|
|
463
|
+
style: [photoPickerStyles.empty, {
|
|
464
|
+
paddingTop: contentPaddingTop
|
|
465
|
+
}],
|
|
466
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
467
|
+
style: photoPickerStyles.emptyIconWrap,
|
|
468
|
+
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
469
|
+
name: "image-outline",
|
|
470
|
+
size: 64,
|
|
471
|
+
color: "#FFFFFF"
|
|
472
|
+
})
|
|
473
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
474
|
+
style: [photoPickerStyles.emptyTitle, {
|
|
475
|
+
color: '#FFFFFF'
|
|
476
|
+
}],
|
|
477
|
+
children: t('fileManagement.photoPicker.emptyTitle')
|
|
478
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
479
|
+
style: [photoPickerStyles.emptySubtitle, {
|
|
480
|
+
color: '#FFFFFF'
|
|
481
|
+
}],
|
|
482
|
+
children: t('fileManagement.photoPicker.emptySubtitle')
|
|
483
|
+
}), isOwner && allowUpload && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
484
|
+
style: [photoPickerStyles.emptyCta, {
|
|
485
|
+
backgroundColor: primaryColor
|
|
486
|
+
}],
|
|
487
|
+
onPress: onUpload,
|
|
488
|
+
disabled: uploading || isPickingDocument,
|
|
489
|
+
accessibilityRole: "button",
|
|
490
|
+
accessibilityLabel: t('fileManagement.uploadPhoto'),
|
|
491
|
+
accessibilityState: {
|
|
492
|
+
busy: uploading || isPickingDocument
|
|
493
|
+
},
|
|
494
|
+
children: uploading || isPickingDocument ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
495
|
+
size: "small",
|
|
496
|
+
color: "#FFFFFF"
|
|
497
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
498
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
499
|
+
name: "cloud-upload",
|
|
500
|
+
size: 18,
|
|
501
|
+
color: "#FFFFFF"
|
|
502
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
503
|
+
style: photoPickerStyles.emptyCtaText,
|
|
504
|
+
children: t('fileManagement.uploadPhoto')
|
|
505
|
+
})]
|
|
506
|
+
})
|
|
507
|
+
})]
|
|
508
|
+
}) : /*#__PURE__*/_jsx(FlatList, {
|
|
509
|
+
data: photos,
|
|
510
|
+
renderItem: renderItem,
|
|
511
|
+
keyExtractor: keyExtractor,
|
|
512
|
+
numColumns: columns,
|
|
513
|
+
contentContainerStyle: [photoPickerStyles.gridContent, {
|
|
514
|
+
paddingTop: contentPaddingTop
|
|
515
|
+
}],
|
|
516
|
+
style: photoPickerStyles.grid,
|
|
517
|
+
showsVerticalScrollIndicator: false,
|
|
518
|
+
refreshControl: /*#__PURE__*/_jsx(RefreshControl, {
|
|
519
|
+
refreshing: refreshing,
|
|
520
|
+
onRefresh: onRefresh,
|
|
521
|
+
tintColor: "#FFFFFF",
|
|
522
|
+
colors: [primaryColor],
|
|
523
|
+
progressViewOffset: contentPaddingTop
|
|
524
|
+
}),
|
|
525
|
+
onEndReached: handleEndReached,
|
|
526
|
+
onEndReachedThreshold: 0.4,
|
|
527
|
+
ListFooterComponent: listFooter,
|
|
528
|
+
removeClippedSubviews: true,
|
|
529
|
+
initialNumToRender: Math.max(12, columns * 6),
|
|
530
|
+
windowSize: 9
|
|
531
|
+
}, `cols-${columns}`), /*#__PURE__*/_jsxs(View, {
|
|
532
|
+
style: [photoPickerStyles.header, {
|
|
533
|
+
paddingTop: HANDLE_ZONE,
|
|
534
|
+
minHeight: headerHeight
|
|
535
|
+
}],
|
|
536
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
537
|
+
style: photoPickerStyles.headerRow,
|
|
538
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
539
|
+
style: [photoPickerStyles.headerSide, photoPickerStyles.headerSideLeft],
|
|
540
|
+
children: /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
541
|
+
onPress: onCancel,
|
|
542
|
+
style: photoPickerStyles.headerCancel,
|
|
543
|
+
accessibilityRole: "button",
|
|
544
|
+
accessibilityLabel: t('fileManagement.a11y.cancelPicker'),
|
|
545
|
+
hitSlop: {
|
|
546
|
+
top: 8,
|
|
547
|
+
bottom: 8,
|
|
548
|
+
left: 8,
|
|
549
|
+
right: 8
|
|
550
|
+
},
|
|
551
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
552
|
+
style: photoPickerStyles.headerCancelText,
|
|
553
|
+
children: t('fileManagement.cancel')
|
|
554
|
+
})
|
|
555
|
+
})
|
|
556
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
557
|
+
pointerEvents: "none",
|
|
558
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
559
|
+
style: photoPickerStyles.headerTitle,
|
|
560
|
+
numberOfLines: 1,
|
|
561
|
+
children: t('fileManagement.choosePhoto')
|
|
562
|
+
})
|
|
563
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
564
|
+
style: [photoPickerStyles.headerSide, photoPickerStyles.headerSideRight],
|
|
565
|
+
children: multiSelect ? /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
566
|
+
onPress: handleConfirm,
|
|
567
|
+
disabled: confirmDisabled,
|
|
568
|
+
style: [photoPickerStyles.headerPrimaryPill, {
|
|
569
|
+
backgroundColor: confirmDisabled ? 'rgba(255,255,255,0.18)' : primaryColor,
|
|
570
|
+
opacity: confirmDisabled ? 0.6 : 1
|
|
571
|
+
}],
|
|
572
|
+
accessibilityRole: "button",
|
|
573
|
+
accessibilityLabel: t('fileManagement.a11y.confirmSelection'),
|
|
574
|
+
accessibilityState: {
|
|
575
|
+
disabled: confirmDisabled
|
|
576
|
+
},
|
|
577
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
578
|
+
style: photoPickerStyles.headerPrimaryText,
|
|
579
|
+
children: confirmLabel
|
|
580
|
+
})
|
|
581
|
+
}) : isOwner && allowUpload && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
582
|
+
onPress: onUpload,
|
|
583
|
+
disabled: uploading || isPickingDocument,
|
|
584
|
+
style: [photoPickerStyles.headerPrimaryPill, !showUploadLabel && photoPickerStyles.headerPrimaryPillIconOnly, {
|
|
585
|
+
backgroundColor: primaryColor
|
|
586
|
+
}],
|
|
587
|
+
accessibilityRole: "button",
|
|
588
|
+
accessibilityLabel: t('fileManagement.a11y.uploadFromDevice'),
|
|
589
|
+
accessibilityState: {
|
|
590
|
+
busy: uploading || isPickingDocument
|
|
591
|
+
},
|
|
592
|
+
children: uploading || isPickingDocument ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
593
|
+
size: "small",
|
|
594
|
+
color: "#FFFFFF"
|
|
595
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
596
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
597
|
+
name: "cloud-upload",
|
|
598
|
+
size: 16,
|
|
599
|
+
color: "#FFFFFF"
|
|
600
|
+
}), showUploadLabel && /*#__PURE__*/_jsx(Text, {
|
|
601
|
+
style: photoPickerStyles.headerPrimaryText,
|
|
602
|
+
children: t('fileManagement.upload')
|
|
603
|
+
})]
|
|
604
|
+
})
|
|
605
|
+
})
|
|
606
|
+
})]
|
|
607
|
+
}), uploading && /*#__PURE__*/_jsx(View, {
|
|
608
|
+
style: photoPickerStyles.headerProgressBarTrack,
|
|
609
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
610
|
+
style: [photoPickerStyles.headerProgressBarFill, {
|
|
611
|
+
width: `${Math.round(progressFraction * 100)}%`,
|
|
612
|
+
backgroundColor: primaryColor
|
|
613
|
+
}]
|
|
614
|
+
})
|
|
615
|
+
})]
|
|
616
|
+
})]
|
|
617
|
+
});
|
|
618
|
+
};
|
|
85
619
|
const FileManagementScreen = ({
|
|
86
620
|
onClose,
|
|
87
621
|
theme,
|
|
@@ -112,9 +646,9 @@ const FileManagementScreen = ({
|
|
|
112
646
|
} = useI18n();
|
|
113
647
|
const uploadFileMutation = useUploadFile();
|
|
114
648
|
// Prompt controls
|
|
115
|
-
const
|
|
116
|
-
const
|
|
117
|
-
const
|
|
649
|
+
const fileDeleteDialog = useDialogControl();
|
|
650
|
+
const bulkDeleteDialog = useDialogControl();
|
|
651
|
+
const visibilityChangeDialog = useDialogControl();
|
|
118
652
|
const [pendingDeleteFile, setPendingDeleteFile] = useState(null);
|
|
119
653
|
const files = useFiles();
|
|
120
654
|
// Ensure containerWidth is a number (TypeScript guard)
|
|
@@ -139,7 +673,37 @@ const FileManagementScreen = ({
|
|
|
139
673
|
const [loadingFileContent, setLoadingFileContent] = useState(false);
|
|
140
674
|
const [showFileDetailsInViewer, setShowFileDetailsInViewer] = useState(false);
|
|
141
675
|
const [isPickingDocument, setIsPickingDocument] = useState(false);
|
|
142
|
-
const [
|
|
676
|
+
const [reduceMotion, setReduceMotion] = useState(false);
|
|
677
|
+
|
|
678
|
+
// Detect reduce-motion preference once on mount + subscribe to changes.
|
|
679
|
+
// Used by `PhotoPickerView` to skip cell stagger animations.
|
|
680
|
+
useEffect(() => {
|
|
681
|
+
let cancelled = false;
|
|
682
|
+
AccessibilityInfo.isReduceMotionEnabled().then(enabled => {
|
|
683
|
+
if (!cancelled) setReduceMotion(enabled);
|
|
684
|
+
}).catch(() => {
|
|
685
|
+
// Defaults to false; no action needed.
|
|
686
|
+
});
|
|
687
|
+
const sub = AccessibilityInfo.addEventListener('reduceMotionChanged', enabled => {
|
|
688
|
+
setReduceMotion(enabled);
|
|
689
|
+
});
|
|
690
|
+
return () => {
|
|
691
|
+
cancelled = true;
|
|
692
|
+
sub.remove();
|
|
693
|
+
};
|
|
694
|
+
}, []);
|
|
695
|
+
|
|
696
|
+
// Image-only picker mode: when the consumer restricts to image MIME types
|
|
697
|
+
// (e.g. avatar picker), photos grid is the more useful default view.
|
|
698
|
+
const isImageOnlyPicker = useMemo(() => {
|
|
699
|
+
if (!selectMode) return false;
|
|
700
|
+
if (disabledMimeTypes.length === 0) return false;
|
|
701
|
+
const blocksVideos = disabledMimeTypes.some(mt => mt === 'video/' || mt.startsWith('video/'));
|
|
702
|
+
const blocksAudio = disabledMimeTypes.some(mt => mt === 'audio/' || mt.startsWith('audio/'));
|
|
703
|
+
const blocksDocs = disabledMimeTypes.some(mt => mt === 'application/pdf' || mt === 'application/' || mt.startsWith('application/'));
|
|
704
|
+
return blocksVideos && blocksAudio && blocksDocs;
|
|
705
|
+
}, [disabledMimeTypes, selectMode]);
|
|
706
|
+
const [viewMode, setViewMode] = useState(isImageOnlyPicker ? 'photos' : 'all');
|
|
143
707
|
const [searchQuery, setSearchQuery] = useState('');
|
|
144
708
|
const [sortBy, setSortBy] = useState('date');
|
|
145
709
|
const [sortOrder, setSortOrder] = useState('desc');
|
|
@@ -339,13 +903,13 @@ const FileManagementScreen = ({
|
|
|
339
903
|
const response = await oxyServices.listUserFiles(currentPaging.limit, effectiveOffset);
|
|
340
904
|
const assets = (response.files || []).map(f => ({
|
|
341
905
|
id: f.id,
|
|
342
|
-
filename: f.originalName
|
|
343
|
-
contentType: f.mime,
|
|
344
|
-
length: f.size,
|
|
906
|
+
filename: f.originalName ?? f.sha256 ?? '',
|
|
907
|
+
contentType: f.mime ?? '',
|
|
908
|
+
length: f.size ?? 0,
|
|
345
909
|
chunkSize: 0,
|
|
346
|
-
uploadDate: f.createdAt,
|
|
347
|
-
metadata: f.metadata
|
|
348
|
-
variants: f.variants
|
|
910
|
+
uploadDate: f.createdAt ?? '',
|
|
911
|
+
metadata: f.metadata ?? {},
|
|
912
|
+
variants: f.variants ?? []
|
|
349
913
|
}));
|
|
350
914
|
if (mode === 'more') {
|
|
351
915
|
// append
|
|
@@ -471,9 +1035,9 @@ const FileManagementScreen = ({
|
|
|
471
1035
|
total: selectedFiles.length
|
|
472
1036
|
});
|
|
473
1037
|
const maxSize = 50 * 1024 * 1024; // 50MB
|
|
474
|
-
const oversizedFiles = selectedFiles.filter(file => file
|
|
1038
|
+
const oversizedFiles = selectedFiles.filter(file => candidateSize(file) > maxSize);
|
|
475
1039
|
if (oversizedFiles.length > 0) {
|
|
476
|
-
const fileList = oversizedFiles.map(f => f
|
|
1040
|
+
const fileList = oversizedFiles.map(f => candidateName(f, 'file')).join(', ');
|
|
477
1041
|
toast.error(t('fileManagement.toasts.filesTooLarge', {
|
|
478
1042
|
files: fileList
|
|
479
1043
|
}));
|
|
@@ -488,12 +1052,14 @@ const FileManagementScreen = ({
|
|
|
488
1052
|
total: selectedFiles.length
|
|
489
1053
|
});
|
|
490
1054
|
const raw = selectedFiles[i];
|
|
491
|
-
const fileName = raw
|
|
1055
|
+
const fileName = candidateName(raw, `file-${i + 1}`);
|
|
1056
|
+
const fileSize = candidateSize(raw);
|
|
1057
|
+
const fileType = candidateType(raw);
|
|
492
1058
|
const optimisticId = `temp-${Date.now()}-${i}-${Math.random().toString(36).substr(2, 9)}`; // Unique ID per file
|
|
493
1059
|
|
|
494
1060
|
try {
|
|
495
1061
|
// Validate file before upload
|
|
496
|
-
if (!raw || !
|
|
1062
|
+
if (!raw || !fileName || fileSize <= 0) {
|
|
497
1063
|
const errorMsg = `Invalid file: ${fileName}`;
|
|
498
1064
|
if (__DEV__) {
|
|
499
1065
|
console.error('Upload validation failed:', {
|
|
@@ -507,9 +1073,9 @@ const FileManagementScreen = ({
|
|
|
507
1073
|
}
|
|
508
1074
|
const optimisticFile = {
|
|
509
1075
|
id: optimisticId,
|
|
510
|
-
filename:
|
|
511
|
-
contentType:
|
|
512
|
-
length:
|
|
1076
|
+
filename: fileName,
|
|
1077
|
+
contentType: fileType,
|
|
1078
|
+
length: fileSize,
|
|
513
1079
|
chunkSize: 0,
|
|
514
1080
|
uploadDate: new Date().toISOString(),
|
|
515
1081
|
metadata: {
|
|
@@ -532,9 +1098,9 @@ const FileManagementScreen = ({
|
|
|
532
1098
|
if (f) {
|
|
533
1099
|
const merged = {
|
|
534
1100
|
id: f.id,
|
|
535
|
-
filename: f.originalName || f.sha256 ||
|
|
536
|
-
contentType: f.mime ||
|
|
537
|
-
length: f.size ||
|
|
1101
|
+
filename: f.originalName || f.sha256 || fileName,
|
|
1102
|
+
contentType: f.mime || fileType,
|
|
1103
|
+
length: f.size || fileSize,
|
|
538
1104
|
chunkSize: 0,
|
|
539
1105
|
uploadDate: f.createdAt || new Date().toISOString(),
|
|
540
1106
|
metadata: f.metadata || {},
|
|
@@ -565,14 +1131,14 @@ const FileManagementScreen = ({
|
|
|
565
1131
|
}
|
|
566
1132
|
} catch (error) {
|
|
567
1133
|
failureCount++;
|
|
568
|
-
const errorMessage = getErrorMessage(error) ||
|
|
1134
|
+
const errorMessage = getErrorMessage(error) || 'Upload failed';
|
|
569
1135
|
const fullError = `${fileName}: ${errorMessage}`;
|
|
570
1136
|
errors.push(fullError);
|
|
571
1137
|
if (__DEV__) {
|
|
572
1138
|
console.error('File upload failed:', {
|
|
573
1139
|
fileName,
|
|
574
|
-
fileSize
|
|
575
|
-
fileType
|
|
1140
|
+
fileSize,
|
|
1141
|
+
fileType,
|
|
576
1142
|
error: errorMessage,
|
|
577
1143
|
stack: error instanceof Error ? error.stack : undefined
|
|
578
1144
|
});
|
|
@@ -607,8 +1173,6 @@ const FileManagementScreen = ({
|
|
|
607
1173
|
}
|
|
608
1174
|
return uploadedFiles;
|
|
609
1175
|
};
|
|
610
|
-
|
|
611
|
-
// biome-ignore lint/suspicious/noExplicitAny: Files from document picker may have extra properties like uri
|
|
612
1176
|
const handleFileSelection = useCallback(async selectedFiles => {
|
|
613
1177
|
const MAX_FILE_SIZE = 100 * 1024 * 1024; // 100MB
|
|
614
1178
|
const processedFiles = [];
|
|
@@ -621,55 +1185,55 @@ const FileManagementScreen = ({
|
|
|
621
1185
|
toast.error(t('fileManagement.toasts.invalidFileMissing'));
|
|
622
1186
|
continue;
|
|
623
1187
|
}
|
|
624
|
-
|
|
1188
|
+
const name = candidateName(file, '');
|
|
1189
|
+
if (!name) {
|
|
625
1190
|
if (__DEV__) {
|
|
626
1191
|
console.error('Invalid file: missing or invalid name property', file);
|
|
627
1192
|
}
|
|
628
1193
|
toast.error(t('fileManagement.toasts.invalidFileName'));
|
|
629
1194
|
continue;
|
|
630
1195
|
}
|
|
631
|
-
|
|
1196
|
+
const size = file.size;
|
|
1197
|
+
if (size === undefined || size === null || Number.isNaN(size)) {
|
|
632
1198
|
if (__DEV__) {
|
|
633
1199
|
console.error('Invalid file: missing or invalid size property', file);
|
|
634
1200
|
}
|
|
635
1201
|
toast.error(t('fileManagement.toasts.invalidFileSize', {
|
|
636
|
-
name
|
|
1202
|
+
name
|
|
637
1203
|
}));
|
|
638
1204
|
continue;
|
|
639
1205
|
}
|
|
640
|
-
if (
|
|
1206
|
+
if (size <= 0) {
|
|
641
1207
|
if (__DEV__) {
|
|
642
1208
|
console.error('Invalid file: file size is zero or negative', file);
|
|
643
1209
|
}
|
|
644
1210
|
toast.error(t('fileManagement.toasts.fileEmpty', {
|
|
645
|
-
name
|
|
1211
|
+
name
|
|
646
1212
|
}));
|
|
647
1213
|
continue;
|
|
648
1214
|
}
|
|
649
1215
|
|
|
650
1216
|
// Validate file size
|
|
651
|
-
if (
|
|
1217
|
+
if (size > MAX_FILE_SIZE) {
|
|
652
1218
|
toast.error(t('fileManagement.toasts.fileTooLarge', {
|
|
653
|
-
name
|
|
1219
|
+
name,
|
|
654
1220
|
maxSize: formatFileSize(MAX_FILE_SIZE)
|
|
655
1221
|
}));
|
|
656
1222
|
continue;
|
|
657
1223
|
}
|
|
658
|
-
|
|
659
|
-
// Ensure file has a type property
|
|
660
|
-
const fileType = file.type || 'application/octet-stream';
|
|
1224
|
+
const fileType = candidateType(file);
|
|
661
1225
|
|
|
662
1226
|
// Generate preview for images - unified approach
|
|
663
1227
|
let preview;
|
|
664
1228
|
if (fileType.startsWith('image/')) {
|
|
665
1229
|
// Try to use file URI from expo-document-picker if available (works on all platforms)
|
|
666
|
-
const fileUri = file
|
|
667
|
-
if (fileUri &&
|
|
1230
|
+
const fileUri = candidateUri(file);
|
|
1231
|
+
if (fileUri && (fileUri.startsWith('file://') || fileUri.startsWith('content://') || fileUri.startsWith('http://') || fileUri.startsWith('https://') || fileUri.startsWith('blob:'))) {
|
|
668
1232
|
preview = fileUri;
|
|
669
1233
|
} else {
|
|
670
|
-
// Fallback: create blob URL if possible (works on web)
|
|
1234
|
+
// Fallback: create blob URL if possible (works on web only)
|
|
671
1235
|
try {
|
|
672
|
-
if (file instanceof File || file instanceof Blob) {
|
|
1236
|
+
if (typeof File !== 'undefined' && file instanceof File || typeof Blob !== 'undefined' && file instanceof Blob) {
|
|
673
1237
|
preview = URL.createObjectURL(file);
|
|
674
1238
|
}
|
|
675
1239
|
} catch (error) {
|
|
@@ -683,8 +1247,8 @@ const FileManagementScreen = ({
|
|
|
683
1247
|
processedFiles.push({
|
|
684
1248
|
file,
|
|
685
1249
|
preview,
|
|
686
|
-
size
|
|
687
|
-
name
|
|
1250
|
+
size,
|
|
1251
|
+
name,
|
|
688
1252
|
type: fileType
|
|
689
1253
|
});
|
|
690
1254
|
}
|
|
@@ -696,7 +1260,7 @@ const FileManagementScreen = ({
|
|
|
696
1260
|
// Show preview modal for user to review files before upload
|
|
697
1261
|
setPendingFiles(processedFiles);
|
|
698
1262
|
setShowUploadPreview(true);
|
|
699
|
-
}, []);
|
|
1263
|
+
}, [t]);
|
|
700
1264
|
const handleConfirmUpload = async () => {
|
|
701
1265
|
if (pendingFiles.length === 0) return;
|
|
702
1266
|
setShowUploadPreview(false);
|
|
@@ -876,8 +1440,8 @@ const FileManagementScreen = ({
|
|
|
876
1440
|
id: fileId,
|
|
877
1441
|
name: filename
|
|
878
1442
|
});
|
|
879
|
-
|
|
880
|
-
}, [
|
|
1443
|
+
fileDeleteDialog.open();
|
|
1444
|
+
}, [fileDeleteDialog]);
|
|
881
1445
|
const handleFileDelete = useCallback(async () => {
|
|
882
1446
|
if (!pendingDeleteFile) return;
|
|
883
1447
|
const {
|
|
@@ -911,8 +1475,8 @@ const FileManagementScreen = ({
|
|
|
911
1475
|
}, [pendingDeleteFile, storeSetDeleting, oxyServices, loadFiles, t]);
|
|
912
1476
|
const confirmBulkDelete = useCallback(() => {
|
|
913
1477
|
if (selectedIds.size === 0) return;
|
|
914
|
-
|
|
915
|
-
}, [selectedIds.size,
|
|
1478
|
+
bulkDeleteDialog.open();
|
|
1479
|
+
}, [selectedIds.size, bulkDeleteDialog]);
|
|
916
1480
|
const handleBulkDelete = useCallback(async () => {
|
|
917
1481
|
if (selectedIds.size === 0) return;
|
|
918
1482
|
try {
|
|
@@ -1978,6 +2542,51 @@ const FileManagementScreen = ({
|
|
|
1978
2542
|
return /*#__PURE__*/_jsx(SkeletonLoader, {});
|
|
1979
2543
|
}
|
|
1980
2544
|
|
|
2545
|
+
// Dedicated flagship-style photo picker view used in the avatar-picker
|
|
2546
|
+
// context (selectMode + image-only filter). The picker is intentionally
|
|
2547
|
+
// minimal: black backdrop, edge-to-edge grid, translucent header. The
|
|
2548
|
+
// standalone file manager (non-picker browse) keeps the existing UI.
|
|
2549
|
+
if (isImageOnlyPicker && !showUploadPreview) {
|
|
2550
|
+
const photosOnly = filteredFiles.filter(file => file.contentType.startsWith('image/'));
|
|
2551
|
+
const isOwner = user?.id === targetUserId;
|
|
2552
|
+
const allowUpload = isOwner && allowUploadInSelectMode;
|
|
2553
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
2554
|
+
children: [/*#__PURE__*/_jsx(PhotoPickerView, {
|
|
2555
|
+
photos: photosOnly,
|
|
2556
|
+
selectedIds: selectedIds,
|
|
2557
|
+
multiSelect: multiSelect,
|
|
2558
|
+
maxSelection: maxSelection,
|
|
2559
|
+
allowUpload: allowUpload,
|
|
2560
|
+
refreshing: refreshing,
|
|
2561
|
+
uploading: uploading,
|
|
2562
|
+
isPickingDocument: isPickingDocument,
|
|
2563
|
+
uploadProgress: uploadProgress,
|
|
2564
|
+
hasMore: paging.hasMore,
|
|
2565
|
+
loadingMore: paging.loadingMore,
|
|
2566
|
+
reduceMotion: reduceMotion,
|
|
2567
|
+
getThumbUrl: getSafeDownloadUrlCallback,
|
|
2568
|
+
primaryColor: colors.primary,
|
|
2569
|
+
isOwner: isOwner,
|
|
2570
|
+
onTogglePhoto: toggleSelect,
|
|
2571
|
+
onPreviewPhoto: file => showFileDetailsModal(file),
|
|
2572
|
+
onUpload: handleFileUpload,
|
|
2573
|
+
onRefresh: () => loadFiles('refresh'),
|
|
2574
|
+
onLoadMore: () => loadFiles('more'),
|
|
2575
|
+
onCancel: () => {
|
|
2576
|
+
if (onClose) onClose();else goBack?.();
|
|
2577
|
+
},
|
|
2578
|
+
onConfirm: confirmMultiSelection,
|
|
2579
|
+
t: t
|
|
2580
|
+
}), /*#__PURE__*/_jsx(FileDetailsModal, {
|
|
2581
|
+
control: fileDetailsControl,
|
|
2582
|
+
file: selectedFile,
|
|
2583
|
+
onDownload: handleFileDownload,
|
|
2584
|
+
onDelete: confirmFileDelete,
|
|
2585
|
+
isOwner: isOwner
|
|
2586
|
+
})]
|
|
2587
|
+
});
|
|
2588
|
+
}
|
|
2589
|
+
|
|
1981
2590
|
// If a file is opened, show the file viewer
|
|
1982
2591
|
if (!selectMode && openedFile) {
|
|
1983
2592
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
@@ -2065,7 +2674,7 @@ const FileManagementScreen = ({
|
|
|
2065
2674
|
key: 'visibility',
|
|
2066
2675
|
text: t('fileManagement.visibility'),
|
|
2067
2676
|
onPress: () => {
|
|
2068
|
-
|
|
2677
|
+
visibilityChangeDialog.open();
|
|
2069
2678
|
},
|
|
2070
2679
|
icon: 'eye'
|
|
2071
2680
|
}] : undefined,
|
|
@@ -2090,41 +2699,53 @@ const FileManagementScreen = ({
|
|
|
2090
2699
|
icon: viewMode === 'all' ? 'folder' : 'folder-outline',
|
|
2091
2700
|
primaryColor: colors.primary,
|
|
2092
2701
|
textColor: colors.text,
|
|
2093
|
-
style: fileManagementStyles.viewModeButton
|
|
2702
|
+
style: fileManagementStyles.viewModeButton,
|
|
2703
|
+
accessibilityLabel: t('fileManagement.a11y.viewAll') || 'Show all files'
|
|
2094
2704
|
}), /*#__PURE__*/_jsx(AnimatedButton, {
|
|
2095
2705
|
isSelected: viewMode === 'photos',
|
|
2096
2706
|
onPress: () => setViewMode('photos'),
|
|
2097
2707
|
icon: viewMode === 'photos' ? 'image-multiple' : 'image-multiple-outline',
|
|
2098
2708
|
primaryColor: colors.primary,
|
|
2099
2709
|
textColor: colors.text,
|
|
2100
|
-
style: fileManagementStyles.viewModeButton
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2710
|
+
style: fileManagementStyles.viewModeButton,
|
|
2711
|
+
accessibilityLabel: t('fileManagement.a11y.viewPhotos') || 'Show photos only'
|
|
2712
|
+
}), !isImageOnlyPicker && /*#__PURE__*/_jsxs(_Fragment, {
|
|
2713
|
+
children: [/*#__PURE__*/_jsx(AnimatedButton, {
|
|
2714
|
+
isSelected: viewMode === 'videos',
|
|
2715
|
+
onPress: () => setViewMode('videos'),
|
|
2716
|
+
icon: viewMode === 'videos' ? 'video' : 'video-outline',
|
|
2717
|
+
primaryColor: colors.primary,
|
|
2718
|
+
textColor: colors.text,
|
|
2719
|
+
style: fileManagementStyles.viewModeButton,
|
|
2720
|
+
accessibilityLabel: t('fileManagement.a11y.viewVideos') || 'Show videos only'
|
|
2721
|
+
}), /*#__PURE__*/_jsx(AnimatedButton, {
|
|
2722
|
+
isSelected: viewMode === 'documents',
|
|
2723
|
+
onPress: () => setViewMode('documents'),
|
|
2724
|
+
icon: viewMode === 'documents' ? 'file-document' : 'file-document-outline',
|
|
2725
|
+
primaryColor: colors.primary,
|
|
2726
|
+
textColor: colors.text,
|
|
2727
|
+
style: fileManagementStyles.viewModeButton,
|
|
2728
|
+
accessibilityLabel: t('fileManagement.a11y.viewDocuments') || 'Show documents only'
|
|
2729
|
+
}), /*#__PURE__*/_jsx(AnimatedButton, {
|
|
2730
|
+
isSelected: viewMode === 'audio',
|
|
2731
|
+
onPress: () => setViewMode('audio'),
|
|
2732
|
+
icon: viewMode === 'audio' ? 'music-note' : 'music-note-outline',
|
|
2733
|
+
primaryColor: colors.primary,
|
|
2734
|
+
textColor: colors.text,
|
|
2735
|
+
style: fileManagementStyles.viewModeButton,
|
|
2736
|
+
accessibilityLabel: t('fileManagement.a11y.viewAudio') || 'Show audio only'
|
|
2737
|
+
})]
|
|
2122
2738
|
})]
|
|
2123
2739
|
})
|
|
2124
2740
|
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
2125
2741
|
style: [fileManagementStyles.sortButton, {
|
|
2126
2742
|
backgroundColor: colors.card
|
|
2127
2743
|
}],
|
|
2744
|
+
accessibilityRole: "button",
|
|
2745
|
+
accessibilityLabel: t('fileManagement.a11y.sortBy', {
|
|
2746
|
+
field: sortBy,
|
|
2747
|
+
order: sortOrder === 'asc' ? 'ascending' : 'descending'
|
|
2748
|
+
}) || `Sort by ${sortBy}, ${sortOrder === 'asc' ? 'ascending' : 'descending'}`,
|
|
2128
2749
|
onPress: () => {
|
|
2129
2750
|
// Cycle through sort options: date -> size -> name -> type -> date
|
|
2130
2751
|
const sortOrder = ['date', 'size', 'name', 'type'];
|
|
@@ -2146,11 +2767,16 @@ const FileManagementScreen = ({
|
|
|
2146
2767
|
color: colors.textSecondary
|
|
2147
2768
|
})]
|
|
2148
2769
|
}), user?.id === targetUserId && (!selectMode || selectMode && allowUploadInSelectMode) && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
2149
|
-
style: [fileManagementStyles.uploadButton, {
|
|
2770
|
+
style: [fileManagementStyles.uploadButton, isImageOnlyPicker && fileManagementStyles.uploadButtonExtended, {
|
|
2150
2771
|
backgroundColor: colors.primary
|
|
2151
2772
|
}],
|
|
2152
2773
|
onPress: handleFileUpload,
|
|
2153
2774
|
disabled: uploading || isPickingDocument,
|
|
2775
|
+
accessibilityRole: "button",
|
|
2776
|
+
accessibilityLabel: isImageOnlyPicker ? t('fileManagement.a11y.uploadFromDevice') || 'Upload photo from device' : t('fileManagement.a11y.uploadFile') || 'Upload file',
|
|
2777
|
+
accessibilityState: {
|
|
2778
|
+
busy: uploading || isPickingDocument
|
|
2779
|
+
},
|
|
2154
2780
|
children: uploading ? /*#__PURE__*/_jsxs(View, {
|
|
2155
2781
|
style: fileManagementStyles.uploadProgress,
|
|
2156
2782
|
children: [/*#__PURE__*/_jsx(ActivityIndicator, {
|
|
@@ -2163,6 +2789,17 @@ const FileManagementScreen = ({
|
|
|
2163
2789
|
}) : isPickingDocument ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
2164
2790
|
size: "small",
|
|
2165
2791
|
color: "#FFFFFF"
|
|
2792
|
+
}) : isImageOnlyPicker ? /*#__PURE__*/_jsxs(View, {
|
|
2793
|
+
style: fileManagementStyles.uploadButtonContent,
|
|
2794
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
2795
|
+
name: "cloud-upload",
|
|
2796
|
+
size: 18,
|
|
2797
|
+
color: "#FFFFFF"
|
|
2798
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
2799
|
+
style: fileManagementStyles.uploadButtonLabel,
|
|
2800
|
+
numberOfLines: 1,
|
|
2801
|
+
children: t('fileManagement.upload') || 'Upload'
|
|
2802
|
+
})]
|
|
2166
2803
|
}) : /*#__PURE__*/_jsx(Ionicons, {
|
|
2167
2804
|
name: "add",
|
|
2168
2805
|
size: 22,
|
|
@@ -2358,51 +2995,53 @@ const FileManagementScreen = ({
|
|
|
2358
2995
|
color: colors.primary
|
|
2359
2996
|
})]
|
|
2360
2997
|
})
|
|
2361
|
-
}), /*#__PURE__*/_jsx(
|
|
2362
|
-
control:
|
|
2998
|
+
}), /*#__PURE__*/_jsx(Dialog, {
|
|
2999
|
+
control: fileDeleteDialog,
|
|
2363
3000
|
title: t('fileManagement.deleteFile') || 'Delete File',
|
|
2364
3001
|
description: pendingDeleteFile ? t('fileManagement.confirms.deleteFile', {
|
|
2365
3002
|
filename: pendingDeleteFile.name
|
|
2366
3003
|
}) : '',
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
3004
|
+
actions: [{
|
|
3005
|
+
label: t('fileManagement.confirm') || 'Delete',
|
|
3006
|
+
color: 'destructive',
|
|
3007
|
+
onPress: handleFileDelete
|
|
3008
|
+
}, {
|
|
3009
|
+
label: t('common.cancel') || 'Cancel',
|
|
3010
|
+
color: 'cancel'
|
|
3011
|
+
}]
|
|
3012
|
+
}), /*#__PURE__*/_jsx(Dialog, {
|
|
3013
|
+
control: bulkDeleteDialog,
|
|
2372
3014
|
title: t('fileManagement.deleteFiles') || 'Delete Files',
|
|
2373
3015
|
description: t('fileManagement.confirms.deleteFiles', {
|
|
2374
3016
|
count: selectedIds.size
|
|
2375
3017
|
}),
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
}),
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
cta: t('common.cancel') || 'Cancel'
|
|
2404
|
-
})]
|
|
2405
|
-
})]
|
|
3018
|
+
actions: [{
|
|
3019
|
+
label: t('fileManagement.confirm') || 'Delete',
|
|
3020
|
+
color: 'destructive',
|
|
3021
|
+
onPress: handleBulkDelete
|
|
3022
|
+
}, {
|
|
3023
|
+
label: t('common.cancel') || 'Cancel',
|
|
3024
|
+
color: 'cancel'
|
|
3025
|
+
}]
|
|
3026
|
+
}), /*#__PURE__*/_jsx(Dialog, {
|
|
3027
|
+
control: visibilityChangeDialog,
|
|
3028
|
+
title: t('fileManagement.changeVisibility') || 'Change Visibility',
|
|
3029
|
+
description: t('fileManagement.changeVisibilityConfirm', {
|
|
3030
|
+
count: selectedIds.size
|
|
3031
|
+
}),
|
|
3032
|
+
actions: [{
|
|
3033
|
+
label: t('fileManagement.private') || 'Private',
|
|
3034
|
+
onPress: () => handleBulkVisibilityChange('private')
|
|
3035
|
+
}, {
|
|
3036
|
+
label: t('fileManagement.public') || 'Public',
|
|
3037
|
+
onPress: () => handleBulkVisibilityChange('public')
|
|
3038
|
+
}, {
|
|
3039
|
+
label: t('fileManagement.unlisted') || 'Unlisted',
|
|
3040
|
+
onPress: () => handleBulkVisibilityChange('unlisted')
|
|
3041
|
+
}, {
|
|
3042
|
+
label: t('common.cancel') || 'Cancel',
|
|
3043
|
+
color: 'cancel'
|
|
3044
|
+
}]
|
|
2406
3045
|
})]
|
|
2407
3046
|
});
|
|
2408
3047
|
};
|