@oxyhq/services 19.0.0 → 19.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/assets/assets/icons/OxyServices.tsx +5 -12
- package/lib/commonjs/assets/icons/OxyServices.js +7 -7
- package/lib/commonjs/assets/icons/OxyServices.js.map +1 -1
- package/lib/commonjs/index.js +56 -25
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +121 -0
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -0
- package/lib/commonjs/ui/client.js +10 -17
- package/lib/commonjs/ui/client.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +28 -92
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +127 -241
- package/lib/commonjs/ui/components/Header.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialog.js +22 -18
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +1 -1
- package/lib/commonjs/ui/components/OxyConsentScreen.js +4 -6
- package/lib/commonjs/ui/components/OxyConsentScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyOAuthCallback.js +45 -0
- package/lib/commonjs/ui/components/OxyOAuthCallback.js.map +1 -0
- package/lib/commonjs/ui/components/OxyPayButton.js +20 -71
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +3 -3
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +30 -135
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +4 -2
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileSummaryCard.js +99 -0
- package/lib/commonjs/ui/components/ProfileSummaryCard.js.map +1 -0
- package/lib/commonjs/ui/components/RequireOxyAuth.js +7 -10
- package/lib/commonjs/ui/components/RequireOxyAuth.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +9 -9
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +20 -23
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +6 -6
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +14 -9
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +55 -55
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/paymentStyles.js +13 -13
- package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +129 -260
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/oxyContextHelpers.js +64 -0
- package/lib/commonjs/ui/context/oxyContextHelpers.js.map +1 -0
- package/lib/commonjs/ui/{components/TextField/Adornment/types.js → context/oxyContextTypes.js} +1 -1
- package/lib/commonjs/ui/context/oxyContextTypes.js.map +1 -0
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +91 -0
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -0
- package/lib/commonjs/ui/hooks/queryClient.js +9 -18
- package/lib/commonjs/ui/hooks/queryClient.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +7 -5
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +2 -0
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/index.js +10 -17
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/accountDialogManager.js +5 -44
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +9 -8
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +2 -3
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +8 -19
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +8 -8
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +0 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +59 -1105
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +9 -8
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +0 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +5 -4
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +9 -49
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +6 -9
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +247 -224
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +21 -20
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +4 -4
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +12 -11
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +3 -2
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +3 -3
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +7 -8
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileListSection.js +114 -0
- package/lib/commonjs/ui/screens/fileManagement/FileListSection.js.map +1 -0
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +512 -0
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -0
- package/lib/commonjs/ui/screens/fileManagement/UploadBar.js +59 -0
- package/lib/commonjs/ui/screens/fileManagement/UploadBar.js.map +1 -0
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +475 -0
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -0
- package/lib/commonjs/ui/screens/fileManagement/shared.js +67 -0
- package/lib/commonjs/ui/screens/fileManagement/shared.js.map +1 -0
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +3 -2
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +4 -7
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +3 -3
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +3 -2
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/server.js +4 -5
- package/lib/commonjs/ui/server.js.map +1 -1
- package/lib/commonjs/ui/session/createSessionClient.js +2 -2
- package/lib/commonjs/ui/utils/crossOriginRestore.js +109 -0
- package/lib/commonjs/ui/utils/crossOriginRestore.js.map +1 -0
- package/lib/commonjs/ui/utils/deviceCredential.js +23 -0
- package/lib/commonjs/ui/utils/deviceCredential.js.map +1 -0
- package/lib/commonjs/ui/utils/oauthReturn.js +82 -0
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -0
- package/lib/commonjs/ui/utils/storageHelpers.js +1 -2
- package/lib/commonjs/ui/utils/storageHelpers.js.map +1 -1
- package/lib/module/assets/assets/icons/OxyServices.tsx +5 -12
- package/lib/module/assets/icons/OxyServices.js +7 -7
- package/lib/module/assets/icons/OxyServices.js.map +1 -1
- package/lib/module/index.js +10 -9
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/boot/runProviderColdBoot.js +116 -0
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -0
- package/lib/module/ui/client.js +3 -4
- package/lib/module/ui/client.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +28 -92
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/Header.js +127 -241
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialog.js +22 -18
- package/lib/module/ui/components/OxyAccountDialog.js.map +1 -1
- package/lib/module/ui/components/OxyConsentScreen.js +4 -5
- package/lib/module/ui/components/OxyConsentScreen.js.map +1 -1
- package/lib/module/ui/components/OxyOAuthCallback.js +41 -0
- package/lib/module/ui/components/OxyOAuthCallback.js.map +1 -0
- package/lib/module/ui/components/OxyPayButton.js +21 -71
- package/lib/module/ui/components/OxyPayButton.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +3 -3
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +34 -139
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +5 -3
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/ProfileSummaryCard.js +95 -0
- package/lib/module/ui/components/ProfileSummaryCard.js.map +1 -0
- package/lib/module/ui/components/RequireOxyAuth.js +7 -9
- package/lib/module/ui/components/RequireOxyAuth.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +9 -9
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +20 -23
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +6 -6
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +14 -8
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +54 -54
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/paymentStyles.js +13 -13
- package/lib/module/ui/components/payment/paymentStyles.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +128 -259
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/oxyContextHelpers.js +57 -0
- package/lib/module/ui/context/oxyContextHelpers.js.map +1 -0
- package/lib/module/ui/context/oxyContextTypes.js +4 -0
- package/lib/module/ui/context/oxyContextTypes.js.map +1 -0
- package/lib/module/ui/context/useOxyAccountGraph.js +87 -0
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -0
- package/lib/module/ui/hooks/queryClient.js +8 -17
- package/lib/module/ui/hooks/queryClient.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +7 -5
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +2 -0
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/index.js +2 -3
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/accountDialogManager.js +4 -41
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +8 -7
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +2 -3
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +7 -18
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +8 -8
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +0 -1
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +53 -1098
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +9 -8
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +0 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +5 -4
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +11 -51
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +4 -7
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +247 -224
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +19 -18
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +3 -3
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +12 -11
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +3 -2
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +2 -2
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +6 -6
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileListSection.js +110 -0
- package/lib/module/ui/screens/fileManagement/FileListSection.js.map +1 -0
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +509 -0
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -0
- package/lib/module/ui/screens/fileManagement/UploadBar.js +55 -0
- package/lib/module/ui/screens/fileManagement/UploadBar.js.map +1 -0
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +471 -0
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -0
- package/lib/module/ui/screens/fileManagement/shared.js +58 -0
- package/lib/module/ui/screens/fileManagement/shared.js.map +1 -0
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +3 -2
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustFAQScreen.js +4 -7
- package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +2 -2
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js +3 -2
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/module/ui/server.js +2 -3
- package/lib/module/ui/server.js.map +1 -1
- package/lib/module/ui/session/createSessionClient.js +2 -2
- package/lib/module/ui/utils/crossOriginRestore.js +101 -0
- package/lib/module/ui/utils/crossOriginRestore.js.map +1 -0
- package/lib/module/ui/utils/deviceCredential.js +18 -0
- package/lib/module/ui/utils/deviceCredential.js.map +1 -0
- package/lib/module/ui/utils/oauthReturn.js +78 -0
- package/lib/module/ui/utils/oauthReturn.js.map +1 -0
- package/lib/module/ui/utils/storageHelpers.js +1 -2
- package/lib/module/ui/utils/storageHelpers.js.map +1 -1
- package/lib/typescript/commonjs/assets/icons/OxyServices.d.ts +0 -5
- package/lib/typescript/commonjs/assets/icons/OxyServices.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +11 -6
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +29 -0
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/client.d.ts +3 -4
- package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/Header.d.ts +16 -21
- package/lib/typescript/commonjs/ui/components/Header.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts +3 -7
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyOAuthCallback.d.ts +11 -0
- package/lib/typescript/commonjs/ui/components/OxyOAuthCallback.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts +0 -13
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileSummaryCard.d.ts +33 -0
- package/lib/typescript/commonjs/ui/components/ProfileSummaryCard.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts +6 -10
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +2 -185
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextHelpers.d.ts +7 -0
- package/lib/typescript/commonjs/ui/context/oxyContextHelpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +123 -0
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +26 -0
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts +2 -3
- package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +7 -5
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +2 -3
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +4 -34
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/FileListSection.d.ts +40 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/FileListSection.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts +38 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/UploadBar.d.ts +25 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/UploadBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +39 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/shared.d.ts +34 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/shared.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/server.d.ts +2 -3
- package/lib/typescript/commonjs/ui/server.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +2 -2
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +2 -18
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +24 -0
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/deviceCredential.d.ts +8 -0
- package/lib/typescript/commonjs/ui/utils/deviceCredential.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +25 -0
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/storageHelpers.d.ts +0 -11
- package/lib/typescript/commonjs/ui/utils/storageHelpers.d.ts.map +1 -1
- package/lib/typescript/module/assets/icons/OxyServices.d.ts +0 -5
- package/lib/typescript/module/assets/icons/OxyServices.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +11 -6
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +29 -0
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -0
- package/lib/typescript/module/ui/client.d.ts +3 -4
- package/lib/typescript/module/ui/client.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Header.d.ts +16 -21
- package/lib/typescript/module/ui/components/Header.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts +3 -7
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyOAuthCallback.d.ts +11 -0
- package/lib/typescript/module/ui/components/OxyOAuthCallback.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts +0 -13
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileSummaryCard.d.ts +33 -0
- package/lib/typescript/module/ui/components/ProfileSummaryCard.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/types.d.ts +6 -10
- package/lib/typescript/module/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts +2 -185
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextHelpers.d.ts +7 -0
- package/lib/typescript/module/ui/context/oxyContextHelpers.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +123 -0
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +26 -0
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queryClient.d.ts +2 -3
- package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +7 -5
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +2 -3
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +4 -34
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/FileListSection.d.ts +40 -0
- package/lib/typescript/module/ui/screens/fileManagement/FileListSection.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts +38 -0
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/fileManagement/UploadBar.d.ts +25 -0
- package/lib/typescript/module/ui/screens/fileManagement/UploadBar.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +39 -0
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/fileManagement/shared.d.ts +34 -0
- package/lib/typescript/module/ui/screens/fileManagement/shared.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/server.d.ts +2 -3
- package/lib/typescript/module/ui/server.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/createSessionClient.d.ts +2 -2
- package/lib/typescript/module/ui/types/navigation.d.ts +2 -18
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +24 -0
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/deviceCredential.d.ts +8 -0
- package/lib/typescript/module/ui/utils/deviceCredential.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts +25 -0
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/storageHelpers.d.ts +0 -11
- package/lib/typescript/module/ui/utils/storageHelpers.d.ts.map +1 -1
- package/package.json +30 -17
- package/src/assets/icons/OxyServices.tsx +5 -12
- package/src/index.ts +16 -10
- package/src/ui/boot/runProviderColdBoot.ts +150 -0
- package/src/ui/client.ts +3 -4
- package/src/ui/components/FollowButton.tsx +30 -95
- package/src/ui/components/Header.tsx +135 -405
- package/src/ui/components/OxyAccountDialog.tsx +18 -16
- package/src/ui/components/OxyConsentScreen.tsx +2 -2
- package/src/ui/components/OxyOAuthCallback.tsx +38 -0
- package/src/ui/components/OxyPayButton.tsx +11 -60
- package/src/ui/components/OxyProvider.tsx +3 -3
- package/src/ui/components/OxySignInButton.tsx +35 -134
- package/src/ui/components/ProfileButton.tsx +8 -3
- package/src/ui/components/ProfileSummaryCard.tsx +123 -0
- package/src/ui/components/RequireOxyAuth.tsx +3 -3
- package/src/ui/components/__tests__/OxyConsentScreen.test.tsx +1 -3
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +9 -9
- package/src/ui/components/fileManagement/FileViewer.tsx +20 -22
- package/src/ui/components/fileManagement/UploadPreview.tsx +6 -6
- package/src/ui/components/modals/DeleteAccountModal.tsx +7 -7
- package/src/ui/components/payment/PaymentDetailsStep.tsx +49 -39
- package/src/ui/components/payment/paymentStyles.ts +14 -14
- package/src/ui/components/payment/types.ts +6 -10
- package/src/ui/context/OxyContext.tsx +136 -470
- package/src/ui/context/oxyContextHelpers.ts +58 -0
- package/src/ui/context/oxyContextTypes.ts +124 -0
- package/src/ui/context/useOxyAccountGraph.ts +114 -0
- package/src/ui/hooks/queryClient.ts +9 -20
- package/src/ui/hooks/useAuth.ts +7 -5
- package/src/ui/hooks/useSessionManagement.ts +2 -0
- package/src/ui/index.ts +2 -3
- package/src/ui/navigation/accountDialogManager.ts +4 -40
- package/src/ui/screens/ConnectedAppsScreen.tsx +8 -11
- package/src/ui/screens/EditProfileFieldScreen.tsx +2 -3
- package/src/ui/screens/EditProfileScreen.tsx +8 -14
- package/src/ui/screens/FAQScreen.tsx +7 -8
- package/src/ui/screens/FeedbackScreen.tsx +0 -1
- package/src/ui/screens/FileManagementScreen.tsx +54 -1158
- package/src/ui/screens/HistoryViewScreen.tsx +4 -4
- package/src/ui/screens/LanguageSelectorScreen.tsx +0 -1
- package/src/ui/screens/LegalDocumentsScreen.tsx +4 -3
- package/src/ui/screens/ManageAccountScreen.tsx +14 -47
- package/src/ui/screens/PaymentGatewayScreen.tsx +3 -7
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +33 -31
- package/src/ui/screens/PrivacySettingsScreen.tsx +14 -16
- package/src/ui/screens/ProfileScreen.tsx +3 -3
- package/src/ui/screens/SavesCollectionsScreen.tsx +11 -12
- package/src/ui/screens/SearchSettingsScreen.tsx +2 -2
- package/src/ui/screens/UserListScreen.tsx +2 -2
- package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -7
- package/src/ui/screens/fileManagement/FileListSection.tsx +126 -0
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +611 -0
- package/src/ui/screens/fileManagement/UploadBar.tsx +48 -0
- package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +497 -0
- package/src/ui/screens/fileManagement/shared.ts +65 -0
- package/src/ui/screens/trust/TrustCenterScreen.tsx +2 -2
- package/src/ui/screens/trust/TrustFAQScreen.tsx +4 -10
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +2 -2
- package/src/ui/screens/trust/TrustRulesScreen.tsx +2 -2
- package/src/ui/server.ts +2 -3
- package/src/ui/session/createSessionClient.ts +2 -2
- package/src/ui/types/navigation.ts +2 -18
- package/src/ui/utils/crossOriginRestore.ts +129 -0
- package/src/ui/utils/deviceCredential.ts +17 -0
- package/src/ui/utils/oauthReturn.ts +101 -0
- package/src/ui/utils/storageHelpers.ts +0 -12
- package/lib/commonjs/ui/components/ActivityIndicator.js +0 -203
- package/lib/commonjs/ui/components/ActivityIndicator.js.map +0 -1
- package/lib/commonjs/ui/components/AutoHeightScrollView.js +0 -46
- package/lib/commonjs/ui/components/AutoHeightScrollView.js.map +0 -1
- package/lib/commonjs/ui/components/Avatar.js +0 -181
- package/lib/commonjs/ui/components/Avatar.js.map +0 -1
- package/lib/commonjs/ui/components/CrossFadeIcon.js +0 -106
- package/lib/commonjs/ui/components/CrossFadeIcon.js.map +0 -1
- package/lib/commonjs/ui/components/EmptyState.js +0 -41
- package/lib/commonjs/ui/components/EmptyState.js.map +0 -1
- package/lib/commonjs/ui/components/HelperText.js +0 -95
- package/lib/commonjs/ui/components/HelperText.js.map +0 -1
- package/lib/commonjs/ui/components/Icon.js +0 -112
- package/lib/commonjs/ui/components/Icon.js.map +0 -1
- package/lib/commonjs/ui/components/IconButton/IconButton.js +0 -153
- package/lib/commonjs/ui/components/IconButton/IconButton.js.map +0 -1
- package/lib/commonjs/ui/components/IconButton/utils.js +0 -155
- package/lib/commonjs/ui/components/IconButton/utils.js.map +0 -1
- package/lib/commonjs/ui/components/LoadingState.js +0 -47
- package/lib/commonjs/ui/components/LoadingState.js.map +0 -1
- package/lib/commonjs/ui/components/OxyLogo.js +0 -110
- package/lib/commonjs/ui/components/OxyLogo.js.map +0 -1
- package/lib/commonjs/ui/components/ProfileCard.js +0 -134
- package/lib/commonjs/ui/components/ProfileCard.js.map +0 -1
- package/lib/commonjs/ui/components/QuickActions.js +0 -84
- package/lib/commonjs/ui/components/QuickActions.js.map +0 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js +0 -423
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +0 -1
- package/lib/commonjs/ui/components/Surface.js +0 -258
- package/lib/commonjs/ui/components/Surface.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/Addons/Outline.js +0 -46
- package/lib/commonjs/ui/components/TextField/Addons/Outline.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/Addons/Underline.js +0 -53
- package/lib/commonjs/ui/components/TextField/Addons/Underline.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.js +0 -153
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAffix.js +0 -144
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAffix.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldIcon.js +0 -137
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldIcon.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/Adornment/enums.js +0 -22
- package/lib/commonjs/ui/components/TextField/Adornment/enums.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/Adornment/types.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/Adornment/utils.js +0 -62
- package/lib/commonjs/ui/components/TextField/Adornment/utils.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/Label/InputLabel.js +0 -176
- package/lib/commonjs/ui/components/TextField/Label/InputLabel.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/Label/LabelBackground.js +0 -84
- package/lib/commonjs/ui/components/TextField/Label/LabelBackground.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/TextFieldFlat.js +0 -381
- package/lib/commonjs/ui/components/TextField/TextFieldFlat.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/TextFieldOutlined.js +0 -365
- package/lib/commonjs/ui/components/TextField/TextFieldOutlined.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/constants.js +0 -50
- package/lib/commonjs/ui/components/TextField/constants.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/helpers.js +0 -489
- package/lib/commonjs/ui/components/TextField/helpers.js.map +0 -1
- package/lib/commonjs/ui/components/TextField/types.js +0 -6
- package/lib/commonjs/ui/components/TextField/types.js.map +0 -1
- package/lib/commonjs/ui/components/TextField.js +0 -335
- package/lib/commonjs/ui/components/TextField.js.map +0 -1
- package/lib/commonjs/ui/components/TouchableRipple/Pressable.js +0 -12
- package/lib/commonjs/ui/components/TouchableRipple/Pressable.js.map +0 -1
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.js +0 -258
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.js.map +0 -1
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js +0 -107
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js.map +0 -1
- package/lib/commonjs/ui/components/TouchableRipple/utils.js +0 -56
- package/lib/commonjs/ui/components/TouchableRipple/utils.js.map +0 -1
- package/lib/commonjs/ui/components/Typography/AnimatedText.js +0 -59
- package/lib/commonjs/ui/components/Typography/AnimatedText.js.map +0 -1
- package/lib/commonjs/ui/components/Typography/types.js +0 -26
- package/lib/commonjs/ui/components/Typography/types.js.map +0 -1
- package/lib/commonjs/ui/components/feedback/ProgressIndicator.js +0 -33
- package/lib/commonjs/ui/components/feedback/ProgressIndicator.js.map +0 -1
- package/lib/commonjs/ui/components/icon/OxyIcon.js +0 -26
- package/lib/commonjs/ui/components/icon/OxyIcon.js.map +0 -1
- package/lib/commonjs/ui/components/theming.js +0 -128
- package/lib/commonjs/ui/components/theming.js.map +0 -1
- package/lib/commonjs/ui/components/types.js +0 -6
- package/lib/commonjs/ui/components/types.js.map +0 -1
- package/lib/commonjs/ui/components/utils/forwardRef.js +0 -18
- package/lib/commonjs/ui/components/utils/forwardRef.js.map +0 -1
- package/lib/commonjs/ui/constants/iconColors.js +0 -84
- package/lib/commonjs/ui/constants/iconColors.js.map +0 -1
- package/lib/commonjs/ui/constants/theme.js +0 -124
- package/lib/commonjs/ui/constants/theme.js.map +0 -1
- package/lib/commonjs/ui/context/ThemeContext.js +0 -36
- package/lib/commonjs/ui/context/ThemeContext.js.map +0 -1
- package/lib/commonjs/ui/hooks/useColorScheme.js +0 -29
- package/lib/commonjs/ui/hooks/useColorScheme.js.map +0 -1
- package/lib/commonjs/ui/styles/authStyles.js +0 -334
- package/lib/commonjs/ui/styles/authStyles.js.map +0 -1
- package/lib/commonjs/ui/styles/theme.js +0 -153
- package/lib/commonjs/ui/styles/theme.js.map +0 -1
- package/lib/module/ui/components/ActivityIndicator.js +0 -198
- package/lib/module/ui/components/ActivityIndicator.js.map +0 -1
- package/lib/module/ui/components/AutoHeightScrollView.js +0 -41
- package/lib/module/ui/components/AutoHeightScrollView.js.map +0 -1
- package/lib/module/ui/components/Avatar.js +0 -177
- package/lib/module/ui/components/Avatar.js.map +0 -1
- package/lib/module/ui/components/CrossFadeIcon.js +0 -101
- package/lib/module/ui/components/CrossFadeIcon.js.map +0 -1
- package/lib/module/ui/components/EmptyState.js +0 -36
- package/lib/module/ui/components/EmptyState.js.map +0 -1
- package/lib/module/ui/components/HelperText.js +0 -90
- package/lib/module/ui/components/HelperText.js.map +0 -1
- package/lib/module/ui/components/Icon.js +0 -106
- package/lib/module/ui/components/Icon.js.map +0 -1
- package/lib/module/ui/components/IconButton/IconButton.js +0 -148
- package/lib/module/ui/components/IconButton/IconButton.js.map +0 -1
- package/lib/module/ui/components/IconButton/utils.js +0 -149
- package/lib/module/ui/components/IconButton/utils.js.map +0 -1
- package/lib/module/ui/components/LoadingState.js +0 -42
- package/lib/module/ui/components/LoadingState.js.map +0 -1
- package/lib/module/ui/components/OxyLogo.js +0 -104
- package/lib/module/ui/components/OxyLogo.js.map +0 -1
- package/lib/module/ui/components/ProfileCard.js +0 -129
- package/lib/module/ui/components/ProfileCard.js.map +0 -1
- package/lib/module/ui/components/QuickActions.js +0 -80
- package/lib/module/ui/components/QuickActions.js.map +0 -1
- package/lib/module/ui/components/StepBasedScreen.js +0 -418
- package/lib/module/ui/components/StepBasedScreen.js.map +0 -1
- package/lib/module/ui/components/Surface.js +0 -252
- package/lib/module/ui/components/Surface.js.map +0 -1
- package/lib/module/ui/components/TextField/Addons/Outline.js +0 -40
- package/lib/module/ui/components/TextField/Addons/Outline.js.map +0 -1
- package/lib/module/ui/components/TextField/Addons/Underline.js +0 -47
- package/lib/module/ui/components/TextField/Addons/Underline.js.map +0 -1
- package/lib/module/ui/components/TextField/Adornment/TextFieldAdornment.js +0 -146
- package/lib/module/ui/components/TextField/Adornment/TextFieldAdornment.js.map +0 -1
- package/lib/module/ui/components/TextField/Adornment/TextFieldAffix.js +0 -141
- package/lib/module/ui/components/TextField/Adornment/TextFieldAffix.js.map +0 -1
- package/lib/module/ui/components/TextField/Adornment/TextFieldIcon.js +0 -135
- package/lib/module/ui/components/TextField/Adornment/TextFieldIcon.js.map +0 -1
- package/lib/module/ui/components/TextField/Adornment/enums.js +0 -18
- package/lib/module/ui/components/TextField/Adornment/enums.js.map +0 -1
- package/lib/module/ui/components/TextField/Adornment/types.js +0 -4
- package/lib/module/ui/components/TextField/Adornment/types.js.map +0 -1
- package/lib/module/ui/components/TextField/Adornment/utils.js +0 -57
- package/lib/module/ui/components/TextField/Adornment/utils.js.map +0 -1
- package/lib/module/ui/components/TextField/Label/InputLabel.js +0 -171
- package/lib/module/ui/components/TextField/Label/InputLabel.js.map +0 -1
- package/lib/module/ui/components/TextField/Label/LabelBackground.js +0 -78
- package/lib/module/ui/components/TextField/Label/LabelBackground.js.map +0 -1
- package/lib/module/ui/components/TextField/TextFieldFlat.js +0 -376
- package/lib/module/ui/components/TextField/TextFieldFlat.js.map +0 -1
- package/lib/module/ui/components/TextField/TextFieldOutlined.js +0 -359
- package/lib/module/ui/components/TextField/TextFieldOutlined.js.map +0 -1
- package/lib/module/ui/components/TextField/constants.js +0 -46
- package/lib/module/ui/components/TextField/constants.js.map +0 -1
- package/lib/module/ui/components/TextField/helpers.js +0 -471
- package/lib/module/ui/components/TextField/helpers.js.map +0 -1
- package/lib/module/ui/components/TextField/types.js +0 -4
- package/lib/module/ui/components/TextField/types.js.map +0 -1
- package/lib/module/ui/components/TextField.js +0 -329
- package/lib/module/ui/components/TextField.js.map +0 -1
- package/lib/module/ui/components/TouchableRipple/Pressable.js +0 -9
- package/lib/module/ui/components/TouchableRipple/Pressable.js.map +0 -1
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.js +0 -253
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.js.map +0 -1
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js +0 -101
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js.map +0 -1
- package/lib/module/ui/components/TouchableRipple/utils.js +0 -50
- package/lib/module/ui/components/TouchableRipple/utils.js.map +0 -1
- package/lib/module/ui/components/Typography/AnimatedText.js +0 -54
- package/lib/module/ui/components/Typography/AnimatedText.js.map +0 -1
- package/lib/module/ui/components/Typography/types.js +0 -22
- package/lib/module/ui/components/Typography/types.js.map +0 -1
- package/lib/module/ui/components/feedback/ProgressIndicator.js +0 -28
- package/lib/module/ui/components/feedback/ProgressIndicator.js.map +0 -1
- package/lib/module/ui/components/icon/OxyIcon.js +0 -22
- package/lib/module/ui/components/icon/OxyIcon.js.map +0 -1
- package/lib/module/ui/components/theming.js +0 -123
- package/lib/module/ui/components/theming.js.map +0 -1
- package/lib/module/ui/components/types.js +0 -4
- package/lib/module/ui/components/types.js.map +0 -1
- package/lib/module/ui/components/utils/forwardRef.js +0 -13
- package/lib/module/ui/components/utils/forwardRef.js.map +0 -1
- package/lib/module/ui/constants/iconColors.js +0 -78
- package/lib/module/ui/constants/iconColors.js.map +0 -1
- package/lib/module/ui/constants/theme.js +0 -120
- package/lib/module/ui/constants/theme.js.map +0 -1
- package/lib/module/ui/context/ThemeContext.js +0 -29
- package/lib/module/ui/context/ThemeContext.js.map +0 -1
- package/lib/module/ui/hooks/useColorScheme.js +0 -26
- package/lib/module/ui/hooks/useColorScheme.js.map +0 -1
- package/lib/module/ui/styles/authStyles.js +0 -329
- package/lib/module/ui/styles/authStyles.js.map +0 -1
- package/lib/module/ui/styles/theme.js +0 -147
- package/lib/module/ui/styles/theme.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts +0 -45
- package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/AutoHeightScrollView.d.ts +0 -23
- package/lib/typescript/commonjs/ui/components/AutoHeightScrollView.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Avatar.d.ts +0 -61
- package/lib/typescript/commonjs/ui/components/Avatar.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts +0 -28
- package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/EmptyState.d.ts +0 -8
- package/lib/typescript/commonjs/ui/components/EmptyState.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/HelperText.d.ts +0 -47
- package/lib/typescript/commonjs/ui/components/HelperText.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Icon.d.ts +0 -61
- package/lib/typescript/commonjs/ui/components/Icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/IconButton/IconButton.d.ts +0 -99
- package/lib/typescript/commonjs/ui/components/IconButton/IconButton.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/IconButton/utils.d.ts +0 -19
- package/lib/typescript/commonjs/ui/components/IconButton/utils.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/LoadingState.d.ts +0 -9
- package/lib/typescript/commonjs/ui/components/LoadingState.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/OxyLogo.d.ts +0 -16
- package/lib/typescript/commonjs/ui/components/OxyLogo.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ProfileCard.d.ts +0 -21
- package/lib/typescript/commonjs/ui/components/ProfileCard.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/QuickActions.d.ts +0 -15
- package/lib/typescript/commonjs/ui/components/QuickActions.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/StepBasedScreen.d.ts +0 -28
- package/lib/typescript/commonjs/ui/components/StepBasedScreen.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Surface.d.ts +0 -76
- package/lib/typescript/commonjs/ui/components/Surface.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts +0 -17
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts +0 -20
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +0 -45
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldAffix.d.ts +0 -73
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldAffix.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldIcon.d.ts +0 -78
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/enums.d.ts +0 -13
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/enums.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/types.d.ts +0 -12
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/utils.d.ts +0 -12
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/utils.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/Label/InputLabel.d.ts +0 -5
- package/lib/typescript/commonjs/ui/components/TextField/Label/InputLabel.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/Label/LabelBackground.d.ts +0 -5
- package/lib/typescript/commonjs/ui/components/TextField/Label/LabelBackground.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/TextFieldFlat.d.ts +0 -5
- package/lib/typescript/commonjs/ui/components/TextField/TextFieldFlat.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/TextFieldOutlined.d.ts +0 -5
- package/lib/typescript/commonjs/ui/components/TextField/TextFieldOutlined.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/constants.d.ts +0 -32
- package/lib/typescript/commonjs/ui/components/TextField/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/helpers.d.ts +0 -97
- package/lib/typescript/commonjs/ui/components/TextField/helpers.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/types.d.ts +0 -155
- package/lib/typescript/commonjs/ui/components/TextField/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TextField.d.ts +0 -192
- package/lib/typescript/commonjs/ui/components/TextField.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TouchableRipple/Pressable.d.ts +0 -13
- package/lib/typescript/commonjs/ui/components/TouchableRipple/Pressable.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.d.ts +0 -62
- package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.native.d.ts +0 -25
- package/lib/typescript/commonjs/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TouchableRipple/utils.d.ts +0 -11
- package/lib/typescript/commonjs/ui/components/TouchableRipple/utils.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Typography/AnimatedText.d.ts +0 -35
- package/lib/typescript/commonjs/ui/components/Typography/AnimatedText.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Typography/types.d.ts +0 -19
- package/lib/typescript/commonjs/ui/components/Typography/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/feedback/ProgressIndicator.d.ts +0 -11
- package/lib/typescript/commonjs/ui/components/feedback/ProgressIndicator.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/icon/OxyIcon.d.ts +0 -10
- package/lib/typescript/commonjs/ui/components/icon/OxyIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/theming.d.ts +0 -8
- package/lib/typescript/commonjs/ui/components/theming.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/types.d.ts +0 -81
- package/lib/typescript/commonjs/ui/components/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/utils/forwardRef.d.ts +0 -12
- package/lib/typescript/commonjs/ui/components/utils/forwardRef.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/constants/iconColors.d.ts +0 -130
- package/lib/typescript/commonjs/ui/constants/iconColors.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/constants/theme.d.ts +0 -98
- package/lib/typescript/commonjs/ui/constants/theme.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts +0 -19
- package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/useColorScheme.d.ts +0 -8
- package/lib/typescript/commonjs/ui/hooks/useColorScheme.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/styles/authStyles.d.ts +0 -328
- package/lib/typescript/commonjs/ui/styles/authStyles.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/styles/theme.d.ts +0 -75
- package/lib/typescript/commonjs/ui/styles/theme.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ActivityIndicator.d.ts +0 -45
- package/lib/typescript/module/ui/components/ActivityIndicator.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/AutoHeightScrollView.d.ts +0 -23
- package/lib/typescript/module/ui/components/AutoHeightScrollView.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Avatar.d.ts +0 -61
- package/lib/typescript/module/ui/components/Avatar.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts +0 -28
- package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/EmptyState.d.ts +0 -8
- package/lib/typescript/module/ui/components/EmptyState.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/HelperText.d.ts +0 -47
- package/lib/typescript/module/ui/components/HelperText.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Icon.d.ts +0 -61
- package/lib/typescript/module/ui/components/Icon.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts +0 -99
- package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/IconButton/utils.d.ts +0 -19
- package/lib/typescript/module/ui/components/IconButton/utils.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/LoadingState.d.ts +0 -9
- package/lib/typescript/module/ui/components/LoadingState.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/OxyLogo.d.ts +0 -16
- package/lib/typescript/module/ui/components/OxyLogo.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ProfileCard.d.ts +0 -21
- package/lib/typescript/module/ui/components/ProfileCard.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/QuickActions.d.ts +0 -15
- package/lib/typescript/module/ui/components/QuickActions.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/StepBasedScreen.d.ts +0 -28
- package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Surface.d.ts +0 -76
- package/lib/typescript/module/ui/components/Surface.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts +0 -17
- package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts +0 -20
- package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +0 -45
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts +0 -73
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts +0 -78
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/enums.d.ts +0 -13
- package/lib/typescript/module/ui/components/TextField/Adornment/enums.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts +0 -12
- package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/utils.d.ts +0 -12
- package/lib/typescript/module/ui/components/TextField/Adornment/utils.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/Label/InputLabel.d.ts +0 -5
- package/lib/typescript/module/ui/components/TextField/Label/InputLabel.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/Label/LabelBackground.d.ts +0 -5
- package/lib/typescript/module/ui/components/TextField/Label/LabelBackground.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/TextFieldFlat.d.ts +0 -5
- package/lib/typescript/module/ui/components/TextField/TextFieldFlat.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/TextFieldOutlined.d.ts +0 -5
- package/lib/typescript/module/ui/components/TextField/TextFieldOutlined.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/constants.d.ts +0 -32
- package/lib/typescript/module/ui/components/TextField/constants.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/helpers.d.ts +0 -97
- package/lib/typescript/module/ui/components/TextField/helpers.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField/types.d.ts +0 -155
- package/lib/typescript/module/ui/components/TextField/types.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TextField.d.ts +0 -192
- package/lib/typescript/module/ui/components/TextField.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TouchableRipple/Pressable.d.ts +0 -13
- package/lib/typescript/module/ui/components/TouchableRipple/Pressable.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts +0 -62
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts +0 -25
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TouchableRipple/utils.d.ts +0 -11
- package/lib/typescript/module/ui/components/TouchableRipple/utils.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts +0 -35
- package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Typography/types.d.ts +0 -19
- package/lib/typescript/module/ui/components/Typography/types.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/feedback/ProgressIndicator.d.ts +0 -11
- package/lib/typescript/module/ui/components/feedback/ProgressIndicator.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/icon/OxyIcon.d.ts +0 -10
- package/lib/typescript/module/ui/components/icon/OxyIcon.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/theming.d.ts +0 -8
- package/lib/typescript/module/ui/components/theming.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/types.d.ts +0 -81
- package/lib/typescript/module/ui/components/types.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/utils/forwardRef.d.ts +0 -12
- package/lib/typescript/module/ui/components/utils/forwardRef.d.ts.map +0 -1
- package/lib/typescript/module/ui/constants/iconColors.d.ts +0 -130
- package/lib/typescript/module/ui/constants/iconColors.d.ts.map +0 -1
- package/lib/typescript/module/ui/constants/theme.d.ts +0 -98
- package/lib/typescript/module/ui/constants/theme.d.ts.map +0 -1
- package/lib/typescript/module/ui/context/ThemeContext.d.ts +0 -19
- package/lib/typescript/module/ui/context/ThemeContext.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/useColorScheme.d.ts +0 -8
- package/lib/typescript/module/ui/hooks/useColorScheme.d.ts.map +0 -1
- package/lib/typescript/module/ui/styles/authStyles.d.ts +0 -328
- package/lib/typescript/module/ui/styles/authStyles.d.ts.map +0 -1
- package/lib/typescript/module/ui/styles/theme.d.ts +0 -75
- package/lib/typescript/module/ui/styles/theme.d.ts.map +0 -1
- package/src/ui/components/ActivityIndicator.tsx +0 -254
- package/src/ui/components/AutoHeightScrollView.tsx +0 -50
- package/src/ui/components/Avatar.tsx +0 -284
- package/src/ui/components/CrossFadeIcon.tsx +0 -140
- package/src/ui/components/EmptyState.tsx +0 -39
- package/src/ui/components/HelperText.tsx +0 -149
- package/src/ui/components/Icon.tsx +0 -189
- package/src/ui/components/IconButton/IconButton.tsx +0 -232
- package/src/ui/components/IconButton/utils.ts +0 -190
- package/src/ui/components/LoadingState.tsx +0 -46
- package/src/ui/components/OxyLogo.tsx +0 -82
- package/src/ui/components/ProfileCard.tsx +0 -137
- package/src/ui/components/QuickActions.tsx +0 -91
- package/src/ui/components/StepBasedScreen.tsx +0 -499
- package/src/ui/components/Surface.tsx +0 -384
- package/src/ui/components/TextField/Addons/Outline.tsx +0 -64
- package/src/ui/components/TextField/Addons/Underline.tsx +0 -78
- package/src/ui/components/TextField/Adornment/TextFieldAdornment.tsx +0 -205
- package/src/ui/components/TextField/Adornment/TextFieldAffix.tsx +0 -212
- package/src/ui/components/TextField/Adornment/TextFieldIcon.tsx +0 -195
- package/src/ui/components/TextField/Adornment/enums.tsx +0 -12
- package/src/ui/components/TextField/Adornment/types.tsx +0 -11
- package/src/ui/components/TextField/Adornment/utils.ts +0 -66
- package/src/ui/components/TextField/Label/InputLabel.tsx +0 -219
- package/src/ui/components/TextField/Label/LabelBackground.tsx +0 -100
- package/src/ui/components/TextField/TextFieldFlat.tsx +0 -488
- package/src/ui/components/TextField/TextFieldOutlined.tsx +0 -464
- package/src/ui/components/TextField/constants.tsx +0 -48
- package/src/ui/components/TextField/helpers.tsx +0 -611
- package/src/ui/components/TextField/types.tsx +0 -160
- package/src/ui/components/TextField.tsx +0 -574
- package/src/ui/components/TouchableRipple/Pressable.tsx +0 -42
- package/src/ui/components/TouchableRipple/TouchableRipple.native.tsx +0 -146
- package/src/ui/components/TouchableRipple/TouchableRipple.tsx +0 -347
- package/src/ui/components/TouchableRipple/utils.ts +0 -66
- package/src/ui/components/Typography/AnimatedText.tsx +0 -106
- package/src/ui/components/Typography/types.tsx +0 -22
- package/src/ui/components/feedback/ProgressIndicator.tsx +0 -35
- package/src/ui/components/icon/OxyIcon.tsx +0 -31
- package/src/ui/components/theming.tsx +0 -126
- package/src/ui/components/types.tsx +0 -93
- package/src/ui/components/utils/forwardRef.tsx +0 -23
- package/src/ui/constants/iconColors.ts +0 -88
- package/src/ui/constants/theme.ts +0 -121
- package/src/ui/context/ThemeContext.tsx +0 -41
- package/src/ui/context/__tests__/OxyContext.coldBoot.test.tsx +0 -166
- package/src/ui/hooks/useColorScheme.ts +0 -24
- package/src/ui/styles/authStyles.ts +0 -348
- package/src/ui/styles/theme.ts +0 -169
|
@@ -7,14 +7,11 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _expoImage = require("expo-image");
|
|
10
|
-
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
11
10
|
var _bloom = require("@oxyhq/bloom");
|
|
12
11
|
var _vectorIcons = require("@expo/vector-icons");
|
|
13
|
-
var _core = require("@oxyhq/core");
|
|
14
12
|
var _fileStore = require("../stores/fileStore.js");
|
|
15
13
|
var _Header = _interopRequireDefault(require("../components/Header.js"));
|
|
16
14
|
var _JustifiedPhotoGrid = _interopRequireDefault(require("../components/photogrid/JustifiedPhotoGrid.js"));
|
|
17
|
-
var _settingsList = require("@oxyhq/bloom/settings-list");
|
|
18
15
|
var _theme = require("@oxyhq/bloom/theme");
|
|
19
16
|
var _OxyContext = require("../context/OxyContext.js");
|
|
20
17
|
var _useI18n = require("../hooks/useI18n.js");
|
|
@@ -24,112 +21,14 @@ var _FileViewer = require("../components/fileManagement/FileViewer.js");
|
|
|
24
21
|
var _FileDetailsModal = require("../components/fileManagement/FileDetailsModal.js");
|
|
25
22
|
var _UploadPreview = require("../components/fileManagement/UploadPreview.js");
|
|
26
23
|
var _styles = require("../components/fileManagement/styles.js");
|
|
24
|
+
var _shared = require("./fileManagement/shared.js");
|
|
25
|
+
var _useFileUploadState = require("./fileManagement/hooks/useFileUploadState.js");
|
|
26
|
+
var _PhotoPickerSection = _interopRequireDefault(require("./fileManagement/PhotoPickerSection.js"));
|
|
27
|
+
var _FileListSection = _interopRequireDefault(require("./fileManagement/FileListSection.js"));
|
|
28
|
+
var _UploadBar = _interopRequireDefault(require("./fileManagement/UploadBar.js"));
|
|
27
29
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
28
30
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
29
31
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
30
|
-
// Lazy load expo-document-picker (optional dependency)
|
|
31
|
-
// This allows the screen to work even if expo-document-picker is not installed
|
|
32
|
-
let DocumentPicker = null;
|
|
33
|
-
const loadDocumentPicker = async () => {
|
|
34
|
-
if (DocumentPicker) return DocumentPicker;
|
|
35
|
-
try {
|
|
36
|
-
DocumentPicker = await Promise.resolve().then(() => _interopRequireWildcard(require('expo-document-picker')));
|
|
37
|
-
return DocumentPicker;
|
|
38
|
-
} catch (error) {
|
|
39
|
-
throw new Error('expo-document-picker is not installed. Please install it: npx expo install expo-document-picker');
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Extract error message from unknown error type.
|
|
44
|
-
* Delegates to the canonical `getErrorMessage` in `@oxyhq/core` and returns
|
|
45
|
-
* `undefined` for empty results (so callers can fall back to a translated
|
|
46
|
-
* message via `||`).
|
|
47
|
-
*/
|
|
48
|
-
const getErrorMessage = error => {
|
|
49
|
-
if (error == null) return undefined;
|
|
50
|
-
const message = (0, _core.getErrorMessage)(error, '');
|
|
51
|
-
return message ? message : undefined;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* A picker-produced file ready to upload. On web this is a real `File`
|
|
56
|
-
* (carrying an optional `uri` for preview). On native, it's an
|
|
57
|
-
* {@link RNFileDescriptor} — passed straight to FormData by `assetUpload`.
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
/** Returns the display name for either a web File or an RN descriptor. */
|
|
61
|
-
const candidateName = (candidate, fallback) => candidate.name && typeof candidate.name === 'string' ? candidate.name : fallback;
|
|
62
|
-
|
|
63
|
-
/** Returns the byte size for either a web File or an RN descriptor (0 if unknown). */
|
|
64
|
-
const candidateSize = candidate => {
|
|
65
|
-
const size = candidate.size;
|
|
66
|
-
return typeof size === 'number' && Number.isFinite(size) ? size : 0;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
/** Returns the mime type for either a web File or an RN descriptor. */
|
|
70
|
-
const candidateType = candidate => {
|
|
71
|
-
const value = candidate.type;
|
|
72
|
-
return typeof value === 'string' && value.length > 0 ? value : 'application/octet-stream';
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/** Returns the preview URI for an upload candidate, if available. */
|
|
76
|
-
const candidateUri = candidate => {
|
|
77
|
-
const uri = candidate.uri;
|
|
78
|
-
return typeof uri === 'string' && uri.length > 0 ? uri : undefined;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Haptic feedback wrapper. `expo-haptics` is an optional dependency — when not
|
|
83
|
-
* installed (or on web), all calls degrade silently. We resolve the module
|
|
84
|
-
* once and cache the promise so subsequent calls don't repeat the dynamic
|
|
85
|
-
* import. Matches the pattern used by AvatarCropScreen.
|
|
86
|
-
*/
|
|
87
|
-
|
|
88
|
-
let hapticsModulePromise = null;
|
|
89
|
-
const getHaptics = () => {
|
|
90
|
-
if (_reactNative.Platform.OS === 'web') return Promise.resolve(null);
|
|
91
|
-
if (hapticsModulePromise) return hapticsModulePromise;
|
|
92
|
-
hapticsModulePromise = (async () => {
|
|
93
|
-
try {
|
|
94
|
-
const mod = await Promise.resolve().then(() => _interopRequireWildcard(require('expo-haptics')));
|
|
95
|
-
if (!mod || typeof mod.impactAsync !== 'function') return null;
|
|
96
|
-
return mod;
|
|
97
|
-
} catch {
|
|
98
|
-
return null;
|
|
99
|
-
}
|
|
100
|
-
})();
|
|
101
|
-
return hapticsModulePromise;
|
|
102
|
-
};
|
|
103
|
-
const hapticImpact = async style => {
|
|
104
|
-
const h = await getHaptics();
|
|
105
|
-
if (!h) return;
|
|
106
|
-
const styleEnum = style === 'heavy' ? h.ImpactFeedbackStyle.Heavy : style === 'medium' ? h.ImpactFeedbackStyle.Medium : h.ImpactFeedbackStyle.Light;
|
|
107
|
-
try {
|
|
108
|
-
await h.impactAsync(styleEnum);
|
|
109
|
-
} catch {
|
|
110
|
-
// Silent — haptics are non-critical UX polish.
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
const hapticSelection = async () => {
|
|
114
|
-
const h = await getHaptics();
|
|
115
|
-
if (!h) return;
|
|
116
|
-
try {
|
|
117
|
-
await h.selectionAsync();
|
|
118
|
-
} catch {
|
|
119
|
-
// Silent.
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
const hapticNotification = async type => {
|
|
123
|
-
const h = await getHaptics();
|
|
124
|
-
if (!h) return;
|
|
125
|
-
const typeEnum = type === 'error' ? h.NotificationFeedbackType.Error : type === 'warning' ? h.NotificationFeedbackType.Warning : h.NotificationFeedbackType.Success;
|
|
126
|
-
try {
|
|
127
|
-
await h.notificationAsync(typeEnum);
|
|
128
|
-
} catch {
|
|
129
|
-
// Silent.
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
|
|
133
32
|
// Animated button component for smooth transitions
|
|
134
33
|
const AnimatedButton = ({
|
|
135
34
|
isSelected,
|
|
@@ -175,453 +74,6 @@ const AnimatedButton = ({
|
|
|
175
74
|
})
|
|
176
75
|
});
|
|
177
76
|
};
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Props for the dedicated photo picker view. Used by FileManagementScreen
|
|
181
|
-
* only when `selectMode + image-only` is active. All callbacks are wired by
|
|
182
|
-
* the parent — this component is purely presentational.
|
|
183
|
-
*/
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* A single photo cell. Memoized so re-renders during selection only touch
|
|
187
|
-
* affected cells — selection of one photo must not redraw the whole grid.
|
|
188
|
-
*
|
|
189
|
-
* Apple Photos pattern: when any cell is selected, *non-selected* siblings
|
|
190
|
-
* fade to 0.6 opacity to focus attention on the active selection.
|
|
191
|
-
*/
|
|
192
|
-
const PhotoPickerCell = /*#__PURE__*/_react.default.memo(function PhotoPickerCell(props) {
|
|
193
|
-
const {
|
|
194
|
-
photo,
|
|
195
|
-
size,
|
|
196
|
-
marginRight,
|
|
197
|
-
marginBottom,
|
|
198
|
-
isSelected,
|
|
199
|
-
selectionIndex,
|
|
200
|
-
dim,
|
|
201
|
-
primaryColor,
|
|
202
|
-
thumbUrl,
|
|
203
|
-
enterIndex,
|
|
204
|
-
reduceMotion,
|
|
205
|
-
onPress,
|
|
206
|
-
onLongPress,
|
|
207
|
-
a11yLabel
|
|
208
|
-
} = props;
|
|
209
|
-
|
|
210
|
-
// Cap the cumulative stagger at ~800ms total so the very long grid does
|
|
211
|
-
// not keep fading in late tiles. Beyond ~53 tiles the delay maxes out.
|
|
212
|
-
const STAGGER_PER_CELL_MS = 15;
|
|
213
|
-
const MAX_TOTAL_STAGGER_MS = 800;
|
|
214
|
-
const delay = Math.min(enterIndex * STAGGER_PER_CELL_MS, MAX_TOTAL_STAGGER_MS);
|
|
215
|
-
|
|
216
|
-
// Selection ring pulse animation: 1.0 → 1.05 → 1.0 on transition to
|
|
217
|
-
// selected. Plays at most once per selection change; reduce-motion skips.
|
|
218
|
-
const ringScale = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
219
|
-
const prevSelected = (0, _react.useRef)(isSelected);
|
|
220
|
-
(0, _react.useEffect)(() => {
|
|
221
|
-
if (prevSelected.current === isSelected) return;
|
|
222
|
-
prevSelected.current = isSelected;
|
|
223
|
-
if (!isSelected) {
|
|
224
|
-
ringScale.value = 1;
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
if (reduceMotion) {
|
|
228
|
-
ringScale.value = 1;
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
ringScale.value = (0, _reactNativeReanimated.withSequence)((0, _reactNativeReanimated.withTiming)(1.05, {
|
|
232
|
-
duration: 110
|
|
233
|
-
}), (0, _reactNativeReanimated.withSpring)(1, {
|
|
234
|
-
damping: 14,
|
|
235
|
-
stiffness: 200
|
|
236
|
-
}));
|
|
237
|
-
}, [isSelected, reduceMotion, ringScale]);
|
|
238
|
-
const ringAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
239
|
-
transform: [{
|
|
240
|
-
scale: ringScale.value
|
|
241
|
-
}]
|
|
242
|
-
}));
|
|
243
|
-
const inner = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
244
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
245
|
-
style: [_styles.photoPickerStyles.cellInner, dim && _styles.photoPickerStyles.cellDim],
|
|
246
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
|
|
247
|
-
source: {
|
|
248
|
-
uri: thumbUrl
|
|
249
|
-
},
|
|
250
|
-
style: _styles.photoPickerStyles.cellImage,
|
|
251
|
-
contentFit: "cover",
|
|
252
|
-
transition: 120,
|
|
253
|
-
cachePolicy: "memory-disk",
|
|
254
|
-
accessibilityLabel: photo.filename
|
|
255
|
-
})
|
|
256
|
-
}), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
257
|
-
pointerEvents: "none",
|
|
258
|
-
style: [_styles.photoPickerStyles.cellRing, {
|
|
259
|
-
borderColor: primaryColor
|
|
260
|
-
}, ringAnimatedStyle]
|
|
261
|
-
}), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
262
|
-
pointerEvents: "none",
|
|
263
|
-
style: [_styles.photoPickerStyles.cellBadge, {
|
|
264
|
-
backgroundColor: primaryColor
|
|
265
|
-
}],
|
|
266
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
267
|
-
style: _styles.photoPickerStyles.cellBadgeText,
|
|
268
|
-
children: selectionIndex > 0 ? String(selectionIndex) : ''
|
|
269
|
-
})
|
|
270
|
-
})]
|
|
271
|
-
});
|
|
272
|
-
const cellWrapperStyle = {
|
|
273
|
-
width: size,
|
|
274
|
-
height: size,
|
|
275
|
-
marginRight,
|
|
276
|
-
marginBottom
|
|
277
|
-
};
|
|
278
|
-
if (reduceMotion) {
|
|
279
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
280
|
-
activeOpacity: 0.85,
|
|
281
|
-
onPress: onPress,
|
|
282
|
-
onLongPress: onLongPress,
|
|
283
|
-
style: [_styles.photoPickerStyles.cellWrapper, cellWrapperStyle],
|
|
284
|
-
accessibilityRole: "button",
|
|
285
|
-
accessibilityLabel: a11yLabel,
|
|
286
|
-
accessibilityState: {
|
|
287
|
-
selected: isSelected
|
|
288
|
-
},
|
|
289
|
-
children: inner
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
293
|
-
entering: _reactNativeReanimated.FadeIn.delay(delay).duration(200),
|
|
294
|
-
style: [_styles.photoPickerStyles.cellWrapper, cellWrapperStyle],
|
|
295
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
296
|
-
activeOpacity: 0.85,
|
|
297
|
-
onPress: onPress,
|
|
298
|
-
onLongPress: onLongPress,
|
|
299
|
-
style: {
|
|
300
|
-
flex: 1
|
|
301
|
-
},
|
|
302
|
-
accessibilityRole: "button",
|
|
303
|
-
accessibilityLabel: a11yLabel,
|
|
304
|
-
accessibilityState: {
|
|
305
|
-
selected: isSelected
|
|
306
|
-
},
|
|
307
|
-
children: inner
|
|
308
|
-
})
|
|
309
|
-
});
|
|
310
|
-
});
|
|
311
|
-
const PhotoPickerView = ({
|
|
312
|
-
photos,
|
|
313
|
-
selectedIds,
|
|
314
|
-
multiSelect,
|
|
315
|
-
maxSelection,
|
|
316
|
-
allowUpload,
|
|
317
|
-
refreshing,
|
|
318
|
-
uploading,
|
|
319
|
-
isPickingDocument,
|
|
320
|
-
uploadProgress,
|
|
321
|
-
hasMore,
|
|
322
|
-
loadingMore,
|
|
323
|
-
reduceMotion,
|
|
324
|
-
getThumbUrl,
|
|
325
|
-
primaryColor,
|
|
326
|
-
isOwner,
|
|
327
|
-
onTogglePhoto,
|
|
328
|
-
onPreviewPhoto,
|
|
329
|
-
onUpload,
|
|
330
|
-
onRefresh,
|
|
331
|
-
onLoadMore,
|
|
332
|
-
onCancel,
|
|
333
|
-
onConfirm,
|
|
334
|
-
t
|
|
335
|
-
}) => {
|
|
336
|
-
const {
|
|
337
|
-
width: windowWidth,
|
|
338
|
-
height: windowHeight
|
|
339
|
-
} = (0, _reactNative.useWindowDimensions)();
|
|
340
|
-
|
|
341
|
-
// Layout: 3 columns phone portrait, 2 columns phone landscape,
|
|
342
|
-
// 4 columns tablet (>= 600 width). Apple Photos-ish.
|
|
343
|
-
const columns = (0, _react.useMemo)(() => {
|
|
344
|
-
if (windowWidth >= 600) return 4;
|
|
345
|
-
// Landscape phone: width > height
|
|
346
|
-
if (windowWidth > windowHeight) return 2;
|
|
347
|
-
return 3;
|
|
348
|
-
}, [windowWidth, windowHeight]);
|
|
349
|
-
const GUTTER = 2;
|
|
350
|
-
const cellSize = (0, _react.useMemo)(() => {
|
|
351
|
-
// (windowWidth - (columns - 1) * GUTTER) / columns, but
|
|
352
|
-
// FlatList in 3-col layout means each row has 2 inter-cell gutters.
|
|
353
|
-
return Math.floor((windowWidth - GUTTER * (columns - 1)) / columns);
|
|
354
|
-
}, [windowWidth, columns]);
|
|
355
|
-
|
|
356
|
-
// Map selectedIds → 1-based selection order for the badge. We freeze a
|
|
357
|
-
// stable order at the time of selection: the order is the insertion
|
|
358
|
-
// order of the Set (which JS preserves natively).
|
|
359
|
-
const selectionOrder = (0, _react.useMemo)(() => {
|
|
360
|
-
const map = new Map();
|
|
361
|
-
let i = 1;
|
|
362
|
-
for (const id of selectedIds) {
|
|
363
|
-
map.set(id, i++);
|
|
364
|
-
}
|
|
365
|
-
return map;
|
|
366
|
-
}, [selectedIds]);
|
|
367
|
-
const hasAnySelection = selectedIds.size > 0;
|
|
368
|
-
|
|
369
|
-
// Compact icon-only upload pill on narrow screens; full pill otherwise.
|
|
370
|
-
const showUploadLabel = windowWidth >= 360;
|
|
371
|
-
|
|
372
|
-
// The bottom sheet renders below the status bar already (its `maxHeight`
|
|
373
|
-
// is capped by `SCREEN_HEIGHT - insets.top`), so the picker MUST NOT add
|
|
374
|
-
// an additional safe-area inset to the header. Header layout:
|
|
375
|
-
// • 28dp drag-handle hit area floats at the very top of the sheet
|
|
376
|
-
// • 56dp app bar sits immediately below the handle
|
|
377
|
-
// Total header zone = 28 + 56 = 84dp from sheet top.
|
|
378
|
-
const HANDLE_ZONE = 28;
|
|
379
|
-
const APP_BAR_HEIGHT = 56;
|
|
380
|
-
const headerHeight = HANDLE_ZONE + APP_BAR_HEIGHT;
|
|
381
|
-
const contentPaddingTop = headerHeight + 4;
|
|
382
|
-
const isEmpty = photos.length === 0;
|
|
383
|
-
const a11yColumnsAnnouncement = (0, _react.useRef)(columns);
|
|
384
|
-
(0, _react.useEffect)(() => {
|
|
385
|
-
if (a11yColumnsAnnouncement.current !== columns) {
|
|
386
|
-
a11yColumnsAnnouncement.current = columns;
|
|
387
|
-
}
|
|
388
|
-
}, [columns]);
|
|
389
|
-
const handleCellPress = (0, _react.useCallback)(photo => {
|
|
390
|
-
if (_reactNative.Platform.OS !== 'web') {
|
|
391
|
-
void hapticImpact('light');
|
|
392
|
-
}
|
|
393
|
-
onTogglePhoto(photo);
|
|
394
|
-
}, [onTogglePhoto]);
|
|
395
|
-
const handleCellLongPress = (0, _react.useCallback)(photo => {
|
|
396
|
-
if (_reactNative.Platform.OS !== 'web') {
|
|
397
|
-
void hapticSelection();
|
|
398
|
-
}
|
|
399
|
-
onPreviewPhoto(photo);
|
|
400
|
-
}, [onPreviewPhoto]);
|
|
401
|
-
const handleConfirm = (0, _react.useCallback)(() => {
|
|
402
|
-
if (multiSelect) {
|
|
403
|
-
if (selectedIds.size === 0) return;
|
|
404
|
-
if (_reactNative.Platform.OS !== 'web') {
|
|
405
|
-
void hapticNotification('success');
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
onConfirm();
|
|
409
|
-
}, [multiSelect, selectedIds.size, onConfirm]);
|
|
410
|
-
|
|
411
|
-
// FlatList renderItem: each cell knows its enterIndex (for stagger).
|
|
412
|
-
const renderItem = (0, _react.useCallback)(({
|
|
413
|
-
item,
|
|
414
|
-
index
|
|
415
|
-
}) => {
|
|
416
|
-
const isSelected = selectedIds.has(item.id);
|
|
417
|
-
const selIndex = isSelected ? selectionOrder.get(item.id) || 0 : 0;
|
|
418
|
-
// Last column gets no right margin; last row no bottom margin
|
|
419
|
-
// (FlatList handles row breaks via numColumns).
|
|
420
|
-
const isLastInRow = (index + 1) % columns === 0;
|
|
421
|
-
const a11yLabel = t(isSelected ? 'fileManagement.a11y.photoCellSelected' : 'fileManagement.a11y.photoCellUnselected', {
|
|
422
|
-
name: item.filename || 'photo'
|
|
423
|
-
});
|
|
424
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(PhotoPickerCell, {
|
|
425
|
-
photo: item,
|
|
426
|
-
size: cellSize,
|
|
427
|
-
marginRight: isLastInRow ? 0 : GUTTER,
|
|
428
|
-
marginBottom: GUTTER,
|
|
429
|
-
isSelected: isSelected,
|
|
430
|
-
selectionIndex: selIndex,
|
|
431
|
-
dim: multiSelect && hasAnySelection && !isSelected,
|
|
432
|
-
primaryColor: primaryColor,
|
|
433
|
-
thumbUrl: getThumbUrl(item, 'thumb'),
|
|
434
|
-
enterIndex: index,
|
|
435
|
-
reduceMotion: reduceMotion,
|
|
436
|
-
onPress: () => handleCellPress(item),
|
|
437
|
-
onLongPress: () => handleCellLongPress(item),
|
|
438
|
-
a11yLabel: a11yLabel
|
|
439
|
-
});
|
|
440
|
-
}, [selectedIds, selectionOrder, columns, cellSize, multiSelect, hasAnySelection, primaryColor, getThumbUrl, reduceMotion, handleCellPress, handleCellLongPress, t]);
|
|
441
|
-
const keyExtractor = (0, _react.useCallback)(item => item.id, []);
|
|
442
|
-
const listFooter = (0, _react.useMemo)(() => {
|
|
443
|
-
if (!loadingMore) return null;
|
|
444
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
445
|
-
style: {
|
|
446
|
-
paddingVertical: 16,
|
|
447
|
-
alignItems: 'center'
|
|
448
|
-
},
|
|
449
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
450
|
-
size: "small",
|
|
451
|
-
color: "#FFFFFF"
|
|
452
|
-
})
|
|
453
|
-
});
|
|
454
|
-
}, [loadingMore]);
|
|
455
|
-
const handleEndReached = (0, _react.useCallback)(() => {
|
|
456
|
-
if (loadingMore || !hasMore) return;
|
|
457
|
-
onLoadMore();
|
|
458
|
-
}, [loadingMore, hasMore, onLoadMore]);
|
|
459
|
-
const confirmDisabled = multiSelect && selectedIds.size === 0;
|
|
460
|
-
const confirmLabel = multiSelect ? t('fileManagement.doneWithCount', {
|
|
461
|
-
count: selectedIds.size
|
|
462
|
-
}) : t('fileManagement.done');
|
|
463
|
-
|
|
464
|
-
// The progress fill width. Guard against zero division.
|
|
465
|
-
const progressFraction = uploadProgress && uploadProgress.total > 0 ? Math.min(1, Math.max(0, uploadProgress.current / uploadProgress.total)) : 0;
|
|
466
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
467
|
-
style: _styles.photoPickerStyles.root,
|
|
468
|
-
children: [isEmpty ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
469
|
-
style: [_styles.photoPickerStyles.empty, {
|
|
470
|
-
paddingTop: contentPaddingTop
|
|
471
|
-
}],
|
|
472
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
473
|
-
style: _styles.photoPickerStyles.emptyIconWrap,
|
|
474
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
475
|
-
name: "image-outline",
|
|
476
|
-
size: 64,
|
|
477
|
-
color: "#FFFFFF"
|
|
478
|
-
})
|
|
479
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
480
|
-
style: [_styles.photoPickerStyles.emptyTitle, {
|
|
481
|
-
color: '#FFFFFF'
|
|
482
|
-
}],
|
|
483
|
-
children: t('fileManagement.photoPicker.emptyTitle')
|
|
484
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
485
|
-
style: [_styles.photoPickerStyles.emptySubtitle, {
|
|
486
|
-
color: '#FFFFFF'
|
|
487
|
-
}],
|
|
488
|
-
children: t('fileManagement.photoPicker.emptySubtitle')
|
|
489
|
-
}), isOwner && allowUpload && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
490
|
-
style: [_styles.photoPickerStyles.emptyCta, {
|
|
491
|
-
backgroundColor: primaryColor
|
|
492
|
-
}],
|
|
493
|
-
onPress: onUpload,
|
|
494
|
-
disabled: uploading || isPickingDocument,
|
|
495
|
-
accessibilityRole: "button",
|
|
496
|
-
accessibilityLabel: t('fileManagement.uploadPhoto'),
|
|
497
|
-
accessibilityState: {
|
|
498
|
-
busy: uploading || isPickingDocument
|
|
499
|
-
},
|
|
500
|
-
children: uploading || isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
501
|
-
size: "small",
|
|
502
|
-
color: "#FFFFFF"
|
|
503
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
504
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
505
|
-
name: "cloud-upload",
|
|
506
|
-
size: 18,
|
|
507
|
-
color: "#FFFFFF"
|
|
508
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
509
|
-
style: _styles.photoPickerStyles.emptyCtaText,
|
|
510
|
-
children: t('fileManagement.uploadPhoto')
|
|
511
|
-
})]
|
|
512
|
-
})
|
|
513
|
-
})]
|
|
514
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
|
|
515
|
-
data: photos,
|
|
516
|
-
renderItem: renderItem,
|
|
517
|
-
keyExtractor: keyExtractor,
|
|
518
|
-
numColumns: columns,
|
|
519
|
-
contentContainerStyle: [_styles.photoPickerStyles.gridContent, {
|
|
520
|
-
paddingTop: contentPaddingTop
|
|
521
|
-
}],
|
|
522
|
-
style: _styles.photoPickerStyles.grid,
|
|
523
|
-
showsVerticalScrollIndicator: false,
|
|
524
|
-
refreshControl: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.RefreshControl, {
|
|
525
|
-
refreshing: refreshing,
|
|
526
|
-
onRefresh: onRefresh,
|
|
527
|
-
tintColor: "#FFFFFF",
|
|
528
|
-
colors: [primaryColor],
|
|
529
|
-
progressViewOffset: contentPaddingTop
|
|
530
|
-
}),
|
|
531
|
-
onEndReached: handleEndReached,
|
|
532
|
-
onEndReachedThreshold: 0.4,
|
|
533
|
-
ListFooterComponent: listFooter,
|
|
534
|
-
removeClippedSubviews: true,
|
|
535
|
-
initialNumToRender: Math.max(12, columns * 6),
|
|
536
|
-
windowSize: 9
|
|
537
|
-
}, `cols-${columns}`), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
538
|
-
style: [_styles.photoPickerStyles.header, {
|
|
539
|
-
paddingTop: HANDLE_ZONE,
|
|
540
|
-
minHeight: headerHeight
|
|
541
|
-
}],
|
|
542
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
543
|
-
style: _styles.photoPickerStyles.headerRow,
|
|
544
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
545
|
-
style: [_styles.photoPickerStyles.headerSide, _styles.photoPickerStyles.headerSideLeft],
|
|
546
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
547
|
-
onPress: onCancel,
|
|
548
|
-
style: _styles.photoPickerStyles.headerCancel,
|
|
549
|
-
accessibilityRole: "button",
|
|
550
|
-
accessibilityLabel: t('fileManagement.a11y.cancelPicker'),
|
|
551
|
-
hitSlop: {
|
|
552
|
-
top: 8,
|
|
553
|
-
bottom: 8,
|
|
554
|
-
left: 8,
|
|
555
|
-
right: 8
|
|
556
|
-
},
|
|
557
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
558
|
-
style: _styles.photoPickerStyles.headerCancelText,
|
|
559
|
-
children: t('fileManagement.cancel')
|
|
560
|
-
})
|
|
561
|
-
})
|
|
562
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
563
|
-
pointerEvents: "none",
|
|
564
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
565
|
-
style: _styles.photoPickerStyles.headerTitle,
|
|
566
|
-
numberOfLines: 1,
|
|
567
|
-
children: t('fileManagement.choosePhoto')
|
|
568
|
-
})
|
|
569
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
570
|
-
style: [_styles.photoPickerStyles.headerSide, _styles.photoPickerStyles.headerSideRight],
|
|
571
|
-
children: multiSelect ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
572
|
-
onPress: handleConfirm,
|
|
573
|
-
disabled: confirmDisabled,
|
|
574
|
-
style: [_styles.photoPickerStyles.headerPrimaryPill, {
|
|
575
|
-
backgroundColor: confirmDisabled ? 'rgba(255,255,255,0.18)' : primaryColor,
|
|
576
|
-
opacity: confirmDisabled ? 0.6 : 1
|
|
577
|
-
}],
|
|
578
|
-
accessibilityRole: "button",
|
|
579
|
-
accessibilityLabel: t('fileManagement.a11y.confirmSelection'),
|
|
580
|
-
accessibilityState: {
|
|
581
|
-
disabled: confirmDisabled
|
|
582
|
-
},
|
|
583
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
584
|
-
style: _styles.photoPickerStyles.headerPrimaryText,
|
|
585
|
-
children: confirmLabel
|
|
586
|
-
})
|
|
587
|
-
}) : isOwner && allowUpload && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
588
|
-
onPress: onUpload,
|
|
589
|
-
disabled: uploading || isPickingDocument,
|
|
590
|
-
style: [_styles.photoPickerStyles.headerPrimaryPill, !showUploadLabel && _styles.photoPickerStyles.headerPrimaryPillIconOnly, {
|
|
591
|
-
backgroundColor: primaryColor
|
|
592
|
-
}],
|
|
593
|
-
accessibilityRole: "button",
|
|
594
|
-
accessibilityLabel: t('fileManagement.a11y.uploadFromDevice'),
|
|
595
|
-
accessibilityState: {
|
|
596
|
-
busy: uploading || isPickingDocument
|
|
597
|
-
},
|
|
598
|
-
children: uploading || isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
599
|
-
size: "small",
|
|
600
|
-
color: "#FFFFFF"
|
|
601
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
602
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
603
|
-
name: "cloud-upload",
|
|
604
|
-
size: 16,
|
|
605
|
-
color: "#FFFFFF"
|
|
606
|
-
}), showUploadLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
607
|
-
style: _styles.photoPickerStyles.headerPrimaryText,
|
|
608
|
-
children: t('fileManagement.upload')
|
|
609
|
-
})]
|
|
610
|
-
})
|
|
611
|
-
})
|
|
612
|
-
})]
|
|
613
|
-
}), uploading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
614
|
-
style: _styles.photoPickerStyles.headerProgressBarTrack,
|
|
615
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
616
|
-
style: [_styles.photoPickerStyles.headerProgressBarFill, {
|
|
617
|
-
width: `${Math.round(progressFraction * 100)}%`,
|
|
618
|
-
backgroundColor: primaryColor
|
|
619
|
-
}]
|
|
620
|
-
})
|
|
621
|
-
})]
|
|
622
|
-
})]
|
|
623
|
-
});
|
|
624
|
-
};
|
|
625
77
|
const FileManagementScreen = ({
|
|
626
78
|
onClose,
|
|
627
79
|
theme,
|
|
@@ -681,7 +133,6 @@ const FileManagementScreen = ({
|
|
|
681
133
|
const [fileContent, setFileContent] = (0, _react.useState)(null);
|
|
682
134
|
const [loadingFileContent, setLoadingFileContent] = (0, _react.useState)(false);
|
|
683
135
|
const [showFileDetailsInViewer, setShowFileDetailsInViewer] = (0, _react.useState)(false);
|
|
684
|
-
const [isPickingDocument, setIsPickingDocument] = (0, _react.useState)(false);
|
|
685
136
|
const [reduceMotion, setReduceMotion] = (0, _react.useState)(false);
|
|
686
137
|
|
|
687
138
|
// Detect reduce-motion preference once on mount + subscribe to changes.
|
|
@@ -716,8 +167,6 @@ const FileManagementScreen = ({
|
|
|
716
167
|
const [searchQuery, setSearchQuery] = (0, _react.useState)('');
|
|
717
168
|
const [sortBy, setSortBy] = (0, _react.useState)('date');
|
|
718
169
|
const [sortOrder, setSortOrder] = (0, _react.useState)('desc');
|
|
719
|
-
const [pendingFiles, setPendingFiles] = (0, _react.useState)([]);
|
|
720
|
-
const [showUploadPreview, setShowUploadPreview] = (0, _react.useState)(false);
|
|
721
170
|
// Derived filtered and sorted files (avoid setState loops)
|
|
722
171
|
const filteredFiles = (0, _react.useMemo)(() => {
|
|
723
172
|
let filteredByMode = files;
|
|
@@ -756,8 +205,6 @@ const FileManagementScreen = ({
|
|
|
756
205
|
}, [files, searchQuery, viewMode, sortBy, sortOrder]);
|
|
757
206
|
const [photoDimensions, setPhotoDimensions] = (0, _react.useState)({});
|
|
758
207
|
const [loadingDimensions, setLoadingDimensions] = (0, _react.useState)(false);
|
|
759
|
-
const uploadStartRef = (0, _react.useRef)(null);
|
|
760
|
-
const MIN_BANNER_MS = 600;
|
|
761
208
|
// Selection state
|
|
762
209
|
const [selectedIds, setSelectedIds] = (0, _react.useState)(new Set(initialSelectedIds));
|
|
763
210
|
const [lastSelectedFileId, setLastSelectedFileId] = (0, _react.useState)(null);
|
|
@@ -863,15 +310,6 @@ const FileManagementScreen = ({
|
|
|
863
310
|
onConfirmSelection?.(chosen);
|
|
864
311
|
onClose?.();
|
|
865
312
|
}, [selectMode, multiSelect, selectedIds, files, onConfirmSelection, onClose, defaultVisibility, oxyServices, linkContext]);
|
|
866
|
-
const endUpload = (0, _react.useCallback)(() => {
|
|
867
|
-
const started = uploadStartRef.current;
|
|
868
|
-
const elapsed = started ? Date.now() - started : MIN_BANNER_MS;
|
|
869
|
-
const remaining = elapsed < MIN_BANNER_MS ? MIN_BANNER_MS - elapsed : 0;
|
|
870
|
-
setTimeout(() => {
|
|
871
|
-
_fileStore.useFileStore.getState().setUploading(false);
|
|
872
|
-
uploadStartRef.current = null;
|
|
873
|
-
}, remaining);
|
|
874
|
-
}, []);
|
|
875
313
|
|
|
876
314
|
// Helper to safely request a thumbnail variant only for image mime types.
|
|
877
315
|
const getSafeDownloadUrlCallback = (0, _react.useCallback)((file, variant = 'thumb') => {
|
|
@@ -885,8 +323,6 @@ const FileManagementScreen = ({
|
|
|
885
323
|
const backgroundColor = colors.backgroundSecondary;
|
|
886
324
|
const borderColor = colors.border;
|
|
887
325
|
const targetUserId = userId || user?.id;
|
|
888
|
-
const storeSetUploading = (0, _fileStore.useFileStore)(s => s.setUploading);
|
|
889
|
-
const storeSetUploadProgress = (0, _fileStore.useFileStore)(s => s.setUploadProgress);
|
|
890
326
|
const storeSetDeleting = (0, _fileStore.useFileStore)(s => s.setDeleting);
|
|
891
327
|
const loadFiles = (0, _react.useCallback)(async (mode = 'initial') => {
|
|
892
328
|
if (!targetUserId) return;
|
|
@@ -945,7 +381,7 @@ const FileManagementScreen = ({
|
|
|
945
381
|
}));
|
|
946
382
|
}
|
|
947
383
|
} catch (error) {
|
|
948
|
-
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.loadFailed'));
|
|
384
|
+
_bloom.toast.error((0, _shared.getErrorMessage)(error) || t('fileManagement.toasts.loadFailed'));
|
|
949
385
|
} finally {
|
|
950
386
|
setLoading(false);
|
|
951
387
|
setRefreshing(false);
|
|
@@ -956,6 +392,31 @@ const FileManagementScreen = ({
|
|
|
956
392
|
}
|
|
957
393
|
}, [targetUserId, oxyServices, paging]);
|
|
958
394
|
|
|
395
|
+
// Self-contained document-picking + upload-preview state and handlers.
|
|
396
|
+
const {
|
|
397
|
+
isPickingDocument,
|
|
398
|
+
pendingFiles,
|
|
399
|
+
showUploadPreview,
|
|
400
|
+
handleFileUpload,
|
|
401
|
+
handleConfirmUpload,
|
|
402
|
+
handleCancelUpload,
|
|
403
|
+
removePendingFile
|
|
404
|
+
} = (0, _useFileUploadState.useFileUploadState)({
|
|
405
|
+
targetUserId,
|
|
406
|
+
uploadFileMutation,
|
|
407
|
+
defaultVisibility,
|
|
408
|
+
selectMode,
|
|
409
|
+
multiSelect,
|
|
410
|
+
afterSelect,
|
|
411
|
+
onSelect,
|
|
412
|
+
goBack,
|
|
413
|
+
onClose,
|
|
414
|
+
selectedIds,
|
|
415
|
+
setSelectedIds,
|
|
416
|
+
loadFiles,
|
|
417
|
+
t
|
|
418
|
+
});
|
|
419
|
+
|
|
959
420
|
// Keep a ref to avoid stale closure when calculating next offset
|
|
960
421
|
const prevPagingRef = (0, _react.useRef)(paging);
|
|
961
422
|
(0, _react.useEffect)(() => {
|
|
@@ -1034,416 +495,6 @@ const FileManagementScreen = ({
|
|
|
1034
495
|
}
|
|
1035
496
|
return rows;
|
|
1036
497
|
}, []);
|
|
1037
|
-
const processFileUploads = async selectedFiles => {
|
|
1038
|
-
if (selectedFiles.length === 0) return [];
|
|
1039
|
-
if (!targetUserId) return []; // Guard clause to ensure userId is defined
|
|
1040
|
-
const uploadedFiles = [];
|
|
1041
|
-
try {
|
|
1042
|
-
storeSetUploadProgress({
|
|
1043
|
-
current: 0,
|
|
1044
|
-
total: selectedFiles.length
|
|
1045
|
-
});
|
|
1046
|
-
const maxSize = 50 * 1024 * 1024; // 50MB
|
|
1047
|
-
const oversizedFiles = selectedFiles.filter(file => candidateSize(file) > maxSize);
|
|
1048
|
-
if (oversizedFiles.length > 0) {
|
|
1049
|
-
const fileList = oversizedFiles.map(f => candidateName(f, 'file')).join(', ');
|
|
1050
|
-
_bloom.toast.error(t('fileManagement.toasts.filesTooLarge', {
|
|
1051
|
-
files: fileList
|
|
1052
|
-
}));
|
|
1053
|
-
return [];
|
|
1054
|
-
}
|
|
1055
|
-
let successCount = 0;
|
|
1056
|
-
let failureCount = 0;
|
|
1057
|
-
const errors = [];
|
|
1058
|
-
for (let i = 0; i < selectedFiles.length; i++) {
|
|
1059
|
-
storeSetUploadProgress({
|
|
1060
|
-
current: i + 1,
|
|
1061
|
-
total: selectedFiles.length
|
|
1062
|
-
});
|
|
1063
|
-
const raw = selectedFiles[i];
|
|
1064
|
-
const fileName = candidateName(raw, `file-${i + 1}`);
|
|
1065
|
-
const fileSize = candidateSize(raw);
|
|
1066
|
-
const fileType = candidateType(raw);
|
|
1067
|
-
const optimisticId = `temp-${Date.now()}-${i}-${Math.random().toString(36).substr(2, 9)}`; // Unique ID per file
|
|
1068
|
-
|
|
1069
|
-
try {
|
|
1070
|
-
// Validate file before upload
|
|
1071
|
-
if (!raw || !fileName || fileSize <= 0) {
|
|
1072
|
-
const errorMsg = `Invalid file: ${fileName}`;
|
|
1073
|
-
if (__DEV__) {
|
|
1074
|
-
console.error('Upload validation failed:', {
|
|
1075
|
-
file: raw,
|
|
1076
|
-
error: errorMsg
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
failureCount++;
|
|
1080
|
-
errors.push(`${fileName}: Invalid file (missing name or size)`);
|
|
1081
|
-
continue;
|
|
1082
|
-
}
|
|
1083
|
-
const optimisticFile = {
|
|
1084
|
-
id: optimisticId,
|
|
1085
|
-
filename: fileName,
|
|
1086
|
-
contentType: fileType,
|
|
1087
|
-
length: fileSize,
|
|
1088
|
-
chunkSize: 0,
|
|
1089
|
-
uploadDate: new Date().toISOString(),
|
|
1090
|
-
metadata: {
|
|
1091
|
-
uploading: true
|
|
1092
|
-
},
|
|
1093
|
-
variants: []
|
|
1094
|
-
};
|
|
1095
|
-
_fileStore.useFileStore.getState().addFile(optimisticFile, {
|
|
1096
|
-
prepend: true
|
|
1097
|
-
});
|
|
1098
|
-
|
|
1099
|
-
// Use the mutation hook with authentication handling
|
|
1100
|
-
const result = await uploadFileMutation.mutateAsync({
|
|
1101
|
-
file: raw,
|
|
1102
|
-
visibility: defaultVisibility
|
|
1103
|
-
});
|
|
1104
|
-
|
|
1105
|
-
// Attempt to refresh file list incrementally – fetch single file metadata if API allows
|
|
1106
|
-
const f = result?.file ?? result?.files?.[0];
|
|
1107
|
-
if (f) {
|
|
1108
|
-
const merged = {
|
|
1109
|
-
id: f.id,
|
|
1110
|
-
filename: f.originalName || f.sha256 || fileName,
|
|
1111
|
-
contentType: f.mime || fileType,
|
|
1112
|
-
length: f.size || fileSize,
|
|
1113
|
-
chunkSize: 0,
|
|
1114
|
-
uploadDate: f.createdAt || new Date().toISOString(),
|
|
1115
|
-
metadata: f.metadata || {},
|
|
1116
|
-
variants: f.variants || []
|
|
1117
|
-
};
|
|
1118
|
-
// Remove optimistic then add real
|
|
1119
|
-
_fileStore.useFileStore.getState().removeFile(optimisticId);
|
|
1120
|
-
_fileStore.useFileStore.getState().addFile(merged, {
|
|
1121
|
-
prepend: true
|
|
1122
|
-
});
|
|
1123
|
-
uploadedFiles.push(merged);
|
|
1124
|
-
successCount++;
|
|
1125
|
-
} else {
|
|
1126
|
-
// Fallback: will reconcile on later list refresh
|
|
1127
|
-
_fileStore.useFileStore.getState().updateFile(optimisticId, {
|
|
1128
|
-
metadata: {
|
|
1129
|
-
uploading: false
|
|
1130
|
-
}
|
|
1131
|
-
});
|
|
1132
|
-
if (__DEV__) {
|
|
1133
|
-
console.warn('Upload completed but no file data returned:', {
|
|
1134
|
-
fileName,
|
|
1135
|
-
result
|
|
1136
|
-
});
|
|
1137
|
-
}
|
|
1138
|
-
// Still count as success if upload didn't throw
|
|
1139
|
-
successCount++;
|
|
1140
|
-
}
|
|
1141
|
-
} catch (error) {
|
|
1142
|
-
failureCount++;
|
|
1143
|
-
const errorMessage = getErrorMessage(error) || 'Upload failed';
|
|
1144
|
-
const fullError = `${fileName}: ${errorMessage}`;
|
|
1145
|
-
errors.push(fullError);
|
|
1146
|
-
if (__DEV__) {
|
|
1147
|
-
console.error('File upload failed:', {
|
|
1148
|
-
fileName,
|
|
1149
|
-
fileSize,
|
|
1150
|
-
fileType,
|
|
1151
|
-
error: errorMessage,
|
|
1152
|
-
stack: error instanceof Error ? error.stack : undefined
|
|
1153
|
-
});
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
// Remove optimistic file on error (use the same optimisticId from above)
|
|
1157
|
-
_fileStore.useFileStore.getState().removeFile(optimisticId);
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
// Show success/error messages
|
|
1162
|
-
if (successCount > 0) {
|
|
1163
|
-
_bloom.toast.success(t('fileManagement.toasts.uploadSuccess', {
|
|
1164
|
-
count: successCount
|
|
1165
|
-
}));
|
|
1166
|
-
}
|
|
1167
|
-
if (failureCount > 0) {
|
|
1168
|
-
// Show detailed error message with first few errors
|
|
1169
|
-
const errorDetails = errors.length > 0 ? `\n${errors.slice(0, 3).join('\n')}${errors.length > 3 ? `\n...and ${errors.length - 3} more` : ''}` : '';
|
|
1170
|
-
_bloom.toast.error(`${t('fileManagement.toasts.uploadFailed', {
|
|
1171
|
-
count: failureCount
|
|
1172
|
-
})}${errorDetails}`);
|
|
1173
|
-
}
|
|
1174
|
-
// Silent background refresh to ensure metadata/variants updated
|
|
1175
|
-
setTimeout(() => {
|
|
1176
|
-
loadFiles('silent');
|
|
1177
|
-
}, 1200);
|
|
1178
|
-
} catch (error) {
|
|
1179
|
-
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.uploadError'));
|
|
1180
|
-
} finally {
|
|
1181
|
-
storeSetUploadProgress(null);
|
|
1182
|
-
}
|
|
1183
|
-
return uploadedFiles;
|
|
1184
|
-
};
|
|
1185
|
-
const handleFileSelection = (0, _react.useCallback)(async selectedFiles => {
|
|
1186
|
-
const MAX_FILE_SIZE = 100 * 1024 * 1024; // 100MB
|
|
1187
|
-
const processedFiles = [];
|
|
1188
|
-
for (const file of selectedFiles) {
|
|
1189
|
-
// Validate file has required properties
|
|
1190
|
-
if (!file) {
|
|
1191
|
-
if (__DEV__) {
|
|
1192
|
-
console.error('Invalid file: file is null or undefined');
|
|
1193
|
-
}
|
|
1194
|
-
_bloom.toast.error(t('fileManagement.toasts.invalidFileMissing'));
|
|
1195
|
-
continue;
|
|
1196
|
-
}
|
|
1197
|
-
const name = candidateName(file, '');
|
|
1198
|
-
if (!name) {
|
|
1199
|
-
if (__DEV__) {
|
|
1200
|
-
console.error('Invalid file: missing or invalid name property', file);
|
|
1201
|
-
}
|
|
1202
|
-
_bloom.toast.error(t('fileManagement.toasts.invalidFileName'));
|
|
1203
|
-
continue;
|
|
1204
|
-
}
|
|
1205
|
-
const size = file.size;
|
|
1206
|
-
if (size === undefined || size === null || Number.isNaN(size)) {
|
|
1207
|
-
if (__DEV__) {
|
|
1208
|
-
console.error('Invalid file: missing or invalid size property', file);
|
|
1209
|
-
}
|
|
1210
|
-
_bloom.toast.error(t('fileManagement.toasts.invalidFileSize', {
|
|
1211
|
-
name
|
|
1212
|
-
}));
|
|
1213
|
-
continue;
|
|
1214
|
-
}
|
|
1215
|
-
if (size <= 0) {
|
|
1216
|
-
if (__DEV__) {
|
|
1217
|
-
console.error('Invalid file: file size is zero or negative', file);
|
|
1218
|
-
}
|
|
1219
|
-
_bloom.toast.error(t('fileManagement.toasts.fileEmpty', {
|
|
1220
|
-
name
|
|
1221
|
-
}));
|
|
1222
|
-
continue;
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
// Validate file size
|
|
1226
|
-
if (size > MAX_FILE_SIZE) {
|
|
1227
|
-
_bloom.toast.error(t('fileManagement.toasts.fileTooLarge', {
|
|
1228
|
-
name,
|
|
1229
|
-
maxSize: (0, _fileManagement.formatFileSize)(MAX_FILE_SIZE)
|
|
1230
|
-
}));
|
|
1231
|
-
continue;
|
|
1232
|
-
}
|
|
1233
|
-
const fileType = candidateType(file);
|
|
1234
|
-
|
|
1235
|
-
// Generate preview for images - unified approach
|
|
1236
|
-
let preview;
|
|
1237
|
-
if (fileType.startsWith('image/')) {
|
|
1238
|
-
// Try to use file URI from expo-document-picker if available (works on all platforms)
|
|
1239
|
-
const fileUri = candidateUri(file);
|
|
1240
|
-
if (fileUri && (fileUri.startsWith('file://') || fileUri.startsWith('content://') || fileUri.startsWith('http://') || fileUri.startsWith('https://') || fileUri.startsWith('blob:'))) {
|
|
1241
|
-
preview = fileUri;
|
|
1242
|
-
} else {
|
|
1243
|
-
// Fallback: create blob URL if possible (works on web only)
|
|
1244
|
-
try {
|
|
1245
|
-
if (typeof File !== 'undefined' && file instanceof File || typeof Blob !== 'undefined' && file instanceof Blob) {
|
|
1246
|
-
preview = URL.createObjectURL(file);
|
|
1247
|
-
}
|
|
1248
|
-
} catch (error) {
|
|
1249
|
-
if (__DEV__) {
|
|
1250
|
-
console.warn('Failed to create preview URL:', error);
|
|
1251
|
-
}
|
|
1252
|
-
// Preview is optional, continue without it
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
processedFiles.push({
|
|
1257
|
-
file,
|
|
1258
|
-
preview,
|
|
1259
|
-
size,
|
|
1260
|
-
name,
|
|
1261
|
-
type: fileType
|
|
1262
|
-
});
|
|
1263
|
-
}
|
|
1264
|
-
if (processedFiles.length === 0) {
|
|
1265
|
-
_bloom.toast.error(t('fileManagement.toasts.noValidFiles'));
|
|
1266
|
-
return;
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
// Show preview modal for user to review files before upload
|
|
1270
|
-
setPendingFiles(processedFiles);
|
|
1271
|
-
setShowUploadPreview(true);
|
|
1272
|
-
}, [t]);
|
|
1273
|
-
const handleConfirmUpload = async () => {
|
|
1274
|
-
if (pendingFiles.length === 0) return;
|
|
1275
|
-
setShowUploadPreview(false);
|
|
1276
|
-
uploadStartRef.current = Date.now();
|
|
1277
|
-
storeSetUploading(true);
|
|
1278
|
-
storeSetUploadProgress(null);
|
|
1279
|
-
try {
|
|
1280
|
-
const filesToUpload = pendingFiles.map(pf => pf.file);
|
|
1281
|
-
storeSetUploadProgress({
|
|
1282
|
-
current: 0,
|
|
1283
|
-
total: filesToUpload.length
|
|
1284
|
-
});
|
|
1285
|
-
const uploadedFiles = await processFileUploads(filesToUpload);
|
|
1286
|
-
|
|
1287
|
-
// Cleanup preview URLs
|
|
1288
|
-
pendingFiles.forEach(pf => {
|
|
1289
|
-
if (pf.preview) {
|
|
1290
|
-
URL.revokeObjectURL(pf.preview);
|
|
1291
|
-
}
|
|
1292
|
-
});
|
|
1293
|
-
setPendingFiles([]);
|
|
1294
|
-
|
|
1295
|
-
// If in selectMode, automatically select the uploaded file(s)
|
|
1296
|
-
if (selectMode && uploadedFiles.length > 0) {
|
|
1297
|
-
// Wait a bit for the file store to update and ensure file is available
|
|
1298
|
-
setTimeout(() => {
|
|
1299
|
-
const fileToSelect = uploadedFiles[0];
|
|
1300
|
-
if (!multiSelect && fileToSelect) {
|
|
1301
|
-
// Single select mode - directly call onSelect callback
|
|
1302
|
-
onSelect?.(fileToSelect);
|
|
1303
|
-
if (afterSelect === 'back') {
|
|
1304
|
-
goBack?.();
|
|
1305
|
-
} else if (afterSelect === 'close') {
|
|
1306
|
-
onClose?.();
|
|
1307
|
-
}
|
|
1308
|
-
} else if (multiSelect) {
|
|
1309
|
-
// Multi-select mode - add all uploaded files to selection
|
|
1310
|
-
uploadedFiles.forEach(file => {
|
|
1311
|
-
if (!selectedIds.has(file.id)) {
|
|
1312
|
-
setSelectedIds(prev => new Set(prev).add(file.id));
|
|
1313
|
-
}
|
|
1314
|
-
});
|
|
1315
|
-
}
|
|
1316
|
-
}, 500);
|
|
1317
|
-
}
|
|
1318
|
-
endUpload();
|
|
1319
|
-
} catch (error) {
|
|
1320
|
-
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.uploadError'));
|
|
1321
|
-
endUpload();
|
|
1322
|
-
}
|
|
1323
|
-
};
|
|
1324
|
-
const handleCancelUpload = () => {
|
|
1325
|
-
// Cleanup preview URLs
|
|
1326
|
-
pendingFiles.forEach(pf => {
|
|
1327
|
-
if (pf.preview) {
|
|
1328
|
-
URL.revokeObjectURL(pf.preview);
|
|
1329
|
-
}
|
|
1330
|
-
});
|
|
1331
|
-
setPendingFiles([]);
|
|
1332
|
-
setShowUploadPreview(false);
|
|
1333
|
-
};
|
|
1334
|
-
const removePendingFile = index => {
|
|
1335
|
-
const file = pendingFiles[index];
|
|
1336
|
-
if (file.preview) {
|
|
1337
|
-
URL.revokeObjectURL(file.preview);
|
|
1338
|
-
}
|
|
1339
|
-
const updated = pendingFiles.filter((_, i) => i !== index);
|
|
1340
|
-
setPendingFiles(updated);
|
|
1341
|
-
if (updated.length === 0) {
|
|
1342
|
-
setShowUploadPreview(false);
|
|
1343
|
-
}
|
|
1344
|
-
};
|
|
1345
|
-
|
|
1346
|
-
/**
|
|
1347
|
-
* Handle file upload - opens document picker and processes selected files
|
|
1348
|
-
* Expo 54 compatible - works on web, iOS, and Android
|
|
1349
|
-
*/
|
|
1350
|
-
const handleFileUpload = async () => {
|
|
1351
|
-
// Prevent concurrent document picker calls
|
|
1352
|
-
if (isPickingDocument) {
|
|
1353
|
-
_bloom.toast.error(t('fileManagement.toasts.waitForSelection'));
|
|
1354
|
-
return;
|
|
1355
|
-
}
|
|
1356
|
-
try {
|
|
1357
|
-
setIsPickingDocument(true);
|
|
1358
|
-
|
|
1359
|
-
// Lazy load expo-document-picker
|
|
1360
|
-
const picker = await loadDocumentPicker();
|
|
1361
|
-
|
|
1362
|
-
// Use expo-document-picker (works on all platforms including web)
|
|
1363
|
-
// On web, it uses the native file input and provides File objects directly
|
|
1364
|
-
const result = await picker.getDocumentAsync({
|
|
1365
|
-
type: '*/*',
|
|
1366
|
-
multiple: true,
|
|
1367
|
-
copyToCacheDirectory: true
|
|
1368
|
-
});
|
|
1369
|
-
if (result.canceled) {
|
|
1370
|
-
setIsPickingDocument(false);
|
|
1371
|
-
return;
|
|
1372
|
-
}
|
|
1373
|
-
if (!result.assets || result.assets.length === 0) {
|
|
1374
|
-
setIsPickingDocument(false);
|
|
1375
|
-
_bloom.toast.error(t('fileManagement.toasts.noFilesSelected'));
|
|
1376
|
-
return;
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
// Convert expo document picker results to File-like objects
|
|
1380
|
-
// According to Expo 54 docs, expo-document-picker returns assets with:
|
|
1381
|
-
// - uri: file URI (file://, content://, or blob URL)
|
|
1382
|
-
// - name: file name
|
|
1383
|
-
// - size: file size in bytes
|
|
1384
|
-
// - mimeType: MIME type of the file
|
|
1385
|
-
// - file: (optional) native File object (usually only on web)
|
|
1386
|
-
const files = [];
|
|
1387
|
-
const errors = [];
|
|
1388
|
-
|
|
1389
|
-
// Process files in parallel for better performance
|
|
1390
|
-
// This allows multiple files to be converted simultaneously
|
|
1391
|
-
const conversionPromises = result.assets.map((doc, index) => (0, _fileManagement.convertDocumentPickerAssetToFile)(doc, index).then(file => {
|
|
1392
|
-
if (file) {
|
|
1393
|
-
// Validate file has required properties before adding
|
|
1394
|
-
if (!file.name || file.size === undefined) {
|
|
1395
|
-
errors.push(`File "${doc.name || 'file'}" is invalid: missing required properties`);
|
|
1396
|
-
return null;
|
|
1397
|
-
}
|
|
1398
|
-
return file;
|
|
1399
|
-
}
|
|
1400
|
-
return null;
|
|
1401
|
-
}).catch(error => {
|
|
1402
|
-
errors.push(`File "${doc.name || 'file'}": ${getErrorMessage(error) || 'Failed to process'}`);
|
|
1403
|
-
return null;
|
|
1404
|
-
}));
|
|
1405
|
-
const convertedFiles = await Promise.all(conversionPromises);
|
|
1406
|
-
|
|
1407
|
-
// Filter out null values
|
|
1408
|
-
for (const file of convertedFiles) {
|
|
1409
|
-
if (file) {
|
|
1410
|
-
files.push(file);
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
// Show errors if any
|
|
1415
|
-
if (errors.length > 0) {
|
|
1416
|
-
const errorMessage = errors.slice(0, 3).join('\n') + (errors.length > 3 ? `\n...and ${errors.length - 3} more` : '');
|
|
1417
|
-
_bloom.toast.error(t('fileManagement.toasts.loadSomeFailed', {
|
|
1418
|
-
errors: errorMessage
|
|
1419
|
-
}));
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
// Process successfully converted files
|
|
1423
|
-
if (files.length > 0) {
|
|
1424
|
-
await handleFileSelection(files);
|
|
1425
|
-
} else {
|
|
1426
|
-
// Files were selected but none could be converted
|
|
1427
|
-
_bloom.toast.error(t('fileManagement.toasts.noFilesProcessed'));
|
|
1428
|
-
}
|
|
1429
|
-
} catch (error) {
|
|
1430
|
-
if (__DEV__) {
|
|
1431
|
-
console.error('File upload error:', error);
|
|
1432
|
-
}
|
|
1433
|
-
if (getErrorMessage(error)?.includes('expo-document-picker') || getErrorMessage(error)?.includes('Different document picking in progress')) {
|
|
1434
|
-
if (getErrorMessage(error)?.includes('Different document picking in progress')) {
|
|
1435
|
-
_bloom.toast.error(t('fileManagement.toasts.waitForSelection'));
|
|
1436
|
-
} else {
|
|
1437
|
-
_bloom.toast.error(t('fileManagement.toasts.filePickerNotAvailable'));
|
|
1438
|
-
}
|
|
1439
|
-
} else {
|
|
1440
|
-
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.selectFilesFailed'));
|
|
1441
|
-
}
|
|
1442
|
-
} finally {
|
|
1443
|
-
// Always reset the picking state, even if there was an error
|
|
1444
|
-
setIsPickingDocument(false);
|
|
1445
|
-
}
|
|
1446
|
-
};
|
|
1447
498
|
const confirmFileDelete = (0, _react.useCallback)((fileId, filename) => {
|
|
1448
499
|
setPendingDeleteFile({
|
|
1449
500
|
id: fileId,
|
|
@@ -1468,14 +519,14 @@ const FileManagementScreen = ({
|
|
|
1468
519
|
setTimeout(() => loadFiles('silent'), 800);
|
|
1469
520
|
} catch (error) {
|
|
1470
521
|
// Provide specific error messages
|
|
1471
|
-
if (getErrorMessage(error)?.includes('File not found') || getErrorMessage(error)?.includes('404')) {
|
|
522
|
+
if ((0, _shared.getErrorMessage)(error)?.includes('File not found') || (0, _shared.getErrorMessage)(error)?.includes('404')) {
|
|
1472
523
|
_bloom.toast.error(t('fileManagement.toasts.fileNotFound'));
|
|
1473
524
|
// Still reload files to refresh the list
|
|
1474
525
|
setTimeout(() => loadFiles('silent'), 800);
|
|
1475
|
-
} else if (getErrorMessage(error)?.includes('permission') || getErrorMessage(error)?.includes('403')) {
|
|
526
|
+
} else if ((0, _shared.getErrorMessage)(error)?.includes('permission') || (0, _shared.getErrorMessage)(error)?.includes('403')) {
|
|
1476
527
|
_bloom.toast.error(t('fileManagement.toasts.noPermission'));
|
|
1477
528
|
} else {
|
|
1478
|
-
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.deleteFailed'));
|
|
529
|
+
_bloom.toast.error((0, _shared.getErrorMessage)(error) || t('fileManagement.toasts.deleteFailed'));
|
|
1479
530
|
}
|
|
1480
531
|
} finally {
|
|
1481
532
|
storeSetDeleting(null);
|
|
@@ -1521,7 +572,7 @@ const FileManagementScreen = ({
|
|
|
1521
572
|
setSelectedIds(new Set());
|
|
1522
573
|
setTimeout(() => loadFiles('silent'), 800);
|
|
1523
574
|
} catch (error) {
|
|
1524
|
-
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.bulkDeleteError'));
|
|
575
|
+
_bloom.toast.error((0, _shared.getErrorMessage)(error) || t('fileManagement.toasts.bulkDeleteError'));
|
|
1525
576
|
}
|
|
1526
577
|
}, [selectedIds, files, oxyServices, loadFiles]);
|
|
1527
578
|
const handleBulkVisibilityChange = (0, _react.useCallback)(async visibility => {
|
|
@@ -1567,7 +618,7 @@ const FileManagementScreen = ({
|
|
|
1567
618
|
}
|
|
1568
619
|
setTimeout(() => loadFiles('silent'), 800);
|
|
1569
620
|
} catch (error) {
|
|
1570
|
-
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.visibilityError'));
|
|
621
|
+
_bloom.toast.error((0, _shared.getErrorMessage)(error) || t('fileManagement.toasts.visibilityError'));
|
|
1571
622
|
}
|
|
1572
623
|
}, [selectedIds, oxyServices, files, loadFiles]);
|
|
1573
624
|
|
|
@@ -1612,7 +663,7 @@ const FileManagementScreen = ({
|
|
|
1612
663
|
_bloom.toast.info(t('fileManagement.toasts.downloadMobile'));
|
|
1613
664
|
}
|
|
1614
665
|
} catch (error) {
|
|
1615
|
-
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.downloadFailed'));
|
|
666
|
+
_bloom.toast.error((0, _shared.getErrorMessage)(error) || t('fileManagement.toasts.downloadFailed'));
|
|
1616
667
|
}
|
|
1617
668
|
};
|
|
1618
669
|
const handleFileOpen = async file => {
|
|
@@ -1637,7 +688,7 @@ const FileManagementScreen = ({
|
|
|
1637
688
|
setFileContent(content);
|
|
1638
689
|
}
|
|
1639
690
|
} catch (error) {
|
|
1640
|
-
if (getErrorMessage(error)?.includes('404') || getErrorMessage(error)?.includes('not found')) {
|
|
691
|
+
if ((0, _shared.getErrorMessage)(error)?.includes('404') || (0, _shared.getErrorMessage)(error)?.includes('not found')) {
|
|
1641
692
|
_bloom.toast.error(t('fileManagement.toasts.fileNotFoundContent'));
|
|
1642
693
|
} else {
|
|
1643
694
|
_bloom.toast.error(t('fileManagement.toasts.loadContentFailed'));
|
|
@@ -1649,7 +700,7 @@ const FileManagementScreen = ({
|
|
|
1649
700
|
setFileContent(null);
|
|
1650
701
|
}
|
|
1651
702
|
} catch (error) {
|
|
1652
|
-
_bloom.toast.error(getErrorMessage(error) || t('fileManagement.toasts.openFailed'));
|
|
703
|
+
_bloom.toast.error((0, _shared.getErrorMessage)(error) || t('fileManagement.toasts.openFailed'));
|
|
1653
704
|
} finally {
|
|
1654
705
|
setLoadingFileContent(false);
|
|
1655
706
|
}
|
|
@@ -1922,7 +973,6 @@ const FileManagementScreen = ({
|
|
|
1922
973
|
};
|
|
1923
974
|
|
|
1924
975
|
// SettingsListItem-based file items (for 'all' view)
|
|
1925
|
-
// biome-ignore lint/suspicious/noExplicitAny: file items have dynamic props
|
|
1926
976
|
const groupedFileItems = (0, _react.useMemo)(() => {
|
|
1927
977
|
// filteredFiles is already sorted, so just use it directly
|
|
1928
978
|
const sortedFiles = filteredFiles;
|
|
@@ -2560,7 +1610,7 @@ const FileManagementScreen = ({
|
|
|
2560
1610
|
const isOwner = user?.id === targetUserId;
|
|
2561
1611
|
const allowUpload = isOwner && allowUploadInSelectMode;
|
|
2562
1612
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
2563
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
1613
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_PhotoPickerSection.default, {
|
|
2564
1614
|
photos: photosOnly,
|
|
2565
1615
|
selectedIds: selectedIds,
|
|
2566
1616
|
multiSelect: multiSelect,
|
|
@@ -2658,7 +1708,7 @@ const FileManagementScreen = ({
|
|
|
2658
1708
|
}) : t('fileManagement.itemCount_plural', {
|
|
2659
1709
|
count: filteredFiles.length
|
|
2660
1710
|
}),
|
|
2661
|
-
|
|
1711
|
+
actions: selectMode && multiSelect ? [{
|
|
2662
1712
|
key: 'clear',
|
|
2663
1713
|
text: t('fileManagement.clear'),
|
|
2664
1714
|
onPress: () => setSelectedIds(new Set()),
|
|
@@ -2884,126 +1934,30 @@ const FileManagementScreen = ({
|
|
|
2884
1934
|
children: t('fileManagement.total')
|
|
2885
1935
|
})]
|
|
2886
1936
|
})]
|
|
2887
|
-
}), viewMode === 'photos' ? renderPhotoGrid() : /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
layoutMeasurement,
|
|
2901
|
-
contentOffset,
|
|
2902
|
-
contentSize
|
|
2903
|
-
} = nativeEvent;
|
|
2904
|
-
const distanceFromBottom = contentSize.height - (contentOffset.y + layoutMeasurement.height);
|
|
2905
|
-
if (distanceFromBottom < 200 && !paging.loadingMore && paging.hasMore) {
|
|
2906
|
-
loadFiles('more');
|
|
2907
|
-
}
|
|
2908
|
-
},
|
|
2909
|
-
scrollEventThrottle: 250,
|
|
2910
|
-
children: filteredFiles.length === 0 && searchQuery.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2911
|
-
style: _styles.fileManagementStyles.emptyState,
|
|
2912
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
2913
|
-
name: "search",
|
|
2914
|
-
size: 64,
|
|
2915
|
-
color: colors.textTertiary
|
|
2916
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2917
|
-
style: [_styles.fileManagementStyles.emptyStateTitle, {
|
|
2918
|
-
color: colors.text
|
|
2919
|
-
}],
|
|
2920
|
-
children: t('fileManagement.noResults.title')
|
|
2921
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2922
|
-
style: [_styles.fileManagementStyles.emptyStateDescription, {
|
|
2923
|
-
color: colors.textSecondary
|
|
2924
|
-
}],
|
|
2925
|
-
children: t('fileManagement.noResults.description', {
|
|
2926
|
-
query: searchQuery
|
|
2927
|
-
})
|
|
2928
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
2929
|
-
style: [_styles.fileManagementStyles.emptyStateButton, {
|
|
2930
|
-
backgroundColor: colors.primary
|
|
2931
|
-
}],
|
|
2932
|
-
onPress: () => setSearchQuery(''),
|
|
2933
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
2934
|
-
name: "refresh",
|
|
2935
|
-
size: 20,
|
|
2936
|
-
color: "#FFFFFF"
|
|
2937
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2938
|
-
style: _styles.fileManagementStyles.emptyStateButtonText,
|
|
2939
|
-
children: t('fileManagement.clearSearch')
|
|
2940
|
-
})]
|
|
2941
|
-
})]
|
|
2942
|
-
}) : filteredFiles.length === 0 ? renderEmptyState() : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
2943
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListGroup, {
|
|
2944
|
-
children: groupedFileItems.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
|
|
2945
|
-
icon: item.icon,
|
|
2946
|
-
title: item.title,
|
|
2947
|
-
description: item.description,
|
|
2948
|
-
onPress: item.onPress,
|
|
2949
|
-
showChevron: false,
|
|
2950
|
-
rightElement: item.rightElement
|
|
2951
|
-
}, item.id))
|
|
2952
|
-
}), paging.loadingMore && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2953
|
-
style: _styles.fileManagementStyles.loadingMoreBar,
|
|
2954
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
2955
|
-
size: "small",
|
|
2956
|
-
color: colors.primary
|
|
2957
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2958
|
-
style: [_styles.fileManagementStyles.loadingMoreText, {
|
|
2959
|
-
color: colors.text
|
|
2960
|
-
}],
|
|
2961
|
-
children: t('fileManagement.loadingMore')
|
|
2962
|
-
})]
|
|
2963
|
-
})]
|
|
2964
|
-
})
|
|
1937
|
+
}), viewMode === 'photos' ? renderPhotoGrid() : /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileListSection.default, {
|
|
1938
|
+
scrollViewRef: scrollViewRef,
|
|
1939
|
+
filteredFiles: filteredFiles,
|
|
1940
|
+
searchQuery: searchQuery,
|
|
1941
|
+
items: groupedFileItems,
|
|
1942
|
+
paging: paging,
|
|
1943
|
+
refreshing: refreshing,
|
|
1944
|
+
colors: colors,
|
|
1945
|
+
t: t,
|
|
1946
|
+
onRefresh: () => loadFiles('refresh'),
|
|
1947
|
+
onLoadMore: () => loadFiles('more'),
|
|
1948
|
+
onClearSearch: () => setSearchQuery(''),
|
|
1949
|
+
renderEmptyState: renderEmptyState
|
|
2965
1950
|
}), !selectMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileDetailsModal.FileDetailsModal, {
|
|
2966
1951
|
control: fileDetailsControl,
|
|
2967
1952
|
file: selectedFile,
|
|
2968
1953
|
onDownload: handleFileDownload,
|
|
2969
1954
|
onDelete: confirmFileDelete,
|
|
2970
1955
|
isOwner: user?.id === targetUserId
|
|
2971
|
-
}), !selectMode && uploading && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
style: [_styles.fileManagementStyles.uploadBanner, {
|
|
2977
|
-
backgroundColor: bloomTheme.isDark ? '#222831EE' : '#FFFFFFEE',
|
|
2978
|
-
borderColor: colors.border
|
|
2979
|
-
}],
|
|
2980
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
2981
|
-
name: "cloud-upload",
|
|
2982
|
-
size: 18,
|
|
2983
|
-
color: colors.primary
|
|
2984
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2985
|
-
style: _styles.fileManagementStyles.uploadBannerContent,
|
|
2986
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
2987
|
-
style: [_styles.fileManagementStyles.uploadBannerText, {
|
|
2988
|
-
color: colors.text
|
|
2989
|
-
}],
|
|
2990
|
-
children: [t('fileManagement.uploading'), uploadProgress ? ` ${uploadProgress.current}/${uploadProgress.total}` : '...']
|
|
2991
|
-
}), uploadProgress && uploadProgress.total > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
2992
|
-
style: [_styles.fileManagementStyles.uploadProgressBarContainer, {
|
|
2993
|
-
backgroundColor: bloomTheme.isDark ? 'rgba(255,255,255,0.1)' : 'rgba(0,0,0,0.1)'
|
|
2994
|
-
}],
|
|
2995
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
2996
|
-
style: [_styles.fileManagementStyles.uploadProgressBar, {
|
|
2997
|
-
width: `${uploadProgress.current / uploadProgress.total * 100}%`,
|
|
2998
|
-
backgroundColor: colors.primary
|
|
2999
|
-
}]
|
|
3000
|
-
})
|
|
3001
|
-
})]
|
|
3002
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
3003
|
-
size: "small",
|
|
3004
|
-
color: colors.primary
|
|
3005
|
-
})]
|
|
3006
|
-
})
|
|
1956
|
+
}), !selectMode && uploading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_UploadBar.default, {
|
|
1957
|
+
uploadProgress: uploadProgress,
|
|
1958
|
+
isDark: bloomTheme.isDark,
|
|
1959
|
+
colors: colors,
|
|
1960
|
+
t: t
|
|
3007
1961
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
|
|
3008
1962
|
control: fileDeleteDialog,
|
|
3009
1963
|
title: t('fileManagement.deleteFile') || 'Delete File',
|