@oxyhq/services 6.9.15 → 6.9.17
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/assets/icons/OxyServices.js +13 -52
- package/lib/commonjs/assets/icons/OxyServices.js.map +1 -1
- package/lib/commonjs/assets/illustrations/HighFive.js +18 -57
- package/lib/commonjs/assets/illustrations/HighFive.js.map +1 -1
- package/lib/commonjs/index.js +201 -190
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lib/sonner-safe.js.map +0 -1
- package/lib/commonjs/lib/sonner.js +5 -16
- package/lib/commonjs/lib/sonner.js.map +1 -1
- package/lib/commonjs/lib/sonner.native.js +8 -45
- package/lib/commonjs/lib/sonner.native.js.map +1 -1
- package/lib/commonjs/lib/sonner.web.js +8 -45
- package/lib/commonjs/lib/sonner.web.js.map +1 -1
- package/lib/commonjs/ui/client.js +66 -88
- package/lib/commonjs/ui/client.js.map +1 -1
- package/lib/commonjs/ui/components/ActivityIndicator.js +0 -26
- package/lib/commonjs/ui/components/ActivityIndicator.js.map +0 -1
- package/lib/commonjs/ui/components/Avatar.js +39 -27
- package/lib/commonjs/ui/components/Avatar.js.map +0 -1
- package/lib/commonjs/ui/components/BottomSheet.js +0 -20
- package/lib/commonjs/ui/components/BottomSheet.js.map +0 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +65 -103
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +0 -1
- package/lib/commonjs/ui/components/CrossFadeIcon.js +0 -30
- package/lib/commonjs/ui/components/CrossFadeIcon.js.map +0 -1
- package/lib/commonjs/ui/components/EmptyState.js +10 -13
- package/lib/commonjs/ui/components/EmptyState.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +52 -81
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/FontLoader.js +17 -52
- package/lib/commonjs/ui/components/FontLoader.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +27 -29
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedSection.js +10 -11
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +0 -34
- package/lib/commonjs/ui/components/Header.js.map +0 -1
- package/lib/commonjs/ui/components/HelperText.js +0 -26
- package/lib/commonjs/ui/components/HelperText.js.map +0 -1
- package/lib/commonjs/ui/components/Icon.js +12 -12
- package/lib/commonjs/ui/components/Icon.js.map +1 -1
- package/lib/commonjs/ui/components/IconButton/IconButton.js.map +0 -1
- package/lib/commonjs/ui/components/IconButton/utils.js +4 -8
- package/lib/commonjs/ui/components/IconButton/utils.js.map +1 -1
- package/lib/commonjs/ui/components/LoadingState.js +11 -14
- package/lib/commonjs/ui/components/LoadingState.js.map +1 -1
- package/lib/commonjs/ui/components/OxyLogo.js +14 -53
- package/lib/commonjs/ui/components/OxyLogo.js.map +1 -1
- package/lib/commonjs/ui/components/OxyPayButton.js +17 -19
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js.map +0 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +31 -35
- package/lib/commonjs/ui/components/ProfileCard.js.map +0 -1
- package/lib/commonjs/ui/components/QuickActions.js +16 -16
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -1
- package/lib/commonjs/ui/components/Section.js +12 -15
- package/lib/commonjs/ui/components/Section.js.map +1 -1
- package/lib/commonjs/ui/components/SectionTitle.js +14 -13
- package/lib/commonjs/ui/components/SectionTitle.js.map +1 -1
- package/lib/commonjs/ui/components/SettingRow.js.map +0 -1
- package/lib/commonjs/ui/components/SignInModal.js +115 -132
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js +71 -85
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/commonjs/ui/components/Surface.js +37 -79
- package/lib/commonjs/ui/components/Surface.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/Addons/Underline.js +8 -6
- package/lib/commonjs/ui/components/TextField/Addons/Underline.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.js +29 -74
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAffix.js +23 -27
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAffix.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldIcon.js +27 -31
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldIcon.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/Adornment/enums.js +11 -11
- package/lib/commonjs/ui/components/TextField/Adornment/enums.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/Adornment/types.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/Adornment/utils.js +1 -1
- package/lib/commonjs/ui/components/TextField/Adornment/utils.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/Label/InputLabel.js +21 -23
- package/lib/commonjs/ui/components/TextField/Label/InputLabel.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/Label/LabelBackground.js +10 -37
- package/lib/commonjs/ui/components/TextField/Label/LabelBackground.js.map +1 -2
- package/lib/commonjs/ui/components/TextField/TextFieldFlat.js +65 -106
- package/lib/commonjs/ui/components/TextField/TextFieldFlat.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/TextFieldOutlined.js +0 -33
- package/lib/commonjs/ui/components/TextField/TextFieldOutlined.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/constants.js +25 -35
- package/lib/commonjs/ui/components/TextField/constants.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/helpers.js +43 -44
- package/lib/commonjs/ui/components/TextField/helpers.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/types.js.map +0 -1
- package/lib/commonjs/ui/components/TextField.js +35 -76
- package/lib/commonjs/ui/components/TextField.js.map +1 -1
- package/lib/commonjs/ui/components/TouchableRipple/Pressable.js.map +1 -1
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.js +30 -64
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.js.map +1 -1
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js +26 -68
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js.map +1 -1
- package/lib/commonjs/ui/components/TouchableRipple/utils.js +6 -10
- package/lib/commonjs/ui/components/TouchableRipple/utils.js.map +1 -1
- package/lib/commonjs/ui/components/Typography/AnimatedText.js.map +0 -1
- package/lib/commonjs/ui/components/Typography/types.js +3 -3
- package/lib/commonjs/ui/components/Typography/types.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/FormInput.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/ProgressIndicator.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/constants.js.map +0 -1
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js +1 -1
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +0 -1
- package/lib/commonjs/ui/components/feedback/index.js +0 -10
- package/lib/commonjs/ui/components/feedback/index.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/types.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/useFeedbackForm.js +5 -5
- package/lib/commonjs/ui/components/feedback/useFeedbackForm.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +14 -13
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +0 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +66 -77
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +118 -127
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +0 -1
- package/lib/commonjs/ui/components/fileManagement/styles.js.map +0 -1
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js +0 -20
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js.map +0 -1
- package/lib/commonjs/ui/components/icon/OxyIcon.js.map +0 -1
- package/lib/commonjs/ui/components/icon/index.js +7 -12
- package/lib/commonjs/ui/components/icon/index.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +54 -62
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +21 -22
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +0 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +41 -52
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/modals/index.js +3 -8
- package/lib/commonjs/ui/components/modals/index.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +70 -89
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +0 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +0 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +0 -1
- package/lib/commonjs/ui/components/payment/constants.js.map +0 -1
- package/lib/commonjs/ui/components/payment/index.js +0 -15
- package/lib/commonjs/ui/components/payment/index.js.map +1 -1
- package/lib/commonjs/ui/components/payment/paymentStyles.js +10 -10
- package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -1
- package/lib/commonjs/ui/components/payment/types.js.map +1 -1
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +27 -59
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
- package/lib/commonjs/ui/components/styles/overlay.js +6 -4
- package/lib/commonjs/ui/components/styles/overlay.js.map +1 -1
- package/lib/commonjs/ui/components/styles/shadow.js +7 -7
- package/lib/commonjs/ui/components/styles/shadow.js.map +1 -1
- package/lib/commonjs/ui/components/theming.js +6 -4
- package/lib/commonjs/ui/components/theming.js.map +1 -1
- package/lib/commonjs/ui/components/types.js.map +1 -1
- package/lib/commonjs/ui/components/utils/forwardRef.js +3 -43
- package/lib/commonjs/ui/components/utils/forwardRef.js.map +1 -1
- package/lib/commonjs/ui/components/utils/hasTouchHandler.js.map +1 -1
- package/lib/commonjs/ui/components/utils/roundLayoutSize.js.map +0 -1
- package/lib/commonjs/ui/components/utils/splitStyles.js +7 -1
- package/lib/commonjs/ui/components/utils/splitStyles.js.map +1 -1
- package/lib/commonjs/ui/constants/iconColors.js +16 -12
- package/lib/commonjs/ui/constants/iconColors.js.map +0 -1
- package/lib/commonjs/ui/constants/spacing.js.map +1 -1
- package/lib/commonjs/ui/constants/theme.js +9 -8
- package/lib/commonjs/ui/constants/theme.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +0 -1
- package/lib/commonjs/ui/context/OxyContext.js.map +0 -1
- package/lib/commonjs/ui/context/ThemeContext.js +4 -27
- package/lib/commonjs/ui/context/ThemeContext.js.map +1 -2
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +0 -27
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +0 -1
- package/lib/commonjs/ui/hooks/index.js +26 -27
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/index.js +22 -31
- package/lib/commonjs/ui/hooks/mutations/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +106 -83
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +53 -45
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/index.js +39 -50
- package/lib/commonjs/ui/hooks/queries/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +0 -6
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +39 -33
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +0 -1
- package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js +12 -11
- package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js.map +0 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +32 -28
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queryClient.js +17 -10
- package/lib/commonjs/ui/hooks/queryClient.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAssets.js +26 -13
- package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAsyncAction.js.map +0 -1
- package/lib/commonjs/ui/hooks/useAuth.js +21 -24
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +0 -3
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useColorScheme.js +8 -6
- package/lib/commonjs/ui/hooks/useColorScheme.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceManagement.js +10 -10
- package/lib/commonjs/ui/hooks/useDeviceManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFileDownloadUrl.js +7 -7
- package/lib/commonjs/ui/hooks/useFileDownloadUrl.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFileFiltering.js +9 -7
- package/lib/commonjs/ui/hooks/useFileFiltering.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +75 -67
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.types.js +0 -5
- package/lib/commonjs/ui/hooks/useFollow.types.js.map +0 -1
- package/lib/commonjs/ui/hooks/useI18n.js +1 -1
- package/lib/commonjs/ui/hooks/useI18n.js.map +1 -1
- package/lib/commonjs/ui/hooks/useLanguageManagement.js +17 -16
- package/lib/commonjs/ui/hooks/useLanguageManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useProfileEditing.js +1 -1
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/hooks/useQueryClient.js +2 -2
- package/lib/commonjs/ui/hooks/useQueryClient.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +44 -40
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +39 -34
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSettingToggle.js +22 -16
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/commonjs/ui/hooks/useStorage.js +6 -6
- package/lib/commonjs/ui/hooks/useStorage.js.map +1 -1
- package/lib/commonjs/ui/hooks/useThemeColors.js +1 -1
- package/lib/commonjs/ui/hooks/useThemeColors.js.map +1 -1
- package/lib/commonjs/ui/hooks/useThemeStyles.js +13 -12
- package/lib/commonjs/ui/hooks/useThemeStyles.js.map +1 -1
- package/lib/commonjs/ui/hooks/useWebSSO.js +19 -11
- package/lib/commonjs/ui/hooks/useWebSSO.js.map +1 -1
- package/lib/commonjs/ui/index.js +138 -112
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/isFrontend.js +2 -2
- package/lib/commonjs/ui/isFrontend.js.map +1 -1
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +1 -1
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +0 -1
- package/lib/commonjs/ui/navigation/routes.js +12 -6
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +66 -75
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +133 -164
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +133 -150
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +44 -83
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +0 -19
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +54 -61
- package/lib/commonjs/ui/screens/FAQScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +137 -155
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/FollowersListScreen.js +6 -9
- package/lib/commonjs/ui/screens/FollowersListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FollowingListScreen.js +6 -9
- package/lib/commonjs/ui/screens/FollowingListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +36 -75
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +43 -79
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +50 -82
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +31 -35
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +0 -23
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +107 -120
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +69 -63
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +205 -241
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +81 -114
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +102 -128
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +0 -31
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +32 -69
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +85 -120
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +72 -91
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +45 -80
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +29 -29
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/server.js +58 -47
- package/lib/commonjs/ui/server.js.map +1 -1
- package/lib/commonjs/ui/stores/accountStore.js +1 -1
- package/lib/commonjs/ui/stores/accountStore.js.map +0 -1
- package/lib/commonjs/ui/stores/assetStore.js +16 -13
- package/lib/commonjs/ui/stores/assetStore.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +6 -5
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/stores/fileStore.js.map +1 -1
- package/lib/commonjs/ui/stores/followStore.js +10 -3
- package/lib/commonjs/ui/stores/followStore.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +12 -12
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
- package/lib/commonjs/ui/styles/fonts.js +19 -18
- package/lib/commonjs/ui/styles/fonts.js.map +1 -1
- package/lib/commonjs/ui/styles/index.js.map +0 -1
- package/lib/commonjs/ui/styles/spacing.js +0 -11
- package/lib/commonjs/ui/styles/spacing.js.map +0 -1
- package/lib/commonjs/ui/styles/theme.js +12 -11
- package/lib/commonjs/ui/styles/theme.js.map +1 -1
- package/lib/commonjs/ui/types/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/types/navigation.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +16 -11
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/commonjs/ui/utils/colorUtils.js +0 -17
- package/lib/commonjs/ui/utils/colorUtils.js.map +0 -1
- package/lib/commonjs/ui/utils/confirmAction.js +1 -1
- package/lib/commonjs/ui/utils/confirmAction.js.map +1 -1
- package/lib/commonjs/ui/utils/errorHandlers.js +0 -1
- package/lib/commonjs/ui/utils/errorHandlers.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +38 -22
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/utils/iconNames.js.map +0 -1
- package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/commonjs/ui/utils/storageHelpers.js +12 -7
- package/lib/commonjs/ui/utils/storageHelpers.js.map +1 -1
- package/lib/commonjs/ui/utils/themeUtils.js +0 -15
- package/lib/commonjs/ui/utils/themeUtils.js.map +0 -1
- package/lib/commonjs/ui/utils/userUtils.js +9 -6
- package/lib/commonjs/ui/utils/userUtils.js.map +1 -1
- package/lib/commonjs/utils/hookUtils.js +79 -60
- package/lib/commonjs/utils/hookUtils.js.map +1 -1
- package/lib/module/assets/icons/OxyServices.js +0 -12
- package/lib/module/assets/icons/OxyServices.js.map +0 -1
- package/lib/module/assets/illustrations/HighFive.js +0 -15
- package/lib/module/assets/illustrations/HighFive.js.map +0 -1
- package/lib/module/index.js +35 -406
- package/lib/module/index.js.map +1 -1
- package/lib/module/lib/sonner-safe.js +8 -7
- package/lib/module/lib/sonner-safe.js.map +1 -1
- package/lib/module/lib/sonner.js +1 -17
- package/lib/module/lib/sonner.js.map +1 -1
- package/lib/module/lib/sonner.native.js +0 -45
- package/lib/module/lib/sonner.native.js.map +1 -1
- package/lib/module/lib/sonner.web.js +6 -48
- package/lib/module/lib/sonner.web.js.map +1 -1
- package/lib/module/ui/client.js +25 -165
- package/lib/module/ui/client.js.map +1 -1
- package/lib/module/ui/components/ActivityIndicator.js +27 -69
- package/lib/module/ui/components/ActivityIndicator.js.map +1 -1
- package/lib/module/ui/components/AutoHeightScrollView.js +9 -13
- package/lib/module/ui/components/AutoHeightScrollView.js.map +1 -1
- package/lib/module/ui/components/Avatar.js +0 -8
- package/lib/module/ui/components/Avatar.js.map +1 -1
- package/lib/module/ui/components/BottomSheet.js +0 -99
- package/lib/module/ui/components/BottomSheet.js.map +0 -1
- package/lib/module/ui/components/BottomSheetRouter.js +61 -105
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/module/ui/components/CrossFadeIcon.js +16 -60
- package/lib/module/ui/components/CrossFadeIcon.js.map +1 -1
- package/lib/module/ui/components/EmptyState.js +7 -15
- package/lib/module/ui/components/EmptyState.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +50 -84
- package/lib/module/ui/components/FollowButton.js.map +0 -1
- package/lib/module/ui/components/FontLoader.js +17 -57
- package/lib/module/ui/components/FontLoader.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +27 -31
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/GroupedSection.js +9 -13
- package/lib/module/ui/components/GroupedSection.js.map +1 -1
- package/lib/module/ui/components/Header.js +57 -102
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/HelperText.js +13 -55
- package/lib/module/ui/components/HelperText.js.map +1 -1
- package/lib/module/ui/components/Icon.js +13 -19
- package/lib/module/ui/components/Icon.js.map +0 -1
- package/lib/module/ui/components/IconButton/IconButton.js +24 -31
- package/lib/module/ui/components/IconButton/IconButton.js.map +0 -1
- package/lib/module/ui/components/IconButton/utils.js +4 -14
- package/lib/module/ui/components/IconButton/utils.js.map +1 -1
- package/lib/module/ui/components/LoadingState.js +0 -12
- package/lib/module/ui/components/LoadingState.js.map +0 -1
- package/lib/module/ui/components/OxyLogo.js +0 -13
- package/lib/module/ui/components/OxyLogo.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +0 -14
- package/lib/module/ui/components/OxyPayButton.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +48 -39
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +37 -42
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +29 -37
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/components/QuickActions.js +15 -18
- package/lib/module/ui/components/QuickActions.js.map +1 -1
- package/lib/module/ui/components/Section.js +0 -16
- package/lib/module/ui/components/Section.js.map +1 -1
- package/lib/module/ui/components/SectionTitle.js +12 -15
- package/lib/module/ui/components/SectionTitle.js.map +1 -1
- package/lib/module/ui/components/SettingRow.js +0 -17
- package/lib/module/ui/components/SettingRow.js.map +1 -1
- package/lib/module/ui/components/SignInModal.js +115 -142
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/components/StepBasedScreen.js +0 -43
- package/lib/module/ui/components/StepBasedScreen.js.map +0 -1
- package/lib/module/ui/components/Surface.js +34 -82
- package/lib/module/ui/components/Surface.js.map +1 -1
- package/lib/module/ui/components/TextField/Addons/Outline.js +0 -8
- package/lib/module/ui/components/TextField/Addons/Outline.js.map +0 -1
- package/lib/module/ui/components/TextField/Addons/Underline.js +8 -12
- package/lib/module/ui/components/TextField/Addons/Underline.js.map +1 -1
- package/lib/module/ui/components/TextField/Adornment/TextFieldAdornment.js +0 -62
- package/lib/module/ui/components/TextField/Adornment/TextFieldAdornment.js.map +0 -1
- package/lib/module/ui/components/TextField/Adornment/TextFieldAffix.js +0 -15
- package/lib/module/ui/components/TextField/Adornment/TextFieldAffix.js.map +0 -1
- package/lib/module/ui/components/TextField/Adornment/TextFieldIcon.js +28 -33
- package/lib/module/ui/components/TextField/Adornment/TextFieldIcon.js.map +1 -1
- package/lib/module/ui/components/TextField/Adornment/enums.js +9 -13
- package/lib/module/ui/components/TextField/Adornment/enums.js.map +0 -1
- package/lib/module/ui/components/TextField/Adornment/types.js +0 -3
- package/lib/module/ui/components/TextField/Adornment/types.js.map +0 -1
- package/lib/module/ui/components/TextField/Adornment/utils.js +2 -7
- package/lib/module/ui/components/TextField/Adornment/utils.js.map +1 -1
- package/lib/module/ui/components/TextField/Label/InputLabel.js +18 -25
- package/lib/module/ui/components/TextField/Label/InputLabel.js.map +0 -1
- package/lib/module/ui/components/TextField/TextFieldFlat.js +63 -109
- package/lib/module/ui/components/TextField/TextFieldFlat.js.map +1 -1
- package/lib/module/ui/components/TextField/TextFieldOutlined.js +61 -109
- package/lib/module/ui/components/TextField/TextFieldOutlined.js.map +1 -1
- package/lib/module/ui/components/TextField/constants.js +0 -23
- package/lib/module/ui/components/TextField/constants.js.map +0 -1
- package/lib/module/ui/components/TextField/helpers.js +50 -69
- package/lib/module/ui/components/TextField/helpers.js.map +1 -1
- package/lib/module/ui/components/TextField/types.js +1 -3
- package/lib/module/ui/components/TextField/types.js.map +1 -1
- package/lib/module/ui/components/TextField.js +0 -64
- package/lib/module/ui/components/TextField.js.map +0 -1
- package/lib/module/ui/components/TouchableRipple/Pressable.js +6 -7
- package/lib/module/ui/components/TouchableRipple/Pressable.js.map +1 -1
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.js +28 -67
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.js.map +1 -1
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js +0 -47
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js.map +1 -1
- package/lib/module/ui/components/TouchableRipple/utils.js +6 -16
- package/lib/module/ui/components/TouchableRipple/utils.js.map +1 -1
- package/lib/module/ui/components/Typography/AnimatedText.js +0 -8
- package/lib/module/ui/components/Typography/AnimatedText.js.map +0 -1
- package/lib/module/ui/components/Typography/types.js +3 -7
- package/lib/module/ui/components/Typography/types.js.map +1 -1
- package/lib/module/ui/components/feedback/FormInput.js +12 -20
- package/lib/module/ui/components/feedback/FormInput.js.map +1 -1
- package/lib/module/ui/components/feedback/ProgressIndicator.js +0 -10
- package/lib/module/ui/components/feedback/ProgressIndicator.js.map +0 -1
- package/lib/module/ui/components/feedback/constants.js +3 -7
- package/lib/module/ui/components/feedback/constants.js.map +1 -1
- package/lib/module/ui/components/feedback/feedbackStyles.js +10 -15
- package/lib/module/ui/components/feedback/feedbackStyles.js.map +1 -1
- package/lib/module/ui/components/feedback/index.js +5 -56
- package/lib/module/ui/components/feedback/index.js.map +1 -1
- package/lib/module/ui/components/feedback/types.js +0 -3
- package/lib/module/ui/components/feedback/types.js.map +0 -1
- package/lib/module/ui/components/feedback/useFeedbackForm.js +6 -11
- package/lib/module/ui/components/feedback/useFeedbackForm.js.map +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js +0 -10
- package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +0 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +67 -72
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +0 -38
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +0 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +0 -27
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/fileManagement/styles.js +20 -24
- package/lib/module/ui/components/fileManagement/styles.js.map +1 -1
- package/lib/module/ui/components/icon/FAIRWalletIcon.js +14 -58
- package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +0 -1
- package/lib/module/ui/components/icon/OxyIcon.js +0 -5
- package/lib/module/ui/components/icon/OxyIcon.js.map +0 -1
- package/lib/module/ui/components/icon/index.js +2 -23
- package/lib/module/ui/components/icon/index.js.map +1 -1
- package/lib/module/ui/components/index.js +0 -111
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +0 -11
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +12 -15
- package/lib/module/ui/components/internal/PinInput.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +40 -48
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/modals/index.js +1 -16
- package/lib/module/ui/components/modals/index.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +69 -77
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js +17 -25
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +0 -13
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +0 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +0 -18
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +0 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +0 -29
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +0 -1
- package/lib/module/ui/components/payment/constants.js +0 -7
- package/lib/module/ui/components/payment/constants.js.map +0 -1
- package/lib/module/ui/components/payment/index.js +0 -73
- package/lib/module/ui/components/payment/index.js.map +1 -1
- package/lib/module/ui/components/payment/paymentStyles.js +0 -9
- package/lib/module/ui/components/payment/paymentStyles.js.map +0 -1
- package/lib/module/ui/components/payment/types.js +1 -3
- package/lib/module/ui/components/payment/types.js.map +1 -1
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +25 -62
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
- package/lib/module/ui/components/styles/overlay.js +0 -13
- package/lib/module/ui/components/styles/overlay.js.map +1 -1
- package/lib/module/ui/components/styles/shadow.js +8 -12
- package/lib/module/ui/components/styles/shadow.js.map +1 -1
- package/lib/module/ui/components/theming.js +6 -9
- package/lib/module/ui/components/theming.js.map +1 -1
- package/lib/module/ui/components/types.js +1 -3
- package/lib/module/ui/components/types.js.map +1 -1
- package/lib/module/ui/components/utils/forwardRef.js +0 -40
- package/lib/module/ui/components/utils/forwardRef.js.map +0 -1
- package/lib/module/ui/components/utils/hasTouchHandler.js +1 -5
- package/lib/module/ui/components/utils/hasTouchHandler.js.map +1 -1
- package/lib/module/ui/components/utils/roundLayoutSize.js +1 -6
- package/lib/module/ui/components/utils/roundLayoutSize.js.map +1 -1
- package/lib/module/ui/components/utils/splitStyles.js +7 -5
- package/lib/module/ui/components/utils/splitStyles.js.map +1 -1
- package/lib/module/ui/constants/iconColors.js +14 -16
- package/lib/module/ui/constants/iconColors.js.map +1 -1
- package/lib/module/ui/constants/spacing.js +25 -24
- package/lib/module/ui/constants/spacing.js.map +1 -1
- package/lib/module/ui/constants/theme.js +4 -7
- package/lib/module/ui/constants/theme.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +0 -17
- package/lib/module/ui/context/OxyContext.js.map +0 -1
- package/lib/module/ui/context/ThemeContext.js +7 -13
- package/lib/module/ui/context/ThemeContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +39 -68
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/index.js +0 -64
- package/lib/module/ui/hooks/index.js.map +0 -1
- package/lib/module/ui/hooks/mutations/index.js +5 -67
- package/lib/module/ui/hooks/mutations/index.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js +0 -7
- package/lib/module/ui/hooks/mutations/mutationFactory.js.map +0 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +109 -92
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +54 -54
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/index.js +0 -114
- package/lib/module/ui/hooks/queries/index.js.map +0 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +36 -39
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +40 -44
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useSecurityQueries.js +12 -17
- package/lib/module/ui/hooks/queries/useSecurityQueries.js.map +0 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +33 -37
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/hooks/queryClient.js +17 -17
- package/lib/module/ui/hooks/queryClient.js.map +1 -1
- package/lib/module/ui/hooks/useAssets.js +26 -19
- package/lib/module/ui/hooks/useAssets.js.map +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js +16 -20
- package/lib/module/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +18 -25
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +13 -16
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useColorScheme.js +0 -3
- package/lib/module/ui/hooks/useColorScheme.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceManagement.js +11 -16
- package/lib/module/ui/hooks/useDeviceManagement.js.map +1 -1
- package/lib/module/ui/hooks/useFileDownloadUrl.js +9 -15
- package/lib/module/ui/hooks/useFileDownloadUrl.js.map +0 -1
- package/lib/module/ui/hooks/useFileFiltering.js +0 -9
- package/lib/module/ui/hooks/useFileFiltering.js.map +0 -1
- package/lib/module/ui/hooks/useFollow.js +77 -75
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.types.js +0 -6
- package/lib/module/ui/hooks/useFollow.types.js.map +1 -1
- package/lib/module/ui/hooks/useI18n.js +0 -7
- package/lib/module/ui/hooks/useI18n.js.map +0 -1
- package/lib/module/ui/hooks/useLanguageManagement.js +18 -22
- package/lib/module/ui/hooks/useLanguageManagement.js.map +0 -1
- package/lib/module/ui/hooks/useProfileEditing.js +0 -9
- package/lib/module/ui/hooks/useProfileEditing.js.map +0 -1
- package/lib/module/ui/hooks/useQueryClient.js +0 -5
- package/lib/module/ui/hooks/useQueryClient.js.map +0 -1
- package/lib/module/ui/hooks/useSessionManagement.js +45 -46
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +0 -15
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js +0 -14
- package/lib/module/ui/hooks/useSettingToggle.js.map +0 -1
- package/lib/module/ui/hooks/useStorage.js +7 -12
- package/lib/module/ui/hooks/useStorage.js.map +0 -1
- package/lib/module/ui/hooks/useThemeColors.js +10 -14
- package/lib/module/ui/hooks/useThemeColors.js.map +0 -1
- package/lib/module/ui/hooks/useThemeStyles.js +14 -18
- package/lib/module/ui/hooks/useThemeStyles.js.map +1 -1
- package/lib/module/ui/hooks/useWebSSO.js +16 -12
- package/lib/module/ui/hooks/useWebSSO.js.map +1 -1
- package/lib/module/ui/index.js +37 -117
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/isFrontend.js +1 -4
- package/lib/module/ui/isFrontend.js.map +1 -1
- package/lib/module/ui/navigation/bottomSheetManager.js +0 -17
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +14 -8
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +65 -71
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +131 -167
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +0 -88
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +0 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +0 -88
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +0 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +42 -86
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +76 -79
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +89 -114
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +0 -38
- package/lib/module/ui/screens/FAQScreen.js.map +0 -1
- package/lib/module/ui/screens/FeedbackScreen.js +0 -58
- package/lib/module/ui/screens/FeedbackScreen.js.map +0 -1
- package/lib/module/ui/screens/FileManagementScreen.js +0 -149
- package/lib/module/ui/screens/FileManagementScreen.js.map +0 -1
- package/lib/module/ui/screens/FollowersListScreen.js +0 -8
- package/lib/module/ui/screens/FollowersListScreen.js.map +1 -1
- package/lib/module/ui/screens/FollowingListScreen.js +4 -12
- package/lib/module/ui/screens/FollowingListScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +0 -45
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +41 -81
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +0 -71
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +0 -1
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +31 -33
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +35 -72
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +0 -50
- package/lib/module/ui/screens/OxyAuthScreen.js.map +0 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +0 -28
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +0 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +205 -186
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +0 -56
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +0 -1
- package/lib/module/ui/screens/ProfileScreen.js +101 -102
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +0 -55
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +0 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +0 -39
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +0 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +89 -81
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +18 -21
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +0 -69
- package/lib/module/ui/screens/UserListScreen.js.map +0 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +82 -123
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +26 -29
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +72 -74
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +43 -83
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +0 -30
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +80 -81
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/server.js +29 -50
- package/lib/module/ui/server.js.map +1 -1
- package/lib/module/ui/stores/accountStore.js +0 -7
- package/lib/module/ui/stores/accountStore.js.map +0 -1
- package/lib/module/ui/stores/assetStore.js +14 -24
- package/lib/module/ui/stores/assetStore.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +5 -8
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/stores/fileStore.js +0 -6
- package/lib/module/ui/stores/fileStore.js.map +0 -1
- package/lib/module/ui/stores/followStore.js +9 -6
- package/lib/module/ui/stores/followStore.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +12 -17
- package/lib/module/ui/styles/authStyles.js.map +1 -1
- package/lib/module/ui/styles/fonts.js +0 -8
- package/lib/module/ui/styles/fonts.js.map +0 -1
- package/lib/module/ui/styles/index.js +4 -26
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/module/ui/styles/spacing.js +0 -54
- package/lib/module/ui/styles/spacing.js.map +1 -1
- package/lib/module/ui/styles/theme.js +13 -19
- package/lib/module/ui/styles/theme.js.map +1 -1
- package/lib/module/ui/types/fileManagement.js +1 -3
- package/lib/module/ui/types/fileManagement.js.map +0 -1
- package/lib/module/ui/types/navigation.js +1 -3
- package/lib/module/ui/types/navigation.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +0 -5
- package/lib/module/ui/utils/avatarUtils.js.map +0 -1
- package/lib/module/ui/utils/colorUtils.js +0 -44
- package/lib/module/ui/utils/colorUtils.js.map +0 -1
- package/lib/module/ui/utils/confirmAction.js +0 -7
- package/lib/module/ui/utils/confirmAction.js.map +1 -1
- package/lib/module/ui/utils/errorHandlers.js +18 -16
- package/lib/module/ui/utils/errorHandlers.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +0 -6
- package/lib/module/ui/utils/fileManagement.js.map +0 -1
- package/lib/module/ui/utils/iconNames.js +20 -24
- package/lib/module/ui/utils/iconNames.js.map +1 -1
- package/lib/module/ui/utils/sessionHelpers.js +15 -17
- package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/module/ui/utils/storageHelpers.js +10 -12
- package/lib/module/ui/utils/storageHelpers.js.map +1 -1
- package/lib/module/ui/utils/themeUtils.js +2 -35
- package/lib/module/ui/utils/themeUtils.js.map +0 -1
- package/lib/module/ui/utils/userUtils.js +6 -10
- package/lib/module/ui/utils/userUtils.js.map +1 -1
- package/lib/module/utils/hookUtils.js +83 -82
- package/lib/module/utils/hookUtils.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -1
- package/lib/typescript/commonjs/index.d.ts.map +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/index.d.ts +28 -21
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -1
- package/lib/typescript/module/index.d.ts.map +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/index.d.ts +28 -21
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/ui/hooks/useAuth.ts +0 -2
- package/src/ui/index.ts +33 -104
- package/lib/commonjs/assets/assets/icons/OxyServices.d.ts +0 -28
- package/lib/commonjs/assets/assets/icons/OxyServices.js +0 -53
- package/lib/commonjs/assets/assets/illustrations/HighFive.d.ts +0 -7
- package/lib/commonjs/assets/assets/illustrations/HighFive.js +0 -41
- package/lib/module/assets/assets/icons/OxyServices.d.ts +0 -28
- package/lib/module/assets/assets/icons/OxyServices.js +0 -53
- package/lib/module/assets/assets/illustrations/HighFive.d.ts +0 -7
- package/lib/module/assets/assets/illustrations/HighFive.js +0 -41
- package/lib/typescript/assets/icons/OxyServices.d.ts +0 -28
- package/lib/typescript/assets/illustrations/HighFive.d.ts +0 -7
- package/lib/typescript/index.d.ts +0 -46
- package/lib/typescript/lib/sonner-safe.d.ts +0 -8
- package/lib/typescript/lib/sonner.d.ts +0 -11
- package/lib/typescript/lib/sonner.native.d.ts +0 -14
- package/lib/typescript/lib/sonner.web.d.ts +0 -14
- package/lib/typescript/ui/client.d.ts +0 -30
- package/lib/typescript/ui/components/ActivityIndicator.d.ts +0 -44
- package/lib/typescript/ui/components/AutoHeightScrollView.d.ts +0 -22
- package/lib/typescript/ui/components/Avatar.d.ts +0 -60
- package/lib/typescript/ui/components/BottomSheet.d.ts +0 -28
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts +0 -8
- package/lib/typescript/ui/components/CrossFadeIcon.d.ts +0 -26
- package/lib/typescript/ui/components/EmptyState.d.ts +0 -7
- package/lib/typescript/ui/components/FollowButton.d.ts +0 -28
- package/lib/typescript/ui/components/FontLoader.d.ts +0 -14
- package/lib/typescript/ui/components/GroupedItem.d.ts +0 -23
- package/lib/typescript/ui/components/GroupedSection.d.ts +0 -29
- package/lib/typescript/ui/components/Header.d.ts +0 -37
- package/lib/typescript/ui/components/HelperText.d.ts +0 -46
- package/lib/typescript/ui/components/Icon.d.ts +0 -59
- package/lib/typescript/ui/components/IconButton/IconButton.d.ts +0 -98
- package/lib/typescript/ui/components/IconButton/utils.d.ts +0 -18
- package/lib/typescript/ui/components/LoadingState.d.ts +0 -8
- package/lib/typescript/ui/components/OxyLogo.d.ts +0 -28
- package/lib/typescript/ui/components/OxyPayButton.d.ts +0 -28
- package/lib/typescript/ui/components/OxyProvider.d.ts +0 -37
- package/lib/typescript/ui/components/OxySignInButton.d.ts +0 -64
- package/lib/typescript/ui/components/ProfileCard.d.ts +0 -17
- package/lib/typescript/ui/components/QuickActions.d.ts +0 -14
- package/lib/typescript/ui/components/Section.d.ts +0 -11
- package/lib/typescript/ui/components/SectionTitle.d.ts +0 -9
- package/lib/typescript/ui/components/SettingRow.d.ts +0 -19
- package/lib/typescript/ui/components/SignInModal.d.ts +0 -17
- package/lib/typescript/ui/components/StepBasedScreen.d.ts +0 -25
- package/lib/typescript/ui/components/Surface.d.ts +0 -75
- package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts +0 -15
- package/lib/typescript/ui/components/TextField/Addons/Underline.d.ts +0 -18
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +0 -44
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldAffix.d.ts +0 -72
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldIcon.d.ts +0 -77
- package/lib/typescript/ui/components/TextField/Adornment/enums.d.ts +0 -12
- package/lib/typescript/ui/components/TextField/Adornment/types.d.ts +0 -11
- package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts +0 -11
- package/lib/typescript/ui/components/TextField/Label/InputLabel.d.ts +0 -4
- package/lib/typescript/ui/components/TextField/Label/LabelBackground.d.ts +0 -3
- package/lib/typescript/ui/components/TextField/TextFieldFlat.d.ts +0 -3
- package/lib/typescript/ui/components/TextField/TextFieldOutlined.d.ts +0 -3
- package/lib/typescript/ui/components/TextField/constants.d.ts +0 -31
- package/lib/typescript/ui/components/TextField/helpers.d.ts +0 -96
- package/lib/typescript/ui/components/TextField/types.d.ts +0 -155
- package/lib/typescript/ui/components/TextField.d.ts +0 -191
- package/lib/typescript/ui/components/TouchableRipple/Pressable.d.ts +0 -12
- package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.d.ts +0 -61
- package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.native.d.ts +0 -24
- package/lib/typescript/ui/components/TouchableRipple/utils.d.ts +0 -10
- package/lib/typescript/ui/components/Typography/AnimatedText.d.ts +0 -34
- package/lib/typescript/ui/components/Typography/types.d.ts +0 -18
- package/lib/typescript/ui/components/feedback/FormInput.d.ts +0 -19
- package/lib/typescript/ui/components/feedback/ProgressIndicator.d.ts +0 -10
- package/lib/typescript/ui/components/feedback/constants.d.ts +0 -4
- package/lib/typescript/ui/components/feedback/feedbackStyles.d.ts +0 -279
- package/lib/typescript/ui/components/feedback/index.d.ts +0 -6
- package/lib/typescript/ui/components/feedback/types.d.ts +0 -45
- package/lib/typescript/ui/components/feedback/useFeedbackForm.d.ts +0 -8
- package/lib/typescript/ui/components/fileManagement/AnimatedButton.d.ts +0 -15
- package/lib/typescript/ui/components/fileManagement/FileDetailsModal.d.ts +0 -14
- package/lib/typescript/ui/components/fileManagement/FileViewer.d.ts +0 -17
- package/lib/typescript/ui/components/fileManagement/UploadPreview.d.ts +0 -20
- package/lib/typescript/ui/components/fileManagement/styles.d.ts +0 -859
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +0 -8
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts +0 -9
- package/lib/typescript/ui/components/icon/index.d.ts +0 -3
- package/lib/typescript/ui/components/index.d.ts +0 -16
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts +0 -23
- package/lib/typescript/ui/components/internal/PinInput.d.ts +0 -22
- package/lib/typescript/ui/components/modals/DeleteAccountModal.d.ts +0 -18
- package/lib/typescript/ui/components/modals/index.d.ts +0 -1
- package/lib/typescript/ui/components/payment/PaymentDetailsStep.d.ts +0 -20
- package/lib/typescript/ui/components/payment/PaymentMethodStep.d.ts +0 -13
- package/lib/typescript/ui/components/payment/PaymentReviewStep.d.ts +0 -15
- package/lib/typescript/ui/components/payment/PaymentSuccessStep.d.ts +0 -9
- package/lib/typescript/ui/components/payment/PaymentSummaryStep.d.ts +0 -14
- package/lib/typescript/ui/components/payment/constants.d.ts +0 -6
- package/lib/typescript/ui/components/payment/index.d.ts +0 -8
- package/lib/typescript/ui/components/payment/paymentStyles.d.ts +0 -395
- package/lib/typescript/ui/components/payment/types.d.ts +0 -39
- package/lib/typescript/ui/components/photogrid/JustifiedPhotoGrid.d.ts +0 -26
- package/lib/typescript/ui/components/styles/overlay.d.ts +0 -3
- package/lib/typescript/ui/components/styles/shadow.d.ts +0 -2
- package/lib/typescript/ui/components/theming.d.ts +0 -7
- package/lib/typescript/ui/components/types.d.ts +0 -80
- package/lib/typescript/ui/components/utils/forwardRef.d.ts +0 -11
- package/lib/typescript/ui/components/utils/hasTouchHandler.d.ts +0 -5
- package/lib/typescript/ui/components/utils/roundLayoutSize.d.ts +0 -1
- package/lib/typescript/ui/components/utils/splitStyles.d.ts +0 -19
- package/lib/typescript/ui/constants/iconColors.d.ts +0 -129
- package/lib/typescript/ui/constants/spacing.d.ts +0 -32
- package/lib/typescript/ui/constants/theme.d.ts +0 -96
- package/lib/typescript/ui/context/OxyContext.d.ts +0 -75
- package/lib/typescript/ui/context/ThemeContext.d.ts +0 -18
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +0 -39
- package/lib/typescript/ui/hooks/index.d.ts +0 -6
- package/lib/typescript/ui/hooks/mutations/index.d.ts +0 -8
- package/lib/typescript/ui/hooks/mutations/mutationFactory.d.ts +0 -75
- package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts +0 -42
- package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts +0 -22
- package/lib/typescript/ui/hooks/queries/index.d.ts +0 -10
- package/lib/typescript/ui/hooks/queries/queryKeys.d.ts +0 -64
- package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts +0 -42
- package/lib/typescript/ui/hooks/queries/useSecurityQueries.d.ts +0 -14
- package/lib/typescript/ui/hooks/queries/useServicesQueries.d.ts +0 -30
- package/lib/typescript/ui/hooks/queryClient.d.ts +0 -18
- package/lib/typescript/ui/hooks/useAssets.d.ts +0 -34
- package/lib/typescript/ui/hooks/useAsyncAction.d.ts +0 -50
- package/lib/typescript/ui/hooks/useAuth.d.ts +0 -77
- package/lib/typescript/ui/hooks/useAvatarPicker.d.ts +0 -24
- package/lib/typescript/ui/hooks/useColorScheme.d.ts +0 -7
- package/lib/typescript/ui/hooks/useDeviceManagement.d.ts +0 -26
- package/lib/typescript/ui/hooks/useFileDownloadUrl.d.ts +0 -21
- package/lib/typescript/ui/hooks/useFileFiltering.d.ts +0 -28
- package/lib/typescript/ui/hooks/useFollow.d.ts +0 -92
- package/lib/typescript/ui/hooks/useFollow.types.d.ts +0 -32
- package/lib/typescript/ui/hooks/useI18n.d.ts +0 -4
- package/lib/typescript/ui/hooks/useLanguageManagement.d.ts +0 -24
- package/lib/typescript/ui/hooks/useProfileEditing.d.ts +0 -35
- package/lib/typescript/ui/hooks/useQueryClient.d.ts +0 -6
- package/lib/typescript/ui/hooks/useSessionManagement.d.ts +0 -40
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts +0 -14
- package/lib/typescript/ui/hooks/useSettingToggle.d.ts +0 -56
- package/lib/typescript/ui/hooks/useStorage.d.ts +0 -15
- package/lib/typescript/ui/hooks/useThemeColors.d.ts +0 -93
- package/lib/typescript/ui/hooks/useThemeStyles.d.ts +0 -44
- package/lib/typescript/ui/hooks/useWebSSO.d.ts +0 -57
- package/lib/typescript/ui/index.d.ts +0 -23
- package/lib/typescript/ui/isFrontend.d.ts +0 -2
- package/lib/typescript/ui/navigation/bottomSheetManager.d.ts +0 -26
- package/lib/typescript/ui/navigation/routes.d.ts +0 -5
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +0 -7
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/AccountVerificationScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/EditProfileFieldScreen.d.ts +0 -12
- package/lib/typescript/ui/screens/FAQScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/FollowersListScreen.d.ts +0 -8
- package/lib/typescript/ui/screens/FollowingListScreen.d.ts +0 -8
- package/lib/typescript/ui/screens/HelpSupportScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/HistoryViewScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts +0 -6
- package/lib/typescript/ui/screens/LearnMoreUsernamesScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/LegalDocumentsScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/OxyAuthScreen.d.ts +0 -16
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +0 -14
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/ProfileScreen.d.ts +0 -8
- package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/SearchSettingsScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts +0 -14
- package/lib/typescript/ui/screens/UserListScreen.d.ts +0 -10
- package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts +0 -12
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts +0 -4
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts +0 -4
- package/lib/typescript/ui/server.d.ts +0 -40
- package/lib/typescript/ui/stores/accountStore.d.ts +0 -26
- package/lib/typescript/ui/stores/assetStore.d.ts +0 -53
- package/lib/typescript/ui/stores/authStore.d.ts +0 -16
- package/lib/typescript/ui/stores/fileStore.d.ts +0 -30
- package/lib/typescript/ui/stores/followStore.d.ts +0 -24
- package/lib/typescript/ui/styles/authStyles.d.ts +0 -331
- package/lib/typescript/ui/styles/fonts.d.ts +0 -20
- package/lib/typescript/ui/styles/index.d.ts +0 -4
- package/lib/typescript/ui/styles/spacing.d.ts +0 -48
- package/lib/typescript/ui/styles/theme.d.ts +0 -67
- package/lib/typescript/ui/types/fileManagement.d.ts +0 -40
- package/lib/typescript/ui/types/navigation.d.ts +0 -36
- package/lib/typescript/ui/utils/avatarUtils.d.ts +0 -22
- package/lib/typescript/ui/utils/colorUtils.d.ts +0 -9
- package/lib/typescript/ui/utils/confirmAction.d.ts +0 -6
- package/lib/typescript/ui/utils/errorHandlers.d.ts +0 -34
- package/lib/typescript/ui/utils/fileManagement.d.ts +0 -86
- package/lib/typescript/ui/utils/iconNames.d.ts +0 -111
- package/lib/typescript/ui/utils/sessionHelpers.d.ts +0 -64
- package/lib/typescript/ui/utils/storageHelpers.d.ts +0 -27
- package/lib/typescript/ui/utils/themeUtils.d.ts +0 -10
- package/lib/typescript/ui/utils/userUtils.d.ts +0 -28
- package/lib/typescript/utils/hookUtils.d.ts +0 -101
- package/src/assets/icons/OxyServices.d.ts +0 -28
- package/src/assets/icons/OxyServices.js +0 -53
- package/src/assets/illustrations/HighFive.d.ts +0 -7
- package/src/assets/illustrations/HighFive.js +0 -41
- package/src/index.d.ts +0 -46
- package/src/index.js +0 -127
- package/src/lib/sonner-safe.d.ts +0 -8
- package/src/lib/sonner-safe.js +0 -28
- package/src/lib/sonner.d.ts +0 -11
- package/src/lib/sonner.js +0 -16
- package/src/lib/sonner.native.d.ts +0 -14
- package/src/lib/sonner.native.js +0 -46
- package/src/lib/sonner.web.d.ts +0 -14
- package/src/lib/sonner.web.js +0 -46
- package/src/ui/client.d.ts +0 -30
- package/src/ui/client.js +0 -64
- package/src/ui/components/ActivityIndicator.d.ts +0 -44
- package/src/ui/components/ActivityIndicator.js +0 -184
- package/src/ui/components/AutoHeightScrollView.d.ts +0 -22
- package/src/ui/components/AutoHeightScrollView.js +0 -33
- package/src/ui/components/Avatar.d.ts +0 -60
- package/src/ui/components/Avatar.js +0 -146
- package/src/ui/components/BottomSheet.d.ts +0 -28
- package/src/ui/components/BottomSheet.js +0 -374
- package/src/ui/components/BottomSheetRouter.d.ts +0 -8
- package/src/ui/components/BottomSheetRouter.js +0 -211
- package/src/ui/components/CrossFadeIcon.d.ts +0 -26
- package/src/ui/components/CrossFadeIcon.js +0 -111
- package/src/ui/components/EmptyState.d.ts +0 -7
- package/src/ui/components/EmptyState.js +0 -27
- package/src/ui/components/FollowButton.d.ts +0 -28
- package/src/ui/components/FollowButton.js +0 -197
- package/src/ui/components/FontLoader.d.ts +0 -14
- package/src/ui/components/FontLoader.js +0 -185
- package/src/ui/components/GroupedItem.d.ts +0 -23
- package/src/ui/components/GroupedItem.js +0 -84
- package/src/ui/components/GroupedSection.d.ts +0 -29
- package/src/ui/components/GroupedSection.js +0 -13
- package/src/ui/components/Header.d.ts +0 -37
- package/src/ui/components/Header.js +0 -400
- package/src/ui/components/HelperText.d.ts +0 -46
- package/src/ui/components/HelperText.js +0 -119
- package/src/ui/components/Icon.d.ts +0 -59
- package/src/ui/components/Icon.js +0 -108
- package/src/ui/components/IconButton/IconButton.d.ts +0 -98
- package/src/ui/components/IconButton/IconButton.js +0 -90
- package/src/ui/components/IconButton/utils.d.ts +0 -18
- package/src/ui/components/IconButton/utils.js +0 -119
- package/src/ui/components/LoadingState.d.ts +0 -8
- package/src/ui/components/LoadingState.js +0 -29
- package/src/ui/components/OxyLogo.d.ts +0 -28
- package/src/ui/components/OxyLogo.js +0 -53
- package/src/ui/components/OxyPayButton.d.ts +0 -28
- package/src/ui/components/OxyPayButton.js +0 -76
- package/src/ui/components/OxyProvider.d.ts +0 -37
- package/src/ui/components/OxyProvider.js +0 -197
- package/src/ui/components/OxySignInButton.d.ts +0 -64
- package/src/ui/components/OxySignInButton.js +0 -145
- package/src/ui/components/ProfileCard.d.ts +0 -17
- package/src/ui/components/ProfileCard.js +0 -82
- package/src/ui/components/QuickActions.d.ts +0 -14
- package/src/ui/components/QuickActions.js +0 -62
- package/src/ui/components/Section.d.ts +0 -11
- package/src/ui/components/Section.js +0 -24
- package/src/ui/components/SectionTitle.d.ts +0 -9
- package/src/ui/components/SectionTitle.js +0 -21
- package/src/ui/components/SettingRow.d.ts +0 -19
- package/src/ui/components/SettingRow.js +0 -38
- package/src/ui/components/SignInModal.d.ts +0 -17
- package/src/ui/components/SignInModal.js +0 -428
- package/src/ui/components/StepBasedScreen.d.ts +0 -25
- package/src/ui/components/StepBasedScreen.js +0 -372
- package/src/ui/components/Surface.d.ts +0 -75
- package/src/ui/components/Surface.js +0 -239
- package/src/ui/components/TextField/Addons/Outline.d.ts +0 -15
- package/src/ui/components/TextField/Addons/Outline.js +0 -30
- package/src/ui/components/TextField/Addons/Underline.d.ts +0 -18
- package/src/ui/components/TextField/Addons/Underline.js +0 -45
- package/src/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +0 -44
- package/src/ui/components/TextField/Adornment/TextFieldAdornment.js +0 -132
- package/src/ui/components/TextField/Adornment/TextFieldAffix.d.ts +0 -72
- package/src/ui/components/TextField/Adornment/TextFieldAffix.js +0 -88
- package/src/ui/components/TextField/Adornment/TextFieldIcon.d.ts +0 -77
- package/src/ui/components/TextField/Adornment/TextFieldIcon.js +0 -91
- package/src/ui/components/TextField/Adornment/enums.d.ts +0 -12
- package/src/ui/components/TextField/Adornment/enums.js +0 -18
- package/src/ui/components/TextField/Adornment/types.d.ts +0 -11
- package/src/ui/components/TextField/Adornment/types.js +0 -2
- package/src/ui/components/TextField/Adornment/utils.d.ts +0 -11
- package/src/ui/components/TextField/Adornment/utils.js +0 -50
- package/src/ui/components/TextField/Label/InputLabel.d.ts +0 -4
- package/src/ui/components/TextField/Label/InputLabel.js +0 -125
- package/src/ui/components/TextField/Label/LabelBackground.d.ts +0 -3
- package/src/ui/components/TextField/Label/LabelBackground.js +0 -71
- package/src/ui/components/TextField/TextFieldFlat.d.ts +0 -3
- package/src/ui/components/TextField/TextFieldFlat.js +0 -347
- package/src/ui/components/TextField/TextFieldOutlined.d.ts +0 -3
- package/src/ui/components/TextField/TextFieldOutlined.js +0 -313
- package/src/ui/components/TextField/constants.d.ts +0 -31
- package/src/ui/components/TextField/constants.js +0 -40
- package/src/ui/components/TextField/helpers.d.ts +0 -96
- package/src/ui/components/TextField/helpers.js +0 -388
- package/src/ui/components/TextField/types.d.ts +0 -155
- package/src/ui/components/TextField/types.js +0 -2
- package/src/ui/components/TextField.d.ts +0 -191
- package/src/ui/components/TextField.js +0 -291
- package/src/ui/components/TouchableRipple/Pressable.d.ts +0 -12
- package/src/ui/components/TouchableRipple/Pressable.js +0 -5
- package/src/ui/components/TouchableRipple/TouchableRipple.d.ts +0 -61
- package/src/ui/components/TouchableRipple/TouchableRipple.js +0 -246
- package/src/ui/components/TouchableRipple/TouchableRipple.native.d.ts +0 -24
- package/src/ui/components/TouchableRipple/TouchableRipple.native.js +0 -99
- package/src/ui/components/TouchableRipple/utils.d.ts +0 -10
- package/src/ui/components/TouchableRipple/utils.js +0 -40
- package/src/ui/components/Typography/AnimatedText.d.ts +0 -34
- package/src/ui/components/Typography/AnimatedText.js +0 -49
- package/src/ui/components/Typography/types.d.ts +0 -18
- package/src/ui/components/Typography/types.js +0 -22
- package/src/ui/components/feedback/FormInput.d.ts +0 -19
- package/src/ui/components/feedback/FormInput.js +0 -26
- package/src/ui/components/feedback/ProgressIndicator.d.ts +0 -10
- package/src/ui/components/feedback/ProgressIndicator.js +0 -16
- package/src/ui/components/feedback/constants.d.ts +0 -4
- package/src/ui/components/feedback/constants.js +0 -21
- package/src/ui/components/feedback/feedbackStyles.d.ts +0 -279
- package/src/ui/components/feedback/feedbackStyles.js +0 -250
- package/src/ui/components/feedback/index.d.ts +0 -6
- package/src/ui/components/feedback/index.js +0 -18
- package/src/ui/components/feedback/types.d.ts +0 -45
- package/src/ui/components/feedback/types.js +0 -2
- package/src/ui/components/feedback/useFeedbackForm.d.ts +0 -8
- package/src/ui/components/feedback/useFeedbackForm.js +0 -42
- package/src/ui/components/fileManagement/AnimatedButton.d.ts +0 -15
- package/src/ui/components/fileManagement/AnimatedButton.js +0 -29
- package/src/ui/components/fileManagement/FileDetailsModal.d.ts +0 -14
- package/src/ui/components/fileManagement/FileDetailsModal.js +0 -22
- package/src/ui/components/fileManagement/FileViewer.d.ts +0 -17
- package/src/ui/components/fileManagement/FileViewer.js +0 -138
- package/src/ui/components/fileManagement/UploadPreview.d.ts +0 -20
- package/src/ui/components/fileManagement/UploadPreview.js +0 -35
- package/src/ui/components/fileManagement/styles.d.ts +0 -859
- package/src/ui/components/fileManagement/styles.js +0 -861
- package/src/ui/components/icon/FAIRWalletIcon.d.ts +0 -8
- package/src/ui/components/icon/FAIRWalletIcon.js +0 -54
- package/src/ui/components/icon/OxyIcon.d.ts +0 -9
- package/src/ui/components/icon/OxyIcon.js +0 -9
- package/src/ui/components/icon/index.d.ts +0 -3
- package/src/ui/components/icon/index.js +0 -10
- package/src/ui/components/index.d.ts +0 -16
- package/src/ui/components/index.js +0 -42
- package/src/ui/components/internal/GroupedPillButtons.d.ts +0 -23
- package/src/ui/components/internal/GroupedPillButtons.js +0 -149
- package/src/ui/components/internal/PinInput.d.ts +0 -22
- package/src/ui/components/internal/PinInput.js +0 -76
- package/src/ui/components/modals/DeleteAccountModal.d.ts +0 -18
- package/src/ui/components/modals/DeleteAccountModal.js +0 -154
- package/src/ui/components/modals/index.d.ts +0 -1
- package/src/ui/components/modals/index.js +0 -8
- package/src/ui/components/payment/PaymentDetailsStep.d.ts +0 -20
- package/src/ui/components/payment/PaymentDetailsStep.js +0 -65
- package/src/ui/components/payment/PaymentMethodStep.d.ts +0 -13
- package/src/ui/components/payment/PaymentMethodStep.js +0 -54
- package/src/ui/components/payment/PaymentReviewStep.d.ts +0 -15
- package/src/ui/components/payment/PaymentReviewStep.js +0 -88
- package/src/ui/components/payment/PaymentSuccessStep.d.ts +0 -9
- package/src/ui/components/payment/PaymentSuccessStep.js +0 -35
- package/src/ui/components/payment/PaymentSummaryStep.d.ts +0 -14
- package/src/ui/components/payment/PaymentSummaryStep.js +0 -60
- package/src/ui/components/payment/constants.d.ts +0 -6
- package/src/ui/components/payment/constants.js +0 -38
- package/src/ui/components/payment/index.d.ts +0 -8
- package/src/ui/components/payment/index.js +0 -24
- package/src/ui/components/payment/paymentStyles.d.ts +0 -395
- package/src/ui/components/payment/paymentStyles.js +0 -399
- package/src/ui/components/payment/types.d.ts +0 -39
- package/src/ui/components/payment/types.js +0 -2
- package/src/ui/components/photogrid/JustifiedPhotoGrid.d.ts +0 -26
- package/src/ui/components/photogrid/JustifiedPhotoGrid.js +0 -122
- package/src/ui/components/styles/overlay.d.ts +0 -3
- package/src/ui/components/styles/overlay.js +0 -81
- package/src/ui/components/styles/shadow.d.ts +0 -2
- package/src/ui/components/styles/shadow.js +0 -123
- package/src/ui/components/theming.d.ts +0 -7
- package/src/ui/components/theming.js +0 -111
- package/src/ui/components/types.d.ts +0 -80
- package/src/ui/components/types.js +0 -2
- package/src/ui/components/utils/forwardRef.d.ts +0 -11
- package/src/ui/components/utils/forwardRef.js +0 -46
- package/src/ui/components/utils/hasTouchHandler.d.ts +0 -5
- package/src/ui/components/utils/hasTouchHandler.js +0 -14
- package/src/ui/components/utils/roundLayoutSize.d.ts +0 -1
- package/src/ui/components/utils/roundLayoutSize.js +0 -5
- package/src/ui/components/utils/splitStyles.d.ts +0 -19
- package/src/ui/components/utils/splitStyles.js +0 -40
- package/src/ui/constants/iconColors.d.ts +0 -129
- package/src/ui/constants/iconColors.js +0 -76
- package/src/ui/constants/spacing.d.ts +0 -32
- package/src/ui/constants/spacing.js +0 -40
- package/src/ui/constants/theme.d.ts +0 -96
- package/src/ui/constants/theme.js +0 -118
- package/src/ui/context/OxyContext.d.ts +0 -75
- package/src/ui/context/OxyContext.js +0 -522
- package/src/ui/context/ThemeContext.d.ts +0 -18
- package/src/ui/context/ThemeContext.js +0 -25
- package/src/ui/context/hooks/useAuthOperations.d.ts +0 -39
- package/src/ui/context/hooks/useAuthOperations.js +0 -318
- package/src/ui/hooks/index.d.ts +0 -6
- package/src/ui/hooks/index.js +0 -19
- package/src/ui/hooks/mutations/index.d.ts +0 -8
- package/src/ui/hooks/mutations/index.js +0 -23
- package/src/ui/hooks/mutations/mutationFactory.d.ts +0 -75
- package/src/ui/hooks/mutations/mutationFactory.js +0 -126
- package/src/ui/hooks/mutations/useAccountMutations.d.ts +0 -42
- package/src/ui/hooks/mutations/useAccountMutations.js +0 -274
- package/src/ui/hooks/mutations/useServicesMutations.d.ts +0 -22
- package/src/ui/hooks/mutations/useServicesMutations.js +0 -149
- package/src/ui/hooks/queries/index.d.ts +0 -10
- package/src/ui/hooks/queries/index.js +0 -35
- package/src/ui/hooks/queries/queryKeys.d.ts +0 -64
- package/src/ui/hooks/queries/queryKeys.js +0 -82
- package/src/ui/hooks/queries/useAccountQueries.d.ts +0 -42
- package/src/ui/hooks/queries/useAccountQueries.js +0 -141
- package/src/ui/hooks/queries/useSecurityQueries.d.ts +0 -14
- package/src/ui/hooks/queries/useSecurityQueries.js +0 -45
- package/src/ui/hooks/queries/useServicesQueries.d.ts +0 -30
- package/src/ui/hooks/queries/useServicesQueries.js +0 -113
- package/src/ui/hooks/queryClient.d.ts +0 -18
- package/src/ui/hooks/queryClient.js +0 -111
- package/src/ui/hooks/useAssets.d.ts +0 -34
- package/src/ui/hooks/useAssets.js +0 -204
- package/src/ui/hooks/useAsyncAction.d.ts +0 -50
- package/src/ui/hooks/useAsyncAction.js +0 -77
- package/src/ui/hooks/useAuth.d.ts +0 -77
- package/src/ui/hooks/useAuth.js +0 -135
- package/src/ui/hooks/useAvatarPicker.d.ts +0 -24
- package/src/ui/hooks/useAvatarPicker.js +0 -44
- package/src/ui/hooks/useColorScheme.d.ts +0 -7
- package/src/ui/hooks/useColorScheme.js +0 -23
- package/src/ui/hooks/useDeviceManagement.d.ts +0 -26
- package/src/ui/hooks/useDeviceManagement.js +0 -69
- package/src/ui/hooks/useFileDownloadUrl.d.ts +0 -21
- package/src/ui/hooks/useFileDownloadUrl.js +0 -104
- package/src/ui/hooks/useFileFiltering.d.ts +0 -28
- package/src/ui/hooks/useFileFiltering.js +0 -80
- package/src/ui/hooks/useFollow.d.ts +0 -92
- package/src/ui/hooks/useFollow.js +0 -216
- package/src/ui/hooks/useFollow.types.d.ts +0 -32
- package/src/ui/hooks/useFollow.types.js +0 -4
- package/src/ui/hooks/useI18n.d.ts +0 -4
- package/src/ui/hooks/useI18n.js +0 -13
- package/src/ui/hooks/useLanguageManagement.d.ts +0 -24
- package/src/ui/hooks/useLanguageManagement.js +0 -108
- package/src/ui/hooks/useProfileEditing.d.ts +0 -35
- package/src/ui/hooks/useProfileEditing.js +0 -101
- package/src/ui/hooks/useQueryClient.d.ts +0 -6
- package/src/ui/hooks/useQueryClient.js +0 -16
- package/src/ui/hooks/useSessionManagement.d.ts +0 -40
- package/src/ui/hooks/useSessionManagement.js +0 -312
- package/src/ui/hooks/useSessionSocket.d.ts +0 -14
- package/src/ui/hooks/useSessionSocket.js +0 -209
- package/src/ui/hooks/useSettingToggle.d.ts +0 -56
- package/src/ui/hooks/useSettingToggle.js +0 -97
- package/src/ui/hooks/useStorage.d.ts +0 -15
- package/src/ui/hooks/useStorage.js +0 -40
- package/src/ui/hooks/useThemeColors.d.ts +0 -93
- package/src/ui/hooks/useThemeColors.js +0 -27
- package/src/ui/hooks/useThemeStyles.d.ts +0 -44
- package/src/ui/hooks/useThemeStyles.js +0 -63
- package/src/ui/hooks/useWebSSO.d.ts +0 -57
- package/src/ui/hooks/useWebSSO.js +0 -146
- package/src/ui/index.d.ts +0 -23
- package/src/ui/index.js +0 -97
- package/src/ui/isFrontend.d.ts +0 -2
- package/src/ui/isFrontend.js +0 -6
- package/src/ui/navigation/bottomSheetManager.d.ts +0 -26
- package/src/ui/navigation/bottomSheetManager.js +0 -68
- package/src/ui/navigation/routes.d.ts +0 -5
- package/src/ui/navigation/routes.js +0 -75
- package/src/ui/screens/AccountCenterScreen.d.ts +0 -4
- package/src/ui/screens/AccountCenterScreen.js +0 -202
- package/src/ui/screens/AccountOverviewScreen.d.ts +0 -4
- package/src/ui/screens/AccountOverviewScreen.js +0 -648
- package/src/ui/screens/AccountSettingsScreen.d.ts +0 -7
- package/src/ui/screens/AccountSettingsScreen.js +0 -480
- package/src/ui/screens/AccountSwitcherScreen.d.ts +0 -4
- package/src/ui/screens/AccountSwitcherScreen.js +0 -482
- package/src/ui/screens/AccountVerificationScreen.d.ts +0 -4
- package/src/ui/screens/AccountVerificationScreen.js +0 -164
- package/src/ui/screens/AppInfoScreen.d.ts +0 -4
- package/src/ui/screens/AppInfoScreen.js +0 -373
- package/src/ui/screens/EditProfileFieldScreen.d.ts +0 -12
- package/src/ui/screens/EditProfileFieldScreen.js +0 -549
- package/src/ui/screens/FAQScreen.d.ts +0 -4
- package/src/ui/screens/FAQScreen.js +0 -182
- package/src/ui/screens/FeedbackScreen.d.ts +0 -4
- package/src/ui/screens/FeedbackScreen.js +0 -160
- package/src/ui/screens/FileManagementScreen.d.ts +0 -4
- package/src/ui/screens/FileManagementScreen.js +0 -1473
- package/src/ui/screens/FollowersListScreen.d.ts +0 -8
- package/src/ui/screens/FollowersListScreen.js +0 -11
- package/src/ui/screens/FollowingListScreen.d.ts +0 -8
- package/src/ui/screens/FollowingListScreen.js +0 -11
- package/src/ui/screens/HelpSupportScreen.d.ts +0 -4
- package/src/ui/screens/HelpSupportScreen.js +0 -140
- package/src/ui/screens/HistoryViewScreen.d.ts +0 -4
- package/src/ui/screens/HistoryViewScreen.js +0 -225
- package/src/ui/screens/LanguageSelectorScreen.d.ts +0 -6
- package/src/ui/screens/LanguageSelectorScreen.js +0 -178
- package/src/ui/screens/LearnMoreUsernamesScreen.d.ts +0 -4
- package/src/ui/screens/LearnMoreUsernamesScreen.js +0 -150
- package/src/ui/screens/LegalDocumentsScreen.d.ts +0 -4
- package/src/ui/screens/LegalDocumentsScreen.js +0 -185
- package/src/ui/screens/OxyAuthScreen.d.ts +0 -16
- package/src/ui/screens/OxyAuthScreen.js +0 -431
- package/src/ui/screens/PaymentGatewayScreen.d.ts +0 -14
- package/src/ui/screens/PaymentGatewayScreen.js +0 -171
- package/src/ui/screens/PremiumSubscriptionScreen.d.ts +0 -4
- package/src/ui/screens/PremiumSubscriptionScreen.js +0 -1080
- package/src/ui/screens/PrivacySettingsScreen.d.ts +0 -4
- package/src/ui/screens/PrivacySettingsScreen.js +0 -252
- package/src/ui/screens/ProfileScreen.d.ts +0 -8
- package/src/ui/screens/ProfileScreen.js +0 -254
- package/src/ui/screens/SavesCollectionsScreen.d.ts +0 -4
- package/src/ui/screens/SavesCollectionsScreen.js +0 -150
- package/src/ui/screens/SearchSettingsScreen.d.ts +0 -4
- package/src/ui/screens/SearchSettingsScreen.js +0 -109
- package/src/ui/screens/SessionManagementScreen.d.ts +0 -4
- package/src/ui/screens/SessionManagementScreen.js +0 -320
- package/src/ui/screens/UserLinksScreen.d.ts +0 -14
- package/src/ui/screens/UserLinksScreen.js +0 -57
- package/src/ui/screens/UserListScreen.d.ts +0 -10
- package/src/ui/screens/UserListScreen.js +0 -249
- package/src/ui/screens/WelcomeNewUserScreen.d.ts +0 -12
- package/src/ui/screens/WelcomeNewUserScreen.js +0 -304
- package/src/ui/screens/karma/KarmaAboutScreen.d.ts +0 -4
- package/src/ui/screens/karma/KarmaAboutScreen.js +0 -39
- package/src/ui/screens/karma/KarmaCenterScreen.d.ts +0 -4
- package/src/ui/screens/karma/KarmaCenterScreen.js +0 -159
- package/src/ui/screens/karma/KarmaFAQScreen.d.ts +0 -4
- package/src/ui/screens/karma/KarmaFAQScreen.js +0 -143
- package/src/ui/screens/karma/KarmaLeaderboardScreen.d.ts +0 -4
- package/src/ui/screens/karma/KarmaLeaderboardScreen.js +0 -56
- package/src/ui/screens/karma/KarmaRewardsScreen.d.ts +0 -4
- package/src/ui/screens/karma/KarmaRewardsScreen.js +0 -460
- package/src/ui/screens/karma/KarmaRulesScreen.d.ts +0 -4
- package/src/ui/screens/karma/KarmaRulesScreen.js +0 -47
- package/src/ui/server.d.ts +0 -40
- package/src/ui/server.js +0 -57
- package/src/ui/stores/accountStore.d.ts +0 -26
- package/src/ui/stores/accountStore.js +0 -196
- package/src/ui/stores/assetStore.d.ts +0 -53
- package/src/ui/stores/assetStore.js +0 -192
- package/src/ui/stores/authStore.d.ts +0 -16
- package/src/ui/stores/authStore.js +0 -47
- package/src/ui/stores/fileStore.d.ts +0 -30
- package/src/ui/stores/fileStore.js +0 -113
- package/src/ui/stores/followStore.d.ts +0 -24
- package/src/ui/stores/followStore.js +0 -154
- package/src/ui/styles/authStyles.d.ts +0 -331
- package/src/ui/styles/authStyles.js +0 -332
- package/src/ui/styles/fonts.d.ts +0 -20
- package/src/ui/styles/fonts.js +0 -72
- package/src/ui/styles/index.d.ts +0 -4
- package/src/ui/styles/index.js +0 -20
- package/src/ui/styles/spacing.d.ts +0 -48
- package/src/ui/styles/spacing.js +0 -63
- package/src/ui/styles/theme.d.ts +0 -67
- package/src/ui/styles/theme.js +0 -114
- package/src/ui/types/fileManagement.d.ts +0 -40
- package/src/ui/types/fileManagement.js +0 -2
- package/src/ui/types/navigation.d.ts +0 -36
- package/src/ui/types/navigation.js +0 -2
- package/src/ui/utils/avatarUtils.d.ts +0 -22
- package/src/ui/utils/avatarUtils.js +0 -52
- package/src/ui/utils/colorUtils.d.ts +0 -9
- package/src/ui/utils/colorUtils.js +0 -19
- package/src/ui/utils/confirmAction.d.ts +0 -6
- package/src/ui/utils/confirmAction.js +0 -22
- package/src/ui/utils/errorHandlers.d.ts +0 -34
- package/src/ui/utils/errorHandlers.js +0 -128
- package/src/ui/utils/fileManagement.d.ts +0 -86
- package/src/ui/utils/fileManagement.js +0 -238
- package/src/ui/utils/iconNames.d.ts +0 -111
- package/src/ui/utils/iconNames.js +0 -124
- package/src/ui/utils/sessionHelpers.d.ts +0 -64
- package/src/ui/utils/sessionHelpers.js +0 -90
- package/src/ui/utils/storageHelpers.d.ts +0 -27
- package/src/ui/utils/storageHelpers.js +0 -114
- package/src/ui/utils/themeUtils.d.ts +0 -10
- package/src/ui/utils/themeUtils.js +0 -17
- package/src/ui/utils/userUtils.d.ts +0 -28
- package/src/ui/utils/userUtils.js +0 -54
- package/src/utils/hookUtils.d.ts +0 -101
- package/src/utils/hookUtils.js +0 -373
|
@@ -1,1473 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
40
|
-
const react_1 = __importStar(require("react"));
|
|
41
|
-
const react_native_1 = require("react-native");
|
|
42
|
-
const expo_image_1 = require("expo-image");
|
|
43
|
-
// Lazy load expo-document-picker (optional dependency)
|
|
44
|
-
// This allows the screen to work even if expo-document-picker is not installed
|
|
45
|
-
let DocumentPicker = null;
|
|
46
|
-
const loadDocumentPicker = async () => {
|
|
47
|
-
if (DocumentPicker)
|
|
48
|
-
return DocumentPicker;
|
|
49
|
-
try {
|
|
50
|
-
DocumentPicker = await import('expo-document-picker');
|
|
51
|
-
return DocumentPicker;
|
|
52
|
-
}
|
|
53
|
-
catch (error) {
|
|
54
|
-
throw new Error('expo-document-picker is not installed. Please install it: npx expo install expo-document-picker');
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
const sonner_1 = require("../../lib/sonner");
|
|
58
|
-
const vector_icons_1 = require("@expo/vector-icons");
|
|
59
|
-
// @ts-ignore - MaterialCommunityIcons is available at runtime
|
|
60
|
-
const vector_icons_2 = require("@expo/vector-icons");
|
|
61
|
-
const fileStore_1 = require("../stores/fileStore");
|
|
62
|
-
const Header_1 = __importDefault(require("../components/Header"));
|
|
63
|
-
const JustifiedPhotoGrid_1 = __importDefault(require("../components/photogrid/JustifiedPhotoGrid"));
|
|
64
|
-
const components_1 = require("../components");
|
|
65
|
-
const useThemeStyles_1 = require("../hooks/useThemeStyles");
|
|
66
|
-
const useColorScheme_1 = require("../hooks/useColorScheme");
|
|
67
|
-
const themeUtils_1 = require("../utils/themeUtils");
|
|
68
|
-
const OxyContext_1 = require("../context/OxyContext");
|
|
69
|
-
const useI18n_1 = require("../hooks/useI18n");
|
|
70
|
-
const useAccountMutations_1 = require("../hooks/mutations/useAccountMutations");
|
|
71
|
-
const fileManagement_1 = require("../utils/fileManagement");
|
|
72
|
-
const FileViewer_1 = require("../components/fileManagement/FileViewer");
|
|
73
|
-
const FileDetailsModal_1 = require("../components/fileManagement/FileDetailsModal");
|
|
74
|
-
const UploadPreview_1 = require("../components/fileManagement/UploadPreview");
|
|
75
|
-
const styles_1 = require("../components/fileManagement/styles");
|
|
76
|
-
/** Extract error message from unknown error type */
|
|
77
|
-
const getErrorMessage = (error) => error instanceof Error ? getErrorMessage(error) : typeof error === 'string' ? error : undefined;
|
|
78
|
-
// Animated button component for smooth transitions
|
|
79
|
-
const AnimatedButton = ({ isSelected, onPress, icon, primaryColor, textColor, style }) => {
|
|
80
|
-
const animatedValue = (0, react_1.useRef)(new react_native_1.Animated.Value(isSelected ? 1 : 0)).current;
|
|
81
|
-
(0, react_1.useEffect)(() => {
|
|
82
|
-
react_native_1.Animated.timing(animatedValue, {
|
|
83
|
-
toValue: isSelected ? 1 : 0,
|
|
84
|
-
duration: 200,
|
|
85
|
-
easing: react_native_1.Easing.out(react_native_1.Easing.ease),
|
|
86
|
-
useNativeDriver: false,
|
|
87
|
-
}).start();
|
|
88
|
-
}, [isSelected, animatedValue]);
|
|
89
|
-
const backgroundColor = animatedValue.interpolate({
|
|
90
|
-
inputRange: [0, 1],
|
|
91
|
-
outputRange: ['transparent', primaryColor],
|
|
92
|
-
});
|
|
93
|
-
const iconColor = animatedValue.interpolate({
|
|
94
|
-
inputRange: [0, 1],
|
|
95
|
-
outputRange: [textColor, '#FFFFFF'],
|
|
96
|
-
});
|
|
97
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { onPress: onPress, activeOpacity: 0.7, children: (0, jsx_runtime_1.jsx)(react_native_1.Animated.View, { style: [
|
|
98
|
-
style,
|
|
99
|
-
{
|
|
100
|
-
backgroundColor,
|
|
101
|
-
},
|
|
102
|
-
], children: (0, jsx_runtime_1.jsx)(react_native_1.Animated.View, { children: (0, jsx_runtime_1.jsx)(vector_icons_2.MaterialCommunityIcons, { name: icon, size: 16, color: isSelected ? '#FFFFFF' : textColor }) }) }) }));
|
|
103
|
-
};
|
|
104
|
-
const FileManagementScreen = ({ onClose, theme, goBack, navigate, userId, containerWidth = 400, // Fallback for when not provided by the router
|
|
105
|
-
selectMode = false, multiSelect = false, onSelect, onConfirmSelection, initialSelectedIds = [], maxSelection, disabledMimeTypes = [], afterSelect = 'close', allowUploadInSelectMode = true, defaultVisibility = 'private', linkContext, }) => {
|
|
106
|
-
// Use useOxy() hook for OxyContext values
|
|
107
|
-
const { user, oxyServices } = (0, OxyContext_1.useOxy)();
|
|
108
|
-
const { t } = (0, useI18n_1.useI18n)();
|
|
109
|
-
const uploadFileMutation = (0, useAccountMutations_1.useUploadFile)();
|
|
110
|
-
const files = (0, fileStore_1.useFiles)();
|
|
111
|
-
// Ensure containerWidth is a number (TypeScript guard)
|
|
112
|
-
const safeContainerWidth = typeof containerWidth === 'number' ? containerWidth : 400;
|
|
113
|
-
const uploading = (0, fileStore_1.useUploading)();
|
|
114
|
-
const uploadProgress = (0, fileStore_1.useUploadAggregateProgress)();
|
|
115
|
-
const deleting = (0, fileStore_1.useDeleting)();
|
|
116
|
-
const [loading, setLoading] = (0, react_1.useState)(true);
|
|
117
|
-
const [refreshing, setRefreshing] = (0, react_1.useState)(false);
|
|
118
|
-
const [paging, setPaging] = (0, react_1.useState)({ offset: 0, limit: 40, total: 0, hasMore: true, loadingMore: false });
|
|
119
|
-
const [selectedFile, setSelectedFile] = (0, react_1.useState)(null);
|
|
120
|
-
const [showFileDetails, setShowFileDetails] = (0, react_1.useState)(false);
|
|
121
|
-
// In selectMode we never open the detailed viewer
|
|
122
|
-
const [openedFile, setOpenedFile] = (0, react_1.useState)(null);
|
|
123
|
-
const [fileContent, setFileContent] = (0, react_1.useState)(null);
|
|
124
|
-
const [loadingFileContent, setLoadingFileContent] = (0, react_1.useState)(false);
|
|
125
|
-
const [showFileDetailsInViewer, setShowFileDetailsInViewer] = (0, react_1.useState)(false);
|
|
126
|
-
const [isPickingDocument, setIsPickingDocument] = (0, react_1.useState)(false);
|
|
127
|
-
const [viewMode, setViewMode] = (0, react_1.useState)('all');
|
|
128
|
-
const [searchQuery, setSearchQuery] = (0, react_1.useState)('');
|
|
129
|
-
const [sortBy, setSortBy] = (0, react_1.useState)('date');
|
|
130
|
-
const [sortOrder, setSortOrder] = (0, react_1.useState)('desc');
|
|
131
|
-
const [pendingFiles, setPendingFiles] = (0, react_1.useState)([]);
|
|
132
|
-
const [showUploadPreview, setShowUploadPreview] = (0, react_1.useState)(false);
|
|
133
|
-
// Derived filtered and sorted files (avoid setState loops)
|
|
134
|
-
const filteredFiles = (0, react_1.useMemo)(() => {
|
|
135
|
-
let filteredByMode = files;
|
|
136
|
-
if (viewMode === 'photos') {
|
|
137
|
-
filteredByMode = files.filter(file => file.contentType.startsWith('image/'));
|
|
138
|
-
}
|
|
139
|
-
else if (viewMode === 'videos') {
|
|
140
|
-
filteredByMode = files.filter(file => file.contentType.startsWith('video/'));
|
|
141
|
-
}
|
|
142
|
-
else if (viewMode === 'documents') {
|
|
143
|
-
filteredByMode = files.filter(file => file.contentType.includes('pdf') ||
|
|
144
|
-
file.contentType.includes('document') ||
|
|
145
|
-
file.contentType.includes('text') ||
|
|
146
|
-
file.contentType.includes('msword') ||
|
|
147
|
-
file.contentType.includes('excel') ||
|
|
148
|
-
file.contentType.includes('spreadsheet') ||
|
|
149
|
-
file.contentType.includes('presentation') ||
|
|
150
|
-
file.contentType.includes('powerpoint'));
|
|
151
|
-
}
|
|
152
|
-
else if (viewMode === 'audio') {
|
|
153
|
-
filteredByMode = files.filter(file => file.contentType.startsWith('audio/'));
|
|
154
|
-
}
|
|
155
|
-
let filtered = filteredByMode;
|
|
156
|
-
if (searchQuery.trim()) {
|
|
157
|
-
const query = searchQuery.toLowerCase();
|
|
158
|
-
filtered = filteredByMode.filter(file => file.filename.toLowerCase().includes(query) ||
|
|
159
|
-
file.contentType.toLowerCase().includes(query) ||
|
|
160
|
-
(file.metadata?.description?.toLowerCase().includes(query)));
|
|
161
|
-
}
|
|
162
|
-
// Sort files
|
|
163
|
-
const sorted = [...filtered].sort((a, b) => {
|
|
164
|
-
let comparison = 0;
|
|
165
|
-
if (sortBy === 'date') {
|
|
166
|
-
const dateA = new Date(a.uploadDate || 0).getTime();
|
|
167
|
-
const dateB = new Date(b.uploadDate || 0).getTime();
|
|
168
|
-
comparison = dateA - dateB;
|
|
169
|
-
}
|
|
170
|
-
else if (sortBy === 'size') {
|
|
171
|
-
comparison = (a.length || 0) - (b.length || 0);
|
|
172
|
-
}
|
|
173
|
-
else if (sortBy === 'name') {
|
|
174
|
-
comparison = (a.filename || '').localeCompare(b.filename || '');
|
|
175
|
-
}
|
|
176
|
-
else if (sortBy === 'type') {
|
|
177
|
-
comparison = (a.contentType || '').localeCompare(b.contentType || '');
|
|
178
|
-
}
|
|
179
|
-
return sortOrder === 'asc' ? comparison : -comparison;
|
|
180
|
-
});
|
|
181
|
-
return sorted;
|
|
182
|
-
}, [files, searchQuery, viewMode, sortBy, sortOrder]);
|
|
183
|
-
const [photoDimensions, setPhotoDimensions] = (0, react_1.useState)({});
|
|
184
|
-
const [loadingDimensions, setLoadingDimensions] = (0, react_1.useState)(false);
|
|
185
|
-
const uploadStartRef = (0, react_1.useRef)(null);
|
|
186
|
-
const MIN_BANNER_MS = 600;
|
|
187
|
-
// Selection state
|
|
188
|
-
const [selectedIds, setSelectedIds] = (0, react_1.useState)(new Set(initialSelectedIds));
|
|
189
|
-
const [lastSelectedFileId, setLastSelectedFileId] = (0, react_1.useState)(null);
|
|
190
|
-
const scrollViewRef = (0, react_1.useRef)(null);
|
|
191
|
-
const photoScrollViewRef = (0, react_1.useRef)(null);
|
|
192
|
-
const itemRefs = (0, react_1.useRef)(new Map()); // Track item positions
|
|
193
|
-
const containerRef = (0, react_1.useRef)(null);
|
|
194
|
-
(0, react_1.useEffect)(() => {
|
|
195
|
-
if (initialSelectedIds?.length) {
|
|
196
|
-
setSelectedIds(new Set(initialSelectedIds));
|
|
197
|
-
}
|
|
198
|
-
}, [initialSelectedIds]);
|
|
199
|
-
const toggleSelect = (0, react_1.useCallback)(async (file) => {
|
|
200
|
-
// Allow selection in regular mode for bulk operations
|
|
201
|
-
// if (!selectMode) return;
|
|
202
|
-
if (disabledMimeTypes.length) {
|
|
203
|
-
const blocked = disabledMimeTypes.some(mt => file.contentType === mt || file.contentType.startsWith(mt.endsWith('/') ? mt : `${mt}/`));
|
|
204
|
-
if (blocked) {
|
|
205
|
-
sonner_1.toast.error(t('fileManagement.toasts.fileTypeBlocked'));
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
// Update file visibility if it differs from defaultVisibility
|
|
210
|
-
const fileVisibility = file.metadata?.visibility || 'private';
|
|
211
|
-
if (fileVisibility !== defaultVisibility) {
|
|
212
|
-
try {
|
|
213
|
-
await oxyServices.assetUpdateVisibility(file.id, defaultVisibility);
|
|
214
|
-
}
|
|
215
|
-
catch (error) {
|
|
216
|
-
// Continue anyway - selection shouldn't fail if visibility update fails
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
// Track the selected file for scrolling
|
|
220
|
-
setLastSelectedFileId(file.id);
|
|
221
|
-
// Link file to entity if linkContext is provided
|
|
222
|
-
if (linkContext) {
|
|
223
|
-
try {
|
|
224
|
-
await oxyServices.assetLink(file.id, linkContext.app, linkContext.entityType, linkContext.entityId, defaultVisibility, linkContext.webhookUrl);
|
|
225
|
-
}
|
|
226
|
-
catch (error) {
|
|
227
|
-
// Continue anyway - selection shouldn't fail if linking fails
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
if (!multiSelect) {
|
|
231
|
-
onSelect?.(file);
|
|
232
|
-
if (afterSelect === 'back') {
|
|
233
|
-
goBack?.();
|
|
234
|
-
}
|
|
235
|
-
else if (afterSelect === 'close') {
|
|
236
|
-
onClose?.();
|
|
237
|
-
}
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
setSelectedIds(prev => {
|
|
241
|
-
const next = new Set(prev);
|
|
242
|
-
const already = next.has(file.id);
|
|
243
|
-
if (!already) {
|
|
244
|
-
if (maxSelection && next.size >= maxSelection) {
|
|
245
|
-
sonner_1.toast.error(t('fileManagement.toasts.maxSelection', { max: maxSelection }));
|
|
246
|
-
return prev;
|
|
247
|
-
}
|
|
248
|
-
next.add(file.id);
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
251
|
-
next.delete(file.id);
|
|
252
|
-
}
|
|
253
|
-
return next;
|
|
254
|
-
});
|
|
255
|
-
}, [selectMode, multiSelect, onSelect, onClose, goBack, disabledMimeTypes, maxSelection, afterSelect, defaultVisibility, oxyServices, linkContext]);
|
|
256
|
-
const confirmMultiSelection = (0, react_1.useCallback)(async () => {
|
|
257
|
-
if (!selectMode || !multiSelect)
|
|
258
|
-
return;
|
|
259
|
-
const map = {};
|
|
260
|
-
files.forEach(f => { map[f.id] = f; });
|
|
261
|
-
const chosen = Array.from(selectedIds).map(id => map[id]).filter(Boolean);
|
|
262
|
-
// Update visibility and link files if needed
|
|
263
|
-
const updatePromises = chosen.map(async (file) => {
|
|
264
|
-
// Update visibility if needed
|
|
265
|
-
const fileVisibility = file.metadata?.visibility || 'private';
|
|
266
|
-
if (fileVisibility !== defaultVisibility) {
|
|
267
|
-
try {
|
|
268
|
-
await oxyServices.assetUpdateVisibility(file.id, defaultVisibility);
|
|
269
|
-
}
|
|
270
|
-
catch (error) {
|
|
271
|
-
// Visibility update failed, continue with selection
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
// Link file to entity if linkContext provided
|
|
275
|
-
if (linkContext) {
|
|
276
|
-
try {
|
|
277
|
-
await oxyServices.assetLink(file.id, linkContext.app, linkContext.entityType, linkContext.entityId, defaultVisibility, linkContext.webhookUrl);
|
|
278
|
-
}
|
|
279
|
-
catch (error) {
|
|
280
|
-
// File linking failed, continue with selection
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
// Wait for all updates (but don't block on failures)
|
|
285
|
-
await Promise.allSettled(updatePromises);
|
|
286
|
-
onConfirmSelection?.(chosen);
|
|
287
|
-
onClose?.();
|
|
288
|
-
}, [selectMode, multiSelect, selectedIds, files, onConfirmSelection, onClose, defaultVisibility, oxyServices, linkContext]);
|
|
289
|
-
const endUpload = (0, react_1.useCallback)(() => {
|
|
290
|
-
const started = uploadStartRef.current;
|
|
291
|
-
const elapsed = started ? Date.now() - started : MIN_BANNER_MS;
|
|
292
|
-
const remaining = elapsed < MIN_BANNER_MS ? MIN_BANNER_MS - elapsed : 0;
|
|
293
|
-
setTimeout(() => {
|
|
294
|
-
fileStore_1.useFileStore.getState().setUploading(false);
|
|
295
|
-
uploadStartRef.current = null;
|
|
296
|
-
}, remaining);
|
|
297
|
-
}, []);
|
|
298
|
-
// Helper to safely request a thumbnail variant only for image mime types.
|
|
299
|
-
const getSafeDownloadUrlCallback = (0, react_1.useCallback)((file, variant = 'thumb') => {
|
|
300
|
-
return (0, fileManagement_1.getSafeDownloadUrl)(file, variant, (fileId, variant) => oxyServices.getFileDownloadUrl(fileId, variant));
|
|
301
|
-
}, [oxyServices]);
|
|
302
|
-
// Use centralized theme styles hook for consistency
|
|
303
|
-
const colorScheme = (0, useColorScheme_1.useColorScheme)();
|
|
304
|
-
const normalizedTheme = (0, themeUtils_1.normalizeTheme)(theme);
|
|
305
|
-
const baseThemeStyles = (0, useThemeStyles_1.useThemeStyles)(normalizedTheme, colorScheme);
|
|
306
|
-
// FileManagementScreen uses a slightly different light background
|
|
307
|
-
const themeStyles = (0, react_1.useMemo)(() => ({
|
|
308
|
-
...baseThemeStyles,
|
|
309
|
-
backgroundColor: baseThemeStyles.isDarkTheme ? baseThemeStyles.backgroundColor : '#f2f2f2',
|
|
310
|
-
}), [baseThemeStyles]);
|
|
311
|
-
// Extract commonly used theme variables
|
|
312
|
-
const backgroundColor = themeStyles.backgroundColor;
|
|
313
|
-
const borderColor = themeStyles.borderColor;
|
|
314
|
-
const targetUserId = userId || user?.id;
|
|
315
|
-
const storeSetUploading = (0, fileStore_1.useFileStore)(s => s.setUploading);
|
|
316
|
-
const storeSetUploadProgress = (0, fileStore_1.useFileStore)(s => s.setUploadProgress);
|
|
317
|
-
const storeSetDeleting = (0, fileStore_1.useFileStore)(s => s.setDeleting);
|
|
318
|
-
const loadFiles = (0, react_1.useCallback)(async (mode = 'initial') => {
|
|
319
|
-
if (!targetUserId)
|
|
320
|
-
return;
|
|
321
|
-
try {
|
|
322
|
-
if (mode === 'refresh') {
|
|
323
|
-
setRefreshing(true);
|
|
324
|
-
}
|
|
325
|
-
else if (mode === 'initial') {
|
|
326
|
-
setLoading(true);
|
|
327
|
-
setPaging(p => ({ ...p, offset: 0, hasMore: true }));
|
|
328
|
-
}
|
|
329
|
-
else if (mode === 'more') {
|
|
330
|
-
// Prevent duplicate fetches
|
|
331
|
-
setPaging(p => ({ ...p, loadingMore: true }));
|
|
332
|
-
}
|
|
333
|
-
const currentPaging = mode === 'more' ? (prevPagingRef.current ?? paging) : paging;
|
|
334
|
-
const effectiveOffset = mode === 'more' ? currentPaging.offset + currentPaging.limit : 0;
|
|
335
|
-
const response = await oxyServices.listUserFiles(currentPaging.limit, effectiveOffset);
|
|
336
|
-
const assets = (response.files || []).map((f) => ({
|
|
337
|
-
id: f.id,
|
|
338
|
-
filename: f.originalName || f.sha256,
|
|
339
|
-
contentType: f.mime,
|
|
340
|
-
length: f.size,
|
|
341
|
-
chunkSize: 0,
|
|
342
|
-
uploadDate: f.createdAt,
|
|
343
|
-
metadata: f.metadata || {},
|
|
344
|
-
variants: f.variants || [],
|
|
345
|
-
}));
|
|
346
|
-
if (mode === 'more') {
|
|
347
|
-
// append
|
|
348
|
-
fileStore_1.useFileStore.getState().setFiles(assets, { merge: true });
|
|
349
|
-
setPaging(p => ({
|
|
350
|
-
...p,
|
|
351
|
-
offset: effectiveOffset,
|
|
352
|
-
total: response.total || (effectiveOffset + assets.length),
|
|
353
|
-
hasMore: response.hasMore,
|
|
354
|
-
loadingMore: false,
|
|
355
|
-
}));
|
|
356
|
-
}
|
|
357
|
-
else {
|
|
358
|
-
fileStore_1.useFileStore.getState().setFiles(assets, { merge: false });
|
|
359
|
-
setPaging(p => ({
|
|
360
|
-
...p,
|
|
361
|
-
offset: 0,
|
|
362
|
-
total: response.total || assets.length,
|
|
363
|
-
hasMore: response.hasMore,
|
|
364
|
-
loadingMore: false,
|
|
365
|
-
}));
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
catch (error) {
|
|
369
|
-
sonner_1.toast.error(getErrorMessage(error) || t('fileManagement.toasts.loadFailed'));
|
|
370
|
-
}
|
|
371
|
-
finally {
|
|
372
|
-
setLoading(false);
|
|
373
|
-
setRefreshing(false);
|
|
374
|
-
setPaging(p => ({ ...p, loadingMore: false }));
|
|
375
|
-
}
|
|
376
|
-
}, [targetUserId, oxyServices, paging]);
|
|
377
|
-
// Keep a ref to avoid stale closure when calculating next offset
|
|
378
|
-
const prevPagingRef = (0, react_1.useRef)(paging);
|
|
379
|
-
(0, react_1.useEffect)(() => { prevPagingRef.current = paging; }, [paging]);
|
|
380
|
-
// (removed effect; filteredFiles is memoized)
|
|
381
|
-
// Load photo dimensions for justified grid - unified approach using Image.getSize
|
|
382
|
-
const loadPhotoDimensions = (0, react_1.useCallback)(async (photos) => {
|
|
383
|
-
if (photos.length === 0)
|
|
384
|
-
return;
|
|
385
|
-
setLoadingDimensions(true);
|
|
386
|
-
const newDimensions = { ...photoDimensions };
|
|
387
|
-
let hasNewDimensions = false;
|
|
388
|
-
// Only load dimensions for photos we don't have yet
|
|
389
|
-
const photosToLoad = photos.filter(photo => !newDimensions[photo.id]);
|
|
390
|
-
if (photosToLoad.length === 0) {
|
|
391
|
-
setLoadingDimensions(false);
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
try {
|
|
395
|
-
await Promise.all(photosToLoad.map(async (photo) => {
|
|
396
|
-
try {
|
|
397
|
-
const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
|
|
398
|
-
// Unified approach using Image.getSize (works on all platforms)
|
|
399
|
-
await new Promise((resolve) => {
|
|
400
|
-
react_native_1.Image.getSize(downloadUrl, (width, height) => {
|
|
401
|
-
newDimensions[photo.id] = { width, height };
|
|
402
|
-
hasNewDimensions = true;
|
|
403
|
-
resolve();
|
|
404
|
-
}, () => {
|
|
405
|
-
// Fallback dimensions
|
|
406
|
-
newDimensions[photo.id] = { width: 1, height: 1 };
|
|
407
|
-
hasNewDimensions = true;
|
|
408
|
-
resolve();
|
|
409
|
-
});
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
catch (error) {
|
|
413
|
-
// Fallback dimensions for any errors
|
|
414
|
-
newDimensions[photo.id] = { width: 1, height: 1 };
|
|
415
|
-
hasNewDimensions = true;
|
|
416
|
-
}
|
|
417
|
-
}));
|
|
418
|
-
if (hasNewDimensions) {
|
|
419
|
-
setPhotoDimensions(newDimensions);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
catch (error) {
|
|
423
|
-
// Photo dimensions loading failed, continue without dimensions
|
|
424
|
-
}
|
|
425
|
-
finally {
|
|
426
|
-
setLoadingDimensions(false);
|
|
427
|
-
}
|
|
428
|
-
}, [getSafeDownloadUrlCallback, photoDimensions]);
|
|
429
|
-
// Create justified rows from photos with responsive algorithm
|
|
430
|
-
const createJustifiedRows = (0, react_1.useCallback)((photos, containerWidth) => {
|
|
431
|
-
if (photos.length === 0)
|
|
432
|
-
return [];
|
|
433
|
-
const rows = [];
|
|
434
|
-
const photosPerRow = 3; // Fixed 3 photos per row for consistency
|
|
435
|
-
for (let i = 0; i < photos.length; i += photosPerRow) {
|
|
436
|
-
const rowPhotos = photos.slice(i, i + photosPerRow);
|
|
437
|
-
rows.push(rowPhotos);
|
|
438
|
-
}
|
|
439
|
-
return rows;
|
|
440
|
-
}, []);
|
|
441
|
-
const processFileUploads = async (selectedFiles) => {
|
|
442
|
-
if (selectedFiles.length === 0)
|
|
443
|
-
return [];
|
|
444
|
-
if (!targetUserId)
|
|
445
|
-
return []; // Guard clause to ensure userId is defined
|
|
446
|
-
const uploadedFiles = [];
|
|
447
|
-
try {
|
|
448
|
-
storeSetUploadProgress({ current: 0, total: selectedFiles.length });
|
|
449
|
-
const maxSize = 50 * 1024 * 1024; // 50MB
|
|
450
|
-
const oversizedFiles = selectedFiles.filter(file => file.size > maxSize);
|
|
451
|
-
if (oversizedFiles.length > 0) {
|
|
452
|
-
const fileList = oversizedFiles.map(f => f.name).join(', ');
|
|
453
|
-
sonner_1.toast.error(t('fileManagement.toasts.filesTooLarge', { files: fileList }));
|
|
454
|
-
return [];
|
|
455
|
-
}
|
|
456
|
-
let successCount = 0;
|
|
457
|
-
let failureCount = 0;
|
|
458
|
-
const errors = [];
|
|
459
|
-
for (let i = 0; i < selectedFiles.length; i++) {
|
|
460
|
-
storeSetUploadProgress({ current: i + 1, total: selectedFiles.length });
|
|
461
|
-
const raw = selectedFiles[i];
|
|
462
|
-
const fileName = raw.name || `file-${i + 1}`;
|
|
463
|
-
const optimisticId = `temp-${Date.now()}-${i}-${Math.random().toString(36).substr(2, 9)}`; // Unique ID per file
|
|
464
|
-
try {
|
|
465
|
-
// Validate file before upload
|
|
466
|
-
if (!raw || !raw.name || raw.size === undefined || raw.size <= 0) {
|
|
467
|
-
const errorMsg = `Invalid file: ${fileName}`;
|
|
468
|
-
if (__DEV__) {
|
|
469
|
-
console.error('Upload validation failed:', { file: raw, error: errorMsg });
|
|
470
|
-
}
|
|
471
|
-
failureCount++;
|
|
472
|
-
errors.push(`${fileName}: Invalid file (missing name or size)`);
|
|
473
|
-
continue;
|
|
474
|
-
}
|
|
475
|
-
const optimisticFile = {
|
|
476
|
-
id: optimisticId,
|
|
477
|
-
filename: raw.name,
|
|
478
|
-
contentType: raw.type || 'application/octet-stream',
|
|
479
|
-
length: raw.size,
|
|
480
|
-
chunkSize: 0,
|
|
481
|
-
uploadDate: new Date().toISOString(),
|
|
482
|
-
metadata: { uploading: true },
|
|
483
|
-
variants: [],
|
|
484
|
-
};
|
|
485
|
-
fileStore_1.useFileStore.getState().addFile(optimisticFile, { prepend: true });
|
|
486
|
-
// Use the mutation hook with authentication handling
|
|
487
|
-
const result = await uploadFileMutation.mutateAsync({
|
|
488
|
-
file: raw,
|
|
489
|
-
visibility: defaultVisibility,
|
|
490
|
-
});
|
|
491
|
-
// Attempt to refresh file list incrementally – fetch single file metadata if API allows
|
|
492
|
-
const f = result?.file ?? result?.files?.[0];
|
|
493
|
-
if (f) {
|
|
494
|
-
const merged = {
|
|
495
|
-
id: f.id,
|
|
496
|
-
filename: f.originalName || f.sha256 || raw.name,
|
|
497
|
-
contentType: f.mime || raw.type || 'application/octet-stream',
|
|
498
|
-
length: f.size || raw.size,
|
|
499
|
-
chunkSize: 0,
|
|
500
|
-
uploadDate: f.createdAt || new Date().toISOString(),
|
|
501
|
-
metadata: f.metadata || {},
|
|
502
|
-
variants: f.variants || [],
|
|
503
|
-
};
|
|
504
|
-
// Remove optimistic then add real
|
|
505
|
-
fileStore_1.useFileStore.getState().removeFile(optimisticId);
|
|
506
|
-
fileStore_1.useFileStore.getState().addFile(merged, { prepend: true });
|
|
507
|
-
uploadedFiles.push(merged);
|
|
508
|
-
successCount++;
|
|
509
|
-
}
|
|
510
|
-
else {
|
|
511
|
-
// Fallback: will reconcile on later list refresh
|
|
512
|
-
fileStore_1.useFileStore.getState().updateFile(optimisticId, { metadata: { uploading: false } });
|
|
513
|
-
if (__DEV__) {
|
|
514
|
-
console.warn('Upload completed but no file data returned:', { fileName, result });
|
|
515
|
-
}
|
|
516
|
-
// Still count as success if upload didn't throw
|
|
517
|
-
successCount++;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
catch (error) {
|
|
521
|
-
failureCount++;
|
|
522
|
-
const errorMessage = getErrorMessage(error) || String(error) || 'Upload failed';
|
|
523
|
-
const fullError = `${fileName}: ${errorMessage}`;
|
|
524
|
-
errors.push(fullError);
|
|
525
|
-
if (__DEV__) {
|
|
526
|
-
console.error('File upload failed:', {
|
|
527
|
-
fileName,
|
|
528
|
-
fileSize: raw.size,
|
|
529
|
-
fileType: raw.type,
|
|
530
|
-
error: errorMessage,
|
|
531
|
-
stack: (error instanceof Error) ? error.stack : undefined
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
// Remove optimistic file on error (use the same optimisticId from above)
|
|
535
|
-
fileStore_1.useFileStore.getState().removeFile(optimisticId);
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
// Show success/error messages
|
|
539
|
-
if (successCount > 0) {
|
|
540
|
-
sonner_1.toast.success(t('fileManagement.toasts.uploadSuccess', { count: successCount }));
|
|
541
|
-
}
|
|
542
|
-
if (failureCount > 0) {
|
|
543
|
-
// Show detailed error message with first few errors
|
|
544
|
-
const errorDetails = errors.length > 0
|
|
545
|
-
? `\n${errors.slice(0, 3).join('\n')}${errors.length > 3 ? `\n...and ${errors.length - 3} more` : ''}`
|
|
546
|
-
: '';
|
|
547
|
-
sonner_1.toast.error(`${t('fileManagement.toasts.uploadFailed', { count: failureCount })}${errorDetails}`);
|
|
548
|
-
}
|
|
549
|
-
// Silent background refresh to ensure metadata/variants updated
|
|
550
|
-
setTimeout(() => { loadFiles('silent'); }, 1200);
|
|
551
|
-
}
|
|
552
|
-
catch (error) {
|
|
553
|
-
sonner_1.toast.error(getErrorMessage(error) || t('fileManagement.toasts.uploadError'));
|
|
554
|
-
}
|
|
555
|
-
finally {
|
|
556
|
-
storeSetUploadProgress(null);
|
|
557
|
-
}
|
|
558
|
-
return uploadedFiles;
|
|
559
|
-
};
|
|
560
|
-
// biome-ignore lint/suspicious/noExplicitAny: Files from document picker may have extra properties like uri
|
|
561
|
-
const handleFileSelection = (0, react_1.useCallback)(async (selectedFiles) => {
|
|
562
|
-
const MAX_FILE_SIZE = 100 * 1024 * 1024; // 100MB
|
|
563
|
-
const processedFiles = [];
|
|
564
|
-
for (const file of selectedFiles) {
|
|
565
|
-
// Validate file has required properties
|
|
566
|
-
if (!file) {
|
|
567
|
-
if (__DEV__) {
|
|
568
|
-
console.error('Invalid file: file is null or undefined');
|
|
569
|
-
}
|
|
570
|
-
sonner_1.toast.error(t('fileManagement.toasts.invalidFileMissing'));
|
|
571
|
-
continue;
|
|
572
|
-
}
|
|
573
|
-
if (!file.name || typeof file.name !== 'string') {
|
|
574
|
-
if (__DEV__) {
|
|
575
|
-
console.error('Invalid file: missing or invalid name property', file);
|
|
576
|
-
}
|
|
577
|
-
sonner_1.toast.error(t('fileManagement.toasts.invalidFileName'));
|
|
578
|
-
continue;
|
|
579
|
-
}
|
|
580
|
-
if (file.size === undefined || file.size === null || Number.isNaN(file.size)) {
|
|
581
|
-
if (__DEV__) {
|
|
582
|
-
console.error('Invalid file: missing or invalid size property', file);
|
|
583
|
-
}
|
|
584
|
-
sonner_1.toast.error(t('fileManagement.toasts.invalidFileSize', { name: file.name || 'unknown' }));
|
|
585
|
-
continue;
|
|
586
|
-
}
|
|
587
|
-
if (file.size <= 0) {
|
|
588
|
-
if (__DEV__) {
|
|
589
|
-
console.error('Invalid file: file size is zero or negative', file);
|
|
590
|
-
}
|
|
591
|
-
sonner_1.toast.error(t('fileManagement.toasts.fileEmpty', { name: file.name }));
|
|
592
|
-
continue;
|
|
593
|
-
}
|
|
594
|
-
// Validate file size
|
|
595
|
-
if (file.size > MAX_FILE_SIZE) {
|
|
596
|
-
sonner_1.toast.error(t('fileManagement.toasts.fileTooLarge', { name: file.name, maxSize: (0, fileManagement_1.formatFileSize)(MAX_FILE_SIZE) }));
|
|
597
|
-
continue;
|
|
598
|
-
}
|
|
599
|
-
// Ensure file has a type property
|
|
600
|
-
const fileType = file.type || 'application/octet-stream';
|
|
601
|
-
// Generate preview for images - unified approach
|
|
602
|
-
let preview;
|
|
603
|
-
if (fileType.startsWith('image/')) {
|
|
604
|
-
// Try to use file URI from expo-document-picker if available (works on all platforms)
|
|
605
|
-
const fileUri = file.uri;
|
|
606
|
-
if (fileUri && typeof fileUri === 'string' &&
|
|
607
|
-
(fileUri.startsWith('file://') || fileUri.startsWith('content://') ||
|
|
608
|
-
fileUri.startsWith('http://') || fileUri.startsWith('https://') ||
|
|
609
|
-
fileUri.startsWith('blob:'))) {
|
|
610
|
-
preview = fileUri;
|
|
611
|
-
}
|
|
612
|
-
else {
|
|
613
|
-
// Fallback: create blob URL if possible (works on web)
|
|
614
|
-
try {
|
|
615
|
-
if (file instanceof File || file instanceof Blob) {
|
|
616
|
-
preview = URL.createObjectURL(file);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
catch (error) {
|
|
620
|
-
if (__DEV__) {
|
|
621
|
-
console.warn('Failed to create preview URL:', error);
|
|
622
|
-
}
|
|
623
|
-
// Preview is optional, continue without it
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
processedFiles.push({
|
|
628
|
-
file,
|
|
629
|
-
preview,
|
|
630
|
-
size: file.size,
|
|
631
|
-
name: file.name,
|
|
632
|
-
type: fileType
|
|
633
|
-
});
|
|
634
|
-
}
|
|
635
|
-
if (processedFiles.length === 0) {
|
|
636
|
-
sonner_1.toast.error(t('fileManagement.toasts.noValidFiles'));
|
|
637
|
-
return;
|
|
638
|
-
}
|
|
639
|
-
// Show preview modal for user to review files before upload
|
|
640
|
-
setPendingFiles(processedFiles);
|
|
641
|
-
setShowUploadPreview(true);
|
|
642
|
-
}, []);
|
|
643
|
-
const handleConfirmUpload = async () => {
|
|
644
|
-
if (pendingFiles.length === 0)
|
|
645
|
-
return;
|
|
646
|
-
setShowUploadPreview(false);
|
|
647
|
-
uploadStartRef.current = Date.now();
|
|
648
|
-
storeSetUploading(true);
|
|
649
|
-
storeSetUploadProgress(null);
|
|
650
|
-
try {
|
|
651
|
-
const filesToUpload = pendingFiles.map(pf => pf.file);
|
|
652
|
-
storeSetUploadProgress({ current: 0, total: filesToUpload.length });
|
|
653
|
-
const uploadedFiles = await processFileUploads(filesToUpload);
|
|
654
|
-
// Cleanup preview URLs
|
|
655
|
-
pendingFiles.forEach(pf => {
|
|
656
|
-
if (pf.preview) {
|
|
657
|
-
URL.revokeObjectURL(pf.preview);
|
|
658
|
-
}
|
|
659
|
-
});
|
|
660
|
-
setPendingFiles([]);
|
|
661
|
-
// If in selectMode, automatically select the uploaded file(s)
|
|
662
|
-
if (selectMode && uploadedFiles.length > 0) {
|
|
663
|
-
// Wait a bit for the file store to update and ensure file is available
|
|
664
|
-
setTimeout(() => {
|
|
665
|
-
const fileToSelect = uploadedFiles[0];
|
|
666
|
-
if (!multiSelect && fileToSelect) {
|
|
667
|
-
// Single select mode - directly call onSelect callback
|
|
668
|
-
onSelect?.(fileToSelect);
|
|
669
|
-
if (afterSelect === 'back') {
|
|
670
|
-
goBack?.();
|
|
671
|
-
}
|
|
672
|
-
else if (afterSelect === 'close') {
|
|
673
|
-
onClose?.();
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
else if (multiSelect) {
|
|
677
|
-
// Multi-select mode - add all uploaded files to selection
|
|
678
|
-
uploadedFiles.forEach(file => {
|
|
679
|
-
if (!selectedIds.has(file.id)) {
|
|
680
|
-
setSelectedIds(prev => new Set(prev).add(file.id));
|
|
681
|
-
}
|
|
682
|
-
});
|
|
683
|
-
}
|
|
684
|
-
}, 500);
|
|
685
|
-
}
|
|
686
|
-
endUpload();
|
|
687
|
-
}
|
|
688
|
-
catch (error) {
|
|
689
|
-
sonner_1.toast.error(getErrorMessage(error) || t('fileManagement.toasts.uploadError'));
|
|
690
|
-
endUpload();
|
|
691
|
-
}
|
|
692
|
-
};
|
|
693
|
-
const handleCancelUpload = () => {
|
|
694
|
-
// Cleanup preview URLs
|
|
695
|
-
pendingFiles.forEach(pf => {
|
|
696
|
-
if (pf.preview) {
|
|
697
|
-
URL.revokeObjectURL(pf.preview);
|
|
698
|
-
}
|
|
699
|
-
});
|
|
700
|
-
setPendingFiles([]);
|
|
701
|
-
setShowUploadPreview(false);
|
|
702
|
-
};
|
|
703
|
-
const removePendingFile = (index) => {
|
|
704
|
-
const file = pendingFiles[index];
|
|
705
|
-
if (file.preview) {
|
|
706
|
-
URL.revokeObjectURL(file.preview);
|
|
707
|
-
}
|
|
708
|
-
const updated = pendingFiles.filter((_, i) => i !== index);
|
|
709
|
-
setPendingFiles(updated);
|
|
710
|
-
if (updated.length === 0) {
|
|
711
|
-
setShowUploadPreview(false);
|
|
712
|
-
}
|
|
713
|
-
};
|
|
714
|
-
/**
|
|
715
|
-
* Handle file upload - opens document picker and processes selected files
|
|
716
|
-
* Expo 54 compatible - works on web, iOS, and Android
|
|
717
|
-
*/
|
|
718
|
-
const handleFileUpload = async () => {
|
|
719
|
-
// Prevent concurrent document picker calls
|
|
720
|
-
if (isPickingDocument) {
|
|
721
|
-
sonner_1.toast.error(t('fileManagement.toasts.waitForSelection'));
|
|
722
|
-
return;
|
|
723
|
-
}
|
|
724
|
-
try {
|
|
725
|
-
setIsPickingDocument(true);
|
|
726
|
-
// Lazy load expo-document-picker
|
|
727
|
-
const picker = await loadDocumentPicker();
|
|
728
|
-
// Use expo-document-picker (works on all platforms including web)
|
|
729
|
-
// On web, it uses the native file input and provides File objects directly
|
|
730
|
-
const result = await picker.getDocumentAsync({
|
|
731
|
-
type: '*/*',
|
|
732
|
-
multiple: true,
|
|
733
|
-
copyToCacheDirectory: true,
|
|
734
|
-
});
|
|
735
|
-
if (result.canceled) {
|
|
736
|
-
setIsPickingDocument(false);
|
|
737
|
-
return;
|
|
738
|
-
}
|
|
739
|
-
if (!result.assets || result.assets.length === 0) {
|
|
740
|
-
setIsPickingDocument(false);
|
|
741
|
-
sonner_1.toast.error(t('fileManagement.toasts.noFilesSelected'));
|
|
742
|
-
return;
|
|
743
|
-
}
|
|
744
|
-
// Convert expo document picker results to File-like objects
|
|
745
|
-
// According to Expo 54 docs, expo-document-picker returns assets with:
|
|
746
|
-
// - uri: file URI (file://, content://, or blob URL)
|
|
747
|
-
// - name: file name
|
|
748
|
-
// - size: file size in bytes
|
|
749
|
-
// - mimeType: MIME type of the file
|
|
750
|
-
// - file: (optional) native File object (usually only on web)
|
|
751
|
-
const files = [];
|
|
752
|
-
const errors = [];
|
|
753
|
-
// Process files in parallel for better performance
|
|
754
|
-
// This allows multiple files to be converted simultaneously
|
|
755
|
-
const conversionPromises = result.assets.map((doc, index) => (0, fileManagement_1.convertDocumentPickerAssetToFile)(doc, index)
|
|
756
|
-
.then((file) => {
|
|
757
|
-
if (file) {
|
|
758
|
-
// Validate file has required properties before adding
|
|
759
|
-
if (!file.name || file.size === undefined) {
|
|
760
|
-
errors.push(`File "${doc.name || 'file'}" is invalid: missing required properties`);
|
|
761
|
-
return null;
|
|
762
|
-
}
|
|
763
|
-
return file;
|
|
764
|
-
}
|
|
765
|
-
return null;
|
|
766
|
-
})
|
|
767
|
-
.catch((error) => {
|
|
768
|
-
errors.push(`File "${doc.name || 'file'}": ${getErrorMessage(error) || 'Failed to process'}`);
|
|
769
|
-
return null;
|
|
770
|
-
}));
|
|
771
|
-
const convertedFiles = await Promise.all(conversionPromises);
|
|
772
|
-
// Filter out null values
|
|
773
|
-
for (const file of convertedFiles) {
|
|
774
|
-
if (file) {
|
|
775
|
-
files.push(file);
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
// Show errors if any
|
|
779
|
-
if (errors.length > 0) {
|
|
780
|
-
const errorMessage = errors.slice(0, 3).join('\n') + (errors.length > 3 ? `\n...and ${errors.length - 3} more` : '');
|
|
781
|
-
sonner_1.toast.error(t('fileManagement.toasts.loadSomeFailed', { errors: errorMessage }));
|
|
782
|
-
}
|
|
783
|
-
// Process successfully converted files
|
|
784
|
-
if (files.length > 0) {
|
|
785
|
-
await handleFileSelection(files);
|
|
786
|
-
}
|
|
787
|
-
else {
|
|
788
|
-
// Files were selected but none could be converted
|
|
789
|
-
sonner_1.toast.error(t('fileManagement.toasts.noFilesProcessed'));
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
catch (error) {
|
|
793
|
-
if (__DEV__) {
|
|
794
|
-
console.error('File upload error:', error);
|
|
795
|
-
}
|
|
796
|
-
if (getErrorMessage(error)?.includes('expo-document-picker') || getErrorMessage(error)?.includes('Different document picking in progress')) {
|
|
797
|
-
if (getErrorMessage(error)?.includes('Different document picking in progress')) {
|
|
798
|
-
sonner_1.toast.error(t('fileManagement.toasts.waitForSelection'));
|
|
799
|
-
}
|
|
800
|
-
else {
|
|
801
|
-
sonner_1.toast.error(t('fileManagement.toasts.filePickerNotAvailable'));
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
else {
|
|
805
|
-
sonner_1.toast.error(getErrorMessage(error) || t('fileManagement.toasts.selectFilesFailed'));
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
finally {
|
|
809
|
-
// Always reset the picking state, even if there was an error
|
|
810
|
-
setIsPickingDocument(false);
|
|
811
|
-
}
|
|
812
|
-
};
|
|
813
|
-
const handleFileDelete = async (fileId, filename) => {
|
|
814
|
-
// Use platform-aware confirmation dialog
|
|
815
|
-
const confirmed = await (0, fileManagement_1.confirmAction)(t('fileManagement.confirms.deleteFile', { filename }), t('fileManagement.deleteFile'), t('fileManagement.confirm'), t('common.cancel'));
|
|
816
|
-
if (!confirmed) {
|
|
817
|
-
return;
|
|
818
|
-
}
|
|
819
|
-
try {
|
|
820
|
-
storeSetDeleting(fileId);
|
|
821
|
-
await oxyServices.deleteFile(fileId);
|
|
822
|
-
sonner_1.toast.success(t('fileManagement.toasts.deleteSuccess'));
|
|
823
|
-
// Reload files after successful deletion
|
|
824
|
-
// Optimistic remove
|
|
825
|
-
fileStore_1.useFileStore.getState().removeFile(fileId);
|
|
826
|
-
// Silent background reconcile
|
|
827
|
-
setTimeout(() => loadFiles('silent'), 800);
|
|
828
|
-
}
|
|
829
|
-
catch (error) {
|
|
830
|
-
// Provide specific error messages
|
|
831
|
-
if (getErrorMessage(error)?.includes('File not found') || getErrorMessage(error)?.includes('404')) {
|
|
832
|
-
sonner_1.toast.error(t('fileManagement.toasts.fileNotFound'));
|
|
833
|
-
// Still reload files to refresh the list
|
|
834
|
-
setTimeout(() => loadFiles('silent'), 800);
|
|
835
|
-
}
|
|
836
|
-
else if (getErrorMessage(error)?.includes('permission') || getErrorMessage(error)?.includes('403')) {
|
|
837
|
-
sonner_1.toast.error(t('fileManagement.toasts.noPermission'));
|
|
838
|
-
}
|
|
839
|
-
else {
|
|
840
|
-
sonner_1.toast.error(getErrorMessage(error) || t('fileManagement.toasts.deleteFailed'));
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
finally {
|
|
844
|
-
storeSetDeleting(null);
|
|
845
|
-
}
|
|
846
|
-
};
|
|
847
|
-
const handleBulkDelete = (0, react_1.useCallback)(async () => {
|
|
848
|
-
if (selectedIds.size === 0)
|
|
849
|
-
return;
|
|
850
|
-
const fileMap = {};
|
|
851
|
-
files.forEach(f => { fileMap[f.id] = f; });
|
|
852
|
-
const selectedFiles = Array.from(selectedIds).map(id => fileMap[id]).filter(Boolean);
|
|
853
|
-
const confirmed = await (0, fileManagement_1.confirmAction)(t('fileManagement.confirms.deleteFiles', { count: selectedFiles.length }), t('fileManagement.deleteFiles'), t('fileManagement.confirm'), t('common.cancel'));
|
|
854
|
-
if (!confirmed)
|
|
855
|
-
return;
|
|
856
|
-
try {
|
|
857
|
-
const deletePromises = Array.from(selectedIds).map(async (fileId) => {
|
|
858
|
-
try {
|
|
859
|
-
await oxyServices.deleteFile(fileId);
|
|
860
|
-
fileStore_1.useFileStore.getState().removeFile(fileId);
|
|
861
|
-
return { success: true, fileId };
|
|
862
|
-
}
|
|
863
|
-
catch (error) {
|
|
864
|
-
return { success: false, fileId, error };
|
|
865
|
-
}
|
|
866
|
-
});
|
|
867
|
-
const results = await Promise.allSettled(deletePromises);
|
|
868
|
-
const successful = results.filter(r => r.status === 'fulfilled' && r.value.success).length;
|
|
869
|
-
const failed = results.length - successful;
|
|
870
|
-
if (successful > 0) {
|
|
871
|
-
sonner_1.toast.success(t('fileManagement.toasts.bulkDeleteSuccess', { count: successful }));
|
|
872
|
-
}
|
|
873
|
-
if (failed > 0) {
|
|
874
|
-
sonner_1.toast.error(t('fileManagement.toasts.bulkDeleteFailed', { count: failed }));
|
|
875
|
-
}
|
|
876
|
-
setSelectedIds(new Set());
|
|
877
|
-
setTimeout(() => loadFiles('silent'), 800);
|
|
878
|
-
}
|
|
879
|
-
catch (error) {
|
|
880
|
-
sonner_1.toast.error(getErrorMessage(error) || t('fileManagement.toasts.bulkDeleteError'));
|
|
881
|
-
}
|
|
882
|
-
}, [selectedIds, files, oxyServices, loadFiles]);
|
|
883
|
-
const handleBulkVisibilityChange = (0, react_1.useCallback)(async (visibility) => {
|
|
884
|
-
if (selectedIds.size === 0)
|
|
885
|
-
return;
|
|
886
|
-
try {
|
|
887
|
-
const updatePromises = Array.from(selectedIds).map(async (fileId) => {
|
|
888
|
-
try {
|
|
889
|
-
await oxyServices.assetUpdateVisibility(fileId, visibility);
|
|
890
|
-
return { success: true, fileId };
|
|
891
|
-
}
|
|
892
|
-
catch (error) {
|
|
893
|
-
return { success: false, fileId, error };
|
|
894
|
-
}
|
|
895
|
-
});
|
|
896
|
-
const results = await Promise.allSettled(updatePromises);
|
|
897
|
-
const successful = results.filter(r => r.status === 'fulfilled' && r.value.success).length;
|
|
898
|
-
const failed = results.length - successful;
|
|
899
|
-
if (successful > 0) {
|
|
900
|
-
sonner_1.toast.success(t('fileManagement.toasts.visibilitySuccess', { count: successful, visibility }));
|
|
901
|
-
// Update file metadata in store
|
|
902
|
-
Array.from(selectedIds).forEach(fileId => {
|
|
903
|
-
fileStore_1.useFileStore.getState().updateFile(fileId, {
|
|
904
|
-
metadata: { ...files.find(f => f.id === fileId)?.metadata, visibility }
|
|
905
|
-
});
|
|
906
|
-
});
|
|
907
|
-
}
|
|
908
|
-
if (failed > 0) {
|
|
909
|
-
sonner_1.toast.error(t('fileManagement.toasts.visibilityFailed', { count: failed }));
|
|
910
|
-
}
|
|
911
|
-
setTimeout(() => loadFiles('silent'), 800);
|
|
912
|
-
}
|
|
913
|
-
catch (error) {
|
|
914
|
-
sonner_1.toast.error(getErrorMessage(error) || t('fileManagement.toasts.visibilityError'));
|
|
915
|
-
}
|
|
916
|
-
}, [selectedIds, oxyServices, files, loadFiles]);
|
|
917
|
-
// Unified download function - works on all platforms
|
|
918
|
-
const handleFileDownload = async (fileId, filename) => {
|
|
919
|
-
try {
|
|
920
|
-
// Try to use the download URL with a simple approach
|
|
921
|
-
// On web, this creates a download link. On mobile, it opens the URL.
|
|
922
|
-
const downloadUrl = oxyServices.getFileDownloadUrl(fileId);
|
|
923
|
-
// For web platforms, use link download
|
|
924
|
-
if (typeof window !== 'undefined' && window.document) {
|
|
925
|
-
try {
|
|
926
|
-
// Try simple link download first
|
|
927
|
-
const link = document.createElement('a');
|
|
928
|
-
link.href = downloadUrl;
|
|
929
|
-
link.download = filename;
|
|
930
|
-
link.target = '_blank';
|
|
931
|
-
document.body.appendChild(link);
|
|
932
|
-
link.click();
|
|
933
|
-
document.body.removeChild(link);
|
|
934
|
-
sonner_1.toast.success(t('fileManagement.toasts.downloadStarted'));
|
|
935
|
-
}
|
|
936
|
-
catch (linkError) {
|
|
937
|
-
// Fallback to authenticated download
|
|
938
|
-
const blob = await oxyServices.getFileContentAsBlob(fileId);
|
|
939
|
-
const url = URL.createObjectURL(blob);
|
|
940
|
-
const link = document.createElement('a');
|
|
941
|
-
link.href = url;
|
|
942
|
-
link.download = filename;
|
|
943
|
-
document.body.appendChild(link);
|
|
944
|
-
link.click();
|
|
945
|
-
document.body.removeChild(link);
|
|
946
|
-
// Clean up the blob URL
|
|
947
|
-
URL.revokeObjectURL(url);
|
|
948
|
-
sonner_1.toast.success(t('fileManagement.toasts.downloadSuccess'));
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
else {
|
|
952
|
-
// For mobile, open the URL (user can save from browser)
|
|
953
|
-
// Note: This is a simplified approach - for full mobile support,
|
|
954
|
-
// consider using expo-file-system or react-native-fs
|
|
955
|
-
sonner_1.toast.info(t('fileManagement.toasts.downloadMobile'));
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
catch (error) {
|
|
959
|
-
sonner_1.toast.error(getErrorMessage(error) || t('fileManagement.toasts.downloadFailed'));
|
|
960
|
-
}
|
|
961
|
-
};
|
|
962
|
-
const handleFileOpen = async (file) => {
|
|
963
|
-
if (selectMode) {
|
|
964
|
-
toggleSelect(file);
|
|
965
|
-
return;
|
|
966
|
-
}
|
|
967
|
-
try {
|
|
968
|
-
setLoadingFileContent(true);
|
|
969
|
-
setOpenedFile(file);
|
|
970
|
-
// For text files, images, and other viewable content, try to load the content
|
|
971
|
-
if (file.contentType.startsWith('text/') ||
|
|
972
|
-
file.contentType.includes('json') ||
|
|
973
|
-
file.contentType.includes('xml') ||
|
|
974
|
-
file.contentType.includes('javascript') ||
|
|
975
|
-
file.contentType.includes('typescript') ||
|
|
976
|
-
file.contentType.startsWith('image/') ||
|
|
977
|
-
file.contentType.includes('pdf') ||
|
|
978
|
-
file.contentType.startsWith('video/') ||
|
|
979
|
-
file.contentType.startsWith('audio/')) {
|
|
980
|
-
try {
|
|
981
|
-
if (file.contentType.startsWith('image/') ||
|
|
982
|
-
file.contentType.includes('pdf') ||
|
|
983
|
-
file.contentType.startsWith('video/') ||
|
|
984
|
-
file.contentType.startsWith('audio/')) {
|
|
985
|
-
// For images, PDFs, videos, and audio, we'll use the URL directly
|
|
986
|
-
const downloadUrl = oxyServices.getFileDownloadUrl(file.id);
|
|
987
|
-
setFileContent(downloadUrl);
|
|
988
|
-
}
|
|
989
|
-
else {
|
|
990
|
-
// For text files, get the content using authenticated request
|
|
991
|
-
const content = await oxyServices.getFileContentAsText(file.id);
|
|
992
|
-
setFileContent(content);
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
catch (error) {
|
|
996
|
-
if (getErrorMessage(error)?.includes('404') || getErrorMessage(error)?.includes('not found')) {
|
|
997
|
-
sonner_1.toast.error(t('fileManagement.toasts.fileNotFoundContent'));
|
|
998
|
-
}
|
|
999
|
-
else {
|
|
1000
|
-
sonner_1.toast.error(t('fileManagement.toasts.loadContentFailed'));
|
|
1001
|
-
}
|
|
1002
|
-
setFileContent(null);
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
else {
|
|
1006
|
-
// For non-viewable files, don't load content
|
|
1007
|
-
setFileContent(null);
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
|
-
catch (error) {
|
|
1011
|
-
sonner_1.toast.error(getErrorMessage(error) || t('fileManagement.toasts.openFailed'));
|
|
1012
|
-
}
|
|
1013
|
-
finally {
|
|
1014
|
-
setLoadingFileContent(false);
|
|
1015
|
-
}
|
|
1016
|
-
};
|
|
1017
|
-
const handleCloseFile = () => {
|
|
1018
|
-
setOpenedFile(null);
|
|
1019
|
-
setFileContent(null);
|
|
1020
|
-
setShowFileDetailsInViewer(false);
|
|
1021
|
-
// Don't reset view mode when closing a file
|
|
1022
|
-
};
|
|
1023
|
-
const showFileDetailsModal = (file) => {
|
|
1024
|
-
setSelectedFile(file);
|
|
1025
|
-
setShowFileDetails(true);
|
|
1026
|
-
};
|
|
1027
|
-
const renderSimplePhotoItem = (0, react_1.useCallback)((photo, index) => {
|
|
1028
|
-
const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
|
|
1029
|
-
// Calculate photo item width based on actual container size from bottom sheet
|
|
1030
|
-
let itemsPerRow = 3; // Default for mobile
|
|
1031
|
-
if (safeContainerWidth > 768)
|
|
1032
|
-
itemsPerRow = 4; // Desktop/tablet
|
|
1033
|
-
else if (safeContainerWidth > 480)
|
|
1034
|
-
itemsPerRow = 3; // Large mobile
|
|
1035
|
-
// Account for the photoScrollContainer padding (16px on each side = 32px total)
|
|
1036
|
-
const scrollContainerPadding = 32; // Total horizontal padding from photoScrollContainer
|
|
1037
|
-
const gaps = (itemsPerRow - 1) * 4; // Gap between items (4px)
|
|
1038
|
-
const availableWidth = safeContainerWidth - scrollContainerPadding;
|
|
1039
|
-
const itemWidth = (availableWidth - gaps) / itemsPerRow;
|
|
1040
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [
|
|
1041
|
-
styles_1.fileManagementStyles.simplePhotoItem,
|
|
1042
|
-
{
|
|
1043
|
-
width: itemWidth,
|
|
1044
|
-
height: itemWidth,
|
|
1045
|
-
marginRight: (index + 1) % itemsPerRow === 0 ? 0 : 4,
|
|
1046
|
-
...(selectMode && selectedIds.has(photo.id) ? { borderWidth: 2, borderColor: themeStyles.primaryColor } : {})
|
|
1047
|
-
}
|
|
1048
|
-
], onPress: () => handleFileOpen(photo), activeOpacity: 0.8, children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.simplePhotoContainer, children: [(0, jsx_runtime_1.jsx)(expo_image_1.Image, { source: { uri: downloadUrl }, style: styles_1.fileManagementStyles.simplePhotoImage, contentFit: "cover", transition: 120, cachePolicy: "memory-disk", onError: () => {
|
|
1049
|
-
// Photo failed to load, will show placeholder
|
|
1050
|
-
}, accessibilityLabel: photo.filename }), selectMode && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles_1.fileManagementStyles.selectionBadge, children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: selectedIds.has(photo.id) ? 'checkmark-circle' : 'ellipse-outline', size: 20, color: selectedIds.has(photo.id) ? themeStyles.primaryColor : themeStyles.textColor }) }))] }) }, photo.id));
|
|
1051
|
-
}, [oxyServices, safeContainerWidth, selectMode, selectedIds, themeStyles.primaryColor, themeStyles.textColor]);
|
|
1052
|
-
const renderJustifiedPhotoItem = (0, react_1.useCallback)((photo, width, height, isLast) => {
|
|
1053
|
-
const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
|
|
1054
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [
|
|
1055
|
-
styles_1.fileManagementStyles.justifiedPhotoItem,
|
|
1056
|
-
{
|
|
1057
|
-
width,
|
|
1058
|
-
height,
|
|
1059
|
-
...(selectMode && selectedIds.has(photo.id) ? { borderWidth: 2, borderColor: themeStyles.primaryColor } : {}),
|
|
1060
|
-
...(selectMode && multiSelect && selectedIds.size > 0 && !selectedIds.has(photo.id) ? { opacity: 0.4 } : {}),
|
|
1061
|
-
},
|
|
1062
|
-
], onPress: () => handleFileOpen(photo), activeOpacity: 0.8, children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.justifiedPhotoContainer, children: [(0, jsx_runtime_1.jsx)(expo_image_1.Image, { source: { uri: downloadUrl }, style: styles_1.fileManagementStyles.justifiedPhotoImage, contentFit: "cover", transition: 120, cachePolicy: "memory-disk", onError: () => {
|
|
1063
|
-
// Photo failed to load, will show placeholder
|
|
1064
|
-
}, accessibilityLabel: photo.filename }), selectMode && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles_1.fileManagementStyles.selectionBadge, children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: selectedIds.has(photo.id) ? 'checkmark-circle' : 'ellipse-outline', size: 20, color: selectedIds.has(photo.id) ? themeStyles.primaryColor : themeStyles.textColor }) }))] }) }, photo.id));
|
|
1065
|
-
}, [oxyServices, selectMode, selectedIds, multiSelect, themeStyles.primaryColor, themeStyles.textColor]);
|
|
1066
|
-
// Run initial load once per targetUserId change to avoid accidental loops
|
|
1067
|
-
const lastLoadedFor = (0, react_1.useRef)(undefined);
|
|
1068
|
-
(0, react_1.useEffect)(() => {
|
|
1069
|
-
const key = targetUserId || 'anonymous';
|
|
1070
|
-
if (lastLoadedFor.current !== key) {
|
|
1071
|
-
lastLoadedFor.current = key;
|
|
1072
|
-
loadFiles('initial');
|
|
1073
|
-
}
|
|
1074
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1075
|
-
}, [targetUserId]);
|
|
1076
|
-
const renderFileItem = (file) => {
|
|
1077
|
-
const isImage = file.contentType.startsWith('image/');
|
|
1078
|
-
const isPDF = file.contentType.includes('pdf');
|
|
1079
|
-
const isVideo = file.contentType.startsWith('video/');
|
|
1080
|
-
const isAudio = file.contentType.startsWith('audio/');
|
|
1081
|
-
const hasPreview = isImage || isPDF || isVideo;
|
|
1082
|
-
const borderColor = themeStyles.borderColor;
|
|
1083
|
-
return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [styles_1.fileManagementStyles.fileItem, { backgroundColor: themeStyles.secondaryBackgroundColor, borderColor }, selectMode && selectedIds.has(file.id) && { borderColor: themeStyles.primaryColor, borderWidth: 2 }], children: [(0, jsx_runtime_1.jsxs)(react_native_1.TouchableOpacity, { style: styles_1.fileManagementStyles.fileContent, onPress: () => handleFileOpen(file), children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles_1.fileManagementStyles.filePreviewContainer, children: hasPreview ? ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.filePreview, children: [isImage && ((0, jsx_runtime_1.jsx)(expo_image_1.Image, { source: { uri: getSafeDownloadUrlCallback(file, 'thumb') }, style: styles_1.fileManagementStyles.previewImage, contentFit: "cover", transition: 120, cachePolicy: "memory-disk", onError: () => {
|
|
1084
|
-
// Image preview failed to load
|
|
1085
|
-
}, accessibilityLabel: file.filename })), isPDF && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.pdfPreview, children: [(0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "document", size: 32, color: themeStyles.primaryColor }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.pdfLabel, { color: themeStyles.primaryColor }], children: "PDF" })] })), isVideo && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.videoPreviewWrapper, children: [(0, jsx_runtime_1.jsx)(expo_image_1.Image, { source: { uri: getSafeDownloadUrlCallback(file, 'thumb') }, style: styles_1.fileManagementStyles.videoPosterImage, contentFit: "cover", transition: 120, cachePolicy: "memory-disk", onError: (_) => {
|
|
1086
|
-
// If thumbnail not available, we still show icon overlay
|
|
1087
|
-
}, accessibilityLabel: `${file.filename} video thumbnail` }), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles_1.fileManagementStyles.videoOverlay, children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "play", size: 24, color: "#FFFFFF" }) })] })), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles_1.fileManagementStyles.fallbackIcon, { display: isImage ? 'none' : 'flex' }], children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: (0, fileManagement_1.getFileIcon)(file.contentType), size: 32, color: themeStyles.primaryColor }) }), selectMode && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles_1.fileManagementStyles.selectionBadge, children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: selectedIds.has(file.id) ? 'checkmark-circle' : 'ellipse-outline', size: 22, color: selectedIds.has(file.id) ? themeStyles.primaryColor : themeStyles.textColor }) }))] })) : ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles_1.fileManagementStyles.fileIconContainer, children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: (0, fileManagement_1.getFileIcon)(file.contentType), size: 32, color: themeStyles.primaryColor }) })) }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.fileInfo, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.fileName, { color: themeStyles.textColor }], numberOfLines: 1, children: file.filename }), (0, jsx_runtime_1.jsxs)(react_native_1.Text, { style: [styles_1.fileManagementStyles.fileDetails, { color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666' }], children: [(0, fileManagement_1.formatFileSize)(file.length), " \u2022 ", new Date(file.uploadDate).toLocaleDateString()] }), file.metadata?.description && ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.fileDescription, { color: themeStyles.isDarkTheme ? '#AAAAAA' : '#888888' }], numberOfLines: 2, children: file.metadata.description }))] })] }), !selectMode && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.fileActions, children: [hasPreview && ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles_1.fileManagementStyles.actionButton, { backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0' }], onPress: () => handleFileOpen(file), children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "eye", size: 20, color: themeStyles.primaryColor }) })), (0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles_1.fileManagementStyles.actionButton, { backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0' }], onPress: () => handleFileDownload(file.id, file.filename), children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "download", size: 20, color: themeStyles.primaryColor }) }), (0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles_1.fileManagementStyles.actionButton, { backgroundColor: themeStyles.isDarkTheme ? '#400000' : '#FFEBEE' }], onPress: () => {
|
|
1088
|
-
handleFileDelete(file.id, file.filename);
|
|
1089
|
-
}, disabled: deleting === file.id, children: deleting === file.id ? ((0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { size: "small", color: themeStyles.dangerColor })) : ((0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "trash", size: 20, color: themeStyles.dangerColor })) })] }))] }, file.id));
|
|
1090
|
-
};
|
|
1091
|
-
// GroupedSection-based file items (for 'all' view) replacing legacy flat list look
|
|
1092
|
-
// biome-ignore lint/suspicious/noExplicitAny: GroupedSection items have dynamic props
|
|
1093
|
-
const groupedFileItems = (0, react_1.useMemo)(() => {
|
|
1094
|
-
// filteredFiles is already sorted, so just use it directly
|
|
1095
|
-
const sortedFiles = filteredFiles;
|
|
1096
|
-
// Store file positions for scrolling
|
|
1097
|
-
sortedFiles.forEach((file, index) => {
|
|
1098
|
-
itemRefs.current.set(file.id, index);
|
|
1099
|
-
});
|
|
1100
|
-
return sortedFiles.map((file) => {
|
|
1101
|
-
const isImage = file.contentType.startsWith('image/');
|
|
1102
|
-
const isPDF = file.contentType.includes('pdf');
|
|
1103
|
-
const isVideo = file.contentType.startsWith('video/');
|
|
1104
|
-
const hasPreview = isImage || isPDF || isVideo;
|
|
1105
|
-
const isSelected = selectedIds.has(file.id);
|
|
1106
|
-
// Create customIcon for preview thumbnails (36x36 to match GroupedItem iconContainer)
|
|
1107
|
-
let customIcon;
|
|
1108
|
-
if (hasPreview) {
|
|
1109
|
-
if (isImage) {
|
|
1110
|
-
customIcon = ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: { width: 36, height: 36, borderRadius: 18, overflow: 'hidden' }, children: (0, jsx_runtime_1.jsx)(expo_image_1.Image, { source: { uri: getSafeDownloadUrlCallback(file, 'thumb') }, style: { width: 36, height: 36 }, contentFit: "cover", transition: 120, cachePolicy: "memory-disk", onError: () => {
|
|
1111
|
-
// Image preview failed to load - will fallback to icon
|
|
1112
|
-
}, accessibilityLabel: file.filename }) }));
|
|
1113
|
-
}
|
|
1114
|
-
else if (isVideo) {
|
|
1115
|
-
customIcon = ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { width: 36, height: 36, borderRadius: 18, overflow: 'hidden', backgroundColor: '#000000', position: 'relative' }, children: [(0, jsx_runtime_1.jsx)(expo_image_1.Image, { source: { uri: getSafeDownloadUrlCallback(file, 'thumb') }, style: { width: 36, height: 36 }, contentFit: "cover", transition: 120, cachePolicy: "memory-disk", onError: (_) => {
|
|
1116
|
-
// If thumbnail not available, we still show icon overlay
|
|
1117
|
-
}, accessibilityLabel: `${file.filename} video thumbnail` }), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: { position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, alignItems: 'center', justifyContent: 'center', backgroundColor: 'rgba(0,0,0,0.25)' }, children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "play", size: 16, color: "#FFFFFF" }) })] }));
|
|
1118
|
-
}
|
|
1119
|
-
else if (isPDF) {
|
|
1120
|
-
customIcon = ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: { width: 36, height: 36, borderRadius: 18, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FF6B6B20' }, children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "document", size: 20, color: themeStyles.primaryColor }) }));
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
return {
|
|
1124
|
-
id: file.id,
|
|
1125
|
-
customIcon: customIcon,
|
|
1126
|
-
icon: !hasPreview ? (0, fileManagement_1.getFileIcon)(file.contentType) : undefined,
|
|
1127
|
-
iconColor: themeStyles.primaryColor,
|
|
1128
|
-
title: file.filename,
|
|
1129
|
-
subtitle: `${(0, fileManagement_1.formatFileSize)(file.length)} • ${new Date(file.uploadDate).toLocaleDateString()}`,
|
|
1130
|
-
theme: theme,
|
|
1131
|
-
onPress: () => {
|
|
1132
|
-
// Support selection in regular mode with long press or if already selecting
|
|
1133
|
-
if (!selectMode && selectedIds.size > 0) {
|
|
1134
|
-
// If already in selection mode (some files selected), toggle selection
|
|
1135
|
-
toggleSelect(file);
|
|
1136
|
-
}
|
|
1137
|
-
else {
|
|
1138
|
-
handleFileOpen(file);
|
|
1139
|
-
}
|
|
1140
|
-
},
|
|
1141
|
-
onLongPress: !selectMode ? () => {
|
|
1142
|
-
// Enable selection mode on long press
|
|
1143
|
-
if (selectedIds.size === 0) {
|
|
1144
|
-
setSelectedIds(new Set([file.id]));
|
|
1145
|
-
}
|
|
1146
|
-
else {
|
|
1147
|
-
toggleSelect(file);
|
|
1148
|
-
}
|
|
1149
|
-
} : undefined,
|
|
1150
|
-
showChevron: false,
|
|
1151
|
-
dense: true,
|
|
1152
|
-
multiRow: !!file.metadata?.description,
|
|
1153
|
-
selected: (selectMode || selectedIds.size > 0) && isSelected,
|
|
1154
|
-
// Hide action buttons when selecting (in selectMode or bulk operations mode)
|
|
1155
|
-
customContent: (!selectMode && selectedIds.size === 0) ? ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.groupedActions, children: [(isImage || isVideo || file.contentType.includes('pdf')) && ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles_1.fileManagementStyles.groupedActionBtn, { backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0' }], onPress: () => handleFileOpen(file), children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "eye", size: 18, color: themeStyles.primaryColor }) })), (0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles_1.fileManagementStyles.groupedActionBtn, { backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0' }], onPress: () => handleFileDownload(file.id, file.filename), children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "download", size: 18, color: themeStyles.primaryColor }) }), (0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles_1.fileManagementStyles.groupedActionBtn, { backgroundColor: themeStyles.isDarkTheme ? '#400000' : '#FFEBEE' }], onPress: () => handleFileDelete(file.id, file.filename), disabled: deleting === file.id, children: deleting === file.id ? ((0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { size: "small", color: themeStyles.dangerColor })) : ((0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "trash", size: 18, color: themeStyles.dangerColor })) })] })) : undefined,
|
|
1156
|
-
customContentBelow: file.metadata?.description ? ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.groupedDescription, { color: themeStyles.isDarkTheme ? '#AAAAAA' : '#666666' }], numberOfLines: 2, children: file.metadata.description })) : undefined,
|
|
1157
|
-
};
|
|
1158
|
-
});
|
|
1159
|
-
}, [filteredFiles, theme, themeStyles, deleting, handleFileDownload, handleFileDelete, handleFileOpen, getSafeDownloadUrlCallback, selectMode, selectedIds]);
|
|
1160
|
-
// Scroll to selected file after selection
|
|
1161
|
-
(0, react_1.useEffect)(() => {
|
|
1162
|
-
if (lastSelectedFileId && selectMode) {
|
|
1163
|
-
if (viewMode === 'all' && scrollViewRef.current) {
|
|
1164
|
-
// Find the index of the selected file
|
|
1165
|
-
const itemIndex = itemRefs.current.get(lastSelectedFileId);
|
|
1166
|
-
if (itemIndex !== undefined && itemIndex >= 0) {
|
|
1167
|
-
// Estimate item height (GroupedItem with dense mode is approximately 60-70px)
|
|
1168
|
-
// Account for description rows which add extra height
|
|
1169
|
-
const baseItemHeight = 65;
|
|
1170
|
-
const descriptionHeight = 30; // Approximate height for description
|
|
1171
|
-
// Use filteredFiles which is already sorted according to user's selection
|
|
1172
|
-
const sortedFiles = filteredFiles;
|
|
1173
|
-
// Calculate total height up to this item
|
|
1174
|
-
let scrollPosition = 0;
|
|
1175
|
-
for (let i = 0; i <= itemIndex && i < sortedFiles.length; i++) {
|
|
1176
|
-
const file = sortedFiles[i];
|
|
1177
|
-
scrollPosition += baseItemHeight;
|
|
1178
|
-
if (file.metadata?.description) {
|
|
1179
|
-
scrollPosition += descriptionHeight;
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
// Add header, controls, search, and stats height (approximately 250px)
|
|
1183
|
-
const headerHeight = 250;
|
|
1184
|
-
const finalScrollPosition = headerHeight + scrollPosition - 150; // Offset to show item near top
|
|
1185
|
-
// Use requestAnimationFrame to ensure DOM is updated before scrolling
|
|
1186
|
-
requestAnimationFrame(() => {
|
|
1187
|
-
requestAnimationFrame(() => {
|
|
1188
|
-
scrollViewRef.current?.scrollTo({
|
|
1189
|
-
y: Math.max(0, finalScrollPosition),
|
|
1190
|
-
animated: true,
|
|
1191
|
-
});
|
|
1192
|
-
});
|
|
1193
|
-
});
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
else if (viewMode === 'photos' && photoScrollViewRef.current) {
|
|
1197
|
-
// For photo grid, find the photo index
|
|
1198
|
-
const photos = filteredFiles.filter(file => file.contentType.startsWith('image/'));
|
|
1199
|
-
const photoIndex = photos.findIndex(p => p.id === lastSelectedFileId);
|
|
1200
|
-
if (photoIndex >= 0) {
|
|
1201
|
-
// Estimate photo item height based on grid layout
|
|
1202
|
-
// Calculate items per row
|
|
1203
|
-
let itemsPerRow = 3;
|
|
1204
|
-
if (safeContainerWidth > 768)
|
|
1205
|
-
itemsPerRow = 6;
|
|
1206
|
-
else if (safeContainerWidth > 480)
|
|
1207
|
-
itemsPerRow = 4;
|
|
1208
|
-
const scrollContainerPadding = 32;
|
|
1209
|
-
const gaps = (itemsPerRow - 1) * 4;
|
|
1210
|
-
const availableWidth = safeContainerWidth - scrollContainerPadding;
|
|
1211
|
-
const itemWidth = (availableWidth - gaps) / itemsPerRow;
|
|
1212
|
-
// Calculate row and approximate scroll position
|
|
1213
|
-
const row = Math.floor(photoIndex / itemsPerRow);
|
|
1214
|
-
const headerHeight = 250;
|
|
1215
|
-
const finalScrollPosition = headerHeight + (row * (itemWidth + 4)) - 150;
|
|
1216
|
-
// Use requestAnimationFrame to ensure DOM is updated before scrolling
|
|
1217
|
-
requestAnimationFrame(() => {
|
|
1218
|
-
requestAnimationFrame(() => {
|
|
1219
|
-
photoScrollViewRef.current?.scrollTo({
|
|
1220
|
-
y: Math.max(0, finalScrollPosition),
|
|
1221
|
-
animated: true,
|
|
1222
|
-
});
|
|
1223
|
-
});
|
|
1224
|
-
});
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
}, [lastSelectedFileId, selectMode, viewMode, filteredFiles, safeContainerWidth]);
|
|
1229
|
-
// Clear selected file ID after scroll animation completes
|
|
1230
|
-
(0, react_1.useEffect)(() => {
|
|
1231
|
-
if (lastSelectedFileId && scrollViewRef.current) {
|
|
1232
|
-
const timeoutId = setTimeout(() => {
|
|
1233
|
-
setLastSelectedFileId(null);
|
|
1234
|
-
}, 600); // Allow time for scroll animation to complete
|
|
1235
|
-
return () => clearTimeout(timeoutId);
|
|
1236
|
-
}
|
|
1237
|
-
}, [lastSelectedFileId]);
|
|
1238
|
-
const renderPhotoItem = (photo, index) => {
|
|
1239
|
-
const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
|
|
1240
|
-
// Calculate photo item width based on actual container size from bottom sheet
|
|
1241
|
-
let itemsPerRow = 3; // Default for mobile
|
|
1242
|
-
if (safeContainerWidth > 768)
|
|
1243
|
-
itemsPerRow = 6; // Tablet/Desktop
|
|
1244
|
-
else if (safeContainerWidth > 480)
|
|
1245
|
-
itemsPerRow = 4; // Large mobile
|
|
1246
|
-
// Account for the photoScrollContainer padding (16px on each side = 32px total)
|
|
1247
|
-
const scrollContainerPadding = 32; // Total horizontal padding from photoScrollContainer
|
|
1248
|
-
const gaps = (itemsPerRow - 1) * 4; // Gap between items
|
|
1249
|
-
const availableWidth = safeContainerWidth - scrollContainerPadding;
|
|
1250
|
-
const itemWidth = (availableWidth - gaps) / itemsPerRow;
|
|
1251
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [
|
|
1252
|
-
styles_1.fileManagementStyles.photoItem,
|
|
1253
|
-
{
|
|
1254
|
-
width: itemWidth,
|
|
1255
|
-
height: itemWidth,
|
|
1256
|
-
}
|
|
1257
|
-
], onPress: () => handleFileOpen(photo), activeOpacity: 0.8, children: (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles_1.fileManagementStyles.photoContainer, children: (0, jsx_runtime_1.jsx)(expo_image_1.Image, { source: { uri: downloadUrl }, style: styles_1.fileManagementStyles.photoImage, contentFit: "cover", transition: 120, cachePolicy: "memory-disk", onError: () => {
|
|
1258
|
-
// Image preview failed to load
|
|
1259
|
-
}, accessibilityLabel: photo.filename }) }) }, photo.id));
|
|
1260
|
-
};
|
|
1261
|
-
const renderPhotoGrid = (0, react_1.useCallback)(() => {
|
|
1262
|
-
const photos = filteredFiles.filter(file => file.contentType.startsWith('image/'));
|
|
1263
|
-
if (photos.length === 0) {
|
|
1264
|
-
return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.emptyState, children: [(0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "images-outline", size: 64, color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC' }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.emptyStateTitle, { color: themeStyles.textColor }], children: t('fileManagement.emptyPhotos.title') }), (0, jsx_runtime_1.jsxs)(react_native_1.Text, { style: [styles_1.fileManagementStyles.emptyStateDescription, { color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666' }], children: [" ", user?.id === targetUserId
|
|
1265
|
-
? t('fileManagement.emptyPhotos.ownDescription')
|
|
1266
|
-
: t('fileManagement.emptyPhotos.otherDescription'), " "] }), user?.id === targetUserId && ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles_1.fileManagementStyles.emptyStateButton, { backgroundColor: themeStyles.primaryColor }], onPress: handleFileUpload, disabled: uploading || isPickingDocument, children: uploading ? ((0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { size: "small", color: "#FFFFFF" })) : isPickingDocument ? ((0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { size: "small", color: "#FFFFFF" })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "cloud-upload", size: 20, color: "#FFFFFF" }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles_1.fileManagementStyles.emptyStateButtonText, children: t('fileManagement.uploadPhotos') })] })) }))] }));
|
|
1267
|
-
}
|
|
1268
|
-
return ((0, jsx_runtime_1.jsxs)(react_native_1.ScrollView, { ref: photoScrollViewRef, style: styles_1.fileManagementStyles.scrollView, contentContainerStyle: styles_1.fileManagementStyles.photoScrollContainer, refreshControl: (0, jsx_runtime_1.jsx)(react_native_1.RefreshControl, { refreshing: refreshing, onRefresh: () => loadFiles('refresh'), tintColor: themeStyles.primaryColor }), showsVerticalScrollIndicator: false, onScroll: ({ nativeEvent }) => {
|
|
1269
|
-
const { layoutMeasurement, contentOffset, contentSize } = nativeEvent;
|
|
1270
|
-
const distanceFromBottom = contentSize.height - (contentOffset.y + layoutMeasurement.height);
|
|
1271
|
-
if (distanceFromBottom < 200 && !paging.loadingMore && paging.hasMore) {
|
|
1272
|
-
loadFiles('more');
|
|
1273
|
-
}
|
|
1274
|
-
}, scrollEventThrottle: 250, children: [loadingDimensions && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.dimensionsLoadingIndicator, children: [(0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { size: "small", color: themeStyles.primaryColor }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.dimensionsLoadingText, { color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666' }], children: t('fileManagement.loadingPhotoLayout') })] })), (0, jsx_runtime_1.jsx)(JustifiedPhotoGrid_1.default, { photos: photos, photoDimensions: photoDimensions, loadPhotoDimensions: loadPhotoDimensions, createJustifiedRows: createJustifiedRows, renderJustifiedPhotoItem: renderJustifiedPhotoItem, renderSimplePhotoItem: renderPhotoItem, textColor: themeStyles.textColor, containerWidth: safeContainerWidth })] }));
|
|
1275
|
-
}, [
|
|
1276
|
-
filteredFiles,
|
|
1277
|
-
themeStyles,
|
|
1278
|
-
user?.id,
|
|
1279
|
-
targetUserId,
|
|
1280
|
-
uploading,
|
|
1281
|
-
handleFileUpload,
|
|
1282
|
-
refreshing,
|
|
1283
|
-
loadFiles,
|
|
1284
|
-
loadingDimensions,
|
|
1285
|
-
photoDimensions,
|
|
1286
|
-
loadPhotoDimensions,
|
|
1287
|
-
createJustifiedRows,
|
|
1288
|
-
renderJustifiedPhotoItem,
|
|
1289
|
-
renderPhotoItem,
|
|
1290
|
-
safeContainerWidth
|
|
1291
|
-
]);
|
|
1292
|
-
// Inline justified grid removed (moved to components/photogrid/JustifiedPhotoGrid.tsx)
|
|
1293
|
-
const renderEmptyState = () => ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.emptyState, children: [(0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "folder-open-outline", size: 64, color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC' }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.emptyStateTitle, { color: themeStyles.textColor }], children: t('fileManagement.emptyFiles.title') }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.emptyStateDescription, { color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666' }], children: user?.id === targetUserId
|
|
1294
|
-
? t('fileManagement.emptyFiles.ownDescription')
|
|
1295
|
-
: t('fileManagement.emptyFiles.otherDescription') }), user?.id === targetUserId && ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles_1.fileManagementStyles.emptyStateButton, { backgroundColor: themeStyles.primaryColor }], onPress: handleFileUpload, disabled: uploading || isPickingDocument, children: uploading ? ((0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { size: "small", color: "#FFFFFF" })) : isPickingDocument ? ((0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { size: "small", color: "#FFFFFF" })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "cloud-upload", size: 20, color: "#FFFFFF" }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles_1.fileManagementStyles.emptyStateButtonText, children: t('fileManagement.uploadFiles') })] })) }))] }));
|
|
1296
|
-
// Professional Skeleton Loading Component with Advanced Shimmer Effect
|
|
1297
|
-
const SkeletonLoader = react_1.default.memo(() => {
|
|
1298
|
-
const shimmerAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
|
|
1299
|
-
const skeletonContainerWidth = safeContainerWidth;
|
|
1300
|
-
(0, react_1.useEffect)(() => {
|
|
1301
|
-
const shimmer = react_native_1.Animated.loop(react_native_1.Animated.timing(shimmerAnim, {
|
|
1302
|
-
toValue: 1,
|
|
1303
|
-
duration: 2000,
|
|
1304
|
-
easing: react_native_1.Easing.linear,
|
|
1305
|
-
useNativeDriver: true,
|
|
1306
|
-
}));
|
|
1307
|
-
shimmer.start();
|
|
1308
|
-
return () => shimmer.stop();
|
|
1309
|
-
}, [shimmerAnim]);
|
|
1310
|
-
// Create a sweeping shimmer effect
|
|
1311
|
-
const shimmerTranslateX = shimmerAnim.interpolate({
|
|
1312
|
-
inputRange: [0, 1],
|
|
1313
|
-
outputRange: [-skeletonContainerWidth * 2, skeletonContainerWidth * 2],
|
|
1314
|
-
});
|
|
1315
|
-
const SkeletonBox = ({ width, height, borderRadius = 8, style, delay = 0 }) => {
|
|
1316
|
-
const delayedTranslateX = shimmerAnim.interpolate({
|
|
1317
|
-
inputRange: [0, 1],
|
|
1318
|
-
outputRange: [-skeletonContainerWidth * 2 + delay, skeletonContainerWidth * 2 + delay],
|
|
1319
|
-
});
|
|
1320
|
-
return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [
|
|
1321
|
-
{
|
|
1322
|
-
width,
|
|
1323
|
-
height,
|
|
1324
|
-
borderRadius,
|
|
1325
|
-
backgroundColor: themeStyles.isDarkTheme ? '#1E1E1E' : '#F5F5F5',
|
|
1326
|
-
overflow: 'hidden',
|
|
1327
|
-
position: 'relative',
|
|
1328
|
-
},
|
|
1329
|
-
style,
|
|
1330
|
-
], children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: {
|
|
1331
|
-
position: 'absolute',
|
|
1332
|
-
top: 0,
|
|
1333
|
-
left: 0,
|
|
1334
|
-
right: 0,
|
|
1335
|
-
bottom: 0,
|
|
1336
|
-
backgroundColor: themeStyles.isDarkTheme ? '#1E1E1E' : '#F5F5F5',
|
|
1337
|
-
} }), (0, jsx_runtime_1.jsx)(react_native_1.Animated.View, { style: {
|
|
1338
|
-
position: 'absolute',
|
|
1339
|
-
top: 0,
|
|
1340
|
-
left: 0,
|
|
1341
|
-
width: '100%',
|
|
1342
|
-
height: '100%',
|
|
1343
|
-
transform: [{ translateX: delayedTranslateX }],
|
|
1344
|
-
}, children: (0, jsx_runtime_1.jsx)(react_native_1.View, { style: {
|
|
1345
|
-
width: skeletonContainerWidth,
|
|
1346
|
-
height: '100%',
|
|
1347
|
-
backgroundColor: themeStyles.isDarkTheme
|
|
1348
|
-
? 'rgba(255, 255, 255, 0.08)'
|
|
1349
|
-
: 'rgba(255, 255, 255, 0.8)',
|
|
1350
|
-
shadowColor: themeStyles.isDarkTheme ? '#000' : '#FFF',
|
|
1351
|
-
shadowOffset: { width: 0, height: 0 },
|
|
1352
|
-
shadowOpacity: 0.3,
|
|
1353
|
-
shadowRadius: 10,
|
|
1354
|
-
} }) })] }));
|
|
1355
|
-
};
|
|
1356
|
-
// Skeleton file item matching GroupedSection structure
|
|
1357
|
-
const SkeletonFileItem = ({ index }) => ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [
|
|
1358
|
-
{
|
|
1359
|
-
flexDirection: 'row',
|
|
1360
|
-
alignItems: 'center',
|
|
1361
|
-
paddingHorizontal: 16,
|
|
1362
|
-
paddingVertical: 12,
|
|
1363
|
-
backgroundColor: themeStyles.isDarkTheme ? '#121212' : '#FFFFFF',
|
|
1364
|
-
borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
1365
|
-
borderBottomColor: themeStyles.borderColor,
|
|
1366
|
-
},
|
|
1367
|
-
], children: [(0, jsx_runtime_1.jsx)(SkeletonBox, { width: 44, height: 44, borderRadius: 8, delay: index * 50 }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { flex: 1, marginLeft: 12, justifyContent: 'center' }, children: [(0, jsx_runtime_1.jsx)(SkeletonBox, { width: index % 3 === 0 ? '85%' : index % 3 === 1 ? '70%' : '90%', height: 16, style: { marginBottom: 8 }, delay: index * 50 + 20 }), (0, jsx_runtime_1.jsx)(SkeletonBox, { width: index % 2 === 0 ? '50%' : '60%', height: 12, delay: index * 50 + 40 })] })] }));
|
|
1368
|
-
return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [styles_1.fileManagementStyles.container, { backgroundColor }], children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [styles_1.fileManagementStyles.header, { borderBottomColor: themeStyles.borderColor, borderBottomWidth: react_native_1.StyleSheet.hairlineWidth }], children: [(0, jsx_runtime_1.jsx)(SkeletonBox, { width: 44, height: 44, borderRadius: 12 }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [styles_1.fileManagementStyles.headerTitleContainer, { flex: 1 }], children: [(0, jsx_runtime_1.jsx)(SkeletonBox, { width: 140, height: 20, style: { marginBottom: 6 } }), (0, jsx_runtime_1.jsx)(SkeletonBox, { width: 100, height: 14 })] }), (0, jsx_runtime_1.jsx)(SkeletonBox, { width: 44, height: 44, borderRadius: 12 })] }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.controlsBar, children: [(0, jsx_runtime_1.jsx)(SkeletonBox, { width: 100, height: 36, borderRadius: 18 }), (0, jsx_runtime_1.jsx)(SkeletonBox, { width: 44, height: 44, borderRadius: 22 })] }), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles_1.fileManagementStyles.searchContainer, {
|
|
1369
|
-
backgroundColor: themeStyles.colors.card,
|
|
1370
|
-
}], children: (0, jsx_runtime_1.jsx)(SkeletonBox, { width: "100%", height: 44, borderRadius: 12 }) }), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles_1.fileManagementStyles.statsContainer, {
|
|
1371
|
-
backgroundColor: themeStyles.colors.card,
|
|
1372
|
-
}], children: [1, 2, 3].map((i) => ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.statItem, children: [(0, jsx_runtime_1.jsx)(SkeletonBox, { width: 50, height: 20, style: { marginBottom: 4 }, delay: i * 30 }), (0, jsx_runtime_1.jsx)(SkeletonBox, { width: 40, height: 14, delay: i * 30 + 15 })] }, i))) }), (0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { style: styles_1.fileManagementStyles.scrollView, contentContainerStyle: styles_1.fileManagementStyles.scrollContainer, showsVerticalScrollIndicator: false, children: (0, jsx_runtime_1.jsx)(react_native_1.View, { style: {
|
|
1373
|
-
backgroundColor: themeStyles.colors.card,
|
|
1374
|
-
borderRadius: 18,
|
|
1375
|
-
overflow: 'hidden',
|
|
1376
|
-
marginTop: 8,
|
|
1377
|
-
}, children: [1, 2, 3, 4, 5, 6, 7, 8].map((i) => ((0, jsx_runtime_1.jsx)(SkeletonFileItem, { index: i }, i))) }) })] }));
|
|
1378
|
-
});
|
|
1379
|
-
if (loading) {
|
|
1380
|
-
return (0, jsx_runtime_1.jsx)(SkeletonLoader, {});
|
|
1381
|
-
}
|
|
1382
|
-
// If a file is opened, show the file viewer
|
|
1383
|
-
if (!selectMode && openedFile) {
|
|
1384
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FileViewer_1.FileViewer, { file: openedFile, fileContent: fileContent, loadingFileContent: loadingFileContent, showFileDetailsInViewer: showFileDetailsInViewer, onToggleDetails: () => setShowFileDetailsInViewer(!showFileDetailsInViewer), onClose: handleCloseFile, onDownload: handleFileDownload, onDelete: handleFileDelete, themeStyles: themeStyles, isOwner: user?.id === targetUserId }), (0, jsx_runtime_1.jsx)(FileDetailsModal_1.FileDetailsModal, { visible: showFileDetails, file: selectedFile, onClose: () => setShowFileDetails(false), onDownload: handleFileDownload, onDelete: handleFileDelete, themeStyles: themeStyles, isOwner: user?.id === targetUserId })] }));
|
|
1385
|
-
}
|
|
1386
|
-
// If upload preview is showing, render it inline instead of the file list
|
|
1387
|
-
if (showUploadPreview) {
|
|
1388
|
-
return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.container, children: [(0, jsx_runtime_1.jsx)(Header_1.default, { title: t('fileManagement.reviewFiles'), subtitle: t('fileManagement.readyToUpload', { count: pendingFiles.length }), onBack: handleCancelUpload, showBackButton: true, variant: "minimal", elevation: "none", titleAlignment: "left" }), (0, jsx_runtime_1.jsx)(UploadPreview_1.UploadPreview, { visible: true, pendingFiles: pendingFiles, onConfirm: handleConfirmUpload, onCancel: handleCancelUpload, onRemoveFile: removePendingFile, themeStyles: themeStyles, inline: true })] }));
|
|
1389
|
-
}
|
|
1390
|
-
return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.container, children: [(0, jsx_runtime_1.jsx)(Header_1.default, { title: selectMode ? (multiSelect ? (maxSelection ? t('fileManagement.selectedWithMax', { count: selectedIds.size, max: maxSelection }) : t('fileManagement.selected', { count: selectedIds.size })) : t('fileManagement.selectFile')) : (viewMode === 'photos' ? t('fileManagement.photos') : t('fileManagement.title')), subtitle: selectMode ? (multiSelect ? t('fileManagement.available', { count: filteredFiles.length }) : t('fileManagement.tapToSelect')) : (filteredFiles.length === 1 ? t('fileManagement.itemCount', { count: filteredFiles.length }) : t('fileManagement.itemCount_plural', { count: filteredFiles.length })), rightActions: selectMode && multiSelect ? [
|
|
1391
|
-
{
|
|
1392
|
-
key: 'clear',
|
|
1393
|
-
text: t('fileManagement.clear'),
|
|
1394
|
-
onPress: () => setSelectedIds(new Set()),
|
|
1395
|
-
disabled: selectedIds.size === 0,
|
|
1396
|
-
},
|
|
1397
|
-
{
|
|
1398
|
-
key: 'confirm',
|
|
1399
|
-
text: t('fileManagement.confirm'),
|
|
1400
|
-
onPress: confirmMultiSelection,
|
|
1401
|
-
disabled: selectedIds.size === 0,
|
|
1402
|
-
}
|
|
1403
|
-
] : !selectMode && selectedIds.size > 0 ? [
|
|
1404
|
-
{
|
|
1405
|
-
key: 'clear',
|
|
1406
|
-
text: t('fileManagement.clear'),
|
|
1407
|
-
onPress: () => setSelectedIds(new Set()),
|
|
1408
|
-
},
|
|
1409
|
-
{
|
|
1410
|
-
key: 'delete',
|
|
1411
|
-
text: t('fileManagement.delete', { count: selectedIds.size }),
|
|
1412
|
-
onPress: handleBulkDelete,
|
|
1413
|
-
icon: 'delete',
|
|
1414
|
-
},
|
|
1415
|
-
{
|
|
1416
|
-
key: 'visibility',
|
|
1417
|
-
text: t('fileManagement.visibility'),
|
|
1418
|
-
onPress: () => {
|
|
1419
|
-
// Show visibility options menu
|
|
1420
|
-
react_native_1.Alert.alert(t('fileManagement.changeVisibility'), t('fileManagement.changeVisibilityConfirm', { count: selectedIds.size }), [
|
|
1421
|
-
{ text: t('common.cancel'), style: 'cancel' },
|
|
1422
|
-
{ text: t('fileManagement.private'), onPress: () => handleBulkVisibilityChange('private') },
|
|
1423
|
-
{ text: t('fileManagement.public'), onPress: () => handleBulkVisibilityChange('public') },
|
|
1424
|
-
{ text: t('fileManagement.unlisted'), onPress: () => handleBulkVisibilityChange('unlisted') },
|
|
1425
|
-
]);
|
|
1426
|
-
},
|
|
1427
|
-
icon: 'eye',
|
|
1428
|
-
}
|
|
1429
|
-
] : undefined, onBack: onClose || goBack, showBackButton: true, variant: "minimal", elevation: "none", titleAlignment: "left" }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.controlsBar, children: [(0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles_1.fileManagementStyles.viewModeScroll, children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [
|
|
1430
|
-
styles_1.fileManagementStyles.viewModeToggle,
|
|
1431
|
-
{
|
|
1432
|
-
backgroundColor: themeStyles.colors.card,
|
|
1433
|
-
}
|
|
1434
|
-
], children: [(0, jsx_runtime_1.jsx)(AnimatedButton, { isSelected: viewMode === 'all', onPress: () => setViewMode('all'), icon: viewMode === 'all' ? 'folder' : 'folder-outline', primaryColor: themeStyles.primaryColor, textColor: themeStyles.textColor, style: styles_1.fileManagementStyles.viewModeButton }), (0, jsx_runtime_1.jsx)(AnimatedButton, { isSelected: viewMode === 'photos', onPress: () => setViewMode('photos'), icon: viewMode === 'photos' ? 'image-multiple' : 'image-multiple-outline', primaryColor: themeStyles.primaryColor, textColor: themeStyles.textColor, style: styles_1.fileManagementStyles.viewModeButton }), (0, jsx_runtime_1.jsx)(AnimatedButton, { isSelected: viewMode === 'videos', onPress: () => setViewMode('videos'), icon: viewMode === 'videos' ? 'video' : 'video-outline', primaryColor: themeStyles.primaryColor, textColor: themeStyles.textColor, style: styles_1.fileManagementStyles.viewModeButton }), (0, jsx_runtime_1.jsx)(AnimatedButton, { isSelected: viewMode === 'documents', onPress: () => setViewMode('documents'), icon: viewMode === 'documents' ? 'file-document' : 'file-document-outline', primaryColor: themeStyles.primaryColor, textColor: themeStyles.textColor, style: styles_1.fileManagementStyles.viewModeButton }), (0, jsx_runtime_1.jsx)(AnimatedButton, { isSelected: viewMode === 'audio', onPress: () => setViewMode('audio'), icon: viewMode === 'audio' ? 'music-note' : 'music-note-outline', primaryColor: themeStyles.primaryColor, textColor: themeStyles.textColor, style: styles_1.fileManagementStyles.viewModeButton })] }) }), (0, jsx_runtime_1.jsxs)(react_native_1.TouchableOpacity, { style: [styles_1.fileManagementStyles.sortButton, {
|
|
1435
|
-
backgroundColor: themeStyles.colors.card,
|
|
1436
|
-
}], onPress: () => {
|
|
1437
|
-
// Cycle through sort options: date -> size -> name -> type -> date
|
|
1438
|
-
const sortOrder = ['date', 'size', 'name', 'type'];
|
|
1439
|
-
const currentIndex = sortOrder.indexOf(sortBy);
|
|
1440
|
-
const nextIndex = (currentIndex + 1) % sortOrder.length;
|
|
1441
|
-
setSortBy(sortOrder[nextIndex]);
|
|
1442
|
-
// Toggle order when cycling back to date
|
|
1443
|
-
if (nextIndex === 0) {
|
|
1444
|
-
setSortOrder(prev => prev === 'asc' ? 'desc' : 'asc');
|
|
1445
|
-
}
|
|
1446
|
-
}, children: [(0, jsx_runtime_1.jsx)(vector_icons_2.MaterialCommunityIcons, { name: sortBy === 'date' ? 'calendar' :
|
|
1447
|
-
sortBy === 'size' ? 'sort-numeric-variant' :
|
|
1448
|
-
sortBy === 'name' ? 'sort-alphabetical-variant' : 'file-document-outline', size: 16, color: themeStyles.textColor }), (0, jsx_runtime_1.jsx)(vector_icons_2.MaterialCommunityIcons, { name: sortOrder === 'asc' ? 'arrow-up' : 'arrow-down', size: 14, color: themeStyles.colors.secondaryText })] }), user?.id === targetUserId && (!selectMode || (selectMode && allowUploadInSelectMode)) && ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [styles_1.fileManagementStyles.uploadButton, { backgroundColor: themeStyles.primaryColor }], onPress: handleFileUpload, disabled: uploading || isPickingDocument, children: uploading ? ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.uploadProgress, children: [(0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { size: "small", color: "#FFFFFF" }), uploadProgress && ((0, jsx_runtime_1.jsxs)(react_native_1.Text, { style: styles_1.fileManagementStyles.uploadProgressText, children: [uploadProgress.current, "/", uploadProgress.total] }))] })) : isPickingDocument ? ((0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { size: "small", color: "#FFFFFF" })) : ((0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "add", size: 22, color: "#FFFFFF" })) }))] }), files.length > 0 && (viewMode === 'all' || files.some(f => f.contentType.startsWith('image/'))) && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [
|
|
1449
|
-
styles_1.fileManagementStyles.searchContainer,
|
|
1450
|
-
{
|
|
1451
|
-
backgroundColor: themeStyles.colors.card,
|
|
1452
|
-
}
|
|
1453
|
-
], children: [(0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "search", size: 22, color: themeStyles.colors.icon }), (0, jsx_runtime_1.jsx)(react_native_1.TextInput, { style: [styles_1.fileManagementStyles.searchInput, { color: themeStyles.textColor }], placeholder: viewMode === 'photos' ? t('fileManagement.searchPhotos') : t('fileManagement.searchFiles'), placeholderTextColor: themeStyles.colors.secondaryText, value: searchQuery, onChangeText: setSearchQuery }), searchQuery.length > 0 && ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { onPress: () => setSearchQuery(''), style: styles_1.fileManagementStyles.searchClearButton, children: (0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "close-circle", size: 22, color: themeStyles.colors.icon }) }))] })), files.length > 0 && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [
|
|
1454
|
-
styles_1.fileManagementStyles.statsContainer,
|
|
1455
|
-
{
|
|
1456
|
-
backgroundColor: themeStyles.colors.card,
|
|
1457
|
-
}
|
|
1458
|
-
], children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.statItem, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.statValue, { color: themeStyles.textColor }], children: filteredFiles.length }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.statLabel, { color: themeStyles.colors.secondaryText }], children: searchQuery.length > 0 ? t('fileManagement.found') : (filteredFiles.length === 1 ? (viewMode === 'photos' ? t('fileManagement.photo') : t('fileManagement.file')) : (viewMode === 'photos' ? t('fileManagement.photos_stat') : t('fileManagement.files'))) })] }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.statItem, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.statValue, { color: themeStyles.textColor }], children: (0, fileManagement_1.formatFileSize)(filteredFiles.reduce((total, file) => total + file.length, 0)) }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.statLabel, { color: themeStyles.colors.secondaryText }], children: searchQuery.length > 0 ? t('fileManagement.size') : t('fileManagement.totalSize') })] }), searchQuery.length > 0 && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.statItem, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.statValue, { color: themeStyles.textColor }], children: files.length }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.statLabel, { color: themeStyles.colors.secondaryText }], children: t('fileManagement.total') })] }))] })), viewMode === 'photos' ? (renderPhotoGrid()) : ((0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { ref: scrollViewRef, style: styles_1.fileManagementStyles.scrollView, contentContainerStyle: styles_1.fileManagementStyles.scrollContainer, refreshControl: (0, jsx_runtime_1.jsx)(react_native_1.RefreshControl, { refreshing: refreshing, onRefresh: () => loadFiles('refresh'), tintColor: themeStyles.primaryColor }), onScroll: ({ nativeEvent }) => {
|
|
1459
|
-
const { layoutMeasurement, contentOffset, contentSize } = nativeEvent;
|
|
1460
|
-
const distanceFromBottom = contentSize.height - (contentOffset.y + layoutMeasurement.height);
|
|
1461
|
-
if (distanceFromBottom < 200 && !paging.loadingMore && paging.hasMore) {
|
|
1462
|
-
loadFiles('more');
|
|
1463
|
-
}
|
|
1464
|
-
}, scrollEventThrottle: 250, children: filteredFiles.length === 0 && searchQuery.length > 0 ? ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.emptyState, children: [(0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "search", size: 64, color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC' }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.emptyStateTitle, { color: themeStyles.textColor }], children: t('fileManagement.noResults.title') }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.emptyStateDescription, { color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666' }], children: t('fileManagement.noResults.description', { query: searchQuery }) }), (0, jsx_runtime_1.jsxs)(react_native_1.TouchableOpacity, { style: [styles_1.fileManagementStyles.emptyStateButton, { backgroundColor: themeStyles.primaryColor }], onPress: () => setSearchQuery(''), children: [(0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "refresh", size: 20, color: "#FFFFFF" }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles_1.fileManagementStyles.emptyStateButtonText, children: t('fileManagement.clearSearch') })] })] })) : filteredFiles.length === 0 ? renderEmptyState() : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.GroupedSection, { items: groupedFileItems }), paging.loadingMore && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.loadingMoreBar, children: [(0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { size: "small", color: themeStyles.primaryColor }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles_1.fileManagementStyles.loadingMoreText, { color: themeStyles.textColor }], children: t('fileManagement.loadingMore') })] }))] })) })), !selectMode && ((0, jsx_runtime_1.jsx)(FileDetailsModal_1.FileDetailsModal, { visible: showFileDetails, file: selectedFile, onClose: () => setShowFileDetails(false), onDownload: handleFileDownload, onDelete: handleFileDelete, themeStyles: themeStyles, isOwner: user?.id === targetUserId })), !selectMode && uploading && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles_1.fileManagementStyles.uploadBannerContainer, { pointerEvents: 'none' }], children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [styles_1.fileManagementStyles.uploadBanner, { backgroundColor: themeStyles.isDarkTheme ? '#222831EE' : '#FFFFFFEE', borderColor: themeStyles.borderColor }], children: [(0, jsx_runtime_1.jsx)(vector_icons_1.Ionicons, { name: "cloud-upload", size: 18, color: themeStyles.primaryColor }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles_1.fileManagementStyles.uploadBannerContent, children: [(0, jsx_runtime_1.jsxs)(react_native_1.Text, { style: [styles_1.fileManagementStyles.uploadBannerText, { color: themeStyles.textColor }], children: [t('fileManagement.uploading'), uploadProgress ? ` ${uploadProgress.current}/${uploadProgress.total}` : '...'] }), uploadProgress && uploadProgress.total > 0 && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [styles_1.fileManagementStyles.uploadProgressBarContainer, { backgroundColor: themeStyles.isDarkTheme ? 'rgba(255,255,255,0.1)' : 'rgba(0,0,0,0.1)' }], children: (0, jsx_runtime_1.jsx)(react_native_1.View, { style: [
|
|
1465
|
-
styles_1.fileManagementStyles.uploadProgressBar,
|
|
1466
|
-
{
|
|
1467
|
-
width: `${(uploadProgress.current / uploadProgress.total) * 100}%`,
|
|
1468
|
-
backgroundColor: themeStyles.primaryColor
|
|
1469
|
-
}
|
|
1470
|
-
] }) }))] }), (0, jsx_runtime_1.jsx)(react_native_1.ActivityIndicator, { size: "small", color: themeStyles.primaryColor })] }) }))] }));
|
|
1471
|
-
};
|
|
1472
|
-
// Styles have been moved to components/fileManagement/styles.ts
|
|
1473
|
-
exports.default = FileManagementScreen;
|