@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,59 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Modal, Pressable, View, StyleSheet } from 'react-native';
|
|
3
|
+
|
|
4
|
+
interface CardAlertProps {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
useModal?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const CardAlert: React.FC<CardAlertProps> = ({
|
|
12
|
+
visible,
|
|
13
|
+
onClose,
|
|
14
|
+
children,
|
|
15
|
+
useModal = true,
|
|
16
|
+
}) => {
|
|
17
|
+
const content = (
|
|
18
|
+
<View style={styles.fullscreen}>
|
|
19
|
+
<Pressable style={styles.overlay} onPress={onClose} />
|
|
20
|
+
<View style={styles.card}>
|
|
21
|
+
{children}
|
|
22
|
+
</View>
|
|
23
|
+
</View>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
if (!useModal) {
|
|
27
|
+
return visible ? content : null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Modal
|
|
32
|
+
animationType="fade"
|
|
33
|
+
transparent={true}
|
|
34
|
+
visible={visible}
|
|
35
|
+
onRequestClose={onClose}
|
|
36
|
+
>
|
|
37
|
+
{content}
|
|
38
|
+
</Modal>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const styles = StyleSheet.create({
|
|
43
|
+
fullscreen: {
|
|
44
|
+
flex: 1,
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
overlay: {
|
|
50
|
+
...StyleSheet.absoluteFillObject,
|
|
51
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
card: {
|
|
55
|
+
width: '100%',
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
zIndex: 10,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import InAppNotificationRepo from "./repository";
|
|
2
|
+
import { getData, saveData } from "../../core/storage/storage";
|
|
3
|
+
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
4
|
+
|
|
5
|
+
class InAppNotificationController {
|
|
6
|
+
private static instance: InAppNotificationController | null = null;
|
|
7
|
+
private constructor() { }
|
|
8
|
+
|
|
9
|
+
public static getInstance(): InAppNotificationController {
|
|
10
|
+
if (!InAppNotificationController.instance) {
|
|
11
|
+
InAppNotificationController.instance = new InAppNotificationController();
|
|
12
|
+
}
|
|
13
|
+
return InAppNotificationController.instance;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public currencySales: CurrencySales | null = null;
|
|
17
|
+
public limitedTimeEvents: Array<ActivatedCampaign> | null = null;
|
|
18
|
+
private listeners: Array<() => void> = [];
|
|
19
|
+
|
|
20
|
+
public addListener(listener: () => void): () => void {
|
|
21
|
+
this.listeners.push(listener);
|
|
22
|
+
return () => {
|
|
23
|
+
this.listeners = this.listeners.filter(l => l !== listener);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
private notifyListeners() {
|
|
28
|
+
this.listeners.forEach(l => l());
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
private async getUserId(): Promise<string> {
|
|
32
|
+
try {
|
|
33
|
+
const userId = await getData<string>('xUserId');
|
|
34
|
+
if (userId) return userId;
|
|
35
|
+
|
|
36
|
+
const data = await AsyncStorage.getItem('apiHeaders');
|
|
37
|
+
if (!data) return 'default';
|
|
38
|
+
const parsed = JSON.parse(data);
|
|
39
|
+
const headers = typeof parsed === 'string' ? JSON.parse(parsed) : parsed;
|
|
40
|
+
return headers['xUserId'] || 'default';
|
|
41
|
+
} catch {
|
|
42
|
+
return 'default';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
private async getCurrencySalesKey(): Promise<string> {
|
|
47
|
+
const userId = await this.getUserId();
|
|
48
|
+
return `currency_sales_shown_${userId}`;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
private async getLimitedTimeOffersKey(): Promise<string> {
|
|
52
|
+
const userId = await this.getUserId();
|
|
53
|
+
return `limited_time_offers_shown_${userId}`;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
private getTodayDateString(): string {
|
|
57
|
+
return new Date().toDateString();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
public async markCurrencySalesAsShown() {
|
|
61
|
+
if (!this.currencySales?.name) return;
|
|
62
|
+
const key = await this.getCurrencySalesKey();
|
|
63
|
+
const shownData = await getData<any>(key) || {};
|
|
64
|
+
const safeShownData = (typeof shownData === 'object' && shownData !== null) ? shownData : {};
|
|
65
|
+
safeShownData[this.currencySales.name] = this.getTodayDateString();
|
|
66
|
+
await saveData(key, safeShownData);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public async markLimitedTimeOffersAsShown() {
|
|
70
|
+
if (!this.limitedTimeEvents) return;
|
|
71
|
+
const key = await this.getLimitedTimeOffersKey();
|
|
72
|
+
const shownData = await getData<any>(key) || {};
|
|
73
|
+
const safeShownData = (typeof shownData === 'object' && shownData !== null) ? shownData : {};
|
|
74
|
+
const today = this.getTodayDateString();
|
|
75
|
+
this.limitedTimeEvents.forEach(campaign => {
|
|
76
|
+
campaign.limitedTimeEvents.forEach(event => {
|
|
77
|
+
safeShownData[event.appEventId.toString()] = today;
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
await saveData(key, safeShownData);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
public async init() {
|
|
84
|
+
const [currencySalesKey, limitedTimeOffersKey] = await Promise.all([
|
|
85
|
+
this.getCurrencySalesKey(),
|
|
86
|
+
this.getLimitedTimeOffersKey(),
|
|
87
|
+
]);
|
|
88
|
+
|
|
89
|
+
const [currencySalesShownData, limitedTimeOffersShownData] = await Promise.all([
|
|
90
|
+
getData<Record<string, string>>(currencySalesKey),
|
|
91
|
+
getData<Record<string, string>>(limitedTimeOffersKey),
|
|
92
|
+
]);
|
|
93
|
+
|
|
94
|
+
const today = this.getTodayDateString();
|
|
95
|
+
|
|
96
|
+
const isCurrencyShownToday = currencySalesShownData && Object.values(currencySalesShownData).includes(today);
|
|
97
|
+
const isLimitedShownToday = limitedTimeOffersShownData && Object.values(limitedTimeOffersShownData).includes(today);
|
|
98
|
+
|
|
99
|
+
const [currencySalesResult, limitedTimeOffersResult] = await Promise.all([
|
|
100
|
+
!isCurrencyShownToday
|
|
101
|
+
? InAppNotificationRepo.getInstance().fetchCurrencySales()
|
|
102
|
+
: Promise.resolve(null),
|
|
103
|
+
!isLimitedShownToday
|
|
104
|
+
? InAppNotificationRepo.getInstance().fetchLimitedTimeOffers()
|
|
105
|
+
: Promise.resolve(null),
|
|
106
|
+
]);
|
|
107
|
+
|
|
108
|
+
if (currencySalesResult && currencySalesResult.name) {
|
|
109
|
+
const hasBeenShownEver = currencySalesShownData && !!currencySalesShownData[currencySalesResult.name];
|
|
110
|
+
this.currencySales = !hasBeenShownEver ? currencySalesResult : null;
|
|
111
|
+
} else {
|
|
112
|
+
this.currencySales = null;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const activeOffers = limitedTimeOffersResult?.data || [];
|
|
116
|
+
const allFilteredOffers = this.filterLimitedOffersWithEvents(activeOffers);
|
|
117
|
+
|
|
118
|
+
const hasNewEvent = allFilteredOffers.some(campaign =>
|
|
119
|
+
campaign.limitedTimeEvents.some(event =>
|
|
120
|
+
!limitedTimeOffersShownData || !limitedTimeOffersShownData[event.appEventId.toString()]
|
|
121
|
+
)
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
if (hasNewEvent) {
|
|
125
|
+
this.limitedTimeEvents = allFilteredOffers;
|
|
126
|
+
} else if (!this.limitedTimeEvents) {
|
|
127
|
+
this.limitedTimeEvents = null;
|
|
128
|
+
}
|
|
129
|
+
this.notifyListeners();
|
|
130
|
+
return !!(this.currencySales || this.limitedTimeEvents);
|
|
131
|
+
}
|
|
132
|
+
private filterLimitedOffersWithEvents(
|
|
133
|
+
activeOffers: ActivatedCampaignsData[]
|
|
134
|
+
): ActivatedCampaign[] {
|
|
135
|
+
const allCampaigns = activeOffers
|
|
136
|
+
.filter(group => group.groupName?.toLowerCase() == "hotdeals")
|
|
137
|
+
.flatMap(offer => offer.campaigns)
|
|
138
|
+
.filter(campaign => campaign.limitedTimeEvents.length > 0)
|
|
139
|
+
.filter(campaign =>
|
|
140
|
+
campaign.campaignStatus?.toLowerCase() !== 'suspended' &&
|
|
141
|
+
campaign.validity?.isInstalled
|
|
142
|
+
)
|
|
143
|
+
.filter(campaign =>
|
|
144
|
+
campaign.limitedTimeEvents.some(event =>
|
|
145
|
+
event.conversionStatus?.toLowerCase() !== "approved"
|
|
146
|
+
)
|
|
147
|
+
);
|
|
148
|
+
const uniqueCampaigns = allCampaigns.filter((campaign, index, self) =>
|
|
149
|
+
index === self.findIndex((c) => c.campaignId === campaign.campaignId)
|
|
150
|
+
);
|
|
151
|
+
return uniqueCampaigns;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
public showCountdown(event: LimitedTimeEvent): boolean {
|
|
155
|
+
const { allowDuplicateEvents, conversionStatus, dailyCount, dailyLimit } = event;
|
|
156
|
+
const isDailyLimitIncomplete = dailyCount === null || dailyLimit === null || dailyCount < dailyLimit;
|
|
157
|
+
|
|
158
|
+
if (!allowDuplicateEvents) {
|
|
159
|
+
return conversionStatus === null;
|
|
160
|
+
}
|
|
161
|
+
if (isDailyLimitIncomplete) {
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
public getFinalStatusString(event: LimitedTimeEvent): 'Completed' | 'Rejected' | '' {
|
|
168
|
+
const { allowDuplicateEvents, conversionStatus, dailyCount, dailyLimit } = event;
|
|
169
|
+
if (!allowDuplicateEvents) {
|
|
170
|
+
if (conversionStatus === 'approved') return 'Completed';
|
|
171
|
+
if (conversionStatus === 'rejected') return 'Rejected';
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const isDailyLimitComplete = dailyCount !== null && dailyLimit !== null && dailyCount === dailyLimit;
|
|
175
|
+
if (allowDuplicateEvents && isDailyLimitComplete) {
|
|
176
|
+
return 'Completed';
|
|
177
|
+
}
|
|
178
|
+
return '';
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export default InAppNotificationController;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
2
|
+
import { CardAlert } from "../components/modal-wrapper";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { CardGradient } from "../components/gradient_card";
|
|
5
|
+
import { CountdownTimer } from "../../../core/components/countdown-timer";
|
|
6
|
+
import TyradsSdkCoreMethods, { TyradsSdkCore } from "../../../core/tyrads-sdk-core";
|
|
7
|
+
import InAppNotificationController from "../controller";
|
|
8
|
+
import NotificationManager from "../inapp-notification-manager";
|
|
9
|
+
|
|
10
|
+
interface InAppNotifProps {
|
|
11
|
+
useModal?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const CurrencySalesNotif: React.FC<InAppNotifProps> = ({ useModal = true }) => {
|
|
15
|
+
|
|
16
|
+
const [visible, setVisible] = useState(false);
|
|
17
|
+
const [currencySales, setCurrencySales] = useState<CurrencySales | null>(null);
|
|
18
|
+
const controller = InAppNotificationController.getInstance();
|
|
19
|
+
const notificationManager = NotificationManager.getInstance();
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const updateFromController = () => {
|
|
23
|
+
if (controller.currencySales) {
|
|
24
|
+
setCurrencySales(controller.currencySales);
|
|
25
|
+
} else {
|
|
26
|
+
setCurrencySales(null);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
updateFromController();
|
|
31
|
+
const unsubscribe = controller.addListener(updateFromController);
|
|
32
|
+
return unsubscribe;
|
|
33
|
+
}, []);
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
const unsubscribe = notificationManager.addListener(() => {
|
|
37
|
+
updateVisibility();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return unsubscribe;
|
|
41
|
+
}, []);
|
|
42
|
+
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (currencySales) {
|
|
45
|
+
notificationManager.setCurrencySalesVisible(true);
|
|
46
|
+
updateVisibility();
|
|
47
|
+
} else {
|
|
48
|
+
notificationManager.setCurrencySalesVisible(false);
|
|
49
|
+
}
|
|
50
|
+
}, [currencySales]);
|
|
51
|
+
|
|
52
|
+
const updateVisibility = () => {
|
|
53
|
+
const shouldShow = notificationManager.shouldShowCurrencySales();
|
|
54
|
+
setVisible(shouldShow);
|
|
55
|
+
if (shouldShow) {
|
|
56
|
+
controller.markCurrencySalesAsShown();
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const handleClose = () => {
|
|
61
|
+
setVisible(false);
|
|
62
|
+
notificationManager.setCurrencySalesVisible(false);
|
|
63
|
+
if (!useModal) {
|
|
64
|
+
TyradsSdkCoreMethods.dismissInAppNotification();
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const handleButtonPress = () => {
|
|
69
|
+
handleClose();
|
|
70
|
+
setTimeout(() => {
|
|
71
|
+
TyradsSdkCoreMethods.showOffers({ launchMode: 2 });
|
|
72
|
+
}, 400)
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<CardAlert visible={visible} onClose={handleClose} useModal={useModal}>
|
|
77
|
+
<CardGradient onClose={handleClose}>
|
|
78
|
+
<Text style={styles.title}>{"Bonus Rewards \nUnlocked!"}</Text>
|
|
79
|
+
<View style={styles.horizontalLine} />
|
|
80
|
+
<Text style={styles.subtitle}>{`You get ${currencySales?.multiplier}X bonus rewards!`}</Text>
|
|
81
|
+
<Text style={styles.text}>Go to offerwall and activate new offer!</Text>
|
|
82
|
+
{
|
|
83
|
+
<View style={styles.timerContainer}>
|
|
84
|
+
<Text style={styles.timerMessage}>Bonus Expires in </Text>
|
|
85
|
+
<CountdownTimer style={styles.timer} duration={currencySales?.remainingTimeSeconds ?? 0}></CountdownTimer>
|
|
86
|
+
</View>
|
|
87
|
+
}
|
|
88
|
+
<TouchableOpacity
|
|
89
|
+
style={[styles.outlinedButton, { borderColor: TyradsSdkCore.getInstance().mainColor || "#02B5BE", backgroundColor: "white" }]}
|
|
90
|
+
onPress={handleButtonPress}
|
|
91
|
+
activeOpacity={0.8}
|
|
92
|
+
>
|
|
93
|
+
<View style={styles.outlinedButtonTextContainer}>
|
|
94
|
+
<Text style={[styles.outlinedButtonText, { color: TyradsSdkCore.getInstance().mainColor || "#02B5BE" }]}>Go to Offerwall</Text>
|
|
95
|
+
</View>
|
|
96
|
+
</TouchableOpacity>
|
|
97
|
+
</CardGradient>
|
|
98
|
+
</CardAlert>
|
|
99
|
+
)
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const styles = StyleSheet.create({
|
|
103
|
+
title: {
|
|
104
|
+
fontSize: 16,
|
|
105
|
+
fontWeight: '700',
|
|
106
|
+
color: '#1E2020',
|
|
107
|
+
textAlign: 'center',
|
|
108
|
+
marginTop: 20,
|
|
109
|
+
},
|
|
110
|
+
horizontalLine: {
|
|
111
|
+
width: '100%',
|
|
112
|
+
borderBottomColor: '#E0E2E7',
|
|
113
|
+
borderBottomWidth: 1,
|
|
114
|
+
marginVertical: 16,
|
|
115
|
+
},
|
|
116
|
+
subtitle: {
|
|
117
|
+
fontSize: 12,
|
|
118
|
+
fontWeight: '700',
|
|
119
|
+
color: '#1E2020',
|
|
120
|
+
textAlign: 'center',
|
|
121
|
+
},
|
|
122
|
+
text: {
|
|
123
|
+
fontSize: 12,
|
|
124
|
+
fontWeight: '400',
|
|
125
|
+
color: '#1E2020',
|
|
126
|
+
textAlign: 'center',
|
|
127
|
+
marginBottom: 16,
|
|
128
|
+
},
|
|
129
|
+
timerContainer: {
|
|
130
|
+
flexDirection: 'row',
|
|
131
|
+
justifyContent: 'center',
|
|
132
|
+
alignItems: 'center',
|
|
133
|
+
marginBottom: 16,
|
|
134
|
+
backgroundColor: "#FF554A",
|
|
135
|
+
paddingVertical: 4,
|
|
136
|
+
borderRadius: 20,
|
|
137
|
+
},
|
|
138
|
+
timer: {
|
|
139
|
+
fontSize: 12,
|
|
140
|
+
fontWeight: '700',
|
|
141
|
+
color: '#FFFFFF',
|
|
142
|
+
},
|
|
143
|
+
timerMessage: {
|
|
144
|
+
fontSize: 12,
|
|
145
|
+
fontWeight: '700',
|
|
146
|
+
color: '#FFFFFF',
|
|
147
|
+
marginLeft: 8,
|
|
148
|
+
},
|
|
149
|
+
outlinedButton: {
|
|
150
|
+
borderWidth: 2,
|
|
151
|
+
borderRadius: 30,
|
|
152
|
+
justifyContent: 'center',
|
|
153
|
+
height: 42,
|
|
154
|
+
},
|
|
155
|
+
outlinedButtonTextContainer: {
|
|
156
|
+
justifyContent: 'center',
|
|
157
|
+
alignItems: 'center',
|
|
158
|
+
},
|
|
159
|
+
outlinedButtonText: {
|
|
160
|
+
color: '#02B5BE',
|
|
161
|
+
fontSize: 14,
|
|
162
|
+
fontWeight: '600',
|
|
163
|
+
},
|
|
164
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { View } from "react-native";
|
|
2
|
+
import { CurrencySalesNotif } from "./currency-sales/currency-sales-notif";
|
|
3
|
+
import { LimitedTimeEventsNotif } from "./limited-time-offer/limited-time-notif";
|
|
4
|
+
import { useEffect } from "react";
|
|
5
|
+
import InAppNotificationController from "./controller";
|
|
6
|
+
|
|
7
|
+
import TyradsSdkCoreMethods from "../../core/tyrads-sdk-core";
|
|
8
|
+
|
|
9
|
+
interface InAppNotificationHostProps {
|
|
10
|
+
useModal?: boolean;
|
|
11
|
+
style?: any;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const InAppNotificationHost: React.FC<InAppNotificationHostProps> = ({ useModal = true, style }) => {
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const initializeInAppNotifications = async () => {
|
|
17
|
+
if (TyradsSdkCoreMethods.apiKey) {
|
|
18
|
+
await InAppNotificationController.getInstance().init();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
initializeInAppNotifications();
|
|
22
|
+
}, [])
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<View style={style}>
|
|
26
|
+
<CurrencySalesNotif useModal={useModal} />
|
|
27
|
+
<LimitedTimeEventsNotif useModal={useModal} />
|
|
28
|
+
</View>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default InAppNotificationHost
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
class NotificationManager {
|
|
2
|
+
private static instance: NotificationManager;
|
|
3
|
+
private limitedTimeVisible = false;
|
|
4
|
+
private currencySalesVisible = false;
|
|
5
|
+
private listeners: Array<() => void> = [];
|
|
6
|
+
|
|
7
|
+
static getInstance(): NotificationManager {
|
|
8
|
+
if (!NotificationManager.instance) {
|
|
9
|
+
NotificationManager.instance = new NotificationManager();
|
|
10
|
+
}
|
|
11
|
+
return NotificationManager.instance;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
setLimitedTimeVisible(visible: boolean) {
|
|
15
|
+
this.limitedTimeVisible = visible;
|
|
16
|
+
this.notifyListeners();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
setCurrencySalesVisible(visible: boolean) {
|
|
20
|
+
this.currencySalesVisible = visible;
|
|
21
|
+
this.notifyListeners();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
shouldShowCurrencySales(): boolean {
|
|
25
|
+
return this.currencySalesVisible && !this.limitedTimeVisible;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
addListener(listener: () => void): () => void {
|
|
29
|
+
this.listeners.push(listener);
|
|
30
|
+
return () => {
|
|
31
|
+
this.listeners = this.listeners.filter(l => l !== listener);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
private notifyListeners() {
|
|
36
|
+
this.listeners.forEach(listener => listener());
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default NotificationManager;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { useEffect } from "react"
|
|
2
|
+
import { FlatList, Image, StyleSheet, Text, TouchableOpacity, View } from "react-native"
|
|
3
|
+
import { Logger } from "../../../../core/helpers/logger"
|
|
4
|
+
import { numeral } from "../../../../core/helpers/numeral"
|
|
5
|
+
import { CountdownTimer } from "../../../../core/components/countdown-timer"
|
|
6
|
+
import InAppNotificationController from "../../controller"
|
|
7
|
+
import { acmoLaunchURL } from "../../../../core/helpers/launcher"
|
|
8
|
+
import { TyradsSdkCore } from "../../../../core/tyrads-sdk-core"
|
|
9
|
+
import { getContrastColor } from "../../../../core/helpers/colors"
|
|
10
|
+
|
|
11
|
+
export const LimitedTimeOfferCard: React.FC<{ activatedCampaign: ActivatedCampaign | null }> = ({ activatedCampaign }) => {
|
|
12
|
+
|
|
13
|
+
const controller = InAppNotificationController.getInstance();
|
|
14
|
+
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
Logger.log('activatedCampaign in offer card', activatedCampaign)
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const handleButtonPress = (link: string) => {
|
|
20
|
+
acmoLaunchURL(link);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return <View style={styles.container}>
|
|
24
|
+
<Image
|
|
25
|
+
source={require('../../../../../assets/images/alarm-clock.png')}
|
|
26
|
+
style={styles.bgImage}
|
|
27
|
+
/>
|
|
28
|
+
<View style={styles.appHeader}>
|
|
29
|
+
<Image
|
|
30
|
+
source={{ uri: activatedCampaign?.app.thumbnail }}
|
|
31
|
+
style={styles.thumbnail}
|
|
32
|
+
/>
|
|
33
|
+
<Text style={styles.appName}>
|
|
34
|
+
{activatedCampaign?.app.title}
|
|
35
|
+
</Text>
|
|
36
|
+
</View>
|
|
37
|
+
<FlatList
|
|
38
|
+
data={activatedCampaign?.limitedTimeEvents || []}
|
|
39
|
+
keyExtractor={(_, index) => index.toString()}
|
|
40
|
+
renderItem={({ item: event, index }) => (
|
|
41
|
+
<View key={index}
|
|
42
|
+
style={styles.eventContainer}>
|
|
43
|
+
<View style={styles.eventNameContainer}>
|
|
44
|
+
<Text style={styles.eventName}>
|
|
45
|
+
{event.eventName}
|
|
46
|
+
</Text>
|
|
47
|
+
<View style={styles.eventPayoutRow}>
|
|
48
|
+
<Image style={styles.eventCurrencyIcon}
|
|
49
|
+
source={{ uri: Object.values(activatedCampaign?.availableCurrencies || {})[0]?.currencyIcon }}
|
|
50
|
+
/>
|
|
51
|
+
<Text style={[styles.eventPayout, { color: TyradsSdkCore.getInstance().mainColor || '#02B5BE' }]}>
|
|
52
|
+
{numeral(Object.values(event.payoutInfo || {})[0]?.payoutAmountConverted ?? 0)}
|
|
53
|
+
</Text>
|
|
54
|
+
</View>
|
|
55
|
+
</View>
|
|
56
|
+
{
|
|
57
|
+
!controller.showCountdown(event)
|
|
58
|
+
?
|
|
59
|
+
<Text
|
|
60
|
+
style={[
|
|
61
|
+
styles.eventStatus,
|
|
62
|
+
{ color: event.conversionStatus == 'approved' ? '#A3A9B6' : '#FF554A' }
|
|
63
|
+
]}>
|
|
64
|
+
{controller.getFinalStatusString(event)}
|
|
65
|
+
</Text>
|
|
66
|
+
:
|
|
67
|
+
<View style={styles.timerContainer}>
|
|
68
|
+
<CountdownTimer
|
|
69
|
+
style={styles.timer}
|
|
70
|
+
duration={event.limitedTimeEventRemainingSeconds}
|
|
71
|
+
/>
|
|
72
|
+
</View>
|
|
73
|
+
}
|
|
74
|
+
</View>
|
|
75
|
+
)}
|
|
76
|
+
style={styles.eventsContainer}
|
|
77
|
+
showsVerticalScrollIndicator={false}
|
|
78
|
+
nestedScrollEnabled={true}
|
|
79
|
+
/>
|
|
80
|
+
<TouchableOpacity style={[styles.filledButton, { backgroundColor: TyradsSdkCore.getInstance().mainColor || "#02B5BE", }]}
|
|
81
|
+
onPress={() => handleButtonPress(activatedCampaign?.app.previewUrl || '')}
|
|
82
|
+
activeOpacity={0.8}
|
|
83
|
+
>
|
|
84
|
+
<Text style={[styles.btnText, { color: getContrastColor(TyradsSdkCore.getInstance().mainColor || "white") }]}>Play Now</Text>
|
|
85
|
+
</TouchableOpacity>
|
|
86
|
+
</View>
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const styles = StyleSheet.create({
|
|
90
|
+
container: {
|
|
91
|
+
position: 'relative',
|
|
92
|
+
borderRadius: 16,
|
|
93
|
+
width: '100%',
|
|
94
|
+
maxWidth: '100%',
|
|
95
|
+
height: 378,
|
|
96
|
+
padding: 16,
|
|
97
|
+
backgroundColor: '#FFF9ED',
|
|
98
|
+
overflow: 'hidden',
|
|
99
|
+
},
|
|
100
|
+
bgImage: {
|
|
101
|
+
position: 'absolute',
|
|
102
|
+
right: 0,
|
|
103
|
+
bottom: 0,
|
|
104
|
+
},
|
|
105
|
+
thumbnail: {
|
|
106
|
+
width: 43,
|
|
107
|
+
height: 43,
|
|
108
|
+
borderRadius: 7,
|
|
109
|
+
marginRight: 13
|
|
110
|
+
},
|
|
111
|
+
appHeader: {
|
|
112
|
+
flexDirection: 'row',
|
|
113
|
+
alignItems: 'center',
|
|
114
|
+
marginBottom: 16,
|
|
115
|
+
},
|
|
116
|
+
appName: {
|
|
117
|
+
width: '75%',
|
|
118
|
+
fontSize: 12,
|
|
119
|
+
fontWeight: '600',
|
|
120
|
+
color: '#1E2020',
|
|
121
|
+
marginRight: 16,
|
|
122
|
+
},
|
|
123
|
+
eventsContainer: {
|
|
124
|
+
maxHeight: 350
|
|
125
|
+
},
|
|
126
|
+
eventContainer: {
|
|
127
|
+
flexDirection: 'row',
|
|
128
|
+
backgroundColor: 'white',
|
|
129
|
+
paddingVertical: 8,
|
|
130
|
+
paddingHorizontal: 16,
|
|
131
|
+
alignItems: 'center',
|
|
132
|
+
justifyContent: 'space-between',
|
|
133
|
+
borderRadius: 8,
|
|
134
|
+
marginBottom: 16,
|
|
135
|
+
shadowColor: '#000',
|
|
136
|
+
shadowOffset: { width: 0, height: 8 },
|
|
137
|
+
shadowOpacity: 0.06,
|
|
138
|
+
shadowRadius: 10,
|
|
139
|
+
},
|
|
140
|
+
eventNameContainer: {
|
|
141
|
+
width: '58%',
|
|
142
|
+
marginRight: 8,
|
|
143
|
+
},
|
|
144
|
+
eventName: {
|
|
145
|
+
fontSize: 12,
|
|
146
|
+
color: '#1E2020',
|
|
147
|
+
},
|
|
148
|
+
eventPayoutRow: {
|
|
149
|
+
flexDirection: 'row',
|
|
150
|
+
alignItems: 'center',
|
|
151
|
+
marginTop: 4
|
|
152
|
+
},
|
|
153
|
+
eventCurrencyIcon: {
|
|
154
|
+
width: 12,
|
|
155
|
+
height: 12,
|
|
156
|
+
marginRight: 4,
|
|
157
|
+
resizeMode: 'contain',
|
|
158
|
+
},
|
|
159
|
+
eventPayout: {
|
|
160
|
+
fontSize: 12,
|
|
161
|
+
fontWeight: '700',
|
|
162
|
+
},
|
|
163
|
+
eventStatus: {
|
|
164
|
+
fontSize: 10,
|
|
165
|
+
fontWeight: '600',
|
|
166
|
+
},
|
|
167
|
+
timerContainer: {
|
|
168
|
+
backgroundColor: '#FF554A',
|
|
169
|
+
paddingVertical: 2,
|
|
170
|
+
paddingHorizontal: 8,
|
|
171
|
+
borderRadius: 10,
|
|
172
|
+
},
|
|
173
|
+
timer: {
|
|
174
|
+
fontSize: 12,
|
|
175
|
+
fontWeight: '700',
|
|
176
|
+
color: 'white'
|
|
177
|
+
},
|
|
178
|
+
filledButton: {
|
|
179
|
+
borderRadius: 8,
|
|
180
|
+
paddingVertical: 12,
|
|
181
|
+
alignItems: 'center',
|
|
182
|
+
},
|
|
183
|
+
btnText: {
|
|
184
|
+
fontSize: 12,
|
|
185
|
+
fontWeight: '600',
|
|
186
|
+
color: 'white'
|
|
187
|
+
}
|
|
188
|
+
})
|