@tyrads.com/tyrads-sdk 3.3.4 → 4.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/tyradssdk/TyradsSdkModule.kt +161 -19
- package/ios/Tyrads/AcmoConfig.swift +1 -1
- package/ios/Tyrads/InitModel.swift +29 -15
- package/ios/Tyrads/Tyrads.swift +332 -274
- package/ios/Tyrads/WebViewController.swift +10 -17
- package/ios/Tyrads/core/models/TyradsUserInfo.swift +2 -0
- package/ios/Tyrads/core/utils/AcmoKeyNames.swift +1 -0
- package/ios/Tyrads/helpers/device_details.swift +122 -2
- package/ios/Tyrads/pushNotifications/APNsAppDelegateProxy.swift +37 -0
- package/ios/Tyrads/pushNotifications/APNsNotificationListener.swift +14 -0
- package/ios/Tyrads/pushNotifications/APNsNotificationManager.swift +68 -0
- package/ios/Tyrads/pushNotifications/APNsNotificationReceiver.swift +77 -0
- package/ios/Tyrads/pushNotifications/TyradsAPNsSwizzler.mm +179 -0
- package/ios/TyradsSdk-Bridging-Header.h +3 -0
- package/ios/TyradsSdk.mm +12 -1
- package/ios/TyradsSdk.swift +121 -4
- package/lib/commonjs/acmo/core/components/countdown-timer.js +48 -0
- package/lib/commonjs/acmo/core/components/countdown-timer.js.map +1 -0
- package/lib/commonjs/acmo/core/components/snap-carousel.js +86 -0
- package/lib/commonjs/acmo/core/components/snap-carousel.js.map +1 -0
- package/lib/commonjs/acmo/core/constants/api-endpoints.js +18 -0
- package/lib/commonjs/acmo/core/constants/api-endpoints.js.map +1 -0
- package/lib/commonjs/acmo/core/helpers/colors.js +20 -0
- package/lib/commonjs/acmo/core/helpers/colors.js.map +1 -0
- package/lib/commonjs/acmo/core/helpers/logger.js +18 -0
- package/lib/commonjs/acmo/core/helpers/logger.js.map +1 -0
- package/lib/commonjs/acmo/core/helpers/patches.js +7 -0
- package/lib/commonjs/acmo/core/helpers/patches.js.map +1 -0
- package/lib/commonjs/acmo/core/network/http-client.js +91 -0
- package/lib/commonjs/acmo/core/network/http-client.js.map +1 -0
- package/lib/commonjs/acmo/core/network/network-common.js +111 -0
- package/lib/commonjs/acmo/core/network/network-common.js.map +1 -0
- package/lib/commonjs/acmo/core/services/localization_service.js +7 -13
- package/lib/commonjs/acmo/core/services/localization_service.js.map +1 -1
- package/lib/commonjs/acmo/core/types/activated-campaings.d.js +2 -0
- package/lib/commonjs/acmo/core/types/activated-campaings.d.js.map +1 -0
- package/lib/commonjs/acmo/core/tyrads-sdk-core.js +203 -0
- package/lib/commonjs/acmo/core/tyrads-sdk-core.js.map +1 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/components/gradient_card.js +98 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/components/gradient_card.js.map +1 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/components/modal-wrapper.js +55 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/components/modal-wrapper.js.map +1 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/controller.js +141 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/controller.js.map +1 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js +183 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js.map +1 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/inapp-notification-host.js +37 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/inapp-notification-host.js.map +1 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/inapp-notification-manager.js +39 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/inapp-notification-manager.js.map +1 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.js +206 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.js.map +1 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js +155 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js.map +1 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/repository.js +52 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/repository.js.map +1 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/tyrads-global-host.js +37 -0
- package/lib/commonjs/acmo/modules/inapp-notifications/tyrads-global-host.js.map +1 -0
- package/lib/commonjs/acmo/modules/premium-widgets/components/active_offers_button.js.map +1 -0
- package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/custom_card.js +1 -2
- package/lib/commonjs/acmo/modules/premium-widgets/components/custom_card.js.map +1 -0
- package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/custom_scroller.js +20 -11
- package/lib/commonjs/acmo/modules/premium-widgets/components/custom_scroller.js.map +1 -0
- package/lib/commonjs/acmo/modules/premium-widgets/components/custom_shimmer.js.map +1 -0
- package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/offer_card.js +12 -12
- package/lib/commonjs/acmo/modules/premium-widgets/components/offer_card.js.map +1 -0
- package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.js +3 -3
- package/lib/commonjs/acmo/modules/premium-widgets/components/offer_list_item.js.map +1 -0
- package/lib/commonjs/acmo/modules/premium-widgets/components/premium_empty_widget.js.map +1 -0
- package/lib/commonjs/acmo/modules/premium-widgets/components/premium_header.js.map +1 -0
- package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/premium_loading.js +3 -3
- package/lib/commonjs/acmo/modules/premium-widgets/components/premium_loading.js.map +1 -0
- package/lib/commonjs/acmo/modules/premium-widgets/controller.js +30 -0
- package/lib/commonjs/acmo/modules/premium-widgets/controller.js.map +1 -0
- package/lib/commonjs/acmo/modules/{dashboard/top_offers.js → premium-widgets/premium_offers_widget.js} +67 -30
- package/lib/commonjs/acmo/modules/premium-widgets/premium_offers_widget.js.map +1 -0
- package/lib/commonjs/acmo/modules/premium-widgets/premium_offers_widget_wrapper.js +49 -0
- package/lib/commonjs/acmo/modules/premium-widgets/premium_offers_widget_wrapper.js.map +1 -0
- package/lib/commonjs/acmo/modules/premium-widgets/repository.js +103 -0
- package/lib/commonjs/acmo/modules/premium-widgets/repository.js.map +1 -0
- package/lib/commonjs/acmo/modules/push-notifications/apns-manager.js +227 -0
- package/lib/commonjs/acmo/modules/push-notifications/apns-manager.js.map +1 -0
- package/lib/commonjs/acmo/modules/push-notifications/fcm-manager.js +148 -0
- package/lib/commonjs/acmo/modules/push-notifications/fcm-manager.js.map +1 -0
- package/lib/commonjs/acmo_config.js +6 -5
- package/lib/commonjs/acmo_config.js.map +1 -1
- package/lib/commonjs/assets/images/alarm-clock.png +0 -0
- package/lib/commonjs/assets/images/circle-x.png +0 -0
- package/lib/commonjs/assets/images/coin.png +0 -0
- package/lib/commonjs/index.js +33 -106
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/acmo/core/components/countdown-timer.js +42 -0
- package/lib/module/acmo/core/components/countdown-timer.js.map +1 -0
- package/lib/module/acmo/core/components/snap-carousel.js +81 -0
- package/lib/module/acmo/core/components/snap-carousel.js.map +1 -0
- package/lib/module/acmo/core/constants/api-endpoints.js +14 -0
- package/lib/module/acmo/core/constants/api-endpoints.js.map +1 -0
- package/lib/module/acmo/core/helpers/colors.js +15 -0
- package/lib/module/acmo/core/helpers/colors.js.map +1 -0
- package/lib/module/acmo/core/helpers/logger.js +14 -0
- package/lib/module/acmo/core/helpers/logger.js.map +1 -0
- package/lib/module/acmo/core/helpers/patches.js +7 -0
- package/lib/module/acmo/core/helpers/patches.js.map +1 -0
- package/lib/module/acmo/core/network/http-client.js +86 -0
- package/lib/module/acmo/core/network/http-client.js.map +1 -0
- package/lib/module/acmo/core/network/network-common.js +106 -0
- package/lib/module/acmo/core/network/network-common.js.map +1 -0
- package/lib/module/acmo/core/services/localization_service.js +7 -13
- package/lib/module/acmo/core/services/localization_service.js.map +1 -1
- package/lib/module/acmo/core/types/activated-campaings.d.js +2 -0
- package/lib/module/acmo/core/types/activated-campaings.d.js.map +1 -0
- package/lib/module/acmo/core/tyrads-sdk-core.js +197 -0
- package/lib/module/acmo/core/tyrads-sdk-core.js.map +1 -0
- package/lib/module/acmo/modules/inapp-notifications/components/gradient_card.js +92 -0
- package/lib/module/acmo/modules/inapp-notifications/components/gradient_card.js.map +1 -0
- package/lib/module/acmo/modules/inapp-notifications/components/modal-wrapper.js +49 -0
- package/lib/module/acmo/modules/inapp-notifications/components/modal-wrapper.js.map +1 -0
- package/lib/module/acmo/modules/inapp-notifications/controller.js +136 -0
- package/lib/module/acmo/modules/inapp-notifications/controller.js.map +1 -0
- package/lib/module/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js +176 -0
- package/lib/module/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js.map +1 -0
- package/lib/module/acmo/modules/inapp-notifications/inapp-notification-host.js +32 -0
- package/lib/module/acmo/modules/inapp-notifications/inapp-notification-host.js.map +1 -0
- package/lib/module/acmo/modules/inapp-notifications/inapp-notification-manager.js +35 -0
- package/lib/module/acmo/modules/inapp-notifications/inapp-notification-manager.js.map +1 -0
- package/lib/module/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.js +200 -0
- package/lib/module/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.js.map +1 -0
- package/lib/module/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js +149 -0
- package/lib/module/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js.map +1 -0
- package/lib/module/acmo/modules/inapp-notifications/repository.js +47 -0
- package/lib/module/acmo/modules/inapp-notifications/repository.js.map +1 -0
- package/lib/module/acmo/modules/inapp-notifications/tyrads-global-host.js +32 -0
- package/lib/module/acmo/modules/inapp-notifications/tyrads-global-host.js.map +1 -0
- package/lib/module/acmo/modules/premium-widgets/components/active_offers_button.js.map +1 -0
- package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/custom_card.js +1 -2
- package/lib/module/acmo/modules/premium-widgets/components/custom_card.js.map +1 -0
- package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/custom_scroller.js +20 -11
- package/lib/module/acmo/modules/premium-widgets/components/custom_scroller.js.map +1 -0
- package/lib/module/acmo/modules/premium-widgets/components/custom_shimmer.js.map +1 -0
- package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/offer_card.js +12 -12
- package/lib/module/acmo/modules/premium-widgets/components/offer_card.js.map +1 -0
- package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.js +3 -3
- package/lib/module/acmo/modules/premium-widgets/components/offer_list_item.js.map +1 -0
- package/lib/module/acmo/modules/premium-widgets/components/premium_empty_widget.js.map +1 -0
- package/lib/module/acmo/modules/premium-widgets/components/premium_header.js.map +1 -0
- package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/premium_loading.js +1 -1
- package/lib/module/acmo/modules/premium-widgets/components/premium_loading.js.map +1 -0
- package/lib/module/acmo/modules/premium-widgets/controller.js +25 -0
- package/lib/module/acmo/modules/premium-widgets/controller.js.map +1 -0
- package/lib/module/acmo/modules/{dashboard/top_offers.js → premium-widgets/premium_offers_widget.js} +69 -32
- package/lib/module/acmo/modules/premium-widgets/premium_offers_widget.js.map +1 -0
- package/lib/module/acmo/modules/premium-widgets/premium_offers_widget_wrapper.js +41 -0
- package/lib/module/acmo/modules/premium-widgets/premium_offers_widget_wrapper.js.map +1 -0
- package/lib/module/acmo/modules/premium-widgets/repository.js +98 -0
- package/lib/module/acmo/modules/premium-widgets/repository.js.map +1 -0
- package/lib/module/acmo/modules/push-notifications/apns-manager.js +222 -0
- package/lib/module/acmo/modules/push-notifications/apns-manager.js.map +1 -0
- package/lib/module/acmo/modules/push-notifications/fcm-manager.js +143 -0
- package/lib/module/acmo/modules/push-notifications/fcm-manager.js.map +1 -0
- package/lib/module/acmo_config.js +6 -5
- package/lib/module/acmo_config.js.map +1 -1
- package/lib/module/assets/images/alarm-clock.png +0 -0
- package/lib/module/assets/images/circle-x.png +0 -0
- package/lib/module/assets/images/coin.png +0 -0
- package/lib/module/index.js +16 -106
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/acmo/core/components/countdown-timer.d.ts +8 -0
- package/lib/typescript/commonjs/src/acmo/core/components/countdown-timer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/core/components/snap-carousel.d.ts +26 -0
- package/lib/typescript/commonjs/src/acmo/core/components/snap-carousel.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/core/constants/api-endpoints.d.ts +12 -0
- package/lib/typescript/commonjs/src/acmo/core/constants/api-endpoints.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/core/helpers/colors.d.ts +2 -0
- package/lib/typescript/commonjs/src/acmo/core/helpers/colors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/core/helpers/logger.d.ts +6 -0
- package/lib/typescript/commonjs/src/acmo/core/helpers/logger.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/core/network/http-client.d.ts +28 -0
- package/lib/typescript/commonjs/src/acmo/core/network/http-client.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/core/network/network-common.d.ts +13 -0
- package/lib/typescript/commonjs/src/acmo/core/network/network-common.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/core/services/localization_service.d.ts +0 -1
- package/lib/typescript/commonjs/src/acmo/core/services/localization_service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/acmo/core/types/external_types.d.ts +5 -0
- package/lib/typescript/commonjs/src/acmo/core/types/external_types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/acmo/core/tyrads-sdk-core.d.ts +46 -0
- package/lib/typescript/commonjs/src/acmo/core/tyrads-sdk-core.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/components/gradient_card.d.ts +17 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/components/gradient_card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/components/modal-wrapper.d.ts +10 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/components/modal-wrapper.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/controller.d.ts +22 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.d.ts +6 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/inapp-notification-host.d.ts +7 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/inapp-notification-host.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/inapp-notification-manager.d.ts +14 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/inapp-notification-manager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.d.ts +4 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.d.ts +7 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/repository.d.ts +8 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/repository.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/tyrads-global-host.d.ts +6 -0
- package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/tyrads-global-host.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/active_offers_button.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/custom_card.d.ts.map +1 -0
- package/lib/typescript/{module/src/acmo/modules/dashboard → commonjs/src/acmo/modules/premium-widgets}/components/custom_scroller.d.ts +3 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/custom_scroller.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/custom_shimmer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/offer_card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/offer_list_item.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/premium_empty_widget.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/premium_header.d.ts.map +1 -0
- package/lib/typescript/{module/src/acmo/modules/dashboard → commonjs/src/acmo/modules/premium-widgets}/components/premium_loading.d.ts +1 -1
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/premium_loading.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/controller.d.ts +14 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/{dashboard/top_offers.d.ts → premium-widgets/premium_offers_widget.d.ts} +3 -3
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/premium_offers_widget.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.d.ts +9 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/repository.d.ts +13 -0
- package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/repository.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/push-notifications/apns-manager.d.ts +40 -0
- package/lib/typescript/commonjs/src/acmo/modules/push-notifications/apns-manager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/push-notifications/fcm-manager.d.ts +32 -0
- package/lib/typescript/commonjs/src/acmo/modules/push-notifications/fcm-manager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo_config.d.ts +1 -0
- package/lib/typescript/commonjs/src/acmo_config.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +5 -11
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/acmo/core/components/countdown-timer.d.ts +8 -0
- package/lib/typescript/module/src/acmo/core/components/countdown-timer.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/core/components/snap-carousel.d.ts +26 -0
- package/lib/typescript/module/src/acmo/core/components/snap-carousel.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/core/constants/api-endpoints.d.ts +12 -0
- package/lib/typescript/module/src/acmo/core/constants/api-endpoints.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/core/helpers/colors.d.ts +2 -0
- package/lib/typescript/module/src/acmo/core/helpers/colors.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/core/helpers/logger.d.ts +6 -0
- package/lib/typescript/module/src/acmo/core/helpers/logger.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/core/network/http-client.d.ts +28 -0
- package/lib/typescript/module/src/acmo/core/network/http-client.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/core/network/network-common.d.ts +13 -0
- package/lib/typescript/module/src/acmo/core/network/network-common.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/core/services/localization_service.d.ts +0 -1
- package/lib/typescript/module/src/acmo/core/services/localization_service.d.ts.map +1 -1
- package/lib/typescript/module/src/acmo/core/types/external_types.d.ts +5 -0
- package/lib/typescript/module/src/acmo/core/types/external_types.d.ts.map +1 -1
- package/lib/typescript/module/src/acmo/core/tyrads-sdk-core.d.ts +46 -0
- package/lib/typescript/module/src/acmo/core/tyrads-sdk-core.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/components/gradient_card.d.ts +17 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/components/gradient_card.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/components/modal-wrapper.d.ts +10 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/components/modal-wrapper.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/controller.d.ts +22 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/controller.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.d.ts +6 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/inapp-notification-host.d.ts +7 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/inapp-notification-host.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/inapp-notification-manager.d.ts +14 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/inapp-notification-manager.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.d.ts +4 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.d.ts +7 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/repository.d.ts +8 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/repository.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/tyrads-global-host.d.ts +6 -0
- package/lib/typescript/module/src/acmo/modules/inapp-notifications/tyrads-global-host.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/components/active_offers_button.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/components/custom_card.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src/acmo/modules/dashboard → module/src/acmo/modules/premium-widgets}/components/custom_scroller.d.ts +3 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/components/custom_scroller.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/components/custom_shimmer.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/components/offer_card.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/components/offer_list_item.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/components/premium_empty_widget.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/components/premium_header.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src/acmo/modules/dashboard → module/src/acmo/modules/premium-widgets}/components/premium_loading.d.ts +1 -1
- package/lib/typescript/module/src/acmo/modules/premium-widgets/components/premium_loading.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/controller.d.ts +14 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/controller.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/{dashboard/top_offers.d.ts → premium-widgets/premium_offers_widget.d.ts} +3 -3
- package/lib/typescript/module/src/acmo/modules/premium-widgets/premium_offers_widget.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.d.ts +9 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/repository.d.ts +13 -0
- package/lib/typescript/module/src/acmo/modules/premium-widgets/repository.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/push-notifications/apns-manager.d.ts +40 -0
- package/lib/typescript/module/src/acmo/modules/push-notifications/apns-manager.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/push-notifications/fcm-manager.d.ts +32 -0
- package/lib/typescript/module/src/acmo/modules/push-notifications/fcm-manager.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo_config.d.ts +1 -0
- package/lib/typescript/module/src/acmo_config.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +5 -11
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +5 -3
- package/readme.md +27 -14
- package/src/acmo/core/components/countdown-timer.tsx +52 -0
- package/src/acmo/core/components/snap-carousel.tsx +106 -0
- package/src/acmo/core/constants/api-endpoints.ts +12 -0
- package/src/acmo/core/helpers/colors.ts +16 -0
- package/src/acmo/core/helpers/logger.ts +11 -0
- package/src/acmo/core/helpers/patches.js +6 -0
- package/src/acmo/core/network/http-client.ts +89 -0
- package/src/acmo/core/network/network-common.ts +128 -0
- package/src/acmo/core/services/localization_service.ts +7 -14
- package/src/acmo/core/types/activated-campaings.d.ts +101 -0
- package/src/acmo/core/types/external_types.ts +7 -1
- package/src/acmo/core/types/types.d.ts +112 -76
- package/src/acmo/core/tyrads-sdk-core.tsx +256 -0
- package/src/acmo/modules/inapp-notifications/components/gradient_card.tsx +87 -0
- package/src/acmo/modules/inapp-notifications/components/modal-wrapper.tsx +59 -0
- package/src/acmo/modules/inapp-notifications/controller.ts +183 -0
- package/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.tsx +164 -0
- package/src/acmo/modules/inapp-notifications/inapp-notification-host.tsx +32 -0
- package/src/acmo/modules/inapp-notifications/inapp-notification-manager.ts +40 -0
- package/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.tsx +188 -0
- package/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.tsx +149 -0
- package/src/acmo/modules/inapp-notifications/repository.ts +49 -0
- package/src/acmo/modules/inapp-notifications/tyrads-global-host.tsx +25 -0
- package/src/acmo/modules/{dashboard → premium-widgets}/components/custom_card.tsx +1 -2
- package/src/acmo/modules/{dashboard → premium-widgets}/components/custom_scroller.tsx +24 -10
- package/src/acmo/modules/{dashboard → premium-widgets}/components/offer_card.tsx +11 -11
- package/src/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.tsx +3 -3
- package/src/acmo/modules/{dashboard → premium-widgets}/components/premium_loading.tsx +1 -1
- package/src/acmo/modules/premium-widgets/controller.ts +39 -0
- package/src/acmo/modules/{dashboard/top_offers.tsx → premium-widgets/premium_offers_widget.tsx} +67 -45
- package/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.tsx +39 -0
- package/src/acmo/modules/premium-widgets/repository.ts +107 -0
- package/src/acmo/modules/push-notifications/apns-manager.ts +254 -0
- package/src/acmo/modules/push-notifications/fcm-manager.ts +162 -0
- package/src/acmo_config.ts +6 -5
- package/src/assets/images/alarm-clock.png +0 -0
- package/src/assets/images/circle-x.png +0 -0
- package/src/assets/images/coin.png +0 -0
- package/src/index.tsx +19 -127
- package/ios/Tyrads/user/AcmoUserUpdatePage.swift +0 -302
- package/ios/Tyrads/user/AcmoUsersUpdateController.swift +0 -26
- package/ios/Tyrads/user/Repository.swift +0 -89
- package/lib/commonjs/acmo/core/helpers/native_methods.js +0 -48
- package/lib/commonjs/acmo/core/helpers/native_methods.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/active_offers_button.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/custom_scroller.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/custom_shimmer.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/offer_card.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/offer_list_item.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/premium_empty_widget.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/premium_loading.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/repository.js +0 -147
- package/lib/commonjs/acmo/modules/dashboard/repository.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/top_offers.js.map +0 -1
- package/lib/module/acmo/core/helpers/native_methods.js +0 -44
- package/lib/module/acmo/core/helpers/native_methods.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/active_offers_button.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/custom_card.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/custom_scroller.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/custom_shimmer.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/offer_card.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/offer_list_item.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/premium_empty_widget.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/premium_header.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/premium_loading.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/repository.js +0 -140
- package/lib/module/acmo/modules/dashboard/repository.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/top_offers.js.map +0 -1
- package/lib/typescript/commonjs/src/acmo/core/helpers/native_methods.d.ts +0 -10
- package/lib/typescript/commonjs/src/acmo/core/helpers/native_methods.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/active_offers_button.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_card.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_scroller.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_shimmer.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_card.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_list_item.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_header.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_loading.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts +0 -3
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/core/helpers/native_methods.d.ts +0 -10
- package/lib/typescript/module/src/acmo/core/helpers/native_methods.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/active_offers_button.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_card.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_scroller.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_shimmer.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_card.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_list_item.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_header.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_loading.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts +0 -3
- package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts.map +0 -1
- package/src/acmo/core/helpers/native_methods.ts +0 -59
- package/src/acmo/modules/dashboard/repository.ts +0 -170
- /package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.js +0 -0
- /package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.js +0 -0
- /package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.js +0 -0
- /package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/premium_header.js +0 -0
- /package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.js +0 -0
- /package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.js +0 -0
- /package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.js +0 -0
- /package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/premium_header.js +0 -0
- /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.d.ts +0 -0
- /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/custom_card.d.ts +0 -0
- /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.d.ts +0 -0
- /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/offer_card.d.ts +0 -0
- /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.d.ts +0 -0
- /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.d.ts +0 -0
- /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/premium_header.d.ts +0 -0
- /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.d.ts +0 -0
- /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/custom_card.d.ts +0 -0
- /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.d.ts +0 -0
- /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/offer_card.d.ts +0 -0
- /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.d.ts +0 -0
- /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.d.ts +0 -0
- /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/premium_header.d.ts +0 -0
- /package/src/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.tsx +0 -0
- /package/src/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.tsx +0 -0
- /package/src/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.tsx +0 -0
- /package/src/acmo/modules/{dashboard → premium-widgets}/components/premium_header.tsx +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
2
2
|
import axios, { type AxiosInstance } from 'axios';
|
|
3
|
+
import TyradsSdkCore from '../tyrads-sdk-core';
|
|
4
|
+
import { AcmoConfig } from '../../../acmo_config';
|
|
3
5
|
|
|
4
|
-
const BASE_URL =
|
|
6
|
+
const BASE_URL = `https://api.tyrads.com/v${AcmoConfig.API_VERSION}/`;
|
|
5
7
|
|
|
6
8
|
interface TranslationResponse {
|
|
7
9
|
data: Array<{
|
|
@@ -31,23 +33,14 @@ class LocalizationService {
|
|
|
31
33
|
return LocalizationService.instance;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
|
-
private static async getHeadersFromStorage(): Promise<Record<string, string>> {
|
|
35
|
-
try {
|
|
36
|
-
const data = await AsyncStorage.getItem('credentials');
|
|
37
|
-
return data ? JSON.parse(data) : {};
|
|
38
|
-
} catch (error) {
|
|
39
|
-
console.error('Failed to retrieve headers from AsyncStorage', error);
|
|
40
|
-
return {};
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
36
|
|
|
45
37
|
public async init(locale: string): Promise<void> {
|
|
46
38
|
if (this.axios) {
|
|
47
39
|
return;
|
|
48
40
|
}
|
|
49
41
|
|
|
50
|
-
const
|
|
42
|
+
const apiKey = TyradsSdkCore.apiKey;
|
|
43
|
+
const apiSecret = TyradsSdkCore.apiSecret;
|
|
51
44
|
|
|
52
45
|
this.axios = axios.create({
|
|
53
46
|
baseURL: BASE_URL,
|
|
@@ -55,8 +48,8 @@ class LocalizationService {
|
|
|
55
48
|
headers: {
|
|
56
49
|
'Content-Type': 'application/json',
|
|
57
50
|
Accept: 'application/json',
|
|
58
|
-
"X-API-Key":
|
|
59
|
-
"X-API-Secret":
|
|
51
|
+
"X-API-Key": apiKey,
|
|
52
|
+
"X-API-Secret": apiSecret,
|
|
60
53
|
}
|
|
61
54
|
});
|
|
62
55
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
interface ActivatedCampaignsResponse {
|
|
2
|
+
data: ActivatedCampaignsData[];
|
|
3
|
+
message: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
interface ActivatedCampaignsData {
|
|
7
|
+
groupName: string;
|
|
8
|
+
availableCurrencies: { [key: string]: AvailableCurrency };
|
|
9
|
+
campaigns: ActivatedCampaign[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface AvailableCurrency {
|
|
13
|
+
currencyId: number;
|
|
14
|
+
currencyIcon: string;
|
|
15
|
+
currencyName: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface ActivatedCampaign {
|
|
19
|
+
campaignId: number;
|
|
20
|
+
campaignName: string;
|
|
21
|
+
campaignDescription: null | string;
|
|
22
|
+
campaignType: string;
|
|
23
|
+
campaignPremium: boolean;
|
|
24
|
+
validity: {
|
|
25
|
+
isRetryDownload: boolean;
|
|
26
|
+
isActivated: boolean;
|
|
27
|
+
isOldUser: boolean;
|
|
28
|
+
activeCurrencyId: number;
|
|
29
|
+
expiredOn: string | null;
|
|
30
|
+
expiredInSeconds: number | null;
|
|
31
|
+
isInstalled: boolean;
|
|
32
|
+
capReached: boolean;
|
|
33
|
+
};
|
|
34
|
+
availableCurrencies: { [key: string]: AvailableCurrency };
|
|
35
|
+
app: App;
|
|
36
|
+
campaignStatus: string;
|
|
37
|
+
group: null | string;
|
|
38
|
+
stage: null | string;
|
|
39
|
+
eventSummary: CampaignEventSummary;
|
|
40
|
+
limitedTimeEvents: LimitedTimeEvent[];
|
|
41
|
+
shorterMaxTimeEvents: any[];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface App {
|
|
45
|
+
id: number;
|
|
46
|
+
title: string;
|
|
47
|
+
packageName: string;
|
|
48
|
+
rating: number;
|
|
49
|
+
shortDescription: string;
|
|
50
|
+
store: string;
|
|
51
|
+
storeCategory: string;
|
|
52
|
+
previewUrl: string;
|
|
53
|
+
thumbnail: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface CampaignEventSummary {
|
|
57
|
+
playableEventCountAvailable: number;
|
|
58
|
+
playableEventCountCompleted: number;
|
|
59
|
+
playableEventCountTotal: number;
|
|
60
|
+
microchargeEventCountAvailable: number;
|
|
61
|
+
microchargeEventCountCompleted: number;
|
|
62
|
+
microchargeEventCountTotal: number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface LimitedTimeEvent {
|
|
66
|
+
appEventId: number;
|
|
67
|
+
conversionStatus: null | string;
|
|
68
|
+
identifier: string;
|
|
69
|
+
eventName: string;
|
|
70
|
+
eventDescription: null | string;
|
|
71
|
+
eventCategory: string;
|
|
72
|
+
payoutInfo: { [key: string]: PayoutInfo };
|
|
73
|
+
allowDuplicateEvents: boolean;
|
|
74
|
+
maxTime: number;
|
|
75
|
+
maxTimeMetric: null | string;
|
|
76
|
+
maxTimeRemainSeconds: null | number;
|
|
77
|
+
enforceMaxTimeCompletion: boolean;
|
|
78
|
+
isLimitedTimeEvent: boolean;
|
|
79
|
+
limitedTimeEventRemainingSeconds: number;
|
|
80
|
+
isTicketSubmitted: boolean;
|
|
81
|
+
ticketStatus: null | string;
|
|
82
|
+
lockEventRule: null | string;
|
|
83
|
+
hideEventRule: null | string;
|
|
84
|
+
shorterMaxTimeRule: null | string;
|
|
85
|
+
specialCompletionReason: null | string;
|
|
86
|
+
dailyCount: number;
|
|
87
|
+
dailyLimit: null | number;
|
|
88
|
+
count: number;
|
|
89
|
+
limit: null | number;
|
|
90
|
+
totalDailyUniqueCount: number;
|
|
91
|
+
totalDailyUniqueLimit: null | number;
|
|
92
|
+
dailyUniqueTodayExist: boolean;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface PayoutInfo {
|
|
96
|
+
currencyId: number;
|
|
97
|
+
currencyName: string;
|
|
98
|
+
currencyIcon: string;
|
|
99
|
+
currencyConversionRate: number;
|
|
100
|
+
payoutAmountConverted: number;
|
|
101
|
+
}
|
|
@@ -18,5 +18,11 @@ export interface TyradsMediaSourceInfo {
|
|
|
18
18
|
export interface TyradsUserInfo {
|
|
19
19
|
email?: string,
|
|
20
20
|
phoneNumber?: string,
|
|
21
|
-
userGroup?: string
|
|
21
|
+
userGroup?: string,
|
|
22
|
+
age?: number,
|
|
23
|
+
gender?: number,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface TyradsConfig {
|
|
27
|
+
skipInitialPages: boolean | false,
|
|
22
28
|
}
|
|
@@ -1,85 +1,110 @@
|
|
|
1
1
|
|
|
2
|
+
interface AcmoOffersResponseModel {
|
|
3
|
+
code: number;
|
|
4
|
+
data: Campaign[];
|
|
5
|
+
message: string;
|
|
6
|
+
timestamp: number;
|
|
7
|
+
responseTime: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
2
10
|
interface Campaign {
|
|
3
11
|
campaignId: number;
|
|
4
12
|
campaignName: string;
|
|
5
|
-
campaignDescription:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
campaignDescription: string;
|
|
14
|
+
campaignType: string;
|
|
15
|
+
campaignPremium: boolean;
|
|
16
|
+
campaignStatus: string;
|
|
17
|
+
validity: Validity;
|
|
18
|
+
availableCurrencies: { [key: string]: AvailableCurrency };
|
|
19
|
+
app: App;
|
|
20
|
+
targeting: Targeting;
|
|
21
|
+
payoutSummary: { [key: string]: PayoutSummary };
|
|
22
|
+
tracking: Tracking;
|
|
23
|
+
creative: Creative;
|
|
10
24
|
hasPlaytimeEvents: boolean;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
packageName: string;
|
|
15
|
-
rating: number;
|
|
16
|
-
shortDescription: string;
|
|
17
|
-
store: string;
|
|
18
|
-
storeCategory: string;
|
|
19
|
-
previewUrl: string;
|
|
20
|
-
thumbnail: string;
|
|
21
|
-
confidenceScore: number;
|
|
22
|
-
securityLabel: string;
|
|
23
|
-
};
|
|
24
|
-
currency: {
|
|
25
|
-
name: string;
|
|
26
|
-
symbol: string;
|
|
27
|
-
adUnitName: string;
|
|
28
|
-
adUnitCurrencyName: string;
|
|
29
|
-
adUnitCurrencyConversion: number;
|
|
30
|
-
adUnitCurrencyIcon: string;
|
|
31
|
-
};
|
|
32
|
-
campaignPayout: {
|
|
33
|
-
totalEvents: number;
|
|
34
|
-
totalPayout: number;
|
|
35
|
-
totalPlayablePayout: number;
|
|
36
|
-
totalMicrochargePayout: number;
|
|
37
|
-
totalPayoutConverted: number;
|
|
38
|
-
totalPlayablePayoutConverted: number;
|
|
39
|
-
totalMicrochargePayoutConverted: number;
|
|
40
|
-
};
|
|
41
|
-
tracking: {
|
|
42
|
-
impressionUrl: string;
|
|
43
|
-
clickUrl: string;
|
|
44
|
-
s2sClickUrl: string;
|
|
45
|
-
};
|
|
46
|
-
targeting: {
|
|
47
|
-
os: string;
|
|
48
|
-
targetingType: string;
|
|
49
|
-
reward: {
|
|
50
|
-
rewardDifficulty: string;
|
|
51
|
-
incentRewardDescription: string;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
creative: {
|
|
55
|
-
creativeUrl: string;
|
|
56
|
-
creativePacks: {
|
|
57
|
-
creativePackId: null | number;
|
|
58
|
-
creativePackName: string;
|
|
59
|
-
languageName: string;
|
|
60
|
-
languageCode: string;
|
|
61
|
-
creatives: {
|
|
62
|
-
creativeId: null | number;
|
|
63
|
-
creativeName: string;
|
|
64
|
-
callToAction: string;
|
|
65
|
-
text: string;
|
|
66
|
-
byteSize: string;
|
|
67
|
-
fileUrl: string;
|
|
68
|
-
duration: string;
|
|
69
|
-
creativeType: {
|
|
70
|
-
name: string;
|
|
71
|
-
type: string;
|
|
72
|
-
width: string;
|
|
73
|
-
height: string;
|
|
74
|
-
creativeCategoryType: string;
|
|
75
|
-
};
|
|
76
|
-
}[];
|
|
77
|
-
}[];
|
|
78
|
-
};
|
|
79
|
-
isInstalled: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface Validity {
|
|
80
28
|
isRetryDownload: boolean;
|
|
81
|
-
|
|
82
|
-
|
|
29
|
+
isActivated: boolean;
|
|
30
|
+
isOldUser: boolean;
|
|
31
|
+
expiredOn: string | null;
|
|
32
|
+
expiredInSeconds: number | null;
|
|
33
|
+
isInstalled: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface AvailableCurrency {
|
|
37
|
+
currencyId: number;
|
|
38
|
+
currencyIcon: string;
|
|
39
|
+
currencyName: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface PayoutSummary {
|
|
43
|
+
totalPayoutConverted: number;
|
|
44
|
+
totalPlayablePayoutConverted: number;
|
|
45
|
+
totalMicrochargePayoutConverted: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface Creative {
|
|
49
|
+
creativeUrl: string;
|
|
50
|
+
creativePacks: CreativePack[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface CreativePack {
|
|
54
|
+
creativePackId: number;
|
|
55
|
+
creativePackName: string;
|
|
56
|
+
languageName: string;
|
|
57
|
+
languageCode: string;
|
|
58
|
+
creatives: (CreativeElement | null)[];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
interface CreativeElement {
|
|
62
|
+
creativeId: number;
|
|
63
|
+
creativeName: string;
|
|
64
|
+
callToAction: string | null;
|
|
65
|
+
text: string;
|
|
66
|
+
byteSize: string;
|
|
67
|
+
fileUrl: string;
|
|
68
|
+
duration: string | null;
|
|
69
|
+
creativeType: CreativeType;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface CreativeType {
|
|
73
|
+
name: string;
|
|
74
|
+
type: string;
|
|
75
|
+
width: string;
|
|
76
|
+
height: string;
|
|
77
|
+
creativeCategoryType: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface Targeting {
|
|
81
|
+
os: string | null;
|
|
82
|
+
targetingType: string;
|
|
83
|
+
reward: Reward | null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
interface Tracking {
|
|
87
|
+
attributionTool: string | null;
|
|
88
|
+
clickUrl: string | null;
|
|
89
|
+
impressionUrl: string | null;
|
|
90
|
+
s2sClickUrl: string | null;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
interface App {
|
|
94
|
+
id: number;
|
|
95
|
+
title: string;
|
|
96
|
+
packageName: string;
|
|
97
|
+
rating: number;
|
|
98
|
+
previewUrl: string;
|
|
99
|
+
shortDescription: string;
|
|
100
|
+
store: string;
|
|
101
|
+
storeCategory: string;
|
|
102
|
+
thumbnail: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface Reward {
|
|
106
|
+
rewardDifficulty: string;
|
|
107
|
+
incentRewardDescription: string;
|
|
83
108
|
}
|
|
84
109
|
|
|
85
110
|
interface CurrencySales {
|
|
@@ -89,4 +114,15 @@ interface CurrencySales {
|
|
|
89
114
|
dateStart: null | string,
|
|
90
115
|
dateEnd: null | string,
|
|
91
116
|
remainingTimeSeconds: null | number
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
interface ApiHeaders {
|
|
120
|
+
languageCode: string;
|
|
121
|
+
premiumColor: string;
|
|
122
|
+
xUserId: string;
|
|
123
|
+
xApiKey: string;
|
|
124
|
+
xApiSecret: string;
|
|
125
|
+
xSdkPlatform: string;
|
|
126
|
+
xSdkVersion: string;
|
|
127
|
+
userAgent: string;
|
|
92
128
|
}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { NativeEventEmitter, NativeModules, Platform } from "react-native";
|
|
2
|
+
import { AcmoConfig } from "../../acmo_config";
|
|
3
|
+
import type { TyradsConfig, TyradsMediaSourceInfo, TyradsUserInfo } from "./types/external_types";
|
|
4
|
+
import NetworkCommon from "./network/network-common";
|
|
5
|
+
import { FcmManager } from "../modules/push-notifications/fcm-manager";
|
|
6
|
+
import { ApnsManager } from "../modules/push-notifications/apns-manager";
|
|
7
|
+
import { saveData } from "./storage/storage";
|
|
8
|
+
import { changeProviderLanguage, updateProviderLanguage } from "../modules/localization/localization_context";
|
|
9
|
+
import Localization from './services/localization_service';
|
|
10
|
+
import InAppNotificationController from "../modules/inapp-notifications/controller";
|
|
11
|
+
|
|
12
|
+
const LINKING_ERROR =
|
|
13
|
+
`The package 'tyrads-sdk' doesn't seem to be linked. Make sure: \n\n` +
|
|
14
|
+
Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
|
|
15
|
+
'- You rebuilt the app after installing the package\n' +
|
|
16
|
+
'- You are not using Expo Go\n';
|
|
17
|
+
|
|
18
|
+
const TyradsSdk = NativeModules.TyradsSdk
|
|
19
|
+
? NativeModules.TyradsSdk
|
|
20
|
+
: new Proxy(
|
|
21
|
+
{},
|
|
22
|
+
{
|
|
23
|
+
get() {
|
|
24
|
+
throw new Error(LINKING_ERROR);
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export interface PushNotificationEvent {
|
|
30
|
+
type: 'received' | 'clicked' | 'dismissed';
|
|
31
|
+
id?: string;
|
|
32
|
+
data?: any;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type PushNotificationCallback = (event: PushNotificationEvent) => void;
|
|
36
|
+
|
|
37
|
+
export class TyradsSdkCore {
|
|
38
|
+
private static instance: TyradsSdkCore;
|
|
39
|
+
private tyradsEmitter: NativeEventEmitter;
|
|
40
|
+
private languageChangedSubscription: any = null;
|
|
41
|
+
|
|
42
|
+
private constructor() {
|
|
43
|
+
this.tyradsEmitter = new NativeEventEmitter(TyradsSdk);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public static getInstance(): TyradsSdkCore {
|
|
47
|
+
if (!TyradsSdkCore.instance) {
|
|
48
|
+
TyradsSdkCore.instance = new TyradsSdkCore();
|
|
49
|
+
}
|
|
50
|
+
return TyradsSdkCore.instance;
|
|
51
|
+
}
|
|
52
|
+
public userId: string = "";
|
|
53
|
+
public apiKey: string = "";
|
|
54
|
+
public apiSecret: string = "";
|
|
55
|
+
public encKey?: string = "";
|
|
56
|
+
public engagementId?: string = "";
|
|
57
|
+
public placementId?: string = "";
|
|
58
|
+
|
|
59
|
+
public premiumColor?: string;
|
|
60
|
+
public mainColor?: string;
|
|
61
|
+
public currentLanguage: string = "en";
|
|
62
|
+
|
|
63
|
+
public async init(
|
|
64
|
+
apiKey: string,
|
|
65
|
+
apiSecret: string,
|
|
66
|
+
encKey?: string,
|
|
67
|
+
engagementId?: string,
|
|
68
|
+
placementId?: string,
|
|
69
|
+
mediaSourceInfo?: TyradsMediaSourceInfo,
|
|
70
|
+
userInfo?: TyradsUserInfo,
|
|
71
|
+
config?: TyradsConfig,
|
|
72
|
+
) {
|
|
73
|
+
this.setSDKVersion();
|
|
74
|
+
if (mediaSourceInfo) {
|
|
75
|
+
this.setMediaSourceInfo(mediaSourceInfo);
|
|
76
|
+
}
|
|
77
|
+
if (userInfo) {
|
|
78
|
+
this.setUserInfo(userInfo);
|
|
79
|
+
}
|
|
80
|
+
var data;
|
|
81
|
+
if (Platform.OS === 'ios') {
|
|
82
|
+
data = await TyradsSdk.init(apiKey, apiSecret, encKey, engagementId, placementId);
|
|
83
|
+
} else {
|
|
84
|
+
data = await TyradsSdk.init(apiKey, apiSecret, encKey, engagementId, placementId, config);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
this.apiKey = apiKey;
|
|
88
|
+
this.apiSecret = apiSecret;
|
|
89
|
+
this.encKey = encKey;
|
|
90
|
+
this.engagementId = engagementId;
|
|
91
|
+
this.placementId = placementId;
|
|
92
|
+
|
|
93
|
+
try {
|
|
94
|
+
const parsed = typeof data === "string" ? JSON.parse(data) : data;
|
|
95
|
+
if (parsed?.languageCode) {
|
|
96
|
+
this.currentLanguage = parsed.languageCode;
|
|
97
|
+
}
|
|
98
|
+
} catch { }
|
|
99
|
+
|
|
100
|
+
await Localization.getInstance().init(this.currentLanguage);
|
|
101
|
+
await NetworkCommon.getInstance().init();
|
|
102
|
+
|
|
103
|
+
if (Platform.OS === 'android') {
|
|
104
|
+
await FcmManager.getInstance().init().catch(console.error);
|
|
105
|
+
}
|
|
106
|
+
if (Platform.OS === 'ios') {
|
|
107
|
+
await ApnsManager.getInstance().init().catch(console.error);
|
|
108
|
+
}
|
|
109
|
+
TyradsSdk.startObserving();
|
|
110
|
+
this.languageChangedSubscription?.remove();
|
|
111
|
+
this.languageChangedSubscription = this.tyradsEmitter.addListener(
|
|
112
|
+
'LanguageChanged',
|
|
113
|
+
async (lang: string) => {
|
|
114
|
+
console.log('LanguageChanged event from Android SDK:', lang);
|
|
115
|
+
await changeProviderLanguage(lang);
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
await updateProviderLanguage(this.currentLanguage);
|
|
119
|
+
|
|
120
|
+
return data;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
public async loginUser(userId: string) {
|
|
124
|
+
try {
|
|
125
|
+
const data = await TyradsSdk.loginUser(userId);
|
|
126
|
+
if (typeof data === "object") {
|
|
127
|
+
await saveData('xUserId', data.xUserId);
|
|
128
|
+
this.userId = data.xUserId;
|
|
129
|
+
this.currentLanguage = data.currentLanguage;
|
|
130
|
+
this.premiumColor = data.premiumColor;
|
|
131
|
+
this.mainColor = data.mainColor;
|
|
132
|
+
} else if (typeof data === "string") {
|
|
133
|
+
await saveData('xUserId', JSON.parse(data).xUserId);
|
|
134
|
+
this.userId = JSON.parse(data).xUserId;
|
|
135
|
+
this.currentLanguage = JSON.parse(data).languageCode;
|
|
136
|
+
this.premiumColor = JSON.parse(data).premiumColor;
|
|
137
|
+
this.mainColor = JSON.parse(data).mainColor;
|
|
138
|
+
}
|
|
139
|
+
await NetworkCommon.getInstance().init();
|
|
140
|
+
if (Platform.OS === 'android') {
|
|
141
|
+
FcmManager.getInstance().setLoggedIn(true);
|
|
142
|
+
} else {
|
|
143
|
+
ApnsManager.getInstance().setLoggedIn(true);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
InAppNotificationController.getInstance().init().catch(err => console.error("In-app notification init error:", err));
|
|
147
|
+
|
|
148
|
+
return data;
|
|
149
|
+
} catch (err) {
|
|
150
|
+
console.error('Error logging in user:', err);
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
public async showOffers({
|
|
156
|
+
launchMode = 3,
|
|
157
|
+
route,
|
|
158
|
+
campaignID,
|
|
159
|
+
}: { launchMode?: number; route?: string; campaignID?: number | null } = {}) {
|
|
160
|
+
if (Platform.OS === 'ios') {
|
|
161
|
+
if (campaignID == null) {
|
|
162
|
+
return await TyradsSdk.showOffers(launchMode, route);
|
|
163
|
+
}
|
|
164
|
+
return await TyradsSdk.showOfferDetails(launchMode, route, campaignID);
|
|
165
|
+
} else {
|
|
166
|
+
if (campaignID == null) {
|
|
167
|
+
return await TyradsSdk.showOffers(route);
|
|
168
|
+
}
|
|
169
|
+
return await TyradsSdk.showOfferDetails(route, campaignID);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
public async changeLanguage(lang: string) {
|
|
174
|
+
return await TyradsSdk.changeLanguage(lang);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
public async preloadOffers(route?: string) {
|
|
178
|
+
if (Platform.OS !== 'ios') return;
|
|
179
|
+
try {
|
|
180
|
+
await TyradsSdk.preloadOffers(route || null);
|
|
181
|
+
} catch (err) {
|
|
182
|
+
console.error("Error preloading offers:", err);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
public setSDKVersion() {
|
|
187
|
+
const version = AcmoConfig.SDK_VERSION;
|
|
188
|
+
TyradsSdk.setSDKVersion(version);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
public setMediaSourceInfo(mediaSourceInfo: TyradsMediaSourceInfo) {
|
|
192
|
+
TyradsSdk.setMediaSourceInfo(mediaSourceInfo);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
public setUserInfo(userInfo: TyradsUserInfo) {
|
|
196
|
+
TyradsSdk.setUserInfo(userInfo);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
public async isPrivacyAccepted() {
|
|
201
|
+
try {
|
|
202
|
+
return await TyradsSdk.isPrivacyAccepted();
|
|
203
|
+
} catch (err) {
|
|
204
|
+
console.error("Error checking privacy acceptance:", err);
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
public async checkOnboardingProcess() {
|
|
210
|
+
try {
|
|
211
|
+
const result = await TyradsSdk.checkOnboardingProcess();
|
|
212
|
+
return result === true;
|
|
213
|
+
} catch (err) {
|
|
214
|
+
console.error("Error showing privacy flow:", err);
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
public async requestPushPermission(): Promise<boolean> {
|
|
220
|
+
try {
|
|
221
|
+
const granted = await TyradsSdk.pushRequestPermission();
|
|
222
|
+
return granted === true;
|
|
223
|
+
} catch (err) {
|
|
224
|
+
console.error("Error requesting push permission:", err);
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
public async getApnsToken(): Promise<string | null> {
|
|
230
|
+
try {
|
|
231
|
+
const token = await TyradsSdk.pushGetApnsToken();
|
|
232
|
+
return token || null;
|
|
233
|
+
} catch (err) {
|
|
234
|
+
console.error("Error getting APNs token:", err);
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
public addPushNotificationListener(callback: PushNotificationCallback) {
|
|
240
|
+
return this.tyradsEmitter.addListener('PushNotificationEvent', callback);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
public startObserving() {
|
|
244
|
+
TyradsSdk.startObserving();
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
public stopObserving() {
|
|
248
|
+
TyradsSdk.stopObserving();
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
public dismissInAppNotification() {
|
|
252
|
+
TyradsSdk.dismissInAppNotification();
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export default TyradsSdkCore.getInstance();
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Pressable, StyleSheet, Image } from 'react-native';
|
|
3
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
4
|
+
import { TyradsSdkCore } from '../../../core/tyrads-sdk-core';
|
|
5
|
+
|
|
6
|
+
interface CardGradientProps {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
gradientColors?: (string | number)[];
|
|
10
|
+
gradientStart?: { x: number; y: number };
|
|
11
|
+
gradientEnd?: { x: number; y: number };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const CardGradient: React.FC<CardGradientProps> = ({
|
|
15
|
+
children,
|
|
16
|
+
onClose,
|
|
17
|
+
gradientColors = (['#ffffff', '#02B5BE'] as (string | number)[]),
|
|
18
|
+
gradientStart = { x: 0.5, y: 0.25 },
|
|
19
|
+
gradientEnd = { x: 0.5, y: 1.2 },
|
|
20
|
+
}) => {
|
|
21
|
+
const mainColor = TyradsSdkCore.getInstance().mainColor;
|
|
22
|
+
const colors = mainColor ? (['#ffffff', mainColor] as string[]) : gradientColors;
|
|
23
|
+
return (
|
|
24
|
+
<View style={styles.wrapper}>
|
|
25
|
+
<View style={styles.topLeftIcon}>
|
|
26
|
+
<Image
|
|
27
|
+
source={require('../../../../assets/images/coin.png')}
|
|
28
|
+
style={{
|
|
29
|
+
width: 110,
|
|
30
|
+
height: 110,
|
|
31
|
+
}}
|
|
32
|
+
/>
|
|
33
|
+
</View>
|
|
34
|
+
<LinearGradient
|
|
35
|
+
colors={colors}
|
|
36
|
+
start={gradientStart}
|
|
37
|
+
end={gradientEnd}
|
|
38
|
+
style={styles.gradientCard}
|
|
39
|
+
>
|
|
40
|
+
<Pressable style={styles.closeButton} onPress={onClose}>
|
|
41
|
+
<Image
|
|
42
|
+
source={require('../../../../assets/images/circle-x.png')}
|
|
43
|
+
style={styles.closeIcon}
|
|
44
|
+
/>
|
|
45
|
+
</Pressable>
|
|
46
|
+
{children && <View style={styles.content}>{children}</View>}
|
|
47
|
+
</LinearGradient>
|
|
48
|
+
</View>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const styles = StyleSheet.create({
|
|
53
|
+
wrapper: {
|
|
54
|
+
position: 'relative',
|
|
55
|
+
width: '90%',
|
|
56
|
+
maxWidth: '90%',
|
|
57
|
+
},
|
|
58
|
+
gradientCard: {
|
|
59
|
+
borderRadius: 16,
|
|
60
|
+
width: '100%',
|
|
61
|
+
shadowColor: '#000',
|
|
62
|
+
shadowOffset: { width: 0, height: 4 },
|
|
63
|
+
shadowOpacity: 0.25,
|
|
64
|
+
shadowRadius: 8,
|
|
65
|
+
elevation: 10,
|
|
66
|
+
},
|
|
67
|
+
topLeftIcon: {
|
|
68
|
+
position: 'absolute',
|
|
69
|
+
left: 10,
|
|
70
|
+
top: -35,
|
|
71
|
+
zIndex: 10,
|
|
72
|
+
},
|
|
73
|
+
closeButton: {
|
|
74
|
+
position: 'absolute',
|
|
75
|
+
top: 16,
|
|
76
|
+
right: 16,
|
|
77
|
+
zIndex: 10,
|
|
78
|
+
padding: 4,
|
|
79
|
+
},
|
|
80
|
+
closeIcon: {
|
|
81
|
+
width: 24,
|
|
82
|
+
height: 24,
|
|
83
|
+
},
|
|
84
|
+
content: {
|
|
85
|
+
margin: 16,
|
|
86
|
+
},
|
|
87
|
+
});
|