@tyrads.com/tyrads-sdk 3.0.0-beta.0 → 3.2.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.
Files changed (289) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/tyradssdk/TyradsSdkModule.kt +130 -29
  3. package/ios/Tyrads/AcmoAssets.swift +14 -0
  4. package/ios/Tyrads/ApiHeaders.swift +1 -0
  5. package/ios/Tyrads/InitModel.swift +3 -0
  6. package/ios/Tyrads/Tyrads.swift +255 -213
  7. package/ios/Tyrads/WebViewController.swift +195 -0
  8. package/ios/Tyrads/core/utils/AcmoKeyNames.swift +29 -0
  9. package/ios/Tyrads/core/utils/ColorExtension.swift +55 -0
  10. package/ios/Tyrads/core/utils/Services/LocalizationService.swift +175 -0
  11. package/ios/Tyrads/helpers/device_details.swift +160 -0
  12. package/ios/Tyrads/legal/AcmoPrivacyPage.swift +353 -0
  13. package/ios/Tyrads/legal/PrivacyPageController.swift +31 -0
  14. package/ios/Tyrads/user/AcmoUserUpdatePage.swift +302 -0
  15. package/ios/Tyrads/user/AcmoUsersUpdateController.swift +26 -0
  16. package/ios/Tyrads/user/Repository.swift +89 -0
  17. package/ios/TyradsSdk.mm +22 -4
  18. package/ios/TyradsSdk.swift +101 -31
  19. package/lib/commonjs/acmo/core/helpers/launcher.js +20 -0
  20. package/lib/commonjs/acmo/core/helpers/launcher.js.map +1 -0
  21. package/lib/commonjs/acmo/core/helpers/native_methods.js +37 -0
  22. package/lib/commonjs/acmo/core/helpers/native_methods.js.map +1 -0
  23. package/lib/commonjs/acmo/core/helpers/numeral.js +19 -0
  24. package/lib/commonjs/acmo/core/helpers/numeral.js.map +1 -0
  25. package/lib/commonjs/acmo/core/services/localization_service.js +164 -0
  26. package/lib/commonjs/acmo/core/services/localization_service.js.map +1 -0
  27. package/lib/commonjs/acmo/core/storage/storage.js +15 -1
  28. package/lib/commonjs/acmo/core/storage/storage.js.map +1 -1
  29. package/lib/commonjs/acmo/modules/dashboard/components/active_offers_button.js +79 -0
  30. package/lib/commonjs/acmo/modules/dashboard/components/active_offers_button.js.map +1 -0
  31. package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js +7 -10
  32. package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js.map +1 -1
  33. package/lib/commonjs/acmo/modules/dashboard/components/custom_scroller.js +141 -0
  34. package/lib/commonjs/acmo/modules/dashboard/components/custom_scroller.js.map +1 -0
  35. package/lib/commonjs/acmo/{core/marquee.js → modules/dashboard/components/custom_shimmer.js} +46 -34
  36. package/lib/commonjs/acmo/modules/dashboard/components/custom_shimmer.js.map +1 -0
  37. package/lib/commonjs/acmo/modules/dashboard/components/offer_card.js +263 -0
  38. package/lib/commonjs/acmo/modules/dashboard/components/offer_card.js.map +1 -0
  39. package/lib/commonjs/acmo/modules/dashboard/components/offer_list_item.js +203 -0
  40. package/lib/commonjs/acmo/modules/dashboard/components/offer_list_item.js.map +1 -0
  41. package/lib/commonjs/acmo/modules/dashboard/components/premium_empty_widget.js +87 -0
  42. package/lib/commonjs/acmo/modules/dashboard/components/premium_empty_widget.js.map +1 -0
  43. package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js +16 -14
  44. package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js.map +1 -1
  45. package/lib/commonjs/acmo/modules/dashboard/components/premium_loading.js +111 -0
  46. package/lib/commonjs/acmo/modules/dashboard/components/premium_loading.js.map +1 -0
  47. package/lib/commonjs/acmo/modules/dashboard/repository.js +108 -32
  48. package/lib/commonjs/acmo/modules/dashboard/repository.js.map +1 -1
  49. package/lib/commonjs/acmo/modules/dashboard/top_offers.js +85 -63
  50. package/lib/commonjs/acmo/modules/dashboard/top_offers.js.map +1 -1
  51. package/lib/commonjs/acmo/modules/localization/localization_context.js +56 -0
  52. package/lib/commonjs/acmo/modules/localization/localization_context.js.map +1 -0
  53. package/lib/commonjs/assets/images/angle_up.png +0 -0
  54. package/lib/commonjs/assets/images/diamond.png +0 -0
  55. package/lib/commonjs/assets/images/info.png +0 -0
  56. package/lib/commonjs/assets/images/info_icon.png +0 -0
  57. package/lib/commonjs/assets/images/premium-emptybg.jpeg +0 -0
  58. package/lib/commonjs/assets/images/rank_1.png +0 -0
  59. package/lib/commonjs/assets/images/rank_2.png +0 -0
  60. package/lib/commonjs/assets/images/rank_3.png +0 -0
  61. package/lib/commonjs/assets/images/rank_4.png +0 -0
  62. package/lib/commonjs/assets/images/rank_5.png +0 -0
  63. package/lib/commonjs/index.js +50 -16
  64. package/lib/commonjs/index.js.map +1 -1
  65. package/lib/module/acmo/core/helpers/launcher.js +15 -0
  66. package/lib/module/acmo/core/helpers/launcher.js.map +1 -0
  67. package/lib/module/acmo/core/helpers/native_methods.js +33 -0
  68. package/lib/module/acmo/core/helpers/native_methods.js.map +1 -0
  69. package/lib/module/acmo/core/helpers/numeral.js +14 -0
  70. package/lib/module/acmo/core/helpers/numeral.js.map +1 -0
  71. package/lib/module/acmo/core/services/localization_service.js +159 -0
  72. package/lib/module/acmo/core/services/localization_service.js.map +1 -0
  73. package/lib/module/acmo/core/storage/storage.js +13 -0
  74. package/lib/module/acmo/core/storage/storage.js.map +1 -1
  75. package/lib/module/acmo/modules/dashboard/components/active_offers_button.js +73 -0
  76. package/lib/module/acmo/modules/dashboard/components/active_offers_button.js.map +1 -0
  77. package/lib/module/acmo/modules/dashboard/components/custom_card.js +7 -10
  78. package/lib/module/acmo/modules/dashboard/components/custom_card.js.map +1 -1
  79. package/lib/module/acmo/modules/dashboard/components/custom_scroller.js +135 -0
  80. package/lib/module/acmo/modules/dashboard/components/custom_scroller.js.map +1 -0
  81. package/lib/module/acmo/modules/dashboard/components/custom_shimmer.js +66 -0
  82. package/lib/module/acmo/modules/dashboard/components/custom_shimmer.js.map +1 -0
  83. package/lib/module/acmo/modules/dashboard/components/offer_card.js +257 -0
  84. package/lib/module/acmo/modules/dashboard/components/offer_card.js.map +1 -0
  85. package/lib/module/acmo/modules/dashboard/components/offer_list_item.js +197 -0
  86. package/lib/module/acmo/modules/dashboard/components/offer_list_item.js.map +1 -0
  87. package/lib/module/acmo/modules/dashboard/components/premium_empty_widget.js +82 -0
  88. package/lib/module/acmo/modules/dashboard/components/premium_empty_widget.js.map +1 -0
  89. package/lib/module/acmo/modules/dashboard/components/premium_header.js +16 -14
  90. package/lib/module/acmo/modules/dashboard/components/premium_header.js.map +1 -1
  91. package/lib/module/acmo/modules/dashboard/components/premium_loading.js +106 -0
  92. package/lib/module/acmo/modules/dashboard/components/premium_loading.js.map +1 -0
  93. package/lib/module/acmo/modules/dashboard/repository.js +105 -30
  94. package/lib/module/acmo/modules/dashboard/repository.js.map +1 -1
  95. package/lib/module/acmo/modules/dashboard/top_offers.js +86 -64
  96. package/lib/module/acmo/modules/dashboard/top_offers.js.map +1 -1
  97. package/lib/module/acmo/modules/localization/localization_context.js +45 -0
  98. package/lib/module/acmo/modules/localization/localization_context.js.map +1 -0
  99. package/lib/module/assets/images/angle_up.png +0 -0
  100. package/lib/module/assets/images/diamond.png +0 -0
  101. package/lib/module/assets/images/info.png +0 -0
  102. package/lib/module/assets/images/info_icon.png +0 -0
  103. package/lib/module/assets/images/premium-emptybg.jpeg +0 -0
  104. package/lib/module/assets/images/rank_1.png +0 -0
  105. package/lib/module/assets/images/rank_2.png +0 -0
  106. package/lib/module/assets/images/rank_3.png +0 -0
  107. package/lib/module/assets/images/rank_4.png +0 -0
  108. package/lib/module/assets/images/rank_5.png +0 -0
  109. package/lib/module/index.js +49 -17
  110. package/lib/module/index.js.map +1 -1
  111. package/lib/typescript/commonjs/src/acmo/core/helpers/launcher.d.ts +3 -0
  112. package/lib/typescript/commonjs/src/acmo/core/helpers/launcher.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/src/acmo/core/helpers/native_methods.d.ts +6 -0
  114. package/lib/typescript/commonjs/src/acmo/core/helpers/native_methods.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/src/acmo/core/helpers/numeral.d.ts +2 -0
  116. package/lib/typescript/commonjs/src/acmo/core/helpers/numeral.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/src/acmo/core/services/localization_service.d.ts +18 -0
  118. package/lib/typescript/commonjs/src/acmo/core/services/localization_service.d.ts.map +1 -0
  119. package/lib/typescript/commonjs/src/acmo/core/storage/storage.d.ts +1 -0
  120. package/lib/typescript/commonjs/src/acmo/core/storage/storage.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/active_offers_button.d.ts +9 -0
  122. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/active_offers_button.d.ts.map +1 -0
  123. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_card.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_scroller.d.ts +17 -0
  125. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_scroller.d.ts.map +1 -0
  126. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_shimmer.d.ts +11 -0
  127. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_shimmer.d.ts.map +1 -0
  128. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_card.d.ts +12 -0
  129. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_card.d.ts.map +1 -0
  130. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_list_item.d.ts +15 -0
  131. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_list_item.d.ts.map +1 -0
  132. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts +7 -0
  133. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts.map +1 -0
  134. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_header.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_loading.d.ts +8 -0
  136. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_loading.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts +2 -1
  138. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts +8 -7
  140. package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/src/acmo/modules/localization/localization_context.d.ts +14 -0
  142. package/lib/typescript/commonjs/src/acmo/modules/localization/localization_context.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/src/index.d.ts +8 -6
  144. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  145. package/lib/typescript/module/src/acmo/core/helpers/launcher.d.ts +3 -0
  146. package/lib/typescript/module/src/acmo/core/helpers/launcher.d.ts.map +1 -0
  147. package/lib/typescript/module/src/acmo/core/helpers/native_methods.d.ts +6 -0
  148. package/lib/typescript/module/src/acmo/core/helpers/native_methods.d.ts.map +1 -0
  149. package/lib/typescript/module/src/acmo/core/helpers/numeral.d.ts +2 -0
  150. package/lib/typescript/module/src/acmo/core/helpers/numeral.d.ts.map +1 -0
  151. package/lib/typescript/module/src/acmo/core/services/localization_service.d.ts +18 -0
  152. package/lib/typescript/module/src/acmo/core/services/localization_service.d.ts.map +1 -0
  153. package/lib/typescript/module/src/acmo/core/storage/storage.d.ts +1 -0
  154. package/lib/typescript/module/src/acmo/core/storage/storage.d.ts.map +1 -1
  155. package/lib/typescript/module/src/acmo/modules/dashboard/components/active_offers_button.d.ts +9 -0
  156. package/lib/typescript/module/src/acmo/modules/dashboard/components/active_offers_button.d.ts.map +1 -0
  157. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_card.d.ts.map +1 -1
  158. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_scroller.d.ts +17 -0
  159. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_scroller.d.ts.map +1 -0
  160. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_shimmer.d.ts +11 -0
  161. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_shimmer.d.ts.map +1 -0
  162. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_card.d.ts +12 -0
  163. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_card.d.ts.map +1 -0
  164. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_list_item.d.ts +15 -0
  165. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_list_item.d.ts.map +1 -0
  166. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts +7 -0
  167. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts.map +1 -0
  168. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_header.d.ts.map +1 -1
  169. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_loading.d.ts +8 -0
  170. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_loading.d.ts.map +1 -0
  171. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts +2 -1
  172. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts.map +1 -1
  173. package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts +8 -7
  174. package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts.map +1 -1
  175. package/lib/typescript/module/src/acmo/modules/localization/localization_context.d.ts +14 -0
  176. package/lib/typescript/module/src/acmo/modules/localization/localization_context.d.ts.map +1 -0
  177. package/lib/typescript/module/src/index.d.ts +8 -6
  178. package/lib/typescript/module/src/index.d.ts.map +1 -1
  179. package/package.json +3 -6
  180. package/readme.md +8 -8
  181. package/src/acmo/core/helpers/launcher.ts +14 -0
  182. package/src/acmo/core/helpers/native_methods.ts +43 -0
  183. package/src/acmo/core/helpers/numeral.ts +14 -0
  184. package/src/acmo/core/services/localization_service.ts +200 -0
  185. package/src/acmo/core/storage/storage.ts +14 -0
  186. package/src/acmo/core/types/types.d.ts +11 -13
  187. package/src/acmo/modules/dashboard/components/active_offers_button.tsx +62 -0
  188. package/src/acmo/modules/dashboard/components/custom_card.tsx +5 -8
  189. package/src/acmo/modules/dashboard/components/custom_scroller.tsx +164 -0
  190. package/src/acmo/modules/dashboard/components/custom_shimmer.tsx +75 -0
  191. package/src/acmo/modules/dashboard/components/offer_card.tsx +248 -0
  192. package/src/acmo/modules/dashboard/components/offer_list_item.tsx +228 -0
  193. package/src/acmo/modules/dashboard/components/premium_empty_widget.tsx +79 -0
  194. package/src/acmo/modules/dashboard/components/premium_header.tsx +14 -13
  195. package/src/acmo/modules/dashboard/components/premium_loading.tsx +72 -0
  196. package/src/acmo/modules/dashboard/repository.ts +121 -46
  197. package/src/acmo/modules/dashboard/top_offers.tsx +105 -53
  198. package/src/acmo/modules/localization/localization_context.tsx +52 -0
  199. package/src/assets/images/angle_up.png +0 -0
  200. package/src/assets/images/diamond.png +0 -0
  201. package/src/assets/images/info.png +0 -0
  202. package/src/assets/images/info_icon.png +0 -0
  203. package/src/assets/images/premium-emptybg.jpeg +0 -0
  204. package/src/assets/images/rank_1.png +0 -0
  205. package/src/assets/images/rank_2.png +0 -0
  206. package/src/assets/images/rank_3.png +0 -0
  207. package/src/assets/images/rank_4.png +0 -0
  208. package/src/assets/images/rank_5.png +0 -0
  209. package/src/index.tsx +76 -34
  210. package/lib/commonjs/acmo/core/marquee.js.map +0 -1
  211. package/lib/commonjs/acmo/modules/dashboard/components/auto_scroller.js +0 -87
  212. package/lib/commonjs/acmo/modules/dashboard/components/auto_scroller.js.map +0 -1
  213. package/lib/commonjs/acmo/modules/dashboard/components/my_games_button.js +0 -48
  214. package/lib/commonjs/acmo/modules/dashboard/components/my_games_button.js.map +0 -1
  215. package/lib/commonjs/acmo/modules/dashboard/components/offer_info_section.js +0 -158
  216. package/lib/commonjs/acmo/modules/dashboard/components/offer_info_section.js.map +0 -1
  217. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_1.js +0 -180
  218. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_1.js.map +0 -1
  219. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_2.js +0 -102
  220. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_2.js.map +0 -1
  221. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_3.js +0 -41
  222. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_3.js.map +0 -1
  223. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_4.js +0 -214
  224. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_4.js.map +0 -1
  225. package/lib/commonjs/i18n.js +0 -112
  226. package/lib/commonjs/i18n.js.map +0 -1
  227. package/lib/module/acmo/core/marquee.js +0 -54
  228. package/lib/module/acmo/core/marquee.js.map +0 -1
  229. package/lib/module/acmo/modules/dashboard/components/auto_scroller.js +0 -81
  230. package/lib/module/acmo/modules/dashboard/components/auto_scroller.js.map +0 -1
  231. package/lib/module/acmo/modules/dashboard/components/my_games_button.js +0 -43
  232. package/lib/module/acmo/modules/dashboard/components/my_games_button.js.map +0 -1
  233. package/lib/module/acmo/modules/dashboard/components/offer_info_section.js +0 -153
  234. package/lib/module/acmo/modules/dashboard/components/offer_info_section.js.map +0 -1
  235. package/lib/module/acmo/modules/dashboard/components/premium_option_1.js +0 -174
  236. package/lib/module/acmo/modules/dashboard/components/premium_option_1.js.map +0 -1
  237. package/lib/module/acmo/modules/dashboard/components/premium_option_2.js +0 -97
  238. package/lib/module/acmo/modules/dashboard/components/premium_option_2.js.map +0 -1
  239. package/lib/module/acmo/modules/dashboard/components/premium_option_3.js +0 -36
  240. package/lib/module/acmo/modules/dashboard/components/premium_option_3.js.map +0 -1
  241. package/lib/module/acmo/modules/dashboard/components/premium_option_4.js +0 -209
  242. package/lib/module/acmo/modules/dashboard/components/premium_option_4.js.map +0 -1
  243. package/lib/module/i18n.js +0 -107
  244. package/lib/module/i18n.js.map +0 -1
  245. package/lib/typescript/commonjs/src/acmo/core/marquee.d.ts +0 -11
  246. package/lib/typescript/commonjs/src/acmo/core/marquee.d.ts.map +0 -1
  247. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/auto_scroller.d.ts +0 -10
  248. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/auto_scroller.d.ts.map +0 -1
  249. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/my_games_button.d.ts +0 -8
  250. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/my_games_button.d.ts.map +0 -1
  251. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_info_section.d.ts +0 -11
  252. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map +0 -1
  253. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_1.d.ts +0 -9
  254. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map +0 -1
  255. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_2.d.ts +0 -9
  256. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map +0 -1
  257. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts +0 -9
  258. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map +0 -1
  259. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts +0 -9
  260. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map +0 -1
  261. package/lib/typescript/commonjs/src/i18n.d.ts +0 -3
  262. package/lib/typescript/commonjs/src/i18n.d.ts.map +0 -1
  263. package/lib/typescript/module/src/acmo/core/marquee.d.ts +0 -11
  264. package/lib/typescript/module/src/acmo/core/marquee.d.ts.map +0 -1
  265. package/lib/typescript/module/src/acmo/modules/dashboard/components/auto_scroller.d.ts +0 -10
  266. package/lib/typescript/module/src/acmo/modules/dashboard/components/auto_scroller.d.ts.map +0 -1
  267. package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts +0 -8
  268. package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts.map +0 -1
  269. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts +0 -11
  270. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map +0 -1
  271. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts +0 -9
  272. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map +0 -1
  273. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts +0 -9
  274. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map +0 -1
  275. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts +0 -9
  276. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map +0 -1
  277. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts +0 -9
  278. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map +0 -1
  279. package/lib/typescript/module/src/i18n.d.ts +0 -3
  280. package/lib/typescript/module/src/i18n.d.ts.map +0 -1
  281. package/src/acmo/core/marquee.tsx +0 -62
  282. package/src/acmo/modules/dashboard/components/auto_scroller.tsx +0 -85
  283. package/src/acmo/modules/dashboard/components/my_games_button.tsx +0 -40
  284. package/src/acmo/modules/dashboard/components/offer_info_section.tsx +0 -139
  285. package/src/acmo/modules/dashboard/components/premium_option_1.tsx +0 -163
  286. package/src/acmo/modules/dashboard/components/premium_option_2.tsx +0 -100
  287. package/src/acmo/modules/dashboard/components/premium_option_3.tsx +0 -42
  288. package/src/acmo/modules/dashboard/components/premium_option_4.tsx +0 -185
  289. package/src/i18n.ts +0 -115
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+
3
+ import React, { useRef, useState, useEffect } from 'react';
4
+ import { View, Animated, StyleSheet } from 'react-native';
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ const AcmoScrollPager = ({
7
+ totalPages,
8
+ delayInMillis = 5000,
9
+ content,
10
+ viewportFraction = 0.92,
11
+ scaleFactor = 0.94,
12
+ spacing = 2,
13
+ indicatorStyle,
14
+ activeIndicatorColor = 'red',
15
+ inactiveIndicatorColor = 'lightgray'
16
+ }) => {
17
+ const scrollX = useRef(new Animated.Value(0)).current;
18
+ const scrollViewRef = useRef(null);
19
+ const [currentPage, setCurrentPage] = useState(0);
20
+ const [containerWidth, setContainerWidth] = useState(null);
21
+ const intervalRef = useRef(null);
22
+ const onContainerLayout = e => {
23
+ const {
24
+ width
25
+ } = e.nativeEvent.layout;
26
+ if (width !== containerWidth) setContainerWidth(width);
27
+ };
28
+ useEffect(() => {
29
+ if (!containerWidth) return;
30
+ const itemWidth = containerWidth * viewportFraction;
31
+ const offset = itemWidth + spacing;
32
+ intervalRef.current = setInterval(() => {
33
+ const next = (currentPage + 1) % totalPages;
34
+ setCurrentPage(next);
35
+ scrollViewRef.current.scrollTo({
36
+ x: next * offset,
37
+ animated: true
38
+ });
39
+ }, delayInMillis);
40
+ return () => {
41
+ if (intervalRef.current) clearInterval(intervalRef.current);
42
+ };
43
+ }, [containerWidth, currentPage, delayInMillis, totalPages, viewportFraction, spacing]);
44
+ const handleScroll = Animated.event([{
45
+ nativeEvent: {
46
+ contentOffset: {
47
+ x: scrollX
48
+ }
49
+ }
50
+ }], {
51
+ useNativeDriver: true,
52
+ listener: event => {
53
+ if (!containerWidth) return;
54
+ const offset = containerWidth * viewportFraction + spacing;
55
+ const index = Math.round(event.nativeEvent.contentOffset.x / offset);
56
+ setCurrentPage(index);
57
+ }
58
+ });
59
+ const renderIndicators = () => /*#__PURE__*/_jsx(View, {
60
+ style: [styles.indicatorContainer, indicatorStyle],
61
+ children: Array.from({
62
+ length: totalPages
63
+ }, (_, i) => /*#__PURE__*/_jsx(View, {
64
+ style: [styles.indicator, {
65
+ backgroundColor: i === currentPage ? activeIndicatorColor : inactiveIndicatorColor
66
+ }]
67
+ }, i))
68
+ });
69
+ if (!containerWidth) {
70
+ return /*#__PURE__*/_jsx(View, {
71
+ onLayout: onContainerLayout,
72
+ style: {
73
+ width: '100%'
74
+ }
75
+ });
76
+ }
77
+ const itemWidth = containerWidth * viewportFraction;
78
+ const itemOffset = itemWidth + spacing;
79
+ const sidePadding = (containerWidth - itemWidth - 16) / 2;
80
+ return /*#__PURE__*/_jsxs(View, {
81
+ onLayout: onContainerLayout,
82
+ style: {
83
+ width: '100%',
84
+ alignItems: 'center'
85
+ },
86
+ children: [/*#__PURE__*/_jsx(Animated.ScrollView, {
87
+ ref: scrollViewRef,
88
+ horizontal: true,
89
+ pagingEnabled: false,
90
+ snapToInterval: itemOffset,
91
+ decelerationRate: "fast",
92
+ showsHorizontalScrollIndicator: false,
93
+ scrollEventThrottle: 16,
94
+ onScroll: handleScroll,
95
+ contentContainerStyle: {
96
+ paddingHorizontal: sidePadding
97
+ },
98
+ children: Array.from({
99
+ length: totalPages
100
+ }, (_, i) => {
101
+ const inputRange = [itemOffset * (i - 1), itemOffset * i, itemOffset * (i + 1)];
102
+ const scale = scrollX.interpolate({
103
+ inputRange,
104
+ outputRange: [scaleFactor, 1, scaleFactor],
105
+ extrapolate: 'clamp'
106
+ });
107
+ return /*#__PURE__*/_jsx(Animated.View, {
108
+ style: {
109
+ width: itemWidth,
110
+ transform: [{
111
+ scale
112
+ }]
113
+ },
114
+ children: content(i)
115
+ }, i);
116
+ })
117
+ }), renderIndicators()]
118
+ });
119
+ };
120
+ const styles = StyleSheet.create({
121
+ indicatorContainer: {
122
+ flexDirection: 'row',
123
+ justifyContent: 'center',
124
+ marginTop: 6,
125
+ marginBottom: 8
126
+ },
127
+ indicator: {
128
+ width: 8,
129
+ height: 8,
130
+ borderRadius: 4,
131
+ marginHorizontal: 4
132
+ }
133
+ });
134
+ export default AcmoScrollPager;
135
+ //# sourceMappingURL=custom_scroller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useRef","useState","useEffect","View","Animated","StyleSheet","jsx","_jsx","jsxs","_jsxs","AcmoScrollPager","totalPages","delayInMillis","content","viewportFraction","scaleFactor","spacing","indicatorStyle","activeIndicatorColor","inactiveIndicatorColor","scrollX","Value","current","scrollViewRef","currentPage","setCurrentPage","containerWidth","setContainerWidth","intervalRef","onContainerLayout","e","width","nativeEvent","layout","itemWidth","offset","setInterval","next","scrollTo","x","animated","clearInterval","handleScroll","event","contentOffset","useNativeDriver","listener","index","Math","round","renderIndicators","style","styles","indicatorContainer","children","Array","from","length","_","i","indicator","backgroundColor","onLayout","itemOffset","sidePadding","alignItems","ScrollView","ref","horizontal","pagingEnabled","snapToInterval","decelerationRate","showsHorizontalScrollIndicator","scrollEventThrottle","onScroll","contentContainerStyle","paddingHorizontal","inputRange","scale","interpolate","outputRange","extrapolate","transform","create","flexDirection","justifyContent","marginTop","marginBottom","height","borderRadius","marginHorizontal"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/custom_scroller.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAC1D,SACEC,IAAI,EACJC,QAAQ,EACRC,UAAU,QAIL,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAetB,MAAMC,eAAqC,GAAGA,CAAC;EAC7CC,UAAU;EACVC,aAAa,GAAG,IAAI;EACpBC,OAAO;EACPC,gBAAgB,GAAG,IAAI;EACvBC,WAAW,GAAG,IAAI;EAClBC,OAAO,GAAG,CAAC;EACXC,cAAc;EACdC,oBAAoB,GAAG,KAAK;EAC5BC,sBAAsB,GAAG;AAC3B,CAAC,KAAK;EACJ,MAAMC,OAAO,GAAGpB,MAAM,CAAC,IAAII,QAAQ,CAACiB,KAAK,CAAC,CAAC,CAAC,CAAC,CAACC,OAAO;EACrD,MAAMC,aAAa,GAAGvB,MAAM,CAAoD,IAAI,CAAC;EACrF,MAAM,CAACwB,WAAW,EAAEC,cAAc,CAAC,GAAGxB,QAAQ,C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,EAAE;IACT7B,KAAK,EAAE,CAAC;IACRyD,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE,CAAC;IACfC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC;AAEF,eAAehF,eAAe","ignoreList":[]}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ import React, { useEffect, useRef } from 'react';
4
+ import { View, Animated, StyleSheet, Dimensions } from 'react-native';
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ const SCREEN_WIDTH = Dimensions.get('window').width;
7
+ const Shimmer = ({
8
+ width = '100%',
9
+ shimmerHeight: height = 16,
10
+ style,
11
+ duration = 1500
12
+ }) => {
13
+ const translateX = useRef(new Animated.Value(-1)).current;
14
+ useEffect(() => {
15
+ const animation = Animated.loop(Animated.timing(translateX, {
16
+ toValue: 1,
17
+ duration,
18
+ useNativeDriver: true
19
+ }));
20
+ animation.start();
21
+ return () => animation.stop();
22
+ }, [translateX, duration]);
23
+ const translateXInterpolate = translateX.interpolate({
24
+ inputRange: [-1, 1],
25
+ outputRange: [-SCREEN_WIDTH, SCREEN_WIDTH]
26
+ });
27
+ return /*#__PURE__*/_jsxs(View, {
28
+ style: [styles.container, {
29
+ width
30
+ }, style],
31
+ children: [/*#__PURE__*/_jsx(View, {
32
+ style: [styles.shimmerBackground, {
33
+ height
34
+ }]
35
+ }), /*#__PURE__*/_jsx(Animated.View, {
36
+ style: [styles.shimmerOverlay, {
37
+ width: SCREEN_WIDTH,
38
+ height,
39
+ transform: [{
40
+ translateX: translateXInterpolate
41
+ }]
42
+ }]
43
+ })]
44
+ });
45
+ };
46
+ const styles = StyleSheet.create({
47
+ container: {
48
+ overflow: 'hidden',
49
+ backgroundColor: '#e1e1e1',
50
+ borderRadius: 4
51
+ },
52
+ shimmerBackground: {
53
+ flex: 1,
54
+ backgroundColor: '#d3d3d3'
55
+ },
56
+ shimmerOverlay: {
57
+ position: 'absolute',
58
+ top: 0,
59
+ left: 0,
60
+ backgroundColor: 'rgba(255,255,255,0.5)',
61
+ opacity: 0.4,
62
+ borderRadius: 4
63
+ }
64
+ });
65
+ export default Shimmer;
66
+ //# sourceMappingURL=custom_shimmer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useRef","View","Animated","StyleSheet","Dimensions","jsx","_jsx","jsxs","_jsxs","SCREEN_WIDTH","get","width","Shimmer","shimmerHeight","height","style","duration","translateX","Value","current","animation","loop","timing","toValue","useNativeDriver","start","stop","translateXInterpolate","interpolate","inputRange","outputRange","styles","container","children","shimmerBackground","shimmerOverlay","transform","create","overflow","backgroundColor","borderRadius","flex","position","top","left","opacity"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/custom_shimmer.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SAASC,IAAI,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,QAA6D,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAS3H,MAAMC,YAAY,GAAGL,UAAU,CAACM,GAAG,CAAC,QAAQ,CAAC,CAACC,KAAK;AAEnD,MAAMC,OAA+B,GAAGA,CAAC;EACvCD,KAAK,GAAG,MAAM;EACdE,aAAa,EAAEC,MAAM,GAAG,EAAE;EAC1BC,KAAK;EACLC,QAAQ,GAAG;AACb,CAAC,KAAK;EACJ,MAAMC,UAAU,GAAGjB,MAAM,CAAC,IAAIE,QAAQ,CAACgB,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,OAAO;EAEzDpB,SAAS,CAAC,MAAM;IACd,MAAMqB,SAAS,GAAGlB,QAAQ,CAACmB,IAAI,CAC7BnB,QAAQ,CAACoB,MAAM,CAACL,UAAU,EAAE;MAC1BM,OAAO,EAAE,CAAC;MACVP,QAAQ;MACRQ,eAAe,EAAE;IACnB,CAAC,CACH,CAAC;IACDJ,SAAS,CAACK,KAAK,CAAC,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[]}
@@ -0,0 +1,257 @@
1
+ "use strict";
2
+
3
+ import React, { useState } from 'react';
4
+ import { numeral } from "../../../core/helpers/numeral.js";
5
+ import { View, Text, Image, StyleSheet, TouchableOpacity, ActivityIndicator } from 'react-native';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ const AcmoOfferCard = ({
8
+ item,
9
+ onButtonClick,
10
+ currencySaleModel,
11
+ premiumColor,
12
+ isLoading,
13
+ onTap
14
+ }) => {
15
+ const [loading, setLoading] = useState(isLoading);
16
+ const bonusMultiplier = currencySaleModel?.multiplier ?? 1;
17
+ const itemHeight = 132;
18
+ const handleClick = async () => {
19
+ if (loading) return;
20
+ setLoading(true);
21
+ await onButtonClick();
22
+ setLoading(false);
23
+ };
24
+ return /*#__PURE__*/_jsx(TouchableOpacity, {
25
+ activeOpacity: 0.9,
26
+ style: styles.container,
27
+ onPress: () => {
28
+ if (!loading && onTap) onTap();
29
+ },
30
+ children: /*#__PURE__*/_jsxs(View, {
31
+ style: styles.cardShadow,
32
+ children: [/*#__PURE__*/_jsxs(View, {
33
+ style: [styles.imageContainer, {
34
+ height: itemHeight
35
+ }],
36
+ children: [/*#__PURE__*/_jsx(Image, {
37
+ source: {
38
+ uri: item.creative.creativePacks[0]?.creatives[0]?.fileUrl || ''
39
+ },
40
+ style: styles.image
41
+ }), item.premium && /*#__PURE__*/_jsx(View, {
42
+ style: styles.diamondIcon,
43
+ children: /*#__PURE__*/_jsx(Image, {
44
+ style: {
45
+ width: 12,
46
+ height: 12,
47
+ objectFit: 'contain',
48
+ tintColor: 'white'
49
+ },
50
+ source: require('../../../../assets/images/diamond.png')
51
+ })
52
+ })]
53
+ }), /*#__PURE__*/_jsxs(View, {
54
+ style: styles.detailCard,
55
+ children: [/*#__PURE__*/_jsxs(View, {
56
+ style: styles.header,
57
+ children: [/*#__PURE__*/_jsx(Image, {
58
+ source: {
59
+ uri: item.app.thumbnail
60
+ },
61
+ style: styles.appIcon
62
+ }), /*#__PURE__*/_jsx(Text, {
63
+ style: styles.title,
64
+ children: item.app.title
65
+ }), /*#__PURE__*/_jsxs(View, {
66
+ style: styles.payoutSection,
67
+ children: [currencySaleModel?.multiplier && /*#__PURE__*/_jsx(Text, {
68
+ style: styles.strikePayout,
69
+ children: numeral(item.campaignPayout.totalPlayablePayoutConverted)
70
+ }), /*#__PURE__*/_jsxs(View, {
71
+ style: styles.payoutRow,
72
+ children: [/*#__PURE__*/_jsx(Image, {
73
+ source: {
74
+ uri: item.currency.adUnitCurrencyIcon
75
+ },
76
+ style: styles.currencyIcon
77
+ }), /*#__PURE__*/_jsx(Text, {
78
+ style: styles.payoutText,
79
+ children: numeral(item.campaignPayout.totalPlayablePayoutConverted * bonusMultiplier)
80
+ })]
81
+ })]
82
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
83
+ onPress: onTap,
84
+ disabled: loading,
85
+ children: /*#__PURE__*/_jsx(Image, {
86
+ source: require('../../../../assets/images/info_icon.png'),
87
+ style: styles.infoIcon
88
+ })
89
+ })]
90
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
91
+ style: [styles.button, loading && styles.buttonDisabled, {
92
+ backgroundColor: loading ? '#888' : premiumColor || '#1C90DF'
93
+ }],
94
+ onPress: handleClick,
95
+ disabled: loading,
96
+ children: loading ? /*#__PURE__*/_jsx(ActivityIndicator, {
97
+ color: "white"
98
+ }) : /*#__PURE__*/_jsx(Text, {
99
+ style: styles.buttonText,
100
+ children: "Play Now"
101
+ })
102
+ })]
103
+ }), currencySaleModel?.multiplier && /*#__PURE__*/_jsx(View, {
104
+ style: [styles.bonusBadge, {
105
+ backgroundColor: `${premiumColor}` || '#1C90DF'
106
+ }],
107
+ children: /*#__PURE__*/_jsxs(Text, {
108
+ style: styles.bonusText,
109
+ children: [currencySaleModel?.multiplier.toFixed(1), "x Bonus"]
110
+ })
111
+ }), currencySaleModel?.multiplier && /*#__PURE__*/_jsx(View, {
112
+ style: [styles.trianlge, {
113
+ backgroundColor: `${premiumColor}cc` || '#1C90DF'
114
+ }]
115
+ })]
116
+ })
117
+ }, item.campaignId);
118
+ };
119
+ const styles = StyleSheet.create({
120
+ container: {
121
+ margin: 16,
122
+ width: "100%"
123
+ },
124
+ cardShadow: {
125
+ borderRadius: 16,
126
+ backgroundColor: 'white',
127
+ shadowColor: 'black',
128
+ shadowOffset: {
129
+ width: 0,
130
+ height: 16
131
+ },
132
+ shadowOpacity: 0.06,
133
+ shadowRadius: 18,
134
+ elevation: 4
135
+ },
136
+ imageContainer: {
137
+ borderTopLeftRadius: 16,
138
+ borderTopRightRadius: 16,
139
+ overflow: 'hidden'
140
+ },
141
+ image: {
142
+ width: '100%',
143
+ height: '100%',
144
+ resizeMode: 'cover'
145
+ },
146
+ diamondIcon: {
147
+ position: 'absolute',
148
+ top: 16,
149
+ right: 16,
150
+ backgroundColor: '#1E2020DD',
151
+ width: 28,
152
+ height: 28,
153
+ borderRadius: 8,
154
+ justifyContent: 'center',
155
+ alignItems: 'center'
156
+ },
157
+ diamondText: {
158
+ color: 'white',
159
+ fontSize: 14
160
+ },
161
+ detailCard: {
162
+ padding: 16
163
+ },
164
+ header: {
165
+ flexDirection: 'row',
166
+ justifyContent: 'space-between',
167
+ alignItems: 'center'
168
+ },
169
+ appIcon: {
170
+ width: 38,
171
+ height: 38,
172
+ borderRadius: 8,
173
+ marginRight: 8
174
+ },
175
+ title: {
176
+ flex: 1,
177
+ fontWeight: '600',
178
+ fontSize: 14
179
+ },
180
+ payoutSection: {
181
+ alignItems: 'flex-end'
182
+ },
183
+ strikePayout: {
184
+ textDecorationLine: 'line-through',
185
+ color: '#454646',
186
+ fontSize: 12
187
+ },
188
+ payoutRow: {
189
+ flexDirection: 'row',
190
+ alignItems: 'center'
191
+ },
192
+ currencyIcon: {
193
+ width: 16,
194
+ height: 16,
195
+ marginRight: 4
196
+ },
197
+ payoutText: {
198
+ fontWeight: '700',
199
+ fontSize: 14
200
+ },
201
+ infoIcon: {
202
+ width: 16,
203
+ height: 16,
204
+ marginLeft: 8
205
+ },
206
+ button: {
207
+ marginTop: 12,
208
+ height: 42,
209
+ borderRadius: 8,
210
+ justifyContent: 'center',
211
+ alignItems: 'center'
212
+ },
213
+ buttonDisabled: {
214
+ backgroundColor: '#e0e2e7'
215
+ },
216
+ buttonText: {
217
+ color: 'white',
218
+ fontWeight: '600',
219
+ fontSize: 14
220
+ },
221
+ bonusBadge: {
222
+ position: 'absolute',
223
+ top: 16,
224
+ left: -6,
225
+ paddingVertical: 8,
226
+ paddingHorizontal: 14,
227
+ borderTopRightRadius: 100,
228
+ borderTopLeftRadius: 10,
229
+ borderBottomRightRadius: 100,
230
+ shadowColor: 'black',
231
+ shadowOffset: {
232
+ width: 0,
233
+ height: 8
234
+ },
235
+ shadowOpacity: 0.3,
236
+ shadowRadius: 10,
237
+ backgroundColor: 'transparent'
238
+ },
239
+ trianlge: {
240
+ position: 'absolute',
241
+ top: 46.6,
242
+ left: -7.4,
243
+ zIndex: -10,
244
+ width: 20,
245
+ height: 10,
246
+ transform: [{
247
+ rotate: '65deg'
248
+ }]
249
+ },
250
+ bonusText: {
251
+ color: 'white',
252
+ fontWeight: '700',
253
+ fontSize: 12
254
+ }
255
+ });
256
+ export default AcmoOfferCard;
257
+ //# sourceMappingURL=offer_card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","numeral","View","Text","Image","StyleSheet","TouchableOpacity","ActivityIndicator","jsx","_jsx","jsxs","_jsxs","AcmoOfferCard","item","onButtonClick","currencySaleModel","premiumColor","isLoading","onTap","loading","setLoading","bonusMultiplier","multiplier","itemHeight","handleClick","activeOpacity","style","styles","container","onPress","children","cardShadow","imageContainer","height","source","uri","creative","creativePacks","creatives","fileUrl","image","premium","diamondIcon","width","objectFit","tintColor","require","detailCard","header","app","thumbnail","appIcon","title","payoutSection","strikePayout","campaignPayout","totalPlayablePayoutConverted","payoutRow","currency","adUnitCurrencyIcon","currencyIcon","payoutText","disabled","infoIcon","button","buttonDisabled","backgroundColor","color","buttonText","bonusBadge","bonusText","toFixed","trianlge","campaignId","create","margin","borderRadius","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderTopLeftRadius","borderTopRightRadius","overflow","resizeMode","position","top","right","justifyContent","alignItems","diamondText","fontSize","padding","flexDirection","marginRight","flex","fontWeight","textDecorationLine","marginLeft","marginTop","left","paddingVertical","paddingHorizontal","borderBottomRightRadius","zIndex","transform","rotate"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/offer_card.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAAQC,OAAO,QAAO,kCAA+B;AACrD,SACEC,IAAI,EACJC,IAAI,EACJC,KAAK,EACLC,UAAU,EACVC,gBAAgB,EAChBC,iBAAiB,QACZ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAYtB,MAAMC,aAA8B,GAAGA,CAAC;EACtCC,IAAI;EACJC,aAAa;EACbC,iBAAiB;EACjBC,YAAY;EACZC,SAAS;EACTC;AACF,CAAC,KAAK;EACJ,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGpB,QAAQ,CAAUiB,SAAS,CAAC;EAC1D,MAAMI,eAAe,GAAGN,iBAAiB,EAAEO,UAAU,IAAI,CAAC;EAC1D,MAAMC,UAAU,GAAG,GAAG;EAEtB,MAAMC,WAAW,GAAG,MAAAA,CAAA,KAAY;IAC9B,IAAIL,OAAO,EAAE;IACbC,UAAU,CAAC,IAAI,CAAC;IAChB,MAAMN,aAAa,CAAC,CAAC;IACrBM,UAAU,CAAC,KAAK,CAAC;EACnB,CAAC;EAED,oBACEX,IAAA,CAACH,gBAAgB;IAEfmB,aAAa,EAAE,GAAI;IACnBC,KAAK,EAAEC,MAAM,CAACC,SAAU;IACxBC,OAAO,EAAEA,CAAA,KAAM;MACb,IAAI,CAACV,OAAO,IAAID,KAAK,EAAEA,KAAK,CAAC,CAAC;IAChC,C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KAAK,EAAE,OAAO;IACd8B,UAAU,EAAE,KAAK;IACjBL,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,eAAehF,aAAa","ignoreList":[]}
@@ -0,0 +1,197 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { numeral } from "../../../core/helpers/numeral.js";
5
+ import { View, Text, TouchableOpacity, Image, StyleSheet, ActivityIndicator } from 'react-native';
6
+ import { useLocalization } from "../../localization/localization_context.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ const rankIcons = [require('../../../../assets/images/rank_1.png'), require('../../../../assets/images/rank_2.png'), require('../../../../assets/images/rank_3.png'), require('../../../../assets/images/rank_4.png'), require('../../../../assets/images/rank_5.png')];
9
+ export const AcmoOfferListItem = ({
10
+ offer,
11
+ currencySales,
12
+ onButtonTap,
13
+ onPress,
14
+ index,
15
+ colorPremium,
16
+ colorPremiumFg,
17
+ loadingIndex,
18
+ setLoadingIndex
19
+ }) => {
20
+ const bonusMultiplier = currencySales?.multiplier ?? 1;
21
+ const isLoading = loadingIndex === index;
22
+ const anyLoading = loadingIndex != null;
23
+ const {
24
+ t
25
+ } = useLocalization();
26
+ return /*#__PURE__*/_jsx(TouchableOpacity, {
27
+ disabled: anyLoading,
28
+ onPress: onPress,
29
+ style: styles.itemContainer,
30
+ activeOpacity: 0.75,
31
+ children: /*#__PURE__*/_jsxs(View, {
32
+ style: styles.container,
33
+ children: [/*#__PURE__*/_jsx(Image, {
34
+ source: rankIcons[index],
35
+ style: styles.rankIcon
36
+ }), /*#__PURE__*/_jsx(Image, {
37
+ source: {
38
+ uri: offer.app.thumbnail
39
+ },
40
+ style: styles.icon
41
+ }), /*#__PURE__*/_jsxs(View, {
42
+ style: styles.details,
43
+ children: [currencySales && /*#__PURE__*/_jsx(View, {
44
+ style: [styles.bonusBadge, {
45
+ backgroundColor: `${colorPremium}20`
46
+ }],
47
+ children: /*#__PURE__*/_jsx(Text, {
48
+ style: [styles.bonusText, {
49
+ color: colorPremium
50
+ }],
51
+ children: t('data.shared.label.bonusTagCaps', {
52
+ 'multiplier': currencySales?.multiplier
53
+ })
54
+ })
55
+ }), /*#__PURE__*/_jsx(Text, {
56
+ numberOfLines: 1,
57
+ style: styles.title,
58
+ ellipsizeMode: "tail",
59
+ children: offer.app.title
60
+ }), /*#__PURE__*/_jsxs(View, {
61
+ style: styles.payoutRow,
62
+ children: [currencySales && /*#__PURE__*/_jsx(Text, {
63
+ style: styles.strikeText,
64
+ children: numeral(offer.campaignPayout.totalPlayablePayoutConverted)
65
+ }), /*#__PURE__*/_jsx(Image, {
66
+ source: {
67
+ uri: offer.currency.adUnitCurrencyIcon
68
+ },
69
+ style: styles.currencyIcon
70
+ }), /*#__PURE__*/_jsx(Text, {
71
+ style: styles.payoutText,
72
+ children: numeral(offer.campaignPayout.totalPlayablePayoutConverted * bonusMultiplier)
73
+ })]
74
+ })]
75
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
76
+ disabled: anyLoading,
77
+ style: [styles.button, {
78
+ backgroundColor: anyLoading ? '#e0e2e7' : colorPremium
79
+ }],
80
+ onPress: async () => {
81
+ setLoadingIndex(index);
82
+ await onButtonTap();
83
+ setLoadingIndex(null);
84
+ },
85
+ children: [isLoading ? /*#__PURE__*/_jsx(ActivityIndicator, {
86
+ size: "small",
87
+ color: "#a3a9b6"
88
+ }) : null, /*#__PURE__*/_jsx(Text, {
89
+ style: [styles.buttonText, {
90
+ color: anyLoading ? '#a3a9b6' : colorPremiumFg ?? '#fff',
91
+ marginLeft: isLoading ? 8 : 0
92
+ }],
93
+ children: t("data.widget.button.play")
94
+ })]
95
+ })]
96
+ })
97
+ });
98
+ };
99
+ const styles = StyleSheet.create({
100
+ itemContainer: {
101
+ flexDirection: 'row',
102
+ flex: 1,
103
+ width: '100%',
104
+ justifyContent: 'space-between',
105
+ alignItems: 'center',
106
+ paddingHorizontal: 16,
107
+ paddingVertical: 8
108
+ },
109
+ container: {
110
+ flexDirection: 'row',
111
+ marginVertical: 2,
112
+ paddingHorizontal: 0,
113
+ width: '100%',
114
+ position: 'relative'
115
+ },
116
+ rankIcon: {
117
+ position: 'absolute',
118
+ zIndex: 99,
119
+ left: -10,
120
+ top: -8,
121
+ width: 24,
122
+ height: 24,
123
+ resizeMode: 'contain'
124
+ },
125
+ row: {
126
+ flexDirection: 'row',
127
+ alignItems: 'center',
128
+ backgroundColor: '#fff',
129
+ borderRadius: 8,
130
+ padding: 10,
131
+ elevation: 2
132
+ },
133
+ icon: {
134
+ width: 54,
135
+ height: 54,
136
+ borderRadius: 4,
137
+ marginRight: 10
138
+ },
139
+ details: {
140
+ flex: 1,
141
+ justifyContent: 'center'
142
+ },
143
+ bonusBadge: {
144
+ alignSelf: 'flex-start',
145
+ paddingHorizontal: 8,
146
+ paddingVertical: 2,
147
+ borderRadius: 16,
148
+ marginBottom: 4
149
+ },
150
+ bonusText: {
151
+ fontSize: 10,
152
+ fontWeight: '700'
153
+ },
154
+ title: {
155
+ fontSize: 12,
156
+ fontWeight: '500',
157
+ marginBottom: 4,
158
+ color: '#323434'
159
+ },
160
+ payoutRow: {
161
+ flexDirection: 'row',
162
+ alignItems: 'center',
163
+ gap: 10
164
+ },
165
+ strikeText: {
166
+ fontSize: 12,
167
+ textDecorationLine: 'line-through',
168
+ color: '#323434',
169
+ fontWeight: '300'
170
+ },
171
+ currencyIcon: {
172
+ width: 14,
173
+ height: 14,
174
+ marginHorizontal: 4
175
+ },
176
+ payoutText: {
177
+ fontSize: 12,
178
+ fontWeight: '700',
179
+ color: '#323434'
180
+ },
181
+ button: {
182
+ marginLeft: 4,
183
+ paddingHorizontal: 12,
184
+ height: 42,
185
+ minWidth: 75,
186
+ justifyContent: 'center',
187
+ alignItems: 'center',
188
+ borderRadius: 8,
189
+ flexDirection: 'row'
190
+ },
191
+ buttonText: {
192
+ fontSize: 14,
193
+ fontWeight: '600',
194
+ color: '#fff'
195
+ }
196
+ });
197
+ //# sourceMappingURL=offer_list_item.js.map