webtonative 1.0.75-beta.6 → 1.0.76
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/ATTConsent/index.js +1 -54
- package/AdMob/index.js +1 -102
- package/AppReview/index.js +1 -22
- package/AppsFlyer/index.js +4 -43
- package/BackgroundLocation/index.js +4 -65
- package/Beacon/index.js +1 -30
- package/Biometric/index.js +1 -125
- package/Bluetooth/index.js +1 -67
- package/BottomNavigation/index.js +4 -41
- package/Clipboard/index.js +4 -45
- package/Facebook/events.js +4 -44
- package/Facebook/index.js +1 -29
- package/Firebase/Analytics/index.js +4 -110
- package/Firebase/Messaging/index.js +4 -64
- package/Firebase/index.js +1 -31
- package/FirebaseAnalytics/index.js +1 -29
- package/Haptics/index.js +1 -21
- package/InAppPurchase/index.js +1 -81
- package/InAppUpdate/index.js +1 -39
- package/MediaPlayer/index.js +7 -56
- package/NativeContacts/index.js +6 -51
- package/NativeDatastore/index.js +1 -0
- package/Notification/index.js +5 -42
- package/OneSignal/index.js +1 -265
- package/Printing/index.js +1 -20
- package/README.md +2 -31
- package/Screen/index.js +4 -35
- package/Siri/index.js +1 -26
- package/SocialLogin/apple.js +1 -32
- package/SocialLogin/facebook.js +3 -55
- package/SocialLogin/google.js +4 -56
- package/SocialLogin/index.js +1 -23
- package/Stripe/index.js +1 -49
- package/VoiceSearch/index.js +1 -34
- package/barcode/barcode-scan.js +1 -40
- package/barcode/formats.js +1 -23
- package/barcode/index.js +1 -13
- package/barcode/types.js +1 -22
- package/index.js +2 -535
- package/package.json +3 -134
- package/utills.js +1 -111
- package/webtonative.min.js +1 -1
- package/ATTConsent/index.d.ts +0 -17
- package/ATTConsent/index.d.ts.map +0 -1
- package/ATTConsent/index.js.map +0 -1
- package/ATTConsent/types.d.ts +0 -15
- package/ATTConsent/types.d.ts.map +0 -1
- package/ATTConsent/types.js +0 -3
- package/ATTConsent/types.js.map +0 -1
- package/AdMob/index.d.ts +0 -31
- package/AdMob/index.d.ts.map +0 -1
- package/AdMob/index.js.map +0 -1
- package/AdMob/types.d.ts +0 -25
- package/AdMob/types.d.ts.map +0 -1
- package/AdMob/types.js +0 -4
- package/AdMob/types.js.map +0 -1
- package/AppReview/index.d.ts +0 -7
- package/AppReview/index.d.ts.map +0 -1
- package/AppReview/index.js.map +0 -1
- package/AppReview/types.d.ts +0 -8
- package/AppReview/types.d.ts.map +0 -1
- package/AppReview/types.js +0 -4
- package/AppReview/types.js.map +0 -1
- package/AppsFlyer/index.d.ts +0 -15
- package/AppsFlyer/index.d.ts.map +0 -1
- package/AppsFlyer/index.js.map +0 -1
- package/AppsFlyer/types.d.ts +0 -10
- package/AppsFlyer/types.d.ts.map +0 -1
- package/AppsFlyer/types.js +0 -3
- package/AppsFlyer/types.js.map +0 -1
- package/BackgroundLocation/index.d.ts +0 -12
- package/BackgroundLocation/index.d.ts.map +0 -1
- package/BackgroundLocation/index.js.map +0 -1
- package/BackgroundLocation/types.d.ts +0 -32
- package/BackgroundLocation/types.d.ts.map +0 -1
- package/BackgroundLocation/types.js +0 -3
- package/BackgroundLocation/types.js.map +0 -1
- package/Beacon/index.d.ts +0 -7
- package/Beacon/index.d.ts.map +0 -1
- package/Beacon/index.js.map +0 -1
- package/Beacon/types.d.ts +0 -19
- package/Beacon/types.d.ts.map +0 -1
- package/Beacon/types.js +0 -3
- package/Beacon/types.js.map +0 -1
- package/Biometric/index.d.ts +0 -27
- package/Biometric/index.d.ts.map +0 -1
- package/Biometric/index.js.map +0 -1
- package/Biometric/types.d.ts +0 -24
- package/Biometric/types.d.ts.map +0 -1
- package/Biometric/types.js +0 -3
- package/Biometric/types.js.map +0 -1
- package/Bluetooth/index.d.ts +0 -17
- package/Bluetooth/index.d.ts.map +0 -1
- package/Bluetooth/index.js.map +0 -1
- package/Bluetooth/types.d.ts +0 -34
- package/Bluetooth/types.d.ts.map +0 -1
- package/Bluetooth/types.js +0 -3
- package/Bluetooth/types.js.map +0 -1
- package/BottomNavigation/index.d.ts +0 -11
- package/BottomNavigation/index.d.ts.map +0 -1
- package/BottomNavigation/index.js.map +0 -1
- package/BottomNavigation/types.d.ts +0 -9
- package/BottomNavigation/types.d.ts.map +0 -1
- package/BottomNavigation/types.js +0 -3
- package/BottomNavigation/types.js.map +0 -1
- package/Clipboard/index.d.ts +0 -12
- package/Clipboard/index.d.ts.map +0 -1
- package/Clipboard/index.js.map +0 -1
- package/Clipboard/types.d.ts +0 -20
- package/Clipboard/types.d.ts.map +0 -1
- package/Clipboard/types.js +0 -4
- package/Clipboard/types.js.map +0 -1
- package/Facebook/events.d.ts +0 -13
- package/Facebook/events.d.ts.map +0 -1
- package/Facebook/events.js.map +0 -1
- package/Facebook/index.d.ts +0 -3
- package/Facebook/index.d.ts.map +0 -1
- package/Facebook/index.js.map +0 -1
- package/Facebook/types.d.ts +0 -22
- package/Facebook/types.d.ts.map +0 -1
- package/Facebook/types.js +0 -3
- package/Facebook/types.js.map +0 -1
- package/Firebase/Analytics/index.d.ts +0 -32
- package/Firebase/Analytics/index.d.ts.map +0 -1
- package/Firebase/Analytics/index.js.map +0 -1
- package/Firebase/Messaging/index.d.ts +0 -17
- package/Firebase/Messaging/index.d.ts.map +0 -1
- package/Firebase/Messaging/index.js.map +0 -1
- package/Firebase/index.d.ts +0 -4
- package/Firebase/index.d.ts.map +0 -1
- package/Firebase/index.js.map +0 -1
- package/Firebase/types.d.ts +0 -58
- package/Firebase/types.d.ts.map +0 -1
- package/Firebase/types.js +0 -4
- package/Firebase/types.js.map +0 -1
- package/FirebaseAnalytics/index.d.ts +0 -3
- package/FirebaseAnalytics/index.d.ts.map +0 -1
- package/FirebaseAnalytics/index.js.map +0 -1
- package/Haptics/index.d.ts +0 -7
- package/Haptics/index.d.ts.map +0 -1
- package/Haptics/index.js.map +0 -1
- package/Haptics/types.d.ts +0 -8
- package/Haptics/types.d.ts.map +0 -1
- package/Haptics/types.js +0 -3
- package/Haptics/types.js.map +0 -1
- package/InAppPurchase/index.d.ts +0 -23
- package/InAppPurchase/index.d.ts.map +0 -1
- package/InAppPurchase/index.js.map +0 -1
- package/InAppPurchase/types.d.ts +0 -34
- package/InAppPurchase/types.d.ts.map +0 -1
- package/InAppPurchase/types.js +0 -3
- package/InAppPurchase/types.js.map +0 -1
- package/InAppUpdate/index.d.ts +0 -12
- package/InAppUpdate/index.d.ts.map +0 -1
- package/InAppUpdate/index.js.map +0 -1
- package/InAppUpdate/types.d.ts +0 -15
- package/InAppUpdate/types.d.ts.map +0 -1
- package/InAppUpdate/types.js +0 -3
- package/InAppUpdate/types.js.map +0 -1
- package/MediaPlayer/index.d.ts +0 -17
- package/MediaPlayer/index.d.ts.map +0 -1
- package/MediaPlayer/index.js.map +0 -1
- package/MediaPlayer/types.d.ts +0 -14
- package/MediaPlayer/types.d.ts.map +0 -1
- package/MediaPlayer/types.js +0 -3
- package/MediaPlayer/types.js.map +0 -1
- package/NativeContacts/index.d.ts +0 -12
- package/NativeContacts/index.d.ts.map +0 -1
- package/NativeContacts/index.js.map +0 -1
- package/NativeContacts/types.d.ts +0 -14
- package/NativeContacts/types.d.ts.map +0 -1
- package/NativeContacts/types.js +0 -3
- package/NativeContacts/types.js.map +0 -1
- package/Notification/index.d.ts +0 -11
- package/Notification/index.d.ts.map +0 -1
- package/Notification/index.js.map +0 -1
- package/Notification/types.d.ts +0 -14
- package/Notification/types.d.ts.map +0 -1
- package/Notification/types.js +0 -3
- package/Notification/types.js.map +0 -1
- package/OneSignal/index.d.ts +0 -18
- package/OneSignal/index.d.ts.map +0 -1
- package/OneSignal/index.js.map +0 -1
- package/OneSignal/types.d.ts +0 -41
- package/OneSignal/types.d.ts.map +0 -1
- package/OneSignal/types.js +0 -4
- package/OneSignal/types.js.map +0 -1
- package/Printing/index.d.ts +0 -7
- package/Printing/index.d.ts.map +0 -1
- package/Printing/index.js.map +0 -1
- package/Printing/types.d.ts +0 -9
- package/Printing/types.d.ts.map +0 -1
- package/Printing/types.js +0 -3
- package/Printing/types.js.map +0 -1
- package/Screen/index.d.ts +0 -9
- package/Screen/index.d.ts.map +0 -1
- package/Screen/index.js.map +0 -1
- package/Screen/types.d.ts +0 -6
- package/Screen/types.d.ts.map +0 -1
- package/Screen/types.js +0 -4
- package/Screen/types.js.map +0 -1
- package/Siri/index.d.ts +0 -7
- package/Siri/index.d.ts.map +0 -1
- package/Siri/index.js.map +0 -1
- package/Siri/types.d.ts +0 -14
- package/Siri/types.d.ts.map +0 -1
- package/Siri/types.js +0 -3
- package/Siri/types.js.map +0 -1
- package/SocialLogin/apple.d.ts +0 -12
- package/SocialLogin/apple.d.ts.map +0 -1
- package/SocialLogin/apple.js.map +0 -1
- package/SocialLogin/facebook.d.ts +0 -22
- package/SocialLogin/facebook.d.ts.map +0 -1
- package/SocialLogin/facebook.js.map +0 -1
- package/SocialLogin/google.d.ts +0 -22
- package/SocialLogin/google.d.ts.map +0 -1
- package/SocialLogin/google.js.map +0 -1
- package/SocialLogin/index.d.ts +0 -17
- package/SocialLogin/index.d.ts.map +0 -1
- package/SocialLogin/index.js.map +0 -1
- package/SocialLogin/types.d.ts +0 -39
- package/SocialLogin/types.d.ts.map +0 -1
- package/SocialLogin/types.js +0 -3
- package/SocialLogin/types.js.map +0 -1
- package/Stripe/index.d.ts +0 -3
- package/Stripe/index.d.ts.map +0 -1
- package/Stripe/index.js.map +0 -1
- package/Stripe/types.d.ts +0 -32
- package/Stripe/types.d.ts.map +0 -1
- package/Stripe/types.js +0 -3
- package/Stripe/types.js.map +0 -1
- package/VoiceSearch/index.d.ts +0 -13
- package/VoiceSearch/index.d.ts.map +0 -1
- package/VoiceSearch/index.js.map +0 -1
- package/VoiceSearch/types.d.ts +0 -10
- package/VoiceSearch/types.d.ts.map +0 -1
- package/VoiceSearch/types.js +0 -3
- package/VoiceSearch/types.js.map +0 -1
- package/barcode/barcode-scan.d.ts +0 -16
- package/barcode/barcode-scan.d.ts.map +0 -1
- package/barcode/barcode-scan.js.map +0 -1
- package/barcode/barcode-types.d.ts +0 -18
- package/barcode/barcode-types.d.ts.map +0 -1
- package/barcode/barcode-types.js +0 -3
- package/barcode/barcode-types.js.map +0 -1
- package/barcode/formats.d.ts +0 -18
- package/barcode/formats.d.ts.map +0 -1
- package/barcode/formats.js.map +0 -1
- package/barcode/index.d.ts +0 -5
- package/barcode/index.d.ts.map +0 -1
- package/barcode/index.js.map +0 -1
- package/barcode/types.d.ts +0 -17
- package/barcode/types.d.ts.map +0 -1
- package/barcode/types.js.map +0 -1
- package/index.d.ts +0 -156
- package/index.d.ts.map +0 -1
- package/index.js.map +0 -1
- package/types/index.d.ts +0 -50
- package/types/index.d.ts.map +0 -1
- package/types/index.js +0 -4
- package/types/index.js.map +0 -1
- package/utills.d.ts +0 -12
- package/utills.d.ts.map +0 -1
- package/utills.js.map +0 -1
package/ATTConsent/index.js
CHANGED
|
@@ -1,54 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.status = exports.request = void 0;
|
|
4
|
-
var utills_1 = require("../utills");
|
|
5
|
-
/**
|
|
6
|
-
* This function opens ATTConsent
|
|
7
|
-
* @param options - Options for ATT consent request
|
|
8
|
-
* @example wtn.ATTConsent.request({
|
|
9
|
-
* callback:(value)=>{
|
|
10
|
-
* console.log(value);
|
|
11
|
-
* }
|
|
12
|
-
* });
|
|
13
|
-
*/
|
|
14
|
-
var request = function (options) {
|
|
15
|
-
if (options === void 0) { options = {}; }
|
|
16
|
-
var callback = options.callback;
|
|
17
|
-
if (["IOS_APP"].includes(utills_1.platform)) {
|
|
18
|
-
(0, utills_1.registerCb)(function (response) {
|
|
19
|
-
var type = response.type;
|
|
20
|
-
if (type === "requestTrackingConsent") {
|
|
21
|
-
callback && callback(response);
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
25
|
-
utills_1.webToNativeIos.postMessage({
|
|
26
|
-
action: "requestTrackingAuthorization",
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
exports.request = request;
|
|
32
|
-
/**
|
|
33
|
-
* This function gets the current ATT consent status
|
|
34
|
-
* @param options - Options for ATT consent status
|
|
35
|
-
*/
|
|
36
|
-
var status = function (options) {
|
|
37
|
-
if (options === void 0) { options = {}; }
|
|
38
|
-
var callback = options.callback;
|
|
39
|
-
if (["IOS_APP"].includes(utills_1.platform)) {
|
|
40
|
-
(0, utills_1.registerCb)(function (response) {
|
|
41
|
-
var type = response.type;
|
|
42
|
-
if (type === "trackingConsentStatus") {
|
|
43
|
-
callback && callback(response);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
47
|
-
utills_1.webToNativeIos.postMessage({
|
|
48
|
-
action: "trackingConsentStatus",
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
exports.status = status;
|
|
54
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.status=exports.request=void 0;var _utills=require("../utills"),request=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"requestTrackingConsent"===c&&b&&b(a)}),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"requestTrackingAuthorization"}))};exports.request=request;var status=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"trackingConsentStatus"===c&&b&&b(a)}),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"trackingConsentStatus"}))};exports.status=status;
|
package/AdMob/index.js
CHANGED
|
@@ -1,102 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _this = this;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.rewardsAd = exports.fullScreenAd = exports.bannerAd = void 0;
|
|
5
|
-
var utills_1 = require("../utills");
|
|
6
|
-
var adMobCb = null;
|
|
7
|
-
/**
|
|
8
|
-
* This function shows banner ad
|
|
9
|
-
* @param options - Banner ad options
|
|
10
|
-
* @example wtn.bannerAd({
|
|
11
|
-
* adId: "ca-app-pub-xxx"
|
|
12
|
-
* });
|
|
13
|
-
*/
|
|
14
|
-
var bannerAd = function (options) {
|
|
15
|
-
if (options === void 0) { options = {}; }
|
|
16
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
17
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
18
|
-
utills_1.webToNativeIos.postMessage({
|
|
19
|
-
action: "showBannerAd",
|
|
20
|
-
adId: options.adId || "",
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
utills_1.platform === "ANDROID_APP" && utills_1.webToNative.showBannerAd(JSON.stringify(options));
|
|
24
|
-
return _this;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.bannerAd = bannerAd;
|
|
28
|
-
/**
|
|
29
|
-
* This function shows full screen ad
|
|
30
|
-
* @param options - Full screen ad options
|
|
31
|
-
* @example wtn.fullScreenAd({
|
|
32
|
-
* fullScreenAdCallback:(value)=>{
|
|
33
|
-
* console.log(value);
|
|
34
|
-
* }
|
|
35
|
-
* });
|
|
36
|
-
*/
|
|
37
|
-
var fullScreenAd = function (options) {
|
|
38
|
-
if (options === void 0) { options = {}; }
|
|
39
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
40
|
-
var fullScreenAdCallback = options.fullScreenAdCallback;
|
|
41
|
-
(0, utills_1.registerForAbMobCb)(function (response) {
|
|
42
|
-
var status = response.status;
|
|
43
|
-
adMobCb && adMobCb(response);
|
|
44
|
-
if (status === "adDismissed") {
|
|
45
|
-
adMobCb = null;
|
|
46
|
-
}
|
|
47
|
-
if (["adDismissed", "adLoadError", "adError"].indexOf(status) > -1) {
|
|
48
|
-
(0, utills_1.deRegisterForAbMobCb)();
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
52
|
-
utills_1.webToNativeIos.postMessage({
|
|
53
|
-
action: "showFullScreenAd",
|
|
54
|
-
adId: options.adId || "",
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
utills_1.platform === "ANDROID_APP" && utills_1.webToNative.showFullScreenAd(JSON.stringify(options));
|
|
58
|
-
if (typeof fullScreenAdCallback === "function") {
|
|
59
|
-
adMobCb = fullScreenAdCallback;
|
|
60
|
-
}
|
|
61
|
-
return _this;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
exports.fullScreenAd = fullScreenAd;
|
|
65
|
-
/**
|
|
66
|
-
* This function shows rewards ad
|
|
67
|
-
* @param options - Rewards ad options
|
|
68
|
-
* @example wtn.rewardsAd({
|
|
69
|
-
* rewardsAdCallback:(value)=>{
|
|
70
|
-
* console.log(value);
|
|
71
|
-
* }
|
|
72
|
-
* });
|
|
73
|
-
*/
|
|
74
|
-
var rewardsAd = function (options) {
|
|
75
|
-
if (options === void 0) { options = {}; }
|
|
76
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
77
|
-
var rewardsAdCallback = options.rewardsAdCallback;
|
|
78
|
-
(0, utills_1.registerForAbMobCb)(function (response) {
|
|
79
|
-
var status = response.status;
|
|
80
|
-
adMobCb && adMobCb(response);
|
|
81
|
-
if (status === "adDismissed") {
|
|
82
|
-
adMobCb = null;
|
|
83
|
-
}
|
|
84
|
-
if (["adDismissed", "adLoadError", "adError"].indexOf(status) > -1) {
|
|
85
|
-
(0, utills_1.deRegisterForAbMobCb)();
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
89
|
-
utills_1.webToNativeIos.postMessage({
|
|
90
|
-
action: "showRewardAd",
|
|
91
|
-
adId: options.adId || "",
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
utills_1.platform === "ANDROID_APP" && utills_1.webToNative.showRewardsAd(JSON.stringify(options));
|
|
95
|
-
if (typeof rewardsAdCallback === "function") {
|
|
96
|
-
adMobCb = rewardsAdCallback;
|
|
97
|
-
}
|
|
98
|
-
return _this;
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
exports.rewardsAd = rewardsAd;
|
|
102
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.rewardsAd=exports.fullScreenAd=exports.bannerAd=void 0;var _utills=require("../utills"),_this=void 0,adMobCb=null,bannerAd=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(_utills.platform))return"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"showBannerAd",adId:a.adId||""}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.showBannerAd(JSON.stringify(a)),_this};exports.bannerAd=bannerAd;var fullScreenAd=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.fullScreenAdCallback;return(0,_utills.registerForAbMobCb)(function(a){var b=a.status;adMobCb&&adMobCb(a),"adDismissed"===b&&(adMobCb=null),-1<["adDismissed","adLoadError","adError"].indexOf(b)&&(0,_utills.deRegisterForAbMobCb)()}),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"showFullScreenAd",adId:a.adId||""}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.showFullScreenAd(JSON.stringify(a)),"function"==typeof b&&(adMobCb=b),_this}};exports.fullScreenAd=fullScreenAd;var rewardsAd=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.rewardsAdCallback;return(0,_utills.registerForAbMobCb)(function(a){var b=a.status;adMobCb&&adMobCb(a),"adDismissed"===b&&(adMobCb=null),-1<["adDismissed","adLoadError","adError"].indexOf(b)&&(0,_utills.deRegisterForAbMobCb)()}),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"showRewardAd",adId:a.adId||""}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.showRewardsAd(JSON.stringify(a)),"function"==typeof b&&(adMobCb=b),_this}};exports.rewardsAd=rewardsAd;
|
package/AppReview/index.js
CHANGED
|
@@ -1,22 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.prompt = void 0;
|
|
4
|
-
var utills_1 = require("../utills");
|
|
5
|
-
/**
|
|
6
|
-
* Shows the app review/rating prompt
|
|
7
|
-
* @param options - Options for app review prompt
|
|
8
|
-
*/
|
|
9
|
-
var prompt = function (options) {
|
|
10
|
-
if (options === void 0) { options = {}; }
|
|
11
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
12
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
13
|
-
utills_1.webToNativeIos.postMessage({
|
|
14
|
-
action: "showAppRating",
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
18
|
-
utills_1.webToNative.showInAppReview();
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
exports.prompt = prompt;
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.prompt=void 0;var _utills=require("../utills"),prompt=function(){0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&("IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"showAppRating"}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.showInAppReview())};exports.prompt=prompt;
|
package/AppsFlyer/index.js
CHANGED
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
/**
|
|
6
|
-
* Sets the AppsFlyer customer user ID
|
|
7
|
-
* @param userId - The user ID to set
|
|
8
|
-
* @example wtn.appsflyer.setCustomerUserId("1234");
|
|
9
|
-
*/
|
|
10
|
-
var setCustomerUserId = function (userId) {
|
|
11
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
12
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
13
|
-
utills_1.webToNative.setAppsFlyerUserId(userId);
|
|
14
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
15
|
-
utills_1.webToNativeIos.postMessage({
|
|
16
|
-
action: "setAppsFlyerUserId",
|
|
17
|
-
userId: userId
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.setCustomerUserId = setCustomerUserId;
|
|
23
|
-
/**
|
|
24
|
-
* Logs an event to AppsFlyer
|
|
25
|
-
* @param eventName - The name of the event
|
|
26
|
-
* @param eventValues - The values associated with the event
|
|
27
|
-
* @example wtn.appsflyer.logEvent("ADD_TO_CART",{name:"Cadburry",quantity:1});
|
|
28
|
-
*/
|
|
29
|
-
var logEvent = function (eventName, eventValues) {
|
|
30
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
31
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
32
|
-
utills_1.webToNative.addEventToAppsFlyer(eventName, JSON.stringify(eventValues));
|
|
33
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
34
|
-
utills_1.webToNativeIos.postMessage({
|
|
35
|
-
action: "addEventToAppsFlyer",
|
|
36
|
-
eventName: eventName,
|
|
37
|
-
eventValues: eventValues
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
exports.logEvent = logEvent;
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setCustomerUserId=exports.logEvent=void 0;var _utills=require("../utills"),setCustomerUserId=function(a){["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&("ANDROID_APP"===_utills.platform&&_utills.webToNative.setAppsFlyerUserId(a),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"setAppsFlyerUserId",userId:a}))};exports.setCustomerUserId=setCustomerUserId;/**
|
|
2
|
+
*
|
|
3
|
+
* @example wtn.appsflyer.setCustomerUserId("ADD_TO_CART",{name:"Cadburry",quantity:1});
|
|
4
|
+
*/var logEvent=function(a,b){["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&("ANDROID_APP"===_utills.platform&&_utills.webToNative.addEventToAppsFlyer(a,JSON.stringify(b)),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"addEventToAppsFlyer",eventName:a,eventValues:b}))};exports.logEvent=logEvent;
|
|
@@ -1,65 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
/**
|
|
6
|
-
* Starts tracking background location
|
|
7
|
-
* @param options - Background location tracking options
|
|
8
|
-
*/
|
|
9
|
-
var start = function (options) {
|
|
10
|
-
if (options === void 0) { options = {}; }
|
|
11
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
12
|
-
var data = options.data, callback_1 = options.callback, _a = options.backgroundIndicator, backgroundIndicator = _a === void 0 ? false : _a, _b = options.pauseAutomatically, pauseAutomatically = _b === void 0 ? true : _b, _c = options.distanceFilter, distanceFilter = _c === void 0 ? 0.0 : _c, _d = options.desiredAccuracy, desiredAccuracy = _d === void 0 ? "best" : _d, _e = options.activityType, activityType = _e === void 0 ? "other" : _e, apiUrl = options.apiUrl, timeout = options.timeout;
|
|
13
|
-
(0, utills_1.registerCb)(function (response) {
|
|
14
|
-
var type = response.type;
|
|
15
|
-
if (type === "LOCATION_UPDATE") {
|
|
16
|
-
callback_1 && callback_1(response);
|
|
17
|
-
}
|
|
18
|
-
}, {
|
|
19
|
-
key: "LOCATION_UPDATE",
|
|
20
|
-
ignoreDelete: true,
|
|
21
|
-
});
|
|
22
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
23
|
-
utills_1.webToNativeIos.postMessage({
|
|
24
|
-
action: "startLocation",
|
|
25
|
-
data: data,
|
|
26
|
-
backgroundIndicator: backgroundIndicator,
|
|
27
|
-
pauseAutomatically: pauseAutomatically,
|
|
28
|
-
distanceFilter: distanceFilter,
|
|
29
|
-
desiredAccuracy: desiredAccuracy,
|
|
30
|
-
activityType: activityType,
|
|
31
|
-
apiUrl: apiUrl,
|
|
32
|
-
timeout: timeout,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
36
|
-
utills_1.webToNative.startTrackingLocation(JSON.stringify({
|
|
37
|
-
action: "startLocation",
|
|
38
|
-
data: data,
|
|
39
|
-
interval: timeout,
|
|
40
|
-
callback: callback_1,
|
|
41
|
-
apiUrl: apiUrl,
|
|
42
|
-
displacement: distanceFilter
|
|
43
|
-
}));
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
exports.start = start;
|
|
47
|
-
/**
|
|
48
|
-
* Stops tracking background location
|
|
49
|
-
* @param options - Options for stopping location tracking
|
|
50
|
-
*/
|
|
51
|
-
var stop = function (options) {
|
|
52
|
-
if (options === void 0) { options = {}; }
|
|
53
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
54
|
-
(0, utills_1.deRegisterCbByKey)("LOCATION_UPDATE");
|
|
55
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
56
|
-
utills_1.webToNativeIos.postMessage({
|
|
57
|
-
action: "stopLocation",
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
61
|
-
utills_1.webToNative.stopTrackingLocation();
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
exports.stop = stop;
|
|
65
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stop=exports.start=void 0;var _utills=require("../utills"),start=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.data,c=a.callback,d=a.backgroundIndicator,e=a.pauseAutomatically,f=a.distanceFilter,g=void 0===f?0:f,h=a.desiredAccuracy,i=void 0===h?"best":h,j=a.activityType,k=void 0===j?"other":j,l=a.apiUrl,m=a.timeout;(0,_utills.registerCb)(function(a){var b=a.type;"LOCATION_UPDATE"===b&&c&&c(a)},{key:"LOCATION_UPDATE",ignoreDelete:!0}),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"startLocation",data:b,backgroundIndicator:void 0!==d&&d,pauseAutomatically:!(void 0!==e)||e,distanceFilter:g,desiredAccuracy:i,activityType:k,apiUrl:l,timeout:m}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.startTrackingLocation(JSON.stringify({action:"startLocation",data:b,interval:m,callback:c,apiUrl:l,displacement:g}))}};exports.start=start;/**
|
|
2
|
+
*
|
|
3
|
+
*
|
|
4
|
+
*/var stop=function(){0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.deRegisterCbByKey)("LOCATION_UPDATE"),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"stopLocation"}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.stopTrackingLocation())};exports.stop=stop;
|
package/Beacon/index.js
CHANGED
|
@@ -1,30 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initBeaconData = void 0;
|
|
4
|
-
var utills_1 = require("../utills");
|
|
5
|
-
/**
|
|
6
|
-
* Initializes beacon data
|
|
7
|
-
* @param options - Options for initializing beacon data
|
|
8
|
-
*/
|
|
9
|
-
var initBeaconData = function (options) {
|
|
10
|
-
if (options === void 0) { options = {}; }
|
|
11
|
-
var callback = options.callback, beaconData = options.beaconData;
|
|
12
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
13
|
-
(0, utills_1.registerCb)(function (response) {
|
|
14
|
-
var type = response.type;
|
|
15
|
-
if (type === "initBeaconData") {
|
|
16
|
-
callback && callback(response);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
20
|
-
utills_1.webToNative.initBeaconData(JSON.stringify(beaconData));
|
|
21
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
22
|
-
utills_1.webToNativeIos.postMessage({
|
|
23
|
-
action: "initBeaconData",
|
|
24
|
-
data: beaconData
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
exports.initBeaconData = initBeaconData;
|
|
30
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.initBeaconData=void 0;var _utills=require("../utills"),initBeaconData=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback,c=a.beaconData;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"initBeaconData"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.initBeaconData(JSON.stringify(c)),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"initBeaconData",data:c}))};exports.initBeaconData=initBeaconData;
|
package/Biometric/index.js
CHANGED
|
@@ -1,125 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.biometricAuthWithDismissOnCancel = exports.show = exports.deleteSecret = exports.saveSecret = exports.checkStatus = void 0;
|
|
4
|
-
var utills_1 = require("../utills");
|
|
5
|
-
/**
|
|
6
|
-
* Checks the status of biometric authentication
|
|
7
|
-
* @param options - Options for checking biometric status
|
|
8
|
-
*/
|
|
9
|
-
var checkStatus = function (options) {
|
|
10
|
-
if (options === void 0) { options = {}; }
|
|
11
|
-
var callback = options.callback;
|
|
12
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
13
|
-
(0, utills_1.registerCb)(function (response) {
|
|
14
|
-
var type = response.type;
|
|
15
|
-
if (type === "checkBiometricStatus") {
|
|
16
|
-
callback && callback(response);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
20
|
-
utills_1.webToNative.checkBiometricStatus();
|
|
21
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
22
|
-
utills_1.webToNativeIos.postMessage({
|
|
23
|
-
action: "checkBiometricStatus",
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
exports.checkStatus = checkStatus;
|
|
29
|
-
/**
|
|
30
|
-
* Saves a secret using biometric authentication
|
|
31
|
-
* @param options - Options for saving biometric secret
|
|
32
|
-
*/
|
|
33
|
-
var saveSecret = function (options) {
|
|
34
|
-
if (options === void 0) { options = {}; }
|
|
35
|
-
var callback = options.callback, secret = options.secret;
|
|
36
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
37
|
-
(0, utills_1.registerCb)(function (response) {
|
|
38
|
-
var type = response.type;
|
|
39
|
-
if (type === "saveBiometricSecret") {
|
|
40
|
-
callback && callback(response);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
44
|
-
utills_1.webToNative.saveSecret(secret);
|
|
45
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
46
|
-
utills_1.webToNativeIos.postMessage({
|
|
47
|
-
action: "saveBiometricSecret",
|
|
48
|
-
secret: secret
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
exports.saveSecret = saveSecret;
|
|
54
|
-
/**
|
|
55
|
-
* Deletes a saved biometric secret
|
|
56
|
-
* @param options - Options for deleting biometric secret
|
|
57
|
-
*/
|
|
58
|
-
var deleteSecret = function (options) {
|
|
59
|
-
if (options === void 0) { options = {}; }
|
|
60
|
-
var callback = options.callback;
|
|
61
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
62
|
-
(0, utills_1.registerCb)(function (response) {
|
|
63
|
-
var type = response.type;
|
|
64
|
-
if (type === "deleteBiometricSecret") {
|
|
65
|
-
callback && callback(response);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
69
|
-
utills_1.webToNative.deleteSecret();
|
|
70
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
71
|
-
utills_1.webToNativeIos.postMessage({
|
|
72
|
-
action: "deleteBiometricSecret",
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
exports.deleteSecret = deleteSecret;
|
|
78
|
-
/**
|
|
79
|
-
* Shows biometric authentication prompt
|
|
80
|
-
* @param options - Options for showing biometric prompt
|
|
81
|
-
*/
|
|
82
|
-
var show = function (options) {
|
|
83
|
-
if (options === void 0) { options = {}; }
|
|
84
|
-
var callback = options.callback, prompt = options.prompt;
|
|
85
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
86
|
-
(0, utills_1.registerCb)(function (response) {
|
|
87
|
-
var type = response.type;
|
|
88
|
-
if (type === "showBiometric") {
|
|
89
|
-
callback && callback(response);
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
93
|
-
utills_1.webToNative.callBiometric(prompt || "Authenticate to continue!");
|
|
94
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
95
|
-
utills_1.webToNativeIos.postMessage({
|
|
96
|
-
action: "showBiometric",
|
|
97
|
-
prompt: prompt || '',
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
exports.show = show;
|
|
103
|
-
/**
|
|
104
|
-
* Shows biometric authentication with dismiss on cancel (Android only)
|
|
105
|
-
* @param options - Options for biometric authentication with dismiss on cancel
|
|
106
|
-
*/
|
|
107
|
-
var biometricAuthWithDismissOnCancel = function (options) {
|
|
108
|
-
if (options === void 0) { options = {}; }
|
|
109
|
-
var callback = options.callback, prompt = options.prompt, _a = options.isAuthenticationOptional, isAuthenticationOptional = _a === void 0 ? false : _a;
|
|
110
|
-
if (["ANDROID_APP"].includes(utills_1.platform)) {
|
|
111
|
-
(0, utills_1.registerCb)(function (response) {
|
|
112
|
-
var type = response.type;
|
|
113
|
-
if (type === "biometricAuthWithDismissOnCancel") {
|
|
114
|
-
callback && callback(response);
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
118
|
-
utills_1.webToNative.biometricAuthWithDismissOnCancel(JSON.stringify({
|
|
119
|
-
prompt: prompt || "Authenticate to continue!",
|
|
120
|
-
isAuthenticationOptional: isAuthenticationOptional
|
|
121
|
-
}));
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
exports.biometricAuthWithDismissOnCancel = biometricAuthWithDismissOnCancel;
|
|
125
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.show=exports.saveSecret=exports.deleteSecret=exports.checkStatus=exports.biometricAuthWithDismissOnCancel=void 0;var _utills=require("../utills"),checkStatus=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"checkBiometricStatus"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.checkBiometricStatus(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"checkBiometricStatus"}))};exports.checkStatus=checkStatus;var saveSecret=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback,c=a.secret;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"saveBiometricSecret"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.saveSecret(c),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"saveBiometricSecret",secret:c}))};exports.saveSecret=saveSecret;var deleteSecret=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"deleteBiometricSecret"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.deleteSecret(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"deleteBiometricSecret"}))};exports.deleteSecret=deleteSecret;var show=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback,c=a.prompt;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"showBiometric"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.callBiometric(c||"Authenticate to continue!"),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"showBiometric",prompt:c||""}))};exports.show=show;var biometricAuthWithDismissOnCancel=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback,c=a.prompt,d=a.isAuthenticationOptional;["ANDROID_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"biometricAuthWithDismissOnCancel"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.biometricAuthWithDismissOnCancel(JSON.stringify({prompt:c||"Authenticate to continue!",isAuthenticationOptional:void 0!==d&&d})))};exports.biometricAuthWithDismissOnCancel=biometricAuthWithDismissOnCancel;
|
package/Bluetooth/index.js
CHANGED
|
@@ -1,67 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.unpairDevice = exports.pairDevice = exports.startBluetoothScan = void 0;
|
|
4
|
-
var utills_1 = require("../utills");
|
|
5
|
-
/**
|
|
6
|
-
* Starts scanning for Bluetooth devices (Android only)
|
|
7
|
-
* @param options - Options for Bluetooth scanning
|
|
8
|
-
*/
|
|
9
|
-
var startBluetoothScan = function (options) {
|
|
10
|
-
if (options === void 0) { options = {}; }
|
|
11
|
-
var callback = options.callback;
|
|
12
|
-
if (["ANDROID_APP"].includes(utills_1.platform)) {
|
|
13
|
-
(0, utills_1.registerCb)(function (response) {
|
|
14
|
-
var type = response.type;
|
|
15
|
-
if (type === "startBluetoothScan") {
|
|
16
|
-
callback && callback(response);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
20
|
-
utills_1.webToNative.startBluetoothScan();
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
exports.startBluetoothScan = startBluetoothScan;
|
|
24
|
-
/**
|
|
25
|
-
* Pairs with a Bluetooth device (Android only)
|
|
26
|
-
* @param options - Options for pairing with a Bluetooth device
|
|
27
|
-
*/
|
|
28
|
-
var pairDevice = function (options) {
|
|
29
|
-
if (options === void 0) { options = {}; }
|
|
30
|
-
var callback = options.callback, address = options.address, _a = options.timeout, timeout = _a === void 0 ? 10 : _a;
|
|
31
|
-
if (["ANDROID_APP"].includes(utills_1.platform)) {
|
|
32
|
-
(0, utills_1.registerCb)(function (response) {
|
|
33
|
-
var type = response.type;
|
|
34
|
-
if (type === "pairWithDevice") {
|
|
35
|
-
callback && callback(response);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
39
|
-
utills_1.webToNative.pairWithDevice(JSON.stringify({
|
|
40
|
-
address: address,
|
|
41
|
-
timeout: timeout
|
|
42
|
-
}));
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
exports.pairDevice = pairDevice;
|
|
46
|
-
/**
|
|
47
|
-
* Unpairs from a Bluetooth device (Android only)
|
|
48
|
-
* @param options - Options for unpairing from a Bluetooth device
|
|
49
|
-
*/
|
|
50
|
-
var unpairDevice = function (options) {
|
|
51
|
-
if (options === void 0) { options = {}; }
|
|
52
|
-
var callback = options.callback, address = options.address;
|
|
53
|
-
if (["ANDROID_APP"].includes(utills_1.platform)) {
|
|
54
|
-
(0, utills_1.registerCb)(function (response) {
|
|
55
|
-
var type = response.type;
|
|
56
|
-
if (type === "unpairDevice") {
|
|
57
|
-
callback && callback(response);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
61
|
-
utills_1.webToNative.unpairDevice(JSON.stringify({
|
|
62
|
-
address: address
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
exports.unpairDevice = unpairDevice;
|
|
67
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.unpairDevice=exports.startBluetoothScan=exports.pairDevice=void 0;var _utills=require("../utills"),startBluetoothScan=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["ANDROID_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"startBluetoothScan"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.startBluetoothScan())};exports.startBluetoothScan=startBluetoothScan;var pairDevice=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback,c=a.address,d=a.timeout,e=void 0===d?10:d;["ANDROID_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"pairWithDevice"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.pairWithDevice(JSON.stringify({address:c,timeout:e})))};exports.pairDevice=pairDevice;var unpairDevice=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback,c=a.address;["ANDROID_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"unpairDevice"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.unpairDevice(JSON.stringify({address:c})))};exports.unpairDevice=unpairDevice;
|
|
@@ -1,41 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
/**
|
|
6
|
-
* Hides the bottom navigation
|
|
7
|
-
*/
|
|
8
|
-
var hide = function () {
|
|
9
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
10
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
11
|
-
utills_1.webToNative.showHideStickyFooter(false);
|
|
12
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
13
|
-
utills_1.webToNativeIos.postMessage({
|
|
14
|
-
action: "showHideStickyFooter",
|
|
15
|
-
show: false,
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
exports.hide = hide;
|
|
21
|
-
/**
|
|
22
|
-
* Shows the bottom navigation
|
|
23
|
-
* @param options - Options for showing bottom navigation
|
|
24
|
-
*/
|
|
25
|
-
var show = function (options) {
|
|
26
|
-
if (options === void 0) { options = {}; }
|
|
27
|
-
var key = options.key;
|
|
28
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
29
|
-
utills_1.platform === "ANDROID_APP" &&
|
|
30
|
-
utills_1.webToNative.showHideStickyFooter(true);
|
|
31
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
32
|
-
utills_1.webToNativeIos.postMessage({
|
|
33
|
-
action: "showHideStickyFooter",
|
|
34
|
-
show: true,
|
|
35
|
-
key: key,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
exports.show = show;
|
|
41
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.show=exports.hide=void 0;var _utills=require("../utills"),hide=function(){["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&("ANDROID_APP"===_utills.platform&&_utills.webToNative.showHideStickyFooter(!1),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"showHideStickyFooter",show:!1}))};exports.hide=hide;/**
|
|
2
|
+
*
|
|
3
|
+
*
|
|
4
|
+
*/var show=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.key;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&("ANDROID_APP"===_utills.platform&&_utills.webToNative.showHideStickyFooter(!0),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"showHideStickyFooter",show:!0,key:b}))};exports.show=show;
|
package/Clipboard/index.js
CHANGED
|
@@ -1,45 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
/**
|
|
6
|
-
* Gets content from clipboard
|
|
7
|
-
* @param options - Options for getting clipboard content
|
|
8
|
-
*/
|
|
9
|
-
var get = function (options) {
|
|
10
|
-
if (options === void 0) { options = {}; }
|
|
11
|
-
var callback = options.callback;
|
|
12
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
13
|
-
(0, utills_1.registerCb)(function (response) {
|
|
14
|
-
var type = response.type;
|
|
15
|
-
if (type === "CLIPBOARD_CONTENT") {
|
|
16
|
-
callback && callback(response);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
20
|
-
utills_1.webToNativeIos.postMessage({
|
|
21
|
-
action: "getClipBoardData",
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
utills_1.platform === "ANDROID_APP" && utills_1.webToNative.getText();
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.get = get;
|
|
28
|
-
/**
|
|
29
|
-
* Sets content to clipboard
|
|
30
|
-
* @param options - Options for setting clipboard content
|
|
31
|
-
*/
|
|
32
|
-
var set = function (options) {
|
|
33
|
-
if (options === void 0) { options = {}; }
|
|
34
|
-
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
35
|
-
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
36
|
-
utills_1.webToNativeIos.postMessage({
|
|
37
|
-
action: "setClipBoardData",
|
|
38
|
-
text: options.data || "",
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
utills_1.platform === "ANDROID_APP" && utills_1.webToNative.setText(options.data || "");
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.set = set;
|
|
45
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.set=exports.get=void 0;var _utills=require("../utills"),get=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"CLIPBOARD_CONTENT"===c&&b&&b(a)}),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"getClipBoardData"}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.getText())};exports.get=get;/**
|
|
2
|
+
*
|
|
3
|
+
*
|
|
4
|
+
*/var set=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&("IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"setClipBoardData",text:a.data||""}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.setText(a.data||""))};exports.set=set;
|