From 9b58d222a001e959eb7c646173b8b962d64a231b Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Tue, 27 Jun 2023 12:19:59 +0500 Subject: [PATCH] update example --- android/build.gradle | 1 - example/.eslintrc.js | 3 + example/App.js | 52 +- example/android/app/build.gradle | 2 + .../java/com/example/MainApplication.java | 2 + example/android/settings.gradle | 2 + example/metro.config.js | 17 + example/package-lock.json | 444 +++++++++++------- example/package.json | 10 +- example/post-script.js | 20 - example/src/AdView.js | 31 +- example/tsconfig.json | 7 +- src/AdvertiserView.js | 14 +- src/IconView.js | 17 +- src/ImageView.js | 5 +- src/PriceView.js | 14 +- src/context.js | 12 +- 17 files changed, 379 insertions(+), 274 deletions(-) delete mode 100644 example/post-script.js diff --git a/android/build.gradle b/android/build.gradle index be307add..1cb369c3 100755 --- a/android/build.gradle +++ b/android/build.gradle @@ -55,7 +55,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' implementation "com.google.android.gms:play-services-ads:${safeExtGet('googlePlayServicesAdsVersion', '20.+')}" implementation 'com.android.support:support-annotations:28.0.0' - implementation 'com.google.ads.mediation:facebook:6.+' implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.android.support.constraint:constraint-layout:2.0.4' } \ No newline at end of file diff --git a/example/.eslintrc.js b/example/.eslintrc.js index 40c6dcd0..ed658eb7 100644 --- a/example/.eslintrc.js +++ b/example/.eslintrc.js @@ -1,4 +1,7 @@ module.exports = { root: true, extends: '@react-native-community', + rules: { + 'react-native/no-inline-styles': 'off', + }, }; diff --git a/example/App.js b/example/App.js index f5681d8a..e1c4bfa2 100644 --- a/example/App.js +++ b/example/App.js @@ -44,8 +44,7 @@ const App = () => { width: '100%', paddingTop: Platform.OS === 'android' ? StatusBar.currentHeight : 0, backgroundColor: 'white', - }} - > + }}> { flexDirection: 'row', alignItems: 'center', height: 50, - paddingHorizontal: 12, + paddingHorizontal: 6, marginBottom: 10, width: '100%', - }} - > + }}> {currentRoute && ( setCurrentRoute(null)} @@ -71,9 +69,8 @@ const App = () => { height: 50, justifyContent: 'center', borderRadius: 100, - }} - > - + }}> + )} @@ -82,14 +79,12 @@ const App = () => { + }}> + }}> { fontSize: 18, letterSpacing: 1, textAlign: 'center', - }} - > + }}> Admob Native Advanced Ads {'\n'} for React Native @@ -123,13 +117,11 @@ const App = () => { justifyContent: 'center', borderRadius: 5, marginBottom: 5, - }} - > + }}> + }}> Simple Banner Ad @@ -145,13 +137,11 @@ const App = () => { justifyContent: 'center', borderRadius: 5, marginBottom: 5, - }} - > + }}> + }}> Ad with Image @@ -167,13 +157,11 @@ const App = () => { justifyContent: 'center', borderRadius: 5, marginBottom: 5, - }} - > + }}> + }}> Ad with Video @@ -189,13 +177,11 @@ const App = () => { justifyContent: 'center', borderRadius: 5, marginBottom: 5, - }} - > + }}> + }}> Multiple Ads in a List @@ -212,8 +198,7 @@ const App = () => { + }}> )} @@ -222,8 +207,7 @@ const App = () => { + }}> )} diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index ba668837..686b5781 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -154,6 +154,8 @@ dependencies { implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0") + implementation project(':react-native-admob-native-ads') + debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { exclude group:'com.squareup.okhttp3', module:'okhttp' diff --git a/example/android/app/src/main/java/com/example/MainApplication.java b/example/android/app/src/main/java/com/example/MainApplication.java index dd666be2..c110ebe0 100644 --- a/example/android/app/src/main/java/com/example/MainApplication.java +++ b/example/android/app/src/main/java/com/example/MainApplication.java @@ -9,6 +9,7 @@ import com.facebook.react.defaults.DefaultReactNativeHost; import com.facebook.soloader.SoLoader; import java.util.List; +import com.ammarahmed.rnadmob.nativeads.RNAdMobNativePackage; public class MainApplication extends Application implements ReactApplication { @@ -25,6 +26,7 @@ protected List getPackages() { List packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: // packages.add(new MyReactNativePackage()); + packages.add(new RNAdMobNativePackage()); return packages; } diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 39dcc0d7..5b4ecb09 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -2,3 +2,5 @@ rootProject.name = 'example' apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' includeBuild('../node_modules/react-native-gradle-plugin') +include ':react-native-admob-native-ads' +project(':react-native-admob-native-ads').projectDir = new File(rootProject.projectDir, '../../android') diff --git a/example/metro.config.js b/example/metro.config.js index e91aba93..427ca686 100644 --- a/example/metro.config.js +++ b/example/metro.config.js @@ -5,7 +5,24 @@ * @format */ +const path = require('path'); +const exclusionList = require('metro-config/src/defaults/exclusionList'); + +const moduleRoot = path.resolve(__dirname, '..'); + module.exports = { + watchFolders: [moduleRoot], + resolver: { + extraNodeModules: { + react: path.resolve(__dirname, 'node_modules/react'), + 'react-native': path.resolve(__dirname, 'node_modules/react-native'), + }, + nodeModulesPaths: [path.resolve(path.join(__dirname, './node_modules'))], + blockList: exclusionList([ + new RegExp(`${moduleRoot}/node_modules/react/.*`), + new RegExp(`${moduleRoot}/node_modules/react-native/.*`), + ]), + }, transformer: { getTransformOptions: async () => ({ transform: { diff --git a/example/package-lock.json b/example/package-lock.json index f196bab3..bf942e79 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -7,10 +7,9 @@ "": { "name": "example", "version": "0.0.1", - "hasInstallScript": true, "dependencies": { "react": "18.2.0", - "react-native": "0.71.4", + "react-native": "^0.71.11", "react-native-tracking-transparency": "^0.1.2", "react-native-vector-icons": "^9.2.0" }, @@ -2689,18 +2688,18 @@ } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz", + "integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==", "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" } }, "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -2769,16 +2768,16 @@ } }, "node_modules/@react-native-community/cli": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-10.2.0.tgz", - "integrity": "sha512-QH7AFBz5FX2zTZRH/o3XehHrZ0aZZEL5Sh+23nSEFgSj3bLFfvjjZhuoiRSAo7iiBdvAoXrfxQ8TXgg4Xf/7fw==", + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-10.2.4.tgz", + "integrity": "sha512-E9BUDHfLEsnjkjeJqECuCjl4E/1Ox9Nl6hkQBhEqjZm4AaQxgU7M6AyFfOgaXn5v3am16/R4ZOUTrJnGJWS3GA==", "dependencies": { "@react-native-community/cli-clean": "^10.1.1", "@react-native-community/cli-config": "^10.1.1", "@react-native-community/cli-debugger-ui": "^10.0.0", - "@react-native-community/cli-doctor": "^10.2.0", + "@react-native-community/cli-doctor": "^10.2.4", "@react-native-community/cli-hermes": "^10.2.0", - "@react-native-community/cli-plugin-metro": "^10.2.0", + "@react-native-community/cli-plugin-metro": "^10.2.3", "@react-native-community/cli-server-api": "^10.1.1", "@react-native-community/cli-tools": "^10.1.1", "@react-native-community/cli-types": "^10.0.0", @@ -3075,12 +3074,12 @@ } }, "node_modules/@react-native-community/cli-doctor": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-doctor/-/cli-doctor-10.2.1.tgz", - "integrity": "sha512-IwhdSD+mtgWdxg2eMr0fpkn08XN7r70DC1riGSmqK/DXNyWBzIZlCkDN+/TwlaUEsiFk6LQTjgCiqZSMpmDrsg==", + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-doctor/-/cli-doctor-10.2.5.tgz", + "integrity": "sha512-1YbzXvsldBmSw1MmBsXB74bKiHXKNCjlb2ByLgkfTiarpSvETYam3g5vex0N+qc0Cdkzkq+8NznE744LFhnUpw==", "dependencies": { "@react-native-community/cli-config": "^10.1.1", - "@react-native-community/cli-platform-ios": "^10.2.1", + "@react-native-community/cli-platform-ios": "^10.2.5", "@react-native-community/cli-tools": "^10.1.1", "chalk": "^4.1.2", "command-exists": "^1.2.8", @@ -3098,9 +3097,9 @@ } }, "node_modules/@react-native-community/cli-doctor/node_modules/@react-native-community/cli-platform-ios": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-ios/-/cli-platform-ios-10.2.1.tgz", - "integrity": "sha512-hz4zu4Y6eyj7D0lnZx8Mf2c2si8y+zh/zUTgCTaPPLzQD8jSZNNBtUUiA1cARm2razpe8marCZ1QbTMAGbf3mg==", + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-ios/-/cli-platform-ios-10.2.5.tgz", + "integrity": "sha512-hq+FZZuSBK9z82GLQfzdNDl8vbFx5UlwCLFCuTtNCROgBoapFtVZQKRP2QBftYNrQZ0dLAb01gkwxagHsQCFyg==", "dependencies": { "@react-native-community/cli-tools": "^10.1.1", "chalk": "^4.1.2", @@ -3562,9 +3561,9 @@ } }, "node_modules/@react-native-community/cli-platform-ios": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-ios/-/cli-platform-ios-10.2.0.tgz", - "integrity": "sha512-hIPK3iL/mL+0ChXmQ9uqqzNOKA48H+TAzg+hrxQLll/6dNMxDeK9/wZpktcsh8w+CyhqzKqVernGcQs7tPeKGw==", + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-ios/-/cli-platform-ios-10.2.4.tgz", + "integrity": "sha512-/6K+jeRhcGojFIJMWMXV2eY5n/In+YUzBr/DKWQOeHBOHkESRNheG310xSAIjgB46YniSSUKhSyeuhalTbm9OQ==", "dependencies": { "@react-native-community/cli-tools": "^10.1.1", "chalk": "^4.1.2", @@ -3747,20 +3746,20 @@ } }, "node_modules/@react-native-community/cli-plugin-metro": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-10.2.0.tgz", - "integrity": "sha512-9eiJrKYuauEDkQLCrjJUh7tS9T0oaMQqVUSSSuyDG6du7HQcfaR4mSf21wK75jvhKiwcQLpsFmMdctAb+0v+Cg==", + "version": "10.2.3", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-10.2.3.tgz", + "integrity": "sha512-jHi2oDuTePmW4NEyVT8JEGNlIYcnFXCSV2ZMp4rnDrUk4TzzyvS3IMvDlESEmG8Kry8rvP0KSUx/hTpy37Sbkw==", "dependencies": { "@react-native-community/cli-server-api": "^10.1.1", "@react-native-community/cli-tools": "^10.1.1", "chalk": "^4.1.2", "execa": "^1.0.0", - "metro": "0.73.8", - "metro-config": "0.73.8", - "metro-core": "0.73.8", - "metro-react-native-babel-transformer": "0.73.8", - "metro-resolver": "0.73.8", - "metro-runtime": "0.73.8", + "metro": "0.73.10", + "metro-config": "0.73.10", + "metro-core": "0.73.10", + "metro-react-native-babel-transformer": "0.73.10", + "metro-resolver": "0.73.10", + "metro-runtime": "0.73.10", "readline": "^1.3.0" } }, @@ -5886,9 +5885,9 @@ } }, "node_modules/cli-spinners": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", - "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", + "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", "engines": { "node": ">=6" }, @@ -6169,9 +6168,9 @@ "dev": true }, "node_modules/dayjs": { - "version": "1.11.7", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.7.tgz", - "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==" + "version": "1.11.8", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.8.tgz", + "integrity": "sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==" }, "node_modules/debug": { "version": "4.3.4", @@ -6383,9 +6382,9 @@ } }, "node_modules/envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.10.0.tgz", + "integrity": "sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==", "bin": { "envinfo": "dist/cli.js" }, @@ -7376,18 +7375,24 @@ "dev": true }, "node_modules/fast-xml-parser": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.1.3.tgz", - "integrity": "sha512-LsNDahCiCcJPe8NO7HijcnukHB24tKbfDDA5IILx9dmW3Frb52lhbeX6MPNUSvyGNfav2VTYpJ/OqkRoVLrh2Q==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", + "integrity": "sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==", + "funding": [ + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + }, + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], "dependencies": { "strnum": "^1.0.5" }, "bin": { "fxparser": "src/cli/cli.js" - }, - "funding": { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" } }, "node_modules/fastq": { @@ -10264,9 +10269,9 @@ } }, "node_modules/joi": { - "version": "17.8.4", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.8.4.tgz", - "integrity": "sha512-jjdRHb5WtL+KgSHvOULQEPPv4kcl+ixd1ybOFQq3rWLgEEqc03QMmilodL0GVJE14U/SQDXkUhQUSZANGDH/AA==", + "version": "17.9.2", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.9.2.tgz", + "integrity": "sha512-Itk/r+V4Dx0V3c7RLFdRh12IOjySm2/WGPMubBT92cQvRfYZhPM2W0hZlctjj72iES8jsRCwp7S/cRmWBnJ4nw==", "dependencies": { "@hapi/hoek": "^9.0.0", "@hapi/topo": "^5.0.0", @@ -10307,6 +10312,11 @@ "resolved": "https://registry.npmjs.org/jsc-android/-/jsc-android-250231.0.0.tgz", "integrity": "sha512-rS46PvsjYmdmuz1OAWXY/1kCYG7pnf1TBqeTiOJr1iDz7s5DLxxC9n/ZMknLDxzYzNVfI7R95MH10emSSG1Wuw==" }, + "node_modules/jsc-safe-url": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/jsc-safe-url/-/jsc-safe-url-0.2.4.tgz", + "integrity": "sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q==" + }, "node_modules/jscodeshift": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.13.1.tgz", @@ -10962,9 +10972,9 @@ } }, "node_modules/metro": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro/-/metro-0.73.8.tgz", - "integrity": "sha512-2EMJME9w5x7Uzn+DnQ4hzWr33u/aASaOBGdpf4lxbrlk6/vl4UBfX1sru6KU535qc/0Z1BMt4Vq9qsP3ZGFmWg==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro/-/metro-0.73.10.tgz", + "integrity": "sha512-J2gBhNHFtc/Z48ysF0B/bfTwUwaRDLjNv7egfhQCc+934dpXcjJG2KZFeuybF+CvA9vo4QUi56G2U+RSAJ5tsA==", "dependencies": { "@babel/code-frame": "^7.0.0", "@babel/core": "^7.20.0", @@ -10987,24 +10997,25 @@ "image-size": "^0.6.0", "invariant": "^2.2.4", "jest-worker": "^27.2.0", + "jsc-safe-url": "^0.2.2", "lodash.throttle": "^4.1.1", - "metro-babel-transformer": "0.73.8", - "metro-cache": "0.73.8", - "metro-cache-key": "0.73.8", - "metro-config": "0.73.8", - "metro-core": "0.73.8", - "metro-file-map": "0.73.8", - "metro-hermes-compiler": "0.73.8", - "metro-inspector-proxy": "0.73.8", - "metro-minify-terser": "0.73.8", - "metro-minify-uglify": "0.73.8", - "metro-react-native-babel-preset": "0.73.8", - "metro-resolver": "0.73.8", - "metro-runtime": "0.73.8", - "metro-source-map": "0.73.8", - "metro-symbolicate": "0.73.8", - "metro-transform-plugins": "0.73.8", - "metro-transform-worker": "0.73.8", + "metro-babel-transformer": "0.73.10", + "metro-cache": "0.73.10", + "metro-cache-key": "0.73.10", + "metro-config": "0.73.10", + "metro-core": "0.73.10", + "metro-file-map": "0.73.10", + "metro-hermes-compiler": "0.73.10", + "metro-inspector-proxy": "0.73.10", + "metro-minify-terser": "0.73.10", + "metro-minify-uglify": "0.73.10", + "metro-react-native-babel-preset": "0.73.10", + "metro-resolver": "0.73.10", + "metro-runtime": "0.73.10", + "metro-source-map": "0.73.10", + "metro-symbolicate": "0.73.10", + "metro-transform-plugins": "0.73.10", + "metro-transform-worker": "0.73.10", "mime-types": "^2.1.27", "node-fetch": "^2.2.0", "nullthrows": "^1.1.1", @@ -11022,41 +11033,41 @@ } }, "node_modules/metro-babel-transformer": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-babel-transformer/-/metro-babel-transformer-0.73.8.tgz", - "integrity": "sha512-GO6H/W2RjZ0/gm1pIvdO9EP34s3XN6kzoeyxqmfqKfYhJmYZf1SzXbyiIHyMbJNwJVrsKuHqu32+GopTlKscWw==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-babel-transformer/-/metro-babel-transformer-0.73.10.tgz", + "integrity": "sha512-Yv2myTSnpzt/lTyurLvqYbBkytvUJcLHN8XD3t7W6rGiLTQPzmf1zypHQLphvcAXtCWBOXFtH7KLOSi2/qMg+A==", "dependencies": { "@babel/core": "^7.20.0", "hermes-parser": "0.8.0", - "metro-source-map": "0.73.8", + "metro-source-map": "0.73.10", "nullthrows": "^1.1.1" } }, "node_modules/metro-cache": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-cache/-/metro-cache-0.73.8.tgz", - "integrity": "sha512-/uFbTIw813Rvb8kSAIHvax9gWl41dtgjY2SpJLNIBLdQ6oFZ3CVo3ahZIiEZOrCeHl9xfGn5tmvNb8CEFa/Q5w==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-cache/-/metro-cache-0.73.10.tgz", + "integrity": "sha512-wPGlQZpdVlM404m7MxJqJ+hTReDr5epvfPbt2LerUAHY9RN99w61FeeAe25BMZBwgUgDtAsfGlJ51MBHg8MAqw==", "dependencies": { - "metro-core": "0.73.8", + "metro-core": "0.73.10", "rimraf": "^3.0.2" } }, "node_modules/metro-cache-key": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-cache-key/-/metro-cache-key-0.73.8.tgz", - "integrity": "sha512-VzFGu4kJGIkLjyDgVoM2ZxIHlMdCZWMqVIux9N+EeyMVMvGXTiXW8eGROgxzDhVjyR58IjfMsYpRCKz5dR+2ew==" + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-cache-key/-/metro-cache-key-0.73.10.tgz", + "integrity": "sha512-JMVDl/EREDiUW//cIcUzRjKSwE2AFxVWk47cFBer+KA4ohXIG2CQPEquT56hOw1Y1s6gKNxxs1OlAOEsubrFjw==" }, "node_modules/metro-config": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-config/-/metro-config-0.73.8.tgz", - "integrity": "sha512-sAYq+llL6ZAfro64U99ske8HcKKswxX4wIZbll9niBKG7TkWm7tfMY1jO687XEmE4683rHncZeBRav9pLngIzg==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-config/-/metro-config-0.73.10.tgz", + "integrity": "sha512-wIlybd1Z9I8K2KcStTiJxTB7OK529dxFgogNpKCTU/3DxkgAASqSkgXnZP6kVyqjh5EOWAKFe5U6IPic7kXDdQ==", "dependencies": { "cosmiconfig": "^5.0.5", "jest-validate": "^26.5.2", - "metro": "0.73.8", - "metro-cache": "0.73.8", - "metro-core": "0.73.8", - "metro-runtime": "0.73.8" + "metro": "0.73.10", + "metro-cache": "0.73.10", + "metro-core": "0.73.10", + "metro-runtime": "0.73.10" } }, "node_modules/metro-config/node_modules/@jest/types": { @@ -11201,18 +11212,18 @@ } }, "node_modules/metro-core": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-core/-/metro-core-0.73.8.tgz", - "integrity": "sha512-Aew4dthbZf8bRRjlYGL3cnai3+LKYTf6mc7YS2xLQRWtgGZ1b/H8nQtBvXZpfRYFcS84UeEQ10vwIf5eR3qPdQ==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-core/-/metro-core-0.73.10.tgz", + "integrity": "sha512-5uYkajIxKyL6W45iz/ftNnYPe1l92CvF2QJeon1CHsMXkEiOJxEjo41l+iSnO/YodBGrmMCyupSO4wOQGUc0lw==", "dependencies": { "lodash.throttle": "^4.1.1", - "metro-resolver": "0.73.8" + "metro-resolver": "0.73.10" } }, "node_modules/metro-file-map": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-file-map/-/metro-file-map-0.73.8.tgz", - "integrity": "sha512-CM552hUO9om02jJdLszOCIDADKNaaeVz8CjYXItndvgr5jmFlQYAR+UMvaDzeT8oYdAV1DXAljma2CS2UBymPg==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-file-map/-/metro-file-map-0.73.10.tgz", + "integrity": "sha512-XOMWAybeaXyD6zmVZPnoCCL2oO3rp4ta76oUlqWP0skBzhFxVtkE/UtDwApEMUY361JeBBago647gnKiARs+1g==", "dependencies": { "abort-controller": "^3.0.0", "anymatch": "^3.0.3", @@ -11384,14 +11395,14 @@ } }, "node_modules/metro-hermes-compiler": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-hermes-compiler/-/metro-hermes-compiler-0.73.8.tgz", - "integrity": "sha512-2d7t+TEoQLk+jyXgBykmAtPPJK2B46DB3qUYIMKDFDDaKzCljrojyVuGgQq6SM1f95fe6HDAQ3K9ihTjeB90yw==" + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-hermes-compiler/-/metro-hermes-compiler-0.73.10.tgz", + "integrity": "sha512-rTRWEzkVrwtQLiYkOXhSdsKkIObnL+Jqo+IXHI7VEK2aSLWRAbtGNqECBs44kbOUypDYTFFE+WLtoqvUWqYkWg==" }, "node_modules/metro-inspector-proxy": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-inspector-proxy/-/metro-inspector-proxy-0.73.8.tgz", - "integrity": "sha512-F0QxwDTox0TDeXVRN7ZmI7BknBjPDVKQ1ZeKznFBiMa0SXiD1kzoksfpDbZ6hTEKrhVM9Ep0YQmC7avwZouOnA==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-inspector-proxy/-/metro-inspector-proxy-0.73.10.tgz", + "integrity": "sha512-CEEvocYc5xCCZBtGSIggMCiRiXTrnBbh8pmjKQqm9TtJZALeOGyt5pXUaEkKGnhrXETrexsg6yIbsQHhEvVfvQ==", "dependencies": { "connect": "^3.6.5", "debug": "^2.2.0", @@ -11436,17 +11447,17 @@ } }, "node_modules/metro-minify-terser": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-minify-terser/-/metro-minify-terser-0.73.8.tgz", - "integrity": "sha512-pnagyXAoMPhihWrHRIWqCxrP6EJ8Hfugv5RXBb6HbOANmwajn2uQuzeu18+dXaN1yPoDCMCgpg/UA4ibFN5jtQ==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-minify-terser/-/metro-minify-terser-0.73.10.tgz", + "integrity": "sha512-uG7TSKQ/i0p9kM1qXrwbmY3v+6BrMItsOcEXcSP8Z+68bb+t9HeVK0T/hIfUu1v1PEnonhkhfzVsaP8QyTd5lQ==", "dependencies": { "terser": "^5.15.0" } }, "node_modules/metro-minify-uglify": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-minify-uglify/-/metro-minify-uglify-0.73.8.tgz", - "integrity": "sha512-9wZqKfraVfmtMXdOzRyan+6r1woQXqqa4KeXfVh7+Mxl+5+J0Lmw6EvTrWawsaOEpvpn32q9MfoHC1d8plDJwA==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-minify-uglify/-/metro-minify-uglify-0.73.10.tgz", + "integrity": "sha512-eocnSeJKnLz/UoYntVFhCJffED7SLSgbCHgNvI6ju6hFb6EFHGJT9OLbkJWeXaWBWD3Zw5mYLS8GGqGn/CHZPA==", "dependencies": { "uglify-es": "^3.1.9" } @@ -11455,6 +11466,7 @@ "version": "0.73.8", "resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.73.8.tgz", "integrity": "sha512-spNrcQJTbQntEIqJnCA6yL4S+dzV9fXCk7U+Rm7yJasZ4o4Frn7jP23isu7FlZIp1Azx1+6SbP7SgQM+IP5JgQ==", + "dev": true, "dependencies": { "@babel/core": "^7.20.0", "@babel/plugin-proposal-async-generator-functions": "^7.0.0", @@ -11500,50 +11512,98 @@ } }, "node_modules/metro-react-native-babel-transformer": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.73.8.tgz", - "integrity": "sha512-oH/LCCJPauteAE28c0KJAiSrkV+1VJbU0PwA9UwaWnle+qevs/clpKQ8LrIr33YbBj4CiI1kFoVRuNRt5h4NFg==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.73.10.tgz", + "integrity": "sha512-4G/upwqKdmKEjmsNa92/NEgsOxUWOygBVs+FXWfXWKgybrmcjh3NoqdRYrROo9ZRA/sB9Y/ZXKVkWOGKHtGzgg==", "dependencies": { "@babel/core": "^7.20.0", "babel-preset-fbjs": "^3.4.0", "hermes-parser": "0.8.0", - "metro-babel-transformer": "0.73.8", - "metro-react-native-babel-preset": "0.73.8", - "metro-source-map": "0.73.8", + "metro-babel-transformer": "0.73.10", + "metro-react-native-babel-preset": "0.73.10", + "metro-source-map": "0.73.10", "nullthrows": "^1.1.1" }, "peerDependencies": { "@babel/core": "*" } }, + "node_modules/metro-react-native-babel-transformer/node_modules/metro-react-native-babel-preset": { + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.73.10.tgz", + "integrity": "sha512-1/dnH4EHwFb2RKEKx34vVDpUS3urt2WEeR8FYim+ogqALg4sTpG7yeQPxWpbgKATezt4rNfqAANpIyH19MS4BQ==", + "dependencies": { + "@babel/core": "^7.20.0", + "@babel/plugin-proposal-async-generator-functions": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-proposal-object-rest-spread": "^7.0.0", + "@babel/plugin-proposal-optional-catch-binding": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-export-default-from": "^7.0.0", + "@babel/plugin-syntax-flow": "^7.18.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-syntax-optional-chaining": "^7.0.0", + "@babel/plugin-transform-arrow-functions": "^7.0.0", + "@babel/plugin-transform-async-to-generator": "^7.0.0", + "@babel/plugin-transform-block-scoping": "^7.0.0", + "@babel/plugin-transform-classes": "^7.0.0", + "@babel/plugin-transform-computed-properties": "^7.0.0", + "@babel/plugin-transform-destructuring": "^7.0.0", + "@babel/plugin-transform-flow-strip-types": "^7.0.0", + "@babel/plugin-transform-function-name": "^7.0.0", + "@babel/plugin-transform-literals": "^7.0.0", + "@babel/plugin-transform-modules-commonjs": "^7.0.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.0.0", + "@babel/plugin-transform-parameters": "^7.0.0", + "@babel/plugin-transform-react-display-name": "^7.0.0", + "@babel/plugin-transform-react-jsx": "^7.0.0", + "@babel/plugin-transform-react-jsx-self": "^7.0.0", + "@babel/plugin-transform-react-jsx-source": "^7.0.0", + "@babel/plugin-transform-runtime": "^7.0.0", + "@babel/plugin-transform-shorthand-properties": "^7.0.0", + "@babel/plugin-transform-spread": "^7.0.0", + "@babel/plugin-transform-sticky-regex": "^7.0.0", + "@babel/plugin-transform-template-literals": "^7.0.0", + "@babel/plugin-transform-typescript": "^7.5.0", + "@babel/plugin-transform-unicode-regex": "^7.0.0", + "@babel/template": "^7.0.0", + "react-refresh": "^0.4.0" + }, + "peerDependencies": { + "@babel/core": "*" + } + }, "node_modules/metro-resolver": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-resolver/-/metro-resolver-0.73.8.tgz", - "integrity": "sha512-GiBWont7/OgAftkkj2TiEp+Gf1PYZUk8xV4MbtnQjIKyy3MlGY3GbpMQ1BHih9GUQqlF0n9jsUlC2K5P0almXQ==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-resolver/-/metro-resolver-0.73.10.tgz", + "integrity": "sha512-HeXbs+0wjakaaVQ5BI7eT7uqxlZTc9rnyw6cdBWWMgUWB++KpoI0Ge7Hi6eQAOoVAzXC3m26mPFYLejpzTWjng==", "dependencies": { "absolute-path": "^0.0.0" } }, "node_modules/metro-runtime": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-runtime/-/metro-runtime-0.73.8.tgz", - "integrity": "sha512-M+Bg9M4EN5AEpJ8NkiUsawD75ifYvYfHi05w6QzHXaqOrsTeaRbbeLuOGCYxU2f/tPg17wQV97/rqUQzs9qEtA==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-runtime/-/metro-runtime-0.73.10.tgz", + "integrity": "sha512-EpVKm4eN0Fgx2PEWpJ5NiMArV8zVoOin866jIIvzFLpmkZz1UEqgjf2JAfUJnjgv3fjSV3JqeGG2vZCaGQBTow==", "dependencies": { "@babel/runtime": "^7.0.0", "react-refresh": "^0.4.0" } }, "node_modules/metro-source-map": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.73.8.tgz", - "integrity": "sha512-wozFXuBYMAy7b8BCYwC+qoXsvayVJBHWtSTlSLva99t+CoUSG9JO9kg1umzbOz28YYPxKmvb/wbnLMkHdas2cA==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.73.10.tgz", + "integrity": "sha512-NAGv14701p/YaFZ76KzyPkacBw/QlEJF1f8elfs23N1tC33YyKLDKvPAzFJiYqjdcFvuuuDCA8JCXd2TgLxNPw==", "dependencies": { "@babel/traverse": "^7.20.0", "@babel/types": "^7.20.0", "invariant": "^2.2.4", - "metro-symbolicate": "0.73.8", + "metro-symbolicate": "0.73.10", "nullthrows": "^1.1.1", - "ob1": "0.73.8", + "ob1": "0.73.10", "source-map": "^0.5.6", "vlq": "^1.0.0" } @@ -11557,12 +11617,12 @@ } }, "node_modules/metro-symbolicate": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.73.8.tgz", - "integrity": "sha512-xkBAcceYYp0GGdCCuMzkCF1ejHsd0lYlbKBkjSRgM0Nlj80VapPaSwumYoAvSaDxcbkvS7/sCjURGp5DsSFgRQ==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.73.10.tgz", + "integrity": "sha512-PmCe3TOe1c/NVwMlB+B17me951kfkB3Wve5RqJn+ErPAj93od1nxicp6OJe7JT4QBRnpUP8p9tw2sHKqceIzkA==", "dependencies": { "invariant": "^2.2.4", - "metro-source-map": "0.73.8", + "metro-source-map": "0.73.10", "nullthrows": "^1.1.1", "source-map": "^0.5.6", "through2": "^2.0.1", @@ -11584,9 +11644,9 @@ } }, "node_modules/metro-transform-plugins": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-transform-plugins/-/metro-transform-plugins-0.73.8.tgz", - "integrity": "sha512-IxjlnB5eA49M0WfvPEzvRikK3Rr6bECUUfcZt/rWpSphq/mttgyLYcHQ+VTZZl0zHolC3cTLwgoDod4IIJBn1A==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-transform-plugins/-/metro-transform-plugins-0.73.10.tgz", + "integrity": "sha512-D4AgD3Vsrac+4YksaPmxs/0ocT67bvwTkFSIgWWeDvWwIG0U1iHzTS9f8Bvb4PITnXryDoFtjI6OWF7uOpGxpA==", "dependencies": { "@babel/core": "^7.20.0", "@babel/generator": "^7.20.0", @@ -11596,22 +11656,22 @@ } }, "node_modules/metro-transform-worker": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/metro-transform-worker/-/metro-transform-worker-0.73.8.tgz", - "integrity": "sha512-B8kR6lmcvyG4UFSF2QDfr/eEnWJvg0ZadooF8Dg6m/3JSm9OAqfSoC0YrWqAuvtWImNDnbeKWN7/+ns44Hv6tg==", + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-transform-worker/-/metro-transform-worker-0.73.10.tgz", + "integrity": "sha512-IySvVubudFxahxOljWtP0QIMMpgUrCP0bW16cz2Enof0PdumwmR7uU3dTbNq6S+XTzuMHR+076aIe4VhPAWsIQ==", "dependencies": { "@babel/core": "^7.20.0", "@babel/generator": "^7.20.0", "@babel/parser": "^7.20.0", "@babel/types": "^7.20.0", "babel-preset-fbjs": "^3.4.0", - "metro": "0.73.8", - "metro-babel-transformer": "0.73.8", - "metro-cache": "0.73.8", - "metro-cache-key": "0.73.8", - "metro-hermes-compiler": "0.73.8", - "metro-source-map": "0.73.8", - "metro-transform-plugins": "0.73.8", + "metro": "0.73.10", + "metro-babel-transformer": "0.73.10", + "metro-cache": "0.73.10", + "metro-cache-key": "0.73.10", + "metro-hermes-compiler": "0.73.10", + "metro-source-map": "0.73.10", + "metro-transform-plugins": "0.73.10", "nullthrows": "^1.1.1" } }, @@ -11708,6 +11768,54 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/metro/node_modules/metro-react-native-babel-preset": { + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.73.10.tgz", + "integrity": "sha512-1/dnH4EHwFb2RKEKx34vVDpUS3urt2WEeR8FYim+ogqALg4sTpG7yeQPxWpbgKATezt4rNfqAANpIyH19MS4BQ==", + "dependencies": { + "@babel/core": "^7.20.0", + "@babel/plugin-proposal-async-generator-functions": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-proposal-object-rest-spread": "^7.0.0", + "@babel/plugin-proposal-optional-catch-binding": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-export-default-from": "^7.0.0", + "@babel/plugin-syntax-flow": "^7.18.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-syntax-optional-chaining": "^7.0.0", + "@babel/plugin-transform-arrow-functions": "^7.0.0", + "@babel/plugin-transform-async-to-generator": "^7.0.0", + "@babel/plugin-transform-block-scoping": "^7.0.0", + "@babel/plugin-transform-classes": "^7.0.0", + "@babel/plugin-transform-computed-properties": "^7.0.0", + "@babel/plugin-transform-destructuring": "^7.0.0", + "@babel/plugin-transform-flow-strip-types": "^7.0.0", + "@babel/plugin-transform-function-name": "^7.0.0", + "@babel/plugin-transform-literals": "^7.0.0", + "@babel/plugin-transform-modules-commonjs": "^7.0.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.0.0", + "@babel/plugin-transform-parameters": "^7.0.0", + "@babel/plugin-transform-react-display-name": "^7.0.0", + "@babel/plugin-transform-react-jsx": "^7.0.0", + "@babel/plugin-transform-react-jsx-self": "^7.0.0", + "@babel/plugin-transform-react-jsx-source": "^7.0.0", + "@babel/plugin-transform-runtime": "^7.0.0", + "@babel/plugin-transform-shorthand-properties": "^7.0.0", + "@babel/plugin-transform-spread": "^7.0.0", + "@babel/plugin-transform-sticky-regex": "^7.0.0", + "@babel/plugin-transform-template-literals": "^7.0.0", + "@babel/plugin-transform-typescript": "^7.5.0", + "@babel/plugin-transform-unicode-regex": "^7.0.0", + "@babel/template": "^7.0.0", + "react-refresh": "^0.4.0" + }, + "peerDependencies": { + "@babel/core": "*" + } + }, "node_modules/metro/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -11920,9 +12028,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -11986,9 +12094,9 @@ "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==" }, "node_modules/ob1": { - "version": "0.73.8", - "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.73.8.tgz", - "integrity": "sha512-1F7j+jzD+edS6ohQP7Vg5f3yiIk5i3x1uLrNIHOmLHWzWK1t3zrDpjnoXghccdVlsU+UjbyURnDynm4p0GgXeA==" + "version": "0.73.10", + "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.73.10.tgz", + "integrity": "sha512-aO6EYC+QRRCkZxVJhCWhLKgVjhNuD6Gu1riGjxrIm89CqLsmKgxzYDDEsktmKsoDeRdWGQM5EdMzXDl5xcVfsw==" }, "node_modules/object-assign": { "version": "4.1.1", @@ -12758,14 +12866,14 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" }, "node_modules/react-native": { - "version": "0.71.4", - "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.71.4.tgz", - "integrity": "sha512-3hSYqvWrOdKhpV3HpEKp1/CkWx8Sr/N/miCrmUIAsVTSJUR7JW0VvIsrV9urDhUj/s6v2WF4n7qIEEJsmTCrPw==", + "version": "0.71.11", + "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.71.11.tgz", + "integrity": "sha512-++8IxgUe4Ev+bTiFlLfJCdSoE5cReVP1DTpVJ8f/QtzaxA3h1008Y3Xah1Q5vsR4rZcYMO7Pn3af+wOshdQFug==", "dependencies": { "@jest/create-cache-key-function": "^29.2.1", - "@react-native-community/cli": "10.2.0", + "@react-native-community/cli": "10.2.4", "@react-native-community/cli-platform-android": "10.2.0", - "@react-native-community/cli-platform-ios": "10.2.0", + "@react-native-community/cli-platform-ios": "10.2.4", "@react-native/assets": "1.0.0", "@react-native/normalize-color": "2.1.0", "@react-native/polyfills": "2.0.0", @@ -12778,16 +12886,16 @@ "jest-environment-node": "^29.2.1", "jsc-android": "^250231.0.0", "memoize-one": "^5.0.0", - "metro-react-native-babel-transformer": "0.73.8", - "metro-runtime": "0.73.8", - "metro-source-map": "0.73.8", + "metro-react-native-babel-transformer": "0.73.10", + "metro-runtime": "0.73.10", + "metro-source-map": "0.73.10", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "pretty-format": "^26.5.2", "promise": "^8.3.0", "react-devtools-core": "^4.26.1", "react-native-codegen": "^0.71.5", - "react-native-gradle-plugin": "^0.71.16", + "react-native-gradle-plugin": "^0.71.19", "react-refresh": "^0.4.0", "react-shallow-renderer": "^16.15.0", "regenerator-runtime": "^0.13.2", @@ -12819,9 +12927,9 @@ } }, "node_modules/react-native-gradle-plugin": { - "version": "0.71.16", - "resolved": "https://registry.npmjs.org/react-native-gradle-plugin/-/react-native-gradle-plugin-0.71.16.tgz", - "integrity": "sha512-H2BjG2zk7B7Wii9sXvd9qhCVRQYDAHSWdMw9tscmZBqSP62DkIWEQSk4/B2GhQ4aK9ydVXgtqR6tBeg3yy8TSA==" + "version": "0.71.19", + "resolved": "https://registry.npmjs.org/react-native-gradle-plugin/-/react-native-gradle-plugin-0.71.19.tgz", + "integrity": "sha512-1dVk9NwhoyKHCSxcrM6vY6cxmojeATsBobDicX0ZKr7DgUF2cBQRTKsimQFvzH8XhOVXyH8p4HyDSZNIFI8OlQ==" }, "node_modules/react-native-tracking-transparency": { "version": "0.1.2", @@ -14162,12 +14270,12 @@ } }, "node_modules/terser": { - "version": "5.16.6", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.6.tgz", - "integrity": "sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg==", + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.18.1.tgz", + "integrity": "sha512-j1n0Ao919h/Ai5r43VAnfV/7azUYW43GPxK7qSATzrsERfW7+y2QW9Cp9ufnRF5CQUWbnLSo7UJokSWCqg4tsQ==", "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -14723,9 +14831,9 @@ } }, "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" }, "node_modules/which-typed-array": { "version": "1.1.9", diff --git a/example/package.json b/example/package.json index 534d839c..25b1cefd 100644 --- a/example/package.json +++ b/example/package.json @@ -7,15 +7,11 @@ "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", - "test": "jest", - "preinstall": "cd .. && npm install", - "prebuild": "npm pack ../", - "postscript": "node post-script.js", - "postinstall": "npm run prebuild && npm run postscript" + "test": "jest" }, "dependencies": { "react": "18.2.0", - "react-native": "0.71.4", + "react-native": "^0.71.11", "react-native-tracking-transparency": "^0.1.2", "react-native-vector-icons": "^9.2.0" }, @@ -39,4 +35,4 @@ "jest": { "preset": "react-native" } -} \ No newline at end of file +} diff --git a/example/post-script.js b/example/post-script.js deleted file mode 100644 index 36866de1..00000000 --- a/example/post-script.js +++ /dev/null @@ -1,20 +0,0 @@ -/* eslint-disable prettier/prettier */ -const { exec } = require('node:child_process') -const fs = require('fs'); - -console.log('Running postininstall...'); - -var files = fs.readdirSync('./'); -for (var i = 0; i < files.length; i++) { - var filename = files[i]; - if (filename.substring(0,29) === 'react-native-admob-native-ads' && filename.substring(filename.length - 3) === 'tgz') { - exec('npm install ' + filename, (err) => { - if (err) { - console.error("could not execute command: ", err); - return - } - console.log('Postinstall complete.'); - }); - break; - } -}; \ No newline at end of file diff --git a/example/src/AdView.js b/example/src/AdView.js index 2a34fa7b..fcf286ba 100644 --- a/example/src/AdView.js +++ b/example/src/AdView.js @@ -118,9 +118,9 @@ export const AdView = React.memo(({index, media, type, loadOnMount = true}) => { * [STEP III] We will subscribe to onViewableItemsChanged event in all AdViews in the List. */ let onViewableItemsChangedHandler; - + if (!loadOnMount) { - onViewableItemsChangedHandler = DeviceEventEmitter.addListener( + onViewableItemsChangedHandler = DeviceEventEmitter.addListener( Events.onViewableItemsChanged, onViewableItemsChanged, ); @@ -164,14 +164,12 @@ export const AdView = React.memo(({index, media, type, loadOnMount = true}) => { customControlsRequested: true, }} // adUnitID={type === 'image' ? adUnitIDs.image : adUnitIDs.video} // REPLACE WITH NATIVE_AD_VIDEO_ID for video ads. - repository={type === 'image' ? 'imageAd' : 'videoAd'} - > + repository={type === 'image' ? 'imageAd' : 'videoAd'}> + }}> { alignItems: 'center', opacity: !loading && !error && loaded ? 0 : 1, zIndex: !loading && !error && loaded ? 0 : 10, - }} - > + }}> {loading && } {error && :-(} @@ -197,8 +194,7 @@ export const AdView = React.memo(({index, media, type, loadOnMount = true}) => { alignItems: 'flex-start', paddingHorizontal: 10, opacity: loading || error || !loaded ? 0 : 1, - }} - > + }}> { /> + }}> { style={{ flexDirection: 'row', alignItems: 'center', - }} - > + }}> { fontSize: 13, flexWrap: 'wrap', textAlign: 'center', - color:'white' + color: 'white', }} /> diff --git a/example/tsconfig.json b/example/tsconfig.json index 45a6c707..07995e17 100644 --- a/example/tsconfig.json +++ b/example/tsconfig.json @@ -1,3 +1,8 @@ { - "extends": "@tsconfig/react-native/tsconfig.json" + "extends": "@tsconfig/react-native/tsconfig.json", + "compilerOptions": { + "paths": { + "react-native-admob-native-ads": ["../"] + } + } } diff --git a/src/AdvertiserView.js b/src/AdvertiserView.js index 77bbd8a8..78d57832 100644 --- a/src/AdvertiserView.js +++ b/src/AdvertiserView.js @@ -1,4 +1,4 @@ -import React, { useContext, useEffect, useRef,useCallback } from "react"; +import React, { useContext, useEffect, useRef, useCallback } from "react"; import { findNodeHandle, Text } from "react-native"; import { NativeAdContext } from "./context"; @@ -19,7 +19,17 @@ const AdvertiserView = (props) => { }, [nativeAd, nativeAdView]); return ( - + {nativeAd ? props.allCaps ? nativeAd.advertiser?.toUpperCase() diff --git a/src/IconView.js b/src/IconView.js index ce78c054..06cec734 100644 --- a/src/IconView.js +++ b/src/IconView.js @@ -1,8 +1,5 @@ import React, { useCallback, useContext, useEffect, useRef } from "react"; -import { - findNodeHandle, - Image, -} from "react-native"; +import { findNodeHandle, Image } from "react-native"; import { NativeAdContext } from "./context"; const IconView = (props) => { @@ -20,19 +17,13 @@ const IconView = (props) => { useEffect(() => { _onLayout(); }, [nativeAd, nativeAdView]); - if (nativeAd && nativeAd.icon === "empty") { - return ( - - ); + return ; } return ( - nativeAd?.icon !== "noicon" && ( + nativeAd?.icon !== "noicon" && + nativeAd.icon && ( { useEffect(() => { _onLayout(); }, [nativeAd, nativeAdView]); - - return nativeAd?.images[0] ? ( + return nativeAd?.images?.[0]?.url ? ( { }, [nativeAd, nativeAdView]); return ( - + {nativeAd ? nativeAd.price : null} ); diff --git a/src/context.js b/src/context.js index e84eed34..86688989 100644 --- a/src/context.js +++ b/src/context.js @@ -1,13 +1,13 @@ import React from "react"; export const defaultAd = { - icon:"empty", - images:[ + icon: undefined, + images: [ { - "url":null - } - ] -} + url: null, + }, + ], +}; export const NativeAdContext = React.createContext({ nativeAd: defaultAd,