cordova-admob-tomitank 1.1.8 → 1.2.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.
package/www/admob.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
+ var exec = require('cordova/exec');
3
4
  var cordova$1 = require('cordova');
4
5
  var channel = require('cordova/channel');
5
- var exec = require('cordova/exec');
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -24,9 +24,9 @@ function _interopNamespace(e) {
24
24
  return Object.freeze(n);
25
25
  }
26
26
 
27
+ var exec__default = /*#__PURE__*/_interopDefaultLegacy(exec);
27
28
  var cordova__namespace = /*#__PURE__*/_interopNamespace(cordova$1);
28
29
  var channel__default = /*#__PURE__*/_interopDefaultLegacy(channel);
29
- var exec__default = /*#__PURE__*/_interopDefaultLegacy(exec);
30
30
 
31
31
  /******************************************************************************
32
32
  Copyright (c) Microsoft Corporation.
@@ -108,16 +108,6 @@ function __generator(thisArg, body) {
108
108
  }
109
109
  }
110
110
 
111
- function __spreadArray(to, from, pack) {
112
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
113
- if (ar || !(i in from)) {
114
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
115
- ar[i] = from[i];
116
- }
117
- }
118
- return to.concat(ar || Array.prototype.slice.call(from));
119
- }
120
-
121
111
  typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
122
112
  var e = new Error(message);
123
113
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
@@ -126,71 +116,33 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
126
116
  // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
127
117
  var NativeActions;
128
118
  (function (NativeActions) {
129
- NativeActions["adCreate"] = "adCreate";
130
- NativeActions["adHide"] = "adHide";
131
- NativeActions["adIsLoaded"] = "adIsLoaded";
119
+ NativeActions["ready"] = "ready";
120
+ NativeActions["start"] = "start";
132
121
  NativeActions["adLoad"] = "adLoad";
133
122
  NativeActions["adShow"] = "adShow";
134
- NativeActions["bannerConfig"] = "bannerConfig";
135
- NativeActions["bannerHide"] = "bannerHide";
136
- NativeActions["bannerLoad"] = "bannerLoad";
137
- NativeActions["bannerShow"] = "bannerShow";
138
- NativeActions["configRequest"] = "configRequest";
123
+ NativeActions["adHide"] = "adHide";
124
+ NativeActions["adCreate"] = "adCreate";
139
125
  NativeActions["configure"] = "configure";
140
- NativeActions["interstitialIsLoaded"] = "interstitialIsLoaded";
141
- NativeActions["interstitialLoad"] = "interstitialLoad";
142
- NativeActions["interstitialShow"] = "interstitialShow";
143
- NativeActions["ready"] = "ready";
144
- NativeActions["requestTrackingAuthorization"] = "requestTrackingAuthorization";
145
- NativeActions["rewardedInterstitialIsLoaded"] = "rewardedInterstitialIsLoaded";
146
- NativeActions["rewardedInterstitialLoad"] = "rewardedInterstitialLoad";
147
- NativeActions["rewardedInterstitialShow"] = "rewardedInterstitialShow";
148
- NativeActions["rewardedIsLoaded"] = "rewardedIsLoaded";
149
- NativeActions["rewardedLoad"] = "rewardedLoad";
150
- NativeActions["rewardedShow"] = "rewardedShow";
126
+ NativeActions["adIsLoaded"] = "adIsLoaded";
151
127
  NativeActions["setAppMuted"] = "setAppMuted";
152
128
  NativeActions["setAppVolume"] = "setAppVolume";
153
- NativeActions["start"] = "start";
129
+ NativeActions["bannerConfig"] = "bannerConfig";
130
+ NativeActions["configRequest"] = "configRequest";
131
+ NativeActions["requestTrackingAuthorization"] = "requestTrackingAuthorization";
154
132
  })(NativeActions || (NativeActions = {}));
155
133
  var Events;
156
134
  (function (Events) {
135
+ Events["ready"] = "admob.ready";
136
+ Events["adLoad"] = "admob.ad.load";
137
+ Events["adShow"] = "admob.ad.show";
157
138
  Events["adClick"] = "admob.ad.click";
139
+ Events["adReward"] = "admob.ad.reward";
158
140
  Events["adDismiss"] = "admob.ad.dismiss";
159
- Events["adImpression"] = "admob.ad.impression";
160
- Events["adLoad"] = "admob.ad.load";
161
141
  Events["adLoadFail"] = "admob.ad.loadfail";
162
- Events["adReward"] = "admob.ad.reward";
163
- Events["adShow"] = "admob.ad.show";
164
142
  Events["adShowFail"] = "admob.ad.showfail";
165
- Events["bannerClick"] = "admob.banner.click";
166
- Events["bannerClose"] = "admob.banner.close";
167
- Events["bannerImpression"] = "admob.banner.impression";
168
- Events["bannerLoad"] = "admob.banner.load";
169
- Events["bannerLoadFail"] = "admob.banner.loadfail";
170
- Events["bannerOpen"] = "admob.banner.open";
171
- Events["bannerSize"] = "admob.banner.size";
172
- Events["bannerSizeChange"] = "admob.banner.sizechange";
173
- Events["interstitialDismiss"] = "admob.interstitial.dismiss";
174
- Events["interstitialImpression"] = "admob.interstitial.impression";
175
- Events["interstitialLoad"] = "admob.interstitial.load";
176
- Events["interstitialLoadFail"] = "admob.interstitial.loadfail";
177
- Events["interstitialShow"] = "admob.interstitial.show";
178
- Events["interstitialShowFail"] = "admob.interstitial.showfail";
179
- Events["ready"] = "admob.ready";
180
- Events["rewardedDismiss"] = "admob.rewarded.dismiss";
181
- Events["rewardedImpression"] = "admob.rewarded.impression";
182
- Events["rewardedInterstitialDismiss"] = "admob.rewardedi.dismiss";
183
- Events["rewardedInterstitialImpression"] = "admob.rewardedi.impression";
184
- Events["rewardedInterstitialLoad"] = "admob.rewardedi.load";
185
- Events["rewardedInterstitialLoadFail"] = "admob.rewardedi.loadfail";
186
- Events["rewardedInterstitialReward"] = "admob.rewardedi.reward";
187
- Events["rewardedInterstitialShow"] = "admob.rewardedi.show";
188
- Events["rewardedInterstitialShowFail"] = "admob.rewardedi.showfail";
189
- Events["rewardedLoad"] = "admob.rewarded.load";
190
- Events["rewardedLoadFail"] = "admob.rewarded.loadfail";
191
- Events["rewardedReward"] = "admob.rewarded.reward";
192
- Events["rewardedShow"] = "admob.rewarded.show";
193
- Events["rewardedShowFail"] = "admob.rewarded.showfail";
143
+ Events["adImpression"] = "admob.ad.impression";
144
+ Events["bannerSizeChange"] = "admob.ad.sizechange";
145
+ Events["bannerSize"] = "admob.ad.size"; // use same path
194
146
  })(Events || (Events = {}));
195
147
  var AdSizeType;
196
148
  (function (AdSizeType) {
@@ -246,22 +198,17 @@ var MobileAd = /** @class */ (function () {
246
198
  enumerable: false,
247
199
  configurable: true
248
200
  });
249
- MobileAd.prototype.on = function () {
201
+ MobileAd.prototype.on = function (eventName, callback, useCapture) {
250
202
  var _this = this;
251
- var args = [];
252
- for (var _i = 0; _i < arguments.length; _i++) {
253
- args[_i] = arguments[_i];
254
- }
255
- var eventName = args[0], cb = args[1], rest = args.slice(2);
256
203
  var type = "admob.ad.".concat(eventName.toLowerCase());
257
204
  var listener = function (evt) {
258
205
  if (evt.ad === _this) {
259
- cb(evt);
206
+ callback(evt);
260
207
  }
261
208
  };
262
- document.addEventListener.apply(document, __spreadArray([type, listener], rest, false));
209
+ document.addEventListener(type, listener, useCapture);
263
210
  return function () {
264
- document.removeEventListener.apply(document, __spreadArray([type, listener], rest, false));
211
+ document.removeEventListener(type, listener, useCapture);
265
212
  };
266
213
  };
267
214
  MobileAd.prototype.isLoaded = function () {
@@ -350,7 +297,6 @@ var MobileAd = /** @class */ (function () {
350
297
  };
351
298
  MobileAd.type = '';
352
299
  MobileAd.allAds = {};
353
- MobileAd.idCounter = 0;
354
300
  return MobileAd;
355
301
  }());
356
302
  var MaxAdContentRating;
@@ -391,6 +337,24 @@ var AppOpenAd = /** @class */ (function (_super) {
391
337
  return AppOpenAd;
392
338
  }(MobileAd));
393
339
 
340
+ var InterstitialAd = /** @class */ (function (_super) {
341
+ __extends(InterstitialAd, _super);
342
+ function InterstitialAd() {
343
+ return _super !== null && _super.apply(this, arguments) || this;
344
+ }
345
+ InterstitialAd.prototype.isLoaded = function () {
346
+ return _super.prototype.isLoaded.call(this);
347
+ };
348
+ InterstitialAd.prototype.load = function () {
349
+ return _super.prototype.load.call(this);
350
+ };
351
+ InterstitialAd.prototype.show = function () {
352
+ return _super.prototype.show.call(this);
353
+ };
354
+ InterstitialAd.cls = 'InterstitialAd';
355
+ return InterstitialAd;
356
+ }(MobileAd));
357
+
394
358
  var colorToRGBA = (function () {
395
359
  var canvas = document.createElement('canvas');
396
360
  canvas.width = canvas.height = 1;
@@ -470,24 +434,6 @@ var BannerAd = /** @class */ (function (_super) {
470
434
  return BannerAd;
471
435
  }(MobileAd));
472
436
 
473
- var InterstitialAd = /** @class */ (function (_super) {
474
- __extends(InterstitialAd, _super);
475
- function InterstitialAd() {
476
- return _super !== null && _super.apply(this, arguments) || this;
477
- }
478
- InterstitialAd.prototype.isLoaded = function () {
479
- return _super.prototype.isLoaded.call(this);
480
- };
481
- InterstitialAd.prototype.load = function () {
482
- return _super.prototype.load.call(this);
483
- };
484
- InterstitialAd.prototype.show = function () {
485
- return _super.prototype.show.call(this);
486
- };
487
- InterstitialAd.cls = 'InterstitialAd';
488
- return InterstitialAd;
489
- }(MobileAd));
490
-
491
437
  var NativeAd = /** @class */ (function (_super) {
492
438
  __extends(NativeAd, _super);
493
439
  function NativeAd() {