cordova-admob-tomitank 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/README.md +17 -0
  3. package/esm/admob.d.ts +3 -0
  4. package/esm/admob.js +22 -0
  5. package/esm/admob.js.map +1 -0
  6. package/esm/api.d.ts +61 -0
  7. package/esm/api.js +232 -0
  8. package/esm/api.js.map +1 -0
  9. package/esm/app-open.d.ts +17 -0
  10. package/esm/app-open.js +83 -0
  11. package/esm/app-open.js.map +1 -0
  12. package/esm/banner.d.ts +33 -0
  13. package/esm/banner.js +143 -0
  14. package/esm/banner.js.map +1 -0
  15. package/esm/generated.d.ts +77 -0
  16. package/esm/generated.js +104 -0
  17. package/esm/generated.js.map +1 -0
  18. package/esm/index.d.ts +31 -0
  19. package/esm/index.js +95 -0
  20. package/esm/index.js.map +1 -0
  21. package/esm/interstitial.d.ts +7 -0
  22. package/esm/interstitial.js +35 -0
  23. package/esm/interstitial.js.map +1 -0
  24. package/esm/native.d.ts +19 -0
  25. package/esm/native.js +134 -0
  26. package/esm/native.js.map +1 -0
  27. package/esm/rewarded-interstitial.d.ts +10 -0
  28. package/esm/rewarded-interstitial.js +35 -0
  29. package/esm/rewarded-interstitial.js.map +1 -0
  30. package/esm/rewarded.d.ts +14 -0
  31. package/esm/rewarded.js +35 -0
  32. package/esm/rewarded.js.map +1 -0
  33. package/esm/shared.d.ts +2 -0
  34. package/esm/shared.js +3 -0
  35. package/esm/shared.js.map +1 -0
  36. package/lib/admob.d.ts +3 -0
  37. package/lib/admob.js +50 -0
  38. package/lib/admob.js.map +1 -0
  39. package/lib/api.d.ts +61 -0
  40. package/lib/api.js +240 -0
  41. package/lib/api.js.map +1 -0
  42. package/lib/app-open.d.ts +17 -0
  43. package/lib/app-open.js +85 -0
  44. package/lib/app-open.js.map +1 -0
  45. package/lib/banner.d.ts +33 -0
  46. package/lib/banner.js +145 -0
  47. package/lib/banner.js.map +1 -0
  48. package/lib/generated.d.ts +77 -0
  49. package/lib/generated.js +110 -0
  50. package/lib/generated.js.map +1 -0
  51. package/lib/index.d.ts +31 -0
  52. package/lib/index.js +120 -0
  53. package/lib/index.js.map +1 -0
  54. package/lib/interstitial.d.ts +7 -0
  55. package/lib/interstitial.js +37 -0
  56. package/lib/interstitial.js.map +1 -0
  57. package/lib/native.d.ts +19 -0
  58. package/lib/native.js +136 -0
  59. package/lib/native.js.map +1 -0
  60. package/lib/rewarded-interstitial.d.ts +10 -0
  61. package/lib/rewarded-interstitial.js +37 -0
  62. package/lib/rewarded-interstitial.js.map +1 -0
  63. package/lib/rewarded.d.ts +14 -0
  64. package/lib/rewarded.js +37 -0
  65. package/lib/rewarded.js.map +1 -0
  66. package/lib/shared.d.ts +2 -0
  67. package/lib/shared.js +19 -0
  68. package/lib/shared.js.map +1 -0
  69. package/package.json +73 -0
  70. package/plugin.xml +333 -0
  71. package/scripts/iosNSAppTransportSecurity.js +29 -0
  72. package/scripts/iosNSAppTransportSecurity.ts +33 -0
  73. package/scripts/tsconfig.json +5 -0
  74. package/scripts/util.js +34 -0
  75. package/scripts/util.ts +44 -0
  76. package/src/android/cordova/AdMob.java +256 -0
  77. package/src/android/cordova/ExecuteContext.java +174 -0
  78. package/src/android/cordova/Generated.java +72 -0
  79. package/src/android/cordova/ads/AdBase.java +54 -0
  80. package/src/android/cordova/ads/AppOpen.java +98 -0
  81. package/src/android/cordova/ads/Banner.java +370 -0
  82. package/src/android/cordova/ads/Interstitial.java +101 -0
  83. package/src/android/cordova/ads/Native.java +162 -0
  84. package/src/android/cordova/ads/Rewarded.java +108 -0
  85. package/src/android/cordova/ads/RewardedInterstitial.java +108 -0
  86. package/src/android/core/Ad.java +73 -0
  87. package/src/android/core/Context.java +186 -0
  88. package/src/android/core/GenericAd.java +22 -0
  89. package/src/android/core/Helper.java +134 -0
  90. package/src/browser/AdMobProxy.js +33 -0
  91. package/src/ios/AMBAdBase.swift +72 -0
  92. package/src/ios/AMBAppOpenAd.swift +87 -0
  93. package/src/ios/AMBBanner.swift +294 -0
  94. package/src/ios/AMBContext.swift +166 -0
  95. package/src/ios/AMBCore.swift +232 -0
  96. package/src/ios/AMBGenerated.swift +45 -0
  97. package/src/ios/AMBInterstitial.swift +69 -0
  98. package/src/ios/AMBNativeAd.swift +128 -0
  99. package/src/ios/AMBPlugin.swift +198 -0
  100. package/src/ios/AMBRewarded.swift +72 -0
  101. package/src/ios/AMBRewardedInterstitial.swift +72 -0
  102. package/src/www/admob.ts +26 -0
  103. package/src/www/api.ts +156 -0
  104. package/src/www/app-open.ts +27 -0
  105. package/src/www/banner.ts +102 -0
  106. package/src/www/cordova.d.ts +9 -0
  107. package/src/www/generated.ts +125 -0
  108. package/src/www/index.ts +88 -0
  109. package/src/www/interstitial.ts +17 -0
  110. package/src/www/native.ts +54 -0
  111. package/src/www/rewarded-interstitial.ts +20 -0
  112. package/src/www/rewarded.ts +26 -0
  113. package/src/www/shared.ts +2 -0
  114. package/www/admob.js +675 -0
@@ -0,0 +1,54 @@
1
+ import { MobileAd, MobileAdOptions } from './shared'
2
+
3
+ type ShowOptions = { x: number; y: number; width: number; height: number }
4
+
5
+ export interface NativeAdOptions extends MobileAdOptions {
6
+ view?: string
7
+ }
8
+
9
+ export default class NativeAd extends MobileAd<NativeAdOptions> {
10
+ static cls = 'NativeAd'
11
+
12
+ public isLoaded() {
13
+ return super.isLoaded()
14
+ }
15
+
16
+ async hide() {
17
+ return super.hide()
18
+ }
19
+
20
+ public load() {
21
+ return super.load()
22
+ }
23
+
24
+ async show(opts?: ShowOptions) {
25
+ return super.show({
26
+ x: 0,
27
+ y: 0,
28
+ width: 0,
29
+ height: 0,
30
+ ...opts,
31
+ })
32
+ }
33
+
34
+ async showWith(elm: HTMLElement) {
35
+ const update = async () => {
36
+ const r = elm.getBoundingClientRect()
37
+ await this.show({
38
+ x: r.x,
39
+ y: r.y,
40
+ width: r.width,
41
+ height: r.height,
42
+ })
43
+ }
44
+ const observer = new MutationObserver(update)
45
+ observer.observe(document.body, {
46
+ attributes: true,
47
+ childList: true,
48
+ subtree: true,
49
+ })
50
+ document.addEventListener('scroll', update)
51
+ window.addEventListener('resize', update)
52
+ await update()
53
+ }
54
+ }
@@ -0,0 +1,20 @@
1
+ import { RewardedAdOptions } from './rewarded'
2
+ import { MobileAd } from './shared'
3
+
4
+ export interface RewardedInterstitialAdOptions extends RewardedAdOptions {}
5
+
6
+ export default class RewardedInterstitialAd extends MobileAd<RewardedInterstitialAdOptions> {
7
+ static cls = 'RewardedInterstitialAd'
8
+
9
+ public isLoaded() {
10
+ return super.isLoaded()
11
+ }
12
+
13
+ public load() {
14
+ return super.load()
15
+ }
16
+
17
+ public show() {
18
+ return super.show()
19
+ }
20
+ }
@@ -0,0 +1,26 @@
1
+ import { MobileAd, MobileAdOptions } from './shared'
2
+
3
+ export interface ServerSideVerificationOptions {
4
+ customData?: string
5
+ userId?: string
6
+ }
7
+
8
+ export interface RewardedAdOptions extends MobileAdOptions {
9
+ serverSideVerification?: ServerSideVerificationOptions
10
+ }
11
+
12
+ export default class RewardedAd extends MobileAd<RewardedAdOptions> {
13
+ static cls = 'RewardedAd'
14
+
15
+ public isLoaded() {
16
+ return super.isLoaded()
17
+ }
18
+
19
+ public load() {
20
+ return super.load()
21
+ }
22
+
23
+ public show() {
24
+ return super.show()
25
+ }
26
+ }
@@ -0,0 +1,2 @@
1
+ export * from './api'
2
+ export * from './generated'