@tyrads.com/tyrads-sdk 1.1.15 → 2.0.0-beta.1

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 (158) hide show
  1. package/android/build.gradle +18 -2
  2. package/android/src/main/java/com/tyradssdk/TyradsSdkComposeViewManager.kt +112 -0
  3. package/android/src/main/java/com/tyradssdk/TyradsSdkModule.kt +21 -9
  4. package/android/src/main/java/com/tyradssdk/TyradsSdkPackage.kt +2 -1
  5. package/ios/Tyrads/Tyrads.swift +43 -18
  6. package/ios/TyradsSdk.mm +3 -1
  7. package/ios/TyradsSdk.swift +5 -4
  8. package/lib/commonjs/acmo/core/marquee.js +60 -0
  9. package/lib/commonjs/acmo/core/marquee.js.map +1 -0
  10. package/lib/commonjs/acmo/core/storage/storage.js +36 -0
  11. package/lib/commonjs/acmo/core/storage/storage.js.map +1 -0
  12. package/lib/commonjs/acmo/core/types/types.d.js +2 -0
  13. package/lib/commonjs/acmo/core/types/types.d.js.map +1 -0
  14. package/lib/commonjs/acmo/modules/dashboard/components/auto_scroller.js +87 -0
  15. package/lib/commonjs/acmo/modules/dashboard/components/auto_scroller.js.map +1 -0
  16. package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js +41 -0
  17. package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js.map +1 -0
  18. package/lib/commonjs/acmo/modules/dashboard/components/my_games_button.js +50 -0
  19. package/lib/commonjs/acmo/modules/dashboard/components/my_games_button.js.map +1 -0
  20. package/lib/commonjs/acmo/modules/dashboard/components/offer_info_section.js +163 -0
  21. package/lib/commonjs/acmo/modules/dashboard/components/offer_info_section.js.map +1 -0
  22. package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js +103 -0
  23. package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js.map +1 -0
  24. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_1.js +186 -0
  25. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_1.js.map +1 -0
  26. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_2.js +104 -0
  27. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_2.js.map +1 -0
  28. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_3.js +43 -0
  29. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_3.js.map +1 -0
  30. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_4.js +215 -0
  31. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_4.js.map +1 -0
  32. package/lib/commonjs/acmo/modules/dashboard/repository.js +71 -0
  33. package/lib/commonjs/acmo/modules/dashboard/repository.js.map +1 -0
  34. package/lib/commonjs/acmo/modules/dashboard/top_offers.js +137 -0
  35. package/lib/commonjs/acmo/modules/dashboard/top_offers.js.map +1 -0
  36. package/lib/commonjs/assets/images/premium_star.png +0 -0
  37. package/lib/commonjs/assets/images/right_arrow.png +0 -0
  38. package/lib/commonjs/assets/images/star_pointed.png +0 -0
  39. package/lib/commonjs/i18n.js +112 -0
  40. package/lib/commonjs/i18n.js.map +1 -0
  41. package/lib/commonjs/index.js +58 -1
  42. package/lib/commonjs/index.js.map +1 -1
  43. package/lib/module/acmo/core/marquee.js +54 -0
  44. package/lib/module/acmo/core/marquee.js.map +1 -0
  45. package/lib/module/acmo/core/storage/storage.js +29 -0
  46. package/lib/module/acmo/core/storage/storage.js.map +1 -0
  47. package/lib/module/acmo/core/types/types.d.js +2 -0
  48. package/lib/module/acmo/core/types/types.d.js.map +1 -0
  49. package/lib/module/acmo/modules/dashboard/components/auto_scroller.js +81 -0
  50. package/lib/module/acmo/modules/dashboard/components/auto_scroller.js.map +1 -0
  51. package/lib/module/acmo/modules/dashboard/components/custom_card.js +36 -0
  52. package/lib/module/acmo/modules/dashboard/components/custom_card.js.map +1 -0
  53. package/lib/module/acmo/modules/dashboard/components/my_games_button.js +45 -0
  54. package/lib/module/acmo/modules/dashboard/components/my_games_button.js.map +1 -0
  55. package/lib/module/acmo/modules/dashboard/components/offer_info_section.js +158 -0
  56. package/lib/module/acmo/modules/dashboard/components/offer_info_section.js.map +1 -0
  57. package/lib/module/acmo/modules/dashboard/components/premium_header.js +98 -0
  58. package/lib/module/acmo/modules/dashboard/components/premium_header.js.map +1 -0
  59. package/lib/module/acmo/modules/dashboard/components/premium_option_1.js +181 -0
  60. package/lib/module/acmo/modules/dashboard/components/premium_option_1.js.map +1 -0
  61. package/lib/module/acmo/modules/dashboard/components/premium_option_2.js +99 -0
  62. package/lib/module/acmo/modules/dashboard/components/premium_option_2.js.map +1 -0
  63. package/lib/module/acmo/modules/dashboard/components/premium_option_3.js +38 -0
  64. package/lib/module/acmo/modules/dashboard/components/premium_option_3.js.map +1 -0
  65. package/lib/module/acmo/modules/dashboard/components/premium_option_4.js +210 -0
  66. package/lib/module/acmo/modules/dashboard/components/premium_option_4.js.map +1 -0
  67. package/lib/module/acmo/modules/dashboard/repository.js +65 -0
  68. package/lib/module/acmo/modules/dashboard/repository.js.map +1 -0
  69. package/lib/module/acmo/modules/dashboard/top_offers.js +130 -0
  70. package/lib/module/acmo/modules/dashboard/top_offers.js.map +1 -0
  71. package/lib/module/assets/images/premium_star.png +0 -0
  72. package/lib/module/assets/images/right_arrow.png +0 -0
  73. package/lib/module/assets/images/star_pointed.png +0 -0
  74. package/lib/module/i18n.js +107 -0
  75. package/lib/module/i18n.js.map +1 -0
  76. package/lib/module/index.js +59 -2
  77. package/lib/module/index.js.map +1 -1
  78. package/lib/typescript/commonjs/src/acmo/core/marquee.d.ts +11 -0
  79. package/lib/typescript/commonjs/src/acmo/core/marquee.d.ts.map +1 -0
  80. package/lib/typescript/commonjs/src/acmo/core/storage/storage.d.ts +3 -0
  81. package/lib/typescript/commonjs/src/acmo/core/storage/storage.d.ts.map +1 -0
  82. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/auto_scroller.d.ts +10 -0
  83. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/auto_scroller.d.ts.map +1 -0
  84. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_card.d.ts +9 -0
  85. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_card.d.ts.map +1 -0
  86. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/my_games_button.d.ts +7 -0
  87. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/my_games_button.d.ts.map +1 -0
  88. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_info_section.d.ts +10 -0
  89. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map +1 -0
  90. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_header.d.ts +8 -0
  91. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_header.d.ts.map +1 -0
  92. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_1.d.ts +8 -0
  93. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_2.d.ts +8 -0
  95. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map +1 -0
  96. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts +8 -0
  97. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map +1 -0
  98. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts +8 -0
  99. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map +1 -0
  100. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts +2 -0
  101. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts.map +1 -0
  102. package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts +10 -0
  103. package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts.map +1 -0
  104. package/lib/typescript/commonjs/src/i18n.d.ts +3 -0
  105. package/lib/typescript/commonjs/src/i18n.d.ts.map +1 -0
  106. package/lib/typescript/commonjs/src/index.d.ts +15 -1
  107. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  108. package/lib/typescript/module/src/acmo/core/marquee.d.ts +11 -0
  109. package/lib/typescript/module/src/acmo/core/marquee.d.ts.map +1 -0
  110. package/lib/typescript/module/src/acmo/core/storage/storage.d.ts +3 -0
  111. package/lib/typescript/module/src/acmo/core/storage/storage.d.ts.map +1 -0
  112. package/lib/typescript/module/src/acmo/modules/dashboard/components/auto_scroller.d.ts +10 -0
  113. package/lib/typescript/module/src/acmo/modules/dashboard/components/auto_scroller.d.ts.map +1 -0
  114. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_card.d.ts +9 -0
  115. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_card.d.ts.map +1 -0
  116. package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts +7 -0
  117. package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts.map +1 -0
  118. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts +10 -0
  119. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map +1 -0
  120. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_header.d.ts +8 -0
  121. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_header.d.ts.map +1 -0
  122. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts +8 -0
  123. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map +1 -0
  124. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts +8 -0
  125. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map +1 -0
  126. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts +8 -0
  127. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map +1 -0
  128. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts +8 -0
  129. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map +1 -0
  130. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts +2 -0
  131. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts.map +1 -0
  132. package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts +10 -0
  133. package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts.map +1 -0
  134. package/lib/typescript/module/src/i18n.d.ts +3 -0
  135. package/lib/typescript/module/src/i18n.d.ts.map +1 -0
  136. package/lib/typescript/module/src/index.d.ts +15 -1
  137. package/lib/typescript/module/src/index.d.ts.map +1 -1
  138. package/package.json +12 -1
  139. package/readme.md +71 -0
  140. package/src/acmo/core/marquee.tsx +62 -0
  141. package/src/acmo/core/storage/storage.ts +28 -0
  142. package/src/acmo/core/types/types.d.ts +94 -0
  143. package/src/acmo/modules/dashboard/components/auto_scroller.tsx +85 -0
  144. package/src/acmo/modules/dashboard/components/custom_card.tsx +31 -0
  145. package/src/acmo/modules/dashboard/components/my_games_button.tsx +40 -0
  146. package/src/acmo/modules/dashboard/components/offer_info_section.tsx +144 -0
  147. package/src/acmo/modules/dashboard/components/premium_header.tsx +81 -0
  148. package/src/acmo/modules/dashboard/components/premium_option_1.tsx +161 -0
  149. package/src/acmo/modules/dashboard/components/premium_option_2.tsx +104 -0
  150. package/src/acmo/modules/dashboard/components/premium_option_3.tsx +46 -0
  151. package/src/acmo/modules/dashboard/components/premium_option_4.tsx +184 -0
  152. package/src/acmo/modules/dashboard/repository.ts +95 -0
  153. package/src/acmo/modules/dashboard/top_offers.tsx +131 -0
  154. package/src/assets/images/premium_star.png +0 -0
  155. package/src/assets/images/right_arrow.png +0 -0
  156. package/src/assets/images/star_pointed.png +0 -0
  157. package/src/i18n.ts +115 -0
  158. package/src/index.tsx +64 -2
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { type ViewStyle } from "react-native";
3
+ interface OfferInfoSectionProps {
4
+ details: TransformedCampaign;
5
+ premiumColor?: string;
6
+ style?: ViewStyle;
7
+ }
8
+ declare const OfferInfoSection: React.FC<OfferInfoSectionProps>;
9
+ export default OfferInfoSection;
10
+ //# sourceMappingURL=offer_info_section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offer_info_section.d.ts","sourceRoot":"","sources":["../../../../../../../../src/acmo/modules/dashboard/components/offer_info_section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA+D,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAQ3G,UAAU,qBAAqB;IAC7B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA+DrD,CAAC;AAiEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface PremiumHeaderSectionProps {
3
+ showMore?: boolean;
4
+ premiumColor?: string;
5
+ }
6
+ declare const PremiumHeaderSection: React.FC<PremiumHeaderSectionProps>;
7
+ export default PremiumHeaderSection;
8
+ //# sourceMappingURL=premium_header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"premium_header.d.ts","sourceRoot":"","sources":["../../../../../../../../src/acmo/modules/dashboard/components/premium_header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,yBAAyB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA4B7D,CAAC;AA0CF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface PremiumOption1Props {
3
+ data: TransformedCampaign[];
4
+ premiumColor?: string;
5
+ }
6
+ declare const PremiumOption1: React.FC<PremiumOption1Props>;
7
+ export default PremiumOption1;
8
+ //# sourceMappingURL=premium_option_1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"premium_option_1.d.ts","sourceRoot":"","sources":["../../../../../../../../src/acmo/modules/dashboard/components/premium_option_1.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,UAAU,mBAAmB;IAC3B,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkEjD,CAAC;AA4EF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface PremiumOption2Props {
3
+ data: TransformedCampaign[];
4
+ premiumColor?: string;
5
+ }
6
+ declare const PremiumOption2: React.FC<PremiumOption2Props>;
7
+ export default PremiumOption2;
8
+ //# sourceMappingURL=premium_option_2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"premium_option_2.d.ts","sourceRoot":"","sources":["../../../../../../../../src/acmo/modules/dashboard/components/premium_option_2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAe1B,UAAU,mBAAmB;IAC3B,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0BjD,CAAC;AAyDF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface PremiumOption3Props {
3
+ data: TransformedCampaign[];
4
+ premiumColor?: string;
5
+ }
6
+ declare const PremiumOption3: React.FC<PremiumOption3Props>;
7
+ export default PremiumOption3;
8
+ //# sourceMappingURL=premium_option_3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"premium_option_3.d.ts","sourceRoot":"","sources":["../../../../../../../../src/acmo/modules/dashboard/components/premium_option_3.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,UAAU,mBAAmB;IAC3B,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgCjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface PremiumOption4Props {
3
+ data: TransformedCampaign[];
4
+ premiumColor?: string;
5
+ }
6
+ declare const PremiumOption4: React.FC<PremiumOption4Props>;
7
+ export default PremiumOption4;
8
+ //# sourceMappingURL=premium_option_4.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"premium_option_4.d.ts","sourceRoot":"","sources":["../../../../../../../../src/acmo/modules/dashboard/components/premium_option_4.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,UAAU,mBAAmB;IAC3B,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgBjD,CAAC;AAkJF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const fetchCampaignsData: (setPremiumColor: (color: string) => void, setCampaigns: (campaigns: TransformedCampaign[]) => void, setError: (error: string) => void, setIsLoading: (loading: boolean) => void) => Promise<void>;
2
+ //# sourceMappingURL=repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../../../../src/acmo/modules/dashboard/repository.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,kBAAkB,oBAEZ,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,gBAC1B,CAAC,SAAS,EAAE,mBAAmB,EAAE,KAAK,IAAI,YAC9C,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,gBACnB,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,KACvC,OAAO,CAAC,IAAI,CAwDd,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface TopOffersProps {
3
+ showMore?: boolean;
4
+ showMyOffers?: boolean;
5
+ showMyOffersEmptyView?: boolean;
6
+ style?: number;
7
+ }
8
+ declare const TopOffers: React.FC<TopOffersProps>;
9
+ export default TopOffers;
10
+ //# sourceMappingURL=top_offers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top_offers.d.ts","sourceRoot":"","sources":["../../../../../../../src/acmo/modules/dashboard/top_offers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,cAAc;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAkFvC,CAAC;AAyBF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import i18n from 'i18next';
2
+ export default i18n;
3
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../src/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,SAAS,CAAC;AAkH3B,eAAe,IAAI,CAAC"}
@@ -1,3 +1,17 @@
1
- declare const Tyrads: any;
1
+ declare const Tyrads: {
2
+ init: (apiKey: string, apiSecret: string) => any;
3
+ loginUser: (userId: string) => Promise<any>;
4
+ showOffers: ({ launchMode, route, campaignID, }?: {
5
+ launchMode?: number;
6
+ route?: string;
7
+ campaignID?: number;
8
+ }) => any;
9
+ topPremiumOffers: ({ showMore, showMyOffers, showMyOffersEmptyView, viewStyle, }?: {
10
+ showMore?: boolean;
11
+ showMyOffers?: boolean;
12
+ showMyOffersEmptyView?: boolean;
13
+ viewStyle?: number;
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ };
2
16
  export default Tyrads;
3
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAQA,QAAA,MAAM,MAAM,KASP,CAAC;AACN,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AA2BA,QAAA,MAAM,MAAM;mBACK,MAAM,aAAa,MAAM;wBAGd,MAAM;sDAgB7B;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE;uFAY5D;QACD,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAChC,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;CAcF,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tyrads.com/tyrads-sdk",
3
- "version": "1.1.15",
3
+ "version": "2.0.0-beta.1",
4
4
  "description": "Tyrads SDK for React Native ",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -26,6 +26,7 @@
26
26
  "*.podspec",
27
27
  "!ios/build",
28
28
  "!android/build",
29
+ "!android/app/build",
29
30
  "!android/gradle",
30
31
  "!android/gradlew",
31
32
  "!android/gradlew.bat",
@@ -68,6 +69,7 @@
68
69
  "@react-native/eslint-config": "^0.73.1",
69
70
  "@release-it/conventional-changelog": "^5.0.0",
70
71
  "@types/jest": "^29.5.5",
72
+ "@types/numeral": "^2.0.5",
71
73
  "@types/react": "^18.2.44",
72
74
  "commitlint": "^17.0.2",
73
75
  "del-cli": "^5.1.0",
@@ -183,5 +185,14 @@
183
185
  "type": "module-legacy",
184
186
  "languages": "kotlin-swift",
185
187
  "version": "0.40.0"
188
+ },
189
+ "dependencies": {
190
+ "@react-native-async-storage/async-storage": "^2.1.2",
191
+ "axios": "^1.8.1",
192
+ "i18next": "^24.2.2",
193
+ "i18next-http-backend": "^3.0.2",
194
+ "numeral": "^2.0.6",
195
+ "react-i18next": "^15.4.1",
196
+ "react-native-text-ticker": "^1.14.0"
186
197
  }
187
198
  }
package/readme.md CHANGED
@@ -22,3 +22,74 @@ import Tyrads from '@tyrads.com/tyrads-sdk';
22
22
  Tyrads.showOffers();
23
23
  ```
24
24
 
25
+
26
+ </br>
27
+ <details>
28
+ <summary><strong>Launch Mode</strong></summary>
29
+
30
+
31
+ </br>
32
+
33
+ ##### Min SDK version required: v1.1.6
34
+ ##### Works only for iOS
35
+
36
+ </br>
37
+
38
+ Tyrads SDK provides the ability to open the Offerwall in a webkit view that is embedded in the app to provide a seamless user experience. Also, it provides the ability to open the Offerwall in an external browser (Safari) if Apple's app store policy does not approve the in-app rewards system for the app.
39
+
40
+ Available launch modes:
41
+ - `launchMode: 3` - opens the Offerwall in an external browser (Safari)
42
+ - `launchMode: 2` - opens the Offerwall in a webkit view that is embedded in the app
43
+
44
+ ```js
45
+
46
+ // Note: The launchMode parameter is optional, if not specified the default would be opening the Offerwall in an external browser (Safari)
47
+
48
+ Tyrads.showOffers({ launchMode: 3 });// provide launchMode: 2 to open the Offerwall in a webkit view that is embedded in the app
49
+
50
+ ```
51
+ </details>
52
+
53
+
54
+
55
+ </br>
56
+ <details>
57
+ <summary><strong>Deeplinking Routes</strong></summary>
58
+
59
+
60
+ </br>
61
+
62
+ ##### Min SDK version required: v1.1.6
63
+
64
+ </br>
65
+
66
+ The Tyrads SDK supports deeplinking to specific sections of the offerwall. When initializing or interacting with the SDK, you can specify a route to open a particular page. For campaign-specific routes, you'll need to provide the campaignID as well.
67
+
68
+ Available routes and their usage:
69
+ - `campaigns` - opens the Campaigns Page
70
+ - `campaigns-activated` - opens the Activated Campaigns Page
71
+ - `campaign-details` - opens the Campaign Details Page (requires campaignID)
72
+ - `campaign-tickets` - opens the Campaign Tickets Page (requires campaignID)
73
+
74
+ ```js
75
+
76
+ // Default route (Campaigns Page)
77
+ Tyrads.showOffers();
78
+
79
+ // Explicitly specifying the Campaigns Page
80
+ Tyrads.showOffers({ route: "campaigns" });
81
+
82
+ // Activated Campaigns Page
83
+ Tyrads.showOffers({ route: "campaigns-activated" });
84
+
85
+ // Campaign Details Page (requires campaignID)
86
+ Tyrads.showOffers({ route: "campaign-details", campaignID: "your_campaign_id_here" });
87
+
88
+ // Campaign Tickets Page (requires campaignID)
89
+ Tyrads.showOffers({ route: "campaign-tickets", campaignID: "your_campaign_id_here" });
90
+
91
+ ```
92
+ </details>
93
+
94
+ </br></br>
95
+
@@ -0,0 +1,62 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+ import { Animated, View, StyleSheet, Dimensions, type TextStyle,} from 'react-native';
3
+
4
+ interface MarqueeTextProps {
5
+ text: string;
6
+ speed?: number;
7
+ repeat?: number;
8
+ style?: TextStyle;
9
+ }
10
+
11
+ const MarqueeText: React.FC<MarqueeTextProps> = ({ text, speed = 15, repeat = 100, style }) => {
12
+ const translateX = useRef(new Animated.Value(0)).current;
13
+
14
+ useEffect(() => {
15
+ const textWidth = text.length * 4;
16
+ const screenWidth = Dimensions.get('window').width;
17
+
18
+ const animation = Animated.loop(
19
+ Animated.sequence([
20
+ Animated.timing(translateX, {
21
+ toValue: -textWidth,
22
+ duration: (textWidth + screenWidth) * speed,
23
+ useNativeDriver: true,
24
+ }),
25
+ Animated.timing(translateX, {
26
+ toValue: screenWidth,
27
+ duration: 0,
28
+ useNativeDriver: true,
29
+ }),
30
+ ]),
31
+ { iterations: repeat }
32
+ );
33
+
34
+ animation.start();
35
+
36
+ return () => animation.stop();
37
+ }, [text, speed, repeat, translateX]);
38
+
39
+ return (
40
+ <View style={styles.container}>
41
+ <Animated.Text
42
+ numberOfLines={1}
43
+ style={[styles.text, style, { transform: [{ translateX }] }]}
44
+ >
45
+ {text}
46
+ </Animated.Text>
47
+ </View>
48
+ );
49
+ };
50
+
51
+ const styles = StyleSheet.create({
52
+ container: {
53
+ overflow: 'hidden',
54
+ width: '100%',
55
+ },
56
+ text: {
57
+ fontSize: 16,
58
+ fontWeight: 'bold',
59
+ },
60
+ });
61
+
62
+ export default MarqueeText;
@@ -0,0 +1,28 @@
1
+ import AsyncStorage from '@react-native-async-storage/async-storage';
2
+
3
+ export const saveData = async (key: string, object: any): Promise<void> => {
4
+ try {
5
+ const jsonValue: string = JSON.stringify(object);
6
+ await AsyncStorage.setItem(key, jsonValue);
7
+ } catch (e: any) {
8
+ if (e instanceof Error) {
9
+ console.error('Error saving object:', e.message);
10
+ } else {
11
+ console.error('An unknown error occurred while saving.');
12
+ }
13
+ }
14
+ };
15
+
16
+ export const getData = async <T>(key: string): Promise<T | null> => {
17
+ try {
18
+ const jsonValue: string | null = await AsyncStorage.getItem(key);
19
+ return jsonValue != null ? JSON.parse(jsonValue) as T : null;
20
+ } catch (e: any) {
21
+ if (e instanceof Error) {
22
+ console.error('Error getting object:', e.message);
23
+ } else {
24
+ console.error('An unknown error occurred while getting.');
25
+ }
26
+ return null;
27
+ }
28
+ };
@@ -0,0 +1,94 @@
1
+ interface TransformedCampaign {
2
+ campaignId: number;
3
+ appId: number;
4
+ title: string;
5
+ creativePackName: string;
6
+ fileUrl: string;
7
+ points: number;
8
+ rewards: number;
9
+ currency: any;
10
+ thumbnail: string;
11
+ premium: boolean;
12
+ sortingScore: number;
13
+ }
14
+
15
+ interface Campaign {
16
+ campaignId: number;
17
+ campaignName: string;
18
+ campaignDescription: null | string;
19
+ createdOn: string;
20
+ sortingScore: number;
21
+ status: string;
22
+ expiredOn: null | string;
23
+ hasPlaytimeEvents: boolean;
24
+ app: {
25
+ id: number;
26
+ title: string;
27
+ packageName: string;
28
+ rating: number;
29
+ shortDescription: string;
30
+ store: string;
31
+ storeCategory: string;
32
+ previewUrl: string;
33
+ thumbnail: string;
34
+ confidenceScore: number;
35
+ securityLabel: string;
36
+ };
37
+ currency: {
38
+ name: string;
39
+ symbol: string;
40
+ adUnitName: string;
41
+ adUnitCurrencyName: string;
42
+ adUnitCurrencyConversion: number;
43
+ adUnitCurrencyIcon: string;
44
+ };
45
+ campaignPayout: {
46
+ totalEvents: number;
47
+ totalPayout: number;
48
+ totalPlayablePayout: number;
49
+ totalMicrochargePayout: number;
50
+ totalPayoutConverted: number;
51
+ totalPlayablePayoutConverted: number;
52
+ totalMicrochargePayoutConverted: number;
53
+ };
54
+ tracking: {
55
+ impressionUrl: string;
56
+ clickUrl: string;
57
+ };
58
+ targeting: {
59
+ os: string;
60
+ targetingType: string;
61
+ reward: {
62
+ rewardDifficulty: string;
63
+ incentRewardDescription: string;
64
+ };
65
+ };
66
+ creative: {
67
+ creativeUrl: string;
68
+ creativePacks: {
69
+ creativePackId: null | number;
70
+ creativePackName: string;
71
+ languageName: string;
72
+ languageCode: string;
73
+ creatives: {
74
+ creativeId: null | number;
75
+ creativeName: string;
76
+ callToAction: string;
77
+ text: string;
78
+ byteSize: string;
79
+ fileUrl: string;
80
+ duration: string;
81
+ creativeType: {
82
+ name: string;
83
+ type: string;
84
+ width: string;
85
+ height: string;
86
+ creativeCategoryType: string;
87
+ };
88
+ }[];
89
+ }[];
90
+ };
91
+ isRetryDownload: boolean;
92
+ capReached: boolean;
93
+ premium: boolean;
94
+ }
@@ -0,0 +1,85 @@
1
+ import React, { useRef, useState, useEffect } from 'react';
2
+ import { View, ScrollView, StyleSheet, Dimensions } from 'react-native';
3
+
4
+ const { width } = Dimensions.get('window');
5
+
6
+ interface AutoScrollPagerWithIndicatorsProps {
7
+ totalPages: number;
8
+ delayInMillis?: number;
9
+ premiumColor?: string;
10
+ content: (index: number) => React.ReactNode;
11
+ }
12
+
13
+ const AutoScrollPagerWithIndicators: React.FC<AutoScrollPagerWithIndicatorsProps> = ({
14
+ totalPages,
15
+ delayInMillis = 5000,
16
+ premiumColor,
17
+ content,
18
+ }) => {
19
+ const [currentPage, setCurrentPage] = useState(0);
20
+ const scrollViewRef = useRef<ScrollView>(null);
21
+
22
+ useEffect(() => {
23
+ const intervalId = setInterval(() => {
24
+ const nextBanner = (currentPage + 1) % totalPages;
25
+ setCurrentPage(nextBanner);
26
+ scrollViewRef.current?.scrollTo({ x: nextBanner * width, animated: true });
27
+ }, delayInMillis);
28
+
29
+ return () => clearInterval(intervalId);
30
+ }, [currentPage, totalPages, delayInMillis]);
31
+
32
+ useEffect(() => {
33
+ scrollViewRef.current?.scrollTo({ x: currentPage * width, animated: false });
34
+ }, [currentPage]);
35
+
36
+ const renderIndicators = () => {
37
+ const indicators: React.ReactNode[] = [];
38
+ for (let i = 0; i < totalPages; i++) {
39
+ indicators.push(
40
+ <View
41
+ key={i}
42
+ style={[
43
+ styles.indicator,
44
+ { backgroundColor: currentPage === i ? (premiumColor|| '#1C90DF') : 'lightgray' },
45
+ ]}
46
+ />
47
+ );
48
+ }
49
+ return <View style={styles.indicatorContainer}>{indicators}</View>;
50
+ };
51
+
52
+ return (
53
+ <View style={styles.container}>
54
+ <ScrollView
55
+ ref={scrollViewRef}
56
+ horizontal
57
+ pagingEnabled
58
+ showsHorizontalScrollIndicator={true}
59
+ scrollEnabled={false}
60
+ contentContainerStyle={{ width: totalPages * width }}
61
+ >
62
+ {Array.from({ length: totalPages }, (_, i) => content(i))}
63
+ </ScrollView>
64
+ {renderIndicators()}
65
+ </View>
66
+ );
67
+ };
68
+
69
+ const styles = StyleSheet.create({
70
+ container: {
71
+ alignItems: 'center',
72
+ },
73
+ indicatorContainer: {
74
+ flexDirection: 'row',
75
+ marginTop: 10,
76
+ },
77
+ indicator: {
78
+ width: 8,
79
+ height: 8,
80
+ borderRadius: 4,
81
+ marginHorizontal: 2,
82
+ },
83
+ });
84
+
85
+ export default AutoScrollPagerWithIndicators;
@@ -0,0 +1,31 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import { View, StyleSheet, type ViewStyle } from 'react-native';
3
+
4
+ interface CustomCardProps {
5
+ children: ReactNode;
6
+ style?: ViewStyle;
7
+ }
8
+
9
+ const CustomCard: React.FC<CustomCardProps> = ({ children, style }) => {
10
+ return <View style={[styles.card, style]}>{children}</View>;
11
+ };
12
+
13
+ const styles = StyleSheet.create({
14
+ card: {
15
+ backgroundColor: 'white',
16
+ borderTopLeftRadius: 20,
17
+ borderTopRightRadius: 20,
18
+ borderBottomLeftRadius: 14,
19
+ borderBottomRightRadius: 14,
20
+ paddingTop: 6,
21
+ paddingBottom: 5,
22
+ shadowColor: '#000',
23
+ shadowOffset: { width: 4, height: 4 },
24
+ shadowOpacity: 0.2,
25
+ shadowRadius: 4,
26
+ elevation: 4,
27
+ alignSelf: 'center',
28
+ },
29
+ });
30
+
31
+ export default CustomCard;
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import { TouchableOpacity, Text, StyleSheet,} from 'react-native';
3
+ import Tyrads from '../../../..';
4
+ import { useTranslation } from 'react-i18next';
5
+
6
+ interface MyGamesButtonProps {
7
+ premiumColor?: string;
8
+ }
9
+
10
+ const MyGamesButton: React.FC<MyGamesButtonProps> = ({ premiumColor }) => {
11
+ const { t } = useTranslation();
12
+ return (
13
+ <TouchableOpacity
14
+ style={[styles.button, { backgroundColor: premiumColor || '#1C90DF' }]}
15
+ onPress={() => Tyrads.showOffers({ route: 'campaigns-activated' })}
16
+ >
17
+ <Text style={styles.buttonText}>{t('dashboard.my_games')}</Text>
18
+ </TouchableOpacity>
19
+ );
20
+ };
21
+
22
+ const styles = StyleSheet.create({
23
+ button: {
24
+ borderRadius: 8,
25
+ paddingHorizontal: 16,
26
+ paddingVertical: 8,
27
+ height: 40,
28
+ justifyContent: 'center',
29
+ alignItems: 'center',
30
+ marginHorizontal: 16,
31
+ marginBottom: 16,
32
+ },
33
+ buttonText: {
34
+ color: 'white',
35
+ fontSize: 16,
36
+ fontWeight: 'bold',
37
+ },
38
+ });
39
+
40
+ export default MyGamesButton;