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.
Files changed (264) hide show
  1. package/ATTConsent/index.js +1 -54
  2. package/AdMob/index.js +1 -102
  3. package/AppReview/index.js +1 -22
  4. package/AppsFlyer/index.js +4 -43
  5. package/BackgroundLocation/index.js +4 -65
  6. package/Beacon/index.js +1 -30
  7. package/Biometric/index.js +1 -125
  8. package/Bluetooth/index.js +1 -67
  9. package/BottomNavigation/index.js +4 -41
  10. package/Clipboard/index.js +4 -45
  11. package/Facebook/events.js +4 -44
  12. package/Facebook/index.js +1 -29
  13. package/Firebase/Analytics/index.js +4 -110
  14. package/Firebase/Messaging/index.js +4 -64
  15. package/Firebase/index.js +1 -31
  16. package/FirebaseAnalytics/index.js +1 -29
  17. package/Haptics/index.js +1 -21
  18. package/InAppPurchase/index.js +1 -81
  19. package/InAppUpdate/index.js +1 -39
  20. package/MediaPlayer/index.js +7 -56
  21. package/NativeContacts/index.js +6 -51
  22. package/NativeDatastore/index.js +1 -0
  23. package/Notification/index.js +5 -42
  24. package/OneSignal/index.js +1 -265
  25. package/Printing/index.js +1 -20
  26. package/README.md +2 -31
  27. package/Screen/index.js +4 -35
  28. package/Siri/index.js +1 -26
  29. package/SocialLogin/apple.js +1 -32
  30. package/SocialLogin/facebook.js +3 -55
  31. package/SocialLogin/google.js +4 -56
  32. package/SocialLogin/index.js +1 -23
  33. package/Stripe/index.js +1 -49
  34. package/VoiceSearch/index.js +1 -34
  35. package/barcode/barcode-scan.js +1 -40
  36. package/barcode/formats.js +1 -23
  37. package/barcode/index.js +1 -13
  38. package/barcode/types.js +1 -22
  39. package/index.js +2 -535
  40. package/package.json +3 -134
  41. package/utills.js +1 -111
  42. package/webtonative.min.js +1 -1
  43. package/ATTConsent/index.d.ts +0 -17
  44. package/ATTConsent/index.d.ts.map +0 -1
  45. package/ATTConsent/index.js.map +0 -1
  46. package/ATTConsent/types.d.ts +0 -15
  47. package/ATTConsent/types.d.ts.map +0 -1
  48. package/ATTConsent/types.js +0 -3
  49. package/ATTConsent/types.js.map +0 -1
  50. package/AdMob/index.d.ts +0 -31
  51. package/AdMob/index.d.ts.map +0 -1
  52. package/AdMob/index.js.map +0 -1
  53. package/AdMob/types.d.ts +0 -25
  54. package/AdMob/types.d.ts.map +0 -1
  55. package/AdMob/types.js +0 -4
  56. package/AdMob/types.js.map +0 -1
  57. package/AppReview/index.d.ts +0 -7
  58. package/AppReview/index.d.ts.map +0 -1
  59. package/AppReview/index.js.map +0 -1
  60. package/AppReview/types.d.ts +0 -8
  61. package/AppReview/types.d.ts.map +0 -1
  62. package/AppReview/types.js +0 -4
  63. package/AppReview/types.js.map +0 -1
  64. package/AppsFlyer/index.d.ts +0 -15
  65. package/AppsFlyer/index.d.ts.map +0 -1
  66. package/AppsFlyer/index.js.map +0 -1
  67. package/AppsFlyer/types.d.ts +0 -10
  68. package/AppsFlyer/types.d.ts.map +0 -1
  69. package/AppsFlyer/types.js +0 -3
  70. package/AppsFlyer/types.js.map +0 -1
  71. package/BackgroundLocation/index.d.ts +0 -12
  72. package/BackgroundLocation/index.d.ts.map +0 -1
  73. package/BackgroundLocation/index.js.map +0 -1
  74. package/BackgroundLocation/types.d.ts +0 -32
  75. package/BackgroundLocation/types.d.ts.map +0 -1
  76. package/BackgroundLocation/types.js +0 -3
  77. package/BackgroundLocation/types.js.map +0 -1
  78. package/Beacon/index.d.ts +0 -7
  79. package/Beacon/index.d.ts.map +0 -1
  80. package/Beacon/index.js.map +0 -1
  81. package/Beacon/types.d.ts +0 -19
  82. package/Beacon/types.d.ts.map +0 -1
  83. package/Beacon/types.js +0 -3
  84. package/Beacon/types.js.map +0 -1
  85. package/Biometric/index.d.ts +0 -27
  86. package/Biometric/index.d.ts.map +0 -1
  87. package/Biometric/index.js.map +0 -1
  88. package/Biometric/types.d.ts +0 -24
  89. package/Biometric/types.d.ts.map +0 -1
  90. package/Biometric/types.js +0 -3
  91. package/Biometric/types.js.map +0 -1
  92. package/Bluetooth/index.d.ts +0 -17
  93. package/Bluetooth/index.d.ts.map +0 -1
  94. package/Bluetooth/index.js.map +0 -1
  95. package/Bluetooth/types.d.ts +0 -34
  96. package/Bluetooth/types.d.ts.map +0 -1
  97. package/Bluetooth/types.js +0 -3
  98. package/Bluetooth/types.js.map +0 -1
  99. package/BottomNavigation/index.d.ts +0 -11
  100. package/BottomNavigation/index.d.ts.map +0 -1
  101. package/BottomNavigation/index.js.map +0 -1
  102. package/BottomNavigation/types.d.ts +0 -9
  103. package/BottomNavigation/types.d.ts.map +0 -1
  104. package/BottomNavigation/types.js +0 -3
  105. package/BottomNavigation/types.js.map +0 -1
  106. package/Clipboard/index.d.ts +0 -12
  107. package/Clipboard/index.d.ts.map +0 -1
  108. package/Clipboard/index.js.map +0 -1
  109. package/Clipboard/types.d.ts +0 -20
  110. package/Clipboard/types.d.ts.map +0 -1
  111. package/Clipboard/types.js +0 -4
  112. package/Clipboard/types.js.map +0 -1
  113. package/Facebook/events.d.ts +0 -13
  114. package/Facebook/events.d.ts.map +0 -1
  115. package/Facebook/events.js.map +0 -1
  116. package/Facebook/index.d.ts +0 -3
  117. package/Facebook/index.d.ts.map +0 -1
  118. package/Facebook/index.js.map +0 -1
  119. package/Facebook/types.d.ts +0 -22
  120. package/Facebook/types.d.ts.map +0 -1
  121. package/Facebook/types.js +0 -3
  122. package/Facebook/types.js.map +0 -1
  123. package/Firebase/Analytics/index.d.ts +0 -32
  124. package/Firebase/Analytics/index.d.ts.map +0 -1
  125. package/Firebase/Analytics/index.js.map +0 -1
  126. package/Firebase/Messaging/index.d.ts +0 -17
  127. package/Firebase/Messaging/index.d.ts.map +0 -1
  128. package/Firebase/Messaging/index.js.map +0 -1
  129. package/Firebase/index.d.ts +0 -4
  130. package/Firebase/index.d.ts.map +0 -1
  131. package/Firebase/index.js.map +0 -1
  132. package/Firebase/types.d.ts +0 -58
  133. package/Firebase/types.d.ts.map +0 -1
  134. package/Firebase/types.js +0 -4
  135. package/Firebase/types.js.map +0 -1
  136. package/FirebaseAnalytics/index.d.ts +0 -3
  137. package/FirebaseAnalytics/index.d.ts.map +0 -1
  138. package/FirebaseAnalytics/index.js.map +0 -1
  139. package/Haptics/index.d.ts +0 -7
  140. package/Haptics/index.d.ts.map +0 -1
  141. package/Haptics/index.js.map +0 -1
  142. package/Haptics/types.d.ts +0 -8
  143. package/Haptics/types.d.ts.map +0 -1
  144. package/Haptics/types.js +0 -3
  145. package/Haptics/types.js.map +0 -1
  146. package/InAppPurchase/index.d.ts +0 -23
  147. package/InAppPurchase/index.d.ts.map +0 -1
  148. package/InAppPurchase/index.js.map +0 -1
  149. package/InAppPurchase/types.d.ts +0 -34
  150. package/InAppPurchase/types.d.ts.map +0 -1
  151. package/InAppPurchase/types.js +0 -3
  152. package/InAppPurchase/types.js.map +0 -1
  153. package/InAppUpdate/index.d.ts +0 -12
  154. package/InAppUpdate/index.d.ts.map +0 -1
  155. package/InAppUpdate/index.js.map +0 -1
  156. package/InAppUpdate/types.d.ts +0 -15
  157. package/InAppUpdate/types.d.ts.map +0 -1
  158. package/InAppUpdate/types.js +0 -3
  159. package/InAppUpdate/types.js.map +0 -1
  160. package/MediaPlayer/index.d.ts +0 -17
  161. package/MediaPlayer/index.d.ts.map +0 -1
  162. package/MediaPlayer/index.js.map +0 -1
  163. package/MediaPlayer/types.d.ts +0 -14
  164. package/MediaPlayer/types.d.ts.map +0 -1
  165. package/MediaPlayer/types.js +0 -3
  166. package/MediaPlayer/types.js.map +0 -1
  167. package/NativeContacts/index.d.ts +0 -12
  168. package/NativeContacts/index.d.ts.map +0 -1
  169. package/NativeContacts/index.js.map +0 -1
  170. package/NativeContacts/types.d.ts +0 -14
  171. package/NativeContacts/types.d.ts.map +0 -1
  172. package/NativeContacts/types.js +0 -3
  173. package/NativeContacts/types.js.map +0 -1
  174. package/Notification/index.d.ts +0 -11
  175. package/Notification/index.d.ts.map +0 -1
  176. package/Notification/index.js.map +0 -1
  177. package/Notification/types.d.ts +0 -14
  178. package/Notification/types.d.ts.map +0 -1
  179. package/Notification/types.js +0 -3
  180. package/Notification/types.js.map +0 -1
  181. package/OneSignal/index.d.ts +0 -18
  182. package/OneSignal/index.d.ts.map +0 -1
  183. package/OneSignal/index.js.map +0 -1
  184. package/OneSignal/types.d.ts +0 -41
  185. package/OneSignal/types.d.ts.map +0 -1
  186. package/OneSignal/types.js +0 -4
  187. package/OneSignal/types.js.map +0 -1
  188. package/Printing/index.d.ts +0 -7
  189. package/Printing/index.d.ts.map +0 -1
  190. package/Printing/index.js.map +0 -1
  191. package/Printing/types.d.ts +0 -9
  192. package/Printing/types.d.ts.map +0 -1
  193. package/Printing/types.js +0 -3
  194. package/Printing/types.js.map +0 -1
  195. package/Screen/index.d.ts +0 -9
  196. package/Screen/index.d.ts.map +0 -1
  197. package/Screen/index.js.map +0 -1
  198. package/Screen/types.d.ts +0 -6
  199. package/Screen/types.d.ts.map +0 -1
  200. package/Screen/types.js +0 -4
  201. package/Screen/types.js.map +0 -1
  202. package/Siri/index.d.ts +0 -7
  203. package/Siri/index.d.ts.map +0 -1
  204. package/Siri/index.js.map +0 -1
  205. package/Siri/types.d.ts +0 -14
  206. package/Siri/types.d.ts.map +0 -1
  207. package/Siri/types.js +0 -3
  208. package/Siri/types.js.map +0 -1
  209. package/SocialLogin/apple.d.ts +0 -12
  210. package/SocialLogin/apple.d.ts.map +0 -1
  211. package/SocialLogin/apple.js.map +0 -1
  212. package/SocialLogin/facebook.d.ts +0 -22
  213. package/SocialLogin/facebook.d.ts.map +0 -1
  214. package/SocialLogin/facebook.js.map +0 -1
  215. package/SocialLogin/google.d.ts +0 -22
  216. package/SocialLogin/google.d.ts.map +0 -1
  217. package/SocialLogin/google.js.map +0 -1
  218. package/SocialLogin/index.d.ts +0 -17
  219. package/SocialLogin/index.d.ts.map +0 -1
  220. package/SocialLogin/index.js.map +0 -1
  221. package/SocialLogin/types.d.ts +0 -39
  222. package/SocialLogin/types.d.ts.map +0 -1
  223. package/SocialLogin/types.js +0 -3
  224. package/SocialLogin/types.js.map +0 -1
  225. package/Stripe/index.d.ts +0 -3
  226. package/Stripe/index.d.ts.map +0 -1
  227. package/Stripe/index.js.map +0 -1
  228. package/Stripe/types.d.ts +0 -32
  229. package/Stripe/types.d.ts.map +0 -1
  230. package/Stripe/types.js +0 -3
  231. package/Stripe/types.js.map +0 -1
  232. package/VoiceSearch/index.d.ts +0 -13
  233. package/VoiceSearch/index.d.ts.map +0 -1
  234. package/VoiceSearch/index.js.map +0 -1
  235. package/VoiceSearch/types.d.ts +0 -10
  236. package/VoiceSearch/types.d.ts.map +0 -1
  237. package/VoiceSearch/types.js +0 -3
  238. package/VoiceSearch/types.js.map +0 -1
  239. package/barcode/barcode-scan.d.ts +0 -16
  240. package/barcode/barcode-scan.d.ts.map +0 -1
  241. package/barcode/barcode-scan.js.map +0 -1
  242. package/barcode/barcode-types.d.ts +0 -18
  243. package/barcode/barcode-types.d.ts.map +0 -1
  244. package/barcode/barcode-types.js +0 -3
  245. package/barcode/barcode-types.js.map +0 -1
  246. package/barcode/formats.d.ts +0 -18
  247. package/barcode/formats.d.ts.map +0 -1
  248. package/barcode/formats.js.map +0 -1
  249. package/barcode/index.d.ts +0 -5
  250. package/barcode/index.d.ts.map +0 -1
  251. package/barcode/index.js.map +0 -1
  252. package/barcode/types.d.ts +0 -17
  253. package/barcode/types.d.ts.map +0 -1
  254. package/barcode/types.js.map +0 -1
  255. package/index.d.ts +0 -156
  256. package/index.d.ts.map +0 -1
  257. package/index.js.map +0 -1
  258. package/types/index.d.ts +0 -50
  259. package/types/index.d.ts.map +0 -1
  260. package/types/index.js +0 -4
  261. package/types/index.js.map +0 -1
  262. package/utills.d.ts +0 -12
  263. package/utills.d.ts.map +0 -1
  264. package/utills.js.map +0 -1
@@ -1,42 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.openAppNotificationPage = exports.checkNotificationPermission = void 0;
4
- var utills_1 = require("../utills");
5
- /**
6
- * Checks notification permission status
7
- * @param options - Options for checking notification permission
8
- */
9
- var checkNotificationPermission = 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 === "checkNotificationPermission") {
16
- callback && callback(response);
17
- }
18
- });
19
- utills_1.platform === "ANDROID_APP" && utills_1.webToNative.checkNotificationPermission();
20
- if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
21
- utills_1.webToNativeIos.postMessage({
22
- action: "checkNotificationPermission",
23
- });
24
- }
25
- }
26
- };
27
- exports.checkNotificationPermission = checkNotificationPermission;
28
- /**
29
- * Opens the app notification settings page
30
- */
31
- var openAppNotificationPage = function () {
32
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
33
- utills_1.platform === "ANDROID_APP" && utills_1.webToNative.openAppNotificationPage();
34
- if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
35
- utills_1.webToNativeIos.postMessage({
36
- action: "openAppNotificationPage",
37
- });
38
- }
39
- }
40
- };
41
- exports.openAppNotificationPage = openAppNotificationPage;
42
- //# sourceMappingURL=index.js.map
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.openAppNotificationPage=exports.checkNotificationPermission=void 0;var _utills=require("../utills"),checkNotificationPermission=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){//console.log(response);
2
+ var c=a.type;"checkNotificationPermission"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.checkNotificationPermission(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"checkNotificationPermission"}))};exports.checkNotificationPermission=checkNotificationPermission;/**
3
+ *
4
+ *
5
+ */var openAppNotificationPage=function(){["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&("ANDROID_APP"===_utills.platform&&_utills.webToNative.openAppNotificationPage(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"openAppNotificationPage"}))};exports.openAppNotificationPage=openAppNotificationPage;
@@ -1,265 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.optOutUser = exports.optInUser = exports.logoutSMSNumber = exports.logoutEmail = exports.setSMSNumber = exports.setEmail = exports.getTriggers = exports.getTriggerValue = exports.removeTriggers = exports.removeTrigger = exports.addTriggers = exports.addTrigger = exports.setTags = exports.removeExternalUserId = exports.setExternalUserId = exports.getPlayerId = void 0;
4
- var utills_1 = require("../utills");
5
- var getPlayerId = function () {
6
- return new Promise(function (resolve, reject) {
7
- (0, utills_1.registerCb)(function (results) {
8
- if (results.isSuccess) {
9
- resolve(results.playerId);
10
- }
11
- else {
12
- reject(results);
13
- }
14
- }, {
15
- key: "getPlayerId",
16
- });
17
- if (utills_1.platform === "ANDROID_APP") {
18
- utills_1.webToNative.getOneSignalId();
19
- }
20
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
21
- utills_1.webToNativeIos.postMessage({
22
- action: "getPlayerId",
23
- });
24
- }
25
- else {
26
- reject("This function will work in Native App Powered By WebToNative");
27
- }
28
- });
29
- };
30
- exports.getPlayerId = getPlayerId;
31
- var setExternalUserId = function (userId) {
32
- if (userId) {
33
- if (utills_1.platform === "ANDROID_APP") {
34
- return utills_1.isNativeApp && utills_1.webToNative.setExternalUserId(userId);
35
- }
36
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
37
- utills_1.webToNativeIos.postMessage({
38
- action: "setExternalUserId",
39
- userId: userId,
40
- });
41
- }
42
- }
43
- else {
44
- throw "userId is required";
45
- }
46
- };
47
- exports.setExternalUserId = setExternalUserId;
48
- var removeExternalUserId = function () {
49
- if (utills_1.platform === "ANDROID_APP") {
50
- return utills_1.isNativeApp && utills_1.webToNative.removeExternalUserId();
51
- }
52
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
53
- utills_1.webToNativeIos.postMessage({
54
- action: "removeExternalUserId",
55
- });
56
- }
57
- };
58
- exports.removeExternalUserId = removeExternalUserId;
59
- var setTags = function (_a) {
60
- var tags = _a.tags;
61
- if (tags) {
62
- if (utills_1.platform === "ANDROID_APP") {
63
- return utills_1.isNativeApp && utills_1.webToNative.setUserTags(JSON.stringify(tags));
64
- }
65
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
66
- utills_1.webToNativeIos.postMessage({
67
- action: "setUserTags",
68
- tags: tags,
69
- });
70
- }
71
- }
72
- };
73
- exports.setTags = setTags;
74
- var addTrigger = function (options) {
75
- if (options === void 0) { options = {}; }
76
- var key = options.key, value = options.value;
77
- if (utills_1.platform === "ANDROID_APP") {
78
- utills_1.webToNative.addTrigger(JSON.stringify({
79
- key: key,
80
- value: value,
81
- }));
82
- }
83
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
84
- utills_1.webToNativeIos.postMessage({
85
- action: "addTrigger",
86
- key: key,
87
- value: value,
88
- });
89
- }
90
- };
91
- exports.addTrigger = addTrigger;
92
- var addTriggers = function (options) {
93
- if (options === void 0) { options = {}; }
94
- var triggers = options.triggers;
95
- if (utills_1.platform === "ANDROID_APP") {
96
- utills_1.webToNative.addTriggers(JSON.stringify({
97
- triggers: triggers,
98
- }));
99
- }
100
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
101
- utills_1.webToNativeIos.postMessage({
102
- action: "addTriggers",
103
- triggers: triggers,
104
- });
105
- }
106
- };
107
- exports.addTriggers = addTriggers;
108
- var removeTrigger = function (options) {
109
- if (options === void 0) { options = {}; }
110
- var key = options.key;
111
- if (utills_1.platform === "ANDROID_APP") {
112
- utills_1.webToNative.removeTriggerForKey(key);
113
- }
114
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
115
- utills_1.webToNativeIos.postMessage({
116
- action: "removeTrigger",
117
- key: key,
118
- });
119
- }
120
- };
121
- exports.removeTrigger = removeTrigger;
122
- var removeTriggers = function (options) {
123
- if (options === void 0) { options = {}; }
124
- var keys = options.keys;
125
- if (utills_1.platform === "ANDROID_APP") {
126
- utills_1.webToNative.removeTriggersForKeys(JSON.stringify({ keys: keys }));
127
- }
128
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
129
- utills_1.webToNativeIos.postMessage({
130
- action: "removeTriggers",
131
- keys: keys,
132
- });
133
- }
134
- };
135
- exports.removeTriggers = removeTriggers;
136
- var getTriggerValue = function (options) {
137
- if (options === void 0) { options = {}; }
138
- var key = options.key, callback = options.callback;
139
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
140
- (0, utills_1.registerCb)(function (response) {
141
- var type = response.type;
142
- if (type === "getTriggerValue") {
143
- callback && callback(response);
144
- }
145
- });
146
- if (utills_1.platform === "ANDROID_APP") {
147
- utills_1.webToNative.getTriggerValueForKey(key);
148
- }
149
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
150
- utills_1.webToNativeIos.postMessage({
151
- action: "getTriggerValue",
152
- key: key,
153
- });
154
- }
155
- }
156
- };
157
- exports.getTriggerValue = getTriggerValue;
158
- var getTriggers = function (options) {
159
- if (options === void 0) { options = {}; }
160
- var callback = options.callback;
161
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
162
- (0, utills_1.registerCb)(function (response) {
163
- var type = response.type;
164
- if (type === "getTriggers") {
165
- callback && callback(response);
166
- }
167
- });
168
- if (utills_1.platform === "ANDROID_APP") {
169
- utills_1.webToNative.getTriggers();
170
- }
171
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
172
- utills_1.webToNativeIos.postMessage({
173
- action: "getTriggers",
174
- });
175
- }
176
- }
177
- };
178
- exports.getTriggers = getTriggers;
179
- var setEmail = function (options) {
180
- if (options === void 0) { options = {}; }
181
- var emailId = options.emailId;
182
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
183
- if (utills_1.platform === "ANDROID_APP") {
184
- utills_1.webToNative.setEmail(emailId);
185
- }
186
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
187
- utills_1.webToNativeIos.postMessage({
188
- action: "setEmail",
189
- emailId: emailId,
190
- });
191
- }
192
- }
193
- };
194
- exports.setEmail = setEmail;
195
- var setSMSNumber = function (options) {
196
- if (options === void 0) { options = {}; }
197
- var smsNumber = options.smsNumber;
198
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
199
- if (utills_1.platform === "ANDROID_APP") {
200
- utills_1.webToNative.setSMSNumber(smsNumber);
201
- }
202
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
203
- utills_1.webToNativeIos.postMessage({
204
- action: "setSMSNumber",
205
- smsNumber: smsNumber,
206
- });
207
- }
208
- }
209
- };
210
- exports.setSMSNumber = setSMSNumber;
211
- var logoutEmail = function (options) {
212
- if (options === void 0) { options = {}; }
213
- var emailId = options.emailId;
214
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
215
- if (utills_1.platform === "ANDROID_APP") {
216
- utills_1.webToNative.logoutEmail(emailId);
217
- }
218
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
219
- utills_1.webToNativeIos.postMessage({
220
- action: "logoutEmail",
221
- emailId: emailId,
222
- });
223
- }
224
- }
225
- };
226
- exports.logoutEmail = logoutEmail;
227
- var logoutSMSNumber = function (options) {
228
- if (options === void 0) { options = {}; }
229
- var smsNumber = options.smsNumber;
230
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
231
- if (utills_1.platform === "ANDROID_APP") {
232
- utills_1.webToNative.logoutSMSNumber(smsNumber);
233
- }
234
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
235
- utills_1.webToNativeIos.postMessage({
236
- action: "logoutSMSNumber",
237
- smsNumber: smsNumber,
238
- });
239
- }
240
- }
241
- };
242
- exports.logoutSMSNumber = logoutSMSNumber;
243
- var optInUser = function () {
244
- if (utills_1.platform === "ANDROID_APP") {
245
- utills_1.webToNative.optInOneSignalPermissionDialog();
246
- }
247
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
248
- utills_1.webToNativeIos.postMessage({
249
- action: "optInOneSignalPermissionDialog",
250
- });
251
- }
252
- };
253
- exports.optInUser = optInUser;
254
- var optOutUser = function () {
255
- if (utills_1.platform === "ANDROID_APP") {
256
- utills_1.webToNative.optOutOneSignalPermissionDialog();
257
- }
258
- else if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
259
- utills_1.webToNativeIos.postMessage({
260
- action: "optOutOneSignalPermissionDialog",
261
- });
262
- }
263
- };
264
- exports.optOutUser = optOutUser;
265
- //# sourceMappingURL=index.js.map
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setTags=exports.setSMSNumber=exports.setExternalUserId=exports.setEmail=exports.removeTriggers=exports.removeTrigger=exports.removeExternalUserId=exports.optOutUser=exports.optInUser=exports.logoutSMSNumber=exports.logoutEmail=exports.getTriggers=exports.getTriggerValue=exports.getPlayerId=exports.addTriggers=exports.addTrigger=void 0;var _utills=require("../utills"),getPlayerId=function(){return new Promise(function(a,b){(0,_utills.registerCb)(function(c){c.isSuccess?a(c.playerId):b(c)},{key:"getPlayerId"}),"ANDROID_APP"===_utills.platform?_utills.webToNative.getOneSignalId():"IOS_APP"===_utills.platform?_utills.webToNativeIos.postMessage({action:"getPlayerId"}):b("This function will work in Native App Powered By WebToNative")})};exports.getPlayerId=getPlayerId;var setExternalUserId=function(a){if(a){if("ANDROID_APP"===_utills.platform)return _utills.isNativeApp&&_utills.webToNative.setExternalUserId(a);"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"setExternalUserId",userId:a})}else throw"userId is required"};exports.setExternalUserId=setExternalUserId;var removeExternalUserId=function(){return"ANDROID_APP"===_utills.platform?_utills.isNativeApp&&_utills.webToNative.removeExternalUserId():void("IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"removeExternalUserId"}))};exports.removeExternalUserId=removeExternalUserId;var setTags=function(a){var b=a.tags;if(b){if("ANDROID_APP"===_utills.platform)return _utills.isNativeApp&&_utills.webToNative.setUserTags(JSON.stringify(b));"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"setUserTags",tags:b})}};exports.setTags=setTags;var addTrigger=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.key,c=a.value;"ANDROID_APP"===_utills.platform?_utills.webToNative.addTrigger(JSON.stringify({key:b,value:c})):"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"addTrigger",key:b,value:c})};exports.addTrigger=addTrigger;var addTriggers=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.triggers;"ANDROID_APP"===_utills.platform?_utills.webToNative.addTriggers(JSON.stringify({triggers:b})):"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"addTriggers",triggers:b})};exports.addTriggers=addTriggers;var removeTrigger=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.key;"ANDROID_APP"===_utills.platform?_utills.webToNative.removeTriggerForKey(b):"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"removeTrigger",key:b})};exports.removeTrigger=removeTrigger;var removeTriggers=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.keys;"ANDROID_APP"===_utills.platform?_utills.webToNative.removeTriggersForKeys(JSON.stringify({keys:b})):"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"removeTriggers",keys:b})};exports.removeTriggers=removeTriggers;var getTriggerValue=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.key,c=a.callback;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var b=a.type;"getTriggerValue"===b&&c&&c(a)}),"ANDROID_APP"===_utills.platform?_utills.webToNative.getTriggerValueForKey(b):"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"getTriggerValue",key:b}))};exports.getTriggerValue=getTriggerValue;var getTriggers=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;"getTriggers"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform?_utills.webToNative.getTriggers():"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"getTriggers"}))};exports.getTriggers=getTriggers;var setEmail=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.emailId;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&"ANDROID_APP"===_utills.platform&&_utills.webToNative.setEmail(b)};exports.setEmail=setEmail;var setSMSNumber=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.smsNumber;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&"ANDROID_APP"===_utills.platform&&_utills.webToNative.setSMSNumber(b)};exports.setSMSNumber=setSMSNumber;var logoutEmail=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.emailId;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&"ANDROID_APP"===_utills.platform&&_utills.webToNative.logoutEmail(b)};exports.logoutEmail=logoutEmail;var logoutSMSNumber=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.smsNumber;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&"ANDROID_APP"===_utills.platform&&_utills.webToNative.logoutSMSNumber(b)};exports.logoutSMSNumber=logoutSMSNumber;var optInUser=function(){"ANDROID_APP"===_utills.platform?_utills.webToNative.optInOneSignalPermissionDialog():"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"optInOneSignalPermissionDialog"})};exports.optInUser=optInUser;var optOutUser=function(){0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};"ANDROID_APP"===_utills.platform?_utills.webToNative.optOutOneSignalPermissionDialog():"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"optOutOneSignalPermissionDialog"})};exports.optOutUser=optOutUser;
package/Printing/index.js CHANGED
@@ -1,20 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setPrintSize = void 0;
4
- var utills_1 = require("../utills");
5
- /**
6
- * Sets the print size for Android printing
7
- * @param options - Options for setting print size
8
- */
9
- var setPrintSize = function (options) {
10
- if (["ANDROID_APP"].includes(utills_1.platform)) {
11
- var _a = options.printSize, printSize = _a === void 0 ? "ISO_A4" : _a, _b = options.label, label = _b === void 0 ? "" : _b;
12
- utills_1.platform === "ANDROID_APP" &&
13
- utills_1.webToNative.setPrintSize(JSON.stringify({
14
- printSize: printSize,
15
- label: label
16
- }));
17
- }
18
- };
19
- exports.setPrintSize = setPrintSize;
20
- //# sourceMappingURL=index.js.map
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setPrintSize=void 0;var _utills=require("../utills"),setPrintSize=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.printSize,c=void 0===b?"ISO_A4":b,d=a.label,e=void 0===d?"":d;"ANDROID_APP"===_utills.platform&&_utills.webToNative.setPrintSize(JSON.stringify({printSize:c,label:e}))}};exports.setPrintSize=setPrintSize;
package/README.md CHANGED
@@ -1,33 +1,4 @@
1
- # WebToNative SDK
1
+ Repository for webtonative javascript sdk. Build your android/ios app from https://webtonative.com
2
2
 
3
- Repository for WebToNative TypeScript/JavaScript SDK. Build your Android/iOS app from https://webtonative.com
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install webtonative
9
- ```
10
-
11
- ## TypeScript Support
12
-
13
- This package includes TypeScript type definitions. You can use it in your TypeScript projects with full type checking and autocompletion support.
14
-
15
- ```typescript
16
- import webtonative from 'webtonative';
17
-
18
- // Initialize the SDK
19
- const wtn = webtonative();
20
-
21
- // Use with TypeScript type checking
22
- wtn.statusBar({ color: '#FFFFFF', style: 'dark' });
23
-
24
- // Access device information with typed response
25
- wtn.deviceInfo().then(info => {
26
- console.log(info);
27
- });
28
- ```
29
-
30
- ## Documentation
31
-
32
- For complete documentation, visit:
3
+ Looking for the documentation?
33
4
  https://docs.webtonative.com
package/Screen/index.js CHANGED
@@ -1,35 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.keepScreenNormal = exports.keepScreenOn = void 0;
4
- var utills_1 = require("../utills");
5
- /**
6
- * Keeps the screen on (prevents screen from turning off)
7
- */
8
- var keepScreenOn = function () {
9
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
10
- if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
11
- utills_1.webToNativeIos.postMessage({
12
- action: "keepScreenOn",
13
- flag: true,
14
- });
15
- }
16
- utills_1.platform === "ANDROID_APP" && utills_1.webToNative.keepScreenOn();
17
- }
18
- };
19
- exports.keepScreenOn = keepScreenOn;
20
- /**
21
- * Returns screen to normal behavior (allows screen to turn off)
22
- */
23
- var keepScreenNormal = function () {
24
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
25
- if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
26
- utills_1.webToNativeIos.postMessage({
27
- action: "keepScreenOn",
28
- flag: false,
29
- });
30
- }
31
- utills_1.platform === "ANDROID_APP" && utills_1.webToNative.keepScreenNormal();
32
- }
33
- };
34
- exports.keepScreenNormal = keepScreenNormal;
35
- //# sourceMappingURL=index.js.map
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.keepScreenOn=exports.keepScreenNormal=void 0;var _utills=require("../utills"),keepScreenOn=function(){["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&("IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"keepScreenOn",flag:!0}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.keepScreenOn())};exports.keepScreenOn=keepScreenOn;/**
2
+ *
3
+ *
4
+ */var keepScreenNormal=function(){["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&("IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"keepScreenOn",flag:!1}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.keepScreenNormal())};exports.keepScreenNormal=keepScreenNormal;
package/Siri/index.js CHANGED
@@ -1,26 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addToSiri = void 0;
4
- var utills_1 = require("../utills");
5
- /**
6
- * Adds an action to Siri (iOS only)
7
- * @param options - Options for adding to Siri
8
- */
9
- var addToSiri = function (options) {
10
- if (options === void 0) { options = {}; }
11
- var actionUrl = options.actionUrl, suggestedPhrase = options.suggestedPhrase, title = options.title;
12
- if (["IOS_APP"].includes(utills_1.platform)) {
13
- if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
14
- utills_1.webToNativeIos.postMessage({
15
- "action": "addToSiri",
16
- "data": {
17
- actionUrl: actionUrl,
18
- suggestedPhrase: suggestedPhrase,
19
- title: title
20
- }
21
- });
22
- }
23
- }
24
- };
25
- exports.addToSiri = addToSiri;
26
- //# sourceMappingURL=index.js.map
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addToSiri=void 0;var _utills=require("../utills"),addToSiri=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.actionUrl,c=a.suggestedPhrase,d=a.title;["IOS_APP"].includes(_utills.platform)&&"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"addToSiri",data:{actionUrl:b,suggestedPhrase:c,title:d}})};exports.addToSiri=addToSiri;
@@ -1,32 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.login = void 0;
4
- var utills_1 = require("../utills");
5
- /**
6
- * This function handles native Apple login
7
- * @param options - Options for Apple login
8
- * @example wtn.socialLogin.apple.login({
9
- * callback:(data)=>{
10
- * console.log(data);
11
- * }
12
- * });
13
- */
14
- var login = function (options) {
15
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
16
- var callback_1 = options.callback, scope = options.scope;
17
- (0, utills_1.registerCb)(function (response) {
18
- var type = response.type;
19
- if (type === "appleLoginToken") {
20
- callback_1 && callback_1(response);
21
- }
22
- });
23
- if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
24
- utills_1.webToNativeIos.postMessage({
25
- action: "appleSignIn",
26
- scope: scope,
27
- });
28
- }
29
- }
30
- };
31
- exports.login = login;
32
- //# sourceMappingURL=apple.js.map
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.login=void 0;var _utills=require("../utills"),login=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.scope;(0,_utills.registerCb)(function(a){var c=a.type;"appleLoginToken"===c&&b&&b(a)}),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"appleSignIn",scope:c})}};exports.login=login;
@@ -1,61 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.logout = exports.login = void 0;
4
- var utills_1 = require("../utills");
5
- /**
6
- * This function handles native facebook login
7
- * @param options - Options for Facebook login
8
- * @example wtn.socialLogin.facebook.login({
9
- * callback:(data)=>{
10
- * console.log(data);
11
- * }
12
- * });
13
- */
14
- var login = function (options) {
15
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
16
- var callback_1 = options.callback, scope = options.scope;
17
- (0, utills_1.registerCb)(function (response) {
18
- var type = response.type;
19
- if (type === "fbLoginToken") {
20
- callback_1 && callback_1(response);
21
- }
22
- });
23
- utills_1.platform === "ANDROID_APP" && utills_1.webToNative.loginWithFacebook();
24
- if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
25
- utills_1.webToNativeIos.postMessage({
26
- action: "fbSignIn",
27
- scope: scope,
28
- });
29
- }
30
- }
31
- };
32
- exports.login = login;
33
- /**
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.logout=exports.login=void 0;var _utills=require("../utills"),login=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.scope;(0,_utills.registerCb)(function(a){var c=a.type;"fbLoginToken"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.loginWithFacebook(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"fbSignIn",scope:c})}};exports.login=login;/**
34
2
  * This function handles native facebook logout
35
- * @param options - Options for Facebook logout
3
+ * @param {object} options
36
4
  * @example wtn.socialLogin.facebook.logout({
37
5
  * callback:(data)=>{
38
6
  * console.log(data);
39
7
  * }
40
8
  * });
41
- */
42
- var logout = function (options) {
43
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
44
- var callback_2 = options.callback, scope = options.scope;
45
- (0, utills_1.registerCb)(function (response) {
46
- var type = response.type;
47
- if (type === "fbLogOut") {
48
- callback_2 && callback_2(response);
49
- }
50
- });
51
- utills_1.platform === "ANDROID_APP" && utills_1.webToNative.logoutWithFacebook();
52
- if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
53
- utills_1.webToNativeIos.postMessage({
54
- action: "fbSignOut",
55
- scope: scope,
56
- });
57
- }
58
- }
59
- };
60
- exports.logout = logout;
61
- //# sourceMappingURL=facebook.js.map
9
+ */var logout=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.scope;(0,_utills.registerCb)(function(a){var c=a.type;"fbLogOut"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.logoutWithFacebook(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"fbSignOut",scope:c})}};exports.logout=logout;
@@ -1,61 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.logout = exports.login = void 0;
4
- var utills_1 = require("../utills");
5
- /**
6
- * This function handles native Google login
7
- * @param options - Options for Google login
8
- * @example wtn.socialLogin.google.login({
9
- * callback:(data)=>{
10
- * console.log(data);
11
- * }
12
- * });
13
- */
14
- var login = function (options) {
15
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
16
- var callback_1 = options.callback, scope = options.scope;
17
- (0, utills_1.registerCb)(function (response) {
18
- var type = response.type;
19
- if (type === "googleLoginToken") {
20
- callback_1 && callback_1(response);
21
- }
22
- });
23
- utills_1.platform === "ANDROID_APP" && utills_1.webToNative.signInWithGoogle();
24
- if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
25
- utills_1.webToNativeIos.postMessage({
26
- action: "googleSignIn",
27
- scope: scope,
28
- });
29
- }
30
- }
31
- };
32
- exports.login = login;
33
- /**
34
- * This function handles native Google logout
35
- * @param options - Options for Google logout
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.logout=exports.login=void 0;var _utills=require("../utills"),login=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.scope;(0,_utills.registerCb)(function(a){var c=a.type;"googleLoginToken"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.signInWithGoogle(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"googleSignIn",scope:c})}};exports.login=login;/**
2
+ * This function handles native google logout
3
+ * @param {object} options
36
4
  * @example wtn.socialLogin.google.logout({
37
5
  * callback:(data)=>{
38
6
  * console.log(data);
39
7
  * }
40
8
  * });
41
- */
42
- var logout = function (options) {
43
- if (["ANDROID_APP", "IOS_APP"].includes(utills_1.platform)) {
44
- var callback_2 = options.callback, scope = options.scope;
45
- (0, utills_1.registerCb)(function (response) {
46
- var type = response.type;
47
- if (type === "googleLogOut") {
48
- callback_2 && callback_2(response);
49
- }
50
- });
51
- utills_1.platform === "ANDROID_APP" && utills_1.webToNative.signOutWithGoogle();
52
- if (utills_1.platform === "IOS_APP" && utills_1.webToNativeIos) {
53
- utills_1.webToNativeIos.postMessage({
54
- action: "googleSignOut",
55
- scope: scope,
56
- });
57
- }
58
- }
59
- };
60
- exports.logout = logout;
61
- //# sourceMappingURL=google.js.map
9
+ */var logout=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.scope;(0,_utills.registerCb)(function(a){var c=a.type;"googleLogOut"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.signOutWithGoogle(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"googleSignOut",scope:c})}};exports.logout=logout;
@@ -1,23 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.socialLogin = void 0;
4
- var facebook_1 = require("./facebook");
5
- var apple_1 = require("./apple");
6
- var google_1 = require("./google");
7
- /**
8
- * Social login module for Facebook, Google, and Apple authentication
9
- */
10
- exports.socialLogin = {
11
- facebook: {
12
- login: facebook_1.login,
13
- logout: facebook_1.logout,
14
- },
15
- google: {
16
- login: google_1.login,
17
- logout: google_1.logout,
18
- },
19
- apple: {
20
- login: apple_1.login,
21
- },
22
- };
23
- //# sourceMappingURL=index.js.map
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.socialLogin=void 0;var _facebook=require("./facebook"),_apple=require("./apple"),_google=require("./google"),socialLogin={facebook:{login:_facebook.login,logout:_facebook.logout},google:{login:_google.login,logout:_google.logout},apple:{login:_apple.login}};exports.socialLogin=socialLogin;