@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
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CurrencySalesNotif = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _modalWrapper = require("../components/modal-wrapper.js");
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _gradient_card = require("../components/gradient_card.js");
|
|
11
|
+
var _countdownTimer = require("../../../core/components/countdown-timer.js");
|
|
12
|
+
var _tyradsSdkCore = _interopRequireWildcard(require("../../../core/tyrads-sdk-core.js"));
|
|
13
|
+
var _controller = _interopRequireDefault(require("../controller.js"));
|
|
14
|
+
var _inappNotificationManager = _interopRequireDefault(require("../inapp-notification-manager.js"));
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
|
+
const CurrencySalesNotif = ({
|
|
19
|
+
useModal = true
|
|
20
|
+
}) => {
|
|
21
|
+
const [visible, setVisible] = (0, _react.useState)(false);
|
|
22
|
+
const [currencySales, setCurrencySales] = (0, _react.useState)(null);
|
|
23
|
+
const controller = _controller.default.getInstance();
|
|
24
|
+
const notificationManager = _inappNotificationManager.default.getInstance();
|
|
25
|
+
(0, _react.useEffect)(() => {
|
|
26
|
+
const updateFromController = () => {
|
|
27
|
+
if (controller.currencySales) {
|
|
28
|
+
setCurrencySales(controller.currencySales);
|
|
29
|
+
} else {
|
|
30
|
+
setCurrencySales(null);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
updateFromController();
|
|
34
|
+
const unsubscribe = controller.addListener(updateFromController);
|
|
35
|
+
return unsubscribe;
|
|
36
|
+
}, []);
|
|
37
|
+
(0, _react.useEffect)(() => {
|
|
38
|
+
const unsubscribe = notificationManager.addListener(() => {
|
|
39
|
+
updateVisibility();
|
|
40
|
+
});
|
|
41
|
+
return unsubscribe;
|
|
42
|
+
}, []);
|
|
43
|
+
(0, _react.useEffect)(() => {
|
|
44
|
+
if (currencySales) {
|
|
45
|
+
notificationManager.setCurrencySalesVisible(true);
|
|
46
|
+
updateVisibility();
|
|
47
|
+
} else {
|
|
48
|
+
notificationManager.setCurrencySalesVisible(false);
|
|
49
|
+
}
|
|
50
|
+
}, [currencySales]);
|
|
51
|
+
const updateVisibility = () => {
|
|
52
|
+
const shouldShow = notificationManager.shouldShowCurrencySales();
|
|
53
|
+
setVisible(shouldShow);
|
|
54
|
+
if (shouldShow) {
|
|
55
|
+
controller.markCurrencySalesAsShown();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const handleClose = () => {
|
|
59
|
+
setVisible(false);
|
|
60
|
+
notificationManager.setCurrencySalesVisible(false);
|
|
61
|
+
if (!useModal) {
|
|
62
|
+
_tyradsSdkCore.default.dismissInAppNotification();
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const handleButtonPress = () => {
|
|
66
|
+
handleClose();
|
|
67
|
+
setTimeout(() => {
|
|
68
|
+
_tyradsSdkCore.default.showOffers({
|
|
69
|
+
launchMode: 2
|
|
70
|
+
});
|
|
71
|
+
}, 400);
|
|
72
|
+
};
|
|
73
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_modalWrapper.CardAlert, {
|
|
74
|
+
visible: visible,
|
|
75
|
+
onClose: handleClose,
|
|
76
|
+
useModal: useModal,
|
|
77
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_gradient_card.CardGradient, {
|
|
78
|
+
onClose: handleClose,
|
|
79
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
80
|
+
style: styles.title,
|
|
81
|
+
children: "Bonus Rewards \nUnlocked!"
|
|
82
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
83
|
+
style: styles.horizontalLine
|
|
84
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
85
|
+
style: styles.subtitle,
|
|
86
|
+
children: `You get ${currencySales?.multiplier}X bonus rewards!`
|
|
87
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
88
|
+
style: styles.text,
|
|
89
|
+
children: "Go to offerwall and activate new offer!"
|
|
90
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
91
|
+
style: styles.timerContainer,
|
|
92
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
93
|
+
style: styles.timerMessage,
|
|
94
|
+
children: "Bonus Expires in "
|
|
95
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_countdownTimer.CountdownTimer, {
|
|
96
|
+
style: styles.timer,
|
|
97
|
+
duration: currencySales?.remainingTimeSeconds ?? 0
|
|
98
|
+
})]
|
|
99
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
100
|
+
style: [styles.outlinedButton, {
|
|
101
|
+
borderColor: _tyradsSdkCore.TyradsSdkCore.getInstance().mainColor || "#02B5BE",
|
|
102
|
+
backgroundColor: "white"
|
|
103
|
+
}],
|
|
104
|
+
onPress: handleButtonPress,
|
|
105
|
+
activeOpacity: 0.8,
|
|
106
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
107
|
+
style: styles.outlinedButtonTextContainer,
|
|
108
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
109
|
+
style: [styles.outlinedButtonText, {
|
|
110
|
+
color: _tyradsSdkCore.TyradsSdkCore.getInstance().mainColor || "#02B5BE"
|
|
111
|
+
}],
|
|
112
|
+
children: "Go to Offerwall"
|
|
113
|
+
})
|
|
114
|
+
})
|
|
115
|
+
})]
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
exports.CurrencySalesNotif = CurrencySalesNotif;
|
|
120
|
+
const styles = _reactNative.StyleSheet.create({
|
|
121
|
+
title: {
|
|
122
|
+
fontSize: 16,
|
|
123
|
+
fontWeight: '700',
|
|
124
|
+
color: '#1E2020',
|
|
125
|
+
textAlign: 'center',
|
|
126
|
+
marginTop: 20
|
|
127
|
+
},
|
|
128
|
+
horizontalLine: {
|
|
129
|
+
width: '100%',
|
|
130
|
+
borderBottomColor: '#E0E2E7',
|
|
131
|
+
borderBottomWidth: 1,
|
|
132
|
+
marginVertical: 16
|
|
133
|
+
},
|
|
134
|
+
subtitle: {
|
|
135
|
+
fontSize: 12,
|
|
136
|
+
fontWeight: '700',
|
|
137
|
+
color: '#1E2020',
|
|
138
|
+
textAlign: 'center'
|
|
139
|
+
},
|
|
140
|
+
text: {
|
|
141
|
+
fontSize: 12,
|
|
142
|
+
fontWeight: '400',
|
|
143
|
+
color: '#1E2020',
|
|
144
|
+
textAlign: 'center',
|
|
145
|
+
marginBottom: 16
|
|
146
|
+
},
|
|
147
|
+
timerContainer: {
|
|
148
|
+
flexDirection: 'row',
|
|
149
|
+
justifyContent: 'center',
|
|
150
|
+
alignItems: 'center',
|
|
151
|
+
marginBottom: 16,
|
|
152
|
+
backgroundColor: "#FF554A",
|
|
153
|
+
paddingVertical: 4,
|
|
154
|
+
borderRadius: 20
|
|
155
|
+
},
|
|
156
|
+
timer: {
|
|
157
|
+
fontSize: 12,
|
|
158
|
+
fontWeight: '700',
|
|
159
|
+
color: '#FFFFFF'
|
|
160
|
+
},
|
|
161
|
+
timerMessage: {
|
|
162
|
+
fontSize: 12,
|
|
163
|
+
fontWeight: '700',
|
|
164
|
+
color: '#FFFFFF',
|
|
165
|
+
marginLeft: 8
|
|
166
|
+
},
|
|
167
|
+
outlinedButton: {
|
|
168
|
+
borderWidth: 2,
|
|
169
|
+
borderRadius: 30,
|
|
170
|
+
justifyContent: 'center',
|
|
171
|
+
height: 42
|
|
172
|
+
},
|
|
173
|
+
outlinedButtonTextContainer: {
|
|
174
|
+
justifyContent: 'center',
|
|
175
|
+
alignItems: 'center'
|
|
176
|
+
},
|
|
177
|
+
outlinedButtonText: {
|
|
178
|
+
color: '#02B5BE',
|
|
179
|
+
fontSize: 14,
|
|
180
|
+
fontWeight: '600'
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
//# sourceMappingURL=currency-sales-notif.js.map
|
package/lib/commonjs/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_modalWrapper","_react","_gradient_card","_countdownTimer","_tyradsSdkCore","_interopRequireWildcard","_controller","_interopRequireDefault","_inappNotificationManager","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CurrencySalesNotif","useModal","visible","setVisible","useState","currencySales","setCurrencySales","controller","InAppNotificationController","getInstance","notificationManager","NotificationManager","useEffect","updateFromController","unsubscribe","addListener","updateVisibility","setCurrencySalesVisible","shouldShow","shouldShowCurrencySales","markCurrencySalesAsShown","handleClose","TyradsSdkCoreMethods","dismissInAppNotification","handleButtonPress","setTimeout","showOffers","launchMode","jsx","CardAlert","onClose","children","jsxs","CardGradient","Text","style","styles","title","View","horizontalLine","subtitle","multiplier","text","timerContainer","timerMessage","CountdownTimer","timer","duration","remainingTimeSeconds","TouchableOpacity","outlinedButton","borderColor","TyradsSdkCore","mainColor","backgroundColor","onPress","activeOpacity","outlinedButtonTextContainer","outlinedButtonText","color","exports","StyleSheet","create","fontSize","fontWeight","textAlign","marginTop","width","borderBottomColor","borderBottomWidth","marginVertical","marginBottom","flexDirection","justifyContent","alignItems","paddingVertical","borderRadius","marginLeft","borderWidth","height"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAC,uBAAA,CAAAN,OAAA;AACA,IAAAO,WAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,yBAAA,GAAAD,sBAAA,CAAAR,OAAA;AAAgE,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAQ,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAK,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC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UAAU,EAAE,KAAK;IACjBL,KAAK,EAAE,SAAS;IAChBM,SAAS,EAAE;EACb,CAAC;EACDvB,IAAI,EAAE;IACJqB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBL,KAAK,EAAE,SAAS;IAChBM,SAAS,EAAE,QAAQ;IACnBM,YAAY,EAAE;EAChB,CAAC;EACD5B,cAAc,EAAE;IACd6B,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBH,YAAY,EAAE,EAAE;IAChBjB,eAAe,EAAE,SAAS;IAC1BqB,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE;EAChB,CAAC;EACD9B,KAAK,EAAE;IACLiB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBL,KAAK,EAAE;EACT,CAAC;EACDf,YAAY,EAAE;IACZmB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBL,KAAK,EAAE,SAAS;IAChBkB,UAAU,EAAE;EACd,CAAC;EACD3B,cAAc,EAAE;IACd4B,WAAW,EAAE,CAAC;IACdF,YAAY,EAAE,EAAE;IAChBH,cAAc,EAAE,QAAQ;IACxBM,MAAM,EAAE;EACV,CAAC;EACDtB,2BAA2B,EAAE;IAC3BgB,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDhB,kBAAkB,EAAE;IAClBC,KAAK,EAAE,SAAS;IAChBI,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _currencySalesNotif = require("./currency-sales/currency-sales-notif.js");
|
|
9
|
+
var _limitedTimeNotif = require("./limited-time-offer/limited-time-notif.js");
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _controller = _interopRequireDefault(require("./controller.js"));
|
|
12
|
+
var _tyradsSdkCore = _interopRequireDefault(require("../../core/tyrads-sdk-core.js"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
const InAppNotificationHost = ({
|
|
16
|
+
useModal = true,
|
|
17
|
+
style
|
|
18
|
+
}) => {
|
|
19
|
+
(0, _react.useEffect)(() => {
|
|
20
|
+
const initializeInAppNotifications = async () => {
|
|
21
|
+
if (_tyradsSdkCore.default.apiKey) {
|
|
22
|
+
await _controller.default.getInstance().init();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
initializeInAppNotifications();
|
|
26
|
+
}, []);
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
28
|
+
style: style,
|
|
29
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_currencySalesNotif.CurrencySalesNotif, {
|
|
30
|
+
useModal: useModal
|
|
31
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_limitedTimeNotif.LimitedTimeEventsNotif, {
|
|
32
|
+
useModal: useModal
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var _default = exports.default = InAppNotificationHost;
|
|
37
|
+
//# sourceMappingURL=inapp-notification-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_currencySalesNotif","_limitedTimeNotif","_react","_controller","_interopRequireDefault","_tyradsSdkCore","_jsxRuntime","e","__esModule","default","InAppNotificationHost","useModal","style","useEffect","initializeInAppNotifications","TyradsSdkCoreMethods","apiKey","InAppNotificationController","getInstance","init","jsxs","View","children","jsx","CurrencySalesNotif","LimitedTimeEventsNotif","_default","exports"],"sourceRoot":"../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
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
class NotificationManager {
|
|
8
|
+
limitedTimeVisible = false;
|
|
9
|
+
currencySalesVisible = false;
|
|
10
|
+
listeners = [];
|
|
11
|
+
static getInstance() {
|
|
12
|
+
if (!NotificationManager.instance) {
|
|
13
|
+
NotificationManager.instance = new NotificationManager();
|
|
14
|
+
}
|
|
15
|
+
return NotificationManager.instance;
|
|
16
|
+
}
|
|
17
|
+
setLimitedTimeVisible(visible) {
|
|
18
|
+
this.limitedTimeVisible = visible;
|
|
19
|
+
this.notifyListeners();
|
|
20
|
+
}
|
|
21
|
+
setCurrencySalesVisible(visible) {
|
|
22
|
+
this.currencySalesVisible = visible;
|
|
23
|
+
this.notifyListeners();
|
|
24
|
+
}
|
|
25
|
+
shouldShowCurrencySales() {
|
|
26
|
+
return this.currencySalesVisible && !this.limitedTimeVisible;
|
|
27
|
+
}
|
|
28
|
+
addListener(listener) {
|
|
29
|
+
this.listeners.push(listener);
|
|
30
|
+
return () => {
|
|
31
|
+
this.listeners = this.listeners.filter(l => l !== listener);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
notifyListeners() {
|
|
35
|
+
this.listeners.forEach(listener => listener());
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
var _default = exports.default = NotificationManager;
|
|
39
|
+
//# sourceMappingURL=inapp-notification-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NotificationManager","limitedTimeVisible","currencySalesVisible","listeners","getInstance","instance","setLimitedTimeVisible","visible","notifyListeners","setCurrencySalesVisible","shouldShowCurrencySales","addListener","listener","push","filter","l","forEach","_default","exports","default"],"sourceRoot":"../../../../../src","sources":["acmo/modules/inapp-notifications/inapp-notification-manager.ts"],"mappings":";;;;;;AAAA,MAAMA,mBAAmB,CAAC;EAEhBC,kBAAkB,GAAG,KAAK;EAC1BC,oBAAoB,GAAG,KAAK;EAC5BC,SAAS,GAAsB,EAAE;EAEzC,OAAOC,WAAWA,CAAA,EAAwB;IACxC,IAAI,CAACJ,mBAAmB,CAACK,QAAQ,EAAE;MACjCL,mBAAmB,CAACK,QAAQ,GAAG,IAAIL,mBAAmB,CAAC,CAAC;IAC1D;IACA,OAAOA,mBAAmB,CAACK,QAAQ;EACrC;EAEAC,qBAAqBA,CAACC,OAAgB,EAAE;IACtC,IAAI,CAACN,kBAAkB,GAAGM,OAAO;IACjC,IAAI,CAACC,eAAe,CAAC,CAAC;EACxB;EAEAC,uBAAuBA,CAACF,OAAgB,EAAE;IACxC,IAAI,CAACL,oBAAoB,GAAGK,OAAO;IACnC,IAAI,CAACC,eAAe,CAAC,CAAC;EACxB;EAEAE,uBAAuBA,CAAA,EAAY;IACjC,OAAO,IAAI,CAACR,oBAAoB,IAAI,CAAC,IAAI,CAACD,kBAAkB;EAC9D;EAEAU,WAAWA,CAACC,QAAoB,EAAc;IAC5C,IAAI,CAACT,SAAS,CAACU,IAAI,CAACD,QAAQ,CAAC;IAC7B,OAAO,MAAM;MACX,IAAI,CAACT,SAAS,GAAG,IAAI,CAACA,SAAS,CAACW,MAAM,CAACC,CAAC,IAAIA,CAAC,KAAKH,QAAQ,CAAC;IAC7D,CAAC;EACH;EAEQJ,eAAeA,CAAA,EAAG;IACxB,IAAI,CAACL,SAAS,CAACa,OAAO,CAACJ,QAAQ,IAAIA,QAAQ,CAAC,CAAC,CAAC;EAChD;AACF;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcnB,mBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LimitedTimeOfferCard = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _logger = require("../../../../core/helpers/logger.js");
|
|
10
|
+
var _numeral = require("../../../../core/helpers/numeral.js");
|
|
11
|
+
var _countdownTimer = require("../../../../core/components/countdown-timer.js");
|
|
12
|
+
var _controller = _interopRequireDefault(require("../../controller.js"));
|
|
13
|
+
var _launcher = require("../../../../core/helpers/launcher.js");
|
|
14
|
+
var _tyradsSdkCore = require("../../../../core/tyrads-sdk-core.js");
|
|
15
|
+
var _colors = require("../../../../core/helpers/colors.js");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
const LimitedTimeOfferCard = ({
|
|
19
|
+
activatedCampaign
|
|
20
|
+
}) => {
|
|
21
|
+
const controller = _controller.default.getInstance();
|
|
22
|
+
(0, _react.useEffect)(() => {
|
|
23
|
+
_logger.Logger.log('activatedCampaign in offer card', activatedCampaign);
|
|
24
|
+
});
|
|
25
|
+
const handleButtonPress = link => {
|
|
26
|
+
(0, _launcher.acmoLaunchURL)(link);
|
|
27
|
+
};
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
29
|
+
style: styles.container,
|
|
30
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
31
|
+
source: require('../../../../../assets/images/alarm-clock.png'),
|
|
32
|
+
style: styles.bgImage
|
|
33
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
34
|
+
style: styles.appHeader,
|
|
35
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
36
|
+
source: {
|
|
37
|
+
uri: activatedCampaign?.app.thumbnail
|
|
38
|
+
},
|
|
39
|
+
style: styles.thumbnail
|
|
40
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
41
|
+
style: styles.appName,
|
|
42
|
+
children: activatedCampaign?.app.title
|
|
43
|
+
})]
|
|
44
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
|
|
45
|
+
data: activatedCampaign?.limitedTimeEvents || [],
|
|
46
|
+
keyExtractor: (_, index) => index.toString(),
|
|
47
|
+
renderItem: ({
|
|
48
|
+
item: event,
|
|
49
|
+
index
|
|
50
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
51
|
+
style: styles.eventContainer,
|
|
52
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
53
|
+
style: styles.eventNameContainer,
|
|
54
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
55
|
+
style: styles.eventName,
|
|
56
|
+
children: event.eventName
|
|
57
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
58
|
+
style: styles.eventPayoutRow,
|
|
59
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
60
|
+
style: styles.eventCurrencyIcon,
|
|
61
|
+
source: {
|
|
62
|
+
uri: Object.values(activatedCampaign?.availableCurrencies || {})[0]?.currencyIcon
|
|
63
|
+
}
|
|
64
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
65
|
+
style: [styles.eventPayout, {
|
|
66
|
+
color: _tyradsSdkCore.TyradsSdkCore.getInstance().mainColor || '#02B5BE'
|
|
67
|
+
}],
|
|
68
|
+
children: (0, _numeral.numeral)(Object.values(event.payoutInfo || {})[0]?.payoutAmountConverted ?? 0)
|
|
69
|
+
})]
|
|
70
|
+
})]
|
|
71
|
+
}), !controller.showCountdown(event) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
72
|
+
style: [styles.eventStatus, {
|
|
73
|
+
color: event.conversionStatus == 'approved' ? '#A3A9B6' : '#FF554A'
|
|
74
|
+
}],
|
|
75
|
+
children: controller.getFinalStatusString(event)
|
|
76
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
77
|
+
style: styles.timerContainer,
|
|
78
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_countdownTimer.CountdownTimer, {
|
|
79
|
+
style: styles.timer,
|
|
80
|
+
duration: event.limitedTimeEventRemainingSeconds
|
|
81
|
+
})
|
|
82
|
+
})]
|
|
83
|
+
}, index),
|
|
84
|
+
style: styles.eventsContainer,
|
|
85
|
+
showsVerticalScrollIndicator: false,
|
|
86
|
+
nestedScrollEnabled: true
|
|
87
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
88
|
+
style: [styles.filledButton, {
|
|
89
|
+
backgroundColor: _tyradsSdkCore.TyradsSdkCore.getInstance().mainColor || "#02B5BE"
|
|
90
|
+
}],
|
|
91
|
+
onPress: () => handleButtonPress(activatedCampaign?.app.previewUrl || ''),
|
|
92
|
+
activeOpacity: 0.8,
|
|
93
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
94
|
+
style: [styles.btnText, {
|
|
95
|
+
color: (0, _colors.getContrastColor)(_tyradsSdkCore.TyradsSdkCore.getInstance().mainColor || "white")
|
|
96
|
+
}],
|
|
97
|
+
children: "Play Now"
|
|
98
|
+
})
|
|
99
|
+
})]
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
exports.LimitedTimeOfferCard = LimitedTimeOfferCard;
|
|
103
|
+
const styles = _reactNative.StyleSheet.create({
|
|
104
|
+
container: {
|
|
105
|
+
position: 'relative',
|
|
106
|
+
borderRadius: 16,
|
|
107
|
+
width: '100%',
|
|
108
|
+
maxWidth: '100%',
|
|
109
|
+
height: 378,
|
|
110
|
+
padding: 16,
|
|
111
|
+
backgroundColor: '#FFF9ED',
|
|
112
|
+
overflow: 'hidden'
|
|
113
|
+
},
|
|
114
|
+
bgImage: {
|
|
115
|
+
position: 'absolute',
|
|
116
|
+
right: 0,
|
|
117
|
+
bottom: 0
|
|
118
|
+
},
|
|
119
|
+
thumbnail: {
|
|
120
|
+
width: 43,
|
|
121
|
+
height: 43,
|
|
122
|
+
borderRadius: 7,
|
|
123
|
+
marginRight: 13
|
|
124
|
+
},
|
|
125
|
+
appHeader: {
|
|
126
|
+
flexDirection: 'row',
|
|
127
|
+
alignItems: 'center',
|
|
128
|
+
marginBottom: 16
|
|
129
|
+
},
|
|
130
|
+
appName: {
|
|
131
|
+
width: '75%',
|
|
132
|
+
fontSize: 12,
|
|
133
|
+
fontWeight: '600',
|
|
134
|
+
color: '#1E2020',
|
|
135
|
+
marginRight: 16
|
|
136
|
+
},
|
|
137
|
+
eventsContainer: {
|
|
138
|
+
maxHeight: 350
|
|
139
|
+
},
|
|
140
|
+
eventContainer: {
|
|
141
|
+
flexDirection: 'row',
|
|
142
|
+
backgroundColor: 'white',
|
|
143
|
+
paddingVertical: 8,
|
|
144
|
+
paddingHorizontal: 16,
|
|
145
|
+
alignItems: 'center',
|
|
146
|
+
justifyContent: 'space-between',
|
|
147
|
+
borderRadius: 8,
|
|
148
|
+
marginBottom: 16,
|
|
149
|
+
shadowColor: '#000',
|
|
150
|
+
shadowOffset: {
|
|
151
|
+
width: 0,
|
|
152
|
+
height: 8
|
|
153
|
+
},
|
|
154
|
+
shadowOpacity: 0.06,
|
|
155
|
+
shadowRadius: 10
|
|
156
|
+
},
|
|
157
|
+
eventNameContainer: {
|
|
158
|
+
width: '58%',
|
|
159
|
+
marginRight: 8
|
|
160
|
+
},
|
|
161
|
+
eventName: {
|
|
162
|
+
fontSize: 12,
|
|
163
|
+
color: '#1E2020'
|
|
164
|
+
},
|
|
165
|
+
eventPayoutRow: {
|
|
166
|
+
flexDirection: 'row',
|
|
167
|
+
alignItems: 'center',
|
|
168
|
+
marginTop: 4
|
|
169
|
+
},
|
|
170
|
+
eventCurrencyIcon: {
|
|
171
|
+
width: 12,
|
|
172
|
+
height: 12,
|
|
173
|
+
marginRight: 4,
|
|
174
|
+
resizeMode: 'contain'
|
|
175
|
+
},
|
|
176
|
+
eventPayout: {
|
|
177
|
+
fontSize: 12,
|
|
178
|
+
fontWeight: '700'
|
|
179
|
+
},
|
|
180
|
+
eventStatus: {
|
|
181
|
+
fontSize: 10,
|
|
182
|
+
fontWeight: '600'
|
|
183
|
+
},
|
|
184
|
+
timerContainer: {
|
|
185
|
+
backgroundColor: '#FF554A',
|
|
186
|
+
paddingVertical: 2,
|
|
187
|
+
paddingHorizontal: 8,
|
|
188
|
+
borderRadius: 10
|
|
189
|
+
},
|
|
190
|
+
timer: {
|
|
191
|
+
fontSize: 12,
|
|
192
|
+
fontWeight: '700',
|
|
193
|
+
color: 'white'
|
|
194
|
+
},
|
|
195
|
+
filledButton: {
|
|
196
|
+
borderRadius: 8,
|
|
197
|
+
paddingVertical: 12,
|
|
198
|
+
alignItems: 'center'
|
|
199
|
+
},
|
|
200
|
+
btnText: {
|
|
201
|
+
fontSize: 12,
|
|
202
|
+
fontWeight: '600',
|
|
203
|
+
color: 'white'
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
//# sourceMappingURL=limited-time-offer-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_logger","_numeral","_countdownTimer","_controller","_interopRequireDefault","_launcher","_tyradsSdkCore","_colors","_jsxRuntime","e","__esModule","default","LimitedTimeOfferCard","activatedCampaign","controller","InAppNotificationController","getInstance","useEffect","Logger","log","handleButtonPress","link","acmoLaunchURL","jsxs","View","style","styles","container","children","jsx","Image","source","bgImage","appHeader","uri","app","thumbnail","Text","appName","title","FlatList","data","limitedTimeEvents","keyExtractor","_","index","toString","renderItem","item","event","eventContainer","eventNameContainer","eventName","eventPayoutRow","eventCurrencyIcon","Object","values","availableCurrencies","currencyIcon","eventPayout","color","TyradsSdkCore","mainColor","numeral","payoutInfo","payoutAmountConverted","showCountdown","eventStatus","conversionStatus","getFinalStatusString","timerContainer","CountdownTimer","timer","duration","limitedTimeEventRemainingSeconds","eventsContainer","showsVerticalScrollIndicator","nestedScrollEnabled","TouchableOpacity","filledButton","backgroundColor","onPress","previewUrl","activeOpacity","btnText","getContrastColor","exports","StyleSheet","create","position","borderRadius","width","maxWidth","height","padding","overflow","right","bottom","marginRight","flexDirection","alignItems","marginBottom","fontSize","fontWeight","maxHeight","paddingVertical","paddingHorizontal","justifyContent","shadowColor","shadowOffset","shadowOpacity","shadowRadius","marginTop","resizeMode"],"sourceRoot":"../../../../../../../src","sources":["acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAAkE,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAM,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE3D,MAAMG,oBAA+E,GAAGA,CAAC;EAAEC;AAAkB,CAAC,KAAK;EAExH,MAAMC,UAAU,GAAGC,mBAA2B,CAACC,WAAW,CAAC,CAAC;EAE5D,IAAAC,gBAAS,EAAC,MAAM;IACdC,cAAM,CAACC,GAAG,CAAC,iCAAiC,EAAEN,iBAAiB,CAAC;EAClE,CAAC,CAAC;EAEF,MAAMO,iBAAiB,GAAIC,IAAY,IAAK;IAC1C,IAAAC,uBAAa,EAACD,IAAI,CAAC;EACrB,CAAC;EAED,oBAAO,IAAAb,WAAA,CAAAe,IAAA,EAACxB,Y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AW,EAAE;EACf,CAAC;EACD9C,SAAS,EAAE;IACTkD,QAAQ,EAAE,EAAE;IACZ1C,KAAK,EAAE;EACT,CAAC;EACDP,cAAc,EAAE;IACd8C,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBY,SAAS,EAAE;EACb,CAAC;EACD1D,iBAAiB,EAAE;IACjBqC,KAAK,EAAE,EAAE;IACTE,MAAM,EAAE,EAAE;IACVK,WAAW,EAAE,CAAC;IACde,UAAU,EAAE;EACd,CAAC;EACDtD,WAAW,EAAE;IACX2C,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDpC,WAAW,EAAE;IACXmC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDjC,cAAc,EAAE;IACdU,eAAe,EAAE,SAAS;IAC1ByB,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE,CAAC;IACpBhB,YAAY,EAAE;EAChB,CAAC;EACDlB,KAAK,EAAE;IACL8B,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjB3C,KAAK,EAAE;EACT,CAAC;EACDmB,YAAY,EAAE;IACZW,YAAY,EAAE,CAAC;IACfe,eAAe,EAAE,EAAE;IACnBL,UAAU,EAAE;EACd,CAAC;EACDhB,OAAO,EAAE;IACPkB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjB3C,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LimitedTimeEventsNotif = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _controller = _interopRequireDefault(require("../controller.js"));
|
|
10
|
+
var _modalWrapper = require("../components/modal-wrapper.js");
|
|
11
|
+
var _gradient_card = require("../components/gradient_card.js");
|
|
12
|
+
var _logger = require("../../../core/helpers/logger.js");
|
|
13
|
+
var _limitedTimeOfferCard = require("./components/limited-time-offer-card.js");
|
|
14
|
+
var _snapCarousel = _interopRequireDefault(require("../../../core/components/snap-carousel.js"));
|
|
15
|
+
var _inappNotificationManager = _interopRequireDefault(require("../inapp-notification-manager.js"));
|
|
16
|
+
var _tyradsSdkCore = _interopRequireDefault(require("../../../core/tyrads-sdk-core.js"));
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
const SCREEN_WIDTH = _reactNative.Dimensions.get('window').width;
|
|
20
|
+
const LimitedTimeEventsNotif = ({
|
|
21
|
+
useModal = true
|
|
22
|
+
}) => {
|
|
23
|
+
const [visible, setVisible] = (0, _react.useState)(false);
|
|
24
|
+
const [limitedTimeEvents, setLimitedTimeEvents] = (0, _react.useState)([]);
|
|
25
|
+
const controller = _controller.default.getInstance();
|
|
26
|
+
const notificationManager = _inappNotificationManager.default.getInstance();
|
|
27
|
+
(0, _react.useEffect)(() => {
|
|
28
|
+
const updateFromController = () => {
|
|
29
|
+
if (controller.limitedTimeEvents) {
|
|
30
|
+
const limitedTimeEventsArray = controller.limitedTimeEvents;
|
|
31
|
+
_logger.Logger.log('limitedTimeEvents', limitedTimeEventsArray);
|
|
32
|
+
setLimitedTimeEvents(limitedTimeEventsArray);
|
|
33
|
+
} else {
|
|
34
|
+
setLimitedTimeEvents(null);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
updateFromController();
|
|
38
|
+
const unsubscribe = controller.addListener(updateFromController);
|
|
39
|
+
return unsubscribe;
|
|
40
|
+
}, []);
|
|
41
|
+
(0, _react.useEffect)(() => {
|
|
42
|
+
const hasEvents = limitedTimeEvents?.length !== undefined && limitedTimeEvents?.length > 0;
|
|
43
|
+
if (hasEvents) {
|
|
44
|
+
notificationManager.setLimitedTimeVisible(true);
|
|
45
|
+
setVisible(true);
|
|
46
|
+
controller.markLimitedTimeOffersAsShown();
|
|
47
|
+
} else {
|
|
48
|
+
notificationManager.setLimitedTimeVisible(false);
|
|
49
|
+
}
|
|
50
|
+
}, [limitedTimeEvents]);
|
|
51
|
+
const handleClose = () => {
|
|
52
|
+
setVisible(false);
|
|
53
|
+
notificationManager.setLimitedTimeVisible(false);
|
|
54
|
+
if (!useModal) {
|
|
55
|
+
_tyradsSdkCore.default.dismissInAppNotification();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_modalWrapper.CardAlert, {
|
|
59
|
+
visible: visible,
|
|
60
|
+
onClose: handleClose,
|
|
61
|
+
useModal: useModal,
|
|
62
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_gradient_card.CardGradient, {
|
|
63
|
+
onClose: handleClose,
|
|
64
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
65
|
+
style: styles.title,
|
|
66
|
+
children: "Limited Time Offer"
|
|
67
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
68
|
+
style: styles.horizontalLine
|
|
69
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
70
|
+
style: styles.text,
|
|
71
|
+
children: "Limited time offer unlocked! Play now and claim extra rewards!"
|
|
72
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_snapCarousel.default, {
|
|
73
|
+
data: limitedTimeEvents,
|
|
74
|
+
renderItem: ({
|
|
75
|
+
item,
|
|
76
|
+
index
|
|
77
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
78
|
+
style: {
|
|
79
|
+
paddingHorizontal: 6
|
|
80
|
+
},
|
|
81
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_limitedTimeOfferCard.LimitedTimeOfferCard, {
|
|
82
|
+
activatedCampaign: item
|
|
83
|
+
})
|
|
84
|
+
}, index),
|
|
85
|
+
sliderWidth: SCREEN_WIDTH * 0.9 - 32,
|
|
86
|
+
itemWidth: limitedTimeEvents?.length == 1 ? SCREEN_WIDTH * 0.82 : SCREEN_WIDTH * 0.65,
|
|
87
|
+
loop: false,
|
|
88
|
+
paginationContainerStyle: {
|
|
89
|
+
marginTop: 16,
|
|
90
|
+
paddingVertical: 0
|
|
91
|
+
},
|
|
92
|
+
autoplay: true
|
|
93
|
+
})]
|
|
94
|
+
})
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
exports.LimitedTimeEventsNotif = LimitedTimeEventsNotif;
|
|
98
|
+
const styles = _reactNative.StyleSheet.create({
|
|
99
|
+
title: {
|
|
100
|
+
fontSize: 16,
|
|
101
|
+
fontWeight: '700',
|
|
102
|
+
color: '#1E2020',
|
|
103
|
+
textAlign: 'center',
|
|
104
|
+
marginTop: 20
|
|
105
|
+
},
|
|
106
|
+
horizontalLine: {
|
|
107
|
+
width: '100%',
|
|
108
|
+
borderBottomColor: '#E0E2E7',
|
|
109
|
+
borderBottomWidth: 1,
|
|
110
|
+
marginVertical: 16
|
|
111
|
+
},
|
|
112
|
+
text: {
|
|
113
|
+
fontSize: 12,
|
|
114
|
+
fontWeight: '400',
|
|
115
|
+
color: '#1E2020',
|
|
116
|
+
textAlign: 'center',
|
|
117
|
+
marginBottom: 16
|
|
118
|
+
},
|
|
119
|
+
timerContainer: {
|
|
120
|
+
flexDirection: 'row',
|
|
121
|
+
justifyContent: 'center',
|
|
122
|
+
alignItems: 'center',
|
|
123
|
+
marginBottom: 16,
|
|
124
|
+
backgroundColor: "#FF554A",
|
|
125
|
+
paddingVertical: 4,
|
|
126
|
+
borderRadius: 20
|
|
127
|
+
},
|
|
128
|
+
timer: {
|
|
129
|
+
fontSize: 12,
|
|
130
|
+
fontWeight: '700',
|
|
131
|
+
color: '#FFFFFF'
|
|
132
|
+
},
|
|
133
|
+
timerMessage: {
|
|
134
|
+
fontSize: 12,
|
|
135
|
+
fontWeight: '700',
|
|
136
|
+
color: '#FFFFFF',
|
|
137
|
+
marginLeft: 8
|
|
138
|
+
},
|
|
139
|
+
outlinedButton: {
|
|
140
|
+
borderWidth: 2,
|
|
141
|
+
borderRadius: 30,
|
|
142
|
+
justifyContent: 'center',
|
|
143
|
+
height: 42
|
|
144
|
+
},
|
|
145
|
+
outlinedButtonTextContainer: {
|
|
146
|
+
justifyContent: 'center',
|
|
147
|
+
alignItems: 'center'
|
|
148
|
+
},
|
|
149
|
+
outlinedButtonText: {
|
|
150
|
+
color: '#02B5BE',
|
|
151
|
+
fontSize: 14,
|
|
152
|
+
fontWeight: '600'
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
//# sourceMappingURL=limited-time-notif.js.map
|