@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
@@ -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 {
|
7
|
+
import { fetchPremiumOfferDetails, openOffer } from './repository';
|
9
8
|
import PremiumHeaderSection from './components/premium_header';
|
10
9
|
import CustomCard from './components/custom_card';
|
11
|
-
import
|
12
|
-
import
|
13
|
-
import
|
14
|
-
import
|
15
|
-
import
|
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
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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
|
26
|
-
|
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<
|
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
|
-
|
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
|
-
|
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(
|
55
|
+
onNavigate("offers", campaignId);
|
53
56
|
};
|
54
57
|
|
55
|
-
const
|
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
|
-
<
|
62
|
-
|
63
|
-
|
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
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
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
|
101
|
+
<PremiumHeaderSection premiumColor={premiumColor} onShowOffers={handleShowOffers} />
|
91
102
|
<View style={styles.headerSpacer} />
|
92
103
|
{(() => {
|
93
|
-
switch (
|
94
|
-
case
|
104
|
+
switch (widgetStyle) {
|
105
|
+
case PremiumWidgetStyles.list:
|
95
106
|
return (
|
96
|
-
|
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
|
121
|
+
case PremiumWidgetStyles.sliderCards:
|
99
122
|
return (
|
100
|
-
<
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
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
|
-
{
|
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
|
181
|
+
export default PremiumWidgets;
|
Binary file
|
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
|
-
|
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
|
56
|
-
}: { launchMode?: number; route?: string; campaignID?: number } = {}) => {
|
54
|
+
campaignID,
|
55
|
+
}: { launchMode?: number; route?: string; campaignID?: number | null } = {}) => {
|
57
56
|
if (Platform.OS === 'ios') {
|
58
|
-
|
57
|
+
if(campaignID == null) {
|
58
|
+
return await TyradsSdk.showOffers(launchMode, route);
|
59
|
+
}
|
60
|
+
return await TyradsSdk.showOfferDetails(launchMode, route, campaignID);
|
59
61
|
} else {
|
60
|
-
|
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
|
-
|
65
|
-
showMyOffers = true,
|
66
|
-
showMyOffersEmptyView = false,
|
67
|
-
viewStyle = 1,
|
69
|
+
widgetStyle,
|
68
70
|
launchMode = 2,
|
69
71
|
}: {
|
70
|
-
|
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
|
-
|
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;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,IAA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,IAAI,EAAEC,KAAK,EAAEC,MAAM,EAAEE,UAAU,CAAC,CAAC;EAErC,oBACE,IAAA1B,WAAA,CAAA+C,GAAA,EAAChD,YAAA,CAAAiD,IAAI;IAACvB,KAAK,EAAEwB,MAAM,CAACC,SAAU;IAAAC,QAAA,eAC5B,IAAAnD,WAAA,CAAA+C,GAAA,EAAChD,YAAA,CAAA6B,QAAQ,CAACwB,IAAI;MACZC,aAAa,EAAE,CAAE;MACjB5B,KAAK,EAAE,CAACwB,MAAM,CAAC3B,IAAI,EAAEG,KAAK,EAAE;QAAE6B,SAAS,EAAE,CAAC;UAAE5B;QAAW,CAAC;MAAE,CAAC,CAAE;MAAAyB,QAAA,EAE5D7B;IAAI,CACQ;EAAC,CACZ,CAAC;AAEX,CAAC;AAED,MAAM2B,MAAM,GAAGM,uBAAU,CAACC,MAAM,CAAC;EAC/BN,SAAS,EAAE;IACTO,QAAQ,EAAE,QAAQ;IAClBrB,KAAK,EAAE;EACT,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,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAA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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;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