@oxyhq/services 5.16.23 → 5.16.25
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/OxyLogo.svg +1 -0
- package/lib/commonjs/assets/assets/OxyLogo.svg +1 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/lib/commonjs/assets/assets/icons/OxyServices.tsx +67 -0
- package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/assets/assets/illustrations/HighFive.tsx +41 -0
- package/lib/commonjs/assets/assets/lottie/welcomeheader_background_op1.json +1 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/lib/commonjs/assets/icons/OxyServices.js +51 -0
- package/lib/commonjs/assets/icons/OxyServices.js.map +1 -0
- package/lib/commonjs/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/assets/illustrations/HighFive.js +59 -0
- package/lib/commonjs/assets/illustrations/HighFive.js.map +1 -0
- package/lib/commonjs/assets/lottie/welcomeheader_background_op1.json +1 -0
- package/lib/commonjs/constants/version.js +28 -0
- package/lib/commonjs/constants/version.js.map +1 -0
- package/lib/commonjs/core/HttpService.js +507 -0
- package/lib/commonjs/core/HttpService.js.map +1 -0
- package/lib/commonjs/core/OxyServices.base.js +283 -0
- package/lib/commonjs/core/OxyServices.base.js.map +1 -0
- package/lib/commonjs/core/OxyServices.errors.js +26 -0
- package/lib/commonjs/core/OxyServices.errors.js.map +1 -0
- package/lib/commonjs/core/OxyServices.js +146 -0
- package/lib/commonjs/core/OxyServices.js.map +1 -0
- package/lib/commonjs/core/index.js +126 -0
- package/lib/commonjs/core/index.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.analytics.js +60 -0
- package/lib/commonjs/core/mixins/OxyServices.analytics.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.assets.js +375 -0
- package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.auth.js +271 -0
- package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.developer.js +115 -0
- package/lib/commonjs/core/mixins/OxyServices.developer.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.devices.js +133 -0
- package/lib/commonjs/core/mixins/OxyServices.devices.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.karma.js +117 -0
- package/lib/commonjs/core/mixins/OxyServices.karma.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.language.js +124 -0
- package/lib/commonjs/core/mixins/OxyServices.language.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.location.js +55 -0
- package/lib/commonjs/core/mixins/OxyServices.location.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.payment.js +168 -0
- package/lib/commonjs/core/mixins/OxyServices.payment.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.privacy.js +174 -0
- package/lib/commonjs/core/mixins/OxyServices.privacy.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.security.js +96 -0
- package/lib/commonjs/core/mixins/OxyServices.security.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.user.js +403 -0
- package/lib/commonjs/core/mixins/OxyServices.user.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.utility.js +165 -0
- package/lib/commonjs/core/mixins/OxyServices.utility.js.map +1 -0
- package/lib/commonjs/core/mixins/index.js +39 -0
- package/lib/commonjs/core/mixins/index.js.map +1 -0
- package/lib/commonjs/core/mixins/mixinHelpers.js +62 -0
- package/lib/commonjs/core/mixins/mixinHelpers.js.map +1 -0
- package/lib/commonjs/core/services/SessionService.js +163 -0
- package/lib/commonjs/core/services/SessionService.js.map +1 -0
- package/lib/commonjs/core/services/TokenService.js +206 -0
- package/lib/commonjs/core/services/TokenService.js.map +1 -0
- package/lib/commonjs/crypto/index.js +27 -0
- package/lib/commonjs/crypto/index.js.map +1 -0
- package/lib/commonjs/crypto/keyManager.js +511 -0
- package/lib/commonjs/crypto/keyManager.js.map +1 -0
- package/lib/commonjs/crypto/polyfill.js +86 -0
- package/lib/commonjs/crypto/polyfill.js.map +1 -0
- package/lib/commonjs/crypto/signatureService.js +289 -0
- package/lib/commonjs/crypto/signatureService.js.map +1 -0
- package/lib/commonjs/crypto/types.js +2 -0
- package/lib/commonjs/crypto/types.js.map +1 -0
- package/lib/commonjs/i18n/index.js +76 -0
- package/lib/commonjs/i18n/index.js.map +1 -0
- package/lib/commonjs/i18n/locales/ar-SA.json +120 -0
- package/lib/commonjs/i18n/locales/ca-ES.json +120 -0
- package/lib/commonjs/i18n/locales/de-DE.json +120 -0
- package/lib/commonjs/i18n/locales/en-US.json +956 -0
- package/lib/commonjs/i18n/locales/es-ES.json +723 -0
- package/lib/commonjs/i18n/locales/fr-FR.json +120 -0
- package/lib/commonjs/i18n/locales/it-IT.json +120 -0
- package/lib/commonjs/i18n/locales/ja-JP.json +119 -0
- package/lib/commonjs/i18n/locales/ko-KR.json +120 -0
- package/lib/commonjs/i18n/locales/pt-PT.json +120 -0
- package/lib/commonjs/i18n/locales/zh-CN.json +120 -0
- package/lib/commonjs/index.js +601 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/lib/sonner-safe.js +32 -0
- package/lib/commonjs/lib/sonner-safe.js.map +1 -0
- package/lib/commonjs/lib/sonner.js +23 -0
- package/lib/commonjs/lib/sonner.js.map +1 -0
- package/lib/commonjs/models/interfaces.js +76 -0
- package/lib/commonjs/models/interfaces.js.map +1 -0
- package/lib/commonjs/models/session.js +2 -0
- package/lib/commonjs/models/session.js.map +1 -0
- package/lib/commonjs/node/index.js +59 -0
- package/lib/commonjs/node/index.js.map +1 -0
- package/lib/commonjs/ui/components/ActivityIndicator.js +203 -0
- package/lib/commonjs/ui/components/ActivityIndicator.js.map +1 -0
- package/lib/commonjs/ui/components/AnimationExample.js +213 -0
- package/lib/commonjs/ui/components/AnimationExample.js.map +1 -0
- package/lib/commonjs/ui/components/AutoHeightScrollView.js +46 -0
- package/lib/commonjs/ui/components/AutoHeightScrollView.js.map +1 -0
- package/lib/commonjs/ui/components/Avatar.js +172 -0
- package/lib/commonjs/ui/components/Avatar.js.map +1 -0
- package/lib/commonjs/ui/components/BottomSheet.js +407 -0
- package/lib/commonjs/ui/components/BottomSheet.js.map +1 -0
- package/lib/commonjs/ui/components/BottomSheetRouter.js +366 -0
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -0
- package/lib/commonjs/ui/components/CrossFadeIcon.js +106 -0
- package/lib/commonjs/ui/components/CrossFadeIcon.js.map +1 -0
- package/lib/commonjs/ui/components/EmptyState.js +41 -0
- package/lib/commonjs/ui/components/EmptyState.js.map +1 -0
- package/lib/commonjs/ui/components/ErrorBoundary.js +145 -0
- package/lib/commonjs/ui/components/ErrorBoundary.js.map +1 -0
- package/lib/commonjs/ui/components/FollowButton.js +230 -0
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -0
- package/lib/commonjs/ui/components/FontLoader.js +162 -0
- package/lib/commonjs/ui/components/FontLoader.js.map +1 -0
- package/lib/commonjs/ui/components/GroupedItem.js +140 -0
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -0
- package/lib/commonjs/ui/components/GroupedSection.js +42 -0
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -0
- package/lib/commonjs/ui/components/Header.js +434 -0
- package/lib/commonjs/ui/components/Header.js.map +1 -0
- package/lib/commonjs/ui/components/HelperText.js +103 -0
- package/lib/commonjs/ui/components/HelperText.js.map +1 -0
- package/lib/commonjs/ui/components/Icon.js +109 -0
- package/lib/commonjs/ui/components/Icon.js.map +1 -0
- package/lib/commonjs/ui/components/IconButton/IconButton.js +159 -0
- package/lib/commonjs/ui/components/IconButton/IconButton.js.map +1 -0
- package/lib/commonjs/ui/components/IconButton/utils.js +155 -0
- package/lib/commonjs/ui/components/IconButton/utils.js.map +1 -0
- package/lib/commonjs/ui/components/LoadingState.js +47 -0
- package/lib/commonjs/ui/components/LoadingState.js.map +1 -0
- package/lib/commonjs/ui/components/OxyLogo.js +54 -0
- package/lib/commonjs/ui/components/OxyLogo.js.map +1 -0
- package/lib/commonjs/ui/components/OxyPayButton.js +117 -0
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +144 -0
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -0
- package/lib/commonjs/ui/components/OxySignInButton.js +180 -0
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -0
- package/lib/commonjs/ui/components/ProfileCard.js +138 -0
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -0
- package/lib/commonjs/ui/components/QuickActions.js +88 -0
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -0
- package/lib/commonjs/ui/components/Section.js +39 -0
- package/lib/commonjs/ui/components/Section.js.map +1 -0
- package/lib/commonjs/ui/components/SectionTitle.js +35 -0
- package/lib/commonjs/ui/components/SectionTitle.js.map +1 -0
- package/lib/commonjs/ui/components/SettingRow.js +77 -0
- package/lib/commonjs/ui/components/SettingRow.js.map +1 -0
- package/lib/commonjs/ui/components/StepBasedScreen.js +397 -0
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -0
- package/lib/commonjs/ui/components/Surface.js +258 -0
- package/lib/commonjs/ui/components/Surface.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Addons/Outline.js +46 -0
- package/lib/commonjs/ui/components/TextField/Addons/Outline.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Addons/Underline.js +53 -0
- package/lib/commonjs/ui/components/TextField/Addons/Underline.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.js +155 -0
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAffix.js +144 -0
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAffix.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldIcon.js +137 -0
- package/lib/commonjs/ui/components/TextField/Adornment/TextFieldIcon.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Adornment/enums.js +22 -0
- package/lib/commonjs/ui/components/TextField/Adornment/enums.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Adornment/types.js +6 -0
- package/lib/commonjs/ui/components/TextField/Adornment/types.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Adornment/utils.js +62 -0
- package/lib/commonjs/ui/components/TextField/Adornment/utils.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Label/InputLabel.js +176 -0
- package/lib/commonjs/ui/components/TextField/Label/InputLabel.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/Label/LabelBackground.js +84 -0
- package/lib/commonjs/ui/components/TextField/Label/LabelBackground.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/TextFieldFlat.js +379 -0
- package/lib/commonjs/ui/components/TextField/TextFieldFlat.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/TextFieldOutlined.js +363 -0
- package/lib/commonjs/ui/components/TextField/TextFieldOutlined.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/constants.js +50 -0
- package/lib/commonjs/ui/components/TextField/constants.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/helpers.js +490 -0
- package/lib/commonjs/ui/components/TextField/helpers.js.map +1 -0
- package/lib/commonjs/ui/components/TextField/types.js +6 -0
- package/lib/commonjs/ui/components/TextField/types.js.map +1 -0
- package/lib/commonjs/ui/components/TextField.js +339 -0
- package/lib/commonjs/ui/components/TextField.js.map +1 -0
- package/lib/commonjs/ui/components/TouchableRipple/Pressable.js +12 -0
- package/lib/commonjs/ui/components/TouchableRipple/Pressable.js.map +1 -0
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.js +258 -0
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.js.map +1 -0
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js +107 -0
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js.map +1 -0
- package/lib/commonjs/ui/components/TouchableRipple/utils.js +56 -0
- package/lib/commonjs/ui/components/TouchableRipple/utils.js.map +1 -0
- package/lib/commonjs/ui/components/Typography/AnimatedText.js +62 -0
- package/lib/commonjs/ui/components/Typography/AnimatedText.js.map +1 -0
- package/lib/commonjs/ui/components/Typography/types.js +26 -0
- package/lib/commonjs/ui/components/Typography/types.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +171 -0
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +409 -0
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +181 -0
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/styles.js +868 -0
- package/lib/commonjs/ui/components/fileManagement/styles.js.map +1 -0
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js +64 -0
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js.map +1 -0
- package/lib/commonjs/ui/components/icon/OxyIcon.js +25 -0
- package/lib/commonjs/ui/components/icon/OxyIcon.js.map +1 -0
- package/lib/commonjs/ui/components/icon/index.js +21 -0
- package/lib/commonjs/ui/components/icon/index.js.map +1 -0
- package/lib/commonjs/ui/components/index.js +132 -0
- package/lib/commonjs/ui/components/index.js.map +1 -0
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +209 -0
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -0
- package/lib/commonjs/ui/components/internal/PinInput.js +115 -0
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -0
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +161 -0
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditBioModal.js +181 -0
- package/lib/commonjs/ui/components/profile/EditBioModal.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js +204 -0
- package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditEmailModal.js +184 -0
- package/lib/commonjs/ui/components/profile/EditEmailModal.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditLinksModal.js +315 -0
- package/lib/commonjs/ui/components/profile/EditLinksModal.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditLocationModal.js +273 -0
- package/lib/commonjs/ui/components/profile/EditLocationModal.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditUsernameModal.js +180 -0
- package/lib/commonjs/ui/components/profile/EditUsernameModal.js.map +1 -0
- package/lib/commonjs/ui/components/styles/overlay.js +85 -0
- package/lib/commonjs/ui/components/styles/overlay.js.map +1 -0
- package/lib/commonjs/ui/components/styles/shadow.js +132 -0
- package/lib/commonjs/ui/components/styles/shadow.js.map +1 -0
- package/lib/commonjs/ui/components/theming.js +116 -0
- package/lib/commonjs/ui/components/theming.js.map +1 -0
- package/lib/commonjs/ui/components/types.js +2 -0
- package/lib/commonjs/ui/components/types.js.map +1 -0
- package/lib/commonjs/ui/components/utils/forwardRef.js +18 -0
- package/lib/commonjs/ui/components/utils/forwardRef.js.map +1 -0
- package/lib/commonjs/ui/components/utils/hasTouchHandler.js +13 -0
- package/lib/commonjs/ui/components/utils/hasTouchHandler.js.map +1 -0
- package/lib/commonjs/ui/components/utils/roundLayoutSize.js +9 -0
- package/lib/commonjs/ui/components/utils/roundLayoutSize.js.map +1 -0
- package/lib/commonjs/ui/components/utils/splitStyles.js +50 -0
- package/lib/commonjs/ui/components/utils/splitStyles.js.map +1 -0
- package/lib/commonjs/ui/constants/iconColors.js +84 -0
- package/lib/commonjs/ui/constants/iconColors.js.map +1 -0
- package/lib/commonjs/ui/constants/spacing.js +50 -0
- package/lib/commonjs/ui/constants/spacing.js.map +1 -0
- package/lib/commonjs/ui/constants/theme.js +123 -0
- package/lib/commonjs/ui/constants/theme.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +815 -0
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -0
- package/lib/commonjs/ui/context/ThemeContext.js +36 -0
- package/lib/commonjs/ui/context/ThemeContext.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +621 -0
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useDeviceManagement.js +73 -0
- package/lib/commonjs/ui/context/hooks/useDeviceManagement.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useLanguageManagement.js +112 -0
- package/lib/commonjs/ui/context/hooks/useLanguageManagement.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useSessionManagement.js +281 -0
- package/lib/commonjs/ui/context/hooks/useSessionManagement.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useStorage.js +79 -0
- package/lib/commonjs/ui/context/hooks/useStorage.js.map +1 -0
- package/lib/commonjs/ui/hooks/index.js +46 -0
- package/lib/commonjs/ui/hooks/index.js.map +1 -0
- package/lib/commonjs/ui/hooks/mutations/index.js +68 -0
- package/lib/commonjs/ui/hooks/mutations/index.js.map +1 -0
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +552 -0
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -0
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +193 -0
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -0
- package/lib/commonjs/ui/hooks/queries/index.js +118 -0
- package/lib/commonjs/ui/hooks/queries/index.js.map +1 -0
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +96 -0
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -0
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +220 -0
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -0
- package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js +58 -0
- package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js.map +1 -0
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +186 -0
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -0
- package/lib/commonjs/ui/hooks/queryClient.js +117 -0
- package/lib/commonjs/ui/hooks/queryClient.js.map +1 -0
- package/lib/commonjs/ui/hooks/use-color-scheme.js +29 -0
- package/lib/commonjs/ui/hooks/use-color-scheme.js.map +1 -0
- package/lib/commonjs/ui/hooks/use-haptic-press.js +21 -0
- package/lib/commonjs/ui/hooks/use-haptic-press.js.map +1 -0
- package/lib/commonjs/ui/hooks/useAssets.js +245 -0
- package/lib/commonjs/ui/hooks/useAssets.js.map +1 -0
- package/lib/commonjs/ui/hooks/useDeviceManagement.js +73 -0
- package/lib/commonjs/ui/hooks/useDeviceManagement.js.map +1 -0
- package/lib/commonjs/ui/hooks/useFileDownloadUrl.js +103 -0
- package/lib/commonjs/ui/hooks/useFileDownloadUrl.js.map +1 -0
- package/lib/commonjs/ui/hooks/useFollow.js +167 -0
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -0
- package/lib/commonjs/ui/hooks/useFollow.types.js +2 -0
- package/lib/commonjs/ui/hooks/useFollow.types.js.map +1 -0
- package/lib/commonjs/ui/hooks/useI18n.js +22 -0
- package/lib/commonjs/ui/hooks/useI18n.js.map +1 -0
- package/lib/commonjs/ui/hooks/useLanguageManagement.js +112 -0
- package/lib/commonjs/ui/hooks/useLanguageManagement.js.map +1 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js +107 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -0
- package/lib/commonjs/ui/hooks/useQueryClient.js +20 -0
- package/lib/commonjs/ui/hooks/useQueryClient.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSessionManagement.js +281 -0
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSessionSocket.js +495 -0
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -0
- package/lib/commonjs/ui/hooks/useStorage.js +79 -0
- package/lib/commonjs/ui/hooks/useStorage.js.map +1 -0
- package/lib/commonjs/ui/hooks/useThemeColors.js +31 -0
- package/lib/commonjs/ui/hooks/useThemeColors.js.map +1 -0
- package/lib/commonjs/ui/hooks/useThemeStyles.js +69 -0
- package/lib/commonjs/ui/hooks/useThemeStyles.js.map +1 -0
- package/lib/commonjs/ui/index.js +101 -0
- package/lib/commonjs/ui/index.js.map +1 -0
- package/lib/commonjs/ui/isFrontend.js +10 -0
- package/lib/commonjs/ui/isFrontend.js.map +1 -0
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +180 -0
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -0
- package/lib/commonjs/ui/navigation/routes.js +88 -0
- package/lib/commonjs/ui/navigation/routes.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +329 -0
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +752 -0
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +2163 -0
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +703 -0
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +210 -0
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AppInfoScreen.js +414 -0
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FeedbackScreen.js +1191 -0
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +2333 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +134 -0
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +218 -0
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +218 -0
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +184 -0
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +537 -0
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +1587 -0
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +1647 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +479 -0
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ProfileScreen.js +647 -0
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +167 -0
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +166 -0
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +445 -0
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/UserLinksScreen.js +86 -0
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +434 -0
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +98 -0
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +343 -0
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +194 -0
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +151 -0
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +609 -0
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +109 -0
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -0
- package/lib/commonjs/ui/stores/accountStore.js +252 -0
- package/lib/commonjs/ui/stores/accountStore.js.map +1 -0
- package/lib/commonjs/ui/stores/assetStore.js +225 -0
- package/lib/commonjs/ui/stores/assetStore.js.map +1 -0
- package/lib/commonjs/ui/stores/authStore.js +85 -0
- package/lib/commonjs/ui/stores/authStore.js.map +1 -0
- package/lib/commonjs/ui/stores/fileStore.js +153 -0
- package/lib/commonjs/ui/stores/fileStore.js.map +1 -0
- package/lib/commonjs/ui/stores/followStore.js +229 -0
- package/lib/commonjs/ui/stores/followStore.js.map +1 -0
- package/lib/commonjs/ui/styles/authStyles.js +338 -0
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -0
- package/lib/commonjs/ui/styles/fonts.js +84 -0
- package/lib/commonjs/ui/styles/fonts.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +50 -0
- package/lib/commonjs/ui/styles/index.js.map +1 -0
- package/lib/commonjs/ui/styles/spacing.js +109 -0
- package/lib/commonjs/ui/styles/spacing.js.map +1 -0
- package/lib/commonjs/ui/styles/theme.js +121 -0
- package/lib/commonjs/ui/styles/theme.js.map +1 -0
- package/lib/commonjs/ui/types/fileManagement.js +6 -0
- package/lib/commonjs/ui/types/fileManagement.js.map +1 -0
- package/lib/commonjs/ui/types/navigation.js +6 -0
- package/lib/commonjs/ui/types/navigation.js.map +1 -0
- package/lib/commonjs/ui/utils/avatarUtils.js +131 -0
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -0
- package/lib/commonjs/ui/utils/colorUtils.js +52 -0
- package/lib/commonjs/ui/utils/colorUtils.js.map +1 -0
- package/lib/commonjs/ui/utils/confirmAction.js +28 -0
- package/lib/commonjs/ui/utils/confirmAction.js.map +1 -0
- package/lib/commonjs/ui/utils/errorHandlers.js +137 -0
- package/lib/commonjs/ui/utils/errorHandlers.js.map +1 -0
- package/lib/commonjs/ui/utils/fileManagement.js +260 -0
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -0
- package/lib/commonjs/ui/utils/sessionHelpers.js +101 -0
- package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -0
- package/lib/commonjs/ui/utils/storageHelpers.js +119 -0
- package/lib/commonjs/ui/utils/storageHelpers.js.map +1 -0
- package/lib/commonjs/ui/utils/themeUtils.js +47 -0
- package/lib/commonjs/ui/utils/themeUtils.js.map +1 -0
- package/lib/commonjs/ui/utils/user-utils.js +53 -0
- package/lib/commonjs/ui/utils/user-utils.js.map +1 -0
- package/lib/commonjs/utils/apiUtils.js +79 -0
- package/lib/commonjs/utils/apiUtils.js.map +1 -0
- package/lib/commonjs/utils/asyncUtils.js +207 -0
- package/lib/commonjs/utils/asyncUtils.js.map +1 -0
- package/lib/commonjs/utils/cache.js +259 -0
- package/lib/commonjs/utils/cache.js.map +1 -0
- package/lib/commonjs/utils/deviceManager.js +177 -0
- package/lib/commonjs/utils/deviceManager.js.map +1 -0
- package/lib/commonjs/utils/errorUtils.js +181 -0
- package/lib/commonjs/utils/errorUtils.js.map +1 -0
- package/lib/commonjs/utils/hookUtils.js +399 -0
- package/lib/commonjs/utils/hookUtils.js.map +1 -0
- package/lib/commonjs/utils/index.js +106 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/commonjs/utils/languageUtils.js +159 -0
- package/lib/commonjs/utils/languageUtils.js.map +1 -0
- package/lib/commonjs/utils/loggerUtils.js +160 -0
- package/lib/commonjs/utils/loggerUtils.js.map +1 -0
- package/lib/commonjs/utils/requestUtils.js +217 -0
- package/lib/commonjs/utils/requestUtils.js.map +1 -0
- package/lib/commonjs/utils/sessionUtils.js +191 -0
- package/lib/commonjs/utils/sessionUtils.js.map +1 -0
- package/lib/commonjs/utils/validationUtils.js +191 -0
- package/lib/commonjs/utils/validationUtils.js.map +1 -0
- package/lib/module/assets/OxyLogo.svg +1 -0
- package/lib/module/assets/assets/OxyLogo.svg +1 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/lib/module/assets/assets/icons/OxyServices.tsx +67 -0
- package/lib/module/assets/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/assets/assets/illustrations/HighFive.tsx +41 -0
- package/lib/module/assets/assets/lottie/welcomeheader_background_op1.json +1 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/lib/module/assets/icons/OxyServices.js +45 -0
- package/lib/module/assets/icons/OxyServices.js.map +1 -0
- package/lib/module/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/assets/illustrations/HighFive.js +54 -0
- package/lib/module/assets/illustrations/HighFive.js.map +1 -0
- package/lib/module/assets/lottie/welcomeheader_background_op1.json +1 -0
- package/lib/module/constants/version.js +21 -0
- package/lib/module/constants/version.js.map +1 -0
- package/lib/module/core/HttpService.js +502 -0
- package/lib/module/core/HttpService.js.map +1 -0
- package/lib/module/core/OxyServices.base.js +278 -0
- package/lib/module/core/OxyServices.base.js.map +1 -0
- package/lib/module/core/OxyServices.errors.js +20 -0
- package/lib/module/core/OxyServices.errors.js.map +1 -0
- package/lib/module/core/OxyServices.js +131 -0
- package/lib/module/core/OxyServices.js.map +1 -0
- package/lib/module/core/index.js +27 -0
- package/lib/module/core/index.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.analytics.js +56 -0
- package/lib/module/core/mixins/OxyServices.analytics.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.assets.js +371 -0
- package/lib/module/core/mixins/OxyServices.assets.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.auth.js +267 -0
- package/lib/module/core/mixins/OxyServices.auth.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.developer.js +111 -0
- package/lib/module/core/mixins/OxyServices.developer.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.devices.js +129 -0
- package/lib/module/core/mixins/OxyServices.devices.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.karma.js +113 -0
- package/lib/module/core/mixins/OxyServices.karma.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.language.js +120 -0
- package/lib/module/core/mixins/OxyServices.language.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.location.js +51 -0
- package/lib/module/core/mixins/OxyServices.location.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.payment.js +164 -0
- package/lib/module/core/mixins/OxyServices.payment.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.privacy.js +170 -0
- package/lib/module/core/mixins/OxyServices.privacy.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.security.js +92 -0
- package/lib/module/core/mixins/OxyServices.security.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.user.js +399 -0
- package/lib/module/core/mixins/OxyServices.user.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.utility.js +160 -0
- package/lib/module/core/mixins/OxyServices.utility.js.map +1 -0
- package/lib/module/core/mixins/index.js +36 -0
- package/lib/module/core/mixins/index.js.map +1 -0
- package/lib/module/core/mixins/mixinHelpers.js +56 -0
- package/lib/module/core/mixins/mixinHelpers.js.map +1 -0
- package/lib/module/core/services/SessionService.js +159 -0
- package/lib/module/core/services/SessionService.js.map +1 -0
- package/lib/module/core/services/TokenService.js +203 -0
- package/lib/module/core/services/TokenService.js.map +1 -0
- package/lib/module/crypto/index.js +16 -0
- package/lib/module/crypto/index.js.map +1 -0
- package/lib/module/crypto/keyManager.js +508 -0
- package/lib/module/crypto/keyManager.js.map +1 -0
- package/lib/module/crypto/polyfill.js +78 -0
- package/lib/module/crypto/polyfill.js.map +1 -0
- package/lib/module/crypto/signatureService.js +286 -0
- package/lib/module/crypto/signatureService.js.map +1 -0
- package/lib/module/crypto/types.js +2 -0
- package/lib/module/crypto/types.js.map +1 -0
- package/lib/module/i18n/index.js +71 -0
- package/lib/module/i18n/index.js.map +1 -0
- package/lib/module/i18n/locales/ar-SA.json +120 -0
- package/lib/module/i18n/locales/ca-ES.json +120 -0
- package/lib/module/i18n/locales/de-DE.json +120 -0
- package/lib/module/i18n/locales/en-US.json +956 -0
- package/lib/module/i18n/locales/es-ES.json +723 -0
- package/lib/module/i18n/locales/fr-FR.json +120 -0
- package/lib/module/i18n/locales/it-IT.json +120 -0
- package/lib/module/i18n/locales/ja-JP.json +119 -0
- package/lib/module/i18n/locales/ko-KR.json +120 -0
- package/lib/module/i18n/locales/pt-PT.json +120 -0
- package/lib/module/i18n/locales/zh-CN.json +120 -0
- package/lib/module/index.js +74 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/lib/sonner-safe.js +29 -0
- package/lib/module/lib/sonner-safe.js.map +1 -0
- package/lib/module/lib/sonner.js +19 -0
- package/lib/module/lib/sonner.js.map +1 -0
- package/lib/module/models/interfaces.js +72 -0
- package/lib/module/models/interfaces.js.map +1 -0
- package/lib/module/models/session.js +2 -0
- package/lib/module/models/session.js.map +1 -0
- package/lib/module/node/index.js +20 -0
- package/lib/module/node/index.js.map +1 -0
- package/lib/module/ui/components/ActivityIndicator.js +198 -0
- package/lib/module/ui/components/ActivityIndicator.js.map +1 -0
- package/lib/module/ui/components/AnimationExample.js +209 -0
- package/lib/module/ui/components/AnimationExample.js.map +1 -0
- package/lib/module/ui/components/AutoHeightScrollView.js +41 -0
- package/lib/module/ui/components/AutoHeightScrollView.js.map +1 -0
- package/lib/module/ui/components/Avatar.js +168 -0
- package/lib/module/ui/components/Avatar.js.map +1 -0
- package/lib/module/ui/components/BottomSheet.js +402 -0
- package/lib/module/ui/components/BottomSheet.js.map +1 -0
- package/lib/module/ui/components/BottomSheetRouter.js +356 -0
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -0
- package/lib/module/ui/components/CrossFadeIcon.js +101 -0
- package/lib/module/ui/components/CrossFadeIcon.js.map +1 -0
- package/lib/module/ui/components/EmptyState.js +36 -0
- package/lib/module/ui/components/EmptyState.js.map +1 -0
- package/lib/module/ui/components/ErrorBoundary.js +139 -0
- package/lib/module/ui/components/ErrorBoundary.js.map +1 -0
- package/lib/module/ui/components/FollowButton.js +226 -0
- package/lib/module/ui/components/FollowButton.js.map +1 -0
- package/lib/module/ui/components/FontLoader.js +157 -0
- package/lib/module/ui/components/FontLoader.js.map +1 -0
- package/lib/module/ui/components/GroupedItem.js +135 -0
- package/lib/module/ui/components/GroupedItem.js.map +1 -0
- package/lib/module/ui/components/GroupedSection.js +37 -0
- package/lib/module/ui/components/GroupedSection.js.map +1 -0
- package/lib/module/ui/components/Header.js +428 -0
- package/lib/module/ui/components/Header.js.map +1 -0
- package/lib/module/ui/components/HelperText.js +99 -0
- package/lib/module/ui/components/HelperText.js.map +1 -0
- package/lib/module/ui/components/Icon.js +102 -0
- package/lib/module/ui/components/Icon.js.map +1 -0
- package/lib/module/ui/components/IconButton/IconButton.js +153 -0
- package/lib/module/ui/components/IconButton/IconButton.js.map +1 -0
- package/lib/module/ui/components/IconButton/utils.js +149 -0
- package/lib/module/ui/components/IconButton/utils.js.map +1 -0
- package/lib/module/ui/components/LoadingState.js +42 -0
- package/lib/module/ui/components/LoadingState.js.map +1 -0
- package/lib/module/ui/components/OxyLogo.js +48 -0
- package/lib/module/ui/components/OxyLogo.js.map +1 -0
- package/lib/module/ui/components/OxyPayButton.js +112 -0
- package/lib/module/ui/components/OxyPayButton.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +140 -0
- package/lib/module/ui/components/OxyProvider.js.map +1 -0
- package/lib/module/ui/components/OxySignInButton.js +174 -0
- package/lib/module/ui/components/OxySignInButton.js.map +1 -0
- package/lib/module/ui/components/ProfileCard.js +133 -0
- package/lib/module/ui/components/ProfileCard.js.map +1 -0
- package/lib/module/ui/components/QuickActions.js +84 -0
- package/lib/module/ui/components/QuickActions.js.map +1 -0
- package/lib/module/ui/components/Section.js +34 -0
- package/lib/module/ui/components/Section.js.map +1 -0
- package/lib/module/ui/components/SectionTitle.js +31 -0
- package/lib/module/ui/components/SectionTitle.js.map +1 -0
- package/lib/module/ui/components/SettingRow.js +72 -0
- package/lib/module/ui/components/SettingRow.js.map +1 -0
- package/lib/module/ui/components/StepBasedScreen.js +392 -0
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -0
- package/lib/module/ui/components/Surface.js +252 -0
- package/lib/module/ui/components/Surface.js.map +1 -0
- package/lib/module/ui/components/TextField/Addons/Outline.js +40 -0
- package/lib/module/ui/components/TextField/Addons/Outline.js.map +1 -0
- package/lib/module/ui/components/TextField/Addons/Underline.js +47 -0
- package/lib/module/ui/components/TextField/Addons/Underline.js.map +1 -0
- package/lib/module/ui/components/TextField/Adornment/TextFieldAdornment.js +148 -0
- package/lib/module/ui/components/TextField/Adornment/TextFieldAdornment.js.map +1 -0
- package/lib/module/ui/components/TextField/Adornment/TextFieldAffix.js +141 -0
- package/lib/module/ui/components/TextField/Adornment/TextFieldAffix.js.map +1 -0
- package/lib/module/ui/components/TextField/Adornment/TextFieldIcon.js +135 -0
- package/lib/module/ui/components/TextField/Adornment/TextFieldIcon.js.map +1 -0
- package/lib/module/ui/components/TextField/Adornment/enums.js +18 -0
- package/lib/module/ui/components/TextField/Adornment/enums.js.map +1 -0
- package/lib/module/ui/components/TextField/Adornment/types.js +4 -0
- package/lib/module/ui/components/TextField/Adornment/types.js.map +1 -0
- package/lib/module/ui/components/TextField/Adornment/utils.js +57 -0
- package/lib/module/ui/components/TextField/Adornment/utils.js.map +1 -0
- package/lib/module/ui/components/TextField/Label/InputLabel.js +171 -0
- package/lib/module/ui/components/TextField/Label/InputLabel.js.map +1 -0
- package/lib/module/ui/components/TextField/Label/LabelBackground.js +78 -0
- package/lib/module/ui/components/TextField/Label/LabelBackground.js.map +1 -0
- package/lib/module/ui/components/TextField/TextFieldFlat.js +374 -0
- package/lib/module/ui/components/TextField/TextFieldFlat.js.map +1 -0
- package/lib/module/ui/components/TextField/TextFieldOutlined.js +357 -0
- package/lib/module/ui/components/TextField/TextFieldOutlined.js.map +1 -0
- package/lib/module/ui/components/TextField/constants.js +46 -0
- package/lib/module/ui/components/TextField/constants.js.map +1 -0
- package/lib/module/ui/components/TextField/helpers.js +472 -0
- package/lib/module/ui/components/TextField/helpers.js.map +1 -0
- package/lib/module/ui/components/TextField/types.js +4 -0
- package/lib/module/ui/components/TextField/types.js.map +1 -0
- package/lib/module/ui/components/TextField.js +333 -0
- package/lib/module/ui/components/TextField.js.map +1 -0
- package/lib/module/ui/components/TouchableRipple/Pressable.js +9 -0
- package/lib/module/ui/components/TouchableRipple/Pressable.js.map +1 -0
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.js +253 -0
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.js.map +1 -0
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js +101 -0
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js.map +1 -0
- package/lib/module/ui/components/TouchableRipple/utils.js +50 -0
- package/lib/module/ui/components/TouchableRipple/utils.js.map +1 -0
- package/lib/module/ui/components/Typography/AnimatedText.js +56 -0
- package/lib/module/ui/components/Typography/AnimatedText.js.map +1 -0
- package/lib/module/ui/components/Typography/types.js +22 -0
- package/lib/module/ui/components/Typography/types.js.map +1 -0
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +165 -0
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -0
- package/lib/module/ui/components/fileManagement/FileViewer.js +402 -0
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -0
- package/lib/module/ui/components/fileManagement/UploadPreview.js +175 -0
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -0
- package/lib/module/ui/components/fileManagement/styles.js +864 -0
- package/lib/module/ui/components/fileManagement/styles.js.map +1 -0
- package/lib/module/ui/components/icon/FAIRWalletIcon.js +59 -0
- package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +1 -0
- package/lib/module/ui/components/icon/OxyIcon.js +21 -0
- package/lib/module/ui/components/icon/OxyIcon.js.map +1 -0
- package/lib/module/ui/components/icon/index.js +5 -0
- package/lib/module/ui/components/icon/index.js.map +1 -0
- package/lib/module/ui/components/index.js +22 -0
- package/lib/module/ui/components/index.js.map +1 -0
- package/lib/module/ui/components/internal/GroupedPillButtons.js +205 -0
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -0
- package/lib/module/ui/components/internal/PinInput.js +110 -0
- package/lib/module/ui/components/internal/PinInput.js.map +1 -0
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +156 -0
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -0
- package/lib/module/ui/components/profile/EditBioModal.js +175 -0
- package/lib/module/ui/components/profile/EditBioModal.js.map +1 -0
- package/lib/module/ui/components/profile/EditDisplayNameModal.js +198 -0
- package/lib/module/ui/components/profile/EditDisplayNameModal.js.map +1 -0
- package/lib/module/ui/components/profile/EditEmailModal.js +178 -0
- package/lib/module/ui/components/profile/EditEmailModal.js.map +1 -0
- package/lib/module/ui/components/profile/EditLinksModal.js +309 -0
- package/lib/module/ui/components/profile/EditLinksModal.js.map +1 -0
- package/lib/module/ui/components/profile/EditLocationModal.js +267 -0
- package/lib/module/ui/components/profile/EditLocationModal.js.map +1 -0
- package/lib/module/ui/components/profile/EditUsernameModal.js +174 -0
- package/lib/module/ui/components/profile/EditUsernameModal.js.map +1 -0
- package/lib/module/ui/components/styles/overlay.js +80 -0
- package/lib/module/ui/components/styles/overlay.js.map +1 -0
- package/lib/module/ui/components/styles/shadow.js +128 -0
- package/lib/module/ui/components/styles/shadow.js.map +1 -0
- package/lib/module/ui/components/theming.js +111 -0
- package/lib/module/ui/components/theming.js.map +1 -0
- package/lib/module/ui/components/types.js +2 -0
- package/lib/module/ui/components/types.js.map +1 -0
- package/lib/module/ui/components/utils/forwardRef.js +13 -0
- package/lib/module/ui/components/utils/forwardRef.js.map +1 -0
- package/lib/module/ui/components/utils/hasTouchHandler.js +9 -0
- package/lib/module/ui/components/utils/hasTouchHandler.js.map +1 -0
- package/lib/module/ui/components/utils/roundLayoutSize.js +4 -0
- package/lib/module/ui/components/utils/roundLayoutSize.js.map +1 -0
- package/lib/module/ui/components/utils/splitStyles.js +46 -0
- package/lib/module/ui/components/utils/splitStyles.js.map +1 -0
- package/lib/module/ui/constants/iconColors.js +78 -0
- package/lib/module/ui/constants/iconColors.js.map +1 -0
- package/lib/module/ui/constants/spacing.js +45 -0
- package/lib/module/ui/constants/spacing.js.map +1 -0
- package/lib/module/ui/constants/theme.js +119 -0
- package/lib/module/ui/constants/theme.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +809 -0
- package/lib/module/ui/context/OxyContext.js.map +1 -0
- package/lib/module/ui/context/ThemeContext.js +29 -0
- package/lib/module/ui/context/ThemeContext.js.map +1 -0
- package/lib/module/ui/context/hooks/useAuthOperations.js +615 -0
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -0
- package/lib/module/ui/context/hooks/useDeviceManagement.js +68 -0
- package/lib/module/ui/context/hooks/useDeviceManagement.js.map +1 -0
- package/lib/module/ui/context/hooks/useLanguageManagement.js +107 -0
- package/lib/module/ui/context/hooks/useLanguageManagement.js.map +1 -0
- package/lib/module/ui/context/hooks/useSessionManagement.js +276 -0
- package/lib/module/ui/context/hooks/useSessionManagement.js.map +1 -0
- package/lib/module/ui/context/hooks/useStorage.js +74 -0
- package/lib/module/ui/context/hooks/useStorage.js.map +1 -0
- package/lib/module/ui/hooks/index.js +7 -0
- package/lib/module/ui/hooks/index.js.map +1 -0
- package/lib/module/ui/hooks/mutations/index.js +15 -0
- package/lib/module/ui/hooks/mutations/index.js.map +1 -0
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +544 -0
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -0
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +185 -0
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -0
- package/lib/module/ui/hooks/queries/index.js +21 -0
- package/lib/module/ui/hooks/queries/index.js.map +1 -0
- package/lib/module/ui/hooks/queries/queryKeys.js +89 -0
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -0
- package/lib/module/ui/hooks/queries/useAccountQueries.js +210 -0
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -0
- package/lib/module/ui/hooks/queries/useSecurityQueries.js +52 -0
- package/lib/module/ui/hooks/queries/useSecurityQueries.js.map +1 -0
- package/lib/module/ui/hooks/queries/useServicesQueries.js +178 -0
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -0
- package/lib/module/ui/hooks/queryClient.js +110 -0
- package/lib/module/ui/hooks/queryClient.js.map +1 -0
- package/lib/module/ui/hooks/use-color-scheme.js +26 -0
- package/lib/module/ui/hooks/use-color-scheme.js.map +1 -0
- package/lib/module/ui/hooks/use-haptic-press.js +17 -0
- package/lib/module/ui/hooks/use-haptic-press.js.map +1 -0
- package/lib/module/ui/hooks/useAssets.js +239 -0
- package/lib/module/ui/hooks/useAssets.js.map +1 -0
- package/lib/module/ui/hooks/useDeviceManagement.js +68 -0
- package/lib/module/ui/hooks/useDeviceManagement.js.map +1 -0
- package/lib/module/ui/hooks/useFileDownloadUrl.js +97 -0
- package/lib/module/ui/hooks/useFileDownloadUrl.js.map +1 -0
- package/lib/module/ui/hooks/useFollow.js +161 -0
- package/lib/module/ui/hooks/useFollow.js.map +1 -0
- package/lib/module/ui/hooks/useFollow.types.js +2 -0
- package/lib/module/ui/hooks/useFollow.types.js.map +1 -0
- package/lib/module/ui/hooks/useI18n.js +18 -0
- package/lib/module/ui/hooks/useI18n.js.map +1 -0
- package/lib/module/ui/hooks/useLanguageManagement.js +107 -0
- package/lib/module/ui/hooks/useLanguageManagement.js.map +1 -0
- package/lib/module/ui/hooks/useProfileEditing.js +102 -0
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -0
- package/lib/module/ui/hooks/useQueryClient.js +15 -0
- package/lib/module/ui/hooks/useQueryClient.js.map +1 -0
- package/lib/module/ui/hooks/useSessionManagement.js +276 -0
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -0
- package/lib/module/ui/hooks/useSessionSocket.js +490 -0
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -0
- package/lib/module/ui/hooks/useStorage.js +74 -0
- package/lib/module/ui/hooks/useStorage.js.map +1 -0
- package/lib/module/ui/hooks/useThemeColors.js +27 -0
- package/lib/module/ui/hooks/useThemeColors.js.map +1 -0
- package/lib/module/ui/hooks/useThemeStyles.js +64 -0
- package/lib/module/ui/hooks/useThemeStyles.js.map +1 -0
- package/lib/module/ui/index.js +63 -0
- package/lib/module/ui/index.js.map +1 -0
- package/lib/module/ui/isFrontend.js +6 -0
- package/lib/module/ui/isFrontend.js.map +1 -0
- package/lib/module/ui/navigation/bottomSheetManager.js +168 -0
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -0
- package/lib/module/ui/navigation/routes.js +82 -0
- package/lib/module/ui/navigation/routes.js.map +1 -0
- package/lib/module/ui/screens/AccountCenterScreen.js +324 -0
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountOverviewScreen.js +747 -0
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountSettingsScreen.js +2158 -0
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountSwitcherScreen.js +698 -0
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountVerificationScreen.js +205 -0
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -0
- package/lib/module/ui/screens/AppInfoScreen.js +409 -0
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -0
- package/lib/module/ui/screens/FeedbackScreen.js +1186 -0
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +2327 -0
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/HelpSupportScreen.js +129 -0
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -0
- package/lib/module/ui/screens/HistoryViewScreen.js +213 -0
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -0
- package/lib/module/ui/screens/LanguageSelectorScreen.js +213 -0
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -0
- package/lib/module/ui/screens/LegalDocumentsScreen.js +179 -0
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -0
- package/lib/module/ui/screens/OxyAuthScreen.js +533 -0
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -0
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1583 -0
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1643 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/module/ui/screens/PrivacySettingsScreen.js +474 -0
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -0
- package/lib/module/ui/screens/ProfileScreen.js +642 -0
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -0
- package/lib/module/ui/screens/SavesCollectionsScreen.js +162 -0
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -0
- package/lib/module/ui/screens/SearchSettingsScreen.js +161 -0
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -0
- package/lib/module/ui/screens/SessionManagementScreen.js +442 -0
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/UserLinksScreen.js +82 -0
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -0
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +428 -0
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +94 -0
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +339 -0
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +189 -0
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +146 -0
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +605 -0
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +105 -0
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -0
- package/lib/module/ui/stores/accountStore.js +244 -0
- package/lib/module/ui/stores/accountStore.js.map +1 -0
- package/lib/module/ui/stores/assetStore.js +212 -0
- package/lib/module/ui/stores/assetStore.js.map +1 -0
- package/lib/module/ui/stores/authStore.js +81 -0
- package/lib/module/ui/stores/authStore.js.map +1 -0
- package/lib/module/ui/stores/fileStore.js +145 -0
- package/lib/module/ui/stores/fileStore.js.map +1 -0
- package/lib/module/ui/stores/followStore.js +225 -0
- package/lib/module/ui/stores/followStore.js.map +1 -0
- package/lib/module/ui/styles/authStyles.js +333 -0
- package/lib/module/ui/styles/authStyles.js.map +1 -0
- package/lib/module/ui/styles/fonts.js +81 -0
- package/lib/module/ui/styles/fonts.js.map +1 -0
- package/lib/module/ui/styles/index.js +7 -0
- package/lib/module/ui/styles/index.js.map +1 -0
- package/lib/module/ui/styles/spacing.js +58 -0
- package/lib/module/ui/styles/spacing.js.map +1 -0
- package/lib/module/ui/styles/theme.js +114 -0
- package/lib/module/ui/styles/theme.js.map +1 -0
- package/lib/module/ui/types/fileManagement.js +4 -0
- package/lib/module/ui/types/fileManagement.js.map +1 -0
- package/lib/module/ui/types/navigation.js +4 -0
- package/lib/module/ui/types/navigation.js.map +1 -0
- package/lib/module/ui/utils/avatarUtils.js +126 -0
- package/lib/module/ui/utils/avatarUtils.js.map +1 -0
- package/lib/module/ui/utils/colorUtils.js +46 -0
- package/lib/module/ui/utils/colorUtils.js.map +1 -0
- package/lib/module/ui/utils/confirmAction.js +25 -0
- package/lib/module/ui/utils/confirmAction.js.map +1 -0
- package/lib/module/ui/utils/errorHandlers.js +129 -0
- package/lib/module/ui/utils/errorHandlers.js.map +1 -0
- package/lib/module/ui/utils/fileManagement.js +251 -0
- package/lib/module/ui/utils/fileManagement.js.map +1 -0
- package/lib/module/ui/utils/sessionHelpers.js +94 -0
- package/lib/module/ui/utils/sessionHelpers.js.map +1 -0
- package/lib/module/ui/utils/storageHelpers.js +111 -0
- package/lib/module/ui/utils/storageHelpers.js.map +1 -0
- package/lib/module/ui/utils/themeUtils.js +41 -0
- package/lib/module/ui/utils/themeUtils.js.map +1 -0
- package/lib/module/ui/utils/user-utils.js +46 -0
- package/lib/module/ui/utils/user-utils.js.map +1 -0
- package/lib/module/utils/apiUtils.js +72 -0
- package/lib/module/utils/apiUtils.js.map +1 -0
- package/lib/module/utils/asyncUtils.js +192 -0
- package/lib/module/utils/asyncUtils.js.map +1 -0
- package/lib/module/utils/cache.js +250 -0
- package/lib/module/utils/cache.js.map +1 -0
- package/lib/module/utils/deviceManager.js +171 -0
- package/lib/module/utils/deviceManager.js.map +1 -0
- package/lib/module/utils/errorUtils.js +167 -0
- package/lib/module/utils/errorUtils.js.map +1 -0
- package/lib/module/utils/hookUtils.js +381 -0
- package/lib/module/utils/hookUtils.js.map +1 -0
- package/lib/module/utils/index.js +11 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/utils/languageUtils.js +151 -0
- package/lib/module/utils/languageUtils.js.map +1 -0
- package/lib/module/utils/loggerUtils.js +149 -0
- package/lib/module/utils/loggerUtils.js.map +1 -0
- package/lib/module/utils/requestUtils.js +210 -0
- package/lib/module/utils/requestUtils.js.map +1 -0
- package/lib/module/utils/sessionUtils.js +180 -0
- package/lib/module/utils/sessionUtils.js.map +1 -0
- package/lib/module/utils/validationUtils.js +170 -0
- package/lib/module/utils/validationUtils.js.map +1 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts +29 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts.map +1 -0
- package/lib/typescript/assets/illustrations/HighFive.d.ts +9 -0
- package/lib/typescript/assets/illustrations/HighFive.d.ts.map +1 -0
- package/lib/typescript/constants/version.d.ts +14 -0
- package/lib/typescript/constants/version.d.ts.map +1 -0
- package/lib/typescript/core/HttpService.d.ts +159 -0
- package/lib/typescript/core/HttpService.d.ts.map +1 -0
- package/lib/typescript/core/OxyServices.base.d.ts +133 -0
- package/lib/typescript/core/OxyServices.base.d.ts.map +1 -0
- package/lib/typescript/core/OxyServices.d.ts +113 -0
- package/lib/typescript/core/OxyServices.d.ts.map +1 -0
- package/lib/typescript/core/OxyServices.errors.d.ts +12 -0
- package/lib/typescript/core/OxyServices.errors.d.ts.map +1 -0
- package/lib/typescript/core/index.d.ts +17 -0
- package/lib/typescript/core/index.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.analytics.d.ts +67 -0
- package/lib/typescript/core/mixins/OxyServices.analytics.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.assets.d.ts +136 -0
- package/lib/typescript/core/mixins/OxyServices.assets.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts +192 -0
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.developer.d.ts +100 -0
- package/lib/typescript/core/mixins/OxyServices.developer.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.devices.d.ts +97 -0
- package/lib/typescript/core/mixins/OxyServices.devices.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.karma.d.ts +86 -0
- package/lib/typescript/core/mixins/OxyServices.karma.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.language.d.ts +82 -0
- package/lib/typescript/core/mixins/OxyServices.language.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.location.d.ts +65 -0
- package/lib/typescript/core/mixins/OxyServices.location.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.payment.d.ts +112 -0
- package/lib/typescript/core/mixins/OxyServices.payment.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.privacy.d.ts +123 -0
- package/lib/typescript/core/mixins/OxyServices.privacy.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.security.d.ts +79 -0
- package/lib/typescript/core/mixins/OxyServices.security.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.user.d.ts +183 -0
- package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.utility.d.ts +94 -0
- package/lib/typescript/core/mixins/OxyServices.utility.d.ts.map +1 -0
- package/lib/typescript/core/mixins/index.d.ts +853 -0
- package/lib/typescript/core/mixins/index.d.ts.map +1 -0
- package/lib/typescript/core/mixins/mixinHelpers.d.ts +32 -0
- package/lib/typescript/core/mixins/mixinHelpers.d.ts.map +1 -0
- package/lib/typescript/core/services/SessionService.d.ts +78 -0
- package/lib/typescript/core/services/SessionService.d.ts.map +1 -0
- package/lib/typescript/core/services/TokenService.d.ts +72 -0
- package/lib/typescript/core/services/TokenService.d.ts.map +1 -0
- package/lib/typescript/crypto/index.d.ts +12 -0
- package/lib/typescript/crypto/index.d.ts.map +1 -0
- package/lib/typescript/crypto/keyManager.d.ts +97 -0
- package/lib/typescript/crypto/keyManager.d.ts.map +1 -0
- package/lib/typescript/crypto/polyfill.d.ts +13 -0
- package/lib/typescript/crypto/polyfill.d.ts.map +1 -0
- package/lib/typescript/crypto/signatureService.d.ts +87 -0
- package/lib/typescript/crypto/signatureService.d.ts.map +1 -0
- package/lib/typescript/crypto/types.d.ts +18 -0
- package/lib/typescript/crypto/types.d.ts.map +1 -0
- package/lib/typescript/i18n/index.d.ts +4 -0
- package/lib/typescript/i18n/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +38 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/lib/sonner-safe.d.ts +9 -0
- package/lib/typescript/lib/sonner-safe.d.ts.map +1 -0
- package/lib/typescript/lib/sonner.d.ts +15 -0
- package/lib/typescript/lib/sonner.d.ts.map +1 -0
- package/lib/typescript/models/interfaces.d.ts +428 -0
- package/lib/typescript/models/interfaces.d.ts.map +1 -0
- package/lib/typescript/models/session.d.ts +31 -0
- package/lib/typescript/models/session.d.ts.map +1 -0
- package/lib/typescript/node/index.d.ts +10 -0
- package/lib/typescript/node/index.d.ts.map +1 -0
- package/lib/typescript/types/buffer.d.ts +97 -0
- package/lib/typescript/types/color.d.ts +20 -0
- package/lib/typescript/types/elliptic.d.ts +62 -0
- package/lib/typescript/types/expo-crypto.d.ts +30 -0
- package/lib/typescript/types/expo-document-picker.d.ts +36 -0
- package/lib/typescript/types/expo-secure-store.d.ts +22 -0
- package/lib/typescript/types/expo-vector-icons.d.ts +19 -0
- package/lib/typescript/types/express.d.ts +24 -0
- package/lib/typescript/ui/components/ActivityIndicator.d.ts +45 -0
- package/lib/typescript/ui/components/ActivityIndicator.d.ts.map +1 -0
- package/lib/typescript/ui/components/AnimationExample.d.ts +4 -0
- package/lib/typescript/ui/components/AnimationExample.d.ts.map +1 -0
- package/lib/typescript/ui/components/AutoHeightScrollView.d.ts +23 -0
- package/lib/typescript/ui/components/AutoHeightScrollView.d.ts.map +1 -0
- package/lib/typescript/ui/components/Avatar.d.ts +61 -0
- package/lib/typescript/ui/components/Avatar.d.ts.map +1 -0
- package/lib/typescript/ui/components/BottomSheet.d.ts +29 -0
- package/lib/typescript/ui/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts +14 -0
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts.map +1 -0
- package/lib/typescript/ui/components/CrossFadeIcon.d.ts +27 -0
- package/lib/typescript/ui/components/CrossFadeIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/EmptyState.d.ts +8 -0
- package/lib/typescript/ui/components/EmptyState.d.ts.map +1 -0
- package/lib/typescript/ui/components/ErrorBoundary.d.ts +31 -0
- package/lib/typescript/ui/components/ErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/ui/components/FollowButton.d.ts +18 -0
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/FontLoader.d.ts +15 -0
- package/lib/typescript/ui/components/FontLoader.d.ts.map +1 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts +20 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts +25 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -0
- package/lib/typescript/ui/components/Header.d.ts +38 -0
- package/lib/typescript/ui/components/Header.d.ts.map +1 -0
- package/lib/typescript/ui/components/HelperText.d.ts +47 -0
- package/lib/typescript/ui/components/HelperText.d.ts.map +1 -0
- package/lib/typescript/ui/components/Icon.d.ts +60 -0
- package/lib/typescript/ui/components/Icon.d.ts.map +1 -0
- package/lib/typescript/ui/components/IconButton/IconButton.d.ts +99 -0
- package/lib/typescript/ui/components/IconButton/IconButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/IconButton/utils.d.ts +19 -0
- package/lib/typescript/ui/components/IconButton/utils.d.ts.map +1 -0
- package/lib/typescript/ui/components/LoadingState.d.ts +9 -0
- package/lib/typescript/ui/components/LoadingState.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyLogo.d.ts +29 -0
- package/lib/typescript/ui/components/OxyLogo.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyPayButton.d.ts +29 -0
- package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts +11 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxySignInButton.d.ts +65 -0
- package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/ProfileCard.d.ts +18 -0
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -0
- package/lib/typescript/ui/components/QuickActions.d.ts +15 -0
- package/lib/typescript/ui/components/QuickActions.d.ts.map +1 -0
- package/lib/typescript/ui/components/Section.d.ts +12 -0
- package/lib/typescript/ui/components/Section.d.ts.map +1 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts +10 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -0
- package/lib/typescript/ui/components/SettingRow.d.ts +14 -0
- package/lib/typescript/ui/components/SettingRow.d.ts.map +1 -0
- package/lib/typescript/ui/components/StepBasedScreen.d.ts +26 -0
- package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -0
- package/lib/typescript/ui/components/Surface.d.ts +76 -0
- package/lib/typescript/ui/components/Surface.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts +16 -0
- package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Addons/Underline.d.ts +19 -0
- package/lib/typescript/ui/components/TextField/Addons/Underline.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +45 -0
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldAdornment.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldAffix.d.ts +73 -0
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldAffix.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldIcon.d.ts +78 -0
- package/lib/typescript/ui/components/TextField/Adornment/TextFieldIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Adornment/enums.d.ts +13 -0
- package/lib/typescript/ui/components/TextField/Adornment/enums.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Adornment/types.d.ts +12 -0
- package/lib/typescript/ui/components/TextField/Adornment/types.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts +12 -0
- package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Label/InputLabel.d.ts +5 -0
- package/lib/typescript/ui/components/TextField/Label/InputLabel.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/Label/LabelBackground.d.ts +4 -0
- package/lib/typescript/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/TextFieldFlat.d.ts +4 -0
- package/lib/typescript/ui/components/TextField/TextFieldFlat.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/TextFieldOutlined.d.ts +4 -0
- package/lib/typescript/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/constants.d.ts +32 -0
- package/lib/typescript/ui/components/TextField/constants.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/helpers.d.ts +97 -0
- package/lib/typescript/ui/components/TextField/helpers.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField/types.d.ts +156 -0
- package/lib/typescript/ui/components/TextField/types.d.ts.map +1 -0
- package/lib/typescript/ui/components/TextField.d.ts +192 -0
- package/lib/typescript/ui/components/TextField.d.ts.map +1 -0
- package/lib/typescript/ui/components/TouchableRipple/Pressable.d.ts +13 -0
- package/lib/typescript/ui/components/TouchableRipple/Pressable.d.ts.map +1 -0
- package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.d.ts +62 -0
- package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.d.ts.map +1 -0
- package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.native.d.ts +25 -0
- package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -0
- package/lib/typescript/ui/components/TouchableRipple/utils.d.ts +11 -0
- package/lib/typescript/ui/components/TouchableRipple/utils.d.ts.map +1 -0
- package/lib/typescript/ui/components/Typography/AnimatedText.d.ts +35 -0
- package/lib/typescript/ui/components/Typography/AnimatedText.d.ts.map +1 -0
- package/lib/typescript/ui/components/Typography/types.d.ts +19 -0
- package/lib/typescript/ui/components/Typography/types.d.ts.map +1 -0
- package/lib/typescript/ui/components/fileManagement/FileDetailsModal.d.ts +15 -0
- package/lib/typescript/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/fileManagement/FileViewer.d.ts +18 -0
- package/lib/typescript/ui/components/fileManagement/FileViewer.d.ts.map +1 -0
- package/lib/typescript/ui/components/fileManagement/UploadPreview.d.ts +21 -0
- package/lib/typescript/ui/components/fileManagement/UploadPreview.d.ts.map +1 -0
- package/lib/typescript/ui/components/fileManagement/styles.d.ts +860 -0
- package/lib/typescript/ui/components/fileManagement/styles.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +9 -0
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts +10 -0
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts +4 -0
- package/lib/typescript/ui/components/icon/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/index.d.ts +17 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts +18 -0
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -0
- package/lib/typescript/ui/components/internal/PinInput.d.ts +23 -0
- package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -0
- package/lib/typescript/ui/components/photogrid/JustifiedPhotoGrid.d.ts +27 -0
- package/lib/typescript/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -0
- package/lib/typescript/ui/components/profile/EditBioModal.d.ts +11 -0
- package/lib/typescript/ui/components/profile/EditBioModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/profile/EditDisplayNameModal.d.ts +12 -0
- package/lib/typescript/ui/components/profile/EditDisplayNameModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/profile/EditEmailModal.d.ts +11 -0
- package/lib/typescript/ui/components/profile/EditEmailModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/profile/EditLinksModal.d.ts +18 -0
- package/lib/typescript/ui/components/profile/EditLinksModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/profile/EditLocationModal.d.ts +20 -0
- package/lib/typescript/ui/components/profile/EditLocationModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/profile/EditUsernameModal.d.ts +11 -0
- package/lib/typescript/ui/components/profile/EditUsernameModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/styles/overlay.d.ts +4 -0
- package/lib/typescript/ui/components/styles/overlay.d.ts.map +1 -0
- package/lib/typescript/ui/components/styles/shadow.d.ts +3 -0
- package/lib/typescript/ui/components/styles/shadow.d.ts.map +1 -0
- package/lib/typescript/ui/components/theming.d.ts +8 -0
- package/lib/typescript/ui/components/theming.d.ts.map +1 -0
- package/lib/typescript/ui/components/types.d.ts +80 -0
- package/lib/typescript/ui/components/types.d.ts.map +1 -0
- package/lib/typescript/ui/components/utils/forwardRef.d.ts +12 -0
- package/lib/typescript/ui/components/utils/forwardRef.d.ts.map +1 -0
- package/lib/typescript/ui/components/utils/hasTouchHandler.d.ts +6 -0
- package/lib/typescript/ui/components/utils/hasTouchHandler.d.ts.map +1 -0
- package/lib/typescript/ui/components/utils/roundLayoutSize.d.ts +2 -0
- package/lib/typescript/ui/components/utils/roundLayoutSize.d.ts.map +1 -0
- package/lib/typescript/ui/components/utils/splitStyles.d.ts +20 -0
- package/lib/typescript/ui/components/utils/splitStyles.d.ts.map +1 -0
- package/lib/typescript/ui/constants/iconColors.d.ts +130 -0
- package/lib/typescript/ui/constants/iconColors.d.ts.map +1 -0
- package/lib/typescript/ui/constants/spacing.d.ts +33 -0
- package/lib/typescript/ui/constants/spacing.d.ts.map +1 -0
- package/lib/typescript/ui/constants/theme.d.ts +97 -0
- package/lib/typescript/ui/constants/theme.d.ts.map +1 -0
- package/lib/typescript/ui/context/OxyContext.d.ts +86 -0
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -0
- package/lib/typescript/ui/context/ThemeContext.d.ts +19 -0
- package/lib/typescript/ui/context/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +59 -0
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts +27 -0
- package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useLanguageManagement.d.ts +25 -0
- package/lib/typescript/ui/context/hooks/useLanguageManagement.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useSessionManagement.d.ts +41 -0
- package/lib/typescript/ui/context/hooks/useSessionManagement.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useStorage.d.ts +22 -0
- package/lib/typescript/ui/context/hooks/useStorage.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/index.d.ts +5 -0
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/mutations/index.d.ts +9 -0
- package/lib/typescript/ui/hooks/mutations/index.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts +44 -0
- package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts +23 -0
- package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/queries/index.d.ts +11 -0
- package/lib/typescript/ui/hooks/queries/index.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/queries/queryKeys.d.ts +65 -0
- package/lib/typescript/ui/hooks/queries/queryKeys.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts +47 -0
- package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/queries/useSecurityQueries.d.ts +15 -0
- package/lib/typescript/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/queries/useServicesQueries.d.ts +34 -0
- package/lib/typescript/ui/hooks/queries/useServicesQueries.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/queryClient.d.ts +19 -0
- package/lib/typescript/ui/hooks/queryClient.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/use-color-scheme.d.ts +8 -0
- package/lib/typescript/ui/hooks/use-color-scheme.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/use-haptic-press.d.ts +8 -0
- package/lib/typescript/ui/hooks/use-haptic-press.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useAssets.d.ts +35 -0
- package/lib/typescript/ui/hooks/useAssets.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useDeviceManagement.d.ts +27 -0
- package/lib/typescript/ui/hooks/useDeviceManagement.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useFileDownloadUrl.d.ts +19 -0
- package/lib/typescript/ui/hooks/useFileDownloadUrl.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useFollow.d.ts +62 -0
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useFollow.types.d.ts +33 -0
- package/lib/typescript/ui/hooks/useFollow.types.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useI18n.d.ts +5 -0
- package/lib/typescript/ui/hooks/useI18n.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useLanguageManagement.d.ts +25 -0
- package/lib/typescript/ui/hooks/useLanguageManagement.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useProfileEditing.d.ts +36 -0
- package/lib/typescript/ui/hooks/useProfileEditing.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useQueryClient.d.ts +7 -0
- package/lib/typescript/ui/hooks/useQueryClient.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useSessionManagement.d.ts +41 -0
- package/lib/typescript/ui/hooks/useSessionManagement.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts +28 -0
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useStorage.d.ts +22 -0
- package/lib/typescript/ui/hooks/useStorage.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useThemeColors.d.ts +94 -0
- package/lib/typescript/ui/hooks/useThemeColors.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useThemeStyles.d.ts +45 -0
- package/lib/typescript/ui/hooks/useThemeStyles.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +5 -0
- package/lib/typescript/ui/index.d.ts.map +1 -0
- package/lib/typescript/ui/isFrontend.d.ts +3 -0
- package/lib/typescript/ui/isFrontend.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/bottomSheetManager.d.ts +74 -0
- package/lib/typescript/ui/navigation/bottomSheetManager.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/routes.d.ts +6 -0
- package/lib/typescript/ui/navigation/routes.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +8 -0
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountVerificationScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AccountVerificationScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/HelpSupportScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/HelpSupportScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/HistoryViewScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/HistoryViewScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts +7 -0
- package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/LegalDocumentsScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/LegalDocumentsScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/OxyAuthScreen.d.ts +17 -0
- package/lib/typescript/ui/screens/OxyAuthScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +27 -0
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/ProfileScreen.d.ts +9 -0
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SearchSettingsScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/SearchSettingsScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts +15 -0
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts +13 -0
- package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -0
- package/lib/typescript/ui/stores/accountStore.d.ts +34 -0
- package/lib/typescript/ui/stores/accountStore.d.ts.map +1 -0
- package/lib/typescript/ui/stores/assetStore.d.ts +54 -0
- package/lib/typescript/ui/stores/assetStore.d.ts.map +1 -0
- package/lib/typescript/ui/stores/authStore.d.ts +21 -0
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -0
- package/lib/typescript/ui/stores/fileStore.d.ts +31 -0
- package/lib/typescript/ui/stores/fileStore.d.ts.map +1 -0
- package/lib/typescript/ui/stores/followStore.d.ts +25 -0
- package/lib/typescript/ui/stores/followStore.d.ts.map +1 -0
- package/lib/typescript/ui/styles/authStyles.d.ts +332 -0
- package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -0
- package/lib/typescript/ui/styles/fonts.d.ts +21 -0
- package/lib/typescript/ui/styles/fonts.d.ts.map +1 -0
- package/lib/typescript/ui/styles/index.d.ts +5 -0
- package/lib/typescript/ui/styles/index.d.ts.map +1 -0
- package/lib/typescript/ui/styles/spacing.d.ts +49 -0
- package/lib/typescript/ui/styles/spacing.d.ts.map +1 -0
- package/lib/typescript/ui/styles/theme.d.ts +68 -0
- package/lib/typescript/ui/styles/theme.d.ts.map +1 -0
- package/lib/typescript/ui/types/fileManagement.d.ts +41 -0
- package/lib/typescript/ui/types/fileManagement.d.ts.map +1 -0
- package/lib/typescript/ui/types/navigation.d.ts +36 -0
- package/lib/typescript/ui/types/navigation.d.ts.map +1 -0
- package/lib/typescript/ui/utils/avatarUtils.d.ts +34 -0
- package/lib/typescript/ui/utils/avatarUtils.d.ts.map +1 -0
- package/lib/typescript/ui/utils/colorUtils.d.ts +14 -0
- package/lib/typescript/ui/utils/colorUtils.d.ts.map +1 -0
- package/lib/typescript/ui/utils/confirmAction.d.ts +7 -0
- package/lib/typescript/ui/utils/confirmAction.d.ts.map +1 -0
- package/lib/typescript/ui/utils/errorHandlers.d.ts +35 -0
- package/lib/typescript/ui/utils/errorHandlers.d.ts.map +1 -0
- package/lib/typescript/ui/utils/fileManagement.d.ts +87 -0
- package/lib/typescript/ui/utils/fileManagement.d.ts.map +1 -0
- package/lib/typescript/ui/utils/sessionHelpers.d.ts +59 -0
- package/lib/typescript/ui/utils/sessionHelpers.d.ts.map +1 -0
- package/lib/typescript/ui/utils/storageHelpers.d.ts +31 -0
- package/lib/typescript/ui/utils/storageHelpers.d.ts.map +1 -0
- package/lib/typescript/ui/utils/themeUtils.d.ts +24 -0
- package/lib/typescript/ui/utils/themeUtils.d.ts.map +1 -0
- package/lib/typescript/ui/utils/user-utils.d.ts +29 -0
- package/lib/typescript/ui/utils/user-utils.d.ts.map +1 -0
- package/lib/typescript/utils/apiUtils.d.ts +54 -0
- package/lib/typescript/utils/apiUtils.d.ts.map +1 -0
- package/lib/typescript/utils/asyncUtils.d.ts +59 -0
- package/lib/typescript/utils/asyncUtils.d.ts.map +1 -0
- package/lib/typescript/utils/cache.d.ts +128 -0
- package/lib/typescript/utils/cache.d.ts.map +1 -0
- package/lib/typescript/utils/deviceManager.d.ts +66 -0
- package/lib/typescript/utils/deviceManager.d.ts.map +1 -0
- package/lib/typescript/utils/errorUtils.d.ts +53 -0
- package/lib/typescript/utils/errorUtils.d.ts.map +1 -0
- package/lib/typescript/utils/hookUtils.d.ts +102 -0
- package/lib/typescript/utils/hookUtils.d.ts.map +1 -0
- package/lib/typescript/utils/index.d.ts +7 -0
- package/lib/typescript/utils/index.d.ts.map +1 -0
- package/lib/typescript/utils/languageUtils.d.ts +38 -0
- package/lib/typescript/utils/languageUtils.d.ts.map +1 -0
- package/lib/typescript/utils/loggerUtils.d.ts +49 -0
- package/lib/typescript/utils/loggerUtils.d.ts.map +1 -0
- package/lib/typescript/utils/requestUtils.d.ts +122 -0
- package/lib/typescript/utils/requestUtils.d.ts.map +1 -0
- package/lib/typescript/utils/sessionUtils.d.ts +55 -0
- package/lib/typescript/utils/sessionUtils.d.ts.map +1 -0
- package/lib/typescript/utils/validationUtils.d.ts +86 -0
- package/lib/typescript/utils/validationUtils.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/core/mixins/OxyServices.user.ts +14 -4
- package/src/ui/context/OxyContext.tsx +40 -75
- package/src/ui/hooks/mutations/useAccountMutations.ts +8 -6
- package/src/ui/hooks/queries/useAccountQueries.ts +4 -2
- package/src/ui/hooks/useSessionSocket.ts +156 -153
- package/src/ui/screens/PrivacySettingsScreen.tsx +12 -6
|
@@ -0,0 +1,2333 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _expoImage = require("expo-image");
|
|
10
|
+
var _sonner = require("../../lib/sonner");
|
|
11
|
+
var _vectorIcons = require("@expo/vector-icons");
|
|
12
|
+
var _fileStore = require("../stores/fileStore");
|
|
13
|
+
var _Header = _interopRequireDefault(require("../components/Header"));
|
|
14
|
+
var _JustifiedPhotoGrid = _interopRequireDefault(require("../components/photogrid/JustifiedPhotoGrid"));
|
|
15
|
+
var _components = require("../components");
|
|
16
|
+
var _useThemeStyles = require("../hooks/useThemeStyles");
|
|
17
|
+
var _useColorScheme = require("../hooks/use-color-scheme");
|
|
18
|
+
var _themeUtils = require("../utils/themeUtils");
|
|
19
|
+
var _OxyContext = require("../context/OxyContext");
|
|
20
|
+
var _useAccountMutations = require("../hooks/mutations/useAccountMutations");
|
|
21
|
+
var _fileManagement = require("../utils/fileManagement");
|
|
22
|
+
var _FileViewer = require("../components/fileManagement/FileViewer");
|
|
23
|
+
var _FileDetailsModal = require("../components/fileManagement/FileDetailsModal");
|
|
24
|
+
var _UploadPreview = require("../components/fileManagement/UploadPreview");
|
|
25
|
+
var _styles = require("../components/fileManagement/styles");
|
|
26
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
28
|
+
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); }
|
|
29
|
+
// Lazy load expo-document-picker (optional dependency)
|
|
30
|
+
// This allows the screen to work even if expo-document-picker is not installed
|
|
31
|
+
let DocumentPicker = null;
|
|
32
|
+
const loadDocumentPicker = async () => {
|
|
33
|
+
if (DocumentPicker) return DocumentPicker;
|
|
34
|
+
try {
|
|
35
|
+
DocumentPicker = await Promise.resolve().then(() => _interopRequireWildcard(require('expo-document-picker')));
|
|
36
|
+
return DocumentPicker;
|
|
37
|
+
} catch (error) {
|
|
38
|
+
throw new Error('expo-document-picker is not installed. Please install it: npx expo install expo-document-picker');
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// @ts-ignore - MaterialCommunityIcons is available at runtime
|
|
43
|
+
|
|
44
|
+
// Animated button component for smooth transitions
|
|
45
|
+
const AnimatedButton = ({
|
|
46
|
+
isSelected,
|
|
47
|
+
onPress,
|
|
48
|
+
icon,
|
|
49
|
+
primaryColor,
|
|
50
|
+
textColor,
|
|
51
|
+
style
|
|
52
|
+
}) => {
|
|
53
|
+
const animatedValue = (0, _react.useRef)(new _reactNative.Animated.Value(isSelected ? 1 : 0)).current;
|
|
54
|
+
(0, _react.useEffect)(() => {
|
|
55
|
+
_reactNative.Animated.timing(animatedValue, {
|
|
56
|
+
toValue: isSelected ? 1 : 0,
|
|
57
|
+
duration: 200,
|
|
58
|
+
easing: _reactNative.Easing.out(_reactNative.Easing.ease),
|
|
59
|
+
useNativeDriver: false
|
|
60
|
+
}).start();
|
|
61
|
+
}, [isSelected, animatedValue]);
|
|
62
|
+
const backgroundColor = animatedValue.interpolate({
|
|
63
|
+
inputRange: [0, 1],
|
|
64
|
+
outputRange: ['transparent', primaryColor]
|
|
65
|
+
});
|
|
66
|
+
const iconColor = animatedValue.interpolate({
|
|
67
|
+
inputRange: [0, 1],
|
|
68
|
+
outputRange: [textColor, '#FFFFFF']
|
|
69
|
+
});
|
|
70
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
71
|
+
onPress: onPress,
|
|
72
|
+
activeOpacity: 0.7,
|
|
73
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
74
|
+
style: [style, {
|
|
75
|
+
backgroundColor
|
|
76
|
+
}],
|
|
77
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
78
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
79
|
+
name: icon,
|
|
80
|
+
size: 16,
|
|
81
|
+
color: isSelected ? '#FFFFFF' : textColor
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
const FileManagementScreen = ({
|
|
88
|
+
onClose,
|
|
89
|
+
theme,
|
|
90
|
+
goBack,
|
|
91
|
+
navigate,
|
|
92
|
+
userId,
|
|
93
|
+
containerWidth = 400,
|
|
94
|
+
// Fallback for when not provided by the router
|
|
95
|
+
selectMode = false,
|
|
96
|
+
multiSelect = false,
|
|
97
|
+
onSelect,
|
|
98
|
+
onConfirmSelection,
|
|
99
|
+
initialSelectedIds = [],
|
|
100
|
+
maxSelection,
|
|
101
|
+
disabledMimeTypes = [],
|
|
102
|
+
afterSelect = 'close',
|
|
103
|
+
allowUploadInSelectMode = true,
|
|
104
|
+
defaultVisibility = 'private',
|
|
105
|
+
linkContext
|
|
106
|
+
}) => {
|
|
107
|
+
// Use useOxy() hook for OxyContext values
|
|
108
|
+
const {
|
|
109
|
+
user,
|
|
110
|
+
oxyServices
|
|
111
|
+
} = (0, _OxyContext.useOxy)();
|
|
112
|
+
const uploadFileMutation = (0, _useAccountMutations.useUploadFile)();
|
|
113
|
+
const files = (0, _fileStore.useFiles)();
|
|
114
|
+
// Ensure containerWidth is a number (TypeScript guard)
|
|
115
|
+
const safeContainerWidth = typeof containerWidth === 'number' ? containerWidth : 400;
|
|
116
|
+
const uploading = (0, _fileStore.useUploading)();
|
|
117
|
+
const uploadProgress = (0, _fileStore.useUploadAggregateProgress)();
|
|
118
|
+
const deleting = (0, _fileStore.useDeleting)();
|
|
119
|
+
const [loading, setLoading] = (0, _react.useState)(true);
|
|
120
|
+
const [refreshing, setRefreshing] = (0, _react.useState)(false);
|
|
121
|
+
const [paging, setPaging] = (0, _react.useState)({
|
|
122
|
+
offset: 0,
|
|
123
|
+
limit: 40,
|
|
124
|
+
total: 0,
|
|
125
|
+
hasMore: true,
|
|
126
|
+
loadingMore: false
|
|
127
|
+
});
|
|
128
|
+
const [selectedFile, setSelectedFile] = (0, _react.useState)(null);
|
|
129
|
+
const [showFileDetails, setShowFileDetails] = (0, _react.useState)(false);
|
|
130
|
+
// In selectMode we never open the detailed viewer
|
|
131
|
+
const [openedFile, setOpenedFile] = (0, _react.useState)(null);
|
|
132
|
+
const [fileContent, setFileContent] = (0, _react.useState)(null);
|
|
133
|
+
const [loadingFileContent, setLoadingFileContent] = (0, _react.useState)(false);
|
|
134
|
+
const [showFileDetailsInViewer, setShowFileDetailsInViewer] = (0, _react.useState)(false);
|
|
135
|
+
const [isPickingDocument, setIsPickingDocument] = (0, _react.useState)(false);
|
|
136
|
+
const [viewMode, setViewMode] = (0, _react.useState)('all');
|
|
137
|
+
const [searchQuery, setSearchQuery] = (0, _react.useState)('');
|
|
138
|
+
const [sortBy, setSortBy] = (0, _react.useState)('date');
|
|
139
|
+
const [sortOrder, setSortOrder] = (0, _react.useState)('desc');
|
|
140
|
+
const [pendingFiles, setPendingFiles] = (0, _react.useState)([]);
|
|
141
|
+
const [showUploadPreview, setShowUploadPreview] = (0, _react.useState)(false);
|
|
142
|
+
// Derived filtered and sorted files (avoid setState loops)
|
|
143
|
+
const filteredFiles = (0, _react.useMemo)(() => {
|
|
144
|
+
let filteredByMode = files;
|
|
145
|
+
if (viewMode === 'photos') {
|
|
146
|
+
filteredByMode = files.filter(file => file.contentType.startsWith('image/'));
|
|
147
|
+
} else if (viewMode === 'videos') {
|
|
148
|
+
filteredByMode = files.filter(file => file.contentType.startsWith('video/'));
|
|
149
|
+
} else if (viewMode === 'documents') {
|
|
150
|
+
filteredByMode = files.filter(file => file.contentType.includes('pdf') || file.contentType.includes('document') || file.contentType.includes('text') || file.contentType.includes('msword') || file.contentType.includes('excel') || file.contentType.includes('spreadsheet') || file.contentType.includes('presentation') || file.contentType.includes('powerpoint'));
|
|
151
|
+
} else if (viewMode === 'audio') {
|
|
152
|
+
filteredByMode = files.filter(file => file.contentType.startsWith('audio/'));
|
|
153
|
+
}
|
|
154
|
+
let filtered = filteredByMode;
|
|
155
|
+
if (searchQuery.trim()) {
|
|
156
|
+
const query = searchQuery.toLowerCase();
|
|
157
|
+
filtered = filteredByMode.filter(file => file.filename.toLowerCase().includes(query) || file.contentType.toLowerCase().includes(query) || file.metadata?.description && file.metadata.description.toLowerCase().includes(query));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Sort files
|
|
161
|
+
const sorted = [...filtered].sort((a, b) => {
|
|
162
|
+
let comparison = 0;
|
|
163
|
+
if (sortBy === 'date') {
|
|
164
|
+
const dateA = new Date(a.uploadDate || 0).getTime();
|
|
165
|
+
const dateB = new Date(b.uploadDate || 0).getTime();
|
|
166
|
+
comparison = dateA - dateB;
|
|
167
|
+
} else if (sortBy === 'size') {
|
|
168
|
+
comparison = (a.length || 0) - (b.length || 0);
|
|
169
|
+
} else if (sortBy === 'name') {
|
|
170
|
+
comparison = (a.filename || '').localeCompare(b.filename || '');
|
|
171
|
+
} else if (sortBy === 'type') {
|
|
172
|
+
comparison = (a.contentType || '').localeCompare(b.contentType || '');
|
|
173
|
+
}
|
|
174
|
+
return sortOrder === 'asc' ? comparison : -comparison;
|
|
175
|
+
});
|
|
176
|
+
return sorted;
|
|
177
|
+
}, [files, searchQuery, viewMode, sortBy, sortOrder]);
|
|
178
|
+
const [photoDimensions, setPhotoDimensions] = (0, _react.useState)({});
|
|
179
|
+
const [loadingDimensions, setLoadingDimensions] = (0, _react.useState)(false);
|
|
180
|
+
const uploadStartRef = (0, _react.useRef)(null);
|
|
181
|
+
const MIN_BANNER_MS = 600;
|
|
182
|
+
// Selection state
|
|
183
|
+
const [selectedIds, setSelectedIds] = (0, _react.useState)(new Set(initialSelectedIds));
|
|
184
|
+
const [lastSelectedFileId, setLastSelectedFileId] = (0, _react.useState)(null);
|
|
185
|
+
const scrollViewRef = (0, _react.useRef)(null);
|
|
186
|
+
const photoScrollViewRef = (0, _react.useRef)(null);
|
|
187
|
+
const itemRefs = (0, _react.useRef)(new Map()); // Track item positions
|
|
188
|
+
const containerRef = (0, _react.useRef)(null);
|
|
189
|
+
(0, _react.useEffect)(() => {
|
|
190
|
+
if (initialSelectedIds && initialSelectedIds.length) {
|
|
191
|
+
setSelectedIds(new Set(initialSelectedIds));
|
|
192
|
+
}
|
|
193
|
+
}, [initialSelectedIds]);
|
|
194
|
+
const toggleSelect = (0, _react.useCallback)(async file => {
|
|
195
|
+
// Allow selection in regular mode for bulk operations
|
|
196
|
+
// if (!selectMode) return;
|
|
197
|
+
if (disabledMimeTypes.length) {
|
|
198
|
+
const blocked = disabledMimeTypes.some(mt => file.contentType === mt || file.contentType.startsWith(mt.endsWith('/') ? mt : mt + '/'));
|
|
199
|
+
if (blocked) {
|
|
200
|
+
_sonner.toast.error('This file type cannot be selected');
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// Update file visibility if it differs from defaultVisibility
|
|
206
|
+
const fileVisibility = file.metadata?.visibility || 'private';
|
|
207
|
+
if (fileVisibility !== defaultVisibility) {
|
|
208
|
+
try {
|
|
209
|
+
await oxyServices.assetUpdateVisibility(file.id, defaultVisibility);
|
|
210
|
+
} catch (error) {
|
|
211
|
+
// Continue anyway - selection shouldn't fail if visibility update fails
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Track the selected file for scrolling
|
|
216
|
+
setLastSelectedFileId(file.id);
|
|
217
|
+
|
|
218
|
+
// Link file to entity if linkContext is provided
|
|
219
|
+
if (linkContext) {
|
|
220
|
+
try {
|
|
221
|
+
await oxyServices.assetLink(file.id, linkContext.app, linkContext.entityType, linkContext.entityId, defaultVisibility, linkContext.webhookUrl);
|
|
222
|
+
} catch (error) {
|
|
223
|
+
// Continue anyway - selection shouldn't fail if linking fails
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (!multiSelect) {
|
|
227
|
+
onSelect?.(file);
|
|
228
|
+
if (afterSelect === 'back') {
|
|
229
|
+
goBack?.();
|
|
230
|
+
} else if (afterSelect === 'close') {
|
|
231
|
+
onClose?.();
|
|
232
|
+
}
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
setSelectedIds(prev => {
|
|
236
|
+
const next = new Set(prev);
|
|
237
|
+
const already = next.has(file.id);
|
|
238
|
+
if (!already) {
|
|
239
|
+
if (maxSelection && next.size >= maxSelection) {
|
|
240
|
+
_sonner.toast.error(`You can select up to ${maxSelection}`);
|
|
241
|
+
return prev;
|
|
242
|
+
}
|
|
243
|
+
next.add(file.id);
|
|
244
|
+
} else {
|
|
245
|
+
next.delete(file.id);
|
|
246
|
+
}
|
|
247
|
+
return next;
|
|
248
|
+
});
|
|
249
|
+
}, [selectMode, multiSelect, onSelect, onClose, goBack, disabledMimeTypes, maxSelection, afterSelect, defaultVisibility, oxyServices, linkContext]);
|
|
250
|
+
const confirmMultiSelection = (0, _react.useCallback)(async () => {
|
|
251
|
+
if (!selectMode || !multiSelect) return;
|
|
252
|
+
const map = {};
|
|
253
|
+
files.forEach(f => {
|
|
254
|
+
map[f.id] = f;
|
|
255
|
+
});
|
|
256
|
+
const chosen = Array.from(selectedIds).map(id => map[id]).filter(Boolean);
|
|
257
|
+
|
|
258
|
+
// Update visibility and link files if needed
|
|
259
|
+
const updatePromises = chosen.map(async file => {
|
|
260
|
+
// Update visibility if needed
|
|
261
|
+
const fileVisibility = file.metadata?.visibility || 'private';
|
|
262
|
+
if (fileVisibility !== defaultVisibility) {
|
|
263
|
+
try {
|
|
264
|
+
await oxyServices.assetUpdateVisibility(file.id, defaultVisibility);
|
|
265
|
+
} catch (error) {
|
|
266
|
+
// Visibility update failed, continue with selection
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// Link file to entity if linkContext provided
|
|
271
|
+
if (linkContext) {
|
|
272
|
+
try {
|
|
273
|
+
await oxyServices.assetLink(file.id, linkContext.app, linkContext.entityType, linkContext.entityId, defaultVisibility, linkContext.webhookUrl);
|
|
274
|
+
} catch (error) {
|
|
275
|
+
// File linking failed, continue with selection
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
// Wait for all updates (but don't block on failures)
|
|
281
|
+
await Promise.allSettled(updatePromises);
|
|
282
|
+
onConfirmSelection?.(chosen);
|
|
283
|
+
onClose?.();
|
|
284
|
+
}, [selectMode, multiSelect, selectedIds, files, onConfirmSelection, onClose, defaultVisibility, oxyServices, linkContext]);
|
|
285
|
+
const endUpload = (0, _react.useCallback)(() => {
|
|
286
|
+
const started = uploadStartRef.current;
|
|
287
|
+
const elapsed = started ? Date.now() - started : MIN_BANNER_MS;
|
|
288
|
+
const remaining = elapsed < MIN_BANNER_MS ? MIN_BANNER_MS - elapsed : 0;
|
|
289
|
+
setTimeout(() => {
|
|
290
|
+
_fileStore.useFileStore.getState().setUploading(false);
|
|
291
|
+
uploadStartRef.current = null;
|
|
292
|
+
}, remaining);
|
|
293
|
+
}, []);
|
|
294
|
+
|
|
295
|
+
// Helper to safely request a thumbnail variant only for image mime types.
|
|
296
|
+
const getSafeDownloadUrlCallback = (0, _react.useCallback)((file, variant = 'thumb') => {
|
|
297
|
+
return (0, _fileManagement.getSafeDownloadUrl)(file, variant, (fileId, variant) => oxyServices.getFileDownloadUrl(fileId, variant));
|
|
298
|
+
}, [oxyServices]);
|
|
299
|
+
|
|
300
|
+
// Use centralized theme styles hook for consistency
|
|
301
|
+
const colorScheme = (0, _useColorScheme.useColorScheme)();
|
|
302
|
+
const normalizedTheme = (0, _themeUtils.normalizeTheme)(theme);
|
|
303
|
+
const baseThemeStyles = (0, _useThemeStyles.useThemeStyles)(normalizedTheme, colorScheme);
|
|
304
|
+
// FileManagementScreen uses a slightly different light background
|
|
305
|
+
const themeStyles = (0, _react.useMemo)(() => ({
|
|
306
|
+
...baseThemeStyles,
|
|
307
|
+
backgroundColor: baseThemeStyles.isDarkTheme ? baseThemeStyles.backgroundColor : '#f2f2f2'
|
|
308
|
+
}), [baseThemeStyles]);
|
|
309
|
+
|
|
310
|
+
// Extract commonly used theme variables
|
|
311
|
+
const backgroundColor = themeStyles.backgroundColor;
|
|
312
|
+
const borderColor = themeStyles.borderColor;
|
|
313
|
+
const targetUserId = userId || user?.id;
|
|
314
|
+
const storeSetUploading = (0, _fileStore.useFileStore)(s => s.setUploading);
|
|
315
|
+
const storeSetUploadProgress = (0, _fileStore.useFileStore)(s => s.setUploadProgress);
|
|
316
|
+
const storeSetDeleting = (0, _fileStore.useFileStore)(s => s.setDeleting);
|
|
317
|
+
const loadFiles = (0, _react.useCallback)(async (mode = 'initial') => {
|
|
318
|
+
if (!targetUserId) return;
|
|
319
|
+
try {
|
|
320
|
+
if (mode === 'refresh') {
|
|
321
|
+
setRefreshing(true);
|
|
322
|
+
} else if (mode === 'initial') {
|
|
323
|
+
setLoading(true);
|
|
324
|
+
setPaging(p => ({
|
|
325
|
+
...p,
|
|
326
|
+
offset: 0,
|
|
327
|
+
hasMore: true
|
|
328
|
+
}));
|
|
329
|
+
} else if (mode === 'more') {
|
|
330
|
+
// Prevent duplicate fetches
|
|
331
|
+
setPaging(p => ({
|
|
332
|
+
...p,
|
|
333
|
+
loadingMore: true
|
|
334
|
+
}));
|
|
335
|
+
}
|
|
336
|
+
const currentPaging = mode === 'more' ? prevPagingRef.current ?? paging : paging;
|
|
337
|
+
const effectiveOffset = mode === 'more' ? currentPaging.offset + currentPaging.limit : 0;
|
|
338
|
+
const response = await oxyServices.listUserFiles(currentPaging.limit, effectiveOffset);
|
|
339
|
+
const assets = (response.files || []).map(f => ({
|
|
340
|
+
id: f.id,
|
|
341
|
+
filename: f.originalName || f.sha256,
|
|
342
|
+
contentType: f.mime,
|
|
343
|
+
length: f.size,
|
|
344
|
+
chunkSize: 0,
|
|
345
|
+
uploadDate: f.createdAt,
|
|
346
|
+
metadata: f.metadata || {},
|
|
347
|
+
variants: f.variants || []
|
|
348
|
+
}));
|
|
349
|
+
if (mode === 'more') {
|
|
350
|
+
// append
|
|
351
|
+
_fileStore.useFileStore.getState().setFiles(assets, {
|
|
352
|
+
merge: true
|
|
353
|
+
});
|
|
354
|
+
setPaging(p => ({
|
|
355
|
+
...p,
|
|
356
|
+
offset: effectiveOffset,
|
|
357
|
+
total: response.total || effectiveOffset + assets.length,
|
|
358
|
+
hasMore: response.hasMore,
|
|
359
|
+
loadingMore: false
|
|
360
|
+
}));
|
|
361
|
+
} else {
|
|
362
|
+
_fileStore.useFileStore.getState().setFiles(assets, {
|
|
363
|
+
merge: false
|
|
364
|
+
});
|
|
365
|
+
setPaging(p => ({
|
|
366
|
+
...p,
|
|
367
|
+
offset: 0,
|
|
368
|
+
total: response.total || assets.length,
|
|
369
|
+
hasMore: response.hasMore,
|
|
370
|
+
loadingMore: false
|
|
371
|
+
}));
|
|
372
|
+
}
|
|
373
|
+
} catch (error) {
|
|
374
|
+
_sonner.toast.error(error.message || 'Failed to load files');
|
|
375
|
+
} finally {
|
|
376
|
+
setLoading(false);
|
|
377
|
+
setRefreshing(false);
|
|
378
|
+
setPaging(p => ({
|
|
379
|
+
...p,
|
|
380
|
+
loadingMore: false
|
|
381
|
+
}));
|
|
382
|
+
}
|
|
383
|
+
}, [targetUserId, oxyServices, paging]);
|
|
384
|
+
|
|
385
|
+
// Keep a ref to avoid stale closure when calculating next offset
|
|
386
|
+
const prevPagingRef = (0, _react.useRef)(paging);
|
|
387
|
+
(0, _react.useEffect)(() => {
|
|
388
|
+
prevPagingRef.current = paging;
|
|
389
|
+
}, [paging]);
|
|
390
|
+
|
|
391
|
+
// (removed effect; filteredFiles is memoized)
|
|
392
|
+
|
|
393
|
+
// Load photo dimensions for justified grid - unified approach using Image.getSize
|
|
394
|
+
const loadPhotoDimensions = (0, _react.useCallback)(async photos => {
|
|
395
|
+
if (photos.length === 0) return;
|
|
396
|
+
setLoadingDimensions(true);
|
|
397
|
+
const newDimensions = {
|
|
398
|
+
...photoDimensions
|
|
399
|
+
};
|
|
400
|
+
let hasNewDimensions = false;
|
|
401
|
+
|
|
402
|
+
// Only load dimensions for photos we don't have yet
|
|
403
|
+
const photosToLoad = photos.filter(photo => !newDimensions[photo.id]);
|
|
404
|
+
if (photosToLoad.length === 0) {
|
|
405
|
+
setLoadingDimensions(false);
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
try {
|
|
409
|
+
await Promise.all(photosToLoad.map(async photo => {
|
|
410
|
+
try {
|
|
411
|
+
const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
|
|
412
|
+
|
|
413
|
+
// Unified approach using Image.getSize (works on all platforms)
|
|
414
|
+
await new Promise(resolve => {
|
|
415
|
+
_reactNative.Image.getSize(downloadUrl, (width, height) => {
|
|
416
|
+
newDimensions[photo.id] = {
|
|
417
|
+
width,
|
|
418
|
+
height
|
|
419
|
+
};
|
|
420
|
+
hasNewDimensions = true;
|
|
421
|
+
resolve();
|
|
422
|
+
}, () => {
|
|
423
|
+
// Fallback dimensions
|
|
424
|
+
newDimensions[photo.id] = {
|
|
425
|
+
width: 1,
|
|
426
|
+
height: 1
|
|
427
|
+
};
|
|
428
|
+
hasNewDimensions = true;
|
|
429
|
+
resolve();
|
|
430
|
+
});
|
|
431
|
+
});
|
|
432
|
+
} catch (error) {
|
|
433
|
+
// Fallback dimensions for any errors
|
|
434
|
+
newDimensions[photo.id] = {
|
|
435
|
+
width: 1,
|
|
436
|
+
height: 1
|
|
437
|
+
};
|
|
438
|
+
hasNewDimensions = true;
|
|
439
|
+
}
|
|
440
|
+
}));
|
|
441
|
+
if (hasNewDimensions) {
|
|
442
|
+
setPhotoDimensions(newDimensions);
|
|
443
|
+
}
|
|
444
|
+
} catch (error) {
|
|
445
|
+
// Photo dimensions loading failed, continue without dimensions
|
|
446
|
+
} finally {
|
|
447
|
+
setLoadingDimensions(false);
|
|
448
|
+
}
|
|
449
|
+
}, [getSafeDownloadUrlCallback, photoDimensions]);
|
|
450
|
+
|
|
451
|
+
// Create justified rows from photos with responsive algorithm
|
|
452
|
+
const createJustifiedRows = (0, _react.useCallback)((photos, containerWidth) => {
|
|
453
|
+
if (photos.length === 0) return [];
|
|
454
|
+
const rows = [];
|
|
455
|
+
const photosPerRow = 3; // Fixed 3 photos per row for consistency
|
|
456
|
+
|
|
457
|
+
for (let i = 0; i < photos.length; i += photosPerRow) {
|
|
458
|
+
const rowPhotos = photos.slice(i, i + photosPerRow);
|
|
459
|
+
rows.push(rowPhotos);
|
|
460
|
+
}
|
|
461
|
+
return rows;
|
|
462
|
+
}, []);
|
|
463
|
+
const processFileUploads = async selectedFiles => {
|
|
464
|
+
if (selectedFiles.length === 0) return [];
|
|
465
|
+
if (!targetUserId) return []; // Guard clause to ensure userId is defined
|
|
466
|
+
const uploadedFiles = [];
|
|
467
|
+
try {
|
|
468
|
+
storeSetUploadProgress({
|
|
469
|
+
current: 0,
|
|
470
|
+
total: selectedFiles.length
|
|
471
|
+
});
|
|
472
|
+
const maxSize = 50 * 1024 * 1024; // 50MB
|
|
473
|
+
const oversizedFiles = selectedFiles.filter(file => file.size > maxSize);
|
|
474
|
+
if (oversizedFiles.length > 0) {
|
|
475
|
+
const fileList = oversizedFiles.map(f => f.name).join(', ');
|
|
476
|
+
_sonner.toast.error(`The following files are too large (max 50MB): ${fileList}`);
|
|
477
|
+
return [];
|
|
478
|
+
}
|
|
479
|
+
let successCount = 0;
|
|
480
|
+
let failureCount = 0;
|
|
481
|
+
const errors = [];
|
|
482
|
+
for (let i = 0; i < selectedFiles.length; i++) {
|
|
483
|
+
storeSetUploadProgress({
|
|
484
|
+
current: i + 1,
|
|
485
|
+
total: selectedFiles.length
|
|
486
|
+
});
|
|
487
|
+
const raw = selectedFiles[i];
|
|
488
|
+
const fileName = raw.name || `file-${i + 1}`;
|
|
489
|
+
const optimisticId = `temp-${Date.now()}-${i}-${Math.random().toString(36).substr(2, 9)}`; // Unique ID per file
|
|
490
|
+
|
|
491
|
+
try {
|
|
492
|
+
// Validate file before upload
|
|
493
|
+
if (!raw || !raw.name || raw.size === undefined || raw.size <= 0) {
|
|
494
|
+
const errorMsg = `Invalid file: ${fileName}`;
|
|
495
|
+
console.error('Upload validation failed:', {
|
|
496
|
+
file: raw,
|
|
497
|
+
error: errorMsg
|
|
498
|
+
});
|
|
499
|
+
failureCount++;
|
|
500
|
+
errors.push(`${fileName}: Invalid file (missing name or size)`);
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
const optimisticFile = {
|
|
504
|
+
id: optimisticId,
|
|
505
|
+
filename: raw.name,
|
|
506
|
+
contentType: raw.type || 'application/octet-stream',
|
|
507
|
+
length: raw.size,
|
|
508
|
+
chunkSize: 0,
|
|
509
|
+
uploadDate: new Date().toISOString(),
|
|
510
|
+
metadata: {
|
|
511
|
+
uploading: true
|
|
512
|
+
},
|
|
513
|
+
variants: []
|
|
514
|
+
};
|
|
515
|
+
_fileStore.useFileStore.getState().addFile(optimisticFile, {
|
|
516
|
+
prepend: true
|
|
517
|
+
});
|
|
518
|
+
|
|
519
|
+
// Use the mutation hook with authentication handling
|
|
520
|
+
const result = await uploadFileMutation.mutateAsync({
|
|
521
|
+
file: raw,
|
|
522
|
+
visibility: defaultVisibility
|
|
523
|
+
});
|
|
524
|
+
|
|
525
|
+
// Attempt to refresh file list incrementally – fetch single file metadata if API allows
|
|
526
|
+
if (result?.file || result?.files?.[0]) {
|
|
527
|
+
const f = result.file || result.files[0];
|
|
528
|
+
const merged = {
|
|
529
|
+
id: f.id,
|
|
530
|
+
filename: f.originalName || f.sha256 || raw.name,
|
|
531
|
+
contentType: f.mime || raw.type || 'application/octet-stream',
|
|
532
|
+
length: f.size || raw.size,
|
|
533
|
+
chunkSize: 0,
|
|
534
|
+
uploadDate: f.createdAt || new Date().toISOString(),
|
|
535
|
+
metadata: f.metadata || {},
|
|
536
|
+
variants: f.variants || []
|
|
537
|
+
};
|
|
538
|
+
// Remove optimistic then add real
|
|
539
|
+
_fileStore.useFileStore.getState().removeFile(optimisticId);
|
|
540
|
+
_fileStore.useFileStore.getState().addFile(merged, {
|
|
541
|
+
prepend: true
|
|
542
|
+
});
|
|
543
|
+
uploadedFiles.push(merged);
|
|
544
|
+
successCount++;
|
|
545
|
+
} else {
|
|
546
|
+
// Fallback: will reconcile on later list refresh
|
|
547
|
+
_fileStore.useFileStore.getState().updateFile(optimisticId, {
|
|
548
|
+
metadata: {
|
|
549
|
+
uploading: false
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
console.warn('Upload completed but no file data returned:', {
|
|
553
|
+
fileName,
|
|
554
|
+
result
|
|
555
|
+
});
|
|
556
|
+
// Still count as success if upload didn't throw
|
|
557
|
+
successCount++;
|
|
558
|
+
}
|
|
559
|
+
} catch (error) {
|
|
560
|
+
failureCount++;
|
|
561
|
+
const errorMessage = error.message || error.toString() || 'Upload failed';
|
|
562
|
+
const fullError = `${fileName}: ${errorMessage}`;
|
|
563
|
+
errors.push(fullError);
|
|
564
|
+
console.error('File upload failed:', {
|
|
565
|
+
fileName,
|
|
566
|
+
fileSize: raw.size,
|
|
567
|
+
fileType: raw.type,
|
|
568
|
+
error: errorMessage,
|
|
569
|
+
stack: error.stack
|
|
570
|
+
});
|
|
571
|
+
|
|
572
|
+
// Remove optimistic file on error (use the same optimisticId from above)
|
|
573
|
+
_fileStore.useFileStore.getState().removeFile(optimisticId);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
// Show success/error messages
|
|
578
|
+
if (successCount > 0) {
|
|
579
|
+
_sonner.toast.success(`${successCount} file(s) uploaded successfully`);
|
|
580
|
+
}
|
|
581
|
+
if (failureCount > 0) {
|
|
582
|
+
// Show detailed error message with first few errors
|
|
583
|
+
const errorDetails = errors.length > 0 ? `\n${errors.slice(0, 3).join('\n')}${errors.length > 3 ? `\n...and ${errors.length - 3} more` : ''}` : '';
|
|
584
|
+
_sonner.toast.error(`${failureCount} file(s) failed to upload${errorDetails}`);
|
|
585
|
+
}
|
|
586
|
+
// Silent background refresh to ensure metadata/variants updated
|
|
587
|
+
setTimeout(() => {
|
|
588
|
+
loadFiles('silent');
|
|
589
|
+
}, 1200);
|
|
590
|
+
} catch (error) {
|
|
591
|
+
_sonner.toast.error(error.message || 'Failed to upload files');
|
|
592
|
+
} finally {
|
|
593
|
+
storeSetUploadProgress(null);
|
|
594
|
+
}
|
|
595
|
+
return uploadedFiles;
|
|
596
|
+
};
|
|
597
|
+
const handleFileSelection = (0, _react.useCallback)(async selectedFiles => {
|
|
598
|
+
const MAX_FILE_SIZE = 100 * 1024 * 1024; // 100MB
|
|
599
|
+
const processedFiles = [];
|
|
600
|
+
for (const file of selectedFiles) {
|
|
601
|
+
// Validate file has required properties
|
|
602
|
+
if (!file) {
|
|
603
|
+
console.error('Invalid file: file is null or undefined');
|
|
604
|
+
_sonner.toast.error('Invalid file: file is missing');
|
|
605
|
+
continue;
|
|
606
|
+
}
|
|
607
|
+
if (!file.name || typeof file.name !== 'string') {
|
|
608
|
+
console.error('Invalid file: missing or invalid name property', file);
|
|
609
|
+
_sonner.toast.error('Invalid file: missing file name');
|
|
610
|
+
continue;
|
|
611
|
+
}
|
|
612
|
+
if (file.size === undefined || file.size === null || isNaN(file.size)) {
|
|
613
|
+
console.error('Invalid file: missing or invalid size property', file);
|
|
614
|
+
_sonner.toast.error(`Invalid file "${file.name || 'unknown'}": missing file size`);
|
|
615
|
+
continue;
|
|
616
|
+
}
|
|
617
|
+
if (file.size <= 0) {
|
|
618
|
+
console.error('Invalid file: file size is zero or negative', file);
|
|
619
|
+
_sonner.toast.error(`File "${file.name}" is empty`);
|
|
620
|
+
continue;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
// Validate file size
|
|
624
|
+
if (file.size > MAX_FILE_SIZE) {
|
|
625
|
+
_sonner.toast.error(`"${file.name}" is too large. Maximum file size is ${(0, _fileManagement.formatFileSize)(MAX_FILE_SIZE)}`);
|
|
626
|
+
continue;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
// Ensure file has a type property
|
|
630
|
+
const fileType = file.type || 'application/octet-stream';
|
|
631
|
+
|
|
632
|
+
// Generate preview for images - unified approach
|
|
633
|
+
let preview;
|
|
634
|
+
if (fileType.startsWith('image/')) {
|
|
635
|
+
// Try to use file URI from expo-document-picker if available (works on all platforms)
|
|
636
|
+
const fileUri = file.uri;
|
|
637
|
+
if (fileUri && typeof fileUri === 'string' && (fileUri.startsWith('file://') || fileUri.startsWith('content://') || fileUri.startsWith('http://') || fileUri.startsWith('https://') || fileUri.startsWith('blob:'))) {
|
|
638
|
+
preview = fileUri;
|
|
639
|
+
} else {
|
|
640
|
+
// Fallback: create blob URL if possible (works on web)
|
|
641
|
+
try {
|
|
642
|
+
if (file instanceof File || file instanceof Blob) {
|
|
643
|
+
preview = URL.createObjectURL(file);
|
|
644
|
+
}
|
|
645
|
+
} catch (error) {
|
|
646
|
+
console.warn('Failed to create preview URL:', error);
|
|
647
|
+
// Preview is optional, continue without it
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
processedFiles.push({
|
|
652
|
+
file,
|
|
653
|
+
preview,
|
|
654
|
+
size: file.size,
|
|
655
|
+
name: file.name,
|
|
656
|
+
type: fileType
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
if (processedFiles.length === 0) {
|
|
660
|
+
_sonner.toast.error('No valid files to upload');
|
|
661
|
+
return;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
// Show preview modal for user to review files before upload
|
|
665
|
+
setPendingFiles(processedFiles);
|
|
666
|
+
setShowUploadPreview(true);
|
|
667
|
+
}, []);
|
|
668
|
+
const handleConfirmUpload = async () => {
|
|
669
|
+
if (pendingFiles.length === 0) return;
|
|
670
|
+
setShowUploadPreview(false);
|
|
671
|
+
uploadStartRef.current = Date.now();
|
|
672
|
+
storeSetUploading(true);
|
|
673
|
+
storeSetUploadProgress(null);
|
|
674
|
+
try {
|
|
675
|
+
const filesToUpload = pendingFiles.map(pf => pf.file);
|
|
676
|
+
storeSetUploadProgress({
|
|
677
|
+
current: 0,
|
|
678
|
+
total: filesToUpload.length
|
|
679
|
+
});
|
|
680
|
+
const uploadedFiles = await processFileUploads(filesToUpload);
|
|
681
|
+
|
|
682
|
+
// Cleanup preview URLs
|
|
683
|
+
pendingFiles.forEach(pf => {
|
|
684
|
+
if (pf.preview) {
|
|
685
|
+
URL.revokeObjectURL(pf.preview);
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
setPendingFiles([]);
|
|
689
|
+
|
|
690
|
+
// If in selectMode, automatically select the uploaded file(s)
|
|
691
|
+
if (selectMode && uploadedFiles.length > 0) {
|
|
692
|
+
// Wait a bit for the file store to update and ensure file is available
|
|
693
|
+
setTimeout(() => {
|
|
694
|
+
const fileToSelect = uploadedFiles[0];
|
|
695
|
+
if (!multiSelect && fileToSelect) {
|
|
696
|
+
// Single select mode - directly call onSelect callback
|
|
697
|
+
onSelect?.(fileToSelect);
|
|
698
|
+
if (afterSelect === 'back') {
|
|
699
|
+
goBack?.();
|
|
700
|
+
} else if (afterSelect === 'close') {
|
|
701
|
+
onClose?.();
|
|
702
|
+
}
|
|
703
|
+
} else if (multiSelect) {
|
|
704
|
+
// Multi-select mode - add all uploaded files to selection
|
|
705
|
+
uploadedFiles.forEach(file => {
|
|
706
|
+
if (!selectedIds.has(file.id)) {
|
|
707
|
+
setSelectedIds(prev => new Set(prev).add(file.id));
|
|
708
|
+
}
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
}, 500);
|
|
712
|
+
}
|
|
713
|
+
endUpload();
|
|
714
|
+
} catch (error) {
|
|
715
|
+
_sonner.toast.error(error.message || 'Failed to upload files');
|
|
716
|
+
endUpload();
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
const handleCancelUpload = () => {
|
|
720
|
+
// Cleanup preview URLs
|
|
721
|
+
pendingFiles.forEach(pf => {
|
|
722
|
+
if (pf.preview) {
|
|
723
|
+
URL.revokeObjectURL(pf.preview);
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
setPendingFiles([]);
|
|
727
|
+
setShowUploadPreview(false);
|
|
728
|
+
};
|
|
729
|
+
const removePendingFile = index => {
|
|
730
|
+
const file = pendingFiles[index];
|
|
731
|
+
if (file.preview) {
|
|
732
|
+
URL.revokeObjectURL(file.preview);
|
|
733
|
+
}
|
|
734
|
+
const updated = pendingFiles.filter((_, i) => i !== index);
|
|
735
|
+
setPendingFiles(updated);
|
|
736
|
+
if (updated.length === 0) {
|
|
737
|
+
setShowUploadPreview(false);
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Handle file upload - opens document picker and processes selected files
|
|
743
|
+
* Expo 54 compatible - works on web, iOS, and Android
|
|
744
|
+
*/
|
|
745
|
+
const handleFileUpload = async () => {
|
|
746
|
+
// Prevent concurrent document picker calls
|
|
747
|
+
if (isPickingDocument) {
|
|
748
|
+
_sonner.toast.error('Please wait for the current file selection to complete');
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
try {
|
|
752
|
+
setIsPickingDocument(true);
|
|
753
|
+
|
|
754
|
+
// Lazy load expo-document-picker
|
|
755
|
+
const picker = await loadDocumentPicker();
|
|
756
|
+
|
|
757
|
+
// Use expo-document-picker (works on all platforms including web)
|
|
758
|
+
// On web, it uses the native file input and provides File objects directly
|
|
759
|
+
const result = await picker.getDocumentAsync({
|
|
760
|
+
type: '*/*',
|
|
761
|
+
multiple: true,
|
|
762
|
+
copyToCacheDirectory: true
|
|
763
|
+
});
|
|
764
|
+
if (result.canceled) {
|
|
765
|
+
setIsPickingDocument(false);
|
|
766
|
+
return;
|
|
767
|
+
}
|
|
768
|
+
if (!result.assets || result.assets.length === 0) {
|
|
769
|
+
setIsPickingDocument(false);
|
|
770
|
+
_sonner.toast.error('No files were selected');
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
// Convert expo document picker results to File-like objects
|
|
775
|
+
// According to Expo 54 docs, expo-document-picker returns assets with:
|
|
776
|
+
// - uri: file URI (file://, content://, or blob URL)
|
|
777
|
+
// - name: file name
|
|
778
|
+
// - size: file size in bytes
|
|
779
|
+
// - mimeType: MIME type of the file
|
|
780
|
+
// - file: (optional) native File object (usually only on web)
|
|
781
|
+
const files = [];
|
|
782
|
+
const errors = [];
|
|
783
|
+
|
|
784
|
+
// Process files in parallel for better performance
|
|
785
|
+
// This allows multiple files to be converted simultaneously
|
|
786
|
+
const conversionPromises = result.assets.map((doc, index) => (0, _fileManagement.convertDocumentPickerAssetToFile)(doc, index).then(file => {
|
|
787
|
+
if (file) {
|
|
788
|
+
// Validate file has required properties before adding
|
|
789
|
+
if (!file.name || file.size === undefined) {
|
|
790
|
+
errors.push(`File "${doc.name || 'file'}" is invalid: missing required properties`);
|
|
791
|
+
return null;
|
|
792
|
+
}
|
|
793
|
+
return file;
|
|
794
|
+
}
|
|
795
|
+
return null;
|
|
796
|
+
}).catch(error => {
|
|
797
|
+
errors.push(`File "${doc.name || 'file'}": ${error.message || 'Failed to process'}`);
|
|
798
|
+
return null;
|
|
799
|
+
}));
|
|
800
|
+
const convertedFiles = await Promise.all(conversionPromises);
|
|
801
|
+
|
|
802
|
+
// Filter out null values
|
|
803
|
+
for (const file of convertedFiles) {
|
|
804
|
+
if (file) {
|
|
805
|
+
files.push(file);
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
// Show errors if any
|
|
810
|
+
if (errors.length > 0) {
|
|
811
|
+
const errorMessage = errors.slice(0, 3).join('\n') + (errors.length > 3 ? `\n...and ${errors.length - 3} more` : '');
|
|
812
|
+
_sonner.toast.error(`Failed to load some files:\n${errorMessage}`);
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
// Process successfully converted files
|
|
816
|
+
if (files.length > 0) {
|
|
817
|
+
await handleFileSelection(files);
|
|
818
|
+
} else {
|
|
819
|
+
// Files were selected but none could be converted
|
|
820
|
+
_sonner.toast.error('No files could be processed. Please try selecting files again.');
|
|
821
|
+
}
|
|
822
|
+
} catch (error) {
|
|
823
|
+
console.error('File upload error:', error);
|
|
824
|
+
if (error.message?.includes('expo-document-picker') || error.message?.includes('Different document picking in progress')) {
|
|
825
|
+
if (error.message?.includes('Different document picking in progress')) {
|
|
826
|
+
_sonner.toast.error('Please wait for the current file selection to complete');
|
|
827
|
+
} else {
|
|
828
|
+
_sonner.toast.error('File picker not available. Please install expo-document-picker');
|
|
829
|
+
}
|
|
830
|
+
} else {
|
|
831
|
+
_sonner.toast.error(error.message || 'Failed to select files');
|
|
832
|
+
}
|
|
833
|
+
} finally {
|
|
834
|
+
// Always reset the picking state, even if there was an error
|
|
835
|
+
setIsPickingDocument(false);
|
|
836
|
+
}
|
|
837
|
+
};
|
|
838
|
+
const handleFileDelete = async (fileId, filename) => {
|
|
839
|
+
// Use platform-aware confirmation dialog
|
|
840
|
+
const confirmed = await (0, _fileManagement.confirmAction)(`Are you sure you want to delete "${filename}"? This action cannot be undone.`, 'Delete File', 'Delete', 'Cancel');
|
|
841
|
+
if (!confirmed) {
|
|
842
|
+
return;
|
|
843
|
+
}
|
|
844
|
+
try {
|
|
845
|
+
storeSetDeleting(fileId);
|
|
846
|
+
await oxyServices.deleteFile(fileId);
|
|
847
|
+
_sonner.toast.success('File deleted successfully');
|
|
848
|
+
|
|
849
|
+
// Reload files after successful deletion
|
|
850
|
+
// Optimistic remove
|
|
851
|
+
_fileStore.useFileStore.getState().removeFile(fileId);
|
|
852
|
+
// Silent background reconcile
|
|
853
|
+
setTimeout(() => loadFiles('silent'), 800);
|
|
854
|
+
} catch (error) {
|
|
855
|
+
// Provide specific error messages
|
|
856
|
+
if (error.message?.includes('File not found') || error.message?.includes('404')) {
|
|
857
|
+
_sonner.toast.error('File not found. It may have already been deleted.');
|
|
858
|
+
// Still reload files to refresh the list
|
|
859
|
+
setTimeout(() => loadFiles('silent'), 800);
|
|
860
|
+
} else if (error.message?.includes('permission') || error.message?.includes('403')) {
|
|
861
|
+
_sonner.toast.error('You do not have permission to delete this file.');
|
|
862
|
+
} else {
|
|
863
|
+
_sonner.toast.error(error.message || 'Failed to delete file');
|
|
864
|
+
}
|
|
865
|
+
} finally {
|
|
866
|
+
storeSetDeleting(null);
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
const handleBulkDelete = (0, _react.useCallback)(async () => {
|
|
870
|
+
if (selectedIds.size === 0) return;
|
|
871
|
+
const fileMap = {};
|
|
872
|
+
files.forEach(f => {
|
|
873
|
+
fileMap[f.id] = f;
|
|
874
|
+
});
|
|
875
|
+
const selectedFiles = Array.from(selectedIds).map(id => fileMap[id]).filter(Boolean);
|
|
876
|
+
const confirmed = await (0, _fileManagement.confirmAction)(`Are you sure you want to delete ${selectedFiles.length} file(s)? This action cannot be undone.`, 'Delete Files', 'Delete', 'Cancel');
|
|
877
|
+
if (!confirmed) return;
|
|
878
|
+
try {
|
|
879
|
+
const deletePromises = Array.from(selectedIds).map(async fileId => {
|
|
880
|
+
try {
|
|
881
|
+
await oxyServices.deleteFile(fileId);
|
|
882
|
+
_fileStore.useFileStore.getState().removeFile(fileId);
|
|
883
|
+
return {
|
|
884
|
+
success: true,
|
|
885
|
+
fileId
|
|
886
|
+
};
|
|
887
|
+
} catch (error) {
|
|
888
|
+
return {
|
|
889
|
+
success: false,
|
|
890
|
+
fileId,
|
|
891
|
+
error
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
});
|
|
895
|
+
const results = await Promise.allSettled(deletePromises);
|
|
896
|
+
const successful = results.filter(r => r.status === 'fulfilled' && r.value.success).length;
|
|
897
|
+
const failed = results.length - successful;
|
|
898
|
+
if (successful > 0) {
|
|
899
|
+
_sonner.toast.success(`${successful} file(s) deleted successfully`);
|
|
900
|
+
}
|
|
901
|
+
if (failed > 0) {
|
|
902
|
+
_sonner.toast.error(`${failed} file(s) failed to delete`);
|
|
903
|
+
}
|
|
904
|
+
setSelectedIds(new Set());
|
|
905
|
+
setTimeout(() => loadFiles('silent'), 800);
|
|
906
|
+
} catch (error) {
|
|
907
|
+
_sonner.toast.error(error.message || 'Failed to delete files');
|
|
908
|
+
}
|
|
909
|
+
}, [selectedIds, files, oxyServices, loadFiles]);
|
|
910
|
+
const handleBulkVisibilityChange = (0, _react.useCallback)(async visibility => {
|
|
911
|
+
if (selectedIds.size === 0) return;
|
|
912
|
+
try {
|
|
913
|
+
const updatePromises = Array.from(selectedIds).map(async fileId => {
|
|
914
|
+
try {
|
|
915
|
+
await oxyServices.assetUpdateVisibility(fileId, visibility);
|
|
916
|
+
return {
|
|
917
|
+
success: true,
|
|
918
|
+
fileId
|
|
919
|
+
};
|
|
920
|
+
} catch (error) {
|
|
921
|
+
return {
|
|
922
|
+
success: false,
|
|
923
|
+
fileId,
|
|
924
|
+
error
|
|
925
|
+
};
|
|
926
|
+
}
|
|
927
|
+
});
|
|
928
|
+
const results = await Promise.allSettled(updatePromises);
|
|
929
|
+
const successful = results.filter(r => r.status === 'fulfilled' && r.value.success).length;
|
|
930
|
+
const failed = results.length - successful;
|
|
931
|
+
if (successful > 0) {
|
|
932
|
+
_sonner.toast.success(`${successful} file(s) visibility updated to ${visibility}`);
|
|
933
|
+
// Update file metadata in store
|
|
934
|
+
Array.from(selectedIds).forEach(fileId => {
|
|
935
|
+
_fileStore.useFileStore.getState().updateFile(fileId, {
|
|
936
|
+
metadata: {
|
|
937
|
+
...files.find(f => f.id === fileId)?.metadata,
|
|
938
|
+
visibility
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
if (failed > 0) {
|
|
944
|
+
_sonner.toast.error(`${failed} file(s) failed to update visibility`);
|
|
945
|
+
}
|
|
946
|
+
setTimeout(() => loadFiles('silent'), 800);
|
|
947
|
+
} catch (error) {
|
|
948
|
+
_sonner.toast.error(error.message || 'Failed to update visibility');
|
|
949
|
+
}
|
|
950
|
+
}, [selectedIds, oxyServices, files, loadFiles]);
|
|
951
|
+
|
|
952
|
+
// Unified download function - works on all platforms
|
|
953
|
+
const handleFileDownload = async (fileId, filename) => {
|
|
954
|
+
try {
|
|
955
|
+
// Try to use the download URL with a simple approach
|
|
956
|
+
// On web, this creates a download link. On mobile, it opens the URL.
|
|
957
|
+
const downloadUrl = oxyServices.getFileDownloadUrl(fileId);
|
|
958
|
+
|
|
959
|
+
// For web platforms, use link download
|
|
960
|
+
if (typeof window !== 'undefined' && window.document) {
|
|
961
|
+
try {
|
|
962
|
+
// Try simple link download first
|
|
963
|
+
const link = document.createElement('a');
|
|
964
|
+
link.href = downloadUrl;
|
|
965
|
+
link.download = filename;
|
|
966
|
+
link.target = '_blank';
|
|
967
|
+
document.body.appendChild(link);
|
|
968
|
+
link.click();
|
|
969
|
+
document.body.removeChild(link);
|
|
970
|
+
_sonner.toast.success('File download started');
|
|
971
|
+
} catch (linkError) {
|
|
972
|
+
// Fallback to authenticated download
|
|
973
|
+
const blob = await oxyServices.getFileContentAsBlob(fileId);
|
|
974
|
+
const url = URL.createObjectURL(blob);
|
|
975
|
+
const link = document.createElement('a');
|
|
976
|
+
link.href = url;
|
|
977
|
+
link.download = filename;
|
|
978
|
+
document.body.appendChild(link);
|
|
979
|
+
link.click();
|
|
980
|
+
document.body.removeChild(link);
|
|
981
|
+
|
|
982
|
+
// Clean up the blob URL
|
|
983
|
+
URL.revokeObjectURL(url);
|
|
984
|
+
_sonner.toast.success('File downloaded successfully');
|
|
985
|
+
}
|
|
986
|
+
} else {
|
|
987
|
+
// For mobile, open the URL (user can save from browser)
|
|
988
|
+
// Note: This is a simplified approach - for full mobile support,
|
|
989
|
+
// consider using expo-file-system or react-native-fs
|
|
990
|
+
_sonner.toast.info('Please use your browser to download the file');
|
|
991
|
+
}
|
|
992
|
+
} catch (error) {
|
|
993
|
+
_sonner.toast.error(error.message || 'Failed to download file');
|
|
994
|
+
}
|
|
995
|
+
};
|
|
996
|
+
const handleFileOpen = async file => {
|
|
997
|
+
if (selectMode) {
|
|
998
|
+
toggleSelect(file);
|
|
999
|
+
return;
|
|
1000
|
+
}
|
|
1001
|
+
try {
|
|
1002
|
+
setLoadingFileContent(true);
|
|
1003
|
+
setOpenedFile(file);
|
|
1004
|
+
|
|
1005
|
+
// For text files, images, and other viewable content, try to load the content
|
|
1006
|
+
if (file.contentType.startsWith('text/') || file.contentType.includes('json') || file.contentType.includes('xml') || file.contentType.includes('javascript') || file.contentType.includes('typescript') || file.contentType.startsWith('image/') || file.contentType.includes('pdf') || file.contentType.startsWith('video/') || file.contentType.startsWith('audio/')) {
|
|
1007
|
+
try {
|
|
1008
|
+
if (file.contentType.startsWith('image/') || file.contentType.includes('pdf') || file.contentType.startsWith('video/') || file.contentType.startsWith('audio/')) {
|
|
1009
|
+
// For images, PDFs, videos, and audio, we'll use the URL directly
|
|
1010
|
+
const downloadUrl = oxyServices.getFileDownloadUrl(file.id);
|
|
1011
|
+
setFileContent(downloadUrl);
|
|
1012
|
+
} else {
|
|
1013
|
+
// For text files, get the content using authenticated request
|
|
1014
|
+
const content = await oxyServices.getFileContentAsText(file.id);
|
|
1015
|
+
setFileContent(content);
|
|
1016
|
+
}
|
|
1017
|
+
} catch (error) {
|
|
1018
|
+
if (error.message?.includes('404') || error.message?.includes('not found')) {
|
|
1019
|
+
_sonner.toast.error('File not found. It may have been deleted.');
|
|
1020
|
+
} else {
|
|
1021
|
+
_sonner.toast.error('Failed to load file content');
|
|
1022
|
+
}
|
|
1023
|
+
setFileContent(null);
|
|
1024
|
+
}
|
|
1025
|
+
} else {
|
|
1026
|
+
// For non-viewable files, don't load content
|
|
1027
|
+
setFileContent(null);
|
|
1028
|
+
}
|
|
1029
|
+
} catch (error) {
|
|
1030
|
+
_sonner.toast.error(error.message || 'Failed to open file');
|
|
1031
|
+
} finally {
|
|
1032
|
+
setLoadingFileContent(false);
|
|
1033
|
+
}
|
|
1034
|
+
};
|
|
1035
|
+
const handleCloseFile = () => {
|
|
1036
|
+
setOpenedFile(null);
|
|
1037
|
+
setFileContent(null);
|
|
1038
|
+
setShowFileDetailsInViewer(false);
|
|
1039
|
+
// Don't reset view mode when closing a file
|
|
1040
|
+
};
|
|
1041
|
+
const showFileDetailsModal = file => {
|
|
1042
|
+
setSelectedFile(file);
|
|
1043
|
+
setShowFileDetails(true);
|
|
1044
|
+
};
|
|
1045
|
+
const renderSimplePhotoItem = (0, _react.useCallback)((photo, index) => {
|
|
1046
|
+
const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
|
|
1047
|
+
|
|
1048
|
+
// Calculate photo item width based on actual container size from bottom sheet
|
|
1049
|
+
let itemsPerRow = 3; // Default for mobile
|
|
1050
|
+
if (safeContainerWidth > 768) itemsPerRow = 4; // Desktop/tablet
|
|
1051
|
+
else if (safeContainerWidth > 480) itemsPerRow = 3; // Large mobile
|
|
1052
|
+
|
|
1053
|
+
// Account for the photoScrollContainer padding (16px on each side = 32px total)
|
|
1054
|
+
const scrollContainerPadding = 32; // Total horizontal padding from photoScrollContainer
|
|
1055
|
+
const gaps = (itemsPerRow - 1) * 4; // Gap between items (4px)
|
|
1056
|
+
const availableWidth = safeContainerWidth - scrollContainerPadding;
|
|
1057
|
+
const itemWidth = (availableWidth - gaps) / itemsPerRow;
|
|
1058
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
1059
|
+
style: [_styles.fileManagementStyles.simplePhotoItem, {
|
|
1060
|
+
width: itemWidth,
|
|
1061
|
+
height: itemWidth,
|
|
1062
|
+
marginRight: (index + 1) % itemsPerRow === 0 ? 0 : 4,
|
|
1063
|
+
...(selectMode && selectedIds.has(photo.id) ? {
|
|
1064
|
+
borderWidth: 2,
|
|
1065
|
+
borderColor: themeStyles.primaryColor
|
|
1066
|
+
} : {})
|
|
1067
|
+
}],
|
|
1068
|
+
onPress: () => handleFileOpen(photo),
|
|
1069
|
+
activeOpacity: 0.8,
|
|
1070
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1071
|
+
style: _styles.fileManagementStyles.simplePhotoContainer,
|
|
1072
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
|
|
1073
|
+
source: {
|
|
1074
|
+
uri: downloadUrl
|
|
1075
|
+
},
|
|
1076
|
+
style: _styles.fileManagementStyles.simplePhotoImage,
|
|
1077
|
+
contentFit: "cover",
|
|
1078
|
+
transition: 120,
|
|
1079
|
+
cachePolicy: "memory-disk",
|
|
1080
|
+
onError: () => {
|
|
1081
|
+
// Photo failed to load, will show placeholder
|
|
1082
|
+
},
|
|
1083
|
+
accessibilityLabel: photo.filename
|
|
1084
|
+
}), selectMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1085
|
+
style: _styles.fileManagementStyles.selectionBadge,
|
|
1086
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1087
|
+
name: selectedIds.has(photo.id) ? 'checkmark-circle' : 'ellipse-outline',
|
|
1088
|
+
size: 20,
|
|
1089
|
+
color: selectedIds.has(photo.id) ? themeStyles.primaryColor : themeStyles.textColor
|
|
1090
|
+
})
|
|
1091
|
+
})]
|
|
1092
|
+
})
|
|
1093
|
+
}, photo.id);
|
|
1094
|
+
}, [oxyServices, safeContainerWidth, selectMode, selectedIds, themeStyles.primaryColor, themeStyles.textColor]);
|
|
1095
|
+
const renderJustifiedPhotoItem = (0, _react.useCallback)((photo, width, height, isLast) => {
|
|
1096
|
+
const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
|
|
1097
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
1098
|
+
style: [_styles.fileManagementStyles.justifiedPhotoItem, {
|
|
1099
|
+
width,
|
|
1100
|
+
height,
|
|
1101
|
+
...(selectMode && selectedIds.has(photo.id) ? {
|
|
1102
|
+
borderWidth: 2,
|
|
1103
|
+
borderColor: themeStyles.primaryColor
|
|
1104
|
+
} : {}),
|
|
1105
|
+
...(selectMode && multiSelect && selectedIds.size > 0 && !selectedIds.has(photo.id) ? {
|
|
1106
|
+
opacity: 0.4
|
|
1107
|
+
} : {})
|
|
1108
|
+
}],
|
|
1109
|
+
onPress: () => handleFileOpen(photo),
|
|
1110
|
+
activeOpacity: 0.8,
|
|
1111
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1112
|
+
style: _styles.fileManagementStyles.justifiedPhotoContainer,
|
|
1113
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
|
|
1114
|
+
source: {
|
|
1115
|
+
uri: downloadUrl
|
|
1116
|
+
},
|
|
1117
|
+
style: _styles.fileManagementStyles.justifiedPhotoImage,
|
|
1118
|
+
contentFit: "cover",
|
|
1119
|
+
transition: 120,
|
|
1120
|
+
cachePolicy: "memory-disk",
|
|
1121
|
+
onError: () => {
|
|
1122
|
+
// Photo failed to load, will show placeholder
|
|
1123
|
+
},
|
|
1124
|
+
accessibilityLabel: photo.filename
|
|
1125
|
+
}), selectMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1126
|
+
style: _styles.fileManagementStyles.selectionBadge,
|
|
1127
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1128
|
+
name: selectedIds.has(photo.id) ? 'checkmark-circle' : 'ellipse-outline',
|
|
1129
|
+
size: 20,
|
|
1130
|
+
color: selectedIds.has(photo.id) ? themeStyles.primaryColor : themeStyles.textColor
|
|
1131
|
+
})
|
|
1132
|
+
})]
|
|
1133
|
+
})
|
|
1134
|
+
}, photo.id);
|
|
1135
|
+
}, [oxyServices, selectMode, selectedIds, multiSelect, themeStyles.primaryColor, themeStyles.textColor]);
|
|
1136
|
+
|
|
1137
|
+
// Run initial load once per targetUserId change to avoid accidental loops
|
|
1138
|
+
const lastLoadedFor = (0, _react.useRef)(undefined);
|
|
1139
|
+
(0, _react.useEffect)(() => {
|
|
1140
|
+
const key = targetUserId || 'anonymous';
|
|
1141
|
+
if (lastLoadedFor.current !== key) {
|
|
1142
|
+
lastLoadedFor.current = key;
|
|
1143
|
+
loadFiles('initial');
|
|
1144
|
+
}
|
|
1145
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1146
|
+
}, [targetUserId]);
|
|
1147
|
+
const renderFileItem = file => {
|
|
1148
|
+
const isImage = file.contentType.startsWith('image/');
|
|
1149
|
+
const isPDF = file.contentType.includes('pdf');
|
|
1150
|
+
const isVideo = file.contentType.startsWith('video/');
|
|
1151
|
+
const isAudio = file.contentType.startsWith('audio/');
|
|
1152
|
+
const hasPreview = isImage || isPDF || isVideo;
|
|
1153
|
+
const borderColor = themeStyles.borderColor;
|
|
1154
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1155
|
+
style: [_styles.fileManagementStyles.fileItem, {
|
|
1156
|
+
backgroundColor: themeStyles.secondaryBackgroundColor,
|
|
1157
|
+
borderColor
|
|
1158
|
+
}, selectMode && selectedIds.has(file.id) && {
|
|
1159
|
+
borderColor: themeStyles.primaryColor,
|
|
1160
|
+
borderWidth: 2
|
|
1161
|
+
}],
|
|
1162
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
1163
|
+
style: _styles.fileManagementStyles.fileContent,
|
|
1164
|
+
onPress: () => handleFileOpen(file),
|
|
1165
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1166
|
+
style: _styles.fileManagementStyles.filePreviewContainer,
|
|
1167
|
+
children: hasPreview ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1168
|
+
style: _styles.fileManagementStyles.filePreview,
|
|
1169
|
+
children: [isImage && /*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
|
|
1170
|
+
source: {
|
|
1171
|
+
uri: getSafeDownloadUrlCallback(file, 'thumb')
|
|
1172
|
+
},
|
|
1173
|
+
style: _styles.fileManagementStyles.previewImage,
|
|
1174
|
+
contentFit: "cover",
|
|
1175
|
+
transition: 120,
|
|
1176
|
+
cachePolicy: "memory-disk",
|
|
1177
|
+
onError: () => {
|
|
1178
|
+
// Image preview failed to load
|
|
1179
|
+
},
|
|
1180
|
+
accessibilityLabel: file.filename
|
|
1181
|
+
}), isPDF && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1182
|
+
style: _styles.fileManagementStyles.pdfPreview,
|
|
1183
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1184
|
+
name: "document",
|
|
1185
|
+
size: 32,
|
|
1186
|
+
color: themeStyles.primaryColor
|
|
1187
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1188
|
+
style: [_styles.fileManagementStyles.pdfLabel, {
|
|
1189
|
+
color: themeStyles.primaryColor
|
|
1190
|
+
}],
|
|
1191
|
+
children: "PDF"
|
|
1192
|
+
})]
|
|
1193
|
+
}), isVideo && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1194
|
+
style: _styles.fileManagementStyles.videoPreviewWrapper,
|
|
1195
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
|
|
1196
|
+
source: {
|
|
1197
|
+
uri: getSafeDownloadUrlCallback(file, 'thumb')
|
|
1198
|
+
},
|
|
1199
|
+
style: _styles.fileManagementStyles.videoPosterImage,
|
|
1200
|
+
contentFit: "cover",
|
|
1201
|
+
transition: 120,
|
|
1202
|
+
cachePolicy: "memory-disk",
|
|
1203
|
+
onError: _ => {
|
|
1204
|
+
// If thumbnail not available, we still show icon overlay
|
|
1205
|
+
},
|
|
1206
|
+
accessibilityLabel: file.filename + ' video thumbnail'
|
|
1207
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1208
|
+
style: _styles.fileManagementStyles.videoOverlay,
|
|
1209
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1210
|
+
name: "play",
|
|
1211
|
+
size: 24,
|
|
1212
|
+
color: "#FFFFFF"
|
|
1213
|
+
})
|
|
1214
|
+
})]
|
|
1215
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1216
|
+
style: [_styles.fileManagementStyles.fallbackIcon, {
|
|
1217
|
+
display: isImage ? 'none' : 'flex'
|
|
1218
|
+
}],
|
|
1219
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1220
|
+
name: (0, _fileManagement.getFileIcon)(file.contentType),
|
|
1221
|
+
size: 32,
|
|
1222
|
+
color: themeStyles.primaryColor
|
|
1223
|
+
})
|
|
1224
|
+
}), selectMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1225
|
+
style: _styles.fileManagementStyles.selectionBadge,
|
|
1226
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1227
|
+
name: selectedIds.has(file.id) ? 'checkmark-circle' : 'ellipse-outline',
|
|
1228
|
+
size: 22,
|
|
1229
|
+
color: selectedIds.has(file.id) ? themeStyles.primaryColor : themeStyles.textColor
|
|
1230
|
+
})
|
|
1231
|
+
})]
|
|
1232
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1233
|
+
style: _styles.fileManagementStyles.fileIconContainer,
|
|
1234
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1235
|
+
name: (0, _fileManagement.getFileIcon)(file.contentType),
|
|
1236
|
+
size: 32,
|
|
1237
|
+
color: themeStyles.primaryColor
|
|
1238
|
+
})
|
|
1239
|
+
})
|
|
1240
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1241
|
+
style: _styles.fileManagementStyles.fileInfo,
|
|
1242
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1243
|
+
style: [_styles.fileManagementStyles.fileName, {
|
|
1244
|
+
color: themeStyles.textColor
|
|
1245
|
+
}],
|
|
1246
|
+
numberOfLines: 1,
|
|
1247
|
+
children: file.filename
|
|
1248
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
1249
|
+
style: [_styles.fileManagementStyles.fileDetails, {
|
|
1250
|
+
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1251
|
+
}],
|
|
1252
|
+
children: [(0, _fileManagement.formatFileSize)(file.length), " \u2022 ", new Date(file.uploadDate).toLocaleDateString()]
|
|
1253
|
+
}), file.metadata?.description && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1254
|
+
style: [_styles.fileManagementStyles.fileDescription, {
|
|
1255
|
+
color: themeStyles.isDarkTheme ? '#AAAAAA' : '#888888'
|
|
1256
|
+
}],
|
|
1257
|
+
numberOfLines: 2,
|
|
1258
|
+
children: file.metadata.description
|
|
1259
|
+
})]
|
|
1260
|
+
})]
|
|
1261
|
+
}), !selectMode && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1262
|
+
style: _styles.fileManagementStyles.fileActions,
|
|
1263
|
+
children: [hasPreview && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
1264
|
+
style: [_styles.fileManagementStyles.actionButton, {
|
|
1265
|
+
backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
|
|
1266
|
+
}],
|
|
1267
|
+
onPress: () => handleFileOpen(file),
|
|
1268
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1269
|
+
name: "eye",
|
|
1270
|
+
size: 20,
|
|
1271
|
+
color: themeStyles.primaryColor
|
|
1272
|
+
})
|
|
1273
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
1274
|
+
style: [_styles.fileManagementStyles.actionButton, {
|
|
1275
|
+
backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
|
|
1276
|
+
}],
|
|
1277
|
+
onPress: () => handleFileDownload(file.id, file.filename),
|
|
1278
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1279
|
+
name: "download",
|
|
1280
|
+
size: 20,
|
|
1281
|
+
color: themeStyles.primaryColor
|
|
1282
|
+
})
|
|
1283
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
1284
|
+
style: [_styles.fileManagementStyles.actionButton, {
|
|
1285
|
+
backgroundColor: themeStyles.isDarkTheme ? '#400000' : '#FFEBEE'
|
|
1286
|
+
}],
|
|
1287
|
+
onPress: () => {
|
|
1288
|
+
handleFileDelete(file.id, file.filename);
|
|
1289
|
+
},
|
|
1290
|
+
disabled: deleting === file.id,
|
|
1291
|
+
children: deleting === file.id ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
1292
|
+
size: "small",
|
|
1293
|
+
color: themeStyles.dangerColor
|
|
1294
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1295
|
+
name: "trash",
|
|
1296
|
+
size: 20,
|
|
1297
|
+
color: themeStyles.dangerColor
|
|
1298
|
+
})
|
|
1299
|
+
})]
|
|
1300
|
+
})]
|
|
1301
|
+
}, file.id);
|
|
1302
|
+
};
|
|
1303
|
+
|
|
1304
|
+
// GroupedSection-based file items (for 'all' view) replacing legacy flat list look
|
|
1305
|
+
const groupedFileItems = (0, _react.useMemo)(() => {
|
|
1306
|
+
// filteredFiles is already sorted, so just use it directly
|
|
1307
|
+
const sortedFiles = filteredFiles;
|
|
1308
|
+
|
|
1309
|
+
// Store file positions for scrolling
|
|
1310
|
+
sortedFiles.forEach((file, index) => {
|
|
1311
|
+
itemRefs.current.set(file.id, index);
|
|
1312
|
+
});
|
|
1313
|
+
return sortedFiles.map(file => {
|
|
1314
|
+
const isImage = file.contentType.startsWith('image/');
|
|
1315
|
+
const isPDF = file.contentType.includes('pdf');
|
|
1316
|
+
const isVideo = file.contentType.startsWith('video/');
|
|
1317
|
+
const hasPreview = isImage || isPDF || isVideo;
|
|
1318
|
+
const isSelected = selectedIds.has(file.id);
|
|
1319
|
+
|
|
1320
|
+
// Create customIcon for preview thumbnails (36x36 to match GroupedItem iconContainer)
|
|
1321
|
+
let customIcon;
|
|
1322
|
+
if (hasPreview) {
|
|
1323
|
+
if (isImage) {
|
|
1324
|
+
customIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1325
|
+
style: {
|
|
1326
|
+
width: 36,
|
|
1327
|
+
height: 36,
|
|
1328
|
+
borderRadius: 18,
|
|
1329
|
+
overflow: 'hidden'
|
|
1330
|
+
},
|
|
1331
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
|
|
1332
|
+
source: {
|
|
1333
|
+
uri: getSafeDownloadUrlCallback(file, 'thumb')
|
|
1334
|
+
},
|
|
1335
|
+
style: {
|
|
1336
|
+
width: 36,
|
|
1337
|
+
height: 36
|
|
1338
|
+
},
|
|
1339
|
+
contentFit: "cover",
|
|
1340
|
+
transition: 120,
|
|
1341
|
+
cachePolicy: "memory-disk",
|
|
1342
|
+
onError: () => {
|
|
1343
|
+
// Image preview failed to load - will fallback to icon
|
|
1344
|
+
},
|
|
1345
|
+
accessibilityLabel: file.filename
|
|
1346
|
+
})
|
|
1347
|
+
});
|
|
1348
|
+
} else if (isVideo) {
|
|
1349
|
+
customIcon = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1350
|
+
style: {
|
|
1351
|
+
width: 36,
|
|
1352
|
+
height: 36,
|
|
1353
|
+
borderRadius: 18,
|
|
1354
|
+
overflow: 'hidden',
|
|
1355
|
+
backgroundColor: '#000000',
|
|
1356
|
+
position: 'relative'
|
|
1357
|
+
},
|
|
1358
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
|
|
1359
|
+
source: {
|
|
1360
|
+
uri: getSafeDownloadUrlCallback(file, 'thumb')
|
|
1361
|
+
},
|
|
1362
|
+
style: {
|
|
1363
|
+
width: 36,
|
|
1364
|
+
height: 36
|
|
1365
|
+
},
|
|
1366
|
+
contentFit: "cover",
|
|
1367
|
+
transition: 120,
|
|
1368
|
+
cachePolicy: "memory-disk",
|
|
1369
|
+
onError: _ => {
|
|
1370
|
+
// If thumbnail not available, we still show icon overlay
|
|
1371
|
+
},
|
|
1372
|
+
accessibilityLabel: file.filename + ' video thumbnail'
|
|
1373
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1374
|
+
style: {
|
|
1375
|
+
position: 'absolute',
|
|
1376
|
+
top: 0,
|
|
1377
|
+
left: 0,
|
|
1378
|
+
right: 0,
|
|
1379
|
+
bottom: 0,
|
|
1380
|
+
alignItems: 'center',
|
|
1381
|
+
justifyContent: 'center',
|
|
1382
|
+
backgroundColor: 'rgba(0,0,0,0.25)'
|
|
1383
|
+
},
|
|
1384
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1385
|
+
name: "play",
|
|
1386
|
+
size: 16,
|
|
1387
|
+
color: "#FFFFFF"
|
|
1388
|
+
})
|
|
1389
|
+
})]
|
|
1390
|
+
});
|
|
1391
|
+
} else if (isPDF) {
|
|
1392
|
+
customIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1393
|
+
style: {
|
|
1394
|
+
width: 36,
|
|
1395
|
+
height: 36,
|
|
1396
|
+
borderRadius: 18,
|
|
1397
|
+
alignItems: 'center',
|
|
1398
|
+
justifyContent: 'center',
|
|
1399
|
+
backgroundColor: '#FF6B6B20'
|
|
1400
|
+
},
|
|
1401
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1402
|
+
name: "document",
|
|
1403
|
+
size: 20,
|
|
1404
|
+
color: themeStyles.primaryColor
|
|
1405
|
+
})
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
return {
|
|
1410
|
+
id: file.id,
|
|
1411
|
+
customIcon: customIcon,
|
|
1412
|
+
icon: !hasPreview ? (0, _fileManagement.getFileIcon)(file.contentType) : undefined,
|
|
1413
|
+
iconColor: themeStyles.primaryColor,
|
|
1414
|
+
title: file.filename,
|
|
1415
|
+
subtitle: `${(0, _fileManagement.formatFileSize)(file.length)} • ${new Date(file.uploadDate).toLocaleDateString()}`,
|
|
1416
|
+
theme: theme,
|
|
1417
|
+
onPress: () => {
|
|
1418
|
+
// Support selection in regular mode with long press or if already selecting
|
|
1419
|
+
if (!selectMode && selectedIds.size > 0) {
|
|
1420
|
+
// If already in selection mode (some files selected), toggle selection
|
|
1421
|
+
toggleSelect(file);
|
|
1422
|
+
} else {
|
|
1423
|
+
handleFileOpen(file);
|
|
1424
|
+
}
|
|
1425
|
+
},
|
|
1426
|
+
onLongPress: !selectMode ? () => {
|
|
1427
|
+
// Enable selection mode on long press
|
|
1428
|
+
if (selectedIds.size === 0) {
|
|
1429
|
+
setSelectedIds(new Set([file.id]));
|
|
1430
|
+
} else {
|
|
1431
|
+
toggleSelect(file);
|
|
1432
|
+
}
|
|
1433
|
+
} : undefined,
|
|
1434
|
+
showChevron: false,
|
|
1435
|
+
dense: true,
|
|
1436
|
+
multiRow: !!file.metadata?.description,
|
|
1437
|
+
selected: (selectMode || selectedIds.size > 0) && isSelected,
|
|
1438
|
+
// Hide action buttons when selecting (in selectMode or bulk operations mode)
|
|
1439
|
+
customContent: !selectMode && selectedIds.size === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1440
|
+
style: _styles.fileManagementStyles.groupedActions,
|
|
1441
|
+
children: [(isImage || isVideo || file.contentType.includes('pdf')) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
1442
|
+
style: [_styles.fileManagementStyles.groupedActionBtn, {
|
|
1443
|
+
backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
|
|
1444
|
+
}],
|
|
1445
|
+
onPress: () => handleFileOpen(file),
|
|
1446
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1447
|
+
name: "eye",
|
|
1448
|
+
size: 18,
|
|
1449
|
+
color: themeStyles.primaryColor
|
|
1450
|
+
})
|
|
1451
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
1452
|
+
style: [_styles.fileManagementStyles.groupedActionBtn, {
|
|
1453
|
+
backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
|
|
1454
|
+
}],
|
|
1455
|
+
onPress: () => handleFileDownload(file.id, file.filename),
|
|
1456
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1457
|
+
name: "download",
|
|
1458
|
+
size: 18,
|
|
1459
|
+
color: themeStyles.primaryColor
|
|
1460
|
+
})
|
|
1461
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
1462
|
+
style: [_styles.fileManagementStyles.groupedActionBtn, {
|
|
1463
|
+
backgroundColor: themeStyles.isDarkTheme ? '#400000' : '#FFEBEE'
|
|
1464
|
+
}],
|
|
1465
|
+
onPress: () => handleFileDelete(file.id, file.filename),
|
|
1466
|
+
disabled: deleting === file.id,
|
|
1467
|
+
children: deleting === file.id ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
1468
|
+
size: "small",
|
|
1469
|
+
color: themeStyles.dangerColor
|
|
1470
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1471
|
+
name: "trash",
|
|
1472
|
+
size: 18,
|
|
1473
|
+
color: themeStyles.dangerColor
|
|
1474
|
+
})
|
|
1475
|
+
})]
|
|
1476
|
+
}) : undefined,
|
|
1477
|
+
customContentBelow: file.metadata?.description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1478
|
+
style: [_styles.fileManagementStyles.groupedDescription, {
|
|
1479
|
+
color: themeStyles.isDarkTheme ? '#AAAAAA' : '#666666'
|
|
1480
|
+
}],
|
|
1481
|
+
numberOfLines: 2,
|
|
1482
|
+
children: file.metadata.description
|
|
1483
|
+
}) : undefined
|
|
1484
|
+
};
|
|
1485
|
+
});
|
|
1486
|
+
}, [filteredFiles, theme, themeStyles, deleting, handleFileDownload, handleFileDelete, handleFileOpen, getSafeDownloadUrlCallback, selectMode, selectedIds]);
|
|
1487
|
+
|
|
1488
|
+
// Scroll to selected file after selection
|
|
1489
|
+
(0, _react.useEffect)(() => {
|
|
1490
|
+
if (lastSelectedFileId && selectMode) {
|
|
1491
|
+
if (viewMode === 'all' && scrollViewRef.current) {
|
|
1492
|
+
// Find the index of the selected file
|
|
1493
|
+
const itemIndex = itemRefs.current.get(lastSelectedFileId);
|
|
1494
|
+
if (itemIndex !== undefined && itemIndex >= 0) {
|
|
1495
|
+
// Estimate item height (GroupedItem with dense mode is approximately 60-70px)
|
|
1496
|
+
// Account for description rows which add extra height
|
|
1497
|
+
const baseItemHeight = 65;
|
|
1498
|
+
const descriptionHeight = 30; // Approximate height for description
|
|
1499
|
+
// Use filteredFiles which is already sorted according to user's selection
|
|
1500
|
+
const sortedFiles = filteredFiles;
|
|
1501
|
+
|
|
1502
|
+
// Calculate total height up to this item
|
|
1503
|
+
let scrollPosition = 0;
|
|
1504
|
+
for (let i = 0; i <= itemIndex && i < sortedFiles.length; i++) {
|
|
1505
|
+
const file = sortedFiles[i];
|
|
1506
|
+
scrollPosition += baseItemHeight;
|
|
1507
|
+
if (file.metadata?.description) {
|
|
1508
|
+
scrollPosition += descriptionHeight;
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
// Add header, controls, search, and stats height (approximately 250px)
|
|
1513
|
+
const headerHeight = 250;
|
|
1514
|
+
const finalScrollPosition = headerHeight + scrollPosition - 150; // Offset to show item near top
|
|
1515
|
+
|
|
1516
|
+
// Use requestAnimationFrame to ensure DOM is updated before scrolling
|
|
1517
|
+
requestAnimationFrame(() => {
|
|
1518
|
+
requestAnimationFrame(() => {
|
|
1519
|
+
scrollViewRef.current?.scrollTo({
|
|
1520
|
+
y: Math.max(0, finalScrollPosition),
|
|
1521
|
+
animated: true
|
|
1522
|
+
});
|
|
1523
|
+
});
|
|
1524
|
+
});
|
|
1525
|
+
}
|
|
1526
|
+
} else if (viewMode === 'photos' && photoScrollViewRef.current) {
|
|
1527
|
+
// For photo grid, find the photo index
|
|
1528
|
+
const photos = filteredFiles.filter(file => file.contentType.startsWith('image/'));
|
|
1529
|
+
const photoIndex = photos.findIndex(p => p.id === lastSelectedFileId);
|
|
1530
|
+
if (photoIndex >= 0) {
|
|
1531
|
+
// Estimate photo item height based on grid layout
|
|
1532
|
+
// Calculate items per row
|
|
1533
|
+
let itemsPerRow = 3;
|
|
1534
|
+
if (safeContainerWidth > 768) itemsPerRow = 6;else if (safeContainerWidth > 480) itemsPerRow = 4;
|
|
1535
|
+
const scrollContainerPadding = 32;
|
|
1536
|
+
const gaps = (itemsPerRow - 1) * 4;
|
|
1537
|
+
const availableWidth = safeContainerWidth - scrollContainerPadding;
|
|
1538
|
+
const itemWidth = (availableWidth - gaps) / itemsPerRow;
|
|
1539
|
+
|
|
1540
|
+
// Calculate row and approximate scroll position
|
|
1541
|
+
const row = Math.floor(photoIndex / itemsPerRow);
|
|
1542
|
+
const headerHeight = 250;
|
|
1543
|
+
const finalScrollPosition = headerHeight + row * (itemWidth + 4) - 150;
|
|
1544
|
+
|
|
1545
|
+
// Use requestAnimationFrame to ensure DOM is updated before scrolling
|
|
1546
|
+
requestAnimationFrame(() => {
|
|
1547
|
+
requestAnimationFrame(() => {
|
|
1548
|
+
photoScrollViewRef.current?.scrollTo({
|
|
1549
|
+
y: Math.max(0, finalScrollPosition),
|
|
1550
|
+
animated: true
|
|
1551
|
+
});
|
|
1552
|
+
});
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
}, [lastSelectedFileId, selectMode, viewMode, filteredFiles, safeContainerWidth]);
|
|
1558
|
+
|
|
1559
|
+
// Clear selected file ID after scroll animation completes
|
|
1560
|
+
(0, _react.useEffect)(() => {
|
|
1561
|
+
if (lastSelectedFileId && scrollViewRef.current) {
|
|
1562
|
+
const timeoutId = setTimeout(() => {
|
|
1563
|
+
setLastSelectedFileId(null);
|
|
1564
|
+
}, 600); // Allow time for scroll animation to complete
|
|
1565
|
+
|
|
1566
|
+
return () => clearTimeout(timeoutId);
|
|
1567
|
+
}
|
|
1568
|
+
}, [lastSelectedFileId]);
|
|
1569
|
+
const renderPhotoItem = (photo, index) => {
|
|
1570
|
+
const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
|
|
1571
|
+
|
|
1572
|
+
// Calculate photo item width based on actual container size from bottom sheet
|
|
1573
|
+
let itemsPerRow = 3; // Default for mobile
|
|
1574
|
+
if (safeContainerWidth > 768) itemsPerRow = 6; // Tablet/Desktop
|
|
1575
|
+
else if (safeContainerWidth > 480) itemsPerRow = 4; // Large mobile
|
|
1576
|
+
|
|
1577
|
+
// Account for the photoScrollContainer padding (16px on each side = 32px total)
|
|
1578
|
+
const scrollContainerPadding = 32; // Total horizontal padding from photoScrollContainer
|
|
1579
|
+
const gaps = (itemsPerRow - 1) * 4; // Gap between items
|
|
1580
|
+
const availableWidth = safeContainerWidth - scrollContainerPadding;
|
|
1581
|
+
const itemWidth = (availableWidth - gaps) / itemsPerRow;
|
|
1582
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
1583
|
+
style: [_styles.fileManagementStyles.photoItem, {
|
|
1584
|
+
width: itemWidth,
|
|
1585
|
+
height: itemWidth
|
|
1586
|
+
}],
|
|
1587
|
+
onPress: () => handleFileOpen(photo),
|
|
1588
|
+
activeOpacity: 0.8,
|
|
1589
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1590
|
+
style: _styles.fileManagementStyles.photoContainer,
|
|
1591
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
|
|
1592
|
+
source: {
|
|
1593
|
+
uri: downloadUrl
|
|
1594
|
+
},
|
|
1595
|
+
style: _styles.fileManagementStyles.photoImage,
|
|
1596
|
+
contentFit: "cover",
|
|
1597
|
+
transition: 120,
|
|
1598
|
+
cachePolicy: "memory-disk",
|
|
1599
|
+
onError: () => {
|
|
1600
|
+
// Image preview failed to load
|
|
1601
|
+
},
|
|
1602
|
+
accessibilityLabel: photo.filename
|
|
1603
|
+
})
|
|
1604
|
+
})
|
|
1605
|
+
}, photo.id);
|
|
1606
|
+
};
|
|
1607
|
+
const renderPhotoGrid = (0, _react.useCallback)(() => {
|
|
1608
|
+
const photos = filteredFiles.filter(file => file.contentType.startsWith('image/'));
|
|
1609
|
+
if (photos.length === 0) {
|
|
1610
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1611
|
+
style: _styles.fileManagementStyles.emptyState,
|
|
1612
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1613
|
+
name: "images-outline",
|
|
1614
|
+
size: 64,
|
|
1615
|
+
color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC'
|
|
1616
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1617
|
+
style: [_styles.fileManagementStyles.emptyStateTitle, {
|
|
1618
|
+
color: themeStyles.textColor
|
|
1619
|
+
}],
|
|
1620
|
+
children: "No Photos Yet"
|
|
1621
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
1622
|
+
style: [_styles.fileManagementStyles.emptyStateDescription, {
|
|
1623
|
+
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1624
|
+
}],
|
|
1625
|
+
children: [" ", user?.id === targetUserId ? `Upload photos to get started. You can select multiple photos at once.` : "This user hasn't uploaded any photos yet", " "]
|
|
1626
|
+
}), user?.id === targetUserId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
1627
|
+
style: [_styles.fileManagementStyles.emptyStateButton, {
|
|
1628
|
+
backgroundColor: themeStyles.primaryColor
|
|
1629
|
+
}],
|
|
1630
|
+
onPress: handleFileUpload,
|
|
1631
|
+
disabled: uploading || isPickingDocument,
|
|
1632
|
+
children: uploading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
1633
|
+
size: "small",
|
|
1634
|
+
color: "#FFFFFF"
|
|
1635
|
+
}) : isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
1636
|
+
size: "small",
|
|
1637
|
+
color: "#FFFFFF"
|
|
1638
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1639
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1640
|
+
name: "cloud-upload",
|
|
1641
|
+
size: 20,
|
|
1642
|
+
color: "#FFFFFF"
|
|
1643
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1644
|
+
style: _styles.fileManagementStyles.emptyStateButtonText,
|
|
1645
|
+
children: "Upload Photos"
|
|
1646
|
+
})]
|
|
1647
|
+
})
|
|
1648
|
+
})]
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
1651
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
|
|
1652
|
+
ref: photoScrollViewRef,
|
|
1653
|
+
style: _styles.fileManagementStyles.scrollView,
|
|
1654
|
+
contentContainerStyle: _styles.fileManagementStyles.photoScrollContainer,
|
|
1655
|
+
refreshControl: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.RefreshControl, {
|
|
1656
|
+
refreshing: refreshing,
|
|
1657
|
+
onRefresh: () => loadFiles('refresh'),
|
|
1658
|
+
tintColor: themeStyles.primaryColor
|
|
1659
|
+
}),
|
|
1660
|
+
showsVerticalScrollIndicator: false,
|
|
1661
|
+
onScroll: ({
|
|
1662
|
+
nativeEvent
|
|
1663
|
+
}) => {
|
|
1664
|
+
const {
|
|
1665
|
+
layoutMeasurement,
|
|
1666
|
+
contentOffset,
|
|
1667
|
+
contentSize
|
|
1668
|
+
} = nativeEvent;
|
|
1669
|
+
const distanceFromBottom = contentSize.height - (contentOffset.y + layoutMeasurement.height);
|
|
1670
|
+
if (distanceFromBottom < 200 && !paging.loadingMore && paging.hasMore) {
|
|
1671
|
+
loadFiles('more');
|
|
1672
|
+
}
|
|
1673
|
+
},
|
|
1674
|
+
scrollEventThrottle: 250,
|
|
1675
|
+
children: [loadingDimensions && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1676
|
+
style: _styles.fileManagementStyles.dimensionsLoadingIndicator,
|
|
1677
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
1678
|
+
size: "small",
|
|
1679
|
+
color: themeStyles.primaryColor
|
|
1680
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1681
|
+
style: [_styles.fileManagementStyles.dimensionsLoadingText, {
|
|
1682
|
+
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1683
|
+
}],
|
|
1684
|
+
children: "Loading photo layout..."
|
|
1685
|
+
})]
|
|
1686
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JustifiedPhotoGrid.default, {
|
|
1687
|
+
photos: photos,
|
|
1688
|
+
photoDimensions: photoDimensions,
|
|
1689
|
+
loadPhotoDimensions: loadPhotoDimensions,
|
|
1690
|
+
createJustifiedRows: createJustifiedRows,
|
|
1691
|
+
renderJustifiedPhotoItem: renderJustifiedPhotoItem,
|
|
1692
|
+
renderSimplePhotoItem: renderPhotoItem,
|
|
1693
|
+
textColor: themeStyles.textColor,
|
|
1694
|
+
containerWidth: safeContainerWidth
|
|
1695
|
+
})]
|
|
1696
|
+
});
|
|
1697
|
+
}, [filteredFiles, themeStyles, user?.id, targetUserId, uploading, handleFileUpload, refreshing, loadFiles, loadingDimensions, photoDimensions, loadPhotoDimensions, createJustifiedRows, renderJustifiedPhotoItem, renderPhotoItem, safeContainerWidth]);
|
|
1698
|
+
|
|
1699
|
+
// Inline justified grid removed (moved to components/photogrid/JustifiedPhotoGrid.tsx)
|
|
1700
|
+
|
|
1701
|
+
const renderEmptyState = () => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1702
|
+
style: _styles.fileManagementStyles.emptyState,
|
|
1703
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1704
|
+
name: "folder-open-outline",
|
|
1705
|
+
size: 64,
|
|
1706
|
+
color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC'
|
|
1707
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1708
|
+
style: [_styles.fileManagementStyles.emptyStateTitle, {
|
|
1709
|
+
color: themeStyles.textColor
|
|
1710
|
+
}],
|
|
1711
|
+
children: "No Files Yet"
|
|
1712
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1713
|
+
style: [_styles.fileManagementStyles.emptyStateDescription, {
|
|
1714
|
+
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1715
|
+
}],
|
|
1716
|
+
children: user?.id === targetUserId ? `Upload files to get started. You can select multiple files at once.` : "This user hasn't uploaded any files yet"
|
|
1717
|
+
}), user?.id === targetUserId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
1718
|
+
style: [_styles.fileManagementStyles.emptyStateButton, {
|
|
1719
|
+
backgroundColor: themeStyles.primaryColor
|
|
1720
|
+
}],
|
|
1721
|
+
onPress: handleFileUpload,
|
|
1722
|
+
disabled: uploading || isPickingDocument,
|
|
1723
|
+
children: uploading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
1724
|
+
size: "small",
|
|
1725
|
+
color: "#FFFFFF"
|
|
1726
|
+
}) : isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
1727
|
+
size: "small",
|
|
1728
|
+
color: "#FFFFFF"
|
|
1729
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1730
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
1731
|
+
name: "cloud-upload",
|
|
1732
|
+
size: 20,
|
|
1733
|
+
color: "#FFFFFF"
|
|
1734
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1735
|
+
style: _styles.fileManagementStyles.emptyStateButtonText,
|
|
1736
|
+
children: "Upload Files"
|
|
1737
|
+
})]
|
|
1738
|
+
})
|
|
1739
|
+
})]
|
|
1740
|
+
});
|
|
1741
|
+
|
|
1742
|
+
// Professional Skeleton Loading Component with Advanced Shimmer Effect
|
|
1743
|
+
const SkeletonLoader = /*#__PURE__*/_react.default.memo(() => {
|
|
1744
|
+
const shimmerAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
1745
|
+
const skeletonContainerWidth = safeContainerWidth;
|
|
1746
|
+
(0, _react.useEffect)(() => {
|
|
1747
|
+
const shimmer = _reactNative.Animated.loop(_reactNative.Animated.timing(shimmerAnim, {
|
|
1748
|
+
toValue: 1,
|
|
1749
|
+
duration: 2000,
|
|
1750
|
+
easing: _reactNative.Easing.linear,
|
|
1751
|
+
useNativeDriver: true
|
|
1752
|
+
}));
|
|
1753
|
+
shimmer.start();
|
|
1754
|
+
return () => shimmer.stop();
|
|
1755
|
+
}, [shimmerAnim]);
|
|
1756
|
+
|
|
1757
|
+
// Create a sweeping shimmer effect
|
|
1758
|
+
const shimmerTranslateX = shimmerAnim.interpolate({
|
|
1759
|
+
inputRange: [0, 1],
|
|
1760
|
+
outputRange: [-skeletonContainerWidth * 2, skeletonContainerWidth * 2]
|
|
1761
|
+
});
|
|
1762
|
+
const SkeletonBox = ({
|
|
1763
|
+
width,
|
|
1764
|
+
height,
|
|
1765
|
+
borderRadius = 8,
|
|
1766
|
+
style,
|
|
1767
|
+
delay = 0
|
|
1768
|
+
}) => {
|
|
1769
|
+
const delayedTranslateX = shimmerAnim.interpolate({
|
|
1770
|
+
inputRange: [0, 1],
|
|
1771
|
+
outputRange: [-skeletonContainerWidth * 2 + delay, skeletonContainerWidth * 2 + delay]
|
|
1772
|
+
});
|
|
1773
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1774
|
+
style: [{
|
|
1775
|
+
width,
|
|
1776
|
+
height,
|
|
1777
|
+
borderRadius,
|
|
1778
|
+
backgroundColor: themeStyles.isDarkTheme ? '#1E1E1E' : '#F5F5F5',
|
|
1779
|
+
overflow: 'hidden',
|
|
1780
|
+
position: 'relative'
|
|
1781
|
+
}, style],
|
|
1782
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1783
|
+
style: {
|
|
1784
|
+
position: 'absolute',
|
|
1785
|
+
top: 0,
|
|
1786
|
+
left: 0,
|
|
1787
|
+
right: 0,
|
|
1788
|
+
bottom: 0,
|
|
1789
|
+
backgroundColor: themeStyles.isDarkTheme ? '#1E1E1E' : '#F5F5F5'
|
|
1790
|
+
}
|
|
1791
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
1792
|
+
style: {
|
|
1793
|
+
position: 'absolute',
|
|
1794
|
+
top: 0,
|
|
1795
|
+
left: 0,
|
|
1796
|
+
width: '100%',
|
|
1797
|
+
height: '100%',
|
|
1798
|
+
transform: [{
|
|
1799
|
+
translateX: delayedTranslateX
|
|
1800
|
+
}]
|
|
1801
|
+
},
|
|
1802
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1803
|
+
style: {
|
|
1804
|
+
width: skeletonContainerWidth,
|
|
1805
|
+
height: '100%',
|
|
1806
|
+
backgroundColor: themeStyles.isDarkTheme ? 'rgba(255, 255, 255, 0.08)' : 'rgba(255, 255, 255, 0.8)',
|
|
1807
|
+
shadowColor: themeStyles.isDarkTheme ? '#000' : '#FFF',
|
|
1808
|
+
shadowOffset: {
|
|
1809
|
+
width: 0,
|
|
1810
|
+
height: 0
|
|
1811
|
+
},
|
|
1812
|
+
shadowOpacity: 0.3,
|
|
1813
|
+
shadowRadius: 10
|
|
1814
|
+
}
|
|
1815
|
+
})
|
|
1816
|
+
})]
|
|
1817
|
+
});
|
|
1818
|
+
};
|
|
1819
|
+
|
|
1820
|
+
// Skeleton file item matching GroupedSection structure
|
|
1821
|
+
const SkeletonFileItem = ({
|
|
1822
|
+
index
|
|
1823
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1824
|
+
style: [{
|
|
1825
|
+
flexDirection: 'row',
|
|
1826
|
+
alignItems: 'center',
|
|
1827
|
+
paddingHorizontal: 16,
|
|
1828
|
+
paddingVertical: 12,
|
|
1829
|
+
backgroundColor: themeStyles.isDarkTheme ? '#121212' : '#FFFFFF',
|
|
1830
|
+
borderBottomWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
1831
|
+
borderBottomColor: themeStyles.borderColor
|
|
1832
|
+
}],
|
|
1833
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
|
|
1834
|
+
width: 44,
|
|
1835
|
+
height: 44,
|
|
1836
|
+
borderRadius: 8,
|
|
1837
|
+
delay: index * 50
|
|
1838
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1839
|
+
style: {
|
|
1840
|
+
flex: 1,
|
|
1841
|
+
marginLeft: 12,
|
|
1842
|
+
justifyContent: 'center'
|
|
1843
|
+
},
|
|
1844
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
|
|
1845
|
+
width: index % 3 === 0 ? '85%' : index % 3 === 1 ? '70%' : '90%',
|
|
1846
|
+
height: 16,
|
|
1847
|
+
style: {
|
|
1848
|
+
marginBottom: 8
|
|
1849
|
+
},
|
|
1850
|
+
delay: index * 50 + 20
|
|
1851
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
|
|
1852
|
+
width: index % 2 === 0 ? '50%' : '60%',
|
|
1853
|
+
height: 12,
|
|
1854
|
+
delay: index * 50 + 40
|
|
1855
|
+
})]
|
|
1856
|
+
})]
|
|
1857
|
+
});
|
|
1858
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1859
|
+
style: [_styles.fileManagementStyles.container, {
|
|
1860
|
+
backgroundColor
|
|
1861
|
+
}],
|
|
1862
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1863
|
+
style: [_styles.fileManagementStyles.header, {
|
|
1864
|
+
borderBottomColor: themeStyles.borderColor,
|
|
1865
|
+
borderBottomWidth: _reactNative.StyleSheet.hairlineWidth
|
|
1866
|
+
}],
|
|
1867
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
|
|
1868
|
+
width: 44,
|
|
1869
|
+
height: 44,
|
|
1870
|
+
borderRadius: 12
|
|
1871
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1872
|
+
style: [_styles.fileManagementStyles.headerTitleContainer, {
|
|
1873
|
+
flex: 1
|
|
1874
|
+
}],
|
|
1875
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
|
|
1876
|
+
width: 140,
|
|
1877
|
+
height: 20,
|
|
1878
|
+
style: {
|
|
1879
|
+
marginBottom: 6
|
|
1880
|
+
}
|
|
1881
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
|
|
1882
|
+
width: 100,
|
|
1883
|
+
height: 14
|
|
1884
|
+
})]
|
|
1885
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
|
|
1886
|
+
width: 44,
|
|
1887
|
+
height: 44,
|
|
1888
|
+
borderRadius: 12
|
|
1889
|
+
})]
|
|
1890
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1891
|
+
style: _styles.fileManagementStyles.controlsBar,
|
|
1892
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
|
|
1893
|
+
width: 100,
|
|
1894
|
+
height: 36,
|
|
1895
|
+
borderRadius: 18
|
|
1896
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
|
|
1897
|
+
width: 44,
|
|
1898
|
+
height: 44,
|
|
1899
|
+
borderRadius: 22
|
|
1900
|
+
})]
|
|
1901
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1902
|
+
style: [_styles.fileManagementStyles.searchContainer, {
|
|
1903
|
+
backgroundColor: themeStyles.colors.card
|
|
1904
|
+
}],
|
|
1905
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
|
|
1906
|
+
width: "100%",
|
|
1907
|
+
height: 44,
|
|
1908
|
+
borderRadius: 12
|
|
1909
|
+
})
|
|
1910
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1911
|
+
style: [_styles.fileManagementStyles.statsContainer, {
|
|
1912
|
+
backgroundColor: themeStyles.colors.card
|
|
1913
|
+
}],
|
|
1914
|
+
children: [1, 2, 3].map(i => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1915
|
+
style: _styles.fileManagementStyles.statItem,
|
|
1916
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
|
|
1917
|
+
width: 50,
|
|
1918
|
+
height: 20,
|
|
1919
|
+
style: {
|
|
1920
|
+
marginBottom: 4
|
|
1921
|
+
},
|
|
1922
|
+
delay: i * 30
|
|
1923
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
|
|
1924
|
+
width: 40,
|
|
1925
|
+
height: 14,
|
|
1926
|
+
delay: i * 30 + 15
|
|
1927
|
+
})]
|
|
1928
|
+
}, i))
|
|
1929
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
1930
|
+
style: _styles.fileManagementStyles.scrollView,
|
|
1931
|
+
contentContainerStyle: _styles.fileManagementStyles.scrollContainer,
|
|
1932
|
+
showsVerticalScrollIndicator: false,
|
|
1933
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1934
|
+
style: {
|
|
1935
|
+
backgroundColor: themeStyles.colors.card,
|
|
1936
|
+
borderRadius: 18,
|
|
1937
|
+
overflow: 'hidden',
|
|
1938
|
+
marginTop: 8
|
|
1939
|
+
},
|
|
1940
|
+
children: [1, 2, 3, 4, 5, 6, 7, 8].map(i => /*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonFileItem, {
|
|
1941
|
+
index: i
|
|
1942
|
+
}, i))
|
|
1943
|
+
})
|
|
1944
|
+
})]
|
|
1945
|
+
});
|
|
1946
|
+
});
|
|
1947
|
+
if (loading) {
|
|
1948
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonLoader, {});
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
// If a file is opened, show the file viewer
|
|
1952
|
+
if (!selectMode && openedFile) {
|
|
1953
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1954
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileViewer.FileViewer, {
|
|
1955
|
+
file: openedFile,
|
|
1956
|
+
fileContent: fileContent,
|
|
1957
|
+
loadingFileContent: loadingFileContent,
|
|
1958
|
+
showFileDetailsInViewer: showFileDetailsInViewer,
|
|
1959
|
+
onToggleDetails: () => setShowFileDetailsInViewer(!showFileDetailsInViewer),
|
|
1960
|
+
onClose: handleCloseFile,
|
|
1961
|
+
onDownload: handleFileDownload,
|
|
1962
|
+
onDelete: handleFileDelete,
|
|
1963
|
+
themeStyles: themeStyles,
|
|
1964
|
+
isOwner: user?.id === targetUserId
|
|
1965
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileDetailsModal.FileDetailsModal, {
|
|
1966
|
+
visible: showFileDetails,
|
|
1967
|
+
file: selectedFile,
|
|
1968
|
+
onClose: () => setShowFileDetails(false),
|
|
1969
|
+
onDownload: handleFileDownload,
|
|
1970
|
+
onDelete: handleFileDelete,
|
|
1971
|
+
themeStyles: themeStyles,
|
|
1972
|
+
isOwner: user?.id === targetUserId
|
|
1973
|
+
})]
|
|
1974
|
+
});
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
// If upload preview is showing, render it inline instead of the file list
|
|
1978
|
+
if (showUploadPreview) {
|
|
1979
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1980
|
+
style: _styles.fileManagementStyles.container,
|
|
1981
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
|
|
1982
|
+
title: "Review Files",
|
|
1983
|
+
subtitle: `${pendingFiles.length} file${pendingFiles.length !== 1 ? 's' : ''} ready to upload`,
|
|
1984
|
+
onBack: handleCancelUpload,
|
|
1985
|
+
showBackButton: true,
|
|
1986
|
+
variant: "minimal",
|
|
1987
|
+
elevation: "none",
|
|
1988
|
+
titleAlignment: "left"
|
|
1989
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_UploadPreview.UploadPreview, {
|
|
1990
|
+
visible: true,
|
|
1991
|
+
pendingFiles: pendingFiles,
|
|
1992
|
+
onConfirm: handleConfirmUpload,
|
|
1993
|
+
onCancel: handleCancelUpload,
|
|
1994
|
+
onRemoveFile: removePendingFile,
|
|
1995
|
+
themeStyles: themeStyles,
|
|
1996
|
+
inline: true
|
|
1997
|
+
})]
|
|
1998
|
+
});
|
|
1999
|
+
}
|
|
2000
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2001
|
+
style: _styles.fileManagementStyles.container,
|
|
2002
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
|
|
2003
|
+
title: selectMode ? multiSelect ? `${selectedIds.size}${maxSelection ? '/' + maxSelection : ''} Selected` : 'Select a File' : viewMode === 'photos' ? 'Photos' : 'File Management',
|
|
2004
|
+
subtitle: selectMode ? multiSelect ? `${filteredFiles.length} available` : 'Tap to select' : `${filteredFiles.length} ${filteredFiles.length === 1 ? 'item' : 'items'}`,
|
|
2005
|
+
rightActions: selectMode && multiSelect ? [{
|
|
2006
|
+
key: 'clear',
|
|
2007
|
+
text: 'Clear',
|
|
2008
|
+
onPress: () => setSelectedIds(new Set()),
|
|
2009
|
+
disabled: selectedIds.size === 0
|
|
2010
|
+
}, {
|
|
2011
|
+
key: 'confirm',
|
|
2012
|
+
text: 'Confirm',
|
|
2013
|
+
onPress: confirmMultiSelection,
|
|
2014
|
+
disabled: selectedIds.size === 0
|
|
2015
|
+
}] : !selectMode && selectedIds.size > 0 ? [{
|
|
2016
|
+
key: 'clear',
|
|
2017
|
+
text: 'Clear',
|
|
2018
|
+
onPress: () => setSelectedIds(new Set())
|
|
2019
|
+
}, {
|
|
2020
|
+
key: 'delete',
|
|
2021
|
+
text: `Delete (${selectedIds.size})`,
|
|
2022
|
+
onPress: handleBulkDelete,
|
|
2023
|
+
icon: 'delete'
|
|
2024
|
+
}, {
|
|
2025
|
+
key: 'visibility',
|
|
2026
|
+
text: 'Visibility',
|
|
2027
|
+
onPress: () => {
|
|
2028
|
+
// Show visibility options menu
|
|
2029
|
+
_reactNative.Alert.alert('Change Visibility', `Change visibility for ${selectedIds.size} file(s)?`, [{
|
|
2030
|
+
text: 'Cancel',
|
|
2031
|
+
style: 'cancel'
|
|
2032
|
+
}, {
|
|
2033
|
+
text: 'Private',
|
|
2034
|
+
onPress: () => handleBulkVisibilityChange('private')
|
|
2035
|
+
}, {
|
|
2036
|
+
text: 'Public',
|
|
2037
|
+
onPress: () => handleBulkVisibilityChange('public')
|
|
2038
|
+
}, {
|
|
2039
|
+
text: 'Unlisted',
|
|
2040
|
+
onPress: () => handleBulkVisibilityChange('unlisted')
|
|
2041
|
+
}]);
|
|
2042
|
+
},
|
|
2043
|
+
icon: 'eye'
|
|
2044
|
+
}] : undefined,
|
|
2045
|
+
onBack: onClose || goBack,
|
|
2046
|
+
showBackButton: true,
|
|
2047
|
+
variant: "minimal",
|
|
2048
|
+
elevation: "none",
|
|
2049
|
+
titleAlignment: "left"
|
|
2050
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2051
|
+
style: _styles.fileManagementStyles.controlsBar,
|
|
2052
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
2053
|
+
horizontal: true,
|
|
2054
|
+
showsHorizontalScrollIndicator: false,
|
|
2055
|
+
style: _styles.fileManagementStyles.viewModeScroll,
|
|
2056
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2057
|
+
style: [_styles.fileManagementStyles.viewModeToggle, {
|
|
2058
|
+
backgroundColor: themeStyles.colors.card
|
|
2059
|
+
}],
|
|
2060
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
|
|
2061
|
+
isSelected: viewMode === 'all',
|
|
2062
|
+
onPress: () => setViewMode('all'),
|
|
2063
|
+
icon: viewMode === 'all' ? 'folder' : 'folder-outline',
|
|
2064
|
+
primaryColor: themeStyles.primaryColor,
|
|
2065
|
+
textColor: themeStyles.textColor,
|
|
2066
|
+
style: _styles.fileManagementStyles.viewModeButton
|
|
2067
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
|
|
2068
|
+
isSelected: viewMode === 'photos',
|
|
2069
|
+
onPress: () => setViewMode('photos'),
|
|
2070
|
+
icon: viewMode === 'photos' ? 'image-multiple' : 'image-multiple-outline',
|
|
2071
|
+
primaryColor: themeStyles.primaryColor,
|
|
2072
|
+
textColor: themeStyles.textColor,
|
|
2073
|
+
style: _styles.fileManagementStyles.viewModeButton
|
|
2074
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
|
|
2075
|
+
isSelected: viewMode === 'videos',
|
|
2076
|
+
onPress: () => setViewMode('videos'),
|
|
2077
|
+
icon: viewMode === 'videos' ? 'video' : 'video-outline',
|
|
2078
|
+
primaryColor: themeStyles.primaryColor,
|
|
2079
|
+
textColor: themeStyles.textColor,
|
|
2080
|
+
style: _styles.fileManagementStyles.viewModeButton
|
|
2081
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
|
|
2082
|
+
isSelected: viewMode === 'documents',
|
|
2083
|
+
onPress: () => setViewMode('documents'),
|
|
2084
|
+
icon: viewMode === 'documents' ? 'file-document' : 'file-document-outline',
|
|
2085
|
+
primaryColor: themeStyles.primaryColor,
|
|
2086
|
+
textColor: themeStyles.textColor,
|
|
2087
|
+
style: _styles.fileManagementStyles.viewModeButton
|
|
2088
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
|
|
2089
|
+
isSelected: viewMode === 'audio',
|
|
2090
|
+
onPress: () => setViewMode('audio'),
|
|
2091
|
+
icon: viewMode === 'audio' ? 'music-note' : 'music-note-outline',
|
|
2092
|
+
primaryColor: themeStyles.primaryColor,
|
|
2093
|
+
textColor: themeStyles.textColor,
|
|
2094
|
+
style: _styles.fileManagementStyles.viewModeButton
|
|
2095
|
+
})]
|
|
2096
|
+
})
|
|
2097
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
2098
|
+
style: [_styles.fileManagementStyles.sortButton, {
|
|
2099
|
+
backgroundColor: themeStyles.colors.card
|
|
2100
|
+
}],
|
|
2101
|
+
onPress: () => {
|
|
2102
|
+
// Cycle through sort options: date -> size -> name -> type -> date
|
|
2103
|
+
const sortOrder = ['date', 'size', 'name', 'type'];
|
|
2104
|
+
const currentIndex = sortOrder.indexOf(sortBy);
|
|
2105
|
+
const nextIndex = (currentIndex + 1) % sortOrder.length;
|
|
2106
|
+
setSortBy(sortOrder[nextIndex]);
|
|
2107
|
+
// Toggle order when cycling back to date
|
|
2108
|
+
if (nextIndex === 0) {
|
|
2109
|
+
setSortOrder(prev => prev === 'asc' ? 'desc' : 'asc');
|
|
2110
|
+
}
|
|
2111
|
+
},
|
|
2112
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
2113
|
+
name: sortBy === 'date' ? 'calendar' : sortBy === 'size' ? 'sort-numeric-variant' : sortBy === 'name' ? 'sort-alphabetical-variant' : 'file-document-outline',
|
|
2114
|
+
size: 16,
|
|
2115
|
+
color: themeStyles.textColor
|
|
2116
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
2117
|
+
name: sortOrder === 'asc' ? 'arrow-up' : 'arrow-down',
|
|
2118
|
+
size: 14,
|
|
2119
|
+
color: themeStyles.colors.secondaryText
|
|
2120
|
+
})]
|
|
2121
|
+
}), user?.id === targetUserId && (!selectMode || selectMode && allowUploadInSelectMode) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
2122
|
+
style: [_styles.fileManagementStyles.uploadButton, {
|
|
2123
|
+
backgroundColor: themeStyles.primaryColor
|
|
2124
|
+
}],
|
|
2125
|
+
onPress: handleFileUpload,
|
|
2126
|
+
disabled: uploading || isPickingDocument,
|
|
2127
|
+
children: uploading ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2128
|
+
style: _styles.fileManagementStyles.uploadProgress,
|
|
2129
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
2130
|
+
size: "small",
|
|
2131
|
+
color: "#FFFFFF"
|
|
2132
|
+
}), uploadProgress && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
2133
|
+
style: _styles.fileManagementStyles.uploadProgressText,
|
|
2134
|
+
children: [uploadProgress.current, "/", uploadProgress.total]
|
|
2135
|
+
})]
|
|
2136
|
+
}) : isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
2137
|
+
size: "small",
|
|
2138
|
+
color: "#FFFFFF"
|
|
2139
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
2140
|
+
name: "add",
|
|
2141
|
+
size: 22,
|
|
2142
|
+
color: "#FFFFFF"
|
|
2143
|
+
})
|
|
2144
|
+
})]
|
|
2145
|
+
}), files.length > 0 && (viewMode === 'all' || files.some(f => f.contentType.startsWith('image/'))) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2146
|
+
style: [_styles.fileManagementStyles.searchContainer, {
|
|
2147
|
+
backgroundColor: themeStyles.colors.card
|
|
2148
|
+
}],
|
|
2149
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
2150
|
+
name: "search",
|
|
2151
|
+
size: 22,
|
|
2152
|
+
color: themeStyles.colors.icon
|
|
2153
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
2154
|
+
style: [_styles.fileManagementStyles.searchInput, {
|
|
2155
|
+
color: themeStyles.textColor
|
|
2156
|
+
}],
|
|
2157
|
+
placeholder: viewMode === 'photos' ? 'Search photos...' : 'Search files...',
|
|
2158
|
+
placeholderTextColor: themeStyles.colors.secondaryText,
|
|
2159
|
+
value: searchQuery,
|
|
2160
|
+
onChangeText: setSearchQuery
|
|
2161
|
+
}), searchQuery.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
2162
|
+
onPress: () => setSearchQuery(''),
|
|
2163
|
+
style: _styles.fileManagementStyles.searchClearButton,
|
|
2164
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
2165
|
+
name: "close-circle",
|
|
2166
|
+
size: 22,
|
|
2167
|
+
color: themeStyles.colors.icon
|
|
2168
|
+
})
|
|
2169
|
+
})]
|
|
2170
|
+
}), files.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2171
|
+
style: [_styles.fileManagementStyles.statsContainer, {
|
|
2172
|
+
backgroundColor: themeStyles.colors.card
|
|
2173
|
+
}],
|
|
2174
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2175
|
+
style: _styles.fileManagementStyles.statItem,
|
|
2176
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2177
|
+
style: [_styles.fileManagementStyles.statValue, {
|
|
2178
|
+
color: themeStyles.textColor
|
|
2179
|
+
}],
|
|
2180
|
+
children: filteredFiles.length
|
|
2181
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2182
|
+
style: [_styles.fileManagementStyles.statLabel, {
|
|
2183
|
+
color: themeStyles.colors.secondaryText
|
|
2184
|
+
}],
|
|
2185
|
+
children: searchQuery.length > 0 ? 'Found' : filteredFiles.length === 1 ? viewMode === 'photos' ? 'Photo' : 'File' : viewMode === 'photos' ? 'Photos' : 'Files'
|
|
2186
|
+
})]
|
|
2187
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2188
|
+
style: _styles.fileManagementStyles.statItem,
|
|
2189
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2190
|
+
style: [_styles.fileManagementStyles.statValue, {
|
|
2191
|
+
color: themeStyles.textColor
|
|
2192
|
+
}],
|
|
2193
|
+
children: (0, _fileManagement.formatFileSize)(filteredFiles.reduce((total, file) => total + file.length, 0))
|
|
2194
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2195
|
+
style: [_styles.fileManagementStyles.statLabel, {
|
|
2196
|
+
color: themeStyles.colors.secondaryText
|
|
2197
|
+
}],
|
|
2198
|
+
children: searchQuery.length > 0 ? 'Size' : 'Total Size'
|
|
2199
|
+
})]
|
|
2200
|
+
}), searchQuery.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2201
|
+
style: _styles.fileManagementStyles.statItem,
|
|
2202
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2203
|
+
style: [_styles.fileManagementStyles.statValue, {
|
|
2204
|
+
color: themeStyles.textColor
|
|
2205
|
+
}],
|
|
2206
|
+
children: files.length
|
|
2207
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2208
|
+
style: [_styles.fileManagementStyles.statLabel, {
|
|
2209
|
+
color: themeStyles.colors.secondaryText
|
|
2210
|
+
}],
|
|
2211
|
+
children: "Total"
|
|
2212
|
+
})]
|
|
2213
|
+
})]
|
|
2214
|
+
}), viewMode === 'photos' ? renderPhotoGrid() : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
2215
|
+
ref: scrollViewRef,
|
|
2216
|
+
style: _styles.fileManagementStyles.scrollView,
|
|
2217
|
+
contentContainerStyle: _styles.fileManagementStyles.scrollContainer,
|
|
2218
|
+
refreshControl: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.RefreshControl, {
|
|
2219
|
+
refreshing: refreshing,
|
|
2220
|
+
onRefresh: () => loadFiles('refresh'),
|
|
2221
|
+
tintColor: themeStyles.primaryColor
|
|
2222
|
+
}),
|
|
2223
|
+
onScroll: ({
|
|
2224
|
+
nativeEvent
|
|
2225
|
+
}) => {
|
|
2226
|
+
const {
|
|
2227
|
+
layoutMeasurement,
|
|
2228
|
+
contentOffset,
|
|
2229
|
+
contentSize
|
|
2230
|
+
} = nativeEvent;
|
|
2231
|
+
const distanceFromBottom = contentSize.height - (contentOffset.y + layoutMeasurement.height);
|
|
2232
|
+
if (distanceFromBottom < 200 && !paging.loadingMore && paging.hasMore) {
|
|
2233
|
+
loadFiles('more');
|
|
2234
|
+
}
|
|
2235
|
+
},
|
|
2236
|
+
scrollEventThrottle: 250,
|
|
2237
|
+
children: filteredFiles.length === 0 && searchQuery.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2238
|
+
style: _styles.fileManagementStyles.emptyState,
|
|
2239
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
2240
|
+
name: "search",
|
|
2241
|
+
size: 64,
|
|
2242
|
+
color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC'
|
|
2243
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2244
|
+
style: [_styles.fileManagementStyles.emptyStateTitle, {
|
|
2245
|
+
color: themeStyles.textColor
|
|
2246
|
+
}],
|
|
2247
|
+
children: "No Results Found"
|
|
2248
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
2249
|
+
style: [_styles.fileManagementStyles.emptyStateDescription, {
|
|
2250
|
+
color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
|
|
2251
|
+
}],
|
|
2252
|
+
children: ["No files match your search for \"", searchQuery, "\""]
|
|
2253
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
2254
|
+
style: [_styles.fileManagementStyles.emptyStateButton, {
|
|
2255
|
+
backgroundColor: themeStyles.primaryColor
|
|
2256
|
+
}],
|
|
2257
|
+
onPress: () => setSearchQuery(''),
|
|
2258
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
2259
|
+
name: "refresh",
|
|
2260
|
+
size: 20,
|
|
2261
|
+
color: "#FFFFFF"
|
|
2262
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2263
|
+
style: _styles.fileManagementStyles.emptyStateButtonText,
|
|
2264
|
+
children: "Clear Search"
|
|
2265
|
+
})]
|
|
2266
|
+
})]
|
|
2267
|
+
}) : filteredFiles.length === 0 ? renderEmptyState() : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
2268
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
|
|
2269
|
+
items: groupedFileItems
|
|
2270
|
+
}), paging.loadingMore && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2271
|
+
style: _styles.fileManagementStyles.loadingMoreBar,
|
|
2272
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
2273
|
+
size: "small",
|
|
2274
|
+
color: themeStyles.primaryColor
|
|
2275
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
2276
|
+
style: [_styles.fileManagementStyles.loadingMoreText, {
|
|
2277
|
+
color: themeStyles.textColor
|
|
2278
|
+
}],
|
|
2279
|
+
children: "Loading more..."
|
|
2280
|
+
})]
|
|
2281
|
+
})]
|
|
2282
|
+
})
|
|
2283
|
+
}), !selectMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileDetailsModal.FileDetailsModal, {
|
|
2284
|
+
visible: showFileDetails,
|
|
2285
|
+
file: selectedFile,
|
|
2286
|
+
onClose: () => setShowFileDetails(false),
|
|
2287
|
+
onDownload: handleFileDownload,
|
|
2288
|
+
onDelete: handleFileDelete,
|
|
2289
|
+
themeStyles: themeStyles,
|
|
2290
|
+
isOwner: user?.id === targetUserId
|
|
2291
|
+
}), !selectMode && uploading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
2292
|
+
style: [_styles.fileManagementStyles.uploadBannerContainer, {
|
|
2293
|
+
pointerEvents: 'none'
|
|
2294
|
+
}],
|
|
2295
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2296
|
+
style: [_styles.fileManagementStyles.uploadBanner, {
|
|
2297
|
+
backgroundColor: themeStyles.isDarkTheme ? '#222831EE' : '#FFFFFFEE',
|
|
2298
|
+
borderColor: themeStyles.borderColor
|
|
2299
|
+
}],
|
|
2300
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
2301
|
+
name: "cloud-upload",
|
|
2302
|
+
size: 18,
|
|
2303
|
+
color: themeStyles.primaryColor
|
|
2304
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
2305
|
+
style: _styles.fileManagementStyles.uploadBannerContent,
|
|
2306
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
2307
|
+
style: [_styles.fileManagementStyles.uploadBannerText, {
|
|
2308
|
+
color: themeStyles.textColor
|
|
2309
|
+
}],
|
|
2310
|
+
children: ["Uploading", uploadProgress ? ` ${uploadProgress.current}/${uploadProgress.total}` : '...']
|
|
2311
|
+
}), uploadProgress && uploadProgress.total > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
2312
|
+
style: [_styles.fileManagementStyles.uploadProgressBarContainer, {
|
|
2313
|
+
backgroundColor: themeStyles.isDarkTheme ? 'rgba(255,255,255,0.1)' : 'rgba(0,0,0,0.1)'
|
|
2314
|
+
}],
|
|
2315
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
2316
|
+
style: [_styles.fileManagementStyles.uploadProgressBar, {
|
|
2317
|
+
width: `${uploadProgress.current / uploadProgress.total * 100}%`,
|
|
2318
|
+
backgroundColor: themeStyles.primaryColor
|
|
2319
|
+
}]
|
|
2320
|
+
})
|
|
2321
|
+
})]
|
|
2322
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
2323
|
+
size: "small",
|
|
2324
|
+
color: themeStyles.primaryColor
|
|
2325
|
+
})]
|
|
2326
|
+
})
|
|
2327
|
+
})]
|
|
2328
|
+
});
|
|
2329
|
+
};
|
|
2330
|
+
|
|
2331
|
+
// Styles have been moved to components/fileManagement/styles.ts
|
|
2332
|
+
var _default = exports.default = FileManagementScreen;
|
|
2333
|
+
//# sourceMappingURL=FileManagementScreen.js.map
|