@react-native-ohos/react-native-webview 13.10.6-beta.3 → 13.10.6

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 (62) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/LICENSE +21 -21
  3. package/README.md +385 -393
  4. package/harmony/rn_webview/.gitignore +6 -0
  5. package/harmony/rn_webview/BuildProfile.ets +1 -1
  6. package/harmony/rn_webview/LICENSE +21 -21
  7. package/harmony/rn_webview/NOTICE +33 -33
  8. package/harmony/rn_webview/OAT.xml +44 -44
  9. package/harmony/rn_webview/README.OpenSource +10 -10
  10. package/harmony/rn_webview/build-profile.json5 +28 -28
  11. package/harmony/rn_webview/index.ets +33 -33
  12. package/harmony/rn_webview/obfuscation-rules.txt +17 -17
  13. package/harmony/rn_webview/oh-package-lock.json5 +18 -18
  14. package/harmony/rn_webview/oh-package.json5 +13 -13
  15. package/harmony/rn_webview/src/main/cpp/CMakeLists.txt +9 -9
  16. package/harmony/rn_webview/src/main/cpp/WebViewPackage.h +36 -36
  17. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/BaseReactNativeWebviewPackage.h +94 -94
  18. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/components/RNCWebViewJSIBinder.h +129 -128
  19. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebView.cpp +20 -20
  20. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebView.h +16 -16
  21. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebViewModule.cpp +19 -19
  22. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebViewModule.h +16 -16
  23. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ComponentDescriptors.h +22 -22
  24. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/EventEmitters.cpp +240 -240
  25. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/EventEmitters.h +285 -285
  26. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/Props.cpp +156 -155
  27. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/Props.h +340 -339
  28. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ShadowNodes.cpp +19 -19
  29. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ShadowNodes.h +34 -34
  30. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/States.cpp +16 -16
  31. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/States.h +19 -19
  32. package/harmony/rn_webview/src/main/ets/CutomReference.ts +49 -49
  33. package/harmony/rn_webview/src/main/ets/Logger.ts +63 -63
  34. package/harmony/rn_webview/src/main/ets/Magic.ets +223 -221
  35. package/harmony/rn_webview/src/main/ets/RNCWebView.ets +1098 -903
  36. package/harmony/rn_webview/src/main/ets/RNCWebViewPackage.ets +65 -65
  37. package/harmony/rn_webview/src/main/ets/ShouldRequestUrl.ts +67 -67
  38. package/harmony/rn_webview/src/main/ets/WebViewBaseOperate.ets +490 -490
  39. package/harmony/rn_webview/src/main/ets/WebViewTurboModule.ets +81 -81
  40. package/harmony/rn_webview/src/main/ets/generated/components/RNCWebView.ts +516 -511
  41. package/harmony/rn_webview/src/main/ets/generated/components/ts.ts +5 -5
  42. package/harmony/rn_webview/src/main/ets/generated/index.ets +5 -5
  43. package/harmony/rn_webview/src/main/ets/generated/ts.ts +6 -6
  44. package/harmony/rn_webview/src/main/ets/generated/turboModules/RNCWebView.ts +18 -18
  45. package/harmony/rn_webview/src/main/ets/generated/turboModules/RNCWebViewModule.ts +16 -16
  46. package/harmony/rn_webview/src/main/ets/generated/turboModules/ts.ts +6 -6
  47. package/harmony/rn_webview/src/main/module.json5 +10 -10
  48. package/harmony/rn_webview/src/main/resources/base/element/string.json +39 -39
  49. package/harmony/rn_webview/src/main/resources/en_US/element/string.json +39 -39
  50. package/harmony/rn_webview/src/main/resources/zh_CN/element/string.json +39 -39
  51. package/harmony/rn_webview/src/test/List.test.ets +4 -4
  52. package/harmony/rn_webview/src/test/LocalUnit.test.ets +32 -32
  53. package/harmony/rn_webview/ts.ets +28 -28
  54. package/harmony/rn_webview.har +0 -0
  55. package/package.json +105 -104
  56. package/src/NativeRNCWebView.ts +15 -15
  57. package/src/NativeRNCWebViewModule.ts +17 -17
  58. package/src/RNCWebViewNativeComponent.ts +289 -288
  59. package/src/WebView.harmony.tsx +331 -331
  60. package/src/WebView.tsx +4 -4
  61. package/src/codegenUtils.ts +8 -8
  62. package/src/index.ts +4 -4
package/package.json CHANGED
@@ -1,104 +1,105 @@
1
- {
2
- "name": "@react-native-ohos/react-native-webview",
3
- "description": "React Native WebView component for harmony",
4
- "react-native": "src/index",
5
- "source": "src/index",
6
- "typings": "index.d.ts",
7
- "author": "Jamon Holmgren <jamon@infinite.red>",
8
- "contributors": [
9
- "Thibault Malbranche <malbranche.thibault@gmail.com>"
10
- ],
11
- "license": "MIT",
12
- "version": "13.10.6-beta.3",
13
- "homepage": "https://gitcode.com/openharmony-sig/rntpc_react-native-webview#readme",
14
- "scripts": {
15
- "macos": "react-native run-macos --scheme WebviewExample --project-path example/macos",
16
- "start": "react-native start",
17
- "windows": "install-windows-test-app --project-directory example/windows && react-native run-windows --root example --arch x64",
18
- "ci": "CI=true && yarn lint",
19
- "ci:publish": "yarn semantic-release",
20
- "lint": "yarn tsc --noEmit && yarn eslint ./src --ext .ts,.tsx,.js,.jsx",
21
- "build": "babel --extensions \".ts,.tsx\" --out-dir lib src",
22
- "prepare:types": "tsc --noEmit false --emitDeclarationOnly --declaration --rootDir src --outDir lib",
23
- "prepare": "yarn prepare:types && yarn build",
24
- "appium": "appium",
25
- "test:windows": "yarn jest --setupFiles=./jest-setups/jest.setup.js",
26
- "add:macos": "yarn add react-native-macos@0.73.17",
27
- "codegen-lib": "react-native codegen-lib-harmony --no-safety-check --npm-package-name react-native-webview --cpp-output-path ./harmony/rn_webview/src/main/cpp/generated --ets-output-path ./harmony/rn_webview/src/main/ets/generated --turbo-modules-spec-paths ./src --arkts-components-spec-paths ./src"
28
- },
29
- "rn-docs": {
30
- "title": "Webview",
31
- "type": "Component"
32
- },
33
- "peerDependencies": {
34
- "react": "*",
35
- "react-native": "*"
36
- },
37
- "dependencies": {
38
- "escape-string-regexp": "2.0.0",
39
- "invariant": "2.2.4",
40
- "react-native-webview": "13.10.2"
41
- },
42
- "devDependencies": {
43
- "@babel/cli": "^7.20.0",
44
- "@babel/core": "^7.20.0",
45
- "@babel/runtime": "^7.20.0",
46
- "@callstack/react-native-visionos": "0.73.8",
47
- "@react-native/babel-preset": "0.73.21",
48
- "@react-native/eslint-config": "0.73.2",
49
- "@react-native/metro-config": "0.73.5",
50
- "@react-native/typescript-config": "0.73.1",
51
- "@rnoh/react-native-harmony-cli": "npm:@react-native-oh/react-native-harmony-cli@^0.0.27",
52
- "@rnx-kit/metro-config": "1.3.15",
53
- "@semantic-release/git": "7.0.16",
54
- "@types/invariant": "^2.2.30",
55
- "@types/jest": "^29.5.12",
56
- "@types/react": "18.2.61",
57
- "@types/selenium-webdriver": "4.0.9",
58
- "appium": "1.17.0",
59
- "eslint": "8.57.0",
60
- "jest": "^29.6.3",
61
- "metro-react-native-babel-preset": "0.73.7",
62
- "prettier": "2.8.8",
63
- "react": "18.2.0",
64
- "react-native": "0.73.5",
65
- "react-native-macos": "0.73.17",
66
- "react-native-test-app": "3.7.2",
67
- "react-native-windows": "0.73.8",
68
- "selenium-appium": "1.0.2",
69
- "selenium-webdriver": "4.0.0-alpha.7",
70
- "semantic-release": "15.13.24",
71
- "typescript": "5.1.3",
72
- "winappdriver": "^0.0.7"
73
- },
74
- "repository": {
75
- "type": "git",
76
- "url": "git://gitcode.com/openharmony-sig/rntpc_react-native-webview.git"
77
- },
78
- "files": [
79
- "src",
80
- "harmony",
81
- "react-native-webview.podspec",
82
- "!**/__tests__",
83
- "!**/__fixtures__",
84
- "!**/__mocks__"
85
- ],
86
- "keywords": [
87
- "react-native",
88
- "harmony"
89
- ],
90
- "publishConfig": {
91
- "registry": "https://registry.npmjs.org/",
92
- "access": "public"
93
- },
94
- "harmony": {
95
- "alias": "react-native-webview",
96
- "autolinking": {
97
- "etsPackageClassName":"WebViewPackage",
98
- "cppPackageClassName":"WebViewPackage",
99
- "cmakeLibraryTargetName": "rnoh_webview",
100
- "ohPackageName": "@react-native-ohos/react-native-webview"
101
- }
102
- },
103
- "packageManager": "yarn@1.22.19"
104
- }
1
+ {
2
+ "name": "@react-native-ohos/react-native-webview",
3
+ "description": "React Native WebView component for harmony",
4
+ "react-native": "src/index",
5
+ "source": "src/index",
6
+ "typings": "index.d.ts",
7
+ "author": "Jamon Holmgren <jamon@infinite.red>",
8
+ "contributors": [
9
+ "Thibault Malbranche <malbranche.thibault@gmail.com>"
10
+ ],
11
+ "license": "MIT",
12
+ "version": "13.10.6",
13
+ "homepage": "https://gitcode.com/openharmony-sig/rntpc_react-native-webview#readme",
14
+ "scripts": {
15
+ "pack": "npm pack --ignore-scripts",
16
+ "macos": "react-native run-macos --scheme WebviewExample --project-path example/macos",
17
+ "start": "react-native start",
18
+ "windows": "install-windows-test-app --project-directory example/windows && react-native run-windows --root example --arch x64",
19
+ "ci": "CI=true && yarn lint",
20
+ "ci:publish": "yarn semantic-release",
21
+ "lint": "yarn tsc --noEmit && yarn eslint ./src --ext .ts,.tsx,.js,.jsx",
22
+ "build": "babel --extensions \".ts,.tsx\" --out-dir lib src",
23
+ "prepare:types": "tsc --noEmit false --emitDeclarationOnly --declaration --rootDir src --outDir lib",
24
+ "prepare": "yarn prepare:types && yarn build",
25
+ "appium": "appium",
26
+ "test:windows": "yarn jest --setupFiles=./jest-setups/jest.setup.js",
27
+ "add:macos": "yarn add react-native-macos@0.73.17",
28
+ "codegen-lib": "react-native codegen-lib-harmony --no-safety-check --npm-package-name react-native-webview --cpp-output-path ./harmony/rn_webview/src/main/cpp/generated --ets-output-path ./harmony/rn_webview/src/main/ets/generated --turbo-modules-spec-paths ./src --arkts-components-spec-paths ./src"
29
+ },
30
+ "rn-docs": {
31
+ "title": "Webview",
32
+ "type": "Component"
33
+ },
34
+ "peerDependencies": {
35
+ "react": "*",
36
+ "react-native": "*"
37
+ },
38
+ "dependencies": {
39
+ "escape-string-regexp": "2.0.0",
40
+ "invariant": "2.2.4",
41
+ "react-native-webview": "13.10.2"
42
+ },
43
+ "devDependencies": {
44
+ "@babel/cli": "^7.20.0",
45
+ "@babel/core": "^7.20.0",
46
+ "@babel/runtime": "^7.20.0",
47
+ "@callstack/react-native-visionos": "0.73.8",
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
+ "@react-native-oh/react-native-harmony-cli": "npm:@react-native-oh/react-native-harmony-cli@^0.0.27",
53
+ "@rnx-kit/metro-config": "1.3.15",
54
+ "@semantic-release/git": "7.0.16",
55
+ "@types/invariant": "^2.2.30",
56
+ "@types/jest": "^29.5.12",
57
+ "@types/react": "18.2.61",
58
+ "@types/selenium-webdriver": "4.0.9",
59
+ "appium": "1.17.0",
60
+ "eslint": "8.57.0",
61
+ "jest": "^29.6.3",
62
+ "metro-react-native-babel-preset": "0.73.7",
63
+ "prettier": "2.8.8",
64
+ "react": "18.2.0",
65
+ "react-native": "0.73.5",
66
+ "react-native-macos": "0.73.17",
67
+ "react-native-test-app": "3.7.2",
68
+ "react-native-windows": "0.73.8",
69
+ "selenium-appium": "1.0.2",
70
+ "selenium-webdriver": "4.0.0-alpha.7",
71
+ "semantic-release": "15.13.24",
72
+ "typescript": "5.1.3",
73
+ "winappdriver": "^0.0.7"
74
+ },
75
+ "repository": {
76
+ "type": "git",
77
+ "url": "git://gitcode.com/openharmony-sig/rntpc_react-native-webview.git"
78
+ },
79
+ "files": [
80
+ "src",
81
+ "harmony",
82
+ "react-native-webview.podspec",
83
+ "!**/__tests__",
84
+ "!**/__fixtures__",
85
+ "!**/__mocks__"
86
+ ],
87
+ "keywords": [
88
+ "react-native",
89
+ "harmony"
90
+ ],
91
+ "publishConfig": {
92
+ "registry": "https://registry.npmjs.org/",
93
+ "access": "public"
94
+ },
95
+ "harmony": {
96
+ "alias": "react-native-webview",
97
+ "autolinking": {
98
+ "etsPackageClassName": "WebViewPackage",
99
+ "cppPackageClassName": "WebViewPackage",
100
+ "cmakeLibraryTargetName": "rnoh_webview",
101
+ "ohPackageName": "@react-native-ohos/react-native-webview"
102
+ }
103
+ },
104
+ "packageManager": "yarn@1.22.19"
105
+ }
@@ -1,16 +1,16 @@
1
- import type { TurboModule } from 'react-native';
2
- import { TurboModuleRegistry } from 'react-native';
3
- import { Double } from 'react-native/Libraries/Types/CodegenTypes';
4
-
5
- export interface Spec extends TurboModule {
6
- readonly getConstants: () => {};
7
-
8
- // your module methods go here, for example:
9
- isFileUploadSupported(): Promise<boolean>;
10
- shouldStartLoadWithLockIdentifier(
11
- shouldStart: boolean,
12
- lockIdentifier: Double
13
- ): void;
14
- }
15
-
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+ import { Double } from 'react-native/Libraries/Types/CodegenTypes';
4
+
5
+ export interface Spec extends TurboModule {
6
+ readonly getConstants: () => {};
7
+
8
+ // your module methods go here, for example:
9
+ isFileUploadSupported(): Promise<boolean>;
10
+ shouldStartLoadWithLockIdentifier(
11
+ shouldStart: boolean,
12
+ lockIdentifier: Double
13
+ ): void;
14
+ }
15
+
16
16
  export default TurboModuleRegistry.getEnforcing<Spec>('RNCWebView');
@@ -1,17 +1,17 @@
1
- // Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
2
- // Use of this source code is governed by a Apache-2.0 license that can be
3
- // found in the LICENSE file.
4
-
5
- import type { TurboModule } from 'react-native';
6
- import { TurboModuleRegistry } from 'react-native';
7
- import { Double } from 'react-native/Libraries/Types/CodegenTypes';
8
-
9
- export interface Spec extends TurboModule {
10
- isFileUploadSupported(): Promise<boolean>;
11
- shouldStartLoadWithLockIdentifier(
12
- shouldStart: boolean,
13
- lockIdentifier: Double
14
- ): void;
15
- }
16
-
17
- export default TurboModuleRegistry.getEnforcing<Spec>('RNCWebViewModule');
1
+ // Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
2
+ // Use of this source code is governed by a Apache-2.0 license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import type { TurboModule } from 'react-native';
6
+ import { TurboModuleRegistry } from 'react-native';
7
+ import { Double } from 'react-native/Libraries/Types/CodegenTypes';
8
+
9
+ export interface Spec extends TurboModule {
10
+ isFileUploadSupported(): Promise<boolean>;
11
+ shouldStartLoadWithLockIdentifier(
12
+ shouldStart: boolean,
13
+ lockIdentifier: Double
14
+ ): void;
15
+ }
16
+
17
+ export default TurboModuleRegistry.getEnforcing<Spec>('RNCWebViewModule');