@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.
- package/android/build.gradle +1 -1
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/tyradssdk/TyradsSdkModule.kt +27 -6
- package/ios/Tyrads/AcmoConfig.swift +3 -3
- package/ios/Tyrads/InitModel.swift +5 -2
- package/ios/Tyrads/Tyrads.swift +117 -186
- package/ios/Tyrads/WebViewController.swift +171 -0
- package/ios/Tyrads/helpers/aes_encryptor.swift +81 -0
- package/ios/Tyrads/helpers/device_details.swift +58 -0
- package/ios/TyradsSdk.mm +10 -2
- package/ios/TyradsSdk.swift +44 -29
- package/lib/commonjs/acmo/core/helpers/launcher.js +20 -0
- package/lib/commonjs/acmo/core/helpers/launcher.js.map +1 -0
- package/lib/commonjs/acmo/modules/dashboard/components/active_offers_button.js +76 -0
- package/lib/commonjs/acmo/modules/dashboard/components/active_offers_button.js.map +1 -0
- package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js +7 -10
- package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js.map +1 -1
- package/lib/commonjs/acmo/modules/dashboard/components/custom_scroller.js +141 -0
- package/lib/commonjs/acmo/modules/dashboard/components/custom_scroller.js.map +1 -0
- package/lib/commonjs/acmo/{core/marquee.js → modules/dashboard/components/custom_shimmer.js} +46 -34
- package/lib/commonjs/acmo/modules/dashboard/components/custom_shimmer.js.map +1 -0
- package/lib/commonjs/acmo/modules/dashboard/components/offer_card.js +264 -0
- package/lib/commonjs/acmo/modules/dashboard/components/offer_card.js.map +1 -0
- package/lib/commonjs/acmo/modules/dashboard/components/offer_list_item.js +197 -0
- package/lib/commonjs/acmo/modules/dashboard/components/offer_list_item.js.map +1 -0
- package/lib/commonjs/acmo/modules/dashboard/components/premium_empty_widget.js +83 -0
- package/lib/commonjs/acmo/modules/dashboard/components/premium_empty_widget.js.map +1 -0
- package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js +12 -10
- package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js.map +1 -1
- package/lib/commonjs/acmo/modules/dashboard/components/premium_loading.js +118 -0
- package/lib/commonjs/acmo/modules/dashboard/components/premium_loading.js.map +1 -0
- package/lib/commonjs/acmo/modules/dashboard/repository.js +108 -32
- package/lib/commonjs/acmo/modules/dashboard/repository.js.map +1 -1
- package/lib/commonjs/acmo/modules/dashboard/top_offers.js +70 -63
- package/lib/commonjs/acmo/modules/dashboard/top_offers.js.map +1 -1
- package/lib/commonjs/assets/images/angle_up.png +0 -0
- package/lib/commonjs/assets/images/diamond.png +0 -0
- package/lib/commonjs/assets/images/info.png +0 -0
- package/lib/commonjs/assets/images/info_icon.png +0 -0
- package/lib/commonjs/assets/images/premium-emptybg.jpeg +0 -0
- package/lib/commonjs/assets/images/rank_1.png +0 -0
- package/lib/commonjs/assets/images/rank_2.png +0 -0
- package/lib/commonjs/assets/images/rank_3.png +0 -0
- package/lib/commonjs/assets/images/rank_4.png +0 -0
- package/lib/commonjs/assets/images/rank_5.png +0 -0
- package/lib/commonjs/index.js +15 -16
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/acmo/core/helpers/launcher.js +15 -0
- package/lib/module/acmo/core/helpers/launcher.js.map +1 -0
- package/lib/module/acmo/modules/dashboard/components/active_offers_button.js +70 -0
- package/lib/module/acmo/modules/dashboard/components/active_offers_button.js.map +1 -0
- package/lib/module/acmo/modules/dashboard/components/custom_card.js +7 -10
- package/lib/module/acmo/modules/dashboard/components/custom_card.js.map +1 -1
- package/lib/module/acmo/modules/dashboard/components/custom_scroller.js +135 -0
- package/lib/module/acmo/modules/dashboard/components/custom_scroller.js.map +1 -0
- package/lib/module/acmo/modules/dashboard/components/custom_shimmer.js +66 -0
- package/lib/module/acmo/modules/dashboard/components/custom_shimmer.js.map +1 -0
- package/lib/module/acmo/modules/dashboard/components/offer_card.js +257 -0
- package/lib/module/acmo/modules/dashboard/components/offer_card.js.map +1 -0
- package/lib/module/acmo/modules/dashboard/components/offer_list_item.js +191 -0
- package/lib/module/acmo/modules/dashboard/components/offer_list_item.js.map +1 -0
- package/lib/module/acmo/modules/dashboard/components/premium_empty_widget.js +78 -0
- package/lib/module/acmo/modules/dashboard/components/premium_empty_widget.js.map +1 -0
- package/lib/module/acmo/modules/dashboard/components/premium_header.js +12 -10
- package/lib/module/acmo/modules/dashboard/components/premium_header.js.map +1 -1
- package/lib/module/acmo/modules/dashboard/components/premium_loading.js +113 -0
- package/lib/module/acmo/modules/dashboard/components/premium_loading.js.map +1 -0
- package/lib/module/acmo/modules/dashboard/repository.js +105 -30
- package/lib/module/acmo/modules/dashboard/repository.js.map +1 -1
- package/lib/module/acmo/modules/dashboard/top_offers.js +71 -64
- package/lib/module/acmo/modules/dashboard/top_offers.js.map +1 -1
- package/lib/module/assets/images/angle_up.png +0 -0
- package/lib/module/assets/images/diamond.png +0 -0
- package/lib/module/assets/images/info.png +0 -0
- package/lib/module/assets/images/info_icon.png +0 -0
- package/lib/module/assets/images/premium-emptybg.jpeg +0 -0
- package/lib/module/assets/images/rank_1.png +0 -0
- package/lib/module/assets/images/rank_2.png +0 -0
- package/lib/module/assets/images/rank_3.png +0 -0
- package/lib/module/assets/images/rank_4.png +0 -0
- package/lib/module/assets/images/rank_5.png +0 -0
- package/lib/module/index.js +15 -16
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/acmo/core/helpers/launcher.d.ts +3 -0
- package/lib/typescript/commonjs/src/acmo/core/helpers/launcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/core/storage/storage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/active_offers_button.d.ts +9 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/active_offers_button.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_card.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_scroller.d.ts +17 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_scroller.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_shimmer.d.ts +11 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_shimmer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_card.d.ts +12 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_list_item.d.ts +15 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_list_item.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts +7 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_loading.d.ts +9 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_loading.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts +2 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts +8 -7
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +6 -8
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/acmo/core/helpers/launcher.d.ts +3 -0
- package/lib/typescript/module/src/acmo/core/helpers/launcher.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/core/storage/storage.d.ts.map +1 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/active_offers_button.d.ts +9 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/active_offers_button.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_card.d.ts.map +1 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_scroller.d.ts +17 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_scroller.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_shimmer.d.ts +11 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_shimmer.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_card.d.ts +12 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_card.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_list_item.d.ts +15 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_list_item.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts +7 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_loading.d.ts +9 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_loading.d.ts.map +1 -0
- package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts +2 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts.map +1 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts +8 -7
- package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +6 -8
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +3 -2
- package/readme.md +8 -8
- package/src/acmo/core/helpers/launcher.ts +14 -0
- package/src/acmo/core/types/types.d.ts +11 -13
- package/src/acmo/modules/dashboard/components/active_offers_button.tsx +61 -0
- package/src/acmo/modules/dashboard/components/custom_card.tsx +5 -8
- package/src/acmo/modules/dashboard/components/custom_scroller.tsx +164 -0
- package/src/acmo/modules/dashboard/components/custom_shimmer.tsx +75 -0
- package/src/acmo/modules/dashboard/components/offer_card.tsx +248 -0
- package/src/acmo/modules/dashboard/components/offer_list_item.tsx +225 -0
- package/src/acmo/modules/dashboard/components/premium_empty_widget.tsx +76 -0
- package/src/acmo/modules/dashboard/components/premium_header.tsx +8 -8
- package/src/acmo/modules/dashboard/components/premium_loading.tsx +78 -0
- package/src/acmo/modules/dashboard/repository.ts +121 -46
- package/src/acmo/modules/dashboard/top_offers.tsx +89 -52
- package/src/assets/images/angle_up.png +0 -0
- package/src/assets/images/diamond.png +0 -0
- package/src/assets/images/info.png +0 -0
- package/src/assets/images/info_icon.png +0 -0
- package/src/assets/images/premium-emptybg.jpeg +0 -0
- package/src/assets/images/rank_1.png +0 -0
- package/src/assets/images/rank_2.png +0 -0
- package/src/assets/images/rank_3.png +0 -0
- package/src/assets/images/rank_4.png +0 -0
- package/src/assets/images/rank_5.png +0 -0
- package/src/index.tsx +19 -23
- package/android/src/main/java/com/tyradssdk/TyradsSdkComposeViewManager.kt +0 -112
- package/lib/commonjs/acmo/core/marquee.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/auto_scroller.js +0 -87
- package/lib/commonjs/acmo/modules/dashboard/components/auto_scroller.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/my_games_button.js +0 -48
- package/lib/commonjs/acmo/modules/dashboard/components/my_games_button.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/offer_info_section.js +0 -158
- package/lib/commonjs/acmo/modules/dashboard/components/offer_info_section.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/premium_option_1.js +0 -181
- package/lib/commonjs/acmo/modules/dashboard/components/premium_option_1.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/premium_option_2.js +0 -102
- package/lib/commonjs/acmo/modules/dashboard/components/premium_option_2.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/premium_option_3.js +0 -41
- package/lib/commonjs/acmo/modules/dashboard/components/premium_option_3.js.map +0 -1
- package/lib/commonjs/acmo/modules/dashboard/components/premium_option_4.js +0 -214
- package/lib/commonjs/acmo/modules/dashboard/components/premium_option_4.js.map +0 -1
- package/lib/module/acmo/core/marquee.js +0 -54
- package/lib/module/acmo/core/marquee.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/auto_scroller.js +0 -81
- package/lib/module/acmo/modules/dashboard/components/auto_scroller.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/my_games_button.js +0 -43
- package/lib/module/acmo/modules/dashboard/components/my_games_button.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/offer_info_section.js +0 -153
- package/lib/module/acmo/modules/dashboard/components/offer_info_section.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/premium_option_1.js +0 -176
- package/lib/module/acmo/modules/dashboard/components/premium_option_1.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/premium_option_2.js +0 -97
- package/lib/module/acmo/modules/dashboard/components/premium_option_2.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/premium_option_3.js +0 -36
- package/lib/module/acmo/modules/dashboard/components/premium_option_3.js.map +0 -1
- package/lib/module/acmo/modules/dashboard/components/premium_option_4.js +0 -209
- package/lib/module/acmo/modules/dashboard/components/premium_option_4.js.map +0 -1
- package/lib/typescript/commonjs/src/acmo/core/marquee.d.ts +0 -11
- package/lib/typescript/commonjs/src/acmo/core/marquee.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/auto_scroller.d.ts +0 -10
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/auto_scroller.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/my_games_button.d.ts +0 -8
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/my_games_button.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_info_section.d.ts +0 -11
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_1.d.ts +0 -9
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_2.d.ts +0 -9
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts +0 -9
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts +0 -9
- package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/core/marquee.d.ts +0 -11
- package/lib/typescript/module/src/acmo/core/marquee.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/auto_scroller.d.ts +0 -10
- package/lib/typescript/module/src/acmo/modules/dashboard/components/auto_scroller.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts +0 -8
- package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts +0 -11
- package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts +0 -9
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts +0 -9
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts +0 -9
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map +0 -1
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts +0 -9
- package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map +0 -1
- package/src/acmo/core/marquee.tsx +0 -62
- package/src/acmo/modules/dashboard/components/auto_scroller.tsx +0 -85
- package/src/acmo/modules/dashboard/components/my_games_button.tsx +0 -40
- package/src/acmo/modules/dashboard/components/offer_info_section.tsx +0 -139
- package/src/acmo/modules/dashboard/components/premium_option_1.tsx +0 -156
- package/src/acmo/modules/dashboard/components/premium_option_2.tsx +0 -100
- package/src/acmo/modules/dashboard/components/premium_option_3.tsx +0 -42
- package/src/acmo/modules/dashboard/components/premium_option_4.tsx +0 -185
package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
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;AAK1B,UAAU,mBAAmB;IAC3B,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4BjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
interface PremiumOption4Props {
|
3
|
-
data: TransformedCampaign[];
|
4
|
-
premiumColor?: string;
|
5
|
-
onCampaignPress?: (campaignId: number) => void;
|
6
|
-
}
|
7
|
-
declare const PremiumOption4: React.FC<PremiumOption4Props>;
|
8
|
-
export default PremiumOption4;
|
9
|
-
//# sourceMappingURL=premium_option_4.d.ts.map
|
package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
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;AAe1B,UAAU,mBAAmB;IAC3B,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgBjD,CAAC;AAmJF,eAAe,cAAc,CAAC"}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { type TextStyle } from 'react-native';
|
3
|
-
interface MarqueeTextProps {
|
4
|
-
text: string;
|
5
|
-
speed?: number;
|
6
|
-
repeat?: number;
|
7
|
-
style?: TextStyle;
|
8
|
-
}
|
9
|
-
declare const MarqueeText: React.FC<MarqueeTextProps>;
|
10
|
-
export default MarqueeText;
|
11
|
-
//# sourceMappingURL=marquee.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"marquee.d.ts","sourceRoot":"","sources":["../../../../../../src/acmo/core/marquee.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAA0C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtF,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsC3C,CAAC;AAaF,eAAe,WAAW,CAAC"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
interface AutoScrollPagerWithIndicatorsProps {
|
3
|
-
totalPages: number;
|
4
|
-
delayInMillis?: number;
|
5
|
-
premiumColor?: string;
|
6
|
-
content: (index: number) => React.ReactNode;
|
7
|
-
}
|
8
|
-
declare const AutoScrollPagerWithIndicators: React.FC<AutoScrollPagerWithIndicatorsProps>;
|
9
|
-
export default AutoScrollPagerWithIndicators;
|
10
|
-
//# sourceMappingURL=auto_scroller.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"auto_scroller.d.ts","sourceRoot":"","sources":["../../../../../../../../src/acmo/modules/dashboard/components/auto_scroller.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAK3D,UAAU,kCAAkC;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;CAC7C;AAED,QAAA,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAAC,kCAAkC,CAsD/E,CAAC;AAkBF,eAAe,6BAA6B,CAAC"}
|
package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"my_games_button.d.ts","sourceRoot":"","sources":["../../../../../../../../src/acmo/modules/dashboard/components/my_games_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,kBAAkB;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAU/C,CAAC;AAoBF,eAAe,aAAa,CAAC"}
|
@@ -1,11 +0,0 @@
|
|
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
|
-
onButtonPress: () => void;
|
8
|
-
}
|
9
|
-
declare const OfferInfoSection: React.FC<OfferInfoSectionProps>;
|
10
|
-
export default OfferInfoSection;
|
11
|
-
//# sourceMappingURL=offer_info_section.d.ts.map
|
package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
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;AAO3G,UAAU,qBAAqB;IAC7B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA0DrD,CAAC;AAiEF,eAAe,gBAAgB,CAAC"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
interface PremiumOption1Props {
|
3
|
-
data: TransformedCampaign[];
|
4
|
-
premiumColor?: string;
|
5
|
-
onCampaignPress?: (campaignId: number) => void;
|
6
|
-
}
|
7
|
-
declare const PremiumOption1: React.FC<PremiumOption1Props>;
|
8
|
-
export default PremiumOption1;
|
9
|
-
//# sourceMappingURL=premium_option_1.d.ts.map
|
package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
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;AAY1B,UAAU,mBAAmB;IAC3B,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6DjD,CAAC;AA4EF,eAAe,cAAc,CAAC"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
interface PremiumOption2Props {
|
3
|
-
data: TransformedCampaign[];
|
4
|
-
premiumColor?: string;
|
5
|
-
onCampaignPress?: (campaignId: number) => void;
|
6
|
-
}
|
7
|
-
declare const PremiumOption2: React.FC<PremiumOption2Props>;
|
8
|
-
export default PremiumOption2;
|
9
|
-
//# sourceMappingURL=premium_option_2.d.ts.map
|
package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
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;AAc1B,UAAU,mBAAmB;IAC3B,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsBjD,CAAC;AAyDF,eAAe,cAAc,CAAC"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
interface PremiumOption3Props {
|
3
|
-
data: TransformedCampaign[];
|
4
|
-
premiumColor?: string;
|
5
|
-
onCampaignPress?: (campaignId: number) => void;
|
6
|
-
}
|
7
|
-
declare const PremiumOption3: React.FC<PremiumOption3Props>;
|
8
|
-
export default PremiumOption3;
|
9
|
-
//# sourceMappingURL=premium_option_3.d.ts.map
|
package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
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;AAK1B,UAAU,mBAAmB;IAC3B,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4BjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
interface PremiumOption4Props {
|
3
|
-
data: TransformedCampaign[];
|
4
|
-
premiumColor?: string;
|
5
|
-
onCampaignPress?: (campaignId: number) => void;
|
6
|
-
}
|
7
|
-
declare const PremiumOption4: React.FC<PremiumOption4Props>;
|
8
|
-
export default PremiumOption4;
|
9
|
-
//# sourceMappingURL=premium_option_4.d.ts.map
|
package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
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;AAe1B,UAAU,mBAAmB;IAC3B,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgBjD,CAAC;AAmJF,eAAe,cAAc,CAAC"}
|
@@ -1,62 +0,0 @@
|
|
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;
|
@@ -1,85 +0,0 @@
|
|
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;
|
@@ -1,40 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { TouchableOpacity, Text, StyleSheet,} from 'react-native';
|
3
|
-
import { useTranslation } from 'react-i18next';
|
4
|
-
|
5
|
-
interface MyGamesButtonProps {
|
6
|
-
premiumColor?: string;
|
7
|
-
onPress: (route: string) => void;
|
8
|
-
}
|
9
|
-
|
10
|
-
const MyGamesButton: React.FC<MyGamesButtonProps> = ({ premiumColor , onPress}) => {
|
11
|
-
const { t } = useTranslation();
|
12
|
-
return (
|
13
|
-
<TouchableOpacity
|
14
|
-
style={[styles.button, { backgroundColor: premiumColor || '#1C90DF' }]}
|
15
|
-
onPress={() => onPress && onPress('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;
|
@@ -1,139 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Dimensions, Image, StyleSheet, Text, TouchableOpacity, View, type ViewStyle,} from "react-native";
|
3
|
-
import numeral from 'numeral';
|
4
|
-
import TextTicker from "react-native-text-ticker";
|
5
|
-
import { useTranslation } from "react-i18next";
|
6
|
-
|
7
|
-
const { width } = Dimensions.get('window');
|
8
|
-
|
9
|
-
interface OfferInfoSectionProps {
|
10
|
-
details: TransformedCampaign;
|
11
|
-
premiumColor?: string;
|
12
|
-
style?: ViewStyle;
|
13
|
-
onButtonPress: () => void;
|
14
|
-
}
|
15
|
-
|
16
|
-
const OfferInfoSection: React.FC<OfferInfoSectionProps> = ({ details, premiumColor, style, onButtonPress }) => {
|
17
|
-
const { t } = useTranslation();
|
18
|
-
|
19
|
-
return (
|
20
|
-
<View style={[styles.infoContainer, style, { backgroundColor: premiumColor || '#1C90DF' }]}>
|
21
|
-
<View style={styles.infoRow}>
|
22
|
-
<View style={styles.leftInfo}>
|
23
|
-
<Image
|
24
|
-
style={styles.gameIcon}
|
25
|
-
source={{ uri: details.thumbnail }}
|
26
|
-
resizeMode="cover"
|
27
|
-
/>
|
28
|
-
<View style={styles.gameDetails}>
|
29
|
-
{details.title.length > 20 ? (
|
30
|
-
<View style={{ overflow: 'hidden' }}>
|
31
|
-
<TextTicker
|
32
|
-
style={styles.gameTitle}
|
33
|
-
duration={3000}
|
34
|
-
loop
|
35
|
-
bounce
|
36
|
-
repeatSpacer={50}
|
37
|
-
marqueeDelay={1000}
|
38
|
-
>
|
39
|
-
{details.title}
|
40
|
-
</TextTicker>
|
41
|
-
</View>
|
42
|
-
) : (
|
43
|
-
<Text style={styles.gameTitle} numberOfLines={1} ellipsizeMode="tail">
|
44
|
-
{details.title}
|
45
|
-
</Text>
|
46
|
-
)}
|
47
|
-
|
48
|
-
<View style={styles.rewardDetails}>
|
49
|
-
<Image
|
50
|
-
source={{ uri: details.currency.adUnitCurrencyIcon }}
|
51
|
-
resizeMode="contain"
|
52
|
-
style={styles.coinIcon}
|
53
|
-
/>
|
54
|
-
<Text style={styles.points}>{numeral(details.points).format("0.00a").toUpperCase()}</Text>
|
55
|
-
<Text style={styles.points}>{''}{details.currency.adUnitCurrencyName}</Text>
|
56
|
-
<Text style={styles.rewards}>
|
57
|
-
{' '}
|
58
|
-
{details.rewards} {t('dashboard.rewards', { count: details.rewards })}
|
59
|
-
</Text>
|
60
|
-
</View>
|
61
|
-
</View>
|
62
|
-
</View>
|
63
|
-
<TouchableOpacity
|
64
|
-
onPress={onButtonPress}
|
65
|
-
style={styles.playButton}
|
66
|
-
>
|
67
|
-
<Text style={[styles.playButtonText, { color: premiumColor || '#1C90DF' }]}>
|
68
|
-
{t('dashboard.play_button')}
|
69
|
-
</Text>
|
70
|
-
</TouchableOpacity>
|
71
|
-
</View>
|
72
|
-
</View>
|
73
|
-
);
|
74
|
-
};
|
75
|
-
|
76
|
-
const styles = StyleSheet.create({
|
77
|
-
infoContainer: {
|
78
|
-
width: width,
|
79
|
-
paddingVertical: 8,
|
80
|
-
paddingHorizontal: 16,
|
81
|
-
},
|
82
|
-
infoRow: {
|
83
|
-
flexDirection: 'row',
|
84
|
-
justifyContent: 'space-between',
|
85
|
-
alignItems: 'center',
|
86
|
-
width: '90%',
|
87
|
-
},
|
88
|
-
leftInfo: {
|
89
|
-
flexDirection: 'row',
|
90
|
-
alignItems: 'center',
|
91
|
-
width: '68%',
|
92
|
-
},
|
93
|
-
gameIcon: {
|
94
|
-
width: 50,
|
95
|
-
height: 50,
|
96
|
-
borderRadius: 8,
|
97
|
-
},
|
98
|
-
gameDetails: {
|
99
|
-
marginLeft: 10,
|
100
|
-
},
|
101
|
-
gameTitle: {
|
102
|
-
color: 'white',
|
103
|
-
fontSize: 14,
|
104
|
-
marginBottom: 4,
|
105
|
-
},
|
106
|
-
rewardDetails: {
|
107
|
-
flexDirection: 'row',
|
108
|
-
marginTop: 4,
|
109
|
-
},
|
110
|
-
coinIcon: {
|
111
|
-
width: 18,
|
112
|
-
height: 18,
|
113
|
-
},
|
114
|
-
points: {
|
115
|
-
color: 'white',
|
116
|
-
fontSize: 12,
|
117
|
-
marginLeft: 4,
|
118
|
-
},
|
119
|
-
rewards: {
|
120
|
-
color: 'lightgrey',
|
121
|
-
fontSize: 11,
|
122
|
-
fontStyle: 'italic',
|
123
|
-
},
|
124
|
-
playButton: {
|
125
|
-
paddingHorizontal: 12,
|
126
|
-
paddingVertical: 2,
|
127
|
-
height: 30,
|
128
|
-
borderRadius: 8,
|
129
|
-
backgroundColor: 'white',
|
130
|
-
alignItems: 'center',
|
131
|
-
justifyContent: 'center',
|
132
|
-
},
|
133
|
-
playButtonText: {
|
134
|
-
fontSize: 14,
|
135
|
-
fontWeight: 'bold',
|
136
|
-
},
|
137
|
-
});
|
138
|
-
|
139
|
-
export default OfferInfoSection;
|
@@ -1,156 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import numeral from 'numeral';
|
3
|
-
import {
|
4
|
-
View,
|
5
|
-
Text,
|
6
|
-
Image,
|
7
|
-
TouchableOpacity,
|
8
|
-
StyleSheet,
|
9
|
-
} from 'react-native';
|
10
|
-
import TextTicker from 'react-native-text-ticker';
|
11
|
-
import { useTranslation } from 'react-i18next';
|
12
|
-
|
13
|
-
interface PremiumOption1Props {
|
14
|
-
data: TransformedCampaign[];
|
15
|
-
premiumColor?: string;
|
16
|
-
onCampaignPress?: (campaignId: number) => void;
|
17
|
-
}
|
18
|
-
|
19
|
-
const PremiumOption1: React.FC<PremiumOption1Props> = ({ data, onCampaignPress, premiumColor }) => {
|
20
|
-
const { t } = useTranslation();
|
21
|
-
console.log("Prmium Color", premiumColor);
|
22
|
-
|
23
|
-
return (
|
24
|
-
<View>
|
25
|
-
{data.map((item, index) => (
|
26
|
-
<TouchableOpacity
|
27
|
-
key={index}
|
28
|
-
onPress={() => onCampaignPress && onCampaignPress(item.campaignId)}
|
29
|
-
style={styles.itemContainer}
|
30
|
-
activeOpacity={0.75}
|
31
|
-
>
|
32
|
-
<View style={{ flexDirection: 'row', flex: 8, marginRight: 10 }}>
|
33
|
-
<Image source={{ uri: item.thumbnail }} style={styles.thumbnail} />
|
34
|
-
<View style={styles.infoContainer}>
|
35
|
-
<View style={{ width: '100%' }}>
|
36
|
-
{item.title.length > 25 ? (
|
37
|
-
<View style={{ overflow: 'hidden' }}>
|
38
|
-
<TextTicker
|
39
|
-
style={styles.titleText}
|
40
|
-
duration={3000}
|
41
|
-
loop
|
42
|
-
bounce
|
43
|
-
repeatSpacer={50}
|
44
|
-
marqueeDelay={1000}
|
45
|
-
>
|
46
|
-
{item.title}
|
47
|
-
</TextTicker>
|
48
|
-
</View>
|
49
|
-
) : (
|
50
|
-
<Text numberOfLines={1} style={styles.titleText}>
|
51
|
-
{item.title}
|
52
|
-
</Text>
|
53
|
-
)}
|
54
|
-
</View>
|
55
|
-
<View style={styles.infoRow}>
|
56
|
-
<View style={[styles.rankContainer, { backgroundColor: premiumColor || '#1C90DF' }]}>
|
57
|
-
<Text numberOfLines={1} style={styles.rankText} adjustsFontSizeToFit={true}>
|
58
|
-
{t('dashboard.top_ranking', { number: index + 1 })}
|
59
|
-
</Text>
|
60
|
-
</View>
|
61
|
-
<View style={styles.rewardDetails}>
|
62
|
-
<Image
|
63
|
-
source={{ uri: item.currency.adUnitCurrencyIcon }}
|
64
|
-
resizeMode="contain"
|
65
|
-
style={styles.coinIcon}
|
66
|
-
/>
|
67
|
-
<Text style={styles.points}>{numeral(item.points).format("0.00a").toUpperCase()}</Text>
|
68
|
-
<Text style={styles.points}>{''}{item.currency.adUnitCurrencyName}</Text>
|
69
|
-
</View>
|
70
|
-
</View>
|
71
|
-
</View>
|
72
|
-
</View>
|
73
|
-
<View style={[styles.playButton, { backgroundColor: premiumColor || '#1C90DF' }]}>
|
74
|
-
<Text style={styles.playButtonText}>{t('dashboard.play_button')}</Text>
|
75
|
-
</View>
|
76
|
-
</TouchableOpacity>
|
77
|
-
))}
|
78
|
-
</View>
|
79
|
-
);
|
80
|
-
};
|
81
|
-
|
82
|
-
const styles = StyleSheet.create({
|
83
|
-
itemContainer: {
|
84
|
-
flexDirection: 'row',
|
85
|
-
flex: 1,
|
86
|
-
width: '100%',
|
87
|
-
justifyContent: 'space-between',
|
88
|
-
alignItems: 'center',
|
89
|
-
paddingHorizontal: 16,
|
90
|
-
paddingVertical: 8,
|
91
|
-
},
|
92
|
-
thumbnail: {
|
93
|
-
height: 40,
|
94
|
-
width: 40,
|
95
|
-
borderRadius: 10,
|
96
|
-
},
|
97
|
-
infoContainer: {
|
98
|
-
marginLeft: 8,
|
99
|
-
},
|
100
|
-
titleText: {
|
101
|
-
fontSize: 14,
|
102
|
-
fontWeight: 'bold',
|
103
|
-
},
|
104
|
-
infoRow: {
|
105
|
-
flexDirection: 'row',
|
106
|
-
alignItems: 'center',
|
107
|
-
alignContent: 'center',
|
108
|
-
},
|
109
|
-
rankContainer: {
|
110
|
-
marginTop: 4,
|
111
|
-
borderRadius: 12,
|
112
|
-
paddingHorizontal: 4,
|
113
|
-
paddingVertical: 2,
|
114
|
-
width: 43,
|
115
|
-
alignItems: 'center',
|
116
|
-
},
|
117
|
-
rankText: {
|
118
|
-
fontSize: 10,
|
119
|
-
color: 'white',
|
120
|
-
fontWeight: 'bold',
|
121
|
-
},
|
122
|
-
rewardDetails: {
|
123
|
-
flexDirection: 'row',
|
124
|
-
alignItems: 'center',
|
125
|
-
marginTop: 4,
|
126
|
-
left: 4,
|
127
|
-
},
|
128
|
-
coinIcon: {
|
129
|
-
width: 14,
|
130
|
-
height: 14,
|
131
|
-
},
|
132
|
-
points: {
|
133
|
-
fontSize: 13,
|
134
|
-
marginLeft: 4,
|
135
|
-
fontWeight: '500',
|
136
|
-
},
|
137
|
-
rewards: {
|
138
|
-
fontSize: 10,
|
139
|
-
fontStyle: 'italic',
|
140
|
-
},
|
141
|
-
playButton: {
|
142
|
-
paddingHorizontal: 12,
|
143
|
-
paddingVertical: 5,
|
144
|
-
height: 30,
|
145
|
-
borderRadius: 8,
|
146
|
-
alignItems: 'center',
|
147
|
-
justifyContent: 'center',
|
148
|
-
},
|
149
|
-
playButtonText: {
|
150
|
-
fontSize: 14,
|
151
|
-
fontWeight: 'bold',
|
152
|
-
color: 'white',
|
153
|
-
},
|
154
|
-
});
|
155
|
-
|
156
|
-
export default PremiumOption1;
|