@tyrads.com/tyrads-sdk 2.0.1 → 3.1.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 (229) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/gradle.properties +1 -1
  3. package/android/src/main/java/com/tyradssdk/TyradsSdkModule.kt +27 -6
  4. package/ios/Tyrads/AcmoConfig.swift +3 -3
  5. package/ios/Tyrads/InitModel.swift +5 -2
  6. package/ios/Tyrads/Tyrads.swift +117 -186
  7. package/ios/Tyrads/WebViewController.swift +171 -0
  8. package/ios/Tyrads/helpers/aes_encryptor.swift +81 -0
  9. package/ios/Tyrads/helpers/device_details.swift +58 -0
  10. package/ios/TyradsSdk.mm +10 -2
  11. package/ios/TyradsSdk.swift +44 -29
  12. package/lib/commonjs/acmo/core/helpers/launcher.js +20 -0
  13. package/lib/commonjs/acmo/core/helpers/launcher.js.map +1 -0
  14. package/lib/commonjs/acmo/modules/dashboard/components/active_offers_button.js +76 -0
  15. package/lib/commonjs/acmo/modules/dashboard/components/active_offers_button.js.map +1 -0
  16. package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js +7 -10
  17. package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js.map +1 -1
  18. package/lib/commonjs/acmo/modules/dashboard/components/custom_scroller.js +141 -0
  19. package/lib/commonjs/acmo/modules/dashboard/components/custom_scroller.js.map +1 -0
  20. package/lib/commonjs/acmo/{core/marquee.js → modules/dashboard/components/custom_shimmer.js} +46 -34
  21. package/lib/commonjs/acmo/modules/dashboard/components/custom_shimmer.js.map +1 -0
  22. package/lib/commonjs/acmo/modules/dashboard/components/offer_card.js +264 -0
  23. package/lib/commonjs/acmo/modules/dashboard/components/offer_card.js.map +1 -0
  24. package/lib/commonjs/acmo/modules/dashboard/components/offer_list_item.js +197 -0
  25. package/lib/commonjs/acmo/modules/dashboard/components/offer_list_item.js.map +1 -0
  26. package/lib/commonjs/acmo/modules/dashboard/components/premium_empty_widget.js +83 -0
  27. package/lib/commonjs/acmo/modules/dashboard/components/premium_empty_widget.js.map +1 -0
  28. package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js +12 -10
  29. package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js.map +1 -1
  30. package/lib/commonjs/acmo/modules/dashboard/components/premium_loading.js +118 -0
  31. package/lib/commonjs/acmo/modules/dashboard/components/premium_loading.js.map +1 -0
  32. package/lib/commonjs/acmo/modules/dashboard/repository.js +108 -32
  33. package/lib/commonjs/acmo/modules/dashboard/repository.js.map +1 -1
  34. package/lib/commonjs/acmo/modules/dashboard/top_offers.js +70 -63
  35. package/lib/commonjs/acmo/modules/dashboard/top_offers.js.map +1 -1
  36. package/lib/commonjs/assets/images/angle_up.png +0 -0
  37. package/lib/commonjs/assets/images/diamond.png +0 -0
  38. package/lib/commonjs/assets/images/info.png +0 -0
  39. package/lib/commonjs/assets/images/info_icon.png +0 -0
  40. package/lib/commonjs/assets/images/premium-emptybg.jpeg +0 -0
  41. package/lib/commonjs/assets/images/rank_1.png +0 -0
  42. package/lib/commonjs/assets/images/rank_2.png +0 -0
  43. package/lib/commonjs/assets/images/rank_3.png +0 -0
  44. package/lib/commonjs/assets/images/rank_4.png +0 -0
  45. package/lib/commonjs/assets/images/rank_5.png +0 -0
  46. package/lib/commonjs/index.js +15 -16
  47. package/lib/commonjs/index.js.map +1 -1
  48. package/lib/module/acmo/core/helpers/launcher.js +15 -0
  49. package/lib/module/acmo/core/helpers/launcher.js.map +1 -0
  50. package/lib/module/acmo/modules/dashboard/components/active_offers_button.js +70 -0
  51. package/lib/module/acmo/modules/dashboard/components/active_offers_button.js.map +1 -0
  52. package/lib/module/acmo/modules/dashboard/components/custom_card.js +7 -10
  53. package/lib/module/acmo/modules/dashboard/components/custom_card.js.map +1 -1
  54. package/lib/module/acmo/modules/dashboard/components/custom_scroller.js +135 -0
  55. package/lib/module/acmo/modules/dashboard/components/custom_scroller.js.map +1 -0
  56. package/lib/module/acmo/modules/dashboard/components/custom_shimmer.js +66 -0
  57. package/lib/module/acmo/modules/dashboard/components/custom_shimmer.js.map +1 -0
  58. package/lib/module/acmo/modules/dashboard/components/offer_card.js +257 -0
  59. package/lib/module/acmo/modules/dashboard/components/offer_card.js.map +1 -0
  60. package/lib/module/acmo/modules/dashboard/components/offer_list_item.js +191 -0
  61. package/lib/module/acmo/modules/dashboard/components/offer_list_item.js.map +1 -0
  62. package/lib/module/acmo/modules/dashboard/components/premium_empty_widget.js +78 -0
  63. package/lib/module/acmo/modules/dashboard/components/premium_empty_widget.js.map +1 -0
  64. package/lib/module/acmo/modules/dashboard/components/premium_header.js +12 -10
  65. package/lib/module/acmo/modules/dashboard/components/premium_header.js.map +1 -1
  66. package/lib/module/acmo/modules/dashboard/components/premium_loading.js +113 -0
  67. package/lib/module/acmo/modules/dashboard/components/premium_loading.js.map +1 -0
  68. package/lib/module/acmo/modules/dashboard/repository.js +105 -30
  69. package/lib/module/acmo/modules/dashboard/repository.js.map +1 -1
  70. package/lib/module/acmo/modules/dashboard/top_offers.js +71 -64
  71. package/lib/module/acmo/modules/dashboard/top_offers.js.map +1 -1
  72. package/lib/module/assets/images/angle_up.png +0 -0
  73. package/lib/module/assets/images/diamond.png +0 -0
  74. package/lib/module/assets/images/info.png +0 -0
  75. package/lib/module/assets/images/info_icon.png +0 -0
  76. package/lib/module/assets/images/premium-emptybg.jpeg +0 -0
  77. package/lib/module/assets/images/rank_1.png +0 -0
  78. package/lib/module/assets/images/rank_2.png +0 -0
  79. package/lib/module/assets/images/rank_3.png +0 -0
  80. package/lib/module/assets/images/rank_4.png +0 -0
  81. package/lib/module/assets/images/rank_5.png +0 -0
  82. package/lib/module/index.js +15 -16
  83. package/lib/module/index.js.map +1 -1
  84. package/lib/typescript/commonjs/src/acmo/core/helpers/launcher.d.ts +3 -0
  85. package/lib/typescript/commonjs/src/acmo/core/helpers/launcher.d.ts.map +1 -0
  86. package/lib/typescript/commonjs/src/acmo/core/storage/storage.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/active_offers_button.d.ts +9 -0
  88. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/active_offers_button.d.ts.map +1 -0
  89. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_card.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_scroller.d.ts +17 -0
  91. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_scroller.d.ts.map +1 -0
  92. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_shimmer.d.ts +11 -0
  93. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_shimmer.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_card.d.ts +12 -0
  95. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_card.d.ts.map +1 -0
  96. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_list_item.d.ts +15 -0
  97. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_list_item.d.ts.map +1 -0
  98. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts +7 -0
  99. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts.map +1 -0
  100. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_loading.d.ts +9 -0
  101. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_loading.d.ts.map +1 -0
  102. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts +2 -1
  103. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts +8 -7
  105. package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/src/index.d.ts +6 -8
  107. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  108. package/lib/typescript/module/src/acmo/core/helpers/launcher.d.ts +3 -0
  109. package/lib/typescript/module/src/acmo/core/helpers/launcher.d.ts.map +1 -0
  110. package/lib/typescript/module/src/acmo/core/storage/storage.d.ts.map +1 -1
  111. package/lib/typescript/module/src/acmo/modules/dashboard/components/active_offers_button.d.ts +9 -0
  112. package/lib/typescript/module/src/acmo/modules/dashboard/components/active_offers_button.d.ts.map +1 -0
  113. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_card.d.ts.map +1 -1
  114. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_scroller.d.ts +17 -0
  115. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_scroller.d.ts.map +1 -0
  116. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_shimmer.d.ts +11 -0
  117. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_shimmer.d.ts.map +1 -0
  118. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_card.d.ts +12 -0
  119. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_card.d.ts.map +1 -0
  120. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_list_item.d.ts +15 -0
  121. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_list_item.d.ts.map +1 -0
  122. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts +7 -0
  123. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts.map +1 -0
  124. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_loading.d.ts +9 -0
  125. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_loading.d.ts.map +1 -0
  126. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts +2 -1
  127. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts.map +1 -1
  128. package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts +8 -7
  129. package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts.map +1 -1
  130. package/lib/typescript/module/src/index.d.ts +6 -8
  131. package/lib/typescript/module/src/index.d.ts.map +1 -1
  132. package/package.json +3 -2
  133. package/readme.md +8 -8
  134. package/src/acmo/core/helpers/launcher.ts +14 -0
  135. package/src/acmo/core/types/types.d.ts +11 -13
  136. package/src/acmo/modules/dashboard/components/active_offers_button.tsx +61 -0
  137. package/src/acmo/modules/dashboard/components/custom_card.tsx +5 -8
  138. package/src/acmo/modules/dashboard/components/custom_scroller.tsx +164 -0
  139. package/src/acmo/modules/dashboard/components/custom_shimmer.tsx +75 -0
  140. package/src/acmo/modules/dashboard/components/offer_card.tsx +248 -0
  141. package/src/acmo/modules/dashboard/components/offer_list_item.tsx +225 -0
  142. package/src/acmo/modules/dashboard/components/premium_empty_widget.tsx +76 -0
  143. package/src/acmo/modules/dashboard/components/premium_header.tsx +8 -8
  144. package/src/acmo/modules/dashboard/components/premium_loading.tsx +78 -0
  145. package/src/acmo/modules/dashboard/repository.ts +121 -46
  146. package/src/acmo/modules/dashboard/top_offers.tsx +89 -52
  147. package/src/assets/images/angle_up.png +0 -0
  148. package/src/assets/images/diamond.png +0 -0
  149. package/src/assets/images/info.png +0 -0
  150. package/src/assets/images/info_icon.png +0 -0
  151. package/src/assets/images/premium-emptybg.jpeg +0 -0
  152. package/src/assets/images/rank_1.png +0 -0
  153. package/src/assets/images/rank_2.png +0 -0
  154. package/src/assets/images/rank_3.png +0 -0
  155. package/src/assets/images/rank_4.png +0 -0
  156. package/src/assets/images/rank_5.png +0 -0
  157. package/src/index.tsx +19 -23
  158. package/android/src/main/java/com/tyradssdk/TyradsSdkComposeViewManager.kt +0 -112
  159. package/lib/commonjs/acmo/core/marquee.js.map +0 -1
  160. package/lib/commonjs/acmo/modules/dashboard/components/auto_scroller.js +0 -87
  161. package/lib/commonjs/acmo/modules/dashboard/components/auto_scroller.js.map +0 -1
  162. package/lib/commonjs/acmo/modules/dashboard/components/my_games_button.js +0 -48
  163. package/lib/commonjs/acmo/modules/dashboard/components/my_games_button.js.map +0 -1
  164. package/lib/commonjs/acmo/modules/dashboard/components/offer_info_section.js +0 -158
  165. package/lib/commonjs/acmo/modules/dashboard/components/offer_info_section.js.map +0 -1
  166. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_1.js +0 -181
  167. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_1.js.map +0 -1
  168. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_2.js +0 -102
  169. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_2.js.map +0 -1
  170. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_3.js +0 -41
  171. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_3.js.map +0 -1
  172. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_4.js +0 -214
  173. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_4.js.map +0 -1
  174. package/lib/module/acmo/core/marquee.js +0 -54
  175. package/lib/module/acmo/core/marquee.js.map +0 -1
  176. package/lib/module/acmo/modules/dashboard/components/auto_scroller.js +0 -81
  177. package/lib/module/acmo/modules/dashboard/components/auto_scroller.js.map +0 -1
  178. package/lib/module/acmo/modules/dashboard/components/my_games_button.js +0 -43
  179. package/lib/module/acmo/modules/dashboard/components/my_games_button.js.map +0 -1
  180. package/lib/module/acmo/modules/dashboard/components/offer_info_section.js +0 -153
  181. package/lib/module/acmo/modules/dashboard/components/offer_info_section.js.map +0 -1
  182. package/lib/module/acmo/modules/dashboard/components/premium_option_1.js +0 -176
  183. package/lib/module/acmo/modules/dashboard/components/premium_option_1.js.map +0 -1
  184. package/lib/module/acmo/modules/dashboard/components/premium_option_2.js +0 -97
  185. package/lib/module/acmo/modules/dashboard/components/premium_option_2.js.map +0 -1
  186. package/lib/module/acmo/modules/dashboard/components/premium_option_3.js +0 -36
  187. package/lib/module/acmo/modules/dashboard/components/premium_option_3.js.map +0 -1
  188. package/lib/module/acmo/modules/dashboard/components/premium_option_4.js +0 -209
  189. package/lib/module/acmo/modules/dashboard/components/premium_option_4.js.map +0 -1
  190. package/lib/typescript/commonjs/src/acmo/core/marquee.d.ts +0 -11
  191. package/lib/typescript/commonjs/src/acmo/core/marquee.d.ts.map +0 -1
  192. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/auto_scroller.d.ts +0 -10
  193. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/auto_scroller.d.ts.map +0 -1
  194. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/my_games_button.d.ts +0 -8
  195. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/my_games_button.d.ts.map +0 -1
  196. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_info_section.d.ts +0 -11
  197. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map +0 -1
  198. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_1.d.ts +0 -9
  199. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map +0 -1
  200. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_2.d.ts +0 -9
  201. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map +0 -1
  202. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts +0 -9
  203. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map +0 -1
  204. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts +0 -9
  205. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map +0 -1
  206. package/lib/typescript/module/src/acmo/core/marquee.d.ts +0 -11
  207. package/lib/typescript/module/src/acmo/core/marquee.d.ts.map +0 -1
  208. package/lib/typescript/module/src/acmo/modules/dashboard/components/auto_scroller.d.ts +0 -10
  209. package/lib/typescript/module/src/acmo/modules/dashboard/components/auto_scroller.d.ts.map +0 -1
  210. package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts +0 -8
  211. package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts.map +0 -1
  212. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts +0 -11
  213. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map +0 -1
  214. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts +0 -9
  215. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map +0 -1
  216. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts +0 -9
  217. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map +0 -1
  218. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts +0 -9
  219. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map +0 -1
  220. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts +0 -9
  221. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map +0 -1
  222. package/src/acmo/core/marquee.tsx +0 -62
  223. package/src/acmo/modules/dashboard/components/auto_scroller.tsx +0 -85
  224. package/src/acmo/modules/dashboard/components/my_games_button.tsx +0 -40
  225. package/src/acmo/modules/dashboard/components/offer_info_section.tsx +0 -139
  226. package/src/acmo/modules/dashboard/components/premium_option_1.tsx +0 -156
  227. package/src/acmo/modules/dashboard/components/premium_option_2.tsx +0 -100
  228. package/src/acmo/modules/dashboard/components/premium_option_3.tsx +0 -42
  229. package/src/acmo/modules/dashboard/components/premium_option_4.tsx +0 -185
@@ -2,44 +2,47 @@ import React, { useState, useEffect } from 'react';
2
2
  import {
3
3
  View,
4
4
  Text,
5
- ActivityIndicator,
6
5
  StyleSheet,
7
6
  } from 'react-native';
8
- import { fetchCampaignsData } from './repository';
7
+ import { fetchPremiumOfferDetails, openOffer } from './repository';
9
8
  import PremiumHeaderSection from './components/premium_header';
10
9
  import CustomCard from './components/custom_card';
11
- import MyGamesButton from './components/my_games_button';
12
- import PremiumOption1 from './components/premium_option_1';
13
- import PremiumOption2 from './components/premium_option_2';
14
- import PremiumOption3 from './components/premium_option_3';
15
- import PremiumOption4 from './components/premium_option_4';
10
+ import ActiveOffersButton from './components/active_offers_button';
11
+ import { AcmoOfferListItem } from './components/offer_list_item';
12
+ import AcmoOfferCard from './components/offer_card';
13
+ import AcmoScrollPager from './components/custom_scroller';
14
+ import PremiumEmptyView from './components/premium_empty_widget';
15
+ import PremiumWidgetsLoading from './components/premium_loading';
16
16
 
17
- interface TopOffersProps {
18
- showMore?: boolean;
19
- showMyOffers?: boolean;
20
- showMyOffersEmptyView?: boolean;
21
- style?: number;
17
+ export const enum PremiumWidgetStyles {
18
+ list,
19
+ sliderCards,
20
+ }
21
+
22
+ interface PremiumWidgetProps {
23
+ widgetStyle?: PremiumWidgetStyles;
22
24
  onNavigate: (route?: string, campaignID?: number) => void;
23
25
  }
24
26
 
25
- const TopOffers: React.FC<TopOffersProps> = ({
26
- showMore,
27
- showMyOffers = false,
28
- showMyOffersEmptyView = false,
29
- style = 1,
27
+ const PremiumWidgets: React.FC<PremiumWidgetProps> = ({
28
+ widgetStyle = PremiumWidgetStyles.list,
30
29
  onNavigate
31
30
  }) => {
32
- const [campaigns, setCampaigns] = useState<TransformedCampaign[]>([]);
31
+ const [campaigns, setCampaigns] = useState<Campaign[]>([]);
33
32
  const [isLoading, setIsLoading] = useState<boolean>(true);
34
33
  const [error, setError] = useState<string | null>(null);
35
34
  const [premiumColor, setPremiumColor] = useState<string>('#1C90DF');
36
- // const [language, setLanguage] = useState<string>('en');
35
+ const [currencySale, setCurrencySale] = useState<CurrencySales>();
36
+ const [activeCount, setActiveCount] = useState<number>(0);
37
+ const [loadingIndex, setLoadingIndex] = useState<number | null>(null);
38
+
37
39
 
38
40
  useEffect(() => {
39
- fetchCampaignsData(
40
- // setLanguage,
41
+ fetchPremiumOfferDetails(
41
42
  setPremiumColor,
42
43
  setCampaigns,
44
+ setCurrencySale,
45
+ setActiveCount,
43
46
  setError,
44
47
  setIsLoading
45
48
  );
@@ -49,18 +52,30 @@ const TopOffers: React.FC<TopOffersProps> = ({
49
52
  onNavigate();
50
53
  };
51
54
  const handleCampaignPress = (campaignId: number) => {
52
- onNavigate('campaign-details',campaignId );
55
+ onNavigate("offers", campaignId);
53
56
  };
54
57
 
55
- const handleMoreOffersPress = (route: string) => {
58
+ const handleActiveOffersPress = (route: string) => {
56
59
  onNavigate(route);
57
60
  };
58
61
 
62
+ const handleButtonPress = async (campaign: Campaign) => {
63
+ await openOffer(campaign);
64
+ await fetchPremiumOfferDetails(
65
+ setPremiumColor,
66
+ setCampaigns,
67
+ setCurrencySale,
68
+ setActiveCount,
69
+ setError,
70
+ setIsLoading
71
+ );
72
+ }
73
+
59
74
  if (isLoading) {
60
75
  return (
61
- <View style={styles.loadingContainer}>
62
- <ActivityIndicator size="large" color="#007AFF" />
63
- </View>
76
+ <PremiumWidgetsLoading
77
+ widgetStyle={widgetStyle}
78
+ />
64
79
  );
65
80
  }
66
81
 
@@ -72,53 +87,75 @@ const TopOffers: React.FC<TopOffersProps> = ({
72
87
  );
73
88
  }
74
89
 
90
+
75
91
  if (campaigns.length === 0) {
76
- if (showMyOffersEmptyView) {
77
- return (
78
- <View style={styles.noCampaignContainer}>
79
- <Text>No campaigns available</Text>
80
- </View>
81
- );
82
- } else {
83
- return <View />;
84
- }
92
+ return <PremiumEmptyView
93
+ colorPremium={premiumColor}
94
+ onContinue={handleShowOffers}
95
+ />
85
96
  }
86
97
 
87
98
  return (
88
- <CustomCard style={{}}>
99
+ <CustomCard style={{ flexDirection: 'row' }}>
89
100
  <View style={{ flex: 1 }}>
90
- <PremiumHeaderSection showMore={showMore} premiumColor={premiumColor} onShowOffers={handleShowOffers} />
101
+ <PremiumHeaderSection premiumColor={premiumColor} onShowOffers={handleShowOffers} />
91
102
  <View style={styles.headerSpacer} />
92
103
  {(() => {
93
- switch (style) {
94
- case 1:
104
+ switch (widgetStyle) {
105
+ case PremiumWidgetStyles.list:
95
106
  return (
96
- <PremiumOption1 data={campaigns} premiumColor={premiumColor} onCampaignPress={handleCampaignPress} />
107
+ campaigns.map((item, index) => (
108
+ <AcmoOfferListItem
109
+ key={index}
110
+ onPress={async () => handleCampaignPress && handleCampaignPress(item.campaignId)}
111
+ offer={item}
112
+ currencySales={currencySale}
113
+ index={index}
114
+ loadingIndex={loadingIndex}
115
+ setLoadingIndex={setLoadingIndex}
116
+ colorPremium={premiumColor}
117
+ onButtonTap={async () => handleButtonPress(item)}
118
+ />
119
+ ))
97
120
  );
98
- case 2:
121
+ case PremiumWidgetStyles.sliderCards:
99
122
  return (
100
- <PremiumOption2 data={campaigns} premiumColor={premiumColor} onCampaignPress={handleCampaignPress} />
101
- );
102
- case 3:
103
- return (
104
- <PremiumOption3 data={campaigns} premiumColor={premiumColor} onCampaignPress={handleCampaignPress} />
105
- );
106
- case 4:
107
- return (
108
- <PremiumOption4 data={campaigns} premiumColor={premiumColor} onCampaignPress={handleCampaignPress} />
123
+ <AcmoScrollPager
124
+ totalPages={campaigns.length}
125
+ activeIndicatorColor={premiumColor}
126
+ content={(index) => (
127
+ <AcmoOfferCard
128
+ item={campaigns[index]!}
129
+ onButtonClick={async () => handleButtonPress(campaigns[index]!)}
130
+ currencySaleModel={currencySale}
131
+ premiumColor={premiumColor}
132
+ isLoading={false}
133
+ onTap={async () => handleCampaignPress && handleCampaignPress(campaigns[index]!.campaignId)}
134
+ />
135
+ )}
136
+ />
109
137
  );
110
138
  default:
111
139
  return <Text>Please specify a correct style</Text>;
112
140
  }
113
141
  })()}
114
142
  <View style={styles.gameListSpacer} />
115
- {showMyOffers && <MyGamesButton premiumColor={premiumColor} onPress={handleMoreOffersPress}/>}
143
+ <ActiveOffersButton activeCount={activeCount} premiumColor={premiumColor} onPress={handleActiveOffersPress} />
116
144
  </View>
117
145
  </CustomCard>
118
146
  );
119
147
  };
120
148
 
121
149
  const styles = StyleSheet.create({
150
+ itemContainer: {
151
+ flexDirection: 'row',
152
+ flex: 1,
153
+ width: '100%',
154
+ justifyContent: 'space-between',
155
+ alignItems: 'center',
156
+ paddingHorizontal: 16,
157
+ paddingVertical: 8,
158
+ },
122
159
  loadingContainer: {
123
160
  flex: 1,
124
161
  justifyContent: 'center',
@@ -141,4 +178,4 @@ const styles = StyleSheet.create({
141
178
  },
142
179
  });
143
180
 
144
- export default TopOffers;
181
+ export default PremiumWidgets;
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/src/index.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NativeModules, Platform, View,} from 'react-native';
2
2
 
3
- import TopOffers from './acmo/modules/dashboard/top_offers';
3
+ import TopOffers, { PremiumWidgetStyles } from './acmo/modules/dashboard/top_offers';
4
4
  import { saveData } from './acmo/core/storage/storage';
5
5
  import { I18nextProvider } from 'react-i18next';
6
6
  import i18n from './i18n';
@@ -26,13 +26,13 @@ const TyradsSdk = NativeModules.TyradsSdk
26
26
  );
27
27
 
28
28
  const Tyrads = {
29
- init: (apiKey: string, apiSecret: string) => {
30
- return TyradsSdk.init(apiKey, apiSecret);
29
+ init: async (apiKey: string, apiSecret: string, encKey?: string) => {
30
+ const data = await TyradsSdk.init(apiKey, apiSecret, encKey);
31
+ return data;
31
32
  },
32
33
  loginUser: async (userId: string) => {
33
34
  try {
34
35
  const data = await TyradsSdk.loginUser(userId);
35
- console.log("data from login: ", data);
36
36
 
37
37
  if (typeof data === "object") {
38
38
  await saveData('apiHeaders', JSON.stringify(data));
@@ -44,46 +44,42 @@ const Tyrads = {
44
44
 
45
45
  return data;
46
46
  } catch (err) {
47
- console.log(`error from login: ${err}`);
48
47
  return null;
49
48
  }
50
49
  },
51
50
 
52
- showOffers: ({
51
+ showOffers: async ({
53
52
  launchMode = 3,
54
53
  route,
55
- campaignID = 0,
56
- }: { launchMode?: number; route?: string; campaignID?: number } = {}) => {
54
+ campaignID,
55
+ }: { launchMode?: number; route?: string; campaignID?: number | null } = {}) => {
57
56
  if (Platform.OS === 'ios') {
58
- return TyradsSdk.showOffers(launchMode, route, campaignID);
57
+ if(campaignID == null) {
58
+ return await TyradsSdk.showOffers(launchMode, route);
59
+ }
60
+ return await TyradsSdk.showOfferDetails(launchMode, route, campaignID);
59
61
  } else {
60
- return TyradsSdk.showOffers(route, campaignID);
62
+ if(campaignID == null) {
63
+ return await TyradsSdk.showOffers(route);
64
+ }
65
+ return await TyradsSdk.showOfferDetails(route, campaignID);
61
66
  }
62
67
  },
63
68
  topPremiumOffers: ({
64
- showMore = true,
65
- showMyOffers = true,
66
- showMyOffersEmptyView = false,
67
- viewStyle = 1,
69
+ widgetStyle,
68
70
  launchMode = 2,
69
71
  }: {
70
- showMore?: boolean;
71
- showMyOffers?: boolean;
72
- showMyOffersEmptyView?: boolean;
73
- viewStyle?: number;
72
+ widgetStyle?: PremiumWidgetStyles;
74
73
  launchMode?: number;
75
74
  } = {}) => {
76
- const handleNavigation = (route?: string, campaignID?: number) => {
75
+ const handleNavigation = (route?: string, campaignID?: number | null) => {
77
76
  Tyrads.showOffers({ route: route, campaignID: campaignID, launchMode: launchMode});
78
77
  };
79
78
  return (
80
79
  <I18nextProvider i18n={i18n}>
81
80
  <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
82
81
  <TopOffers
83
- showMore={showMore}
84
- showMyOffers={showMyOffers}
85
- showMyOffersEmptyView={showMyOffersEmptyView}
86
- style={viewStyle}
82
+ widgetStyle={widgetStyle}
87
83
  onNavigate={handleNavigation}
88
84
  />
89
85
  </View>
@@ -1,112 +0,0 @@
1
- // package com.tyradssdk
2
-
3
- // import android.content.Context
4
- // import androidx.compose.runtime.Composable
5
- // import androidx.compose.ui.platform.ComposeView
6
- // import com.facebook.react.bridge.ReactContext
7
- // import com.facebook.react.uimanager.SimpleViewManager
8
- // import com.facebook.react.uimanager.ThemedReactContext
9
- // import com.facebook.react.uimanager.annotations.ReactProp
10
- // import com.tyrads.sdk.Tyrads
11
- // import android.util.Log
12
- // import androidx.compose.foundation.background
13
- // import androidx.compose.foundation.layout.Box
14
- // import androidx.compose.foundation.layout.fillMaxSize
15
- // import androidx.compose.material.Text
16
- // import androidx.compose.ui.Alignment
17
- // import androidx.compose.ui.Modifier
18
- // import androidx.compose.ui.graphics.Color
19
- // import androidx.compose.runtime.LaunchedEffect
20
- // import android.os.Handler
21
- // import android.os.Looper
22
-
23
- // class ComposeViewManager : SimpleViewManager<ComposeView>() {
24
- // override fun getName(): String {
25
- // return "TyradsSdkComposeView"
26
- // }
27
-
28
- // override fun createViewInstance(reactContext: ThemedReactContext): ComposeView {
29
- // Log.d("bmd", "ComposeView created")
30
-
31
- // val composeView = ComposeView(reactContext)
32
-
33
- // Handler(Looper.getMainLooper()).post {
34
- // Log.d("bmd", "Running setContent inside createViewInstance")
35
-
36
- // composeView.setContent {
37
- // Box(
38
- // modifier = Modifier
39
- // .fillMaxSize()
40
- // .background(Color.Yellow),
41
- // contentAlignment = Alignment.Center
42
- // ) {
43
- // Text("Test Compose", color = Color.Black)
44
- // }
45
- // }
46
- // }
47
-
48
- // return composeView
49
- // }
50
-
51
- // @ReactProp(name = "showMore")
52
- // fun setShowMore(view: ComposeView, showMore: Boolean) {
53
- // view.post {
54
- // view.setContent {
55
- // TopPremiumOffersComposable(showMore = showMore)
56
- // }
57
- // }
58
- // }
59
-
60
- // @ReactProp(name = "showMyOffers")
61
- // fun setShowMyOffers(view: ComposeView, showMyOffers: Boolean) {
62
- // view.post{
63
- // view.setContent {
64
- // TopPremiumOffersComposable(showMyOffers = showMyOffers)
65
- // }
66
- // }
67
- // }
68
-
69
- // @ReactProp(name = "showMyOffersEmptyView")
70
- // fun setShowMyOffersEmptyView(view: ComposeView, showMyOffersEmptyView: Boolean) {
71
- // view.post{
72
- // view.setContent {
73
- // TopPremiumOffersComposable(showMyOffersEmptyView = showMyOffersEmptyView)
74
- // }
75
- // }
76
- // }
77
-
78
- // @ReactProp(name = "viewStyle")
79
- // fun setViewStyle(view: ComposeView, viewStyle: Int) {
80
- // view.post{
81
- // view.setContent {
82
- // TopPremiumOffersComposable(style = viewStyle)
83
- // }
84
- // }
85
- // }
86
-
87
- // @Composable
88
- // private fun TopPremiumOffersComposable(
89
- // showMore: Boolean = true,
90
- // showMyOffers: Boolean = true,
91
- // showMyOffersEmptyView: Boolean = false,
92
- // style: Int = 2
93
- // ) {
94
- // LaunchedEffect(Unit){
95
- // Log.d("bmd", "TopPremiumOffersComposable called")
96
- // }
97
- // Box(
98
- // modifier = Modifier
99
- // .fillMaxSize()
100
- // .background(Color.Yellow),
101
- // contentAlignment = Alignment.Center
102
- // ) {
103
- // Text("Test Compose", color = Color.Black)
104
- // }
105
- // // Tyrads.getInstance().TopPremiumOffers(
106
- // // showMore = showMore,
107
- // // showMyOffers = showMyOffers,
108
- // // showMyOffersEmptyView = showMyOffersEmptyView,
109
- // // style = style
110
- // // )
111
- // }
112
- // }
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","MarqueeText","text","speed","repeat","style","translateX","useRef","Animated","Value","current","useEffect","textWidth","length","screenWidth","Dimensions","width","animation","loop","sequence","timing","toValue","duration","useNativeDriver","iterations","start","stop","jsx","View","styles","container","children","Text","numberOfLines","transform","StyleSheet","create","overflow","fontSize","fontWeight","_default","exports"],"sourceRoot":"../../../../src","sources":["acmo/core/marquee.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAsF,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA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CAAC;EACDd,IAAI,EAAE;IACJoC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAtD,OAAA,GAEYc,WAAW","ignoreList":[]}
@@ -1,87 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _jsxRuntime = require("react/jsx-runtime");
10
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
- const {
13
- width
14
- } = _reactNative.Dimensions.get('window');
15
- const AutoScrollPagerWithIndicators = ({
16
- totalPages,
17
- delayInMillis = 5000,
18
- premiumColor,
19
- content
20
- }) => {
21
- const [currentPage, setCurrentPage] = (0, _react.useState)(0);
22
- const scrollViewRef = (0, _react.useRef)(null);
23
- (0, _react.useEffect)(() => {
24
- const intervalId = setInterval(() => {
25
- const nextBanner = (currentPage + 1) % totalPages;
26
- setCurrentPage(nextBanner);
27
- scrollViewRef.current?.scrollTo({
28
- x: nextBanner * width,
29
- animated: true
30
- });
31
- }, delayInMillis);
32
- return () => clearInterval(intervalId);
33
- }, [currentPage, totalPages, delayInMillis]);
34
- (0, _react.useEffect)(() => {
35
- scrollViewRef.current?.scrollTo({
36
- x: currentPage * width,
37
- animated: false
38
- });
39
- }, [currentPage]);
40
- const renderIndicators = () => {
41
- const indicators = [];
42
- for (let i = 0; i < totalPages; i++) {
43
- indicators.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
44
- style: [styles.indicator, {
45
- backgroundColor: currentPage === i ? premiumColor || '#1C90DF' : 'lightgray'
46
- }]
47
- }, i));
48
- }
49
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
50
- style: styles.indicatorContainer,
51
- children: indicators
52
- });
53
- };
54
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
55
- style: styles.container,
56
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
57
- ref: scrollViewRef,
58
- horizontal: true,
59
- pagingEnabled: true,
60
- showsHorizontalScrollIndicator: true,
61
- scrollEnabled: false,
62
- contentContainerStyle: {
63
- width: totalPages * width
64
- },
65
- children: Array.from({
66
- length: totalPages
67
- }, (_, i) => content(i))
68
- }), renderIndicators()]
69
- });
70
- };
71
- const styles = _reactNative.StyleSheet.create({
72
- container: {
73
- alignItems: 'center'
74
- },
75
- indicatorContainer: {
76
- flexDirection: 'row',
77
- marginTop: 10
78
- },
79
- indicator: {
80
- width: 8,
81
- height: 8,
82
- borderRadius: 4,
83
- marginHorizontal: 2
84
- }
85
- });
86
- var _default = exports.default = AutoScrollPagerWithIndicators;
87
- //# sourceMappingURL=auto_scroller.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","width","Dimensions","AutoScrollPagerWithIndicators","totalPages","delayInMillis","premiumColor","content","currentPage","setCurrentPage","useState","scrollViewRef","useRef","useEffect","intervalId","setInterval","nextBanner","current","scrollTo","x","animated","clearInterval","renderIndicators","indicators","push","jsx","View","style","styles","indicator","backgroundColor","indicatorContainer","children","jsxs","container","ScrollView","ref","horizontal","pagingEnabled","showsHorizontalScrollIndicator","scrollEnabled","contentContainerStyle","Array","from","length","_","StyleSheet","create","alignItems","flexDirection","marginTop","height","borderRadius","marginHorizontal","_default","exports"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/auto_scroller.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAwE,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CA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EAAE;IAClBkB,aAAa,EAAE,KAAK;IACpBC,SAAS,EAAE;EACb,CAAC;EACDrB,SAAS,EAAE;IACT5B,KAAK,EAAE,CAAC;IACRkD,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE,CAAC;IACfC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAApE,OAAA,GAEYgB,6BAA6B","ignoreList":[]}
@@ -1,48 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _reactNative = require("react-native");
9
- var _reactI18next = require("react-i18next");
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- const MyGamesButton = ({
13
- premiumColor,
14
- onPress
15
- }) => {
16
- const {
17
- t
18
- } = (0, _reactI18next.useTranslation)();
19
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
20
- style: [styles.button, {
21
- backgroundColor: premiumColor || '#1C90DF'
22
- }],
23
- onPress: () => onPress && onPress('campaigns-activated'),
24
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
25
- style: styles.buttonText,
26
- children: t('dashboard.my_games')
27
- })
28
- });
29
- };
30
- const styles = _reactNative.StyleSheet.create({
31
- button: {
32
- borderRadius: 8,
33
- paddingHorizontal: 16,
34
- paddingVertical: 8,
35
- height: 40,
36
- justifyContent: 'center',
37
- alignItems: 'center',
38
- marginHorizontal: 16,
39
- marginBottom: 16
40
- },
41
- buttonText: {
42
- color: 'white',
43
- fontSize: 16,
44
- fontWeight: 'bold'
45
- }
46
- });
47
- var _default = exports.default = MyGamesButton;
48
- //# sourceMappingURL=my_games_button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactI18next","_jsxRuntime","e","__esModule","default","MyGamesButton","premiumColor","onPress","t","useTranslation","jsx","TouchableOpacity","style","styles","button","backgroundColor","children","Text","buttonText","StyleSheet","create","borderRadius","paddingHorizontal","paddingVertical","height","justifyContent","alignItems","marginHorizontal","marginBottom","color","fontSize","fontWeight","_default","exports"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/my_games_button.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAA+C,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAO/C,MAAMG,aAA2C,GAAGA,CAAC;EAAEC,YAAY;EAAGC;AAAO,CAAC,KAAK;EACjF,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,4BAAc,EAAC,CAAC;EAC9B,oBACE,IAAAR,WAAA,CAAAS,GAAA,EAACX,YAAA,CAAAY,gBAAgB;IACfC,KAAK,EAAE,CAACC,MAAM,CAACC,MAAM,EAAE;MAAEC,eAAe,EAAET,YAAY,IAAI;IAAU,CAAC,CAAE;IACvEC,OAAO,EAAEA,CAAA,KAAMA,OAAO,IAAIA,OAAO,CAAC,qBAAqB,CAAE;IAAAS,QAAA,eAEzD,IAAAf,WAAA,CAAAS,GAAA,EAACX,YAAA,CAAAkB,IAAI;MAACL,KAAK,EAAEC,MAAM,CAACK,UAAW;MAAAF,QAAA,EAAER,CAAC,CAAC,oBAAoB;IAAC,CAAO;EAAC,CAChD,CAAC;AAEvB,CAAC;AAED,MAAMK,MAAM,GAAGM,uBAAU,CAACC,MAAM,CAAC;EAC/BN,MAAM,EAAE;IACNO,YAAY,EAAE,CAAC;IACfC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBC,MAAM,EAAE,EAAE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