react-native-google-mobile-ads 10.3.1 → 10.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,11 @@ class GAMBannerAd extends _react.default.Component {
17
17
  _defineProperty(this, "ref", /*#__PURE__*/(0, _react.createRef)());
18
18
  }
19
19
  recordManualImpression() {
20
- _reactNative.UIManager.dispatchViewManagerCommand((0, _reactNative.findNodeHandle)(this.ref.current), _reactNative.UIManager.getViewManagerConfig('RNGoogleMobileAdsBannerView').Commands.recordManualImpression.toString(), undefined);
20
+ let commandID = _reactNative.UIManager.getViewManagerConfig('RNGoogleMobileAdsBannerView').Commands.recordManualImpression;
21
+ if (_reactNative.Platform.OS === 'android') {
22
+ commandID = commandID.toString();
23
+ }
24
+ _reactNative.UIManager.dispatchViewManagerCommand((0, _reactNative.findNodeHandle)(this.ref.current), commandID, undefined);
21
25
  }
22
26
  render() {
23
27
  return /*#__PURE__*/_react.default.createElement(_BaseAd.BaseAd, _extends({
@@ -1 +1 @@
1
- {"version":3,"names":["GAMBannerAd","React","Component","createRef","recordManualImpression","UIManager","dispatchViewManagerCommand","findNodeHandle","ref","current","getViewManagerConfig","Commands","toString","undefined","render","props"],"sourceRoot":"../../src","sources":["GAMBannerAd.tsx"],"mappings":";;;;;;AAiBA;AACA;AAEA;AAA6D;AAAA;AAAA;AAAA;AAEtD,MAAMA,WAAW,SAASC,cAAK,CAACC,SAAS,CAAmB;EAAA;IAAA;IAAA,0CACnD,IAAAC,gBAAS,GAA6B;EAAA;EAEpDC,sBAAsB,GAAG;IACvBC,sBAAS,CAACC,0BAA0B,CAClC,IAAAC,2BAAc,EAAC,IAAI,CAACC,GAAG,CAACC,OAAO,CAAC,EAChCJ,sBAAS,CAACK,oBAAoB,CAC5B,6BAA6B,CAC9B,CAACC,QAAQ,CAACP,sBAAsB,CAACQ,QAAQ,EAAE,EAC5CC,SAAS,CACV;EACH;EAEAC,MAAM,GAAG;IACP,oBAAO,6BAAC,cAAM;MAAC,GAAG,EAAE,IAAI,CAACN;IAAI,GAAK,IAAI,CAACO,KAAK,EAAI;EAClD;AACF;AAAC"}
1
+ {"version":3,"names":["GAMBannerAd","React","Component","createRef","recordManualImpression","commandID","UIManager","getViewManagerConfig","Commands","Platform","OS","toString","dispatchViewManagerCommand","findNodeHandle","ref","current","undefined","render","props"],"sourceRoot":"../../src","sources":["GAMBannerAd.tsx"],"mappings":";;;;;;AAiBA;AACA;AAEA;AAA6D;AAAA;AAAA;AAAA;AAEtD,MAAMA,WAAW,SAASC,cAAK,CAACC,SAAS,CAAmB;EAAA;IAAA;IAAA,0CACnD,IAAAC,gBAAS,GAA6B;EAAA;EAEpDC,sBAAsB,GAAG;IACvB,IAAIC,SAA0B,GAAGC,sBAAS,CAACC,oBAAoB,CAAC,6BAA6B,CAAC,CAC3FC,QAAQ,CAACJ,sBAAsB;IAClC,IAAIK,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;MAC7BL,SAAS,GAAGA,SAAS,CAACM,QAAQ,EAAE;IAClC;IACAL,sBAAS,CAACM,0BAA0B,CAAC,IAAAC,2BAAc,EAAC,IAAI,CAACC,GAAG,CAACC,OAAO,CAAC,EAAEV,SAAS,EAAEW,SAAS,CAAC;EAC9F;EAEAC,MAAM,GAAG;IACP,oBAAO,6BAAC,cAAM;MAAC,GAAG,EAAE,IAAI,CAACH;IAAI,GAAK,IAAI,CAACI,KAAK,EAAI;EAClD;AACF;AAAC"}
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = void 0;
7
7
  // Generated by genversion.
8
- const version = '10.3.1';
8
+ const version = '10.3.2';
9
9
  exports.version = version;
10
10
  //# sourceMappingURL=version.js.map
@@ -18,7 +18,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
18
18
  */
19
19
 
20
20
  import React, { createRef } from 'react';
21
- import { findNodeHandle, UIManager } from 'react-native';
21
+ import { findNodeHandle, Platform, UIManager } from 'react-native';
22
22
  import { BaseAd } from './BaseAd';
23
23
  export class GAMBannerAd extends React.Component {
24
24
  constructor() {
@@ -26,7 +26,11 @@ export class GAMBannerAd extends React.Component {
26
26
  _defineProperty(this, "ref", /*#__PURE__*/createRef());
27
27
  }
28
28
  recordManualImpression() {
29
- UIManager.dispatchViewManagerCommand(findNodeHandle(this.ref.current), UIManager.getViewManagerConfig('RNGoogleMobileAdsBannerView').Commands.recordManualImpression.toString(), undefined);
29
+ let commandID = UIManager.getViewManagerConfig('RNGoogleMobileAdsBannerView').Commands.recordManualImpression;
30
+ if (Platform.OS === 'android') {
31
+ commandID = commandID.toString();
32
+ }
33
+ UIManager.dispatchViewManagerCommand(findNodeHandle(this.ref.current), commandID, undefined);
30
34
  }
31
35
  render() {
32
36
  return /*#__PURE__*/React.createElement(BaseAd, _extends({
@@ -1 +1 @@
1
- {"version":3,"names":["React","createRef","findNodeHandle","UIManager","BaseAd","GAMBannerAd","Component","recordManualImpression","dispatchViewManagerCommand","ref","current","getViewManagerConfig","Commands","toString","undefined","render","props"],"sourceRoot":"../../src","sources":["GAMBannerAd.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,cAAc,EAAEC,SAAS,QAAQ,cAAc;AAExD,SAASC,MAAM,QAAmC,UAAU;AAE5D,OAAO,MAAMC,WAAW,SAASL,KAAK,CAACM,SAAS,CAAmB;EAAA;IAAA;IAAA,0CACnDL,SAAS,EAA6B;EAAA;EAEpDM,sBAAsB,GAAG;IACvBJ,SAAS,CAACK,0BAA0B,CAClCN,cAAc,CAAC,IAAI,CAACO,GAAG,CAACC,OAAO,CAAC,EAChCP,SAAS,CAACQ,oBAAoB,CAC5B,6BAA6B,CAC9B,CAACC,QAAQ,CAACL,sBAAsB,CAACM,QAAQ,EAAE,EAC5CC,SAAS,CACV;EACH;EAEAC,MAAM,GAAG;IACP,oBAAO,oBAAC,MAAM;MAAC,GAAG,EAAE,IAAI,CAACN;IAAI,GAAK,IAAI,CAACO,KAAK,EAAI;EAClD;AACF"}
1
+ {"version":3,"names":["React","createRef","findNodeHandle","Platform","UIManager","BaseAd","GAMBannerAd","Component","recordManualImpression","commandID","getViewManagerConfig","Commands","OS","toString","dispatchViewManagerCommand","ref","current","undefined","render","props"],"sourceRoot":"../../src","sources":["GAMBannerAd.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,cAAc,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,cAAc;AAElE,SAASC,MAAM,QAAmC,UAAU;AAE5D,OAAO,MAAMC,WAAW,SAASN,KAAK,CAACO,SAAS,CAAmB;EAAA;IAAA;IAAA,0CACnDN,SAAS,EAA6B;EAAA;EAEpDO,sBAAsB,GAAG;IACvB,IAAIC,SAA0B,GAAGL,SAAS,CAACM,oBAAoB,CAAC,6BAA6B,CAAC,CAC3FC,QAAQ,CAACH,sBAAsB;IAClC,IAAIL,QAAQ,CAACS,EAAE,KAAK,SAAS,EAAE;MAC7BH,SAAS,GAAGA,SAAS,CAACI,QAAQ,EAAE;IAClC;IACAT,SAAS,CAACU,0BAA0B,CAACZ,cAAc,CAAC,IAAI,CAACa,GAAG,CAACC,OAAO,CAAC,EAAEP,SAAS,EAAEQ,SAAS,CAAC;EAC9F;EAEAC,MAAM,GAAG;IACP,oBAAO,oBAAC,MAAM;MAAC,GAAG,EAAE,IAAI,CAACH;IAAI,GAAK,IAAI,CAACI,KAAK,EAAI;EAClD;AACF"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '10.3.1';
2
+ export const version = '10.3.2';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GAMBannerAd.d.ts","sourceRoot":"","sources":["../../../src/ads/GAMBannerAd.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG1D,qBAAa,WAAY,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAChE,OAAO,CAAC,GAAG,CAA0C;IAErD,sBAAsB;IAUtB,MAAM;CAGP"}
1
+ {"version":3,"file":"GAMBannerAd.d.ts","sourceRoot":"","sources":["../../../src/ads/GAMBannerAd.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG1D,qBAAa,WAAY,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAChE,OAAO,CAAC,GAAG,CAA0C;IAErD,sBAAsB;IAStB,MAAM;CAGP"}
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "10.3.1";
1
+ export declare const SDK_VERSION = "10.3.2";
2
2
  export { default, MobileAds } from './MobileAds';
3
3
  export { AdsConsentDebugGeography } from './AdsConsentDebugGeography';
4
4
  export { AdsConsentPurposes } from './AdsConsentPurposes';
@@ -1,2 +1,2 @@
1
- export declare const version = "10.3.1";
1
+ export declare const version = "10.3.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-mobile-ads",
3
- "version": "10.3.1",
3
+ "version": "10.3.2",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Google Mobile Ads is an easy way to monetize mobile apps with targeted, in-app advertising.",
6
6
  "main": "lib/commonjs/index.js",
@@ -16,7 +16,7 @@
16
16
  */
17
17
 
18
18
  import React, { createRef } from 'react';
19
- import { findNodeHandle, UIManager } from 'react-native';
19
+ import { findNodeHandle, Platform, UIManager } from 'react-native';
20
20
  import { GAMBannerAdProps } from '../types/BannerAdProps';
21
21
  import { BaseAd, GoogleMobileAdsBannerView } from './BaseAd';
22
22
 
@@ -24,13 +24,12 @@ export class GAMBannerAd extends React.Component<GAMBannerAdProps> {
24
24
  private ref = createRef<GoogleMobileAdsBannerView>();
25
25
 
26
26
  recordManualImpression() {
27
- UIManager.dispatchViewManagerCommand(
28
- findNodeHandle(this.ref.current),
29
- UIManager.getViewManagerConfig(
30
- 'RNGoogleMobileAdsBannerView',
31
- ).Commands.recordManualImpression.toString(),
32
- undefined,
33
- );
27
+ let commandID: string | number = UIManager.getViewManagerConfig('RNGoogleMobileAdsBannerView')
28
+ .Commands.recordManualImpression;
29
+ if (Platform.OS === 'android') {
30
+ commandID = commandID.toString();
31
+ }
32
+ UIManager.dispatchViewManagerCommand(findNodeHandle(this.ref.current), commandID, undefined);
34
33
  }
35
34
 
36
35
  render() {
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '10.3.1';
2
+ export const version = '10.3.2';