webtonative 1.0.74 → 1.0.75-beta.2
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/.editorconfig +10 -0
- package/.prettierrc.json +7 -0
- package/README.md +31 -2
- package/build/ATTConsent/index.d.ts +17 -0
- package/build/ATTConsent/index.d.ts.map +1 -0
- package/build/ATTConsent/index.js +54 -0
- package/build/ATTConsent/index.js.map +1 -0
- package/build/ATTConsent/types.d.ts +15 -0
- package/build/ATTConsent/types.d.ts.map +1 -0
- package/build/ATTConsent/types.js +3 -0
- package/build/ATTConsent/types.js.map +1 -0
- package/build/AdMob/index.d.ts +31 -0
- package/build/AdMob/index.d.ts.map +1 -0
- package/build/AdMob/index.js +102 -0
- package/build/AdMob/index.js.map +1 -0
- package/build/AdMob/types.d.ts +25 -0
- package/build/AdMob/types.d.ts.map +1 -0
- package/build/AdMob/types.js +4 -0
- package/build/AdMob/types.js.map +1 -0
- package/build/AppReview/index.d.ts +7 -0
- package/build/AppReview/index.d.ts.map +1 -0
- package/build/AppReview/index.js +22 -0
- package/build/AppReview/index.js.map +1 -0
- package/build/AppReview/types.d.ts +8 -0
- package/build/AppReview/types.d.ts.map +1 -0
- package/build/AppReview/types.js +4 -0
- package/build/AppReview/types.js.map +1 -0
- package/build/AppsFlyer/index.d.ts +15 -0
- package/build/AppsFlyer/index.d.ts.map +1 -0
- package/build/AppsFlyer/index.js +43 -0
- package/build/AppsFlyer/index.js.map +1 -0
- package/build/AppsFlyer/types.d.ts +10 -0
- package/build/AppsFlyer/types.d.ts.map +1 -0
- package/build/AppsFlyer/types.js +3 -0
- package/build/AppsFlyer/types.js.map +1 -0
- package/build/BackgroundLocation/index.d.ts +12 -0
- package/build/BackgroundLocation/index.d.ts.map +1 -0
- package/build/BackgroundLocation/index.js +65 -0
- package/build/BackgroundLocation/index.js.map +1 -0
- package/build/BackgroundLocation/types.d.ts +32 -0
- package/build/BackgroundLocation/types.d.ts.map +1 -0
- package/build/BackgroundLocation/types.js +3 -0
- package/build/BackgroundLocation/types.js.map +1 -0
- package/build/Beacon/index.d.ts +7 -0
- package/build/Beacon/index.d.ts.map +1 -0
- package/build/Beacon/index.js +30 -0
- package/build/Beacon/index.js.map +1 -0
- package/build/Beacon/types.d.ts +19 -0
- package/build/Beacon/types.d.ts.map +1 -0
- package/build/Beacon/types.js +3 -0
- package/build/Beacon/types.js.map +1 -0
- package/build/Biometric/index.d.ts +27 -0
- package/build/Biometric/index.d.ts.map +1 -0
- package/build/Biometric/index.js +125 -0
- package/build/Biometric/index.js.map +1 -0
- package/build/Biometric/types.d.ts +24 -0
- package/build/Biometric/types.d.ts.map +1 -0
- package/build/Biometric/types.js +3 -0
- package/build/Biometric/types.js.map +1 -0
- package/build/Bluetooth/index.d.ts +17 -0
- package/build/Bluetooth/index.d.ts.map +1 -0
- package/build/Bluetooth/index.js +67 -0
- package/build/Bluetooth/index.js.map +1 -0
- package/build/Bluetooth/types.d.ts +34 -0
- package/build/Bluetooth/types.d.ts.map +1 -0
- package/build/Bluetooth/types.js +3 -0
- package/build/Bluetooth/types.js.map +1 -0
- package/build/BottomNavigation/index.d.ts +11 -0
- package/build/BottomNavigation/index.d.ts.map +1 -0
- package/build/BottomNavigation/index.js +41 -0
- package/build/BottomNavigation/index.js.map +1 -0
- package/build/BottomNavigation/types.d.ts +9 -0
- package/build/BottomNavigation/types.d.ts.map +1 -0
- package/build/BottomNavigation/types.js +3 -0
- package/build/BottomNavigation/types.js.map +1 -0
- package/build/Clipboard/index.d.ts +12 -0
- package/build/Clipboard/index.d.ts.map +1 -0
- package/build/Clipboard/index.js +45 -0
- package/build/Clipboard/index.js.map +1 -0
- package/build/Clipboard/types.d.ts +20 -0
- package/build/Clipboard/types.d.ts.map +1 -0
- package/build/Clipboard/types.js +4 -0
- package/build/Clipboard/types.js.map +1 -0
- package/build/Facebook/events.d.ts +13 -0
- package/build/Facebook/events.d.ts.map +1 -0
- package/build/Facebook/events.js +44 -0
- package/build/Facebook/events.js.map +1 -0
- package/build/Facebook/index.d.ts +3 -0
- package/build/Facebook/index.d.ts.map +1 -0
- package/build/Facebook/index.js +29 -0
- package/build/Facebook/index.js.map +1 -0
- package/build/Facebook/types.d.ts +22 -0
- package/build/Facebook/types.d.ts.map +1 -0
- package/build/Facebook/types.js +3 -0
- package/build/Facebook/types.js.map +1 -0
- package/build/Firebase/Analytics/index.d.ts +32 -0
- package/build/Firebase/Analytics/index.d.ts.map +1 -0
- package/build/Firebase/Analytics/index.js +110 -0
- package/build/Firebase/Analytics/index.js.map +1 -0
- package/build/Firebase/Messaging/index.d.ts +17 -0
- package/build/Firebase/Messaging/index.d.ts.map +1 -0
- package/build/Firebase/Messaging/index.js +64 -0
- package/build/Firebase/Messaging/index.js.map +1 -0
- package/build/Firebase/index.d.ts +4 -0
- package/build/Firebase/index.d.ts.map +1 -0
- package/build/Firebase/index.js +31 -0
- package/build/Firebase/index.js.map +1 -0
- package/build/Firebase/types.d.ts +58 -0
- package/build/Firebase/types.d.ts.map +1 -0
- package/build/Firebase/types.js +4 -0
- package/build/Firebase/types.js.map +1 -0
- package/build/FirebaseAnalytics/index.d.ts +3 -0
- package/build/FirebaseAnalytics/index.d.ts.map +1 -0
- package/build/FirebaseAnalytics/index.js +29 -0
- package/build/FirebaseAnalytics/index.js.map +1 -0
- package/build/Haptics/index.d.ts +7 -0
- package/build/Haptics/index.d.ts.map +1 -0
- package/build/Haptics/index.js +21 -0
- package/build/Haptics/index.js.map +1 -0
- package/build/Haptics/types.d.ts +8 -0
- package/build/Haptics/types.d.ts.map +1 -0
- package/build/Haptics/types.js +3 -0
- package/build/Haptics/types.js.map +1 -0
- package/build/InAppPurchase/index.d.ts +23 -0
- package/build/InAppPurchase/index.d.ts.map +1 -0
- package/build/InAppPurchase/index.js +81 -0
- package/build/InAppPurchase/index.js.map +1 -0
- package/build/InAppPurchase/types.d.ts +30 -0
- package/build/InAppPurchase/types.d.ts.map +1 -0
- package/build/InAppPurchase/types.js +3 -0
- package/build/InAppPurchase/types.js.map +1 -0
- package/build/InAppUpdate/index.d.ts +12 -0
- package/build/InAppUpdate/index.d.ts.map +1 -0
- package/build/InAppUpdate/index.js +39 -0
- package/build/InAppUpdate/index.js.map +1 -0
- package/build/InAppUpdate/types.d.ts +15 -0
- package/build/InAppUpdate/types.d.ts.map +1 -0
- package/build/InAppUpdate/types.js +3 -0
- package/build/InAppUpdate/types.js.map +1 -0
- package/build/MediaPlayer/index.d.ts +17 -0
- package/build/MediaPlayer/index.d.ts.map +1 -0
- package/build/MediaPlayer/index.js +56 -0
- package/build/MediaPlayer/index.js.map +1 -0
- package/build/MediaPlayer/types.d.ts +14 -0
- package/build/MediaPlayer/types.d.ts.map +1 -0
- package/build/MediaPlayer/types.js +3 -0
- package/build/MediaPlayer/types.js.map +1 -0
- package/build/NativeContacts/index.d.ts +12 -0
- package/build/NativeContacts/index.d.ts.map +1 -0
- package/build/NativeContacts/index.js +51 -0
- package/build/NativeContacts/index.js.map +1 -0
- package/build/NativeContacts/types.d.ts +14 -0
- package/build/NativeContacts/types.d.ts.map +1 -0
- package/build/NativeContacts/types.js +3 -0
- package/build/NativeContacts/types.js.map +1 -0
- package/build/Notification/index.d.ts +11 -0
- package/build/Notification/index.d.ts.map +1 -0
- package/build/Notification/index.js +42 -0
- package/build/Notification/index.js.map +1 -0
- package/build/Notification/types.d.ts +14 -0
- package/build/Notification/types.d.ts.map +1 -0
- package/build/Notification/types.js +3 -0
- package/build/Notification/types.js.map +1 -0
- package/build/OneSignal/index.d.ts +4 -0
- package/build/OneSignal/index.d.ts.map +1 -0
- package/build/OneSignal/index.js +59 -0
- package/build/OneSignal/index.js.map +1 -0
- package/build/OneSignal/types.d.ts +11 -0
- package/build/OneSignal/types.d.ts.map +1 -0
- package/build/OneSignal/types.js +4 -0
- package/build/OneSignal/types.js.map +1 -0
- package/build/Printing/index.d.ts +7 -0
- package/build/Printing/index.d.ts.map +1 -0
- package/build/Printing/index.js +20 -0
- package/build/Printing/index.js.map +1 -0
- package/build/Printing/types.d.ts +9 -0
- package/build/Printing/types.d.ts.map +1 -0
- package/build/Printing/types.js +3 -0
- package/build/Printing/types.js.map +1 -0
- package/build/README.md +33 -0
- package/build/Screen/index.d.ts +9 -0
- package/build/Screen/index.d.ts.map +1 -0
- package/build/Screen/index.js +35 -0
- package/build/Screen/index.js.map +1 -0
- package/build/Screen/types.d.ts +6 -0
- package/build/Screen/types.d.ts.map +1 -0
- package/build/Screen/types.js +4 -0
- package/build/Screen/types.js.map +1 -0
- package/build/Siri/index.d.ts +7 -0
- package/build/Siri/index.d.ts.map +1 -0
- package/build/Siri/index.js +26 -0
- package/build/Siri/index.js.map +1 -0
- package/build/Siri/types.d.ts +14 -0
- package/build/Siri/types.d.ts.map +1 -0
- package/build/Siri/types.js +3 -0
- package/build/Siri/types.js.map +1 -0
- package/build/SocialLogin/apple.d.ts +12 -0
- package/build/SocialLogin/apple.d.ts.map +1 -0
- package/build/SocialLogin/apple.js +32 -0
- package/build/SocialLogin/apple.js.map +1 -0
- package/build/SocialLogin/facebook.d.ts +22 -0
- package/build/SocialLogin/facebook.d.ts.map +1 -0
- package/build/SocialLogin/facebook.js +61 -0
- package/build/SocialLogin/facebook.js.map +1 -0
- package/build/SocialLogin/google.d.ts +22 -0
- package/build/SocialLogin/google.d.ts.map +1 -0
- package/build/SocialLogin/google.js +61 -0
- package/build/SocialLogin/google.js.map +1 -0
- package/build/SocialLogin/index.d.ts +17 -0
- package/build/SocialLogin/index.d.ts.map +1 -0
- package/build/SocialLogin/index.js +23 -0
- package/build/SocialLogin/index.js.map +1 -0
- package/build/SocialLogin/types.d.ts +39 -0
- package/build/SocialLogin/types.d.ts.map +1 -0
- package/build/SocialLogin/types.js +3 -0
- package/build/SocialLogin/types.js.map +1 -0
- package/build/Stripe/index.d.ts +3 -0
- package/build/Stripe/index.d.ts.map +1 -0
- package/build/Stripe/index.js +49 -0
- package/build/Stripe/index.js.map +1 -0
- package/build/Stripe/types.d.ts +32 -0
- package/build/Stripe/types.d.ts.map +1 -0
- package/build/Stripe/types.js +3 -0
- package/build/Stripe/types.js.map +1 -0
- package/build/VoiceSearch/index.d.ts +13 -0
- package/build/VoiceSearch/index.d.ts.map +1 -0
- package/build/VoiceSearch/index.js +34 -0
- package/build/VoiceSearch/index.js.map +1 -0
- package/build/VoiceSearch/types.d.ts +10 -0
- package/build/VoiceSearch/types.d.ts.map +1 -0
- package/build/VoiceSearch/types.js +3 -0
- package/build/VoiceSearch/types.js.map +1 -0
- package/build/barcode/barcode-scan.d.ts +16 -0
- package/build/barcode/barcode-scan.d.ts.map +1 -0
- package/build/barcode/barcode-scan.js +40 -0
- package/build/barcode/barcode-scan.js.map +1 -0
- package/build/barcode/barcode-types.d.ts +18 -0
- package/build/barcode/barcode-types.d.ts.map +1 -0
- package/build/barcode/barcode-types.js +3 -0
- package/build/barcode/barcode-types.js.map +1 -0
- package/build/barcode/formats.d.ts +18 -0
- package/build/barcode/formats.d.ts.map +1 -0
- package/build/barcode/formats.js +23 -0
- package/build/barcode/formats.js.map +1 -0
- package/build/barcode/index.d.ts +5 -0
- package/build/barcode/index.d.ts.map +1 -0
- package/build/barcode/index.js +13 -0
- package/build/barcode/index.js.map +1 -0
- package/build/barcode/types.d.ts +17 -0
- package/build/barcode/types.d.ts.map +1 -0
- package/build/barcode/types.js +22 -0
- package/build/barcode/types.js.map +1 -0
- package/build/index.d.ts +15 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +110 -0
- package/build/index.js.map +1 -0
- package/build/package.json +155 -0
- package/build/types/index.d.ts +49 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/index.js +4 -0
- package/build/types/index.js.map +1 -0
- package/build/utills.d.ts +12 -0
- package/build/utills.d.ts.map +1 -0
- package/build/utills.js +111 -0
- package/build/utills.js.map +1 -0
- package/build/webtonative.min.js +1 -0
- package/buildScript.ts +35 -0
- package/client.ts +106 -0
- package/index.d.ts +65 -0
- package/package.json +36 -31
- package/src/ATTConsent/index.ts +51 -0
- package/src/ATTConsent/types.ts +17 -0
- package/src/AdMob/index.ts +113 -0
- package/src/AdMob/types.ts +37 -0
- package/src/AppReview/index.ts +19 -0
- package/src/AppReview/types.ts +12 -0
- package/src/AppsFlyer/index.ts +46 -0
- package/src/AppsFlyer/types.ts +10 -0
- package/src/BackgroundLocation/index.ts +78 -0
- package/src/BackgroundLocation/types.ts +34 -0
- package/src/Beacon/index.ts +28 -0
- package/src/Beacon/types.ts +22 -0
- package/src/Biometric/index.ts +126 -0
- package/src/Biometric/types.ts +27 -0
- package/src/Bluetooth/index.ts +71 -0
- package/src/Bluetooth/types.ts +40 -0
- package/src/BottomNavigation/index.ts +39 -0
- package/src/BottomNavigation/types.ts +9 -0
- package/src/Clipboard/index.ts +48 -0
- package/src/Clipboard/types.ts +30 -0
- package/src/Facebook/events.ts +45 -0
- package/src/Facebook/index.ts +3 -0
- package/src/Facebook/types.ts +24 -0
- package/src/Firebase/Analytics/index.ts +127 -0
- package/src/Firebase/Messaging/index.ts +73 -0
- package/src/Firebase/index.ts +4 -0
- package/src/Firebase/types.ts +74 -0
- package/src/FirebaseAnalytics/index.ts +3 -0
- package/src/Haptics/index.ts +17 -0
- package/src/Haptics/types.ts +8 -0
- package/src/InAppPurchase/index.ts +92 -0
- package/src/InAppPurchase/types.ts +35 -0
- package/src/InAppUpdate/index.ts +40 -0
- package/src/InAppUpdate/types.ts +17 -0
- package/src/MediaPlayer/index.ts +56 -0
- package/src/MediaPlayer/types.ts +15 -0
- package/src/NativeContacts/index.ts +50 -0
- package/src/NativeContacts/types.ts +16 -0
- package/src/Notification/index.ts +41 -0
- package/src/Notification/types.ts +16 -0
- package/src/OneSignal/index.ts +54 -0
- package/src/OneSignal/types.ts +15 -0
- package/src/Printing/index.ts +17 -0
- package/src/Printing/types.ts +9 -0
- package/src/Screen/index.ts +34 -0
- package/src/Screen/types.ts +8 -0
- package/src/Siri/index.ts +23 -0
- package/src/Siri/types.ts +14 -0
- package/src/SocialLogin/apple.ts +31 -0
- package/src/SocialLogin/facebook.ts +64 -0
- package/src/SocialLogin/google.ts +64 -0
- package/src/SocialLogin/index.ts +20 -0
- package/src/SocialLogin/types.ts +52 -0
- package/src/Stripe/index.ts +54 -0
- package/src/Stripe/types.ts +37 -0
- package/src/VoiceSearch/index.ts +37 -0
- package/src/VoiceSearch/types.ts +12 -0
- package/src/barcode/barcode-scan.ts +59 -0
- package/src/barcode/barcode-types.ts +22 -0
- package/src/barcode/formats.ts +19 -0
- package/src/barcode/index.ts +5 -0
- package/src/barcode/types.ts +18 -0
- package/src/index.ts +105 -0
- package/src/types/index.ts +71 -0
- package/src/utills.ts +110 -0
- package/tsconfig.json +27 -0
- package/webpack.config.js +57 -0
- package/ATTConsent/index.js +0 -1
- package/AdMob/index.js +0 -1
- package/AppReview/index.js +0 -1
- package/AppsFlyer/index.js +0 -4
- package/BackgroundLocation/index.js +0 -4
- package/Beacon/index.js +0 -1
- package/Biometric/index.js +0 -1
- package/Bluetooth/index.js +0 -1
- package/BottomNavigation/index.js +0 -4
- package/Clipboard/index.js +0 -4
- package/Facebook/events.js +0 -4
- package/Facebook/index.js +0 -1
- package/Firebase/Analytics/index.js +0 -4
- package/Firebase/Messaging/index.js +0 -4
- package/Firebase/index.js +0 -1
- package/FirebaseAnalytics/index.js +0 -1
- package/Haptics/index.js +0 -1
- package/InAppPurchase/index.js +0 -1
- package/InAppUpdate/index.js +0 -1
- package/MediaPlayer/index.js +0 -7
- package/NativeContacts/index.js +0 -6
- package/Notification/index.js +0 -5
- package/OneSignal/index.js +0 -1
- package/Printing/index.js +0 -1
- package/Screen/index.js +0 -4
- package/Siri/index.js +0 -1
- package/SocialLogin/apple.js +0 -1
- package/SocialLogin/facebook.js +0 -9
- package/SocialLogin/google.js +0 -9
- package/SocialLogin/index.js +0 -1
- package/Stripe/index.js +0 -1
- package/VoiceSearch/index.js +0 -1
- package/barcode/barcode-scan.js +0 -1
- package/barcode/formats.js +0 -1
- package/barcode/index.js +0 -1
- package/barcode/types.js +0 -1
- package/index.js +0 -4
- package/utills.js +0 -1
- package/webtonative.min.js +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.makeTapToPay = void 0;
|
|
15
|
+
var utills_1 = require("../utills");
|
|
16
|
+
var makeTapToPay = function (options) {
|
|
17
|
+
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
18
|
+
var callback_1 = options.callback, _a = options.apiUrl, apiUrl = _a === void 0 ? null : _a, amount = options.amount, currency = options.currency, _b = options.isSimulated, isSimulated = _b === void 0 ? false : _b, _c = options.captureMethod, captureMethod = _c === void 0 ? "automatic" : _c, connectionToken = options.connectionToken, stripeLocationId = options.stripeLocationId, _d = options.clientSecret, clientSecret = _d === void 0 ? null : _d;
|
|
19
|
+
(0, utills_1.registerCb)(function (response) {
|
|
20
|
+
var type = response.type;
|
|
21
|
+
if (type === "makeTapToPayStripePayment") {
|
|
22
|
+
callback_1 && callback_1(response);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
var paymentData = {
|
|
26
|
+
secretToken: connectionToken,
|
|
27
|
+
amount: amount,
|
|
28
|
+
currency: currency,
|
|
29
|
+
isSimulated: isSimulated,
|
|
30
|
+
captureMethod: captureMethod,
|
|
31
|
+
locationId: stripeLocationId
|
|
32
|
+
};
|
|
33
|
+
if (apiUrl) {
|
|
34
|
+
paymentData.apiUrl = apiUrl;
|
|
35
|
+
}
|
|
36
|
+
if (clientSecret) {
|
|
37
|
+
paymentData.client_secret = clientSecret;
|
|
38
|
+
}
|
|
39
|
+
if (utills_1.platform === "ANDROID_APP") {
|
|
40
|
+
utills_1.webToNative.makeTapToPayStripePayment(JSON.stringify(paymentData));
|
|
41
|
+
}
|
|
42
|
+
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
43
|
+
var iosMessage = __assign({ "action": "makeTapToPayStripePayment" }, paymentData);
|
|
44
|
+
utills_1.webToNativeIos.postMessage(iosMessage);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
exports.makeTapToPay = makeTapToPay;
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Stripe/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,oCAA8E;AAGvE,IAAM,YAAY,GAAG,UAAC,OAAsB;IAC/C,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,iBAAQ,CAAC,EAAE;QAE3C,IAAA,UAAQ,GASR,OAAO,SATC,EACR,KAQA,OAAO,OARM,EAAb,MAAM,mBAAG,IAAI,KAAA,EACb,MAAM,GAON,OAAO,OAPD,EACN,QAAQ,GAMR,OAAO,SANC,EACR,KAKA,OAAO,YALY,EAAnB,WAAW,mBAAG,KAAK,KAAA,EACnB,KAIA,OAAO,cAJoB,EAA3B,aAAa,mBAAG,WAAW,KAAA,EAC3B,eAAe,GAGf,OAAO,gBAHQ,EACf,gBAAgB,GAEhB,OAAO,iBAFS,EAChB,KACA,OAAO,aADY,EAAnB,YAAY,mBAAG,IAAI,KAAA,CACX;QAEZ,IAAA,mBAAU,EAAC,UAAC,QAAQ;YACR,IAAA,IAAI,GAAK,QAAQ,KAAb,CAAc;YAC1B,IAAI,IAAI,KAAK,2BAA2B,EAAE;gBACtC,UAAQ,IAAI,UAAQ,CAAC,QAAQ,CAAC,CAAC;aAClC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,WAAW,GAAsB;YACjC,WAAW,EAAE,eAAe;YAC5B,MAAM,QAAA;YACN,QAAQ,UAAA;YACR,WAAW,aAAA;YACX,aAAa,eAAA;YACb,UAAU,EAAE,gBAAgB;SAC/B,CAAC;QAEF,IAAI,MAAM,EAAE;YACR,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;SAC/B;QAED,IAAI,YAAY,EAAE;YACd,WAAW,CAAC,aAAa,GAAG,YAAY,CAAC;SAC5C;QAED,IAAI,iBAAQ,KAAK,aAAa,EAAE;YAC5B,oBAAW,CAAC,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;SACtE;QAED,IAAI,iBAAQ,KAAK,SAAS,IAAI,uBAAc,EAAE;YAC1C,IAAM,UAAU,cACZ,QAAQ,EAAE,2BAA2B,IAClC,WAAW,CACjB,CAAC;YACF,uBAAc,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;SAC1C;KACJ;AACL,CAAC,CAAC;AAlDW,QAAA,YAAY,gBAkDvB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseCallback, BaseResponse } from "../types";
|
|
2
|
+
export interface StripeResponse extends BaseResponse {
|
|
3
|
+
type: "makeTapToPayStripePayment";
|
|
4
|
+
}
|
|
5
|
+
export interface StripeCallback extends BaseCallback {
|
|
6
|
+
(response: StripeResponse): void;
|
|
7
|
+
}
|
|
8
|
+
export interface StripePaymentData {
|
|
9
|
+
secretToken: string;
|
|
10
|
+
amount: number;
|
|
11
|
+
currency: string;
|
|
12
|
+
isSimulated: boolean;
|
|
13
|
+
captureMethod: string;
|
|
14
|
+
locationId: string;
|
|
15
|
+
apiUrl?: string;
|
|
16
|
+
client_secret?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface StripeOptions {
|
|
19
|
+
callback?: StripeCallback;
|
|
20
|
+
apiUrl?: string;
|
|
21
|
+
amount: number;
|
|
22
|
+
currency: string;
|
|
23
|
+
isSimulated?: boolean;
|
|
24
|
+
captureMethod?: string;
|
|
25
|
+
connectionToken: string;
|
|
26
|
+
stripeLocationId: string;
|
|
27
|
+
clientSecret?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface StripeIosMessage extends StripePaymentData {
|
|
30
|
+
action: string;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/Stripe/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD,IAAI,EAAE,2BAA2B,CAAC;CAEnC;AAED,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/Stripe/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VoiceSearchOptions } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* This function opens native voice search
|
|
4
|
+
* @param options Configuration options for voice search
|
|
5
|
+
* @example wtn.openVoiceSearch({
|
|
6
|
+
* onVoiceSearch:(value)=>{
|
|
7
|
+
* console.log(value);
|
|
8
|
+
* }
|
|
9
|
+
* });
|
|
10
|
+
*/
|
|
11
|
+
declare const openVoiceSearch: (options?: VoiceSearchOptions) => any;
|
|
12
|
+
export default openVoiceSearch;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/VoiceSearch/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAA4C,MAAM,SAAS,CAAC;AAIvF;;;;;;;;GAQG;AACH,QAAA,MAAM,eAAe,aAAa,kBAAkB,KAAQ,GAoB3D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _this = this;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
var utills_1 = require("../utills");
|
|
5
|
+
var voiceSearchCb = null;
|
|
6
|
+
/**
|
|
7
|
+
* This function opens native voice search
|
|
8
|
+
* @param options Configuration options for voice search
|
|
9
|
+
* @example wtn.openVoiceSearch({
|
|
10
|
+
* onVoiceSearch:(value)=>{
|
|
11
|
+
* console.log(value);
|
|
12
|
+
* }
|
|
13
|
+
* });
|
|
14
|
+
*/
|
|
15
|
+
var openVoiceSearch = function (options) {
|
|
16
|
+
if (options === void 0) { options = {}; }
|
|
17
|
+
var onVoiceSearch = options.onVoiceSearch;
|
|
18
|
+
(0, utills_1.registerCb)(function (response) {
|
|
19
|
+
var _a = response, type = _a.type, results = _a.results;
|
|
20
|
+
if (type === "VOICE_SEARCH_RESULT") {
|
|
21
|
+
voiceSearchCb && voiceSearchCb(results);
|
|
22
|
+
voiceSearchCb = null;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
if (utills_1.isNativeApp) {
|
|
26
|
+
utills_1.webToNative.openVoiceSearch();
|
|
27
|
+
}
|
|
28
|
+
if (typeof onVoiceSearch === "function") {
|
|
29
|
+
voiceSearchCb = onVoiceSearch;
|
|
30
|
+
}
|
|
31
|
+
return _this;
|
|
32
|
+
};
|
|
33
|
+
exports.default = openVoiceSearch;
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/VoiceSearch/index.ts"],"names":[],"mappings":";AAAA,iBAoC+B;;AApC/B,oCAAiE;AAGjE,IAAI,aAAa,GAA+B,IAAI,CAAC;AAErD;;;;;;;;GAQG;AACH,IAAM,eAAe,GAAG,UAAC,OAAgC;IAAhC,wBAAA,EAAA,YAAgC;IAC/C,IAAA,aAAa,GAAK,OAAO,cAAZ,CAAa;IAElC,IAAA,mBAAU,EAAC,UAAC,QAAQ;QACZ,IAAA,KAAoB,QAA+B,EAAjD,IAAI,UAAA,EAAE,OAAO,aAAoC,CAAC;QAC1D,IAAI,IAAI,KAAK,qBAAqB,EAAE;YAClC,aAAa,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;YACxC,aAAa,GAAG,IAAI,CAAC;SACtB;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,oBAAW,EAAE;QACf,oBAAW,CAAC,eAAe,EAAE,CAAC;KAC/B;IAED,IAAI,OAAO,aAAa,KAAK,UAAU,EAAE;QACvC,aAAa,GAAG,aAAa,CAAC;KAC/B;IAED,OAAO,KAAI,CAAC;AACd,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseResponse } from "../types";
|
|
2
|
+
export interface VoiceSearchResponse extends BaseResponse {
|
|
3
|
+
type: "VOICE_SEARCH_RESULT";
|
|
4
|
+
results: string;
|
|
5
|
+
}
|
|
6
|
+
export type VoiceSearchCallback = (results: string) => void;
|
|
7
|
+
export interface VoiceSearchOptions {
|
|
8
|
+
onVoiceSearch?: VoiceSearchCallback;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/VoiceSearch/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/VoiceSearch/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface BarcodeScanOptions {
|
|
2
|
+
onBarcodeSearch?: (value: string) => void;
|
|
3
|
+
format?: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* This function opens native barcode scanner from Android/Ios app.
|
|
7
|
+
* @param {object} options
|
|
8
|
+
* @example wtn.onScanner({
|
|
9
|
+
* onBarcodeSearch:(value)=>{
|
|
10
|
+
* console.log(value);
|
|
11
|
+
* }
|
|
12
|
+
* });
|
|
13
|
+
*/
|
|
14
|
+
declare const BarcodeScan: (options: BarcodeScanOptions) => void;
|
|
15
|
+
export default BarcodeScan;
|
|
16
|
+
//# sourceMappingURL=barcode-scan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barcode-scan.d.ts","sourceRoot":"","sources":["../../src/barcode/barcode-scan.ts"],"names":[],"mappings":"AAUA,UAAU,kBAAkB;IAC1B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAQD;;;;;;;;GAQG;AACH,QAAA,MAAM,WAAW,YAAa,kBAAkB,KAAG,IA0BlD,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var utills_1 = require("../utills");
|
|
7
|
+
var formats_1 = __importDefault(require("./formats"));
|
|
8
|
+
/**
|
|
9
|
+
* This function opens native barcode scanner from Android/Ios app.
|
|
10
|
+
* @param {object} options
|
|
11
|
+
* @example wtn.onScanner({
|
|
12
|
+
* onBarcodeSearch:(value)=>{
|
|
13
|
+
* console.log(value);
|
|
14
|
+
* }
|
|
15
|
+
* });
|
|
16
|
+
*/
|
|
17
|
+
var BarcodeScan = function (options) {
|
|
18
|
+
if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
|
|
19
|
+
var onBarcodeSearch_1 = options.onBarcodeSearch, format = options.format;
|
|
20
|
+
(0, utills_1.registerCb)(function (response) {
|
|
21
|
+
var type = response.type, value = response.value;
|
|
22
|
+
if (type === "BARCODE_SCAN") {
|
|
23
|
+
onBarcodeSearch_1 && onBarcodeSearch_1(value);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
if (utills_1.platform === "ANDROID_APP" && utills_1.webToNative.startScanner) {
|
|
27
|
+
utills_1.webToNative.startScanner(JSON.stringify({
|
|
28
|
+
formats: format ? [format] : [],
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
|
|
32
|
+
utills_1.webToNativeIos.postMessage({
|
|
33
|
+
action: "barcodeScan",
|
|
34
|
+
barcodeFormat: format ? String(format) : String(formats_1.default.ALL_FORMATS),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
exports.default = BarcodeScan;
|
|
40
|
+
//# sourceMappingURL=barcode-scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barcode-scan.js","sourceRoot":"","sources":["../../src/barcode/barcode-scan.ts"],"names":[],"mappings":";;;;;AAAA,oCAMmB;AACnB,sDAA+B;AAc/B;;;;;;;;GAQG;AACH,IAAM,WAAW,GAAG,UAAC,OAA2B;IAC9C,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,iBAAQ,CAAC,EAAE;QACzC,IAAA,iBAAe,GAAa,OAAO,gBAApB,EAAE,MAAM,GAAK,OAAO,OAAZ,CAAa;QAE5C,IAAA,mBAAU,EAAC,UAAC,QAA6B;YAC/B,IAAA,IAAI,GAAY,QAAQ,KAApB,EAAE,KAAK,GAAK,QAAQ,MAAb,CAAc;YACjC,IAAI,IAAI,KAAK,cAAc,EAAE;gBAC3B,iBAAe,IAAI,iBAAe,CAAC,KAAK,CAAC,CAAC;aAC3C;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,iBAAQ,KAAK,aAAa,IAAI,oBAAW,CAAC,YAAY,EAAE;YAC1D,oBAAW,CAAC,YAAY,CACtB,IAAI,CAAC,SAAS,CAAC;gBACb,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;aAChC,CAAC,CACH,CAAC;SACH;QAED,IAAI,iBAAQ,KAAK,SAAS,IAAI,uBAAc,EAAE;YAC5C,uBAAc,CAAC,WAAW,CAAC;gBACzB,MAAM,EAAE,aAAa;gBACrB,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,iBAAM,CAAC,WAAW,CAAC;aACpE,CAAC,CAAC;SACJ;KACF;AACH,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseResponse } from "../types";
|
|
2
|
+
export interface BarcodeScanResponse extends BaseResponse {
|
|
3
|
+
type: "BARCODE_SCAN";
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export type BarcodeScanCallback = (value: string) => void;
|
|
7
|
+
export interface BarcodeScanOptions {
|
|
8
|
+
onBarcodeSearch?: BarcodeScanCallback;
|
|
9
|
+
format?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface BarcodeScanAndroidParams {
|
|
12
|
+
formats: number[];
|
|
13
|
+
}
|
|
14
|
+
export interface BarcodeScanIosMessage {
|
|
15
|
+
action: string;
|
|
16
|
+
barcodeFormat: string;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=barcode-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barcode-types.d.ts","sourceRoot":"","sources":["../../src/barcode/barcode-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAE1D,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barcode-types.js","sourceRoot":"","sources":["../../src/barcode/barcode-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum BarcodeFormat {
|
|
2
|
+
ALL_FORMATS = 0,
|
|
3
|
+
CODE_128 = 1,
|
|
4
|
+
CODE_39 = 2,
|
|
5
|
+
CODE_93 = 4,
|
|
6
|
+
CODABAR = 8,
|
|
7
|
+
DATA_MATRIX = 16,
|
|
8
|
+
EAN_13 = 32,
|
|
9
|
+
EAN_8 = 64,
|
|
10
|
+
ITF = 128,
|
|
11
|
+
QR_CODE = 256,
|
|
12
|
+
UPC_A = 512,
|
|
13
|
+
UPC_E = 1024,
|
|
14
|
+
PDF417 = 2048,
|
|
15
|
+
AZTEC = 4096
|
|
16
|
+
}
|
|
17
|
+
export default BarcodeFormat;
|
|
18
|
+
//# sourceMappingURL=formats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formats.d.ts","sourceRoot":"","sources":["../../src/barcode/formats.ts"],"names":[],"mappings":"AACA,oBAAY,aAAa;IACvB,WAAW,IAAI;IACf,QAAQ,IAAI;IACZ,OAAO,IAAI;IACX,OAAO,IAAI;IACX,OAAO,IAAI;IACX,WAAW,KAAK;IAChB,MAAM,KAAK;IACX,KAAK,KAAK;IACV,GAAG,MAAM;IACT,OAAO,MAAM;IACb,KAAK,MAAM;IACX,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,KAAK,OAAO;CACb;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BarcodeFormat = void 0;
|
|
4
|
+
// Barcode formats
|
|
5
|
+
var BarcodeFormat;
|
|
6
|
+
(function (BarcodeFormat) {
|
|
7
|
+
BarcodeFormat[BarcodeFormat["ALL_FORMATS"] = 0] = "ALL_FORMATS";
|
|
8
|
+
BarcodeFormat[BarcodeFormat["CODE_128"] = 1] = "CODE_128";
|
|
9
|
+
BarcodeFormat[BarcodeFormat["CODE_39"] = 2] = "CODE_39";
|
|
10
|
+
BarcodeFormat[BarcodeFormat["CODE_93"] = 4] = "CODE_93";
|
|
11
|
+
BarcodeFormat[BarcodeFormat["CODABAR"] = 8] = "CODABAR";
|
|
12
|
+
BarcodeFormat[BarcodeFormat["DATA_MATRIX"] = 16] = "DATA_MATRIX";
|
|
13
|
+
BarcodeFormat[BarcodeFormat["EAN_13"] = 32] = "EAN_13";
|
|
14
|
+
BarcodeFormat[BarcodeFormat["EAN_8"] = 64] = "EAN_8";
|
|
15
|
+
BarcodeFormat[BarcodeFormat["ITF"] = 128] = "ITF";
|
|
16
|
+
BarcodeFormat[BarcodeFormat["QR_CODE"] = 256] = "QR_CODE";
|
|
17
|
+
BarcodeFormat[BarcodeFormat["UPC_A"] = 512] = "UPC_A";
|
|
18
|
+
BarcodeFormat[BarcodeFormat["UPC_E"] = 1024] = "UPC_E";
|
|
19
|
+
BarcodeFormat[BarcodeFormat["PDF417"] = 2048] = "PDF417";
|
|
20
|
+
BarcodeFormat[BarcodeFormat["AZTEC"] = 4096] = "AZTEC";
|
|
21
|
+
})(BarcodeFormat = exports.BarcodeFormat || (exports.BarcodeFormat = {}));
|
|
22
|
+
exports.default = BarcodeFormat;
|
|
23
|
+
//# sourceMappingURL=formats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formats.js","sourceRoot":"","sources":["../../src/barcode/formats.ts"],"names":[],"mappings":";;;AAAA,kBAAkB;AAClB,IAAY,aAeX;AAfD,WAAY,aAAa;IACvB,+DAAe,CAAA;IACf,yDAAY,CAAA;IACZ,uDAAW,CAAA;IACX,uDAAW,CAAA;IACX,uDAAW,CAAA;IACX,gEAAgB,CAAA;IAChB,sDAAW,CAAA;IACX,oDAAU,CAAA;IACV,iDAAS,CAAA;IACT,yDAAa,CAAA;IACb,qDAAW,CAAA;IACX,sDAAY,CAAA;IACZ,wDAAa,CAAA;IACb,sDAAY,CAAA;AACd,CAAC,EAfW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAexB;AAED,kBAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/barcode/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BarcodeScan = exports.Types = exports.Format = void 0;
|
|
7
|
+
var formats_1 = __importDefault(require("./formats"));
|
|
8
|
+
exports.Format = formats_1.default;
|
|
9
|
+
var types_1 = __importDefault(require("./types"));
|
|
10
|
+
exports.Types = types_1.default;
|
|
11
|
+
var barcode_scan_1 = __importDefault(require("./barcode-scan"));
|
|
12
|
+
exports.BarcodeScan = barcode_scan_1.default;
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/barcode/index.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA+B;AAItB,iBAJF,iBAAM,CAIE;AAHf,kDAA4B;AAGX,gBAHV,eAAK,CAGU;AAFtB,gEAAyC;AAEjB,sBAFjB,sBAAW,CAEiB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum BarcodeType {
|
|
2
|
+
QR_CODE = "QR_CODE",
|
|
3
|
+
DATA_MATRIX = "DATA_MATRIX",
|
|
4
|
+
UPC_E = "UPC_E",
|
|
5
|
+
UPC_A = "UPC_A",
|
|
6
|
+
EAN_8 = "EAN_8",
|
|
7
|
+
EAN_13 = "EAN_13",
|
|
8
|
+
CODE_128 = "CODE_128",
|
|
9
|
+
CODE_39 = "CODE_39",
|
|
10
|
+
CODE_93 = "CODE_93",
|
|
11
|
+
CODABAR = "CODABAR",
|
|
12
|
+
ITF = "ITF",
|
|
13
|
+
AZTEC = "AZTEC",
|
|
14
|
+
PDF_417 = "PDF_417"
|
|
15
|
+
}
|
|
16
|
+
export default BarcodeType;
|
|
17
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/barcode/types.ts"],"names":[],"mappings":"AACA,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BarcodeType = void 0;
|
|
4
|
+
// Barcode types
|
|
5
|
+
var BarcodeType;
|
|
6
|
+
(function (BarcodeType) {
|
|
7
|
+
BarcodeType["QR_CODE"] = "QR_CODE";
|
|
8
|
+
BarcodeType["DATA_MATRIX"] = "DATA_MATRIX";
|
|
9
|
+
BarcodeType["UPC_E"] = "UPC_E";
|
|
10
|
+
BarcodeType["UPC_A"] = "UPC_A";
|
|
11
|
+
BarcodeType["EAN_8"] = "EAN_8";
|
|
12
|
+
BarcodeType["EAN_13"] = "EAN_13";
|
|
13
|
+
BarcodeType["CODE_128"] = "CODE_128";
|
|
14
|
+
BarcodeType["CODE_39"] = "CODE_39";
|
|
15
|
+
BarcodeType["CODE_93"] = "CODE_93";
|
|
16
|
+
BarcodeType["CODABAR"] = "CODABAR";
|
|
17
|
+
BarcodeType["ITF"] = "ITF";
|
|
18
|
+
BarcodeType["AZTEC"] = "AZTEC";
|
|
19
|
+
BarcodeType["PDF_417"] = "PDF_417";
|
|
20
|
+
})(BarcodeType = exports.BarcodeType || (exports.BarcodeType = {}));
|
|
21
|
+
exports.default = BarcodeType;
|
|
22
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/barcode/types.ts"],"names":[],"mappings":";;;AAAA,gBAAgB;AAChB,IAAY,WAcX;AAdD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,0CAA2B,CAAA;IAC3B,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;IACnB,0BAAW,CAAA;IACX,8BAAe,CAAA;IACf,kCAAmB,CAAA;AACrB,CAAC,EAdW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QActB;AAED,kBAAe,WAAW,CAAC"}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StatusBarOptions, DownloadBlobFileOptions, CustomFileDownloadOptions } from "./types";
|
|
2
|
+
export declare const isAndroidApp: boolean;
|
|
3
|
+
export declare const isIosApp: boolean;
|
|
4
|
+
/**
|
|
5
|
+
* This function hides splash screen
|
|
6
|
+
* @example wtn.hideSplashScreen()
|
|
7
|
+
*/
|
|
8
|
+
export declare const hideSplashScreen: () => void;
|
|
9
|
+
export declare const statusBar: (options: StatusBarOptions) => void;
|
|
10
|
+
export declare const downloadFile: (downloadUrl: string) => void;
|
|
11
|
+
export declare const downloadBlobFile: ({ fileName, downloadUrl }: DownloadBlobFileOptions) => void;
|
|
12
|
+
export declare const customFileDownload: ({ downloadUrl, fileName, isBlob, mimeType, cookies, userAgent, openFileAfterDownload }: CustomFileDownloadOptions) => void;
|
|
13
|
+
export declare const deviceInfo: () => Promise<any>;
|
|
14
|
+
export declare const showInAppReview: () => void;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAE/F,eAAO,MAAM,YAAY,EAAE,OAAoC,CAAC;AAChE,eAAO,MAAM,QAAQ,EAAE,OAAgC,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAO,IAEnC,CAAC;AAEF,eAAO,MAAM,SAAS,YAAa,gBAAgB,KAAG,IAYrD,CAAC;AAEF,eAAO,MAAM,YAAY,gBAAiB,MAAM,KAAG,IAWlD,CAAC;AAEF,eAAO,MAAM,gBAAgB,8BAA6B,uBAAuB,KAAG,IAQnF,CAAC;AAEF,eAAO,MAAM,kBAAkB,2FAA0F,yBAAyB,KAAG,IAYpJ,CAAA;AAED,eAAO,MAAM,UAAU,QAAO,QAAQ,GAAG,CA0BxC,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,IAElC,CAAC"}
|
package/build/index.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.showInAppReview = exports.deviceInfo = exports.customFileDownload = exports.downloadBlobFile = exports.downloadFile = exports.statusBar = exports.hideSplashScreen = exports.isIosApp = exports.isAndroidApp = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Repository for webtonative javascript sdk. Build your android/ios app from https://webtonative.com.
|
|
6
|
+
* This is in beta phase.
|
|
7
|
+
* @example npm install webtonative
|
|
8
|
+
* import webtonative from "webtonative";
|
|
9
|
+
* const wtn = webtonative();
|
|
10
|
+
*/
|
|
11
|
+
var utills_1 = require("./utills");
|
|
12
|
+
exports.isAndroidApp = utills_1.platform === "ANDROID_APP";
|
|
13
|
+
exports.isIosApp = utills_1.platform === "IOS_APP";
|
|
14
|
+
/**
|
|
15
|
+
* This function hides splash screen
|
|
16
|
+
* @example wtn.hideSplashScreen()
|
|
17
|
+
*/
|
|
18
|
+
var hideSplashScreen = function () {
|
|
19
|
+
utills_1.isNativeApp && utills_1.webToNative.hideSplashScreen && utills_1.webToNative.hideSplashScreen();
|
|
20
|
+
};
|
|
21
|
+
exports.hideSplashScreen = hideSplashScreen;
|
|
22
|
+
var statusBar = function (options) {
|
|
23
|
+
if (utills_1.isNativeApp) {
|
|
24
|
+
if (exports.isAndroidApp) {
|
|
25
|
+
utills_1.webToNative.statusBar && utills_1.webToNative.statusBar(JSON.stringify(options));
|
|
26
|
+
}
|
|
27
|
+
else if (exports.isIosApp) {
|
|
28
|
+
utills_1.webToNativeIos && utills_1.webToNativeIos.postMessage({
|
|
29
|
+
action: "statusBar",
|
|
30
|
+
color: options.color,
|
|
31
|
+
style: options.style,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.statusBar = statusBar;
|
|
37
|
+
var downloadFile = function (downloadUrl) {
|
|
38
|
+
if (utills_1.isNativeApp) {
|
|
39
|
+
if (exports.isAndroidApp) {
|
|
40
|
+
// Android implementation
|
|
41
|
+
}
|
|
42
|
+
else if (exports.isIosApp) {
|
|
43
|
+
utills_1.webToNativeIos && utills_1.webToNativeIos.postMessage({
|
|
44
|
+
action: "downloadFile",
|
|
45
|
+
downloadUrl: downloadUrl,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.downloadFile = downloadFile;
|
|
51
|
+
var downloadBlobFile = function (_a) {
|
|
52
|
+
var fileName = _a.fileName, downloadUrl = _a.downloadUrl;
|
|
53
|
+
if (["IOS_APP"].includes(utills_1.platform)) {
|
|
54
|
+
exports.isIosApp && utills_1.webToNativeIos && utills_1.webToNativeIos.postMessage({
|
|
55
|
+
action: "downloadBlobFile",
|
|
56
|
+
fileName: fileName,
|
|
57
|
+
url: downloadUrl,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.downloadBlobFile = downloadBlobFile;
|
|
62
|
+
var customFileDownload = function (_a) {
|
|
63
|
+
var downloadUrl = _a.downloadUrl, fileName = _a.fileName, isBlob = _a.isBlob, mimeType = _a.mimeType, cookies = _a.cookies, userAgent = _a.userAgent, openFileAfterDownload = _a.openFileAfterDownload;
|
|
64
|
+
if (["ANDROID_APP"].includes(utills_1.platform)) {
|
|
65
|
+
utills_1.platform === "ANDROID_APP" && utills_1.webToNative.downloadFile && utills_1.webToNative.downloadFile(JSON.stringify({
|
|
66
|
+
url: downloadUrl,
|
|
67
|
+
fileName: fileName,
|
|
68
|
+
isBlob: isBlob,
|
|
69
|
+
mimeType: mimeType,
|
|
70
|
+
cookies: cookies,
|
|
71
|
+
userAgent: userAgent,
|
|
72
|
+
openFileAfterDownload: openFileAfterDownload
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
exports.customFileDownload = customFileDownload;
|
|
77
|
+
var deviceInfo = function () {
|
|
78
|
+
return new Promise(function (resolve, reject) {
|
|
79
|
+
(0, utills_1.registerCb)(function (results) {
|
|
80
|
+
if (results) {
|
|
81
|
+
resolve(results);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
reject({
|
|
85
|
+
err: "Error getting device info",
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
key: "deviceInfo",
|
|
90
|
+
});
|
|
91
|
+
if (utills_1.platform === "ANDROID_APP") {
|
|
92
|
+
utills_1.webToNative.getDeviceInfo && utills_1.webToNative.getDeviceInfo();
|
|
93
|
+
}
|
|
94
|
+
else if (utills_1.platform === "IOS_APP") {
|
|
95
|
+
utills_1.webToNativeIos && utills_1.webToNativeIos.postMessage({
|
|
96
|
+
action: "deviceInfo",
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
reject("This function will work in Native App Powered By WebToNative");
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
exports.deviceInfo = deviceInfo;
|
|
105
|
+
var showInAppReview = function () {
|
|
106
|
+
utills_1.isNativeApp && utills_1.webToNative.showInAppReview && utills_1.webToNative.showInAppReview();
|
|
107
|
+
};
|
|
108
|
+
exports.showInAppReview = showInAppReview;
|
|
109
|
+
// Export all other functions from the original file
|
|
110
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|