react-native-webview-bootpay 13.6.13 → 13.8.3

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 (36) hide show
  1. package/android/build.gradle +35 -10
  2. package/android/gradle.properties +42 -0
  3. package/android/src/main/java/kr/co/bootpay/webview/BPCWebChromeClient.java +16 -3
  4. package/android/src/main/java/kr/co/bootpay/webview/BPCWebViewClient.java +5 -5
  5. package/android/src/main/java/kr/co/bootpay/webview/BPCWebviewWrapper.kt +39 -0
  6. package/apple/BPCWebView.h +6 -0
  7. package/apple/BPCWebView.mm +36 -27
  8. package/apple/BPCWebViewImpl.h +1 -0
  9. package/apple/BPCWebViewImpl.m +25 -0
  10. package/apple/BPCWebViewManager.mm +1 -0
  11. package/lib/BPCWebViewNativeComponent.d.ts +13 -12
  12. package/lib/BPCWebViewNativeComponent.d.ts.map +1 -1
  13. package/lib/BPCWebViewNativeComponent.js +1 -6
  14. package/lib/NativeBPCWebView.d.ts +1 -0
  15. package/lib/NativeBPCWebView.d.ts.map +1 -1
  16. package/lib/NativeBPCWebView.js +1 -2
  17. package/lib/WebView.android.js +1 -136
  18. package/lib/WebView.d.ts +1 -1
  19. package/lib/WebView.d.ts.map +1 -1
  20. package/lib/WebView.ios.js +1 -170
  21. package/lib/WebView.js +1 -11
  22. package/lib/WebView.macos.js +1 -132
  23. package/lib/WebView.styles.js +1 -33
  24. package/lib/WebView.windows.js +1 -140
  25. package/lib/WebViewNativeComponent.macos.js +1 -3
  26. package/lib/WebViewNativeComponent.windows.js +1 -3
  27. package/lib/WebViewShared.d.ts +3 -3
  28. package/lib/WebViewShared.d.ts.map +1 -1
  29. package/lib/WebViewShared.js +1 -150
  30. package/lib/WebViewTypes.d.ts +28 -28
  31. package/lib/WebViewTypes.d.ts.map +1 -1
  32. package/lib/WebViewTypes.js +1 -33
  33. package/lib/index.js +1 -3
  34. package/package.json +26 -30
  35. package/react-native-webview-bootpay.podspec +26 -18
  36. package/react-native.config.js +9 -12
package/package.json CHANGED
@@ -11,26 +11,24 @@
11
11
  "Thibault Malbranche <malbranche.thibault@gmail.com>"
12
12
  ],
13
13
  "license": "MIT",
14
- "version": "13.6.13",
14
+ "version": "13.8.3",
15
15
  "homepage": "https://github.com/bootpay/react-native-webview-bootpay",
16
16
  "scripts": {
17
17
  "android": "react-native run-android",
18
18
  "ios": "react-native run-ios",
19
- "build:ios": "react-native bundle --entry-file='./index.js' --bundle-output='./example/ios/main.jsbundle' --dev=false --platform='ios'",
20
-
21
19
  "macos": "react-native run-macos --scheme WebviewExample --project-path example/macos",
22
20
  "start": "cd example && react-native start",
23
21
  "windows": "install-windows-test-app --project-directory example/windows && react-native run-windows --root example --arch x64",
24
22
  "ci": "CI=true && yarn lint",
25
23
  "ci:publish": "yarn semantic-release",
26
- "lint": "yarn tsc --noEmit && yarn eslint ./src --ext .ts,.tsx",
27
- "build": "yarn tsc",
28
- "prepare": "yarn build",
24
+ "lint": "yarn tsc --noEmit && yarn eslint ./src --ext .ts,.tsx,.js,.jsx",
25
+ "build": "babel --extensions \".ts,.tsx\" --out-dir lib src",
26
+ "prepare": "yarn build",
29
27
  "appium": "appium",
30
28
  "test:windows": "yarn jest --setupFiles=./jest-setups/jest.setup.js",
31
- "add:macos": "yarn add react-native-macos@0.71.33"
29
+ "add:macos": "yarn add react-native-macos@0.73.17"
32
30
  },
33
-
31
+
34
32
  "rn-docs": {
35
33
  "title": "Webview",
36
34
  "type": "Component"
@@ -44,35 +42,32 @@
44
42
  "invariant": "2.2.4"
45
43
  },
46
44
  "devDependencies": {
47
- "@babel/core": "^7.0.0",
48
- "@babel/runtime": "^7.0.0",
45
+ "@babel/cli": "^7.20.0",
46
+ "@babel/core": "^7.20.0",
47
+ "@babel/runtime": "^7.20.0",
48
+ "@react-native/babel-preset": "0.73.21",
49
+ "@react-native/eslint-config": "0.73.2",
50
+ "@react-native/metro-config": "0.73.5",
51
+ "@react-native/typescript-config": "0.73.1",
52
+ "@rnx-kit/metro-config": "1.3.14",
49
53
  "@semantic-release/git": "7.0.16",
50
54
  "@types/invariant": "^2.2.30",
51
- "@types/jest": "^29.4.0",
52
- "@types/react": "18.0.27",
55
+ "@types/jest": "^29.5.12",
56
+ "@types/react": "18.2.61",
53
57
  "@types/selenium-webdriver": "4.0.9",
54
- "@typescript-eslint/eslint-plugin": "2.1.0",
55
- "@typescript-eslint/parser": "2.1.0",
56
58
  "appium": "1.17.0",
57
- "eslint": "6.3.0",
58
- "eslint-config-airbnb": "18.0.1",
59
- "eslint-config-prettier": "6.2.0",
60
- "eslint-plugin-import": "2.18.2",
61
- "eslint-plugin-jsx-a11y": "6.2.3",
62
- "eslint-plugin-react": "7.14.3",
63
- "eslint-plugin-react-hooks": "^4.5.0",
64
- "eslint-plugin-react-native": "3.7.0",
65
- "jest": "^29.4.1",
66
- "metro-react-native-babel-preset": "0.73.7",
59
+ "eslint": "8.57.0",
60
+ "jest": "^29.6.3",
61
+ "prettier": "2.8.8",
67
62
  "react": "18.2.0",
68
- "react-native": "0.71.12",
69
- "react-native-macos": "0.71.33",
70
- "react-native-test-app": "2.5.15",
71
- "react-native-windows": "0.71.30",
63
+ "react-native": "0.73.5",
64
+ "react-native-macos": "0.73.17",
65
+ "react-native-test-app": "3.2.16",
66
+ "react-native-windows": "0.73.8",
72
67
  "selenium-appium": "1.0.2",
73
68
  "selenium-webdriver": "4.0.0-alpha.7",
74
69
  "semantic-release": "15.13.24",
75
- "typescript": "^4.0.0",
70
+ "typescript": "5.1.3",
76
71
  "winappdriver": "^0.0.7"
77
72
  },
78
73
  "repository": {
@@ -106,5 +101,6 @@
106
101
  "android": {
107
102
  "javaPackageName": "kr.co.bootpay.webview"
108
103
  }
109
- }
104
+ },
105
+ "packageManager": "yarn@1.22.19"
110
106
  }
@@ -1,8 +1,9 @@
1
1
  require 'json'
2
2
 
3
- package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
3
+ new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
4
+ ios_platform = new_arch_enabled ? '11.0' : '9.0'
4
5
 
5
- folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
6
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
6
7
 
7
8
  Pod::Spec.new do |s|
8
9
  s.name = package['name']
@@ -18,21 +19,28 @@ Pod::Spec.new do |s|
18
19
 
19
20
  s.source_files = "apple/**/*.{h,m,mm,swift}"
20
21
 
21
- s.dependency "React-Core"
22
-
23
- if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
24
- s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
25
- s.pod_target_xcconfig = {
26
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
27
- "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
28
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
29
- }
30
-
31
- s.dependency "React-RCTFabric"
32
- s.dependency "React-Codegen"
33
- s.dependency "RCT-Folly"
34
- s.dependency "RCTRequired"
35
- s.dependency "RCTTypeSafety"
36
- s.dependency "ReactCommon/turbomodule/core"
22
+ if defined?(install_modules_dependencies()) != nil
23
+ install_modules_dependencies(s);
24
+ else
25
+ if new_arch_enabled
26
+ folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
27
+
28
+ s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
29
+
30
+ s.pod_target_xcconfig = {
31
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
32
+ "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
33
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
34
+ }
35
+
36
+ s.dependency "React-RCTFabric"
37
+ s.dependency "React-Codegen"
38
+ s.dependency "RCT-Folly"
39
+ s.dependency "RCTRequired"
40
+ s.dependency "RCTTypeSafety"
41
+ s.dependency "ReactCommon/turbomodule/core"
42
+ else
43
+ s.dependency "React-Core"
44
+ end
37
45
  end
38
46
  end
@@ -2,27 +2,24 @@ const project = (() => {
2
2
  const fs = require('fs');
3
3
  const path = require('path');
4
4
  try {
5
- const {
6
- androidManifestPath,
7
- windowsProjectPath,
8
- } = require('react-native-test-app');
9
- return {
5
+ const { configureProjects } = require('react-native-test-app');
6
+
7
+ return configureProjects({
10
8
  android: {
11
9
  sourceDir: path.join('example', 'android'),
12
- manifestPath: androidManifestPath(
13
- path.join(__dirname, 'example', 'android'),
14
- ),
10
+ manifestPath: path.join(__dirname, 'example', 'android'),
15
11
  },
16
12
  ios: {
17
13
  sourceDir: 'example/ios',
18
14
  },
19
15
  windows: fs.existsSync('example/windows/WebviewExample.sln') && {
20
16
  sourceDir: path.join('example', 'windows'),
21
- solutionFile: 'WebviewExample.sln',
22
- project: windowsProjectPath(path.join(__dirname, 'example', 'windows')),
17
+ solutionFile: path.join('example', 'windows', 'WebviewExample.sln'),
18
+ project: path.join(__dirname, 'example', 'windows'),
23
19
  },
24
- };
25
- } catch (_) {
20
+ });
21
+ } catch (e) {
22
+ console.log('Hello?', e);
26
23
  return undefined;
27
24
  }
28
25
  })();