webtonative 1.0.76 → 1.0.78

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.
Files changed (140) hide show
  1. package/ATTConsent/index.d.ts +16 -0
  2. package/ATTConsent/index.js +53 -1
  3. package/ATTConsent/types.d.ts +14 -0
  4. package/ATTConsent/types.js +2 -0
  5. package/AdMob/index.d.ts +30 -0
  6. package/AdMob/index.js +101 -1
  7. package/AdMob/types.d.ts +24 -0
  8. package/AdMob/types.js +3 -0
  9. package/AppReview/index.d.ts +6 -0
  10. package/AppReview/index.js +21 -1
  11. package/AppReview/types.d.ts +7 -0
  12. package/AppReview/types.js +3 -0
  13. package/AppsFlyer/index.d.ts +14 -0
  14. package/AppsFlyer/index.js +42 -4
  15. package/AppsFlyer/types.d.ts +9 -0
  16. package/AppsFlyer/types.js +2 -0
  17. package/BackgroundLocation/index.d.ts +11 -0
  18. package/BackgroundLocation/index.js +64 -4
  19. package/BackgroundLocation/types.d.ts +31 -0
  20. package/BackgroundLocation/types.js +2 -0
  21. package/Beacon/index.d.ts +6 -0
  22. package/Beacon/index.js +29 -1
  23. package/Beacon/types.d.ts +18 -0
  24. package/Beacon/types.js +2 -0
  25. package/Biometric/index.d.ts +26 -0
  26. package/Biometric/index.js +124 -1
  27. package/Biometric/types.d.ts +23 -0
  28. package/Biometric/types.js +2 -0
  29. package/Bluetooth/index.d.ts +16 -0
  30. package/Bluetooth/index.js +66 -1
  31. package/Bluetooth/types.d.ts +33 -0
  32. package/Bluetooth/types.js +2 -0
  33. package/BottomNavigation/index.d.ts +10 -0
  34. package/BottomNavigation/index.js +40 -4
  35. package/BottomNavigation/types.d.ts +8 -0
  36. package/BottomNavigation/types.js +2 -0
  37. package/Clipboard/index.d.ts +11 -0
  38. package/Clipboard/index.js +44 -4
  39. package/Clipboard/types.d.ts +19 -0
  40. package/Clipboard/types.js +3 -0
  41. package/Facebook/events.d.ts +12 -0
  42. package/Facebook/events.js +43 -4
  43. package/Facebook/index.d.ts +2 -0
  44. package/Facebook/index.js +28 -1
  45. package/Facebook/types.d.ts +21 -0
  46. package/Facebook/types.js +2 -0
  47. package/Firebase/Analytics/index.d.ts +31 -0
  48. package/Firebase/Analytics/index.js +109 -4
  49. package/Firebase/Messaging/index.d.ts +16 -0
  50. package/Firebase/Messaging/index.js +63 -4
  51. package/Firebase/index.d.ts +3 -0
  52. package/Firebase/index.js +30 -1
  53. package/Firebase/types.d.ts +57 -0
  54. package/Firebase/types.js +3 -0
  55. package/FirebaseAnalytics/index.d.ts +2 -0
  56. package/FirebaseAnalytics/index.js +28 -1
  57. package/Haptics/index.d.ts +6 -0
  58. package/Haptics/index.js +20 -1
  59. package/Haptics/types.d.ts +7 -0
  60. package/Haptics/types.js +2 -0
  61. package/InAppPurchase/index.d.ts +22 -0
  62. package/InAppPurchase/index.js +80 -1
  63. package/InAppPurchase/types.d.ts +33 -0
  64. package/InAppPurchase/types.js +2 -0
  65. package/InAppUpdate/index.d.ts +11 -0
  66. package/InAppUpdate/index.js +38 -1
  67. package/InAppUpdate/types.d.ts +14 -0
  68. package/InAppUpdate/types.js +2 -0
  69. package/MediaPlayer/index.d.ts +16 -0
  70. package/MediaPlayer/index.js +55 -7
  71. package/MediaPlayer/types.d.ts +13 -0
  72. package/MediaPlayer/types.js +2 -0
  73. package/NativeContacts/index.d.ts +11 -0
  74. package/NativeContacts/index.js +50 -6
  75. package/NativeContacts/types.d.ts +13 -0
  76. package/NativeContacts/types.js +2 -0
  77. package/NativeDatastore/index.d.ts +7 -0
  78. package/NativeDatastore/index.js +134 -1
  79. package/NativeDatastore/type.d.ts +23 -0
  80. package/NativeDatastore/type.js +2 -0
  81. package/Notification/index.d.ts +10 -0
  82. package/Notification/index.js +41 -5
  83. package/Notification/types.d.ts +13 -0
  84. package/Notification/types.js +2 -0
  85. package/OneSignal/index.d.ts +17 -0
  86. package/OneSignal/index.js +264 -1
  87. package/OneSignal/types.d.ts +40 -0
  88. package/OneSignal/types.js +3 -0
  89. package/Printing/index.d.ts +6 -0
  90. package/Printing/index.js +19 -1
  91. package/Printing/types.d.ts +8 -0
  92. package/Printing/types.js +2 -0
  93. package/README.md +31 -2
  94. package/Screen/index.d.ts +8 -0
  95. package/Screen/index.js +34 -4
  96. package/Screen/types.d.ts +5 -0
  97. package/Screen/types.js +3 -0
  98. package/Siri/index.d.ts +6 -0
  99. package/Siri/index.js +25 -1
  100. package/Siri/types.d.ts +13 -0
  101. package/Siri/types.js +2 -0
  102. package/SocialLogin/apple/index.d.ts +11 -0
  103. package/SocialLogin/apple/index.js +31 -0
  104. package/SocialLogin/facebook/index.d.ts +21 -0
  105. package/SocialLogin/facebook/index.js +60 -0
  106. package/SocialLogin/google/index.d.ts +21 -0
  107. package/SocialLogin/google/index.js +60 -0
  108. package/SocialLogin/index.d.ts +16 -0
  109. package/SocialLogin/index.js +22 -1
  110. package/SocialLogin/types.d.ts +38 -0
  111. package/SocialLogin/types.js +2 -0
  112. package/Stripe/index.d.ts +2 -0
  113. package/Stripe/index.js +48 -1
  114. package/Stripe/types.d.ts +31 -0
  115. package/Stripe/types.js +2 -0
  116. package/VoiceSearch/index.d.ts +12 -0
  117. package/VoiceSearch/index.js +33 -1
  118. package/VoiceSearch/types.d.ts +9 -0
  119. package/VoiceSearch/types.js +2 -0
  120. package/barcode/barcode-scan.d.ts +15 -0
  121. package/barcode/barcode-scan.js +39 -1
  122. package/barcode/barcode-types.d.ts +17 -0
  123. package/barcode/barcode-types.js +2 -0
  124. package/barcode/formats.d.ts +17 -0
  125. package/barcode/formats.js +22 -1
  126. package/barcode/index.d.ts +4 -0
  127. package/barcode/index.js +12 -1
  128. package/barcode/types.d.ts +16 -0
  129. package/barcode/types.js +21 -1
  130. package/index.d.ts +155 -0
  131. package/index.js +540 -2
  132. package/package.json +150 -3
  133. package/types/index.d.ts +49 -0
  134. package/types/index.js +3 -0
  135. package/utills.d.ts +11 -0
  136. package/utills.js +110 -1
  137. package/webtonative.min.js +1 -1
  138. package/SocialLogin/apple.js +0 -1
  139. package/SocialLogin/facebook.js +0 -9
  140. package/SocialLogin/google.js +0 -9
@@ -1 +1,124 @@
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;
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;
@@ -0,0 +1,23 @@
1
+ export interface BiometricResponse {
2
+ type: string;
3
+ status?: string;
4
+ [key: string]: any;
5
+ }
6
+ export interface BiometricCallback {
7
+ (response: BiometricResponse): void;
8
+ }
9
+ export interface BiometricOptions {
10
+ callback?: BiometricCallback;
11
+ secret?: string;
12
+ prompt?: string;
13
+ isAuthenticationOptional?: boolean;
14
+ }
15
+ export interface BiometricIosMessage {
16
+ action: string;
17
+ secret?: string;
18
+ prompt?: string;
19
+ }
20
+ export interface BiometricAuthOptions {
21
+ prompt?: string;
22
+ isAuthenticationOptional?: boolean;
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ import { BluetoothScanOptions, BluetoothPairOptions, BluetoothUnpairOptions } from "./types";
2
+ /**
3
+ * Starts scanning for Bluetooth devices (Android only)
4
+ * @param options - Options for Bluetooth scanning
5
+ */
6
+ export declare const startBluetoothScan: (options?: BluetoothScanOptions) => void;
7
+ /**
8
+ * Pairs with a Bluetooth device (Android only)
9
+ * @param options - Options for pairing with a Bluetooth device
10
+ */
11
+ export declare const pairDevice: (options?: BluetoothPairOptions) => void;
12
+ /**
13
+ * Unpairs from a Bluetooth device (Android only)
14
+ * @param options - Options for unpairing from a Bluetooth device
15
+ */
16
+ export declare const unpairDevice: (options?: BluetoothUnpairOptions) => void;
@@ -1 +1,66 @@
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
+ "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;
@@ -0,0 +1,33 @@
1
+ export interface BluetoothResponse {
2
+ type: string;
3
+ status?: string;
4
+ devices?: BluetoothDevice[];
5
+ [key: string]: any;
6
+ }
7
+ export interface BluetoothDevice {
8
+ name?: string;
9
+ address?: string;
10
+ [key: string]: any;
11
+ }
12
+ export interface BluetoothCallback {
13
+ (response: BluetoothResponse): void;
14
+ }
15
+ export interface BluetoothScanOptions {
16
+ callback?: BluetoothCallback;
17
+ }
18
+ export interface BluetoothPairOptions {
19
+ callback?: BluetoothCallback;
20
+ address?: string;
21
+ timeout?: number;
22
+ }
23
+ export interface BluetoothUnpairOptions {
24
+ callback?: BluetoothCallback;
25
+ address?: string;
26
+ }
27
+ export interface BluetoothPairParams {
28
+ address?: string;
29
+ timeout?: number;
30
+ }
31
+ export interface BluetoothUnpairParams {
32
+ address?: string;
33
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { BottomNavigationShowOptions } from "./types";
2
+ /**
3
+ * Hides the bottom navigation
4
+ */
5
+ export declare const hide: () => void;
6
+ /**
7
+ * Shows the bottom navigation
8
+ * @param options - Options for showing bottom navigation
9
+ */
10
+ export declare const show: (options?: BottomNavigationShowOptions) => void;
@@ -1,4 +1,40 @@
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;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.show = exports.hide = void 0;
4
+ var utills_1 = require("../utills");
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;
@@ -0,0 +1,8 @@
1
+ export interface BottomNavigationShowOptions {
2
+ key?: string;
3
+ }
4
+ export interface BottomNavigationIosMessage {
5
+ action: string;
6
+ show: boolean;
7
+ key?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { GetClipboardOptions, SetClipboardOptions } from "./types";
2
+ /**
3
+ * Gets content from clipboard
4
+ * @param options - Options for getting clipboard content
5
+ */
6
+ export declare const get: (options?: GetClipboardOptions) => void;
7
+ /**
8
+ * Sets content to clipboard
9
+ * @param options - Options for setting clipboard content
10
+ */
11
+ export declare const set: (options?: SetClipboardOptions) => void;
@@ -1,4 +1,44 @@
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;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.set = exports.get = void 0;
4
+ var utills_1 = require("../utills");
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;
@@ -0,0 +1,19 @@
1
+ export interface ClipboardResponse {
2
+ type: string;
3
+ content?: string;
4
+ [key: string]: any;
5
+ }
6
+ export type ClipboardCallback = (response: ClipboardResponse) => void;
7
+ export interface GetClipboardOptions {
8
+ callback?: ClipboardCallback;
9
+ [key: string]: any;
10
+ }
11
+ export interface SetClipboardOptions {
12
+ data?: string;
13
+ [key: string]: any;
14
+ }
15
+ export interface ClipboardIosMessage {
16
+ action: string;
17
+ text?: string;
18
+ [key: string]: any;
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // Define types for Clipboard module
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { FacebookEventOptions, FacebookPurchaseOptions } from "./types";
2
+ /**
3
+ * Sends a Facebook event
4
+ * @param options - Options for the Facebook event
5
+ */
6
+ export declare const send: (options: FacebookEventOptions) => void;
7
+ /**
8
+ * Sends a Facebook purchase event
9
+ * @param options - Options for the Facebook purchase event
10
+ * @example wtn.facebook.events.sendPurchase({amount: 10.99, currency: "USD", parameters: {item_name: "Product"}});
11
+ */
12
+ export declare const sendPurchase: (options: FacebookPurchaseOptions) => void;
@@ -1,4 +1,43 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.sendPurchase=exports.send=void 0;var _utills=require("../utills"),send=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.event,c=a.valueToSum,d=a.parameters;"ANDROID_APP"===_utills.platform&&_utills.webToNative.addFbEvents(b,d),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"sendFBEvent",eventName:b,valueToSum:c,parameters:d})}};exports.send=send;/**
2
- *
3
- * @example wtn.appsflyer.setCustomerUserId("ADD_TO_CART",{name:"Cadburry",quantity:1});
4
- */var sendPurchase=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.amount,c=a.currency,d=a.parameters;"ANDROID_APP"===_utills.platform&&_utills.webToNative.addFbPurchaseEvent(b,c,d),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"sendFBPurchaseEvent",currency:c,amount:b,parameters:d})}};exports.sendPurchase=sendPurchase;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendPurchase = exports.send = void 0;
4
+ var utills_1 = require("../utills");
5
+ /**
6
+ * Sends a Facebook event
7
+ * @param options - Options for the Facebook event
8
+ */
9
+ var send = function (options) {
10
+ if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
11
+ var event_1 = options.event, valueToSum = options.valueToSum, parameters = options.parameters;
12
+ utills_1.platform === "ANDROID_APP" && utills_1.webToNative.addFbEvents(event_1, parameters);
13
+ if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
14
+ utills_1.webToNativeIos.postMessage({
15
+ action: "sendFBEvent",
16
+ eventName: event_1,
17
+ valueToSum: valueToSum,
18
+ parameters: parameters,
19
+ });
20
+ }
21
+ }
22
+ };
23
+ exports.send = send;
24
+ /**
25
+ * Sends a Facebook purchase event
26
+ * @param options - Options for the Facebook purchase event
27
+ * @example wtn.facebook.events.sendPurchase({amount: 10.99, currency: "USD", parameters: {item_name: "Product"}});
28
+ */
29
+ var sendPurchase = function (options) {
30
+ if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
31
+ var amount = options.amount, currency = options.currency, parameters = options.parameters;
32
+ utills_1.platform === "ANDROID_APP" && utills_1.webToNative.addFbPurchaseEvent(amount, currency, parameters);
33
+ if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
34
+ utills_1.webToNativeIos.postMessage({
35
+ action: "sendFBPurchaseEvent",
36
+ currency: currency,
37
+ amount: amount,
38
+ parameters: parameters,
39
+ });
40
+ }
41
+ }
42
+ };
43
+ exports.sendPurchase = sendPurchase;
@@ -0,0 +1,2 @@
1
+ import * as events from "./events";
2
+ export { events };
package/Facebook/index.js CHANGED
@@ -1 +1,28 @@
1
- "use strict";var events=_interopRequireWildcard(require("./events"));function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.events=void 0;exports.events=events;function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!==_typeof(a)&&"function"!=typeof a)return{default:a};var c=_getRequireWildcardCache(b);if(c&&c.has(a))return c.get(a);var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!=f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d["default"]=a,c&&c.set(a,d),d}
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.events = void 0;
27
+ var events = __importStar(require("./events"));
28
+ exports.events = events;
@@ -0,0 +1,21 @@
1
+ export interface FacebookEventParameters {
2
+ [key: string]: any;
3
+ }
4
+ export interface FacebookEventOptions {
5
+ event: string;
6
+ valueToSum?: number;
7
+ parameters?: FacebookEventParameters;
8
+ }
9
+ export interface FacebookPurchaseOptions {
10
+ amount: number;
11
+ currency: string;
12
+ parameters?: FacebookEventParameters;
13
+ }
14
+ export interface FacebookEventIosMessage {
15
+ action: string;
16
+ eventName?: string;
17
+ valueToSum?: number;
18
+ parameters?: FacebookEventParameters;
19
+ currency?: string;
20
+ amount?: number;
21
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,31 @@
1
+ import { FirebaseAnalyticsCollectionOptions, FirebaseUserIdOptions, FirebaseUserPropertyOptions, FirebaseDefaultParametersOptions, FirebaseEventOptions, FirebaseScreenOptions } from "../types";
2
+ /**
3
+ * Sets Firebase Analytics collection enabled or disabled
4
+ * @param options - Options for setting analytics collection
5
+ */
6
+ export declare const setCollection: (options: FirebaseAnalyticsCollectionOptions) => void;
7
+ /**
8
+ * Sets Firebase user ID
9
+ * @param options - Options for setting user ID
10
+ */
11
+ export declare const setUserId: (options: FirebaseUserIdOptions) => void;
12
+ /**
13
+ * Sets a Firebase user property
14
+ * @param options - Options for setting user property
15
+ */
16
+ export declare const setUserProperty: (options: FirebaseUserPropertyOptions) => void;
17
+ /**
18
+ * Sets default event parameters for Firebase Analytics
19
+ * @param options - Options for setting default parameters
20
+ */
21
+ export declare const setDefaultEventParameters: (options: FirebaseDefaultParametersOptions) => void;
22
+ /**
23
+ * Logs a Firebase Analytics event
24
+ * @param options - Options for logging an event
25
+ */
26
+ export declare const logEvent: (options: FirebaseEventOptions) => void;
27
+ /**
28
+ * Logs a Firebase Analytics screen view
29
+ * @param options - Options for logging a screen view
30
+ */
31
+ export declare const logScreen: (options: FirebaseScreenOptions) => void;