@react-native-ohos/react-native-webview 13.10.5 → 13.10.6-beta.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.
- package/CHANGELOG.md +25 -0
- package/LICENSE +21 -21
- package/README.md +396 -13
- package/harmony/rn_webview/.gitignore +6 -0
- package/harmony/rn_webview/BuildProfile.ets +16 -40
- package/harmony/rn_webview/LICENSE +21 -21
- package/harmony/rn_webview/NOTICE +33 -33
- package/harmony/rn_webview/OAT.xml +44 -44
- package/harmony/rn_webview/README.OpenSource +10 -10
- package/harmony/rn_webview/build-profile.json5 +28 -28
- package/harmony/rn_webview/index.ets +33 -33
- package/harmony/rn_webview/obfuscation-rules.txt +17 -17
- package/harmony/rn_webview/oh-package-lock.json5 +18 -19
- package/harmony/rn_webview/oh-package.json5 +13 -13
- package/harmony/rn_webview/src/main/cpp/CMakeLists.txt +9 -9
- package/harmony/rn_webview/src/main/cpp/WebViewPackage.h +36 -36
- package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/BaseReactNativeWebviewPackage.h +94 -94
- package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/components/RNCWebViewJSIBinder.h +129 -128
- package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebView.cpp +20 -20
- package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebView.h +16 -16
- package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebViewModule.cpp +19 -19
- package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebViewModule.h +16 -16
- package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ComponentDescriptors.h +22 -22
- package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/EventEmitters.cpp +240 -240
- package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/EventEmitters.h +285 -285
- package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/Props.cpp +156 -155
- package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/Props.h +340 -339
- package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ShadowNodes.cpp +19 -19
- package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ShadowNodes.h +34 -34
- package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/States.cpp +16 -16
- package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/States.h +19 -19
- package/harmony/rn_webview/src/main/ets/CutomReference.ts +49 -49
- package/harmony/rn_webview/src/main/ets/Logger.ts +63 -63
- package/harmony/rn_webview/src/main/ets/Magic.ets +222 -206
- package/harmony/rn_webview/src/main/ets/RNCWebView.ets +907 -771
- package/harmony/rn_webview/src/main/ets/RNCWebViewPackage.ets +65 -65
- package/harmony/rn_webview/src/main/ets/ShouldRequestUrl.ts +67 -67
- package/harmony/rn_webview/src/main/ets/WebViewBaseOperate.ets +490 -477
- package/harmony/rn_webview/src/main/ets/WebViewTurboModule.ets +81 -81
- package/harmony/rn_webview/src/main/ets/generated/components/RNCWebView.ts +516 -511
- package/harmony/rn_webview/src/main/ets/generated/components/ts.ts +5 -5
- package/harmony/rn_webview/src/main/ets/generated/index.ets +5 -5
- package/harmony/rn_webview/src/main/ets/generated/ts.ts +6 -6
- package/harmony/rn_webview/src/main/ets/generated/turboModules/RNCWebView.ts +18 -18
- package/harmony/rn_webview/src/main/ets/generated/turboModules/RNCWebViewModule.ts +16 -16
- package/harmony/rn_webview/src/main/ets/generated/turboModules/ts.ts +6 -6
- package/harmony/rn_webview/src/main/module.json5 +10 -10
- package/harmony/rn_webview/src/main/resources/base/element/string.json +39 -39
- package/harmony/rn_webview/src/main/resources/en_US/element/string.json +39 -39
- package/harmony/rn_webview/src/main/resources/zh_CN/element/string.json +39 -39
- package/harmony/rn_webview/src/test/List.test.ets +4 -4
- package/harmony/rn_webview/src/test/LocalUnit.test.ets +32 -32
- package/harmony/rn_webview/ts.ets +28 -28
- package/harmony/rn_webview.har +0 -0
- package/package.json +105 -105
- package/src/NativeRNCWebView.ts +15 -15
- package/src/NativeRNCWebViewModule.ts +17 -17
- package/src/RNCWebViewNativeComponent.ts +289 -288
- package/src/WebView.harmony.tsx +331 -331
- package/src/WebView.tsx +4 -4
- package/src/codegenUtils.ts +8 -8
- package/src/index.ts +4 -4
package/package.json
CHANGED
|
@@ -1,105 +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.
|
|
13
|
-
"homepage": "https://
|
|
14
|
-
"scripts": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"ci
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"prepare": "
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"react
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
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
|
-
"@
|
|
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://
|
|
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
|
+
{
|
|
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.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
|
+
}
|
package/src/NativeRNCWebView.ts
CHANGED
|
@@ -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');
|