@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,353 @@
1
+ //
2
+ // AcmoPrivacyPage.swift
3
+ // Pods
4
+ //
5
+ // Created by Basharat Mehdi on 29/09/25.
6
+ //
7
+
8
+ import SwiftUI
9
+ import UIKit
10
+
11
+ struct AcmoPrivacyPolicyPage: View {
12
+ @Environment(\.presentationMode) var presentationMode
13
+
14
+ var localization: LocalizationService = LocalizationService.shared
15
+
16
+ var onAccept: (() -> Void)?
17
+
18
+ public init(onAccept: (() -> Void)? = nil) {
19
+ self.onAccept = onAccept
20
+ }
21
+
22
+ var body: some View {
23
+ ZStack {
24
+ if #available(iOS 14.0, *) {
25
+ Color.white.ignoresSafeArea()
26
+ } else {
27
+ Color.white
28
+ }
29
+
30
+ VStack {
31
+ HStack {
32
+ Spacer()
33
+ Button(action: {
34
+ presentationMode.wrappedValue.dismiss()
35
+ }) {
36
+ Image(systemName: "xmark")
37
+ .foregroundColor(Color.gray.opacity(0.6))
38
+ .font(.system(size: 20))
39
+ .padding()
40
+ }
41
+ }
42
+
43
+ BodyView(localization: localization)
44
+
45
+ Spacer().frame(height: 24)
46
+
47
+ ScrollView {
48
+ VStack {
49
+ InfoView(localization: localization)
50
+ Spacer().frame(height: 155)
51
+ }
52
+ .frame(maxWidth: .infinity)
53
+ }
54
+ .frame(maxHeight: UIScreen.main.bounds.height / 2)
55
+
56
+ Spacer()
57
+ }
58
+ .padding(.horizontal, 30)
59
+
60
+ VStack {
61
+ Spacer()
62
+ VStack(spacing: 16) {
63
+ Info2View(localization: localization)
64
+ TwoButtons(
65
+ onAccept: {
66
+ UserDefaults.standard.set(true, forKey: "\(AcmoKeyNames.PRIVACY_ACCEPTED_FOR_USER_ID)\(Tyrads.instance.publisherUserID)")
67
+ presentationMode.wrappedValue.dismiss()
68
+ onAccept?()
69
+ },
70
+ onReject: {
71
+ presentationMode.wrappedValue.dismiss()
72
+ },
73
+ localization: localization
74
+ )
75
+ }
76
+ .frame(width: UIScreen.main.bounds.width, height: 140)
77
+ .padding(16)
78
+ .background(Color.white)
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ // MARK: - Body Section
85
+ struct BodyView: View {
86
+ let localization: LocalizationService
87
+
88
+ func decodeBase64Image(_ base64: String) -> UIImage? {
89
+ guard let data = Data(base64Encoded: base64) else { return nil }
90
+ return UIImage(data: data)
91
+ }
92
+
93
+ var body: some View {
94
+ VStack(spacing: 12) {
95
+ Text(localization.translate("data.initialization.intro.title"))
96
+ .font(.system(size: 16, weight: .semibold))
97
+ .multilineTextAlignment(.center)
98
+
99
+ if let image = decodeBase64Image(AcmoAssets.privacyBannerBase64) {
100
+ Image(uiImage: image)
101
+ .resizable()
102
+ .scaledToFit()
103
+ .frame(height: 160)
104
+ } else {
105
+ Text("Image not found")
106
+ }
107
+
108
+ Text(localization.translate("data.initialization.intro.subtitle"))
109
+ .font(.system(size: 16, weight: .medium))
110
+ .multilineTextAlignment(.center)
111
+ .lineSpacing(3)
112
+ }
113
+ .frame(maxWidth: UIScreen.main.bounds.width * 0.6)
114
+ }
115
+ }
116
+
117
+ // MARK: - Info Section (scrollable legal text)
118
+ struct InfoView: View {
119
+ let localization: LocalizationService
120
+ var body: some View {
121
+ Text(.init(localization.translate("data.initialization.legal.explanation")))
122
+ .font(.system(size: 14))
123
+ .padding(10)
124
+ .foregroundColor(Color.black.opacity(0.65))
125
+ .multilineTextAlignment(.leading)
126
+ }
127
+ func wrapLinks(text: String) -> String {
128
+ let urlRegexPattern = "(https?:\\/\\/[^\\s]+)"
129
+
130
+ do {
131
+ let regex = try NSRegularExpression(pattern: urlRegexPattern, options: [])
132
+ let range = NSRange(text.startIndex..., in: text)
133
+ let replacedText = regex.stringByReplacingMatches(
134
+ in: text,
135
+ range: range,
136
+ withTemplate: "https://tyrads.com/tyrsdk-privacy-policy"
137
+ )
138
+
139
+ return replacedText
140
+
141
+ } catch {
142
+ print("Error creating regex: \(error.localizedDescription)")
143
+ return text
144
+ }
145
+ }
146
+ }
147
+
148
+ // MARK: - Info2 Section
149
+ struct Info2View: View {
150
+ let localization: LocalizationService
151
+ var body: some View {
152
+ StyledTextView(text: localization.translate("data.initialization.intro.label.iHaveRead"))
153
+ .padding(10)
154
+ .multilineTextAlignment(.leading)
155
+ .frame(width: UIScreen.main.bounds.width * 0.88)
156
+ }
157
+ }
158
+
159
+
160
+ // MARK: - Buttons
161
+ struct TwoButtons: View {
162
+ var onAccept: () -> Void
163
+ var onReject: () -> Void
164
+ let localization: LocalizationService
165
+
166
+ var body: some View {
167
+ VStack(spacing: 8) {
168
+ Button(action: onAccept) {
169
+ Text(localization
170
+ .translate("data.initialization.intro.cta.accept"))
171
+ .font(.system(size: 15, weight: .medium))
172
+ .foregroundColor(.white)
173
+ .frame(width: 160, height: 35)
174
+ .background(Color(hex: Tyrads.instance.mainColor ?? "#000000"))
175
+ .cornerRadius(5)
176
+ }
177
+
178
+ Button(action: onReject) {
179
+ Text(localization
180
+ .translate("data.initialization.intro.cta.reject"))
181
+ .font(.system(size: 15, weight: .medium))
182
+ .foregroundColor(Color(red: 179/255, green: 44/255, blue: 44/255))
183
+ .frame(width: 150, height: 35)
184
+ }
185
+ }
186
+ }
187
+ }
188
+
189
+ // MARK: StyledText View
190
+ struct StyledTextView: View {
191
+ let text: String
192
+ let fontSize: CGFloat = 14
193
+ let fontWeight: Font.Weight = .regular
194
+ let textColor: Color = .black
195
+ let linkColor: Color = Color(hex: Tyrads.instance.mainColor ?? "#000000")
196
+
197
+ var body: some View {
198
+ WrappingHStack(components: parseTextComponents(), fontSize: fontSize, fontWeight: fontWeight, textColor: textColor, linkColor: linkColor)
199
+ .font(.system(size: fontSize, weight: fontWeight))
200
+ }
201
+
202
+ private func parseTextComponents() -> [TextComponent] {
203
+ var components: [TextComponent] = []
204
+ let pattern = "<([a-z]+)>(.*?)</\\1>"
205
+
206
+ do {
207
+ let regex = try NSRegularExpression(pattern: pattern, options: [])
208
+ let nsString = text as NSString
209
+ let matches = regex.matches(in: text, options: [], range: NSRange(location: 0, length: nsString.length))
210
+
211
+ if matches.isEmpty {
212
+ return [TextComponent(text: text, isLink: false)]
213
+ }
214
+
215
+ var lastIndex = 0
216
+
217
+ for match in matches {
218
+ if match.range.location > lastIndex {
219
+ let beforeRange = NSRange(location: lastIndex, length: match.range.location - lastIndex)
220
+ let beforeText = nsString.substring(with: beforeRange)
221
+ components.append(TextComponent(text: beforeText, isLink: false))
222
+ }
223
+
224
+ let tagNameRange = match.range(at: 1)
225
+ let contentRange = match.range(at: 2)
226
+
227
+ let tagName = nsString.substring(with: tagNameRange)
228
+ let content = nsString.substring(with: contentRange)
229
+
230
+ components.append(TextComponent(text: content, isLink: true, tag: tagName))
231
+ lastIndex = match.range.location + match.range.length
232
+ }
233
+
234
+ if lastIndex < nsString.length {
235
+ let remainingText = nsString.substring(from: lastIndex)
236
+ components.append(TextComponent(text: remainingText, isLink: false))
237
+ }
238
+
239
+ } catch {
240
+ components = [TextComponent(text: text, isLink: false)]
241
+ }
242
+
243
+ return components
244
+ }
245
+
246
+ private func handleLinkTap(for tag: String?) {
247
+ guard let tag = tag else { return }
248
+
249
+ switch tag {
250
+ case "tos":
251
+ if let url = URL(string: "https://tyrads.com/tyrsdk-terms-of-service/") {
252
+ UIApplication.shared.open(url)
253
+ }
254
+ case "pp":
255
+ if let url = URL(string: "https://tyrads.com/tyrsdk-privacy-policy/") {
256
+ UIApplication.shared.open(url)
257
+ }
258
+ default:
259
+ break
260
+ }
261
+ }
262
+ }
263
+
264
+ struct WrappingHStack: View {
265
+ let components: [TextComponent]
266
+ let fontSize: CGFloat
267
+ let fontWeight: Font.Weight
268
+ let textColor: Color
269
+ let linkColor: Color
270
+
271
+ var body: some View {
272
+ GeometryReader { geometry in
273
+ self.generateContent(in: geometry)
274
+ }
275
+ }
276
+
277
+ private func generateContent(in geometry: GeometryProxy) -> some View {
278
+ var width = CGFloat.zero
279
+ var height = CGFloat.zero
280
+
281
+ return ZStack(alignment: .topLeading) {
282
+ ForEach(components, id: \.id) { component in
283
+ self.item(for: component)
284
+ .alignmentGuide(.leading) { dimension in
285
+ if abs(width - dimension.width) > geometry.size.width {
286
+ width = 0
287
+ height -= dimension.height
288
+ }
289
+ let result = width
290
+ if component.id == components.last?.id {
291
+ width = 0
292
+ } else {
293
+ width -= dimension.width
294
+ }
295
+ return result
296
+ }
297
+ .alignmentGuide(.top) { dimension in
298
+ let result = height
299
+ if component.id == components.last?.id {
300
+ height = 0
301
+ }
302
+ return result
303
+ }
304
+ }
305
+ }
306
+ }
307
+
308
+ @ViewBuilder
309
+ private func item(for component: TextComponent) -> some View {
310
+ if component.isLink {
311
+ Text(component.text)
312
+ .font(.system(size: fontSize, weight: fontWeight))
313
+ .foregroundColor(linkColor)
314
+ .onTapGesture {
315
+ handleLinkTap(for: component.tag)
316
+ }
317
+ } else {
318
+ Text(component.text)
319
+ .font(.system(size: fontSize, weight: fontWeight))
320
+ .foregroundColor(textColor)
321
+ }
322
+ }
323
+
324
+ private func handleLinkTap(for tag: String?) {
325
+ guard let tag = tag else { return }
326
+
327
+ switch tag {
328
+ case "tos":
329
+ if let url = URL(string: "https://tyrads.com/tyrsdk-terms-of-service/") {
330
+ UIApplication.shared.open(url)
331
+ }
332
+ case "pp":
333
+ if let url = URL(string: "https://tyrads.com/tyrsdk-privacy-policy/") {
334
+ UIApplication.shared.open(url)
335
+ }
336
+ default:
337
+ break
338
+ }
339
+ }
340
+ }
341
+
342
+ struct TextComponent: Identifiable {
343
+ let id = UUID()
344
+ let text: String
345
+ let isLink: Bool
346
+ let tag: String?
347
+
348
+ init(text: String, isLink: Bool, tag: String? = nil) {
349
+ self.text = text
350
+ self.isLink = isLink
351
+ self.tag = tag
352
+ }
353
+ }
@@ -0,0 +1,31 @@
1
+ //
2
+ // AcmoPrivacyPolicyController.swift
3
+ // Pods
4
+ //
5
+ // Created by Basharat Mehdi on 29/09/25.
6
+ //
7
+
8
+ import UIKit
9
+ import SwiftUI
10
+
11
+ public typealias PolicyCompletion = () -> Void
12
+
13
+ class AcmoPrivacyPolicyController: UIHostingController<AcmoPrivacyPolicyPage> {
14
+
15
+ init(onAccept: PolicyCompletion? = nil) {
16
+
17
+ let rootView = AcmoPrivacyPolicyPage(onAccept: onAccept)
18
+
19
+ super.init(rootView: rootView)
20
+
21
+ self.modalPresentationStyle = .fullScreen
22
+ }
23
+
24
+ @MainActor required dynamic init?(coder aDecoder: NSCoder) {
25
+ fatalError("init(coder:) has not been implemented")
26
+ }
27
+
28
+ override func viewWillDisappear(_ animated: Bool) {
29
+ super.viewWillDisappear(animated)
30
+ }
31
+ }
@@ -0,0 +1,302 @@
1
+ //
2
+ // AcmoUserUpdatePage.swift
3
+ // Pods
4
+ //
5
+ // Created by Basharat Mehdi on 30/09/25.
6
+ //
7
+
8
+ import SwiftUI
9
+
10
+ struct AcmoUsersUpdatePage: View {
11
+ @Environment(\.presentationMode) var presentationMode
12
+
13
+ var localization: LocalizationService = LocalizationService.shared
14
+
15
+ var onSubmit: (() -> Void)?
16
+
17
+ public init(onSubmit: (() -> Void)? = nil) {
18
+ self.onSubmit = onSubmit
19
+ }
20
+
21
+ @State private var selectedGender: String? = nil
22
+ @State private var selectedAge: String = "18"
23
+ @State private var isSubmitting = false
24
+ @State private var showError = false
25
+ @State private var errorMessage = ""
26
+
27
+ var body: some View {
28
+ ZStack{
29
+ VStack {
30
+ HStack {
31
+ Spacer()
32
+ Button(action: {
33
+ Tyrads.instance.setSkipUserUpdate(true)
34
+ Tyrads.instance.setNewUser(false)
35
+ presentationMode.wrappedValue.dismiss()
36
+ onSubmit?()
37
+ }) {
38
+ Text(localization.translate("data.shared.button.skip"))
39
+ .font(.system(size: 14))
40
+ .fontWeight(.semibold)
41
+ .frame(minWidth: 80, minHeight: 35)
42
+ .foregroundColor(Color(hex: Tyrads.instance.mainColor ?? "#000000"))
43
+ .overlay(
44
+ RoundedRectangle(cornerRadius: 50)
45
+ .stroke(Color(hex: Tyrads.instance.mainColor ?? "#000000"), lineWidth: 2)
46
+ ).padding(.horizontal, 16)
47
+ }
48
+ }
49
+
50
+ ScrollView {
51
+ VStack(spacing: 40) {
52
+ Text(localization.translate("data.initialization.userInfo.title"))
53
+ .font(.system(size: 16, weight: .semibold))
54
+ .multilineTextAlignment(.center)
55
+ .foregroundColor(Color(hex: Tyrads.instance.mainColor ?? "#000000"))
56
+ Spacer()
57
+ .frame(height: 20)
58
+
59
+ VStack(spacing: 25) {
60
+ Text(localization.translate(
61
+ "data.initialization.userInfo.chooseGender.label"))
62
+ .font(.system(size: 16, weight: .semibold))
63
+ .foregroundColor(Color(hex: Tyrads.instance.mainColor ?? "#000000"))
64
+
65
+ GenderSelectView(selectedGender: $selectedGender, localization: localization)
66
+ Spacer().frame(height: 50)
67
+
68
+ Text(localization.translate(
69
+ "data.initialization.userInfo.chooseAge.label"))
70
+ .font(.system(size: 16, weight: .semibold))
71
+ .foregroundColor(Color(hex: Tyrads.instance.mainColor ?? "#000000"))
72
+
73
+ AgeSelectView(selectedAge: $selectedAge)
74
+ }
75
+
76
+ Spacer().frame(height: 10)
77
+
78
+ Button(action: {
79
+ submit()
80
+ }) {
81
+ Text(isSubmitting ? "Submitting..." : localization.translate(
82
+ "data.initialization.userInfo.cta.continue"))
83
+ .font(.system(size: 15, weight: .semibold))
84
+ .foregroundColor(.white)
85
+ .frame(maxWidth: .infinity)
86
+ .frame(height: 44)
87
+ .background(Color(hex: Tyrads.instance.mainColor ?? "#000000"))
88
+ .cornerRadius(4)
89
+ }
90
+ .disabled(isSubmitting)
91
+ }
92
+ .padding(.horizontal, 20)
93
+ }
94
+ }
95
+ .alert(isPresented: $showError) {
96
+ Alert(title: Text("Error"), message: Text(errorMessage), dismissButton: .default(Text("OK")))
97
+ }
98
+ }
99
+
100
+ }
101
+ func submit() {
102
+ guard let gender = selectedGender, !gender.isEmpty else {
103
+ errorMessage = "Please select gender to proceed."
104
+ showError = true
105
+ return
106
+ }
107
+
108
+ isSubmitting = true
109
+ errorMessage = ""
110
+ showError = false
111
+
112
+ Task {
113
+ do {
114
+ try await UserRepository.shared.updateUser(
115
+ userID: Tyrads.instance.publisherUserID,
116
+ gender: gender,
117
+ age: selectedAge
118
+ )
119
+
120
+ await MainActor.run {
121
+ self.isSubmitting = false
122
+ Tyrads.instance.setNewUser(false)
123
+ self.presentationMode.wrappedValue.dismiss()
124
+ self.onSubmit?()
125
+ }
126
+
127
+ } catch {
128
+ await MainActor.run {
129
+ self.isSubmitting = false
130
+ self.errorMessage = "Failed to update user data: \(error.localizedDescription)"
131
+ self.showError = true
132
+ }
133
+ }
134
+ }
135
+ }
136
+ }
137
+
138
+ struct GenderSelectView: View {
139
+ @Binding var selectedGender: String?
140
+ let localization: LocalizationService
141
+
142
+ var body: some View {
143
+ HStack(spacing: 20) {
144
+ GenderButton(title: localization.translate("data.initialization.userInfo.gender.male"), selectedGender: $selectedGender,
145
+ localization: localization
146
+ )
147
+ GenderButton(title: localization.translate("data.initialization.userInfo.gender.female"), selectedGender: $selectedGender, localization: localization)
148
+ }
149
+ }
150
+ }
151
+
152
+ struct GenderButton: View {
153
+
154
+ func decodeBase64Image(_ base64: String) -> UIImage? {
155
+ guard let data = Data(base64Encoded: base64) else { return nil }
156
+ return UIImage(data: data)
157
+ }
158
+ let title: String
159
+ @Binding var selectedGender: String?
160
+ let localization: LocalizationService
161
+
162
+ var body: some View {
163
+ Button(action: {
164
+ selectedGender = title
165
+ }) {
166
+ VStack{
167
+ if let image = decodeBase64Image(title == localization.translate("data.initialization.userInfo.gender.male") ? AcmoAssets.maleBase64 : AcmoAssets.femaleBase64) {
168
+ Image(uiImage: image)
169
+ .renderingMode(.template)
170
+ .resizable()
171
+ .scaledToFit()
172
+ .foregroundColor(selectedGender == title ? .white : Color(hex: "#667085"))
173
+ .frame(width: 24, height: 24)
174
+ }
175
+ Text(title)
176
+ .foregroundColor(selectedGender == title ? .white : Color(hex: "#667085"))
177
+ }
178
+ }
179
+ .frame(width: 100, height: 102)
180
+ .background(selectedGender == title ? Color(hex: Tyrads.instance.mainColor ?? "#000000") : Color.white)
181
+ .cornerRadius(4)
182
+ .shadow(color: Color.black.opacity(0.25), radius: 4, x: 0, y: 1)
183
+ }
184
+ }
185
+
186
+ struct AgeSelectView: View {
187
+ @Binding var selectedAge: String
188
+ private let ages = Array(13..<109).map { String($0) }
189
+
190
+ var body: some View {
191
+ HorizontalAgePicker(selectedAge: $selectedAge)
192
+ }
193
+ }
194
+
195
+ struct HorizontalAgePicker: View {
196
+ @Binding var selectedAge: String
197
+ private let ages = Array(13...108).map { String($0) }
198
+
199
+ var body: some View {
200
+ GeometryReader { geometry in
201
+ let screenCenter = geometry.size.width / 2
202
+
203
+ if #available(iOS 14.0, *) {
204
+ ScrollViewReader{ proxy in
205
+ ScrollView(.horizontal, showsIndicators: false) {
206
+ HStack(spacing: 4) {
207
+ Spacer()
208
+ .frame(width: screenCenter - 30)
209
+
210
+ ForEach(ages, id: \.self) { age in
211
+ GeometryReader { geo in
212
+ let itemCenter = geo.frame(in: .global).midX
213
+ let distance = abs(itemCenter - screenCenter)
214
+ let scale = max(0.8, 1.2 - distance / 200)
215
+
216
+ var fontSize: CGFloat {
217
+ selectedAge == age ? 30 : 17
218
+ }
219
+
220
+ var fontWeight: Font.Weight {
221
+ selectedAge == age ? .semibold : .regular
222
+ }
223
+
224
+ Text(age)
225
+ .font(.system(size: fontSize, weight: fontWeight))
226
+ .frame(width: 90, height: 58)
227
+ .background(selectedAge == age ? Color(hex: "#F6F6F6") : .clear)
228
+ .foregroundColor(selectedAge == age ? Color(hex: Tyrads.instance.mainColor ?? "#FFFFFF") : .gray)
229
+ .cornerRadius(10)
230
+ .animation(.easeOut(duration: 0.2), value: scale)
231
+ .onAppear {
232
+ DispatchQueue.main.async {
233
+ proxy.scrollTo("18", anchor: .center)
234
+ }
235
+ }
236
+ .onChange(of: distance) { _ in
237
+ if distance < 20 {
238
+ if selectedAge != age {
239
+ DispatchQueue.main.async {
240
+ selectedAge = age
241
+ }
242
+ }
243
+ }
244
+ }
245
+
246
+ }
247
+ .frame(width: 60, height: 74)
248
+ }
249
+
250
+ Spacer()
251
+ .frame(width: screenCenter - 30)
252
+ }
253
+ }
254
+ }
255
+ } else {
256
+ ScrollView(.horizontal, showsIndicators: false) {
257
+ HStack(spacing: 4) {
258
+ Spacer()
259
+ .frame(width: screenCenter - 30)
260
+
261
+ ForEach(ages, id: \.self) { age in
262
+ GeometryReader { geo in
263
+ let itemCenter = geo.frame(in: .global).midX
264
+ let distance = abs(itemCenter - screenCenter)
265
+ let scale = max(0.8, 1.2 - distance / 200)
266
+
267
+ var fontSize: CGFloat {
268
+ selectedAge == age ? 30 : 17
269
+ }
270
+
271
+ var fontWeight: Font.Weight {
272
+ selectedAge == age ? .semibold : .regular
273
+ }
274
+ Text(age)
275
+ .font(.system(size: selectedAge == age ? 30 : 20, weight: .semibold))
276
+ .frame(width: 90, height: 58)
277
+ .background(selectedAge == age ? Color("#F6F6F6") : .clear)
278
+ .foregroundColor(selectedAge == age ? Color(hex: Tyrads.instance.mainColor ?? "#FFFFFF") : .black)
279
+ .cornerRadius(10)
280
+ .animation(.easeOut(duration: 0.2), value: scale)
281
+ .onAppear {
282
+ if age == ages.first {
283
+ selectedAge = age
284
+ }
285
+ }
286
+
287
+ }
288
+ .frame(width: 60, height: 74)
289
+ }
290
+
291
+ Spacer()
292
+ .frame(width: screenCenter - 30)
293
+ }
294
+
295
+ }
296
+ }
297
+ }
298
+ .frame(height: 100)
299
+ }
300
+ }
301
+
302
+
@@ -0,0 +1,26 @@
1
+ //
2
+ // AcmoUserUpdatePageController.swift
3
+ // Pods
4
+ //
5
+ // Created by Basharat Mehdi on 30/09/25.
6
+ //
7
+
8
+ import UIKit
9
+ import SwiftUI
10
+
11
+ public typealias UserUpdateCompletion = () -> Void
12
+ class AcmoUsersUpdateController: UIHostingController<AcmoUsersUpdatePage> {
13
+ public init(onSubmit: UserUpdateCompletion? = nil) {
14
+ let rootView = AcmoUsersUpdatePage(onSubmit: onSubmit)
15
+ super.init(rootView: rootView)
16
+ self.modalPresentationStyle = .fullScreen
17
+ }
18
+
19
+ @MainActor required dynamic init?(coder aDecoder: NSCoder) {
20
+ fatalError("init(coder:) has not been implemented")
21
+ }
22
+
23
+ override func viewWillDisappear(_ animated: Bool) {
24
+ super.viewWillDisappear(animated)
25
+ }
26
+ }