@tyrads.com/tyrads-sdk 3.0.0-beta.0 → 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/src/main/java/com/tyradssdk/TyradsSdkModule.kt +21 -4
- package/ios/Tyrads/InitModel.swift +3 -0
- package/ios/Tyrads/Tyrads.swift +106 -191
- package/ios/Tyrads/WebViewController.swift +171 -0
- package/ios/Tyrads/helpers/device_details.swift +58 -0
- package/ios/TyradsSdk.mm +7 -1
- package/ios/TyradsSdk.swift +42 -27
- 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 +11 -11
- 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 +11 -11
- 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 +4 -6
- 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 +4 -6
- 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 +15 -18
- 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 -180
- 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 -174
- 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 -163
- 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/ios/TyradsSdk.swift
CHANGED
@@ -13,35 +13,50 @@ class TyradsSdk: NSObject {
|
|
13
13
|
|
14
14
|
@objc
|
15
15
|
func loginUser(_ userId: String, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
NSLog("TyradsModule: loginUser called with userId: \(userId)")
|
17
|
+
|
18
|
+
Task {
|
19
|
+
do {
|
20
|
+
guard let apiHeaders = try await Tyrads.instance.loginUser(userId) else {
|
21
|
+
reject("LOGIN_ERROR", "Login failed or returned nil headers", nil)
|
22
|
+
return
|
23
|
+
}
|
24
|
+
|
25
|
+
let result: [String: Any] = [
|
26
|
+
"xApiKey": apiHeaders.xApiKey,
|
27
|
+
"xApiSecret": apiHeaders.xApiSecret,
|
28
|
+
"xUserId": apiHeaders.xUserId,
|
29
|
+
"xSdkPlatform": apiHeaders.xSdkPlatform ?? "",
|
30
|
+
"xSdkVersion": apiHeaders.xSdkVersion ?? "",
|
31
|
+
"userAgent": apiHeaders.userAgent,
|
32
|
+
"languageCode": apiHeaders.languageCode,
|
33
|
+
"premiumColor": apiHeaders.premiumColor,
|
34
|
+
"headerColor": apiHeaders.headerColor,
|
35
|
+
"mainColor": apiHeaders.mainColor
|
36
|
+
]
|
37
|
+
|
38
|
+
resolve(result)
|
39
|
+
} catch {
|
40
|
+
reject("LOGIN_ERROR", error.localizedDescription, error)
|
41
|
+
}
|
21
42
|
}
|
22
|
-
|
23
|
-
// Convert ApiHeaders to Dictionary
|
24
|
-
let result: [String: Any] = [
|
25
|
-
"xApiKey": headers.xApiKey,
|
26
|
-
"xApiSecret": headers.xApiSecret,
|
27
|
-
"xUserId": headers.xUserId,
|
28
|
-
"xSdkPlatform": headers.xSdkPlatform ?? "",
|
29
|
-
"xSdkVersion": headers.xSdkVersion ?? "",
|
30
|
-
"userAgent": headers.userAgent,
|
31
|
-
"languageCode": headers.languageCode,
|
32
|
-
"premiumColor": headers.premiumColor,
|
33
|
-
"headerColor": headers.headerColor,
|
34
|
-
"mainColor": headers.mainColor
|
35
|
-
]
|
36
|
-
|
37
|
-
resolve(result)
|
38
|
-
}
|
39
43
|
}
|
40
44
|
|
41
|
-
|
42
|
-
@objc
|
43
|
-
|
44
|
-
|
45
|
-
|
45
|
+
|
46
|
+
@objc(showOffers:route:resolver:rejecter:)
|
47
|
+
func showOffers(_ launchMode: Int, route: String?, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
|
48
|
+
Task {
|
49
|
+
await Tyrads.instance.showOffers(launchMode, route: route, campaignID: nil)
|
50
|
+
resolve(nil)
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
@objc(showOfferDetails:route:campaignID:resolver:rejecter:)
|
55
|
+
func showOfferDetails(_ launchMode: Int, route: String?, campaignID: Int, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
|
56
|
+
Task {
|
57
|
+
await Tyrads.instance.showOffers(launchMode, route: route, campaignID: campaignID)
|
58
|
+
resolve(nil)
|
59
|
+
}
|
60
|
+
}
|
46
61
|
|
47
62
|
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.acmoLaunchURL = acmoLaunchURL;
|
7
|
+
exports.acmoLaunchURLForce = acmoLaunchURLForce;
|
8
|
+
var _reactNative = require("react-native");
|
9
|
+
async function acmoLaunchURLForce(url) {
|
10
|
+
await _reactNative.Linking.openURL(url);
|
11
|
+
}
|
12
|
+
async function acmoLaunchURL(url) {
|
13
|
+
const supported = await _reactNative.Linking.canOpenURL(url);
|
14
|
+
if (supported) {
|
15
|
+
await _reactNative.Linking.openURL(url);
|
16
|
+
} else {
|
17
|
+
console.warn("Don't know how to open URI: " + url);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
//# sourceMappingURL=launcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_reactNative","require","acmoLaunchURLForce","url","Linking","openURL","acmoLaunchURL","supported","canOpenURL","console","warn"],"sourceRoot":"../../../../../src","sources":["acmo/core/helpers/launcher.ts"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,eAAeC,kBAAkBA,CAACC,GAAW,EAAE;EAClD,MAAMC,oBAAO,CAACC,OAAO,CAACF,GAAG,CAAC;AAC9B;AAEO,eAAeG,aAAaA,CAACH,GAAW,EAAE;EAC/C,MAAMI,SAAS,GAAG,MAAMH,oBAAO,CAACI,UAAU,CAACL,GAAG,CAAC;EAC/C,IAAII,SAAS,EAAE;IACb,MAAMH,oBAAO,CAACC,OAAO,CAACF,GAAG,CAAC;EAC5B,CAAC,MAAM;IACLM,OAAO,CAACC,IAAI,CAAC,8BAA8B,GAAGP,GAAG,CAAC;EACpD;AACF","ignoreList":[]}
|
@@ -0,0 +1,76 @@
|
|
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 _jsxRuntime = require("react/jsx-runtime");
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
11
|
+
// import { useTranslation } from 'react-i18next';
|
12
|
+
|
13
|
+
const ActiveOffersButton = ({
|
14
|
+
premiumColor,
|
15
|
+
activeCount,
|
16
|
+
onPress
|
17
|
+
}) => {
|
18
|
+
// const { t } = useTranslation();
|
19
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
20
|
+
style: [styles.button, {
|
21
|
+
borderColor: premiumColor
|
22
|
+
}],
|
23
|
+
onPress: () => onPress && onPress('active-offers'),
|
24
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
25
|
+
style: {
|
26
|
+
flexDirection: 'row',
|
27
|
+
alignItems: 'center'
|
28
|
+
},
|
29
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
30
|
+
style: [styles.buttonText, {
|
31
|
+
color: premiumColor
|
32
|
+
}],
|
33
|
+
children: "Active Offers"
|
34
|
+
}), activeCount > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
35
|
+
style: styles.activeCountContainer,
|
36
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
37
|
+
style: styles.activeCountText,
|
38
|
+
children: activeCount > 99 ? '99+' : activeCount
|
39
|
+
})
|
40
|
+
})]
|
41
|
+
})
|
42
|
+
});
|
43
|
+
};
|
44
|
+
const styles = _reactNative.StyleSheet.create({
|
45
|
+
button: {
|
46
|
+
borderRadius: 42,
|
47
|
+
paddingHorizontal: 16,
|
48
|
+
paddingVertical: 8,
|
49
|
+
height: 40,
|
50
|
+
justifyContent: 'center',
|
51
|
+
alignItems: 'center',
|
52
|
+
marginHorizontal: 16,
|
53
|
+
marginBottom: 16,
|
54
|
+
borderWidth: 2
|
55
|
+
},
|
56
|
+
buttonText: {
|
57
|
+
fontSize: 14,
|
58
|
+
fontWeight: 'bold'
|
59
|
+
},
|
60
|
+
activeCountContainer: {
|
61
|
+
marginLeft: 8,
|
62
|
+
width: 18,
|
63
|
+
height: 18,
|
64
|
+
backgroundColor: '#FF554A',
|
65
|
+
alignItems: 'center',
|
66
|
+
justifyContent: 'center',
|
67
|
+
borderRadius: 9
|
68
|
+
},
|
69
|
+
activeCountText: {
|
70
|
+
color: 'white',
|
71
|
+
fontSize: 10,
|
72
|
+
fontWeight: 'bold'
|
73
|
+
}
|
74
|
+
});
|
75
|
+
var _default = exports.default = ActiveOffersButton;
|
76
|
+
//# sourceMappingURL=active_offers_button.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","ActiveOffersButton","premiumColor","activeCount","onPress","jsx","TouchableOpacity","style","styles","button","borderColor","children","jsxs","View","flexDirection","alignItems","Text","buttonText","color","activeCountContainer","activeCountText","StyleSheet","create","borderRadius","paddingHorizontal","paddingVertical","height","justifyContent","marginHorizontal","marginBottom","borderWidth","fontSize","fontWeight","marginLeft","width","backgroundColor","_default","exports"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/active_offers_button.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAyE,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AACzE;;AAQA,MAAMG,kBAAkD,GAAGA,CAAC;EAAEC,YAAY;EAAEC,WAAW;EAAEC;AAAQ,CAAC,KAAK;EACrG;EACA,oBACE,IAAAP,WAAA,CAAAQ,GAAA,EAACT,YAAA,CAAAU,gBAAgB;IACfC,KAAK,EAAE,CAACC,MAAM,CAACC,MAAM,EAAE;MAAEC,WAAW,EAAER;IAAa,CAAC,CAAE;IACtDE,OAAO,EAAEA,CAAA,KAAMA,OAAO,IAAIA,OAAO,CAAC,eAAe,CAAE;IAAAO,QAAA,eAEnD,IAAAd,WAAA,CAAAe,IAAA,EAAChB,YAAA,CAAAiB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CAAC;EACDH,eAAe,EAAE;IACfF,KAAK,EAAE,OAAO;IACda,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAArC,OAAA,GAEYC,kBAAkB","ignoreList":[]}
|
@@ -20,21 +20,18 @@ const CustomCard = ({
|
|
20
20
|
const styles = _reactNative.StyleSheet.create({
|
21
21
|
card: {
|
22
22
|
backgroundColor: 'white',
|
23
|
-
|
24
|
-
borderTopRightRadius: 20,
|
25
|
-
borderBottomLeftRadius: 14,
|
26
|
-
borderBottomRightRadius: 14,
|
23
|
+
borderRadius: 16,
|
27
24
|
paddingTop: 6,
|
28
25
|
paddingBottom: 5,
|
29
26
|
shadowColor: '#000',
|
27
|
+
alignSelf: 'center',
|
30
28
|
shadowOffset: {
|
31
|
-
width:
|
32
|
-
height:
|
29
|
+
width: 0,
|
30
|
+
height: 2
|
33
31
|
},
|
34
|
-
shadowOpacity: 0.
|
35
|
-
shadowRadius:
|
36
|
-
elevation: 4
|
37
|
-
alignSelf: 'center'
|
32
|
+
shadowOpacity: 0.24,
|
33
|
+
shadowRadius: 3.5,
|
34
|
+
elevation: 4
|
38
35
|
}
|
39
36
|
});
|
40
37
|
var _default = exports.default = CustomCard;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","CustomCard","children","style","jsx","View","styles","card","StyleSheet","create","backgroundColor","
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","CustomCard","children","style","jsx","View","styles","card","StyleSheet","create","backgroundColor","borderRadius","paddingTop","paddingBottom","shadowColor","alignSelf","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","_default","exports"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/custom_card.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAgE,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAOhE,MAAMG,UAAqC,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAM,CAAC,KAAK;EACrE,oBAAO,IAAAN,WAAA,CAAAO,GAAA,EAACR,YAAA,CAAAS,IAAI;IAACF,KAAK,EAAE,CAACG,MAAM,CAACC,IAAI,EAAEJ,KAAK,CAAE;IAAAD,QAAA,EAAEA;EAAQ,CAAO,CAAC;AAC7D,CAAC;AAED,MAAMI,MAAM,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAC/BF,IAAI,EAAE;IACJG,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;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAvB,OAAA,GAEYC,UAAU","ignoreList":[]}
|
@@ -0,0 +1,141 @@
|
|
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 AcmoScrollPager = ({
|
13
|
+
totalPages,
|
14
|
+
delayInMillis = 5000,
|
15
|
+
content,
|
16
|
+
viewportFraction = 0.92,
|
17
|
+
scaleFactor = 0.94,
|
18
|
+
spacing = 2,
|
19
|
+
indicatorStyle,
|
20
|
+
activeIndicatorColor = 'red',
|
21
|
+
inactiveIndicatorColor = 'lightgray'
|
22
|
+
}) => {
|
23
|
+
const scrollX = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
24
|
+
const scrollViewRef = (0, _react.useRef)(null);
|
25
|
+
const [currentPage, setCurrentPage] = (0, _react.useState)(0);
|
26
|
+
const [containerWidth, setContainerWidth] = (0, _react.useState)(null);
|
27
|
+
const intervalRef = (0, _react.useRef)(null);
|
28
|
+
const onContainerLayout = e => {
|
29
|
+
const {
|
30
|
+
width
|
31
|
+
} = e.nativeEvent.layout;
|
32
|
+
if (width !== containerWidth) setContainerWidth(width);
|
33
|
+
};
|
34
|
+
(0, _react.useEffect)(() => {
|
35
|
+
if (!containerWidth) return;
|
36
|
+
const itemWidth = containerWidth * viewportFraction;
|
37
|
+
const offset = itemWidth + spacing;
|
38
|
+
intervalRef.current = setInterval(() => {
|
39
|
+
const next = (currentPage + 1) % totalPages;
|
40
|
+
setCurrentPage(next);
|
41
|
+
scrollViewRef.current.scrollTo({
|
42
|
+
x: next * offset,
|
43
|
+
animated: true
|
44
|
+
});
|
45
|
+
}, delayInMillis);
|
46
|
+
return () => {
|
47
|
+
if (intervalRef.current) clearInterval(intervalRef.current);
|
48
|
+
};
|
49
|
+
}, [containerWidth, currentPage, delayInMillis, totalPages, viewportFraction, spacing]);
|
50
|
+
const handleScroll = _reactNative.Animated.event([{
|
51
|
+
nativeEvent: {
|
52
|
+
contentOffset: {
|
53
|
+
x: scrollX
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}], {
|
57
|
+
useNativeDriver: true,
|
58
|
+
listener: event => {
|
59
|
+
if (!containerWidth) return;
|
60
|
+
const offset = containerWidth * viewportFraction + spacing;
|
61
|
+
const index = Math.round(event.nativeEvent.contentOffset.x / offset);
|
62
|
+
setCurrentPage(index);
|
63
|
+
}
|
64
|
+
});
|
65
|
+
const renderIndicators = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
66
|
+
style: [styles.indicatorContainer, indicatorStyle],
|
67
|
+
children: Array.from({
|
68
|
+
length: totalPages
|
69
|
+
}, (_, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
70
|
+
style: [styles.indicator, {
|
71
|
+
backgroundColor: i === currentPage ? activeIndicatorColor : inactiveIndicatorColor
|
72
|
+
}]
|
73
|
+
}, i))
|
74
|
+
});
|
75
|
+
if (!containerWidth) {
|
76
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
77
|
+
onLayout: onContainerLayout,
|
78
|
+
style: {
|
79
|
+
width: '100%'
|
80
|
+
}
|
81
|
+
});
|
82
|
+
}
|
83
|
+
const itemWidth = containerWidth * viewportFraction;
|
84
|
+
const itemOffset = itemWidth + spacing;
|
85
|
+
const sidePadding = (containerWidth - itemWidth - 16) / 2;
|
86
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
87
|
+
onLayout: onContainerLayout,
|
88
|
+
style: {
|
89
|
+
width: '100%',
|
90
|
+
alignItems: 'center'
|
91
|
+
},
|
92
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.ScrollView, {
|
93
|
+
ref: scrollViewRef,
|
94
|
+
horizontal: true,
|
95
|
+
pagingEnabled: false,
|
96
|
+
snapToInterval: itemOffset,
|
97
|
+
decelerationRate: "fast",
|
98
|
+
showsHorizontalScrollIndicator: false,
|
99
|
+
scrollEventThrottle: 16,
|
100
|
+
onScroll: handleScroll,
|
101
|
+
contentContainerStyle: {
|
102
|
+
paddingHorizontal: sidePadding
|
103
|
+
},
|
104
|
+
children: Array.from({
|
105
|
+
length: totalPages
|
106
|
+
}, (_, i) => {
|
107
|
+
const inputRange = [itemOffset * (i - 1), itemOffset * i, itemOffset * (i + 1)];
|
108
|
+
const scale = scrollX.interpolate({
|
109
|
+
inputRange,
|
110
|
+
outputRange: [scaleFactor, 1, scaleFactor],
|
111
|
+
extrapolate: 'clamp'
|
112
|
+
});
|
113
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
114
|
+
style: {
|
115
|
+
width: itemWidth,
|
116
|
+
transform: [{
|
117
|
+
scale
|
118
|
+
}]
|
119
|
+
},
|
120
|
+
children: content(i)
|
121
|
+
}, i);
|
122
|
+
})
|
123
|
+
}), renderIndicators()]
|
124
|
+
});
|
125
|
+
};
|
126
|
+
const styles = _reactNative.StyleSheet.create({
|
127
|
+
indicatorContainer: {
|
128
|
+
flexDirection: 'row',
|
129
|
+
justifyContent: 'center',
|
130
|
+
marginTop: 6,
|
131
|
+
marginBottom: 8
|
132
|
+
},
|
133
|
+
indicator: {
|
134
|
+
width: 8,
|
135
|
+
height: 8,
|
136
|
+
borderRadius: 4,
|
137
|
+
marginHorizontal: 4
|
138
|
+
}
|
139
|
+
});
|
140
|
+
var _default = exports.default = AcmoScrollPager;
|
141
|
+
//# sourceMappingURL=custom_scroller.js.map
|
@@ -0,0 +1 @@
|
|
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","AcmoScrollPager","totalPages","delayInMillis","content","viewportFraction","scaleFactor","spacing","indicatorStyle","activeIndicatorColor","inactiveIndicatorColor","scrollX","useRef","Animated","Value","current","scrollViewRef","currentPage","setCurrentPage","useState","containerWidth","setContainerWidth","intervalRef","onContainerLayout","width","nativeEvent","layout","useEffect","itemWidth","offset","setInterval","next","scrollTo","x","animated","clearInterval","handleScroll","event","contentOffset","useNativeDriver","listener","index","Math","round","renderIndicators","jsx","View","style","styles","indicatorContainer","children","Array","from","length","_","indicator","backgroundColor","onLayout","itemOffset","sidePadding","jsxs","alignItems","ScrollView","ref","horizontal","pagingEnabled","snapToInterval","decelerationRate","showsHorizontalScrollIndicator","scrollEventThrottle","onScroll","contentContainerStyle","paddingHorizontal","inputRange","scale","interpolate","outputRange","extrapolate","transform","StyleSheet","create","flexDirection","justifyContent","marginTop","marginBottom","height","borderRadius","marginHorizontal","_default","exports"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/custom_scroller.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOsB,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,IA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Aa,EAAE,KAAK;IACpBC,cAAc,EAAE,QAAQ;IACxBC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE;EAChB,CAAC;EACD7B,SAAS,EAAE;IACT/B,KAAK,EAAE,CAAC;IACR6D,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE,CAAC;IACfC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAtG,OAAA,GAEYc,eAAe","ignoreList":[]}
|
package/lib/commonjs/acmo/{core/marquee.js → modules/dashboard/components/custom_shimmer.js}
RENAMED
@@ -9,52 +9,64 @@ var _reactNative = require("react-native");
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
10
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
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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
style
|
12
|
+
const SCREEN_WIDTH = _reactNative.Dimensions.get('window').width;
|
13
|
+
const Shimmer = ({
|
14
|
+
width = '100%',
|
15
|
+
shimmerHeight: height = 16,
|
16
|
+
style,
|
17
|
+
duration = 1500
|
17
18
|
}) => {
|
18
|
-
const translateX = (0, _react.useRef)(new _reactNative.Animated.Value(
|
19
|
+
const translateX = (0, _react.useRef)(new _reactNative.Animated.Value(-1)).current;
|
19
20
|
(0, _react.useEffect)(() => {
|
20
|
-
const
|
21
|
-
|
22
|
-
|
23
|
-
toValue: -textWidth,
|
24
|
-
duration: (textWidth + screenWidth) * speed,
|
21
|
+
const animation = _reactNative.Animated.loop(_reactNative.Animated.timing(translateX, {
|
22
|
+
toValue: 1,
|
23
|
+
duration,
|
25
24
|
useNativeDriver: true
|
26
|
-
})
|
27
|
-
toValue: screenWidth,
|
28
|
-
duration: 0,
|
29
|
-
useNativeDriver: true
|
30
|
-
})]), {
|
31
|
-
iterations: repeat
|
32
|
-
});
|
25
|
+
}));
|
33
26
|
animation.start();
|
34
27
|
return () => animation.stop();
|
35
|
-
}, [
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
28
|
+
}, [translateX, duration]);
|
29
|
+
const translateXInterpolate = translateX.interpolate({
|
30
|
+
inputRange: [-1, 1],
|
31
|
+
outputRange: [-SCREEN_WIDTH, SCREEN_WIDTH]
|
32
|
+
});
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
34
|
+
style: [styles.container, {
|
35
|
+
width
|
36
|
+
}, style],
|
37
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
38
|
+
style: [styles.shimmerBackground, {
|
39
|
+
height
|
40
|
+
}]
|
41
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
42
|
+
style: [styles.shimmerOverlay, {
|
43
|
+
width: SCREEN_WIDTH,
|
44
|
+
height,
|
41
45
|
transform: [{
|
42
|
-
translateX
|
46
|
+
translateX: translateXInterpolate
|
43
47
|
}]
|
44
|
-
}]
|
45
|
-
|
46
|
-
})
|
48
|
+
}]
|
49
|
+
})]
|
47
50
|
});
|
48
51
|
};
|
49
52
|
const styles = _reactNative.StyleSheet.create({
|
50
53
|
container: {
|
51
54
|
overflow: 'hidden',
|
52
|
-
|
55
|
+
backgroundColor: '#e1e1e1',
|
56
|
+
borderRadius: 4
|
57
|
+
},
|
58
|
+
shimmerBackground: {
|
59
|
+
flex: 1,
|
60
|
+
backgroundColor: '#d3d3d3'
|
53
61
|
},
|
54
|
-
|
55
|
-
|
56
|
-
|
62
|
+
shimmerOverlay: {
|
63
|
+
position: 'absolute',
|
64
|
+
top: 0,
|
65
|
+
left: 0,
|
66
|
+
backgroundColor: 'rgba(255,255,255,0.5)',
|
67
|
+
opacity: 0.4,
|
68
|
+
borderRadius: 4
|
57
69
|
}
|
58
70
|
});
|
59
|
-
var _default = exports.default =
|
60
|
-
//# sourceMappingURL=
|
71
|
+
var _default = exports.default = Shimmer;
|
72
|
+
//# sourceMappingURL=custom_shimmer.js.map
|
@@ -0,0 +1 @@
|
|
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","SCREEN_WIDTH","Dimensions","width","Shimmer","shimmerHeight","height","style","duration","translateX","useRef","Animated","Value","current","useEffect","animation","loop","timing","toValue","useNativeDriver","start","stop","translateXInterpolate","interpolate","inputRange","outputRange","jsxs","View","styles","container","children","jsx","shimmerBackground","shimmerOverlay","transform","StyleSheet","create","overflow","backgroundColor","borderRadius","flex","position","top","left","opacity","_default","exports"],"sourceRoot":"../../../../../../src","sources":["acmo/modules/dashboard/components/custom_shimmer.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA2H,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,SAAA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