@react-native-ohos/react-native-webview 13.15.1-rc.1 → 13.15.1-rc.4

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 (56) hide show
  1. package/LICENSE +20 -20
  2. package/README.OpenSource +10 -10
  3. package/README.md +12 -12
  4. package/harmony/rn_webview/OAT.xml +44 -44
  5. package/harmony/rn_webview/build-profile.json5 +28 -28
  6. package/harmony/rn_webview/index.ets +12 -12
  7. package/harmony/rn_webview/oh-package.json5 +13 -13
  8. package/harmony/rn_webview/src/main/cpp/CMakeLists.txt +9 -9
  9. package/harmony/rn_webview/src/main/cpp/WebViewPackage.h +16 -16
  10. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/BaseReactNativeWebviewPackage.h +95 -95
  11. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/components/RNCWebViewJSIBinder.h +119 -119
  12. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebView.cpp +18 -18
  13. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebView.h +16 -16
  14. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebViewModule.cpp +17 -17
  15. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebViewModule.h +16 -16
  16. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ComponentDescriptors.h +24 -24
  17. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/EventEmitters.cpp +241 -241
  18. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/EventEmitters.h +263 -263
  19. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/Props.cpp +103 -103
  20. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/Props.h +509 -509
  21. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ShadowNodes.cpp +17 -17
  22. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ShadowNodes.h +32 -32
  23. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/States.cpp +16 -16
  24. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/States.h +28 -28
  25. package/harmony/rn_webview/src/main/ets/CutomReference.ts +29 -29
  26. package/harmony/rn_webview/src/main/ets/Logger.ts +43 -43
  27. package/harmony/rn_webview/src/main/ets/Magic.ets +184 -184
  28. package/harmony/rn_webview/src/main/ets/RNCWebView.ets +645 -570
  29. package/harmony/rn_webview/src/main/ets/RNCWebViewPackage.ets +37 -37
  30. package/harmony/rn_webview/src/main/ets/ShouldRequestUrl.ts +47 -47
  31. package/harmony/rn_webview/src/main/ets/WebViewBaseOperate.ets +457 -443
  32. package/harmony/rn_webview/src/main/ets/WebViewTurboModule.ets +57 -57
  33. package/harmony/rn_webview/src/main/ets/generated/components/RNCWebView.ts +524 -524
  34. package/harmony/rn_webview/src/main/ets/generated/components/ts.ts +5 -5
  35. package/harmony/rn_webview/src/main/ets/generated/index.ets +5 -5
  36. package/harmony/rn_webview/src/main/ets/generated/ts.ts +6 -6
  37. package/harmony/rn_webview/src/main/ets/generated/turboModules/RNCWebView.ts +18 -18
  38. package/harmony/rn_webview/src/main/ets/generated/turboModules/RNCWebViewModule.ts +16 -16
  39. package/harmony/rn_webview/src/main/ets/generated/turboModules/ts.ts +6 -6
  40. package/harmony/rn_webview/src/main/module.json5 +10 -10
  41. package/harmony/rn_webview/src/main/resources/base/element/string.json +39 -39
  42. package/harmony/rn_webview/src/main/resources/en_US/element/string.json +39 -39
  43. package/harmony/rn_webview/src/main/resources/zh_CN/element/string.json +39 -39
  44. package/harmony/rn_webview/src/test/List.test.ets +4 -4
  45. package/harmony/rn_webview/src/test/LocalUnit.test.ets +32 -32
  46. package/harmony/rn_webview/ts.ets +8 -8
  47. package/harmony/rn_webview.har +0 -0
  48. package/package.json +99 -99
  49. package/src/NativeRNCWebView.ts +21 -21
  50. package/src/NativeRNCWebViewModule.ts +19 -19
  51. package/src/RNCWebViewNativeComponent.ts +354 -354
  52. package/src/WebView.harmony.tsx +342 -342
  53. package/src/WebView.tsx +10 -10
  54. package/src/codegenUtils.ts +10 -10
  55. package/src/index.ts +10 -10
  56. package/harmony/rn_webview/BuildProfile.ets +0 -17
package/package.json CHANGED
@@ -1,99 +1,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.1-rc.1",
13
- "homepage": "https://github.com/react-native-oh-library/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": "^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": "file:./packages/rnoh-react-native-harmony-cli-0.77.10.tgz",
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": "git://github.com/react-native-oh-library/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.1-rc.4",
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": "file:./packages/react-native-oh-react-native-harmony-cli-0.77.18.tgz",
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,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');