@oxyhq/services 13.0.0 → 13.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/lib/commonjs/ui/context/OxyContext.js +8 -1
  2. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  3. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +5 -2
  4. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  5. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +12 -12
  6. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  7. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +8 -5
  8. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  9. package/lib/commonjs/ui/screens/FileManagementScreen.js +16 -13
  10. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  11. package/lib/commonjs/ui/screens/HistoryViewScreen.js +9 -7
  12. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  13. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +6 -4
  14. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  15. package/lib/commonjs/ui/screens/ManageAccountScreen.js +18 -12
  16. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  17. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +5 -4
  18. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  19. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +12 -7
  20. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  21. package/lib/commonjs/ui/screens/ProfileScreen.js +5 -2
  22. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  23. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +6 -5
  24. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  25. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +7 -4
  26. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  27. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +10 -7
  28. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  29. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +6 -5
  30. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  31. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +6 -4
  32. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  33. package/lib/module/ui/context/OxyContext.js +8 -1
  34. package/lib/module/ui/context/OxyContext.js.map +1 -1
  35. package/lib/module/ui/hooks/queries/useAccountQueries.js +5 -2
  36. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  37. package/lib/module/ui/hooks/queries/usePaymentQueries.js +12 -12
  38. package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  39. package/lib/module/ui/screens/EditProfileFieldScreen.js +8 -5
  40. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  41. package/lib/module/ui/screens/FileManagementScreen.js +16 -13
  42. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  43. package/lib/module/ui/screens/HistoryViewScreen.js +9 -7
  44. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  45. package/lib/module/ui/screens/LanguageSelectorScreen.js +6 -4
  46. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  47. package/lib/module/ui/screens/ManageAccountScreen.js +18 -12
  48. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  49. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +5 -4
  50. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  51. package/lib/module/ui/screens/PrivacySettingsScreen.js +12 -7
  52. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  53. package/lib/module/ui/screens/ProfileScreen.js +5 -2
  54. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  55. package/lib/module/ui/screens/SavesCollectionsScreen.js +6 -5
  56. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  57. package/lib/module/ui/screens/SearchSettingsScreen.js +7 -4
  58. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  59. package/lib/module/ui/screens/WelcomeNewUserScreen.js +10 -7
  60. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  61. package/lib/module/ui/screens/trust/TrustCenterScreen.js +6 -5
  62. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  63. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +6 -4
  64. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  65. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  66. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  68. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  70. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  72. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  74. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  75. package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  76. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  77. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  79. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  80. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  81. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  82. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  83. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  84. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  85. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  86. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  87. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  88. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  89. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  90. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  91. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  92. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  93. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  94. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  95. package/package.json +1 -1
  96. package/src/ui/context/OxyContext.tsx +8 -1
  97. package/src/ui/hooks/queries/useAccountQueries.ts +5 -2
  98. package/src/ui/hooks/queries/usePaymentQueries.ts +12 -12
  99. package/src/ui/screens/EditProfileFieldScreen.tsx +8 -5
  100. package/src/ui/screens/FileManagementScreen.tsx +16 -13
  101. package/src/ui/screens/HistoryViewScreen.tsx +9 -7
  102. package/src/ui/screens/LanguageSelectorScreen.tsx +6 -4
  103. package/src/ui/screens/ManageAccountScreen.tsx +18 -12
  104. package/src/ui/screens/PremiumSubscriptionScreen.tsx +5 -4
  105. package/src/ui/screens/PrivacySettingsScreen.tsx +12 -7
  106. package/src/ui/screens/ProfileScreen.tsx +5 -2
  107. package/src/ui/screens/SavesCollectionsScreen.tsx +7 -6
  108. package/src/ui/screens/SearchSettingsScreen.tsx +7 -4
  109. package/src/ui/screens/WelcomeNewUserScreen.tsx +10 -7
  110. package/src/ui/screens/trust/TrustCenterScreen.tsx +7 -6
  111. package/src/ui/screens/trust/TrustRewardsScreen.tsx +6 -4
@@ -636,9 +636,12 @@ const FileManagementScreen = ({
636
636
  defaultVisibility = 'private',
637
637
  linkContext
638
638
  }) => {
639
- // Use useOxy() hook for OxyContext values
639
+ // Use useOxy() hook for OxyContext values. Files are owned by the ACTIVE
640
+ // account (the org/project/bot when switched, else the personal user): the
641
+ // default file owner and every "is this mine?" ownership check resolve
642
+ // against `activeAccount`, so switching shows/manages that account's files.
640
643
  const {
641
- user,
644
+ activeAccount,
642
645
  oxyServices
643
646
  } = useOxy();
644
647
  const {
@@ -875,7 +878,7 @@ const FileManagementScreen = ({
875
878
  // FileManagementScreen uses a slightly elevated page background.
876
879
  const backgroundColor = colors.backgroundSecondary;
877
880
  const borderColor = colors.border;
878
- const targetUserId = userId || user?.id;
881
+ const targetUserId = userId || activeAccount?.id;
879
882
  const storeSetUploading = useFileStore(s => s.setUploading);
880
883
  const storeSetUploadProgress = useFileStore(s => s.setUploadProgress);
881
884
  const storeSetDeleting = useFileStore(s => s.setDeleting);
@@ -2216,8 +2219,8 @@ const FileManagementScreen = ({
2216
2219
  style: [fileManagementStyles.emptyStateDescription, {
2217
2220
  color: colors.textSecondary
2218
2221
  }],
2219
- children: [" ", user?.id === targetUserId ? t('fileManagement.emptyPhotos.ownDescription') : t('fileManagement.emptyPhotos.otherDescription'), " "]
2220
- }), user?.id === targetUserId && /*#__PURE__*/_jsx(TouchableOpacity, {
2222
+ children: [" ", activeAccount?.id === targetUserId ? t('fileManagement.emptyPhotos.ownDescription') : t('fileManagement.emptyPhotos.otherDescription'), " "]
2223
+ }), activeAccount?.id === targetUserId && /*#__PURE__*/_jsx(TouchableOpacity, {
2221
2224
  style: [fileManagementStyles.emptyStateButton, {
2222
2225
  backgroundColor: colors.primary
2223
2226
  }],
@@ -2288,7 +2291,7 @@ const FileManagementScreen = ({
2288
2291
  containerWidth: safeContainerWidth
2289
2292
  })]
2290
2293
  });
2291
- }, [filteredFiles, colors, user?.id, targetUserId, uploading, handleFileUpload, refreshing, loadFiles, loadingDimensions, photoDimensions, loadPhotoDimensions, createJustifiedRows, renderJustifiedPhotoItem, renderPhotoItem, safeContainerWidth]);
2294
+ }, [filteredFiles, colors, activeAccount?.id, targetUserId, uploading, handleFileUpload, refreshing, loadFiles, loadingDimensions, photoDimensions, loadPhotoDimensions, createJustifiedRows, renderJustifiedPhotoItem, renderPhotoItem, safeContainerWidth]);
2292
2295
 
2293
2296
  // Inline justified grid removed (moved to components/photogrid/JustifiedPhotoGrid.tsx)
2294
2297
 
@@ -2307,8 +2310,8 @@ const FileManagementScreen = ({
2307
2310
  style: [fileManagementStyles.emptyStateDescription, {
2308
2311
  color: colors.textSecondary
2309
2312
  }],
2310
- children: user?.id === targetUserId ? t('fileManagement.emptyFiles.ownDescription') : t('fileManagement.emptyFiles.otherDescription')
2311
- }), user?.id === targetUserId && /*#__PURE__*/_jsx(TouchableOpacity, {
2313
+ children: activeAccount?.id === targetUserId ? t('fileManagement.emptyFiles.ownDescription') : t('fileManagement.emptyFiles.otherDescription')
2314
+ }), activeAccount?.id === targetUserId && /*#__PURE__*/_jsx(TouchableOpacity, {
2312
2315
  style: [fileManagementStyles.emptyStateButton, {
2313
2316
  backgroundColor: colors.primary
2314
2317
  }],
@@ -2548,7 +2551,7 @@ const FileManagementScreen = ({
2548
2551
  // standalone file manager (non-picker browse) keeps the existing UI.
2549
2552
  if (isImageOnlyPicker && !showUploadPreview) {
2550
2553
  const photosOnly = filteredFiles.filter(file => file.contentType.startsWith('image/'));
2551
- const isOwner = user?.id === targetUserId;
2554
+ const isOwner = activeAccount?.id === targetUserId;
2552
2555
  const allowUpload = isOwner && allowUploadInSelectMode;
2553
2556
  return /*#__PURE__*/_jsxs(_Fragment, {
2554
2557
  children: [/*#__PURE__*/_jsx(PhotoPickerView, {
@@ -2599,13 +2602,13 @@ const FileManagementScreen = ({
2599
2602
  onClose: handleCloseFile,
2600
2603
  onDownload: handleFileDownload,
2601
2604
  onDelete: confirmFileDelete,
2602
- isOwner: user?.id === targetUserId
2605
+ isOwner: activeAccount?.id === targetUserId
2603
2606
  }), /*#__PURE__*/_jsx(FileDetailsModal, {
2604
2607
  control: fileDetailsControl,
2605
2608
  file: selectedFile,
2606
2609
  onDownload: handleFileDownload,
2607
2610
  onDelete: confirmFileDelete,
2608
- isOwner: user?.id === targetUserId
2611
+ isOwner: activeAccount?.id === targetUserId
2609
2612
  })]
2610
2613
  });
2611
2614
  }
@@ -2766,7 +2769,7 @@ const FileManagementScreen = ({
2766
2769
  size: 14,
2767
2770
  color: colors.textSecondary
2768
2771
  })]
2769
- }), user?.id === targetUserId && (!selectMode || selectMode && allowUploadInSelectMode) && /*#__PURE__*/_jsx(TouchableOpacity, {
2772
+ }), activeAccount?.id === targetUserId && (!selectMode || selectMode && allowUploadInSelectMode) && /*#__PURE__*/_jsx(TouchableOpacity, {
2770
2773
  style: [fileManagementStyles.uploadButton, isImageOnlyPicker && fileManagementStyles.uploadButtonExtended, {
2771
2774
  backgroundColor: colors.primary
2772
2775
  }],
@@ -2958,7 +2961,7 @@ const FileManagementScreen = ({
2958
2961
  file: selectedFile,
2959
2962
  onDownload: handleFileDownload,
2960
2963
  onDelete: confirmFileDelete,
2961
- isOwner: user?.id === targetUserId
2964
+ isOwner: activeAccount?.id === targetUserId
2962
2965
  }), !selectMode && uploading && /*#__PURE__*/_jsx(View, {
2963
2966
  style: [fileManagementStyles.uploadBannerContainer, {
2964
2967
  pointerEvents: 'none'