@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
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
package/lib/commonjs/index.js
CHANGED
@@ -22,13 +22,13 @@ const TyradsSdk = _reactNative.NativeModules.TyradsSdk ? _reactNative.NativeModu
|
|
22
22
|
}
|
23
23
|
});
|
24
24
|
const Tyrads = {
|
25
|
-
init: (apiKey, apiSecret) => {
|
26
|
-
|
25
|
+
init: async (apiKey, apiSecret, encKey) => {
|
26
|
+
const data = await TyradsSdk.init(apiKey, apiSecret, encKey);
|
27
|
+
return data;
|
27
28
|
},
|
28
29
|
loginUser: async userId => {
|
29
30
|
try {
|
30
31
|
const data = await TyradsSdk.loginUser(userId);
|
31
|
-
console.log("data from login: ", data);
|
32
32
|
if (typeof data === "object") {
|
33
33
|
await (0, _storage.saveData)('apiHeaders', JSON.stringify(data));
|
34
34
|
await (0, _storage.saveData)('language', data.languageCode);
|
@@ -38,26 +38,28 @@ const Tyrads = {
|
|
38
38
|
}
|
39
39
|
return data;
|
40
40
|
} catch (err) {
|
41
|
-
console.log(`error from login: ${err}`);
|
42
41
|
return null;
|
43
42
|
}
|
44
43
|
},
|
45
|
-
showOffers: ({
|
44
|
+
showOffers: async ({
|
46
45
|
launchMode = 3,
|
47
46
|
route,
|
48
|
-
campaignID
|
47
|
+
campaignID
|
49
48
|
} = {}) => {
|
50
49
|
if (_reactNative.Platform.OS === 'ios') {
|
51
|
-
|
50
|
+
if (campaignID == null) {
|
51
|
+
return await TyradsSdk.showOffers(launchMode, route);
|
52
|
+
}
|
53
|
+
return await TyradsSdk.showOfferDetails(launchMode, route, campaignID);
|
52
54
|
} else {
|
53
|
-
|
55
|
+
if (campaignID == null) {
|
56
|
+
return await TyradsSdk.showOffers(route);
|
57
|
+
}
|
58
|
+
return await TyradsSdk.showOfferDetails(route, campaignID);
|
54
59
|
}
|
55
60
|
},
|
56
61
|
topPremiumOffers: ({
|
57
|
-
|
58
|
-
showMyOffers = true,
|
59
|
-
showMyOffersEmptyView = false,
|
60
|
-
viewStyle = 1,
|
62
|
+
widgetStyle,
|
61
63
|
launchMode = 2
|
62
64
|
} = {}) => {
|
63
65
|
const handleNavigation = (route, campaignID) => {
|
@@ -76,10 +78,7 @@ const Tyrads = {
|
|
76
78
|
alignItems: 'center'
|
77
79
|
},
|
78
80
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_top_offers.default, {
|
79
|
-
|
80
|
-
showMyOffers: showMyOffers,
|
81
|
-
showMyOffersEmptyView: showMyOffersEmptyView,
|
82
|
-
style: viewStyle,
|
81
|
+
widgetStyle: widgetStyle,
|
83
82
|
onNavigate: handleNavigation
|
84
83
|
})
|
85
84
|
})
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_top_offers","_interopRequireDefault","_storage","_reactI18next","_i18n","_jsxRuntime","e","__esModule","default","LINKING_ERROR","Platform","select","ios","TyradsSdk","NativeModules","Proxy","get","Error","Tyrads","init","apiKey","apiSecret","
|
1
|
+
{"version":3,"names":["_reactNative","require","_top_offers","_interopRequireDefault","_storage","_reactI18next","_i18n","_jsxRuntime","e","__esModule","default","LINKING_ERROR","Platform","select","ios","TyradsSdk","NativeModules","Proxy","get","Error","Tyrads","init","apiKey","apiSecret","encKey","data","loginUser","userId","saveData","JSON","stringify","languageCode","parse","err","showOffers","launchMode","route","campaignID","OS","showOfferDetails","topPremiumOffers","widgetStyle","handleNavigation","jsx","I18nextProvider","i18n","children","View","style","flex","justifyContent","alignItems","onNavigate","_default","exports"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAH,sBAAA,CAAAF,OAAA;AAA0B,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAE,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE1B;AAGA,MAAMG,aAAa,GACjB,qEAAqE,GACrEC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEJ,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMK,SAAS,GAAGC,0BAAa,CAACD,SAAS,GACrCC,0BAAa,CAACD,SAAS,GACvB,IAAIE,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACR,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEL,MAAMS,MAAM,GAAG;EACbC,IAAI,EAAE,MAAAA,CAAOC,MAAc,EAAEC,SAAiB,EAAEC,MAAe,KAAK;IAClE,MAAMC,IAAI,GAAG,MAAMV,SAAS,CAACM,IAAI,CAACC,MAAM,EAAEC,SAAS,EAAEC,MAAM,CAAC;IAC5D,OAAOC,IAAI;EACb,CAAC;EACDC,SAAS,EAAE,MAAOC,MAAc,IAAK;IACnC,IAAI;MACF,MAAMF,IAAI,GAAG,MAAMV,SAAS,CAACW,SAAS,CAACC,MAAM,CAAC;MAE9C,IAAI,OAAOF,IAAI,KAAK,QAAQ,EAAE;QAC5B,MAAM,IAAAG,iBAAQ,EAAC,YAAY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C,UAAU,EAAEA,UAAU;QAAEF,UAAU,EAAEA;MAAU,CAAC,CAAC;IACpF,CAAC;IACD,oBACE,IAAA5B,WAAA,CAAAoC,GAAA,EAACtC,aAAA,CAAAuC,eAAe;MAACC,IAAI,EAAEA,aAAK;MAAAC,QAAA,eAC1B,IAAAvC,WAAA,CAAAoC,GAAA,EAAC3C,YAAA,CAAA+C,IAAI;QAACC,KAAK,EAAE;UAAEC,IAAI,EAAE,CAAC;UAAEC,cAAc,EAAE,QAAQ;UAAEC,UAAU,EAAE;QAAS,CAAE;QAAAL,QAAA,eACvE,IAAAvC,WAAA,CAAAoC,GAAA,EAACzC,WAAA,CAAAQ,OAAS;UACR+B,WAAW,EAAEA,WAAY;UACzBW,UAAU,EAAEV;QAAiB,CAC9B;MAAC,CACE;IAAC,CACQ,CAAC;EAEtB;AACF,CAAC;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAA5C,OAAA,GAEaU,MAAM","ignoreList":[]}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import { Linking } from "react-native";
|
4
|
+
export async function acmoLaunchURLForce(url) {
|
5
|
+
await Linking.openURL(url);
|
6
|
+
}
|
7
|
+
export async function acmoLaunchURL(url) {
|
8
|
+
const supported = await Linking.canOpenURL(url);
|
9
|
+
if (supported) {
|
10
|
+
await Linking.openURL(url);
|
11
|
+
} else {
|
12
|
+
console.warn("Don't know how to open URI: " + url);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
//# sourceMappingURL=launcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["Linking","acmoLaunchURLForce","url","openURL","acmoLaunchURL","supported","canOpenURL","console","warn"],"sourceRoot":"../../../../../src","sources":["acmo/core/helpers/launcher.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,cAAc;AAEtC,OAAO,eAAeC,kBAAkBA,CAACC,GAAW,EAAE;EAClD,MAAMF,OAAO,CAACG,OAAO,CAACD,GAAG,CAAC;AAC9B;AAEA,OAAO,eAAeE,aAAaA,CAACF,GAAW,EAAE;EAC/C,MAAMG,SAAS,GAAG,MAAML,OAAO,CAACM,UAAU,CAACJ,GAAG,CAAC;EAC/C,IAAIG,SAAS,EAAE;IACb,MAAML,OAAO,CAACG,OAAO,CAACD,GAAG,CAAC;EAC5B,CAAC,MAAM;IACLK,OAAO,CAACC,IAAI,CAAC,8BAA8B,GAAGN,GAAG,CAAC;EACpD;AACF","ignoreList":[]}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import React from 'react';
|
4
|
+
import { TouchableOpacity, Text, StyleSheet, View } from 'react-native';
|
5
|
+
// import { useTranslation } from 'react-i18next';
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
7
|
+
const ActiveOffersButton = ({
|
8
|
+
premiumColor,
|
9
|
+
activeCount,
|
10
|
+
onPress
|
11
|
+
}) => {
|
12
|
+
// const { t } = useTranslation();
|
13
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
14
|
+
style: [styles.button, {
|
15
|
+
borderColor: premiumColor
|
16
|
+
}],
|
17
|
+
onPress: () => onPress && onPress('active-offers'),
|
18
|
+
children: /*#__PURE__*/_jsxs(View, {
|
19
|
+
style: {
|
20
|
+
flexDirection: 'row',
|
21
|
+
alignItems: 'center'
|
22
|
+
},
|
23
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
24
|
+
style: [styles.buttonText, {
|
25
|
+
color: premiumColor
|
26
|
+
}],
|
27
|
+
children: "Active Offers"
|
28
|
+
}), activeCount > 0 && /*#__PURE__*/_jsx(View, {
|
29
|
+
style: styles.activeCountContainer,
|
30
|
+
children: /*#__PURE__*/_jsx(Text, {
|
31
|
+
style: styles.activeCountText,
|
32
|
+
children: activeCount > 99 ? '99+' : activeCount
|
33
|
+
})
|
34
|
+
})]
|
35
|
+
})
|
36
|
+
});
|
37
|
+
};
|
38
|
+
const styles = StyleSheet.create({
|
39
|
+
button: {
|
40
|
+
borderRadius: 42,
|
41
|
+
paddingHorizontal: 16,
|
42
|
+
paddingVertical: 8,
|
43
|
+
height: 40,
|
44
|
+
justifyContent: 'center',
|
45
|
+
alignItems: 'center',
|
46
|
+
marginHorizontal: 16,
|
47
|
+
marginBottom: 16,
|
48
|
+
borderWidth: 2
|
49
|
+
},
|
50
|
+
buttonText: {
|
51
|
+
fontSize: 14,
|
52
|
+
fontWeight: 'bold'
|
53
|
+
},
|
54
|
+
activeCountContainer: {
|
55
|
+
marginLeft: 8,
|
56
|
+
width: 18,
|
57
|
+
height: 18,
|
58
|
+
backgroundColor: '#FF554A',
|
59
|
+
alignItems: 'center',
|
60
|
+
justifyContent: 'center',
|
61
|
+
borderRadius: 9
|
62
|
+
},
|
63
|
+
activeCountText: {
|
64
|
+
color: 'white',
|
65
|
+
fontSize: 10,
|
66
|
+
fontWeight: 'bold'
|
67
|
+
}
|
68
|
+
});
|
69
|
+
export default ActiveOffersButton;
|
70
|
+
//# sourceMappingURL=active_offers_button.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","TouchableOpacity","Text","StyleSheet","View","jsx","_jsx","jsxs","_jsxs","ActiveOffersButton","premiumColor","activeCount","onPress","style","styles","button","borderColor","children","flexDirection","alignItems","buttonText","color","activeCountContainer","activeCountText","create","borderRadius","paddingHorizontal","paddingVertical","height","justifyContent","marginHorizontal","marginBottom","borderWidth","fontSize","fontWeight","marginLeft","width","backgroundColor"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/active_offers_button.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,EAAEC,IAAI,EAAEC,UAAU,EAAEC,IAAI,QAAS,cAAc;AACxE;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQA,MAAMC,kBAAkD,GAAGA,CAAC;EAAEC,YAAY;EAAEC,WAAW;EAAEC;AAAQ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AAE,EAAE;IACTR,MAAM,EAAE,EAAE;IACVS,eAAe,EAAE,SAAS;IAC1BlB,UAAU,EAAE,QAAQ;IACpBU,cAAc,EAAE,QAAQ;IACxBJ,YAAY,EAAE;EAChB,CAAC;EACDF,eAAe,EAAE;IACfF,KAAK,EAAE,OAAO;IACdY,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAezB,kBAAkB","ignoreList":[]}
|
@@ -15,21 +15,18 @@ const CustomCard = ({
|
|
15
15
|
const styles = StyleSheet.create({
|
16
16
|
card: {
|
17
17
|
backgroundColor: 'white',
|
18
|
-
|
19
|
-
borderTopRightRadius: 20,
|
20
|
-
borderBottomLeftRadius: 14,
|
21
|
-
borderBottomRightRadius: 14,
|
18
|
+
borderRadius: 16,
|
22
19
|
paddingTop: 6,
|
23
20
|
paddingBottom: 5,
|
24
21
|
shadowColor: '#000',
|
22
|
+
alignSelf: 'center',
|
25
23
|
shadowOffset: {
|
26
|
-
width:
|
27
|
-
height:
|
24
|
+
width: 0,
|
25
|
+
height: 2
|
28
26
|
},
|
29
|
-
shadowOpacity: 0.
|
30
|
-
shadowRadius:
|
31
|
-
elevation: 4
|
32
|
-
alignSelf: 'center'
|
27
|
+
shadowOpacity: 0.24,
|
28
|
+
shadowRadius: 3.5,
|
29
|
+
elevation: 4
|
33
30
|
}
|
34
31
|
});
|
35
32
|
export default CustomCard;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","jsx","_jsx","CustomCard","children","style","styles","card","create","backgroundColor","
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","jsx","_jsx","CustomCard","children","style","styles","card","create","backgroundColor","borderRadius","paddingTop","paddingBottom","shadowColor","alignSelf","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/custom_card.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAA0B,OAAO;AAC7C,SAASC,IAAI,EAAEC,UAAU,QAAwB,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOhE,MAAMC,UAAqC,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAM,CAAC,KAAK;EACrE,oBAAOH,IAAA,CAACH,IAAI;IAACM,KAAK,EAAE,CAACC,MAAM,CAACC,IAAI,EAAEF,KAAK,CAAE;IAAAD,QAAA,EAAEA;EAAQ,CAAO,CAAC;AAC7D,CAAC;AAED,MAAME,MAAM,GAAGN,UAAU,CAACQ,MAAM,CAAC;EAC/BD,IAAI,EAAE;IACJE,eAAe,EAAE,OAAO;IACxBC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE,CAAC;IAChBC,WAAW,EAAE,MAAM;IACnBC,SAAS,EAAE,QAAQ;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,GAAG;IACjBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,eAAejB,UAAU","ignoreList":[]}
|
@@ -0,0 +1,135 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import React, { useRef, useState, useEffect } from 'react';
|
4
|
+
import { View, Animated, StyleSheet } from 'react-native';
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
6
|
+
const AcmoScrollPager = ({
|
7
|
+
totalPages,
|
8
|
+
delayInMillis = 5000,
|
9
|
+
content,
|
10
|
+
viewportFraction = 0.92,
|
11
|
+
scaleFactor = 0.94,
|
12
|
+
spacing = 2,
|
13
|
+
indicatorStyle,
|
14
|
+
activeIndicatorColor = 'red',
|
15
|
+
inactiveIndicatorColor = 'lightgray'
|
16
|
+
}) => {
|
17
|
+
const scrollX = useRef(new Animated.Value(0)).current;
|
18
|
+
const scrollViewRef = useRef(null);
|
19
|
+
const [currentPage, setCurrentPage] = useState(0);
|
20
|
+
const [containerWidth, setContainerWidth] = useState(null);
|
21
|
+
const intervalRef = useRef(null);
|
22
|
+
const onContainerLayout = e => {
|
23
|
+
const {
|
24
|
+
width
|
25
|
+
} = e.nativeEvent.layout;
|
26
|
+
if (width !== containerWidth) setContainerWidth(width);
|
27
|
+
};
|
28
|
+
useEffect(() => {
|
29
|
+
if (!containerWidth) return;
|
30
|
+
const itemWidth = containerWidth * viewportFraction;
|
31
|
+
const offset = itemWidth + spacing;
|
32
|
+
intervalRef.current = setInterval(() => {
|
33
|
+
const next = (currentPage + 1) % totalPages;
|
34
|
+
setCurrentPage(next);
|
35
|
+
scrollViewRef.current.scrollTo({
|
36
|
+
x: next * offset,
|
37
|
+
animated: true
|
38
|
+
});
|
39
|
+
}, delayInMillis);
|
40
|
+
return () => {
|
41
|
+
if (intervalRef.current) clearInterval(intervalRef.current);
|
42
|
+
};
|
43
|
+
}, [containerWidth, currentPage, delayInMillis, totalPages, viewportFraction, spacing]);
|
44
|
+
const handleScroll = Animated.event([{
|
45
|
+
nativeEvent: {
|
46
|
+
contentOffset: {
|
47
|
+
x: scrollX
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}], {
|
51
|
+
useNativeDriver: true,
|
52
|
+
listener: event => {
|
53
|
+
if (!containerWidth) return;
|
54
|
+
const offset = containerWidth * viewportFraction + spacing;
|
55
|
+
const index = Math.round(event.nativeEvent.contentOffset.x / offset);
|
56
|
+
setCurrentPage(index);
|
57
|
+
}
|
58
|
+
});
|
59
|
+
const renderIndicators = () => /*#__PURE__*/_jsx(View, {
|
60
|
+
style: [styles.indicatorContainer, indicatorStyle],
|
61
|
+
children: Array.from({
|
62
|
+
length: totalPages
|
63
|
+
}, (_, i) => /*#__PURE__*/_jsx(View, {
|
64
|
+
style: [styles.indicator, {
|
65
|
+
backgroundColor: i === currentPage ? activeIndicatorColor : inactiveIndicatorColor
|
66
|
+
}]
|
67
|
+
}, i))
|
68
|
+
});
|
69
|
+
if (!containerWidth) {
|
70
|
+
return /*#__PURE__*/_jsx(View, {
|
71
|
+
onLayout: onContainerLayout,
|
72
|
+
style: {
|
73
|
+
width: '100%'
|
74
|
+
}
|
75
|
+
});
|
76
|
+
}
|
77
|
+
const itemWidth = containerWidth * viewportFraction;
|
78
|
+
const itemOffset = itemWidth + spacing;
|
79
|
+
const sidePadding = (containerWidth - itemWidth - 16) / 2;
|
80
|
+
return /*#__PURE__*/_jsxs(View, {
|
81
|
+
onLayout: onContainerLayout,
|
82
|
+
style: {
|
83
|
+
width: '100%',
|
84
|
+
alignItems: 'center'
|
85
|
+
},
|
86
|
+
children: [/*#__PURE__*/_jsx(Animated.ScrollView, {
|
87
|
+
ref: scrollViewRef,
|
88
|
+
horizontal: true,
|
89
|
+
pagingEnabled: false,
|
90
|
+
snapToInterval: itemOffset,
|
91
|
+
decelerationRate: "fast",
|
92
|
+
showsHorizontalScrollIndicator: false,
|
93
|
+
scrollEventThrottle: 16,
|
94
|
+
onScroll: handleScroll,
|
95
|
+
contentContainerStyle: {
|
96
|
+
paddingHorizontal: sidePadding
|
97
|
+
},
|
98
|
+
children: Array.from({
|
99
|
+
length: totalPages
|
100
|
+
}, (_, i) => {
|
101
|
+
const inputRange = [itemOffset * (i - 1), itemOffset * i, itemOffset * (i + 1)];
|
102
|
+
const scale = scrollX.interpolate({
|
103
|
+
inputRange,
|
104
|
+
outputRange: [scaleFactor, 1, scaleFactor],
|
105
|
+
extrapolate: 'clamp'
|
106
|
+
});
|
107
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
108
|
+
style: {
|
109
|
+
width: itemWidth,
|
110
|
+
transform: [{
|
111
|
+
scale
|
112
|
+
}]
|
113
|
+
},
|
114
|
+
children: content(i)
|
115
|
+
}, i);
|
116
|
+
})
|
117
|
+
}), renderIndicators()]
|
118
|
+
});
|
119
|
+
};
|
120
|
+
const styles = StyleSheet.create({
|
121
|
+
indicatorContainer: {
|
122
|
+
flexDirection: 'row',
|
123
|
+
justifyContent: 'center',
|
124
|
+
marginTop: 6,
|
125
|
+
marginBottom: 8
|
126
|
+
},
|
127
|
+
indicator: {
|
128
|
+
width: 8,
|
129
|
+
height: 8,
|
130
|
+
borderRadius: 4,
|
131
|
+
marginHorizontal: 4
|
132
|
+
}
|
133
|
+
});
|
134
|
+
export default AcmoScrollPager;
|
135
|
+
//# sourceMappingURL=custom_scroller.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","useRef","useState","useEffect","View","Animated","StyleSheet","jsx","_jsx","jsxs","_jsxs","AcmoScrollPager","totalPages","delayInMillis","content","viewportFraction","scaleFactor","spacing","indicatorStyle","activeIndicatorColor","inactiveIndicatorColor","scrollX","Value","current","scrollViewRef","currentPage","setCurrentPage","containerWidth","setContainerWidth","intervalRef","onContainerLayout","e","width","nativeEvent","layout","itemWidth","offset","setInterval","next","scrollTo","x","animated","clearInterval","handleScroll","event","contentOffset","useNativeDriver","listener","index","Math","round","renderIndicators","style","styles","indicatorContainer","children","Array","from","length","_","i","indicator","backgroundColor","onLayout","itemOffset","sidePadding","alignItems","ScrollView","ref","horizontal","pagingEnabled","snapToInterval","decelerationRate","showsHorizontalScrollIndicator","scrollEventThrottle","onScroll","contentContainerStyle","paddingHorizontal","inputRange","scale","interpolate","outputRange","extrapolate","transform","create","flexDirection","justifyContent","marginTop","marginBottom","height","borderRadius","marginHorizontal"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/custom_scroller.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAC1D,SACEC,IAAI,EACJC,QAAQ,EACRC,UAAU,QAIL,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAetB,MAAMC,eAAqC,GAAGA,CAAC;EAC7CC,UAAU;EACVC,aAAa,GAAG,IAAI;EACpBC,OAAO;EACPC,gBAAgB,GAAG,IAAI;EACvBC,WAAW,GAAG,IAAI;E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AC8C,CAAC;QAAC,GANNA,CAOQ,CAAC;MAEpB,CAAC;IAAC,CACiB,CAAC,EACrBT,gBAAgB,CAAC,CAAC;EAAA,CACf,CAAC;AAEX,CAAC;AAED,MAAME,MAAM,GAAG/C,UAAU,CAAC8E,MAAM,CAAC;EAC/B9B,kBAAkB,EAAE;IAClB+B,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,QAAQ;IACxBC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE;EAChB,CAAC;EACD3B,SAAS,EAAE;IACT7B,KAAK,EAAE,CAAC;IACRyD,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE,CAAC;IACfC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC;AAEF,eAAehF,eAAe","ignoreList":[]}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import React, { useEffect, useRef } from 'react';
|
4
|
+
import { View, Animated, StyleSheet, Dimensions } from 'react-native';
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
6
|
+
const SCREEN_WIDTH = Dimensions.get('window').width;
|
7
|
+
const Shimmer = ({
|
8
|
+
width = '100%',
|
9
|
+
shimmerHeight: height = 16,
|
10
|
+
style,
|
11
|
+
duration = 1500
|
12
|
+
}) => {
|
13
|
+
const translateX = useRef(new Animated.Value(-1)).current;
|
14
|
+
useEffect(() => {
|
15
|
+
const animation = Animated.loop(Animated.timing(translateX, {
|
16
|
+
toValue: 1,
|
17
|
+
duration,
|
18
|
+
useNativeDriver: true
|
19
|
+
}));
|
20
|
+
animation.start();
|
21
|
+
return () => animation.stop();
|
22
|
+
}, [translateX, duration]);
|
23
|
+
const translateXInterpolate = translateX.interpolate({
|
24
|
+
inputRange: [-1, 1],
|
25
|
+
outputRange: [-SCREEN_WIDTH, SCREEN_WIDTH]
|
26
|
+
});
|
27
|
+
return /*#__PURE__*/_jsxs(View, {
|
28
|
+
style: [styles.container, {
|
29
|
+
width
|
30
|
+
}, style],
|
31
|
+
children: [/*#__PURE__*/_jsx(View, {
|
32
|
+
style: [styles.shimmerBackground, {
|
33
|
+
height
|
34
|
+
}]
|
35
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
36
|
+
style: [styles.shimmerOverlay, {
|
37
|
+
width: SCREEN_WIDTH,
|
38
|
+
height,
|
39
|
+
transform: [{
|
40
|
+
translateX: translateXInterpolate
|
41
|
+
}]
|
42
|
+
}]
|
43
|
+
})]
|
44
|
+
});
|
45
|
+
};
|
46
|
+
const styles = StyleSheet.create({
|
47
|
+
container: {
|
48
|
+
overflow: 'hidden',
|
49
|
+
backgroundColor: '#e1e1e1',
|
50
|
+
borderRadius: 4
|
51
|
+
},
|
52
|
+
shimmerBackground: {
|
53
|
+
flex: 1,
|
54
|
+
backgroundColor: '#d3d3d3'
|
55
|
+
},
|
56
|
+
shimmerOverlay: {
|
57
|
+
position: 'absolute',
|
58
|
+
top: 0,
|
59
|
+
left: 0,
|
60
|
+
backgroundColor: 'rgba(255,255,255,0.5)',
|
61
|
+
opacity: 0.4,
|
62
|
+
borderRadius: 4
|
63
|
+
}
|
64
|
+
});
|
65
|
+
export default Shimmer;
|
66
|
+
//# sourceMappingURL=custom_shimmer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","View","Animated","StyleSheet","Dimensions","jsx","_jsx","jsxs","_jsxs","SCREEN_WIDTH","get","width","Shimmer","shimmerHeight","height","style","duration","translateX","Value","current","animation","loop","timing","toValue","useNativeDriver","start","stop","translateXInterpolate","interpolate","inputRange","outputRange","styles","container","children","shimmerBackground","shimmerOverlay","transform","create","overflow","backgroundColor","borderRadius","flex","position","top","left","opacity"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/custom_shimmer.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SAASC,IAAI,EAAEC,QAAQ,EAAEC,UAAU,EAA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