@oxyhq/services 6.9.44 → 6.9.46
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/ui/components/OxyPayButton.js +4 -2
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +6 -5
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +83 -82
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/SignInModal.js +271 -102
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +76 -121
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +24 -15
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +32 -18
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/icon/OxyIcon.js +5 -4
- package/lib/commonjs/ui/components/icon/OxyIcon.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +0 -35
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +3 -2
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +83 -219
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +26 -13
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +50 -28
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +83 -48
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +11 -10
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +38 -23
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/constants/theme.js +2 -2
- package/lib/commonjs/ui/constants/theme.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +4 -3
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +13 -13
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +117 -142
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +112 -78
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +213 -144
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +26 -14
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +57 -51
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +108 -86
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +109 -130
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +15 -8
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +60 -54
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +12 -9
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +66 -93
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +159 -190
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +20 -22
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +16 -17
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +127 -70
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +13 -29
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +110 -52
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +3 -5
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +0 -21
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +4 -2
- package/lib/module/ui/components/OxyPayButton.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +6 -5
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +84 -83
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/SignInModal.js +271 -100
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +76 -122
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +24 -15
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +32 -19
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/icon/OxyIcon.js +5 -4
- package/lib/module/ui/components/icon/OxyIcon.js.map +1 -1
- package/lib/module/ui/components/index.js +0 -5
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +3 -2
- package/lib/module/ui/components/internal/PinInput.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +83 -220
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +26 -13
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js +49 -26
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +84 -48
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +11 -9
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +38 -22
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/module/ui/constants/theme.js +2 -2
- package/lib/module/ui/constants/theme.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +4 -3
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +12 -13
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +117 -142
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +112 -78
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +213 -145
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +28 -16
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +48 -42
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +110 -88
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +110 -131
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +16 -9
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +61 -55
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +12 -9
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +66 -94
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +161 -192
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +21 -23
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +17 -18
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +128 -72
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +15 -31
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +110 -52
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +4 -6
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +0 -20
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts +0 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +3 -4
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts +2 -3
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/icon/OxyIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/index.d.ts +0 -5
- package/lib/typescript/commonjs/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +0 -4
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts +0 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +3 -4
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts +2 -3
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/icon/OxyIcon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/index.d.ts +0 -5
- package/lib/typescript/module/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +2 -2
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +0 -4
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/ui/components/OxyPayButton.tsx +5 -3
- package/src/ui/components/OxyProvider.tsx +6 -5
- package/src/ui/components/OxySignInButton.tsx +82 -81
- package/src/ui/components/SignInModal.tsx +186 -42
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +69 -99
- package/src/ui/components/fileManagement/FileViewer.tsx +25 -15
- package/src/ui/components/fileManagement/UploadPreview.tsx +58 -46
- package/src/ui/components/icon/OxyIcon.tsx +5 -4
- package/src/ui/components/index.ts +0 -5
- package/src/ui/components/internal/PinInput.tsx +4 -3
- package/src/ui/components/modals/DeleteAccountModal.tsx +79 -221
- package/src/ui/components/payment/PaymentDetailsStep.tsx +16 -19
- package/src/ui/components/payment/PaymentMethodStep.tsx +33 -35
- package/src/ui/components/payment/PaymentReviewStep.tsx +63 -67
- package/src/ui/components/payment/PaymentSuccessStep.tsx +4 -12
- package/src/ui/components/payment/PaymentSummaryStep.tsx +26 -33
- package/src/ui/constants/theme.ts +2 -2
- package/src/ui/context/hooks/useAuthOperations.ts +4 -3
- package/src/ui/screens/AccountCenterScreen.tsx +36 -139
- package/src/ui/screens/AccountOverviewScreen.tsx +107 -163
- package/src/ui/screens/AccountSettingsScreen.tsx +142 -156
- package/src/ui/screens/AccountSwitcherScreen.tsx +226 -199
- package/src/ui/screens/AccountVerificationScreen.tsx +34 -25
- package/src/ui/screens/FeedbackScreen.tsx +50 -38
- package/src/ui/screens/FileManagementScreen.tsx +88 -88
- package/src/ui/screens/HistoryViewScreen.tsx +79 -207
- package/src/ui/screens/LanguageSelectorScreen.tsx +19 -7
- package/src/ui/screens/LegalDocumentsScreen.tsx +46 -63
- package/src/ui/screens/PaymentGatewayScreen.tsx +11 -12
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +73 -93
- package/src/ui/screens/PrivacySettingsScreen.tsx +81 -193
- package/src/ui/screens/SavesCollectionsScreen.tsx +23 -23
- package/src/ui/screens/SearchSettingsScreen.tsx +11 -19
- package/src/ui/screens/SessionManagementScreen.tsx +130 -76
- package/src/ui/screens/UserLinksScreen.tsx +15 -32
- package/src/ui/screens/WelcomeNewUserScreen.tsx +46 -20
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +4 -6
- package/src/ui/utils/fileManagement.ts +0 -30
- package/lib/commonjs/ui/components/GroupedItem.js +0 -138
- package/lib/commonjs/ui/components/GroupedItem.js.map +0 -1
- package/lib/commonjs/ui/components/GroupedSection.js +0 -41
- package/lib/commonjs/ui/components/GroupedSection.js.map +0 -1
- package/lib/commonjs/ui/components/Section.js +0 -39
- package/lib/commonjs/ui/components/Section.js.map +0 -1
- package/lib/commonjs/ui/components/SectionTitle.js +0 -29
- package/lib/commonjs/ui/components/SectionTitle.js.map +0 -1
- package/lib/commonjs/ui/components/SettingRow.js +0 -90
- package/lib/commonjs/ui/components/SettingRow.js.map +0 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +0 -206
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +0 -1
- package/lib/commonjs/ui/utils/confirmAction.js +0 -28
- package/lib/commonjs/ui/utils/confirmAction.js.map +0 -1
- package/lib/module/ui/components/GroupedItem.js +0 -135
- package/lib/module/ui/components/GroupedItem.js.map +0 -1
- package/lib/module/ui/components/GroupedSection.js +0 -37
- package/lib/module/ui/components/GroupedSection.js.map +0 -1
- package/lib/module/ui/components/Section.js +0 -34
- package/lib/module/ui/components/Section.js.map +0 -1
- package/lib/module/ui/components/SectionTitle.js +0 -25
- package/lib/module/ui/components/SectionTitle.js.map +0 -1
- package/lib/module/ui/components/SettingRow.js +0 -85
- package/lib/module/ui/components/SettingRow.js.map +0 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +0 -202
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +0 -1
- package/lib/module/ui/utils/confirmAction.js +0 -25
- package/lib/module/ui/utils/confirmAction.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts +0 -24
- package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts +0 -30
- package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Section.d.ts +0 -12
- package/lib/typescript/commonjs/ui/components/Section.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SectionTitle.d.ts +0 -10
- package/lib/typescript/commonjs/ui/components/SectionTitle.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SettingRow.d.ts +0 -20
- package/lib/typescript/commonjs/ui/components/SettingRow.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.d.ts +0 -24
- package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/confirmAction.d.ts +0 -7
- package/lib/typescript/commonjs/ui/utils/confirmAction.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/GroupedItem.d.ts +0 -24
- package/lib/typescript/module/ui/components/GroupedItem.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/GroupedSection.d.ts +0 -30
- package/lib/typescript/module/ui/components/GroupedSection.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Section.d.ts +0 -12
- package/lib/typescript/module/ui/components/Section.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SectionTitle.d.ts +0 -10
- package/lib/typescript/module/ui/components/SectionTitle.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SettingRow.d.ts +0 -20
- package/lib/typescript/module/ui/components/SettingRow.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/internal/GroupedPillButtons.d.ts +0 -24
- package/lib/typescript/module/ui/components/internal/GroupedPillButtons.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/confirmAction.d.ts +0 -7
- package/lib/typescript/module/ui/utils/confirmAction.d.ts.map +0 -1
- package/src/ui/components/GroupedItem.tsx +0 -161
- package/src/ui/components/GroupedSection.tsx +0 -60
- package/src/ui/components/Section.tsx +0 -42
- package/src/ui/components/SectionTitle.tsx +0 -27
- package/src/ui/components/SettingRow.tsx +0 -98
- package/src/ui/components/internal/GroupedPillButtons.tsx +0 -250
- package/src/ui/utils/confirmAction.ts +0 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","useCallback","View","StyleSheet","ScrollView","Linking","toast","Header","
|
|
1
|
+
{"version":3,"names":["React","useState","useCallback","View","StyleSheet","ScrollView","Linking","toast","Header","LoadingState","SettingsListGroup","SettingsListItem","SettingsIcon","useI18n","useTheme","useColorScheme","Colors","normalizeColorScheme","jsx","_jsx","jsxs","_jsxs","LegalDocumentsScreen","onClose","theme","goBack","initialStep","t","loading","setLoading","bloomTheme","colorScheme","normalizedColorScheme","themeColors","POLICY_URLS","privacy","terms","community","dataRetention","contentModeration","childSafety","cookie","documentType","handleOpenPolicy","policyKey","url","canOpen","canOpenURL","openURL","error","__DEV__","console","useEffect","getPolicyTitle","key","titles","style","styles","container","backgroundColor","colors","background","children","title","onBack","variant","elevation","message","color","text","content","icon","name","iconPersonalInfo","description","onPress","iconSecurity","iconData","iconStorage","iconSharing","create","flex","padding","memo"],"sourceRoot":"../../../../src","sources":["ui/screens/LegalDocumentsScreen.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AACpD,SACIC,IAAI,EACJC,UAAU,EACVC,UAAU,EACVC,OAAO,QACJ,cAAc;AAErB,SAASC,KAAK,QAAQ,kBAAkB;AACxC,SAASC,MAAM,EAAEC,YAAY,QAAQ,wBAAe;AACpD,SAASC,iBAAiB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAChF,SAASC,YAAY,QAAQ,+BAA4B;AACzD,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,cAAc,QAAQ,4BAAyB;AACxD,SAASC,MAAM,QAAQ,uBAAoB;AAC3C,SAASC,oBAAoB,QAAQ,wBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3D,MAAMC,oBAA+C,GAAGA,CAAC;EACrDC,OAAO;EACPC,KAAK;EACLC,MAAM;EACNC;AACJ,CAAC,KAAK;EACF,MAAM;IAAEC;EAAE,CAAC,GAAGd,OAAO,CAAC,CAAC;EACvB,MAAM,CAACe,OAAO,EAAEC,UAAU,CAAC,GAAG5B,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAM6B,UAAU,GAAGhB,QAAQ,CAAC,CAAC;EAC7B,MAAMiB,WAAW,GAAGhB,cAAc,CAAC,CAAC;EACpC,MAAMiB,qBAAqB,GAAGf,oBAAoB,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eACFxB,IAAA,CAACR,gBAAgB;UACb4D,IAAI,eAAEpD,IAAA,CAACP,YAAY;YAAC4D,IAAI,EAAC,OAAO;YAACJ,KAAK,EAAC;UAAS,CAAE,CAAE;UACpDL,KAAK,EAAEpC,CAAC,CAAC,yBAAyB,CAAC,IAAI,qBAAsB;UAC7D+C,WAAW,EAAE/C,CAAC,CAAC,4BAA4B,CAAC,IAAI,mCAAoC;UACpFgD,OAAO,EAAEhC,gBAAgB,CAAC,aAAa;QAAE,CAC5C,CAAC,eACFxB,IAAA,CAACR,gBAAgB;UACb4D,IAAI,eAAEpD,IAAA,CAACP,YAAY;YAAC4D,IAAI,EAAC,QAAQ;YAACJ,KAAK,EAAC;UAAS,CAAE,CAAE;UACrDL,KAAK,EAAEpC,CAAC,CAAC,0BAA0B,CAAC,IAAI,eAAgB;UACxD+C,WAAW,EAAE/C,CAAC,CAAC,6BAA6B,CAAC,IAAI,6CAA8C;UAC/FgD,OAAO,EAAEhC,gBAAgB,CAAC,QAAQ;QAAE,CACvC,CAAC;MAAA,CACa;IAAC,CACZ,CAAC;EAAA,CACX,CAAC;AAEf,CAAC;AAED,MAAMc,MAAM,GAAGrD,UAAU,CAAC4E,MAAM,CAAC;EAC7BtB,SAAS,EAAE;IACPuB,IAAI,EAAE;EACV,CAAC;EACDX,OAAO,EAAE;IACLW,IAAI,EAAE,CAAC;IACPC,OAAO,EAAE;EACb;AACJ,CAAC,CAAC;AAEF,4BAAelF,KAAK,CAACmF,IAAI,CAAC7D,oBAAoB,CAAC","ignoreList":[]}
|
|
@@ -4,7 +4,8 @@ import { useState, useRef, useMemo, useCallback } from 'react';
|
|
|
4
4
|
import { View, Text, ScrollView, Animated, Platform, useWindowDimensions } from 'react-native';
|
|
5
5
|
import { useThemeColors } from "../styles/index.js";
|
|
6
6
|
import { normalizeTheme } from "../utils/themeUtils.js";
|
|
7
|
-
import
|
|
7
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
8
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
8
9
|
import { useI18n } from "../hooks/useI18n.js";
|
|
9
10
|
import QRCode from 'react-native-qrcode-svg';
|
|
10
11
|
import { PaymentSummaryStep, PaymentMethodStep, PaymentDetailsStep, PaymentReviewStep, PaymentSuccessStep, PAYMENT_METHODS, createPaymentStyles } from "../components/payment/index.js";
|
|
@@ -157,14 +158,16 @@ const PaymentGatewayScreen = props => {
|
|
|
157
158
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
158
159
|
style: styles.errorText,
|
|
159
160
|
children: t('payment.errors.invalidAmount')
|
|
160
|
-
}), /*#__PURE__*/_jsx(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
161
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
162
|
+
variant: "primary",
|
|
163
|
+
onPress: handleClose,
|
|
164
|
+
size: "small",
|
|
165
|
+
icon: /*#__PURE__*/_jsx(Ionicons, {
|
|
166
|
+
name: "close",
|
|
167
|
+
size: 16
|
|
168
|
+
}),
|
|
169
|
+
iconPosition: "right",
|
|
170
|
+
children: t('payment.actions.close')
|
|
168
171
|
})]
|
|
169
172
|
});
|
|
170
173
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","useRef","useMemo","useCallback","View","Text","ScrollView","Animated","Platform","useWindowDimensions","useThemeColors","normalizeTheme","
|
|
1
|
+
{"version":3,"names":["useState","useRef","useMemo","useCallback","View","Text","ScrollView","Animated","Platform","useWindowDimensions","useThemeColors","normalizeTheme","Button","Ionicons","useI18n","QRCode","PaymentSummaryStep","PaymentMethodStep","PaymentDetailsStep","PaymentReviewStep","PaymentSuccessStep","PAYMENT_METHODS","createPaymentStyles","jsx","_jsx","jsxs","_jsxs","getUniqueItemTypes","items","types","map","item","type","Array","from","Set","PaymentGatewayScreen","props","navigate","goBack","theme","onPaymentResult","amount","currency","onClose","paymentItems","description","process","env","NODE_ENV","length","uniqueTypes","Error","join","currentStep","setCurrentStep","paymentMethod","setPaymentMethod","cardDetails","setCardDetails","number","expiry","cvv","isPaying","setIsPaying","fadeAnim","Value","current","slideAnim","scaleAnim","progressAnim","normalizedTheme","colors","t","styles","isRecurring","availablePaymentMethods","filter","m","key","animateTransition","nextStep","timing","toValue","duration","useNativeDriver","OS","start","setValue","parallel","spring","tension","friction","prevStep","handlePay","setTimeout","handleDone","success","handleClose","error","Number","isNaN","style","errorContainer","children","errorText","variant","onPress","size","icon","name","iconPosition","faircoinAddress","width","windowWidth","isMobile","qrSize","Math","min","animations","renderCurrentStep","onNext","selectedMethod","onSelectMethod","onBack","onCardDetailsChange","QRCodeComponent","onPay","onDone","container","backgroundColor","background","content","showsVerticalScrollIndicator"],"sourceRoot":"../../../../src","sources":["ui/screens/PaymentGatewayScreen.tsx"],"mappings":";;AACA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,OAAO,EAAEC,WAAW,QAAQ,OAAO;AAC9D,SACIC,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,QAAQ,EACRC,QAAQ,EACRC,mBAAmB,QAChB,cAAc;AAErB,SAASC,cAAc,QAAQ,oBAAW;AAC1C,SAASC,cAAc,QAAQ,wBAAqB;AACpD,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,OAAOC,MAAM,MAAM,yBAAyB;AAE5C,SACIC,kBAAkB,EAClBC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,kBAAkB,EAClBC,eAAe,EACfC,mBAAmB,QAChB,gCAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAc/B,MAAMC,kBAAkB,GAAIC,KAAoB,IAAK;EACjD,MAAMC,KAAK,GAAGD,KAAK,CAACE,GAAG,CAACC,IAAI,IAAIA,IAAI,CAACC,IAAI,CAAC;EAC1C,OAAOC,KAAK,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kB;UACfoD,MAAM,EAAEA,MAAO;UACf+C,UAAU,EAAEA,UAAW;UACvBS,MAAM,EAAEhC;QAAW,CACtB,CAAC;MAEV;QACI,OAAO,IAAI;IACnB;EACJ,CAAC;EAED,oBACIxE,IAAA,CAACpB,IAAI;IAACkG,KAAK,EAAE,CAAC5B,MAAM,CAACuD,SAAS,EAAE;MAAEC,eAAe,EAAE1D,MAAM,CAAC2D;IAAW,CAAC,CAAE;IAAA3B,QAAA,eACpEhF,IAAA,CAAClB,UAAU;MAACgG,KAAK,EAAE5B,MAAM,CAAC0D,OAAQ;MAACC,4BAA4B,EAAE,KAAM;MAAA7B,QAAA,EAClEgB,iBAAiB,CAAC;IAAC,CACZ;EAAC,CACX,CAAC;AAEf,CAAC;AAED,eAAepF,oBAAoB","ignoreList":[]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useState, useEffect } from 'react';
|
|
3
|
+
import { useState, useEffect, useCallback, useMemo } from 'react';
|
|
4
4
|
import { View, Text, TouchableOpacity, StyleSheet, ScrollView, ActivityIndicator } from 'react-native';
|
|
5
5
|
import { fontFamilies } from "../styles/fonts.js";
|
|
6
6
|
import { toast } from '../../lib/sonner';
|
|
7
|
-
import
|
|
7
|
+
import * as Prompt from '@oxyhq/bloom/prompt';
|
|
8
|
+
import { usePromptControl } from '@oxyhq/bloom/prompt';
|
|
8
9
|
import { Ionicons } from '@expo/vector-icons';
|
|
9
10
|
import { useI18n } from "../hooks/useI18n.js";
|
|
10
11
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
@@ -30,11 +31,16 @@ const PremiumSubscriptionScreen = ({
|
|
|
30
31
|
const [billingInterval, setBillingInterval] = useState('month');
|
|
31
32
|
const [activeTab, setActiveTab] = useState('plans');
|
|
32
33
|
const [currentAppPackage, setCurrentAppPackage] = useState('mention'); // Default to mention for demo
|
|
33
|
-
|
|
34
|
+
const [pendingUnsubscribeFeatureId, setPendingUnsubscribeFeatureId] = useState(null);
|
|
34
35
|
const {
|
|
35
36
|
t
|
|
36
37
|
} = useI18n();
|
|
37
38
|
const bloomTheme = useTheme();
|
|
39
|
+
|
|
40
|
+
// Prompt controls
|
|
41
|
+
const cancelSubscriptionPrompt = usePromptControl();
|
|
42
|
+
const unsubscribeFeaturePrompt = usePromptControl();
|
|
43
|
+
|
|
38
44
|
// Extract commonly used colors for readability
|
|
39
45
|
const textColor = bloomTheme.colors.text;
|
|
40
46
|
const backgroundColor = bloomTheme.colors.background;
|
|
@@ -217,46 +223,14 @@ const PremiumSubscriptionScreen = ({
|
|
|
217
223
|
}
|
|
218
224
|
}, [currentAppPackage, user?.isPremium]);
|
|
219
225
|
const detectCurrentApp = () => {
|
|
220
|
-
|
|
221
|
-
// For now, we'll use a mock detection based on available methods
|
|
222
|
-
|
|
223
|
-
// Real app detection methods you could use:
|
|
224
|
-
// 1. Check bundle identifier in React Native:
|
|
225
|
-
// import DeviceInfo from 'react-native-device-info';
|
|
226
|
-
// const bundleId = DeviceInfo.getBundleId();
|
|
227
|
-
// Example: com.oxy.mention -> 'mention'
|
|
228
|
-
|
|
229
|
-
// 2. Environment variables or build configuration
|
|
230
|
-
// const appPackage = __DEV__ ? process.env.APP_PACKAGE : 'mention';
|
|
231
|
-
|
|
232
|
-
// 3. Check specific app capabilities or modules
|
|
233
|
-
// if (typeof MentionModule !== 'undefined') return 'mention';
|
|
234
|
-
// if (typeof OxyWorkspaceModule !== 'undefined') return 'oxy-workspace';
|
|
235
|
-
|
|
236
|
-
// 4. Use build-time configuration with Metro or similar
|
|
237
|
-
// const appPackage = require('../config/app.json').packageName;
|
|
238
|
-
|
|
239
|
-
// For demo purposes, we'll simulate different apps
|
|
240
|
-
// You would replace this with actual app detection logic
|
|
241
|
-
|
|
242
|
-
// IMPORTANT: This ensures subscription restrictions work properly:
|
|
243
|
-
// - Mention+ plan can only be subscribed to when app package == 'mention'
|
|
244
|
-
// - Other app-specific plans follow the same pattern
|
|
245
|
-
// - Ecosystem plans work across all apps
|
|
246
|
-
|
|
247
|
-
const detectedApp = 'mention'; // This would be dynamic in real implementation
|
|
248
|
-
|
|
226
|
+
const detectedApp = 'mention';
|
|
249
227
|
setCurrentAppPackage(detectedApp);
|
|
250
228
|
};
|
|
251
229
|
const loadSubscriptionData = async () => {
|
|
252
230
|
try {
|
|
253
231
|
setLoading(true);
|
|
254
|
-
|
|
255
|
-
// Filter plans available for current app
|
|
256
232
|
const availablePlans = mockPlans.filter(plan => plan.applicableApps.includes(currentAppPackage));
|
|
257
233
|
setPlans(availablePlans);
|
|
258
|
-
|
|
259
|
-
// Mock current subscription
|
|
260
234
|
let currentSubscription = null;
|
|
261
235
|
if (user?.isPremium) {
|
|
262
236
|
currentSubscription = {
|
|
@@ -269,15 +243,13 @@ const PremiumSubscriptionScreen = ({
|
|
|
269
243
|
};
|
|
270
244
|
setSubscription(currentSubscription);
|
|
271
245
|
}
|
|
272
|
-
|
|
273
|
-
// Filter features available for current app and update based on current subscription
|
|
274
246
|
const availableFeatures = mockIndividualFeatures.filter(feature => feature.applicableApps.includes(currentAppPackage));
|
|
275
247
|
const updatedFeatures = availableFeatures.map(feature => {
|
|
276
248
|
const isIncludedInCurrentPlan = !!(currentSubscription && feature.includedInPlans.includes(currentSubscription.planId));
|
|
277
249
|
return {
|
|
278
250
|
...feature,
|
|
279
251
|
isIncludedInCurrentPlan,
|
|
280
|
-
isSubscribed: !!isIncludedInCurrentPlan
|
|
252
|
+
isSubscribed: !!isIncludedInCurrentPlan
|
|
281
253
|
};
|
|
282
254
|
});
|
|
283
255
|
setIndividualFeatures(updatedFeatures);
|
|
@@ -295,7 +267,6 @@ const PremiumSubscriptionScreen = ({
|
|
|
295
267
|
};
|
|
296
268
|
const handleSubscribe = async planId => {
|
|
297
269
|
try {
|
|
298
|
-
// Check if plan is available for current app
|
|
299
270
|
const selectedPlan = mockPlans.find(plan => plan.id === planId);
|
|
300
271
|
if (!selectedPlan?.applicableApps.includes(currentAppPackage)) {
|
|
301
272
|
toast.error(t('premium.toasts.planUnavailable', {
|
|
@@ -303,19 +274,13 @@ const PremiumSubscriptionScreen = ({
|
|
|
303
274
|
}) || `This plan is not available for the current app (${currentAppPackage})`);
|
|
304
275
|
return;
|
|
305
276
|
}
|
|
306
|
-
|
|
307
|
-
// Special restriction for Mention+ plan - only available in mention app
|
|
308
277
|
if (planId === 'mention-plus' && currentAppPackage !== 'mention') {
|
|
309
278
|
toast.error(t('premium.toasts.mentionOnly') || 'Mention+ is only available in the Mention app');
|
|
310
279
|
return;
|
|
311
280
|
}
|
|
312
281
|
setProcessingPayment(true);
|
|
313
|
-
|
|
314
|
-
// Mock payment processing
|
|
315
282
|
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
316
283
|
toast.success(t('premium.toasts.activated') || 'Subscription activated successfully!');
|
|
317
|
-
|
|
318
|
-
// Mock subscription update
|
|
319
284
|
setSubscription({
|
|
320
285
|
id: `sub_${Date.now()}`,
|
|
321
286
|
planId,
|
|
@@ -324,8 +289,6 @@ const PremiumSubscriptionScreen = ({
|
|
|
324
289
|
currentPeriodEnd: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString(),
|
|
325
290
|
cancelAtPeriodEnd: false
|
|
326
291
|
});
|
|
327
|
-
|
|
328
|
-
// Reload data to update feature states
|
|
329
292
|
loadSubscriptionData();
|
|
330
293
|
} catch (error) {
|
|
331
294
|
if (__DEV__) {
|
|
@@ -336,20 +299,20 @@ const PremiumSubscriptionScreen = ({
|
|
|
336
299
|
setProcessingPayment(false);
|
|
337
300
|
}
|
|
338
301
|
};
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
};
|
|
302
|
+
const confirmCancelSubscription = useCallback(() => {
|
|
303
|
+
cancelSubscriptionPrompt.open();
|
|
304
|
+
}, [cancelSubscriptionPrompt]);
|
|
305
|
+
const handleCancelSubscription = useCallback(async () => {
|
|
306
|
+
try {
|
|
307
|
+
setSubscription(prev => prev ? {
|
|
308
|
+
...prev,
|
|
309
|
+
cancelAtPeriodEnd: true
|
|
310
|
+
} : null);
|
|
311
|
+
toast.success(t('premium.toasts.willCancel') || 'Subscription will be canceled at the end of the billing period');
|
|
312
|
+
} catch (error) {
|
|
313
|
+
toast.error(t('premium.toasts.cancelFailed') || 'Failed to cancel subscription');
|
|
314
|
+
}
|
|
315
|
+
}, [t]);
|
|
353
316
|
const handleReactivateSubscription = async () => {
|
|
354
317
|
try {
|
|
355
318
|
setSubscription(prev => prev ? {
|
|
@@ -362,7 +325,7 @@ const PremiumSubscriptionScreen = ({
|
|
|
362
325
|
}
|
|
363
326
|
};
|
|
364
327
|
const formatPrice = (price, currency, interval) => {
|
|
365
|
-
const yearlyPrice = interval === 'year' ? price : price * 12 * 0.8;
|
|
328
|
+
const yearlyPrice = interval === 'year' ? price : price * 12 * 0.8;
|
|
366
329
|
const displayPrice = billingInterval === 'year' ? yearlyPrice : price;
|
|
367
330
|
return {
|
|
368
331
|
price: displayPrice,
|
|
@@ -376,16 +339,12 @@ const PremiumSubscriptionScreen = ({
|
|
|
376
339
|
};
|
|
377
340
|
const handleFeatureSubscribe = async featureId => {
|
|
378
341
|
try {
|
|
379
|
-
// Check if feature is available for current app
|
|
380
342
|
const selectedFeature = mockIndividualFeatures.find(feature => feature.id === featureId);
|
|
381
343
|
if (!selectedFeature?.applicableApps.includes(currentAppPackage)) {
|
|
382
344
|
toast.error(`This feature is not available for the current app (${currentAppPackage})`);
|
|
383
345
|
return;
|
|
384
346
|
}
|
|
385
|
-
|
|
386
|
-
// Special restrictions for app-specific features
|
|
387
347
|
if (selectedFeature.appScope === 'specific') {
|
|
388
|
-
// For features that are only available in specific apps, enforce strict matching
|
|
389
348
|
const hasExactMatch = selectedFeature.applicableApps.length === 1 && selectedFeature.applicableApps[0] === currentAppPackage;
|
|
390
349
|
if (!hasExactMatch && selectedFeature.applicableApps.length === 1) {
|
|
391
350
|
const requiredApp = selectedFeature.applicableApps[0];
|
|
@@ -394,8 +353,6 @@ const PremiumSubscriptionScreen = ({
|
|
|
394
353
|
}
|
|
395
354
|
}
|
|
396
355
|
setProcessingPayment(true);
|
|
397
|
-
|
|
398
|
-
// Mock feature subscription
|
|
399
356
|
await new Promise(resolve => setTimeout(resolve, 1500));
|
|
400
357
|
setIndividualFeatures(prev => prev.map(feature => feature.id === featureId ? {
|
|
401
358
|
...feature,
|
|
@@ -414,24 +371,28 @@ const PremiumSubscriptionScreen = ({
|
|
|
414
371
|
setProcessingPayment(false);
|
|
415
372
|
}
|
|
416
373
|
};
|
|
417
|
-
const
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
374
|
+
const confirmFeatureUnsubscribe = useCallback(featureId => {
|
|
375
|
+
setPendingUnsubscribeFeatureId(featureId);
|
|
376
|
+
unsubscribeFeaturePrompt.open();
|
|
377
|
+
}, [unsubscribeFeaturePrompt]);
|
|
378
|
+
const handleFeatureUnsubscribe = useCallback(async () => {
|
|
379
|
+
if (!pendingUnsubscribeFeatureId) return;
|
|
380
|
+
const feature = individualFeatures.find(f => f.id === pendingUnsubscribeFeatureId);
|
|
381
|
+
try {
|
|
382
|
+
setIndividualFeatures(prev => prev.map(f => f.id === pendingUnsubscribeFeatureId ? {
|
|
383
|
+
...f,
|
|
384
|
+
isSubscribed: false
|
|
385
|
+
} : f));
|
|
386
|
+
toast.success(t('premium.toasts.featureUnsubscribed', {
|
|
387
|
+
name: feature?.name ?? ''
|
|
388
|
+
}) ?? `Unsubscribed from ${feature?.name}`);
|
|
389
|
+
} catch (error) {
|
|
390
|
+
toast.error(t('premium.toasts.featureUnsubscribeFailed') || 'Failed to unsubscribe from feature');
|
|
391
|
+
} finally {
|
|
392
|
+
setPendingUnsubscribeFeatureId(null);
|
|
393
|
+
}
|
|
394
|
+
}, [pendingUnsubscribeFeatureId, individualFeatures, t]);
|
|
395
|
+
const pendingUnsubscribeFeature = useMemo(() => individualFeatures.find(f => f.id === pendingUnsubscribeFeatureId), [individualFeatures, pendingUnsubscribeFeatureId]);
|
|
435
396
|
const renderHeader = () => {
|
|
436
397
|
const getAppDisplayName = packageName => {
|
|
437
398
|
const appNames = {
|
|
@@ -558,7 +519,7 @@ const PremiumSubscriptionScreen = ({
|
|
|
558
519
|
style: [styles.actionButton, {
|
|
559
520
|
backgroundColor: dangerColor
|
|
560
521
|
}],
|
|
561
|
-
onPress:
|
|
522
|
+
onPress: confirmCancelSubscription,
|
|
562
523
|
children: /*#__PURE__*/_jsx(Text, {
|
|
563
524
|
style: styles.actionButtonText,
|
|
564
525
|
children: t('premium.actions.cancelSubBtn') || 'Cancel Subscription'
|
|
@@ -938,7 +899,7 @@ const PremiumSubscriptionScreen = ({
|
|
|
938
899
|
style: [styles.unsubscribeButton, {
|
|
939
900
|
borderColor: dangerColor
|
|
940
901
|
}],
|
|
941
|
-
onPress: () =>
|
|
902
|
+
onPress: () => confirmFeatureUnsubscribe(feature.id),
|
|
942
903
|
children: /*#__PURE__*/_jsx(Text, {
|
|
943
904
|
style: [styles.unsubscribeText, {
|
|
944
905
|
color: dangerColor
|
|
@@ -1164,6 +1125,22 @@ const PremiumSubscriptionScreen = ({
|
|
|
1164
1125
|
}), /*#__PURE__*/_jsx(View, {
|
|
1165
1126
|
style: styles.bottomSpacing
|
|
1166
1127
|
})]
|
|
1128
|
+
}), /*#__PURE__*/_jsx(Prompt.Basic, {
|
|
1129
|
+
control: cancelSubscriptionPrompt,
|
|
1130
|
+
title: t('premium.confirms.cancelSubTitle') || 'Cancel Subscription',
|
|
1131
|
+
description: t('premium.confirms.cancelSub') || 'Are you sure you want to cancel your subscription? You will lose access to premium features at the end of your current billing period.',
|
|
1132
|
+
onConfirm: handleCancelSubscription,
|
|
1133
|
+
confirmButtonCta: t('premium.actions.cancelSubBtn') || 'Cancel Subscription',
|
|
1134
|
+
confirmButtonColor: "negative"
|
|
1135
|
+
}), /*#__PURE__*/_jsx(Prompt.Basic, {
|
|
1136
|
+
control: unsubscribeFeaturePrompt,
|
|
1137
|
+
title: t('premium.confirms.unsubscribeFeatureTitle') || 'Unsubscribe from Feature',
|
|
1138
|
+
description: pendingUnsubscribeFeature ? t('premium.confirms.unsubscribeFeature', {
|
|
1139
|
+
name: pendingUnsubscribeFeature.name
|
|
1140
|
+
}) ?? `Are you sure you want to unsubscribe from ${pendingUnsubscribeFeature.name}?` : '',
|
|
1141
|
+
onConfirm: handleFeatureUnsubscribe,
|
|
1142
|
+
confirmButtonCta: t('premium.actions.unsubscribe') || 'Unsubscribe',
|
|
1143
|
+
confirmButtonColor: "negative"
|
|
1167
1144
|
})]
|
|
1168
1145
|
});
|
|
1169
1146
|
};
|
|
@@ -1415,7 +1392,6 @@ const styles = StyleSheet.create({
|
|
|
1415
1392
|
bottomSpacing: {
|
|
1416
1393
|
height: 40
|
|
1417
1394
|
},
|
|
1418
|
-
// Tab Navigation Styles
|
|
1419
1395
|
tabContainer: {
|
|
1420
1396
|
flexDirection: 'row',
|
|
1421
1397
|
borderBottomWidth: 1,
|
|
@@ -1431,7 +1407,6 @@ const styles = StyleSheet.create({
|
|
|
1431
1407
|
fontSize: 16,
|
|
1432
1408
|
fontWeight: '600'
|
|
1433
1409
|
},
|
|
1434
|
-
// Individual Feature Styles
|
|
1435
1410
|
featureCard: {
|
|
1436
1411
|
borderRadius: 12,
|
|
1437
1412
|
borderWidth: 1,
|
|
@@ -1525,7 +1500,6 @@ const styles = StyleSheet.create({
|
|
|
1525
1500
|
fontWeight: '600',
|
|
1526
1501
|
marginBottom: 12
|
|
1527
1502
|
},
|
|
1528
|
-
// New styles for enhanced feature cards
|
|
1529
1503
|
featureNameRow: {
|
|
1530
1504
|
flexDirection: 'row',
|
|
1531
1505
|
alignItems: 'center',
|
|
@@ -1573,7 +1547,6 @@ const styles = StyleSheet.create({
|
|
|
1573
1547
|
fontWeight: '500',
|
|
1574
1548
|
textAlign: 'center'
|
|
1575
1549
|
},
|
|
1576
|
-
// App-specific plan styles
|
|
1577
1550
|
appSpecificBadge: {
|
|
1578
1551
|
position: 'absolute',
|
|
1579
1552
|
top: 16,
|
|
@@ -1603,7 +1576,6 @@ const styles = StyleSheet.create({
|
|
|
1603
1576
|
fontSize: 16,
|
|
1604
1577
|
fontWeight: '600'
|
|
1605
1578
|
},
|
|
1606
|
-
// App switcher styles (for development/testing)
|
|
1607
1579
|
appSwitcher: {
|
|
1608
1580
|
padding: 16,
|
|
1609
1581
|
borderBottomWidth: 1,
|