@react-native-ohos/react-native-webview 13.15.3 → 13.15.4-beta.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 (59) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/LICENSE +20 -20
  3. package/README.OpenSource +10 -10
  4. package/README.md +395 -13
  5. package/harmony/rn_webview/.gitignore +6 -0
  6. package/harmony/rn_webview/BuildProfile.ets +17 -0
  7. package/harmony/rn_webview/OAT.xml +44 -44
  8. package/harmony/rn_webview/build-profile.json5 +28 -28
  9. package/harmony/rn_webview/index.ets +12 -12
  10. package/harmony/rn_webview/oh-package-lock.json5 +18 -0
  11. package/harmony/rn_webview/oh-package.json5 +13 -13
  12. package/harmony/rn_webview/src/main/cpp/CMakeLists.txt +9 -9
  13. package/harmony/rn_webview/src/main/cpp/WebViewPackage.h +16 -16
  14. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/BaseReactNativeWebviewPackage.h +95 -95
  15. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/components/RNCWebViewJSIBinder.h +127 -127
  16. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebView.cpp +18 -18
  17. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebView.h +16 -16
  18. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebViewModule.cpp +17 -17
  19. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebViewModule.h +16 -16
  20. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ComponentDescriptors.h +24 -24
  21. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/EventEmitters.cpp +241 -241
  22. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/EventEmitters.h +263 -263
  23. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/Props.cpp +109 -109
  24. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/Props.h +512 -512
  25. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ShadowNodes.cpp +17 -17
  26. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ShadowNodes.h +32 -32
  27. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/States.cpp +16 -16
  28. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/States.h +28 -28
  29. package/harmony/rn_webview/src/main/ets/CutomReference.ts +29 -29
  30. package/harmony/rn_webview/src/main/ets/Logger.ts +43 -43
  31. package/harmony/rn_webview/src/main/ets/Magic.ets +200 -200
  32. package/harmony/rn_webview/src/main/ets/RNCWebView.ets +842 -889
  33. package/harmony/rn_webview/src/main/ets/RNCWebViewPackage.ets +37 -37
  34. package/harmony/rn_webview/src/main/ets/ShouldRequestUrl.ts +47 -47
  35. package/harmony/rn_webview/src/main/ets/WebViewBaseOperate.ets +470 -470
  36. package/harmony/rn_webview/src/main/ets/WebViewTurboModule.ets +62 -62
  37. package/harmony/rn_webview/src/main/ets/generated/components/RNCWebView.ts +530 -530
  38. package/harmony/rn_webview/src/main/ets/generated/components/ts.ts +5 -5
  39. package/harmony/rn_webview/src/main/ets/generated/index.ets +5 -5
  40. package/harmony/rn_webview/src/main/ets/generated/ts.ts +6 -6
  41. package/harmony/rn_webview/src/main/ets/generated/turboModules/RNCWebView.ts +18 -18
  42. package/harmony/rn_webview/src/main/ets/generated/turboModules/RNCWebViewModule.ts +16 -16
  43. package/harmony/rn_webview/src/main/ets/generated/turboModules/ts.ts +6 -6
  44. package/harmony/rn_webview/src/main/module.json5 +10 -10
  45. package/harmony/rn_webview/src/main/resources/base/element/string.json +39 -39
  46. package/harmony/rn_webview/src/main/resources/en_US/element/string.json +39 -39
  47. package/harmony/rn_webview/src/main/resources/zh_CN/element/string.json +39 -39
  48. package/harmony/rn_webview/src/test/List.test.ets +4 -4
  49. package/harmony/rn_webview/src/test/LocalUnit.test.ets +32 -32
  50. package/harmony/rn_webview/ts.ets +8 -8
  51. package/harmony/rn_webview.har +0 -0
  52. package/package.json +100 -99
  53. package/src/NativeRNCWebView.ts +21 -21
  54. package/src/NativeRNCWebViewModule.ts +19 -19
  55. package/src/RNCWebViewNativeComponent.ts +357 -357
  56. package/src/WebView.harmony.tsx +344 -344
  57. package/src/WebView.tsx +10 -10
  58. package/src/codegenUtils.ts +10 -10
  59. package/src/index.ts +10 -10
package/package.json CHANGED
@@ -1,99 +1,100 @@
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.15.3",
13
- "homepage": "https://gitcode.com/openharmony-sig/rntpc_react-native-webview/tree/br_rnoh0.77#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": "^4.0.0",
39
- "invariant": "2.2.4",
40
- "react-native-webview": "13.15.0"
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
- "@react-native-oh/react-native-harmony-cli": "npm:@react-native-oh/react-native-harmony-cli@0.77.18-1",
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
- "@types/minimatch": "^5.1.2",
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.3.1",
65
- "react-native": "0.77.1",
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": "https://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
- },
98
- "packageManager": "yarn@1.22.19"
99
- }
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.15.4-beta.3",
13
+ "homepage": "https://gitcode.com/openharmony-sig/rntpc_react-native-webview/tree/br_rnoh0.82#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": "^4.0.0",
40
+ "invariant": "2.2.4",
41
+ "react-native-webview": "13.15.0"
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.77.18-1",
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
+ "@types/minimatch": "^5.1.2",
60
+ "appium": "1.17.0",
61
+ "eslint": "8.57.0",
62
+ "jest": "^29.6.3",
63
+ "metro-react-native-babel-preset": "0.73.7",
64
+ "prettier": "2.8.8",
65
+ "react": "18.3.1",
66
+ "react-native": "0.77.1",
67
+ "react-native-macos": "0.73.17",
68
+ "react-native-test-app": "3.7.2",
69
+ "react-native-windows": "0.73.8",
70
+ "selenium-appium": "1.0.2",
71
+ "selenium-webdriver": "4.0.0-alpha.7",
72
+ "semantic-release": "15.13.24",
73
+ "typescript": "5.1.3",
74
+ "winappdriver": "^0.0.7"
75
+ },
76
+ "repository": {
77
+ "type": "git",
78
+ "url": "https://gitcode.com/openharmony-sig/rntpc_react-native-webview.git"
79
+ },
80
+ "files": [
81
+ "src",
82
+ "harmony",
83
+ "react-native-webview.podspec",
84
+ "!**/__tests__",
85
+ "!**/__fixtures__",
86
+ "!**/__mocks__"
87
+ ],
88
+ "keywords": [
89
+ "react-native",
90
+ "harmony"
91
+ ],
92
+ "publishConfig": {
93
+ "registry": "https://registry.npmjs.org/",
94
+ "access": "public"
95
+ },
96
+ "harmony": {
97
+ "alias": "react-native-webview"
98
+ },
99
+ "packageManager": "yarn@1.22.19"
100
+ }
@@ -1,22 +1,22 @@
1
- /*
2
- * Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
3
- * Use of this source code is governed by a MIT license that can be
4
- * found in the LICENSE file.
5
- */
6
-
7
- import type { TurboModule } from 'react-native';
8
- import { TurboModuleRegistry } from 'react-native';
9
- import { Double } from 'react-native/Libraries/Types/CodegenTypes';
10
-
11
- export interface Spec extends TurboModule {
12
- readonly getConstants: () => {};
13
-
14
- // your module methods go here, for example:
15
- isFileUploadSupported(): Promise<boolean>;
16
- shouldStartLoadWithLockIdentifier(
17
- shouldStart: boolean,
18
- lockIdentifier: Double
19
- ): void;
20
- }
21
-
1
+ /*
2
+ * Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
3
+ * Use of this source code is governed by a MIT license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ import type { TurboModule } from 'react-native';
8
+ import { TurboModuleRegistry } from 'react-native';
9
+ import { Double } from 'react-native/Libraries/Types/CodegenTypes';
10
+
11
+ export interface Spec extends TurboModule {
12
+ readonly getConstants: () => {};
13
+
14
+ // your module methods go here, for example:
15
+ isFileUploadSupported(): Promise<boolean>;
16
+ shouldStartLoadWithLockIdentifier(
17
+ shouldStart: boolean,
18
+ lockIdentifier: Double
19
+ ): void;
20
+ }
21
+
22
22
  export default TurboModuleRegistry.getEnforcing<Spec>('RNCWebView');
@@ -1,19 +1,19 @@
1
- /*
2
- * Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
3
- * Use of this source code is governed by a MIT license that can be
4
- * found in the LICENSE file.
5
- */
6
-
7
- import type { TurboModule } from 'react-native';
8
- import { TurboModuleRegistry } from 'react-native';
9
- import { Double } from 'react-native/Libraries/Types/CodegenTypes';
10
-
11
- export interface Spec extends TurboModule {
12
- isFileUploadSupported(): Promise<boolean>;
13
- shouldStartLoadWithLockIdentifier(
14
- shouldStart: boolean,
15
- lockIdentifier: Double
16
- ): void;
17
- }
18
-
19
- export default TurboModuleRegistry.getEnforcing<Spec>('RNCWebViewModule');
1
+ /*
2
+ * Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
3
+ * Use of this source code is governed by a MIT license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ import type { TurboModule } from 'react-native';
8
+ import { TurboModuleRegistry } from 'react-native';
9
+ import { Double } from 'react-native/Libraries/Types/CodegenTypes';
10
+
11
+ export interface Spec extends TurboModule {
12
+ isFileUploadSupported(): Promise<boolean>;
13
+ shouldStartLoadWithLockIdentifier(
14
+ shouldStart: boolean,
15
+ lockIdentifier: Double
16
+ ): void;
17
+ }
18
+
19
+ export default TurboModuleRegistry.getEnforcing<Spec>('RNCWebViewModule');