@tyrads.com/tyrads-sdk 3.3.4 → 4.0.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.
Files changed (436) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/tyradssdk/TyradsSdkModule.kt +161 -19
  3. package/ios/Tyrads/AcmoConfig.swift +1 -1
  4. package/ios/Tyrads/InitModel.swift +29 -15
  5. package/ios/Tyrads/Tyrads.swift +332 -274
  6. package/ios/Tyrads/WebViewController.swift +10 -17
  7. package/ios/Tyrads/core/models/TyradsUserInfo.swift +2 -0
  8. package/ios/Tyrads/core/utils/AcmoKeyNames.swift +1 -0
  9. package/ios/Tyrads/helpers/device_details.swift +122 -2
  10. package/ios/Tyrads/pushNotifications/APNsAppDelegateProxy.swift +37 -0
  11. package/ios/Tyrads/pushNotifications/APNsNotificationListener.swift +14 -0
  12. package/ios/Tyrads/pushNotifications/APNsNotificationManager.swift +68 -0
  13. package/ios/Tyrads/pushNotifications/APNsNotificationReceiver.swift +77 -0
  14. package/ios/Tyrads/pushNotifications/TyradsAPNsSwizzler.mm +179 -0
  15. package/ios/TyradsSdk-Bridging-Header.h +3 -0
  16. package/ios/TyradsSdk.mm +12 -1
  17. package/ios/TyradsSdk.swift +121 -4
  18. package/lib/commonjs/acmo/core/components/countdown-timer.js +48 -0
  19. package/lib/commonjs/acmo/core/components/countdown-timer.js.map +1 -0
  20. package/lib/commonjs/acmo/core/components/snap-carousel.js +86 -0
  21. package/lib/commonjs/acmo/core/components/snap-carousel.js.map +1 -0
  22. package/lib/commonjs/acmo/core/constants/api-endpoints.js +18 -0
  23. package/lib/commonjs/acmo/core/constants/api-endpoints.js.map +1 -0
  24. package/lib/commonjs/acmo/core/helpers/colors.js +20 -0
  25. package/lib/commonjs/acmo/core/helpers/colors.js.map +1 -0
  26. package/lib/commonjs/acmo/core/helpers/logger.js +18 -0
  27. package/lib/commonjs/acmo/core/helpers/logger.js.map +1 -0
  28. package/lib/commonjs/acmo/core/helpers/patches.js +7 -0
  29. package/lib/commonjs/acmo/core/helpers/patches.js.map +1 -0
  30. package/lib/commonjs/acmo/core/network/http-client.js +91 -0
  31. package/lib/commonjs/acmo/core/network/http-client.js.map +1 -0
  32. package/lib/commonjs/acmo/core/network/network-common.js +111 -0
  33. package/lib/commonjs/acmo/core/network/network-common.js.map +1 -0
  34. package/lib/commonjs/acmo/core/services/localization_service.js +7 -13
  35. package/lib/commonjs/acmo/core/services/localization_service.js.map +1 -1
  36. package/lib/commonjs/acmo/core/types/activated-campaings.d.js +2 -0
  37. package/lib/commonjs/acmo/core/types/activated-campaings.d.js.map +1 -0
  38. package/lib/commonjs/acmo/core/tyrads-sdk-core.js +203 -0
  39. package/lib/commonjs/acmo/core/tyrads-sdk-core.js.map +1 -0
  40. package/lib/commonjs/acmo/modules/inapp-notifications/components/gradient_card.js +98 -0
  41. package/lib/commonjs/acmo/modules/inapp-notifications/components/gradient_card.js.map +1 -0
  42. package/lib/commonjs/acmo/modules/inapp-notifications/components/modal-wrapper.js +55 -0
  43. package/lib/commonjs/acmo/modules/inapp-notifications/components/modal-wrapper.js.map +1 -0
  44. package/lib/commonjs/acmo/modules/inapp-notifications/controller.js +141 -0
  45. package/lib/commonjs/acmo/modules/inapp-notifications/controller.js.map +1 -0
  46. package/lib/commonjs/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js +183 -0
  47. package/lib/commonjs/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js.map +1 -0
  48. package/lib/commonjs/acmo/modules/inapp-notifications/inapp-notification-host.js +37 -0
  49. package/lib/commonjs/acmo/modules/inapp-notifications/inapp-notification-host.js.map +1 -0
  50. package/lib/commonjs/acmo/modules/inapp-notifications/inapp-notification-manager.js +39 -0
  51. package/lib/commonjs/acmo/modules/inapp-notifications/inapp-notification-manager.js.map +1 -0
  52. package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.js +206 -0
  53. package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.js.map +1 -0
  54. package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js +155 -0
  55. package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js.map +1 -0
  56. package/lib/commonjs/acmo/modules/inapp-notifications/repository.js +52 -0
  57. package/lib/commonjs/acmo/modules/inapp-notifications/repository.js.map +1 -0
  58. package/lib/commonjs/acmo/modules/inapp-notifications/tyrads-global-host.js +37 -0
  59. package/lib/commonjs/acmo/modules/inapp-notifications/tyrads-global-host.js.map +1 -0
  60. package/lib/commonjs/acmo/modules/localization/localization_context.js +15 -2
  61. package/lib/commonjs/acmo/modules/localization/localization_context.js.map +1 -1
  62. package/lib/commonjs/acmo/modules/premium-widgets/components/active_offers_button.js.map +1 -0
  63. package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/custom_card.js +1 -2
  64. package/lib/commonjs/acmo/modules/premium-widgets/components/custom_card.js.map +1 -0
  65. package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/custom_scroller.js +20 -11
  66. package/lib/commonjs/acmo/modules/premium-widgets/components/custom_scroller.js.map +1 -0
  67. package/lib/commonjs/acmo/modules/premium-widgets/components/custom_shimmer.js.map +1 -0
  68. package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/offer_card.js +12 -12
  69. package/lib/commonjs/acmo/modules/premium-widgets/components/offer_card.js.map +1 -0
  70. package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.js +3 -3
  71. package/lib/commonjs/acmo/modules/premium-widgets/components/offer_list_item.js.map +1 -0
  72. package/lib/commonjs/acmo/modules/premium-widgets/components/premium_empty_widget.js.map +1 -0
  73. package/lib/commonjs/acmo/modules/premium-widgets/components/premium_header.js.map +1 -0
  74. package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/premium_loading.js +3 -3
  75. package/lib/commonjs/acmo/modules/premium-widgets/components/premium_loading.js.map +1 -0
  76. package/lib/commonjs/acmo/modules/premium-widgets/controller.js +30 -0
  77. package/lib/commonjs/acmo/modules/premium-widgets/controller.js.map +1 -0
  78. package/lib/commonjs/acmo/modules/{dashboard/top_offers.js → premium-widgets/premium_offers_widget.js} +67 -30
  79. package/lib/commonjs/acmo/modules/premium-widgets/premium_offers_widget.js.map +1 -0
  80. package/lib/commonjs/acmo/modules/premium-widgets/premium_offers_widget_wrapper.js +49 -0
  81. package/lib/commonjs/acmo/modules/premium-widgets/premium_offers_widget_wrapper.js.map +1 -0
  82. package/lib/commonjs/acmo/modules/premium-widgets/repository.js +103 -0
  83. package/lib/commonjs/acmo/modules/premium-widgets/repository.js.map +1 -0
  84. package/lib/commonjs/acmo/modules/push-notifications/apns-manager.js +227 -0
  85. package/lib/commonjs/acmo/modules/push-notifications/apns-manager.js.map +1 -0
  86. package/lib/commonjs/acmo/modules/push-notifications/fcm-manager.js +148 -0
  87. package/lib/commonjs/acmo/modules/push-notifications/fcm-manager.js.map +1 -0
  88. package/lib/commonjs/acmo_config.js +6 -5
  89. package/lib/commonjs/acmo_config.js.map +1 -1
  90. package/lib/commonjs/assets/images/alarm-clock.png +0 -0
  91. package/lib/commonjs/assets/images/circle-x.png +0 -0
  92. package/lib/commonjs/assets/images/coin.png +0 -0
  93. package/lib/commonjs/index.js +33 -106
  94. package/lib/commonjs/index.js.map +1 -1
  95. package/lib/module/acmo/core/components/countdown-timer.js +42 -0
  96. package/lib/module/acmo/core/components/countdown-timer.js.map +1 -0
  97. package/lib/module/acmo/core/components/snap-carousel.js +81 -0
  98. package/lib/module/acmo/core/components/snap-carousel.js.map +1 -0
  99. package/lib/module/acmo/core/constants/api-endpoints.js +14 -0
  100. package/lib/module/acmo/core/constants/api-endpoints.js.map +1 -0
  101. package/lib/module/acmo/core/helpers/colors.js +15 -0
  102. package/lib/module/acmo/core/helpers/colors.js.map +1 -0
  103. package/lib/module/acmo/core/helpers/logger.js +14 -0
  104. package/lib/module/acmo/core/helpers/logger.js.map +1 -0
  105. package/lib/module/acmo/core/helpers/patches.js +7 -0
  106. package/lib/module/acmo/core/helpers/patches.js.map +1 -0
  107. package/lib/module/acmo/core/network/http-client.js +86 -0
  108. package/lib/module/acmo/core/network/http-client.js.map +1 -0
  109. package/lib/module/acmo/core/network/network-common.js +106 -0
  110. package/lib/module/acmo/core/network/network-common.js.map +1 -0
  111. package/lib/module/acmo/core/services/localization_service.js +7 -13
  112. package/lib/module/acmo/core/services/localization_service.js.map +1 -1
  113. package/lib/module/acmo/core/types/activated-campaings.d.js +2 -0
  114. package/lib/module/acmo/core/types/activated-campaings.d.js.map +1 -0
  115. package/lib/module/acmo/core/tyrads-sdk-core.js +197 -0
  116. package/lib/module/acmo/core/tyrads-sdk-core.js.map +1 -0
  117. package/lib/module/acmo/modules/inapp-notifications/components/gradient_card.js +92 -0
  118. package/lib/module/acmo/modules/inapp-notifications/components/gradient_card.js.map +1 -0
  119. package/lib/module/acmo/modules/inapp-notifications/components/modal-wrapper.js +49 -0
  120. package/lib/module/acmo/modules/inapp-notifications/components/modal-wrapper.js.map +1 -0
  121. package/lib/module/acmo/modules/inapp-notifications/controller.js +136 -0
  122. package/lib/module/acmo/modules/inapp-notifications/controller.js.map +1 -0
  123. package/lib/module/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js +176 -0
  124. package/lib/module/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js.map +1 -0
  125. package/lib/module/acmo/modules/inapp-notifications/inapp-notification-host.js +32 -0
  126. package/lib/module/acmo/modules/inapp-notifications/inapp-notification-host.js.map +1 -0
  127. package/lib/module/acmo/modules/inapp-notifications/inapp-notification-manager.js +35 -0
  128. package/lib/module/acmo/modules/inapp-notifications/inapp-notification-manager.js.map +1 -0
  129. package/lib/module/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.js +200 -0
  130. package/lib/module/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.js.map +1 -0
  131. package/lib/module/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js +149 -0
  132. package/lib/module/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js.map +1 -0
  133. package/lib/module/acmo/modules/inapp-notifications/repository.js +47 -0
  134. package/lib/module/acmo/modules/inapp-notifications/repository.js.map +1 -0
  135. package/lib/module/acmo/modules/inapp-notifications/tyrads-global-host.js +32 -0
  136. package/lib/module/acmo/modules/inapp-notifications/tyrads-global-host.js.map +1 -0
  137. package/lib/module/acmo/modules/localization/localization_context.js +15 -2
  138. package/lib/module/acmo/modules/localization/localization_context.js.map +1 -1
  139. package/lib/module/acmo/modules/premium-widgets/components/active_offers_button.js.map +1 -0
  140. package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/custom_card.js +1 -2
  141. package/lib/module/acmo/modules/premium-widgets/components/custom_card.js.map +1 -0
  142. package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/custom_scroller.js +20 -11
  143. package/lib/module/acmo/modules/premium-widgets/components/custom_scroller.js.map +1 -0
  144. package/lib/module/acmo/modules/premium-widgets/components/custom_shimmer.js.map +1 -0
  145. package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/offer_card.js +12 -12
  146. package/lib/module/acmo/modules/premium-widgets/components/offer_card.js.map +1 -0
  147. package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.js +3 -3
  148. package/lib/module/acmo/modules/premium-widgets/components/offer_list_item.js.map +1 -0
  149. package/lib/module/acmo/modules/premium-widgets/components/premium_empty_widget.js.map +1 -0
  150. package/lib/module/acmo/modules/premium-widgets/components/premium_header.js.map +1 -0
  151. package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/premium_loading.js +1 -1
  152. package/lib/module/acmo/modules/premium-widgets/components/premium_loading.js.map +1 -0
  153. package/lib/module/acmo/modules/premium-widgets/controller.js +25 -0
  154. package/lib/module/acmo/modules/premium-widgets/controller.js.map +1 -0
  155. package/lib/module/acmo/modules/{dashboard/top_offers.js → premium-widgets/premium_offers_widget.js} +69 -32
  156. package/lib/module/acmo/modules/premium-widgets/premium_offers_widget.js.map +1 -0
  157. package/lib/module/acmo/modules/premium-widgets/premium_offers_widget_wrapper.js +41 -0
  158. package/lib/module/acmo/modules/premium-widgets/premium_offers_widget_wrapper.js.map +1 -0
  159. package/lib/module/acmo/modules/premium-widgets/repository.js +98 -0
  160. package/lib/module/acmo/modules/premium-widgets/repository.js.map +1 -0
  161. package/lib/module/acmo/modules/push-notifications/apns-manager.js +222 -0
  162. package/lib/module/acmo/modules/push-notifications/apns-manager.js.map +1 -0
  163. package/lib/module/acmo/modules/push-notifications/fcm-manager.js +143 -0
  164. package/lib/module/acmo/modules/push-notifications/fcm-manager.js.map +1 -0
  165. package/lib/module/acmo_config.js +6 -5
  166. package/lib/module/acmo_config.js.map +1 -1
  167. package/lib/module/assets/images/alarm-clock.png +0 -0
  168. package/lib/module/assets/images/circle-x.png +0 -0
  169. package/lib/module/assets/images/coin.png +0 -0
  170. package/lib/module/index.js +16 -106
  171. package/lib/module/index.js.map +1 -1
  172. package/lib/typescript/commonjs/src/acmo/core/components/countdown-timer.d.ts +8 -0
  173. package/lib/typescript/commonjs/src/acmo/core/components/countdown-timer.d.ts.map +1 -0
  174. package/lib/typescript/commonjs/src/acmo/core/components/snap-carousel.d.ts +26 -0
  175. package/lib/typescript/commonjs/src/acmo/core/components/snap-carousel.d.ts.map +1 -0
  176. package/lib/typescript/commonjs/src/acmo/core/constants/api-endpoints.d.ts +12 -0
  177. package/lib/typescript/commonjs/src/acmo/core/constants/api-endpoints.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/src/acmo/core/helpers/colors.d.ts +2 -0
  179. package/lib/typescript/commonjs/src/acmo/core/helpers/colors.d.ts.map +1 -0
  180. package/lib/typescript/commonjs/src/acmo/core/helpers/logger.d.ts +6 -0
  181. package/lib/typescript/commonjs/src/acmo/core/helpers/logger.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/src/acmo/core/network/http-client.d.ts +28 -0
  183. package/lib/typescript/commonjs/src/acmo/core/network/http-client.d.ts.map +1 -0
  184. package/lib/typescript/commonjs/src/acmo/core/network/network-common.d.ts +13 -0
  185. package/lib/typescript/commonjs/src/acmo/core/network/network-common.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/src/acmo/core/services/localization_service.d.ts +0 -1
  187. package/lib/typescript/commonjs/src/acmo/core/services/localization_service.d.ts.map +1 -1
  188. package/lib/typescript/commonjs/src/acmo/core/types/external_types.d.ts +5 -0
  189. package/lib/typescript/commonjs/src/acmo/core/types/external_types.d.ts.map +1 -1
  190. package/lib/typescript/commonjs/src/acmo/core/tyrads-sdk-core.d.ts +46 -0
  191. package/lib/typescript/commonjs/src/acmo/core/tyrads-sdk-core.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/components/gradient_card.d.ts +17 -0
  193. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/components/gradient_card.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/components/modal-wrapper.d.ts +10 -0
  195. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/components/modal-wrapper.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/controller.d.ts +22 -0
  197. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/controller.d.ts.map +1 -0
  198. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.d.ts +6 -0
  199. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.d.ts.map +1 -0
  200. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/inapp-notification-host.d.ts +7 -0
  201. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/inapp-notification-host.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/inapp-notification-manager.d.ts +14 -0
  203. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/inapp-notification-manager.d.ts.map +1 -0
  204. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.d.ts +4 -0
  205. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.d.ts.map +1 -0
  206. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.d.ts +7 -0
  207. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.d.ts.map +1 -0
  208. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/repository.d.ts +8 -0
  209. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/repository.d.ts.map +1 -0
  210. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/tyrads-global-host.d.ts +6 -0
  211. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/tyrads-global-host.d.ts.map +1 -0
  212. package/lib/typescript/commonjs/src/acmo/modules/localization/localization_context.d.ts.map +1 -1
  213. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/active_offers_button.d.ts.map +1 -0
  214. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/custom_card.d.ts.map +1 -0
  215. package/lib/typescript/{module/src/acmo/modules/dashboard → commonjs/src/acmo/modules/premium-widgets}/components/custom_scroller.d.ts +3 -0
  216. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/custom_scroller.d.ts.map +1 -0
  217. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/custom_shimmer.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/offer_card.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/offer_list_item.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/premium_empty_widget.d.ts.map +1 -0
  221. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/premium_header.d.ts.map +1 -0
  222. package/lib/typescript/{module/src/acmo/modules/dashboard → commonjs/src/acmo/modules/premium-widgets}/components/premium_loading.d.ts +1 -1
  223. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/premium_loading.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/controller.d.ts +14 -0
  225. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/controller.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/src/acmo/modules/{dashboard/top_offers.d.ts → premium-widgets/premium_offers_widget.d.ts} +3 -3
  227. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/premium_offers_widget.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.d.ts +9 -0
  229. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.d.ts.map +1 -0
  230. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/repository.d.ts +13 -0
  231. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/repository.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/src/acmo/modules/push-notifications/apns-manager.d.ts +40 -0
  233. package/lib/typescript/commonjs/src/acmo/modules/push-notifications/apns-manager.d.ts.map +1 -0
  234. package/lib/typescript/commonjs/src/acmo/modules/push-notifications/fcm-manager.d.ts +32 -0
  235. package/lib/typescript/commonjs/src/acmo/modules/push-notifications/fcm-manager.d.ts.map +1 -0
  236. package/lib/typescript/commonjs/src/acmo_config.d.ts +1 -0
  237. package/lib/typescript/commonjs/src/acmo_config.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/src/index.d.ts +5 -11
  239. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  240. package/lib/typescript/module/src/acmo/core/components/countdown-timer.d.ts +8 -0
  241. package/lib/typescript/module/src/acmo/core/components/countdown-timer.d.ts.map +1 -0
  242. package/lib/typescript/module/src/acmo/core/components/snap-carousel.d.ts +26 -0
  243. package/lib/typescript/module/src/acmo/core/components/snap-carousel.d.ts.map +1 -0
  244. package/lib/typescript/module/src/acmo/core/constants/api-endpoints.d.ts +12 -0
  245. package/lib/typescript/module/src/acmo/core/constants/api-endpoints.d.ts.map +1 -0
  246. package/lib/typescript/module/src/acmo/core/helpers/colors.d.ts +2 -0
  247. package/lib/typescript/module/src/acmo/core/helpers/colors.d.ts.map +1 -0
  248. package/lib/typescript/module/src/acmo/core/helpers/logger.d.ts +6 -0
  249. package/lib/typescript/module/src/acmo/core/helpers/logger.d.ts.map +1 -0
  250. package/lib/typescript/module/src/acmo/core/network/http-client.d.ts +28 -0
  251. package/lib/typescript/module/src/acmo/core/network/http-client.d.ts.map +1 -0
  252. package/lib/typescript/module/src/acmo/core/network/network-common.d.ts +13 -0
  253. package/lib/typescript/module/src/acmo/core/network/network-common.d.ts.map +1 -0
  254. package/lib/typescript/module/src/acmo/core/services/localization_service.d.ts +0 -1
  255. package/lib/typescript/module/src/acmo/core/services/localization_service.d.ts.map +1 -1
  256. package/lib/typescript/module/src/acmo/core/types/external_types.d.ts +5 -0
  257. package/lib/typescript/module/src/acmo/core/types/external_types.d.ts.map +1 -1
  258. package/lib/typescript/module/src/acmo/core/tyrads-sdk-core.d.ts +46 -0
  259. package/lib/typescript/module/src/acmo/core/tyrads-sdk-core.d.ts.map +1 -0
  260. package/lib/typescript/module/src/acmo/modules/inapp-notifications/components/gradient_card.d.ts +17 -0
  261. package/lib/typescript/module/src/acmo/modules/inapp-notifications/components/gradient_card.d.ts.map +1 -0
  262. package/lib/typescript/module/src/acmo/modules/inapp-notifications/components/modal-wrapper.d.ts +10 -0
  263. package/lib/typescript/module/src/acmo/modules/inapp-notifications/components/modal-wrapper.d.ts.map +1 -0
  264. package/lib/typescript/module/src/acmo/modules/inapp-notifications/controller.d.ts +22 -0
  265. package/lib/typescript/module/src/acmo/modules/inapp-notifications/controller.d.ts.map +1 -0
  266. package/lib/typescript/module/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.d.ts +6 -0
  267. package/lib/typescript/module/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.d.ts.map +1 -0
  268. package/lib/typescript/module/src/acmo/modules/inapp-notifications/inapp-notification-host.d.ts +7 -0
  269. package/lib/typescript/module/src/acmo/modules/inapp-notifications/inapp-notification-host.d.ts.map +1 -0
  270. package/lib/typescript/module/src/acmo/modules/inapp-notifications/inapp-notification-manager.d.ts +14 -0
  271. package/lib/typescript/module/src/acmo/modules/inapp-notifications/inapp-notification-manager.d.ts.map +1 -0
  272. package/lib/typescript/module/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.d.ts +4 -0
  273. package/lib/typescript/module/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.d.ts.map +1 -0
  274. package/lib/typescript/module/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.d.ts +7 -0
  275. package/lib/typescript/module/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.d.ts.map +1 -0
  276. package/lib/typescript/module/src/acmo/modules/inapp-notifications/repository.d.ts +8 -0
  277. package/lib/typescript/module/src/acmo/modules/inapp-notifications/repository.d.ts.map +1 -0
  278. package/lib/typescript/module/src/acmo/modules/inapp-notifications/tyrads-global-host.d.ts +6 -0
  279. package/lib/typescript/module/src/acmo/modules/inapp-notifications/tyrads-global-host.d.ts.map +1 -0
  280. package/lib/typescript/module/src/acmo/modules/localization/localization_context.d.ts.map +1 -1
  281. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/active_offers_button.d.ts.map +1 -0
  282. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/custom_card.d.ts.map +1 -0
  283. package/lib/typescript/{commonjs/src/acmo/modules/dashboard → module/src/acmo/modules/premium-widgets}/components/custom_scroller.d.ts +3 -0
  284. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/custom_scroller.d.ts.map +1 -0
  285. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/custom_shimmer.d.ts.map +1 -0
  286. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/offer_card.d.ts.map +1 -0
  287. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/offer_list_item.d.ts.map +1 -0
  288. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/premium_empty_widget.d.ts.map +1 -0
  289. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/premium_header.d.ts.map +1 -0
  290. package/lib/typescript/{commonjs/src/acmo/modules/dashboard → module/src/acmo/modules/premium-widgets}/components/premium_loading.d.ts +1 -1
  291. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/premium_loading.d.ts.map +1 -0
  292. package/lib/typescript/module/src/acmo/modules/premium-widgets/controller.d.ts +14 -0
  293. package/lib/typescript/module/src/acmo/modules/premium-widgets/controller.d.ts.map +1 -0
  294. package/lib/typescript/module/src/acmo/modules/{dashboard/top_offers.d.ts → premium-widgets/premium_offers_widget.d.ts} +3 -3
  295. package/lib/typescript/module/src/acmo/modules/premium-widgets/premium_offers_widget.d.ts.map +1 -0
  296. package/lib/typescript/module/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.d.ts +9 -0
  297. package/lib/typescript/module/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.d.ts.map +1 -0
  298. package/lib/typescript/module/src/acmo/modules/premium-widgets/repository.d.ts +13 -0
  299. package/lib/typescript/module/src/acmo/modules/premium-widgets/repository.d.ts.map +1 -0
  300. package/lib/typescript/module/src/acmo/modules/push-notifications/apns-manager.d.ts +40 -0
  301. package/lib/typescript/module/src/acmo/modules/push-notifications/apns-manager.d.ts.map +1 -0
  302. package/lib/typescript/module/src/acmo/modules/push-notifications/fcm-manager.d.ts +32 -0
  303. package/lib/typescript/module/src/acmo/modules/push-notifications/fcm-manager.d.ts.map +1 -0
  304. package/lib/typescript/module/src/acmo_config.d.ts +1 -0
  305. package/lib/typescript/module/src/acmo_config.d.ts.map +1 -1
  306. package/lib/typescript/module/src/index.d.ts +5 -11
  307. package/lib/typescript/module/src/index.d.ts.map +1 -1
  308. package/package.json +5 -3
  309. package/readme.md +27 -14
  310. package/src/acmo/core/components/countdown-timer.tsx +52 -0
  311. package/src/acmo/core/components/snap-carousel.tsx +106 -0
  312. package/src/acmo/core/constants/api-endpoints.ts +12 -0
  313. package/src/acmo/core/helpers/colors.ts +16 -0
  314. package/src/acmo/core/helpers/logger.ts +11 -0
  315. package/src/acmo/core/helpers/patches.js +6 -0
  316. package/src/acmo/core/network/http-client.ts +89 -0
  317. package/src/acmo/core/network/network-common.ts +128 -0
  318. package/src/acmo/core/services/localization_service.ts +7 -14
  319. package/src/acmo/core/types/activated-campaings.d.ts +101 -0
  320. package/src/acmo/core/types/external_types.ts +7 -1
  321. package/src/acmo/core/types/types.d.ts +112 -76
  322. package/src/acmo/core/tyrads-sdk-core.tsx +258 -0
  323. package/src/acmo/modules/inapp-notifications/components/gradient_card.tsx +87 -0
  324. package/src/acmo/modules/inapp-notifications/components/modal-wrapper.tsx +59 -0
  325. package/src/acmo/modules/inapp-notifications/controller.ts +183 -0
  326. package/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.tsx +164 -0
  327. package/src/acmo/modules/inapp-notifications/inapp-notification-host.tsx +32 -0
  328. package/src/acmo/modules/inapp-notifications/inapp-notification-manager.ts +40 -0
  329. package/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.tsx +188 -0
  330. package/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.tsx +149 -0
  331. package/src/acmo/modules/inapp-notifications/repository.ts +49 -0
  332. package/src/acmo/modules/inapp-notifications/tyrads-global-host.tsx +25 -0
  333. package/src/acmo/modules/localization/localization_context.tsx +15 -2
  334. package/src/acmo/modules/{dashboard → premium-widgets}/components/custom_card.tsx +1 -2
  335. package/src/acmo/modules/{dashboard → premium-widgets}/components/custom_scroller.tsx +24 -10
  336. package/src/acmo/modules/{dashboard → premium-widgets}/components/offer_card.tsx +11 -11
  337. package/src/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.tsx +3 -3
  338. package/src/acmo/modules/{dashboard → premium-widgets}/components/premium_loading.tsx +1 -1
  339. package/src/acmo/modules/premium-widgets/controller.ts +39 -0
  340. package/src/acmo/modules/{dashboard/top_offers.tsx → premium-widgets/premium_offers_widget.tsx} +67 -45
  341. package/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.tsx +39 -0
  342. package/src/acmo/modules/premium-widgets/repository.ts +107 -0
  343. package/src/acmo/modules/push-notifications/apns-manager.ts +254 -0
  344. package/src/acmo/modules/push-notifications/fcm-manager.ts +162 -0
  345. package/src/acmo_config.ts +6 -5
  346. package/src/assets/images/alarm-clock.png +0 -0
  347. package/src/assets/images/circle-x.png +0 -0
  348. package/src/assets/images/coin.png +0 -0
  349. package/src/index.tsx +19 -127
  350. package/ios/Tyrads/user/AcmoUserUpdatePage.swift +0 -302
  351. package/ios/Tyrads/user/AcmoUsersUpdateController.swift +0 -26
  352. package/ios/Tyrads/user/Repository.swift +0 -89
  353. package/lib/commonjs/acmo/core/helpers/native_methods.js +0 -48
  354. package/lib/commonjs/acmo/core/helpers/native_methods.js.map +0 -1
  355. package/lib/commonjs/acmo/modules/dashboard/components/active_offers_button.js.map +0 -1
  356. package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js.map +0 -1
  357. package/lib/commonjs/acmo/modules/dashboard/components/custom_scroller.js.map +0 -1
  358. package/lib/commonjs/acmo/modules/dashboard/components/custom_shimmer.js.map +0 -1
  359. package/lib/commonjs/acmo/modules/dashboard/components/offer_card.js.map +0 -1
  360. package/lib/commonjs/acmo/modules/dashboard/components/offer_list_item.js.map +0 -1
  361. package/lib/commonjs/acmo/modules/dashboard/components/premium_empty_widget.js.map +0 -1
  362. package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js.map +0 -1
  363. package/lib/commonjs/acmo/modules/dashboard/components/premium_loading.js.map +0 -1
  364. package/lib/commonjs/acmo/modules/dashboard/repository.js +0 -147
  365. package/lib/commonjs/acmo/modules/dashboard/repository.js.map +0 -1
  366. package/lib/commonjs/acmo/modules/dashboard/top_offers.js.map +0 -1
  367. package/lib/module/acmo/core/helpers/native_methods.js +0 -44
  368. package/lib/module/acmo/core/helpers/native_methods.js.map +0 -1
  369. package/lib/module/acmo/modules/dashboard/components/active_offers_button.js.map +0 -1
  370. package/lib/module/acmo/modules/dashboard/components/custom_card.js.map +0 -1
  371. package/lib/module/acmo/modules/dashboard/components/custom_scroller.js.map +0 -1
  372. package/lib/module/acmo/modules/dashboard/components/custom_shimmer.js.map +0 -1
  373. package/lib/module/acmo/modules/dashboard/components/offer_card.js.map +0 -1
  374. package/lib/module/acmo/modules/dashboard/components/offer_list_item.js.map +0 -1
  375. package/lib/module/acmo/modules/dashboard/components/premium_empty_widget.js.map +0 -1
  376. package/lib/module/acmo/modules/dashboard/components/premium_header.js.map +0 -1
  377. package/lib/module/acmo/modules/dashboard/components/premium_loading.js.map +0 -1
  378. package/lib/module/acmo/modules/dashboard/repository.js +0 -140
  379. package/lib/module/acmo/modules/dashboard/repository.js.map +0 -1
  380. package/lib/module/acmo/modules/dashboard/top_offers.js.map +0 -1
  381. package/lib/typescript/commonjs/src/acmo/core/helpers/native_methods.d.ts +0 -10
  382. package/lib/typescript/commonjs/src/acmo/core/helpers/native_methods.d.ts.map +0 -1
  383. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/active_offers_button.d.ts.map +0 -1
  384. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_card.d.ts.map +0 -1
  385. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_scroller.d.ts.map +0 -1
  386. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_shimmer.d.ts.map +0 -1
  387. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_card.d.ts.map +0 -1
  388. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_list_item.d.ts.map +0 -1
  389. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts.map +0 -1
  390. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_header.d.ts.map +0 -1
  391. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_loading.d.ts.map +0 -1
  392. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts +0 -3
  393. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts.map +0 -1
  394. package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts.map +0 -1
  395. package/lib/typescript/module/src/acmo/core/helpers/native_methods.d.ts +0 -10
  396. package/lib/typescript/module/src/acmo/core/helpers/native_methods.d.ts.map +0 -1
  397. package/lib/typescript/module/src/acmo/modules/dashboard/components/active_offers_button.d.ts.map +0 -1
  398. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_card.d.ts.map +0 -1
  399. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_scroller.d.ts.map +0 -1
  400. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_shimmer.d.ts.map +0 -1
  401. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_card.d.ts.map +0 -1
  402. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_list_item.d.ts.map +0 -1
  403. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts.map +0 -1
  404. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_header.d.ts.map +0 -1
  405. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_loading.d.ts.map +0 -1
  406. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts +0 -3
  407. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts.map +0 -1
  408. package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts.map +0 -1
  409. package/src/acmo/core/helpers/native_methods.ts +0 -59
  410. package/src/acmo/modules/dashboard/repository.ts +0 -170
  411. /package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.js +0 -0
  412. /package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.js +0 -0
  413. /package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.js +0 -0
  414. /package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/premium_header.js +0 -0
  415. /package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.js +0 -0
  416. /package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.js +0 -0
  417. /package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.js +0 -0
  418. /package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/premium_header.js +0 -0
  419. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.d.ts +0 -0
  420. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/custom_card.d.ts +0 -0
  421. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.d.ts +0 -0
  422. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/offer_card.d.ts +0 -0
  423. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.d.ts +0 -0
  424. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.d.ts +0 -0
  425. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/premium_header.d.ts +0 -0
  426. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.d.ts +0 -0
  427. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/custom_card.d.ts +0 -0
  428. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.d.ts +0 -0
  429. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/offer_card.d.ts +0 -0
  430. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.d.ts +0 -0
  431. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.d.ts +0 -0
  432. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/premium_header.d.ts +0 -0
  433. /package/src/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.tsx +0 -0
  434. /package/src/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.tsx +0 -0
  435. /package/src/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.tsx +0 -0
  436. /package/src/acmo/modules/{dashboard → premium-widgets}/components/premium_header.tsx +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Modal","Pressable","View","StyleSheet","jsx","_jsx","jsxs","_jsxs","CardAlert","visible","onClose","children","useModal","content","style","styles","fullscreen","overlay","onPress","card","animationType","transparent","onRequestClose","create","flex","justifyContent","alignItems","absoluteFillObject","backgroundColor","width","zIndex"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/inapp-notifications/components/modal-wrapper.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,SAAS,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AASlE,OAAO,MAAMC,SAAmC,GAAGA,CAAC;EAClDC,OAAO;EACPC,OAAO;EACPC,QAAQ;EACRC,QAAQ,GAAG;AACb,CAAC,KAAK;EACJ,MAAMC,OAAO,gBACXN,KAAA,CAACL,IAAI;IAACY,KAAK,EAAEC,MAAM,CAACC,UAAW;IAAAL,QAAA,gBAC7BN,IAAA,CAACJ,SAAS;MAACa,KAAK,EAAEC,MAAM,CAACE,OAAQ;MAACC,OAAO,EAAER;IAAQ,CAAE,CAAC,eACtDL,IAAA,CAACH,IAAI;MAACY,KAAK,EAAEC,MAAM,CAACI,IAAK;MAAAR,QAAA,EACtBA;IAAQ,CACL,CAAC;EAAA,CACH,CACP;EAED,IAAI,CAACC,QAAQ,EAAE;IACb,OAAOH,OAAO,GAAGI,OAAO,GAAG,IAAI;EACjC;EAEA,oBACER,IAAA,CAACL,KAAK;IACJoB,aAAa,EAAC,MAAM;IACpBC,WAAW,EAAE,IAAK;IAClBZ,OAAO,EAAEA,OAAQ;IACjBa,cAAc,EAAEZ,OAAQ;IAAAC,QAAA,EAEvBE;EAAO,CACH,CAAC;AAEZ,CAAC;AAED,MAAME,MAAM,GAAGZ,UAAU,CAACoB,MAAM,CAAC;EAC/BP,UAAU,EAAE;IACVQ,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EAEDT,OAAO,EAAE;IACP,GAAGd,UAAU,CAACwB,kBAAkB;IAChCC,eAAe,EAAE;EACnB,CAAC;EAEDT,IAAI,EAAE;IACJU,KAAK,EAAE,MAAM;IACbH,UAAU,EAAE,QAAQ;IACpBI,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+
3
+ import InAppNotificationRepo from "./repository.js";
4
+ import { getData, saveData } from "../../core/storage/storage.js";
5
+ import AsyncStorage from "@react-native-async-storage/async-storage";
6
+ class InAppNotificationController {
7
+ static instance = null;
8
+ constructor() {}
9
+ static getInstance() {
10
+ if (!InAppNotificationController.instance) {
11
+ InAppNotificationController.instance = new InAppNotificationController();
12
+ }
13
+ return InAppNotificationController.instance;
14
+ }
15
+ currencySales = null;
16
+ limitedTimeEvents = null;
17
+ listeners = [];
18
+ addListener(listener) {
19
+ this.listeners.push(listener);
20
+ return () => {
21
+ this.listeners = this.listeners.filter(l => l !== listener);
22
+ };
23
+ }
24
+ notifyListeners() {
25
+ this.listeners.forEach(l => l());
26
+ }
27
+ async getUserId() {
28
+ try {
29
+ const userId = await getData('xUserId');
30
+ if (userId) return userId;
31
+ const data = await AsyncStorage.getItem('apiHeaders');
32
+ if (!data) return 'default';
33
+ const parsed = JSON.parse(data);
34
+ const headers = typeof parsed === 'string' ? JSON.parse(parsed) : parsed;
35
+ return headers['xUserId'] || 'default';
36
+ } catch {
37
+ return 'default';
38
+ }
39
+ }
40
+ async getCurrencySalesKey() {
41
+ const userId = await this.getUserId();
42
+ return `currency_sales_shown_${userId}`;
43
+ }
44
+ async getLimitedTimeOffersKey() {
45
+ const userId = await this.getUserId();
46
+ return `limited_time_offers_shown_${userId}`;
47
+ }
48
+ getTodayDateString() {
49
+ return new Date().toDateString();
50
+ }
51
+ async markCurrencySalesAsShown() {
52
+ if (!this.currencySales?.name) return;
53
+ const key = await this.getCurrencySalesKey();
54
+ const shownData = (await getData(key)) || {};
55
+ const safeShownData = typeof shownData === 'object' && shownData !== null ? shownData : {};
56
+ safeShownData[this.currencySales.name] = this.getTodayDateString();
57
+ await saveData(key, safeShownData);
58
+ }
59
+ async markLimitedTimeOffersAsShown() {
60
+ if (!this.limitedTimeEvents) return;
61
+ const key = await this.getLimitedTimeOffersKey();
62
+ const shownData = (await getData(key)) || {};
63
+ const safeShownData = typeof shownData === 'object' && shownData !== null ? shownData : {};
64
+ const today = this.getTodayDateString();
65
+ this.limitedTimeEvents.forEach(campaign => {
66
+ campaign.limitedTimeEvents.forEach(event => {
67
+ safeShownData[event.appEventId.toString()] = today;
68
+ });
69
+ });
70
+ await saveData(key, safeShownData);
71
+ }
72
+ async init() {
73
+ const [currencySalesKey, limitedTimeOffersKey] = await Promise.all([this.getCurrencySalesKey(), this.getLimitedTimeOffersKey()]);
74
+ const [currencySalesShownData, limitedTimeOffersShownData] = await Promise.all([getData(currencySalesKey), getData(limitedTimeOffersKey)]);
75
+ const today = this.getTodayDateString();
76
+ const isCurrencyShownToday = currencySalesShownData && Object.values(currencySalesShownData).includes(today);
77
+ const isLimitedShownToday = limitedTimeOffersShownData && Object.values(limitedTimeOffersShownData).includes(today);
78
+ const [currencySalesResult, limitedTimeOffersResult] = await Promise.all([!isCurrencyShownToday ? InAppNotificationRepo.getInstance().fetchCurrencySales() : Promise.resolve(null), !isLimitedShownToday ? InAppNotificationRepo.getInstance().fetchLimitedTimeOffers() : Promise.resolve(null)]);
79
+ if (currencySalesResult && currencySalesResult.name) {
80
+ const hasBeenShownEver = currencySalesShownData && !!currencySalesShownData[currencySalesResult.name];
81
+ this.currencySales = !hasBeenShownEver ? currencySalesResult : null;
82
+ } else {
83
+ this.currencySales = null;
84
+ }
85
+ const activeOffers = limitedTimeOffersResult?.data || [];
86
+ const allFilteredOffers = this.filterLimitedOffersWithEvents(activeOffers);
87
+ const hasNewEvent = allFilteredOffers.some(campaign => campaign.limitedTimeEvents.some(event => !limitedTimeOffersShownData || !limitedTimeOffersShownData[event.appEventId.toString()]));
88
+ if (hasNewEvent) {
89
+ this.limitedTimeEvents = allFilteredOffers;
90
+ } else if (!this.limitedTimeEvents) {
91
+ this.limitedTimeEvents = null;
92
+ }
93
+ this.notifyListeners();
94
+ return !!(this.currencySales || this.limitedTimeEvents);
95
+ }
96
+ filterLimitedOffersWithEvents(activeOffers) {
97
+ const allCampaigns = activeOffers.filter(group => group.groupName?.toLowerCase() == "hotdeals").flatMap(offer => offer.campaigns).filter(campaign => campaign.limitedTimeEvents.length > 0).filter(campaign => campaign.campaignStatus?.toLowerCase() !== 'suspended' && campaign.validity?.isInstalled).filter(campaign => campaign.limitedTimeEvents.some(event => event.conversionStatus?.toLowerCase() !== "approved"));
98
+ const uniqueCampaigns = allCampaigns.filter((campaign, index, self) => index === self.findIndex(c => c.campaignId === campaign.campaignId));
99
+ return uniqueCampaigns;
100
+ }
101
+ showCountdown(event) {
102
+ const {
103
+ allowDuplicateEvents,
104
+ conversionStatus,
105
+ dailyCount,
106
+ dailyLimit
107
+ } = event;
108
+ const isDailyLimitIncomplete = dailyCount === null || dailyLimit === null || dailyCount < dailyLimit;
109
+ if (!allowDuplicateEvents) {
110
+ return conversionStatus === null;
111
+ }
112
+ if (isDailyLimitIncomplete) {
113
+ return true;
114
+ }
115
+ return false;
116
+ }
117
+ getFinalStatusString(event) {
118
+ const {
119
+ allowDuplicateEvents,
120
+ conversionStatus,
121
+ dailyCount,
122
+ dailyLimit
123
+ } = event;
124
+ if (!allowDuplicateEvents) {
125
+ if (conversionStatus === 'approved') return 'Completed';
126
+ if (conversionStatus === 'rejected') return 'Rejected';
127
+ }
128
+ const isDailyLimitComplete = dailyCount !== null && dailyLimit !== null && dailyCount === dailyLimit;
129
+ if (allowDuplicateEvents && isDailyLimitComplete) {
130
+ return 'Completed';
131
+ }
132
+ return '';
133
+ }
134
+ }
135
+ export default InAppNotificationController;
136
+ //# sourceMappingURL=controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["InAppNotificationRepo","getData","saveData","AsyncStorage","InAppNotificationController","instance","constructor","getInstance","currencySales","limitedTimeEvents","listeners","addListener","listener","push","filter","l","notifyListeners","forEach","getUserId","userId","data","getItem","parsed","JSON","parse","headers","getCurrencySalesKey","getLimitedTimeOffersKey","getTodayDateString","Date","toDateString","markCurrencySalesAsShown","name","key","shownData","safeShownData","markLimitedTimeOffersAsShown","today","campaign","event","appEventId","toString","init","currencySalesKey","limitedTimeOffersKey","Promise","all","currencySalesShownData","limitedTimeOffersShownData","isCurrencyShownToday","Object","values","includes","isLimitedShownToday","currencySalesResult","limitedTimeOffersResult","fetchCurrencySales","resolve","fetchLimitedTimeOffers","hasBeenShownEver","activeOffers","allFilteredOffers","filterLimitedOffersWithEvents","hasNewEvent","some","allCampaigns","group","groupName","toLowerCase","flatMap","offer","campaigns","length","campaignStatus","validity","isInstalled","conversionStatus","uniqueCampaigns","index","self","findIndex","c","campaignId","showCountdown","allowDuplicateEvents","dailyCount","dailyLimit","isDailyLimitIncomplete","getFinalStatusString","isDailyLimitComplete"],"sourceRoot":"../../../../../src","sources":["acmo/modules/inapp-notifications/controller.ts"],"mappings":";;AAAA,OAAOA,qBAAqB,MAAM,iBAAc;AAChD,SAASC,OAAO,EAAEC,QAAQ,QAAQ,+BAA4B;AAC9D,OAAOC,YAAY,MAAM,2CAA2C;AAEpE,MAAMC,2BAA2B,CAAC;EAChC,O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AAE;MACzB,IAAIR,gBAAgB,KAAK,UAAU,EAAE,OAAO,WAAW;MACvD,IAAIA,gBAAgB,KAAK,UAAU,EAAE,OAAO,UAAU;IACxD;IAEA,MAAMa,oBAAoB,GAAGJ,UAAU,KAAK,IAAI,IAAIC,UAAU,KAAK,IAAI,IAAID,UAAU,KAAKC,UAAU;IACpG,IAAIF,oBAAoB,IAAIK,oBAAoB,EAAE;MAChD,OAAO,WAAW;IACpB;IACA,OAAO,EAAE;EACX;AAEF;AAEA,eAAerF,2BAA2B","ignoreList":[]}
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+
3
+ import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
4
+ import { CardAlert } from "../components/modal-wrapper.js";
5
+ import { useEffect, useState } from "react";
6
+ import { CardGradient } from "../components/gradient_card.js";
7
+ import { CountdownTimer } from "../../../core/components/countdown-timer.js";
8
+ import TyradsSdkCoreMethods, { TyradsSdkCore } from "../../../core/tyrads-sdk-core.js";
9
+ import InAppNotificationController from "../controller.js";
10
+ import NotificationManager from "../inapp-notification-manager.js";
11
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
+ export const CurrencySalesNotif = ({
13
+ useModal = true
14
+ }) => {
15
+ const [visible, setVisible] = useState(false);
16
+ const [currencySales, setCurrencySales] = useState(null);
17
+ const controller = InAppNotificationController.getInstance();
18
+ const notificationManager = NotificationManager.getInstance();
19
+ useEffect(() => {
20
+ const updateFromController = () => {
21
+ if (controller.currencySales) {
22
+ setCurrencySales(controller.currencySales);
23
+ } else {
24
+ setCurrencySales(null);
25
+ }
26
+ };
27
+ updateFromController();
28
+ const unsubscribe = controller.addListener(updateFromController);
29
+ return unsubscribe;
30
+ }, []);
31
+ useEffect(() => {
32
+ const unsubscribe = notificationManager.addListener(() => {
33
+ updateVisibility();
34
+ });
35
+ return unsubscribe;
36
+ }, []);
37
+ useEffect(() => {
38
+ if (currencySales) {
39
+ notificationManager.setCurrencySalesVisible(true);
40
+ updateVisibility();
41
+ } else {
42
+ notificationManager.setCurrencySalesVisible(false);
43
+ }
44
+ }, [currencySales]);
45
+ const updateVisibility = () => {
46
+ const shouldShow = notificationManager.shouldShowCurrencySales();
47
+ setVisible(shouldShow);
48
+ if (shouldShow) {
49
+ controller.markCurrencySalesAsShown();
50
+ }
51
+ };
52
+ const handleClose = () => {
53
+ setVisible(false);
54
+ notificationManager.setCurrencySalesVisible(false);
55
+ if (!useModal) {
56
+ TyradsSdkCoreMethods.dismissInAppNotification();
57
+ }
58
+ };
59
+ const handleButtonPress = () => {
60
+ handleClose();
61
+ setTimeout(() => {
62
+ TyradsSdkCoreMethods.showOffers({
63
+ launchMode: 2
64
+ });
65
+ }, 400);
66
+ };
67
+ return /*#__PURE__*/_jsx(CardAlert, {
68
+ visible: visible,
69
+ onClose: handleClose,
70
+ useModal: useModal,
71
+ children: /*#__PURE__*/_jsxs(CardGradient, {
72
+ onClose: handleClose,
73
+ children: [/*#__PURE__*/_jsx(Text, {
74
+ style: styles.title,
75
+ children: "Bonus Rewards \nUnlocked!"
76
+ }), /*#__PURE__*/_jsx(View, {
77
+ style: styles.horizontalLine
78
+ }), /*#__PURE__*/_jsx(Text, {
79
+ style: styles.subtitle,
80
+ children: `You get ${currencySales?.multiplier}X bonus rewards!`
81
+ }), /*#__PURE__*/_jsx(Text, {
82
+ style: styles.text,
83
+ children: "Go to offerwall and activate new offer!"
84
+ }), /*#__PURE__*/_jsxs(View, {
85
+ style: styles.timerContainer,
86
+ children: [/*#__PURE__*/_jsx(Text, {
87
+ style: styles.timerMessage,
88
+ children: "Bonus Expires in "
89
+ }), /*#__PURE__*/_jsx(CountdownTimer, {
90
+ style: styles.timer,
91
+ duration: currencySales?.remainingTimeSeconds ?? 0
92
+ })]
93
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
94
+ style: [styles.outlinedButton, {
95
+ borderColor: TyradsSdkCore.getInstance().mainColor || "#02B5BE",
96
+ backgroundColor: "white"
97
+ }],
98
+ onPress: handleButtonPress,
99
+ activeOpacity: 0.8,
100
+ children: /*#__PURE__*/_jsx(View, {
101
+ style: styles.outlinedButtonTextContainer,
102
+ children: /*#__PURE__*/_jsx(Text, {
103
+ style: [styles.outlinedButtonText, {
104
+ color: TyradsSdkCore.getInstance().mainColor || "#02B5BE"
105
+ }],
106
+ children: "Go to Offerwall"
107
+ })
108
+ })
109
+ })]
110
+ })
111
+ });
112
+ };
113
+ const styles = StyleSheet.create({
114
+ title: {
115
+ fontSize: 16,
116
+ fontWeight: '700',
117
+ color: '#1E2020',
118
+ textAlign: 'center',
119
+ marginTop: 20
120
+ },
121
+ horizontalLine: {
122
+ width: '100%',
123
+ borderBottomColor: '#E0E2E7',
124
+ borderBottomWidth: 1,
125
+ marginVertical: 16
126
+ },
127
+ subtitle: {
128
+ fontSize: 12,
129
+ fontWeight: '700',
130
+ color: '#1E2020',
131
+ textAlign: 'center'
132
+ },
133
+ text: {
134
+ fontSize: 12,
135
+ fontWeight: '400',
136
+ color: '#1E2020',
137
+ textAlign: 'center',
138
+ marginBottom: 16
139
+ },
140
+ timerContainer: {
141
+ flexDirection: 'row',
142
+ justifyContent: 'center',
143
+ alignItems: 'center',
144
+ marginBottom: 16,
145
+ backgroundColor: "#FF554A",
146
+ paddingVertical: 4,
147
+ borderRadius: 20
148
+ },
149
+ timer: {
150
+ fontSize: 12,
151
+ fontWeight: '700',
152
+ color: '#FFFFFF'
153
+ },
154
+ timerMessage: {
155
+ fontSize: 12,
156
+ fontWeight: '700',
157
+ color: '#FFFFFF',
158
+ marginLeft: 8
159
+ },
160
+ outlinedButton: {
161
+ borderWidth: 2,
162
+ borderRadius: 30,
163
+ justifyContent: 'center',
164
+ height: 42
165
+ },
166
+ outlinedButtonTextContainer: {
167
+ justifyContent: 'center',
168
+ alignItems: 'center'
169
+ },
170
+ outlinedButtonText: {
171
+ color: '#02B5BE',
172
+ fontSize: 14,
173
+ fontWeight: '600'
174
+ }
175
+ });
176
+ //# sourceMappingURL=currency-sales-notif.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","Text","TouchableOpacity","View","CardAlert","useEffect","useState","CardGradient","CountdownTimer","TyradsSdkCoreMethods","TyradsSdkCore","InAppNotificationController","NotificationManager","jsx","_jsx","jsxs","_jsxs","CurrencySalesNotif","useModal","visible","setVisible","currencySales","setCurrencySales","controller","getInstance","notificationManager","updateFromController","unsubscribe","addListener","updateVisibility","setCurrencySalesVisible","shouldShow","shouldShowCurrencySales","markCurrencySalesAsShown","handleClose","dismissInAppNotification","handleButtonPress","setTimeout","showOffers","launchMode","onClose","children","style","styles","title","horizontalLine","subtitle","multiplier","text","timerContainer","timerMessage","timer","duration","remainingTimeSeconds","outlinedButton","borderColor","mainColor","backgroundColor","onPress","activeOpacity","outlinedButtonTextContainer","outlinedButtonText","color","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,SAASA,UAAU,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AACvE,SAASC,SAAS,QAAQ,gCAA6B;AACvD,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,YAAY,QAAQ,gCAA6B;AAC1D,SAASC,cAAc,QAAQ,6CAA0C;AACzE,OAAOC,oBAAoB,IAAIC,aAAa,QAAQ,kCAA+B;AACnF,OAAOC,2BAA2B,MAAM,kBAAe;AACvD,OAAOC,mBAAmB,MAAM,kCAA+B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAMhE,OAAO,MAAMC,kBAA6C,GAAGA,CAAC;EAAEC,QAAQ,GAAG;AAAK,CAAC,KAAK;EAEpF,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGd,QAAQ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E;IACJgB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBH,KAAK,EAAE,SAAS;IAChBI,SAAS,EAAE,QAAQ;IACnBM,YAAY,EAAE;EAChB,CAAC;EACDvB,cAAc,EAAE;IACdwB,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBH,YAAY,EAAE,EAAE;IAChBf,eAAe,EAAE,SAAS;IAC1BmB,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE;EAChB,CAAC;EACD1B,KAAK,EAAE;IACLa,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBH,KAAK,EAAE;EACT,CAAC;EACDZ,YAAY,EAAE;IACZc,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBH,KAAK,EAAE,SAAS;IAChBgB,UAAU,EAAE;EACd,CAAC;EACDxB,cAAc,EAAE;IACdyB,WAAW,EAAE,CAAC;IACdF,YAAY,EAAE,EAAE;IAChBH,cAAc,EAAE,QAAQ;IACxBM,MAAM,EAAE;EACV,CAAC;EACDpB,2BAA2B,EAAE;IAC3Bc,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDd,kBAAkB,EAAE;IAClBC,KAAK,EAAE,SAAS;IAChBE,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ import { View } from "react-native";
4
+ import { CurrencySalesNotif } from "./currency-sales/currency-sales-notif.js";
5
+ import { LimitedTimeEventsNotif } from "./limited-time-offer/limited-time-notif.js";
6
+ import { useEffect } from "react";
7
+ import InAppNotificationController from "./controller.js";
8
+ import TyradsSdkCoreMethods from "../../core/tyrads-sdk-core.js";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ const InAppNotificationHost = ({
11
+ useModal = true,
12
+ style
13
+ }) => {
14
+ useEffect(() => {
15
+ const initializeInAppNotifications = async () => {
16
+ if (TyradsSdkCoreMethods.apiKey) {
17
+ await InAppNotificationController.getInstance().init();
18
+ }
19
+ };
20
+ initializeInAppNotifications();
21
+ }, []);
22
+ return /*#__PURE__*/_jsxs(View, {
23
+ style: style,
24
+ children: [/*#__PURE__*/_jsx(CurrencySalesNotif, {
25
+ useModal: useModal
26
+ }), /*#__PURE__*/_jsx(LimitedTimeEventsNotif, {
27
+ useModal: useModal
28
+ })]
29
+ });
30
+ };
31
+ export default InAppNotificationHost;
32
+ //# sourceMappingURL=inapp-notification-host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["View","CurrencySalesNotif","LimitedTimeEventsNotif","useEffect","InAppNotificationController","TyradsSdkCoreMethods","jsx","_jsx","jsxs","_jsxs","InAppNotificationHost","useModal","style","initializeInAppNotifications","apiKey","getInstance","init","children"],"sourceRoot":"../../../../../src","sources":["acmo/modules/inapp-notifications/inapp-notification-host.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,SAASC,kBAAkB,QAAQ,0CAAuC;AAC1E,SAASC,sBAAsB,QAAQ,4CAAyC;AAChF,SAASC,SAAS,QAAQ,OAAO;AACjC,OAAOC,2BAA2B,MAAM,iBAAc;AAEtD,OAAOC,oBAAoB,MAAM,+BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAO9D,MAAMC,qBAA2D,GAAGA,CAAC;EAAEC,QAAQ,GAAG,IAAI;EAAEC;AAAM,CAAC,KAAK;EAClGT,SAAS,CAAC,MAAM;IACd,MAAMU,4BAA4B,GAAG,MAAAA,CAAA,KAAY;MAC/C,IAAIR,oBAAoB,CAACS,MAAM,EAAE;QAC/B,MAAMV,2BAA2B,CAACW,WAAW,CAAC,CAAC,CAACC,IAAI,CAAC,CAAC;MACxD;IACF,CAAC;IACDH,4BAA4B,CAAC,CAAC;EAChC,CAAC,EAAE,EAAE,CAAC;EAEN,oBACEJ,KAAA,CAACT,IAAI;IAACY,KAAK,EAAEA,KAAM;IAAAK,QAAA,gBACjBV,IAAA,CAACN,kBAAkB;MAACU,QAAQ,EAAEA;IAAS,CAAE,CAAC,eAC1CJ,IAAA,CAACL,sBAAsB;MAACS,QAAQ,EAAEA;IAAS,CAAE,CAAC;EAAA,CAC1C,CAAC;AAEX,CAAC;AAED,eAAeD,qBAAqB","ignoreList":[]}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ class NotificationManager {
4
+ limitedTimeVisible = false;
5
+ currencySalesVisible = false;
6
+ listeners = [];
7
+ static getInstance() {
8
+ if (!NotificationManager.instance) {
9
+ NotificationManager.instance = new NotificationManager();
10
+ }
11
+ return NotificationManager.instance;
12
+ }
13
+ setLimitedTimeVisible(visible) {
14
+ this.limitedTimeVisible = visible;
15
+ this.notifyListeners();
16
+ }
17
+ setCurrencySalesVisible(visible) {
18
+ this.currencySalesVisible = visible;
19
+ this.notifyListeners();
20
+ }
21
+ shouldShowCurrencySales() {
22
+ return this.currencySalesVisible && !this.limitedTimeVisible;
23
+ }
24
+ addListener(listener) {
25
+ this.listeners.push(listener);
26
+ return () => {
27
+ this.listeners = this.listeners.filter(l => l !== listener);
28
+ };
29
+ }
30
+ notifyListeners() {
31
+ this.listeners.forEach(listener => listener());
32
+ }
33
+ }
34
+ export default NotificationManager;
35
+ //# 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"],"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;AAEA,eAAeZ,mBAAmB","ignoreList":[]}
@@ -0,0 +1,200 @@
1
+ "use strict";
2
+
3
+ import { useEffect } from "react";
4
+ import { FlatList, Image, StyleSheet, Text, TouchableOpacity, View } from "react-native";
5
+ import { Logger } from "../../../../core/helpers/logger.js";
6
+ import { numeral } from "../../../../core/helpers/numeral.js";
7
+ import { CountdownTimer } from "../../../../core/components/countdown-timer.js";
8
+ import InAppNotificationController from "../../controller.js";
9
+ import { acmoLaunchURL } from "../../../../core/helpers/launcher.js";
10
+ import { TyradsSdkCore } from "../../../../core/tyrads-sdk-core.js";
11
+ import { getContrastColor } from "../../../../core/helpers/colors.js";
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ export const LimitedTimeOfferCard = ({
14
+ activatedCampaign
15
+ }) => {
16
+ const controller = InAppNotificationController.getInstance();
17
+ useEffect(() => {
18
+ Logger.log('activatedCampaign in offer card', activatedCampaign);
19
+ });
20
+ const handleButtonPress = link => {
21
+ acmoLaunchURL(link);
22
+ };
23
+ return /*#__PURE__*/_jsxs(View, {
24
+ style: styles.container,
25
+ children: [/*#__PURE__*/_jsx(Image, {
26
+ source: require('../../../../../assets/images/alarm-clock.png'),
27
+ style: styles.bgImage
28
+ }), /*#__PURE__*/_jsxs(View, {
29
+ style: styles.appHeader,
30
+ children: [/*#__PURE__*/_jsx(Image, {
31
+ source: {
32
+ uri: activatedCampaign?.app.thumbnail
33
+ },
34
+ style: styles.thumbnail
35
+ }), /*#__PURE__*/_jsx(Text, {
36
+ style: styles.appName,
37
+ children: activatedCampaign?.app.title
38
+ })]
39
+ }), /*#__PURE__*/_jsx(FlatList, {
40
+ data: activatedCampaign?.limitedTimeEvents || [],
41
+ keyExtractor: (_, index) => index.toString(),
42
+ renderItem: ({
43
+ item: event,
44
+ index
45
+ }) => /*#__PURE__*/_jsxs(View, {
46
+ style: styles.eventContainer,
47
+ children: [/*#__PURE__*/_jsxs(View, {
48
+ style: styles.eventNameContainer,
49
+ children: [/*#__PURE__*/_jsx(Text, {
50
+ style: styles.eventName,
51
+ children: event.eventName
52
+ }), /*#__PURE__*/_jsxs(View, {
53
+ style: styles.eventPayoutRow,
54
+ children: [/*#__PURE__*/_jsx(Image, {
55
+ style: styles.eventCurrencyIcon,
56
+ source: {
57
+ uri: Object.values(activatedCampaign?.availableCurrencies || {})[0]?.currencyIcon
58
+ }
59
+ }), /*#__PURE__*/_jsx(Text, {
60
+ style: [styles.eventPayout, {
61
+ color: TyradsSdkCore.getInstance().mainColor || '#02B5BE'
62
+ }],
63
+ children: numeral(Object.values(event.payoutInfo || {})[0]?.payoutAmountConverted ?? 0)
64
+ })]
65
+ })]
66
+ }), !controller.showCountdown(event) ? /*#__PURE__*/_jsx(Text, {
67
+ style: [styles.eventStatus, {
68
+ color: event.conversionStatus == 'approved' ? '#A3A9B6' : '#FF554A'
69
+ }],
70
+ children: controller.getFinalStatusString(event)
71
+ }) : /*#__PURE__*/_jsx(View, {
72
+ style: styles.timerContainer,
73
+ children: /*#__PURE__*/_jsx(CountdownTimer, {
74
+ style: styles.timer,
75
+ duration: event.limitedTimeEventRemainingSeconds
76
+ })
77
+ })]
78
+ }, index),
79
+ style: styles.eventsContainer,
80
+ showsVerticalScrollIndicator: false,
81
+ nestedScrollEnabled: true
82
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
83
+ style: [styles.filledButton, {
84
+ backgroundColor: TyradsSdkCore.getInstance().mainColor || "#02B5BE"
85
+ }],
86
+ onPress: () => handleButtonPress(activatedCampaign?.app.previewUrl || ''),
87
+ activeOpacity: 0.8,
88
+ children: /*#__PURE__*/_jsx(Text, {
89
+ style: [styles.btnText, {
90
+ color: getContrastColor(TyradsSdkCore.getInstance().mainColor || "white")
91
+ }],
92
+ children: "Play Now"
93
+ })
94
+ })]
95
+ });
96
+ };
97
+ const styles = StyleSheet.create({
98
+ container: {
99
+ position: 'relative',
100
+ borderRadius: 16,
101
+ width: '100%',
102
+ maxWidth: '100%',
103
+ height: 378,
104
+ padding: 16,
105
+ backgroundColor: '#FFF9ED',
106
+ overflow: 'hidden'
107
+ },
108
+ bgImage: {
109
+ position: 'absolute',
110
+ right: 0,
111
+ bottom: 0
112
+ },
113
+ thumbnail: {
114
+ width: 43,
115
+ height: 43,
116
+ borderRadius: 7,
117
+ marginRight: 13
118
+ },
119
+ appHeader: {
120
+ flexDirection: 'row',
121
+ alignItems: 'center',
122
+ marginBottom: 16
123
+ },
124
+ appName: {
125
+ width: '75%',
126
+ fontSize: 12,
127
+ fontWeight: '600',
128
+ color: '#1E2020',
129
+ marginRight: 16
130
+ },
131
+ eventsContainer: {
132
+ maxHeight: 350
133
+ },
134
+ eventContainer: {
135
+ flexDirection: 'row',
136
+ backgroundColor: 'white',
137
+ paddingVertical: 8,
138
+ paddingHorizontal: 16,
139
+ alignItems: 'center',
140
+ justifyContent: 'space-between',
141
+ borderRadius: 8,
142
+ marginBottom: 16,
143
+ shadowColor: '#000',
144
+ shadowOffset: {
145
+ width: 0,
146
+ height: 8
147
+ },
148
+ shadowOpacity: 0.06,
149
+ shadowRadius: 10
150
+ },
151
+ eventNameContainer: {
152
+ width: '58%',
153
+ marginRight: 8
154
+ },
155
+ eventName: {
156
+ fontSize: 12,
157
+ color: '#1E2020'
158
+ },
159
+ eventPayoutRow: {
160
+ flexDirection: 'row',
161
+ alignItems: 'center',
162
+ marginTop: 4
163
+ },
164
+ eventCurrencyIcon: {
165
+ width: 12,
166
+ height: 12,
167
+ marginRight: 4,
168
+ resizeMode: 'contain'
169
+ },
170
+ eventPayout: {
171
+ fontSize: 12,
172
+ fontWeight: '700'
173
+ },
174
+ eventStatus: {
175
+ fontSize: 10,
176
+ fontWeight: '600'
177
+ },
178
+ timerContainer: {
179
+ backgroundColor: '#FF554A',
180
+ paddingVertical: 2,
181
+ paddingHorizontal: 8,
182
+ borderRadius: 10
183
+ },
184
+ timer: {
185
+ fontSize: 12,
186
+ fontWeight: '700',
187
+ color: 'white'
188
+ },
189
+ filledButton: {
190
+ borderRadius: 8,
191
+ paddingVertical: 12,
192
+ alignItems: 'center'
193
+ },
194
+ btnText: {
195
+ fontSize: 12,
196
+ fontWeight: '600',
197
+ color: 'white'
198
+ }
199
+ });
200
+ //# sourceMappingURL=limited-time-offer-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","FlatList","Image","StyleSheet","Text","TouchableOpacity","View","Logger","numeral","CountdownTimer","InAppNotificationController","acmoLaunchURL","TyradsSdkCore","getContrastColor","jsx","_jsx","jsxs","_jsxs","LimitedTimeOfferCard","activatedCampaign","controller","getInstance","log","handleButtonPress","link","style","styles","container","children","source","require","bgImage","appHeader","uri","app","thumbnail","appName","title","data","limitedTimeEvents","keyExtractor","_","index","toString","renderItem","item","event","eventContainer","eventNameContainer","eventName","eventPayoutRow","eventCurrencyIcon","Object","values","availableCurrencies","currencyIcon","eventPayout","color","mainColor","payoutInfo","payoutAmountConverted","showCountdown","eventStatus","conversionStatus","getFinalStatusString","timerContainer","timer","duration","limitedTimeEventRemainingSeconds","eventsContainer","showsVerticalScrollIndicator","nestedScrollEnabled","filledButton","backgroundColor","onPress","previewUrl","activeOpacity","btnText","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,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,QAAQ,EAAEC,KAAK,EAAEC,UAAU,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AACxF,SAASC,MAAM,QAAQ,oCAAiC;AACxD,SAASC,OAAO,QAAQ,qCAAkC;AAC1D,SAASC,cAAc,QAAQ,gDAA6C;AAC5E,OAAOC,2BAA2B,MAAM,qBAAkB;AAC1D,SAASC,aAAa,QAAQ,sCAAmC;AACjE,SAASC,aAAa,QAAQ,qCAAkC;AAChE,SAASC,gBAAgB,QAAQ,oCAAiC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElE,OAAO,MAAMC,oBAA+E,GAAGA,CAAC;EAAEC;AAAkB,CAAC,KAAK;EAExH,MAAMC,UAAU,GAAGV,2BAA2B,CAACW,WAAW,CAAC,CAAC;EAE5DrB,SAAS,CAAC,MAAM;IACdO,MAAM,CAACe,GAAG,CAAC,iCAAiC,EA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