@react-native-ohos/react-native-webview 13.16.2-beta.2 → 13.16.2

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 (80) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/LICENSE +20 -20
  3. package/README.OpenSource +10 -10
  4. package/README.md +469 -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 +29 -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 +96 -96
  15. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/components/RNCWebViewJSIBinder.h +121 -120
  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 +258 -258
  22. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/EventEmitters.h +277 -277
  23. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/Props.cpp +104 -103
  24. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/Props.h +510 -509
  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/Logger.ts +43 -43
  30. package/harmony/rn_webview/src/main/ets/Magic.ets +201 -198
  31. package/harmony/rn_webview/src/main/ets/RNCWebView.ets +1019 -818
  32. package/harmony/rn_webview/src/main/ets/RNCWebViewPackage.ets +37 -37
  33. package/harmony/rn_webview/src/main/ets/WebViewBaseOperate.ets +528 -514
  34. package/harmony/rn_webview/src/main/ets/WebViewTurboModule.ets +67 -63
  35. package/harmony/rn_webview/src/main/ets/generated/components/RNCWebView.ts +529 -525
  36. package/harmony/rn_webview/src/main/ets/generated/components/ts.ts +5 -5
  37. package/harmony/rn_webview/src/main/ets/generated/index.ets +5 -5
  38. package/harmony/rn_webview/src/main/ets/generated/ts.ts +6 -6
  39. package/harmony/rn_webview/src/main/ets/generated/turboModules/RNCWebView.ts +18 -18
  40. package/harmony/rn_webview/src/main/ets/generated/turboModules/RNCWebViewModule.ts +16 -16
  41. package/harmony/rn_webview/src/main/ets/generated/turboModules/ts.ts +6 -6
  42. package/harmony/rn_webview/src/main/module.json5 +10 -10
  43. package/harmony/rn_webview/src/main/resources/base/element/string.json +39 -39
  44. package/harmony/rn_webview/src/main/resources/en_US/element/string.json +39 -39
  45. package/harmony/rn_webview/src/main/resources/zh_CN/element/string.json +39 -39
  46. package/harmony/rn_webview/src/test/List.test.ets +4 -4
  47. package/harmony/rn_webview/src/test/LocalUnit.test.ets +32 -32
  48. package/harmony/rn_webview/ts.ets +8 -8
  49. package/harmony/rn_webview.har +0 -0
  50. package/lib/NativeRNCWebView.d.ts +10 -0
  51. package/lib/NativeRNCWebView.d.ts.map +1 -0
  52. package/lib/NativeRNCWebView.js +1 -0
  53. package/lib/NativeRNCWebViewModule.d.ts +9 -0
  54. package/lib/NativeRNCWebViewModule.d.ts.map +1 -0
  55. package/lib/NativeRNCWebViewModule.js +1 -0
  56. package/lib/RNCWebViewNativeComponent.d.ts +250 -0
  57. package/lib/RNCWebViewNativeComponent.d.ts.map +1 -0
  58. package/lib/RNCWebViewNativeComponent.js +1 -0
  59. package/lib/WebView.d.ts +4 -0
  60. package/lib/WebView.d.ts.map +1 -0
  61. package/lib/WebView.harmony.d.ts +16 -0
  62. package/lib/WebView.harmony.d.ts.map +1 -0
  63. package/lib/WebView.harmony.js +1 -0
  64. package/lib/WebView.js +1 -0
  65. package/lib/codegenUtils.d.ts +3 -0
  66. package/lib/codegenUtils.d.ts.map +1 -0
  67. package/lib/codegenUtils.js +0 -0
  68. package/lib/index.d.ts +4 -0
  69. package/lib/index.d.ts.map +1 -0
  70. package/lib/index.js +1 -0
  71. package/package.json +101 -101
  72. package/src/NativeRNCWebView.ts +21 -21
  73. package/src/NativeRNCWebViewModule.ts +19 -19
  74. package/src/RNCWebViewNativeComponent.ts +356 -355
  75. package/src/WebView.harmony.tsx +348 -346
  76. package/src/WebView.tsx +10 -10
  77. package/src/codegenUtils.ts +10 -10
  78. package/src/index.ts +10 -10
  79. package/harmony/rn_webview/src/main/ets/CutomReference.ts +0 -30
  80. package/harmony/rn_webview/src/main/ets/ShouldRequestUrl.ts +0 -48
@@ -1,17 +1,17 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateShadowNodeCpp.js
9
- */
10
-
11
- #include "ShadowNodes.h"
12
-
13
- namespace facebook::react {
14
-
15
- extern const char RNCWebViewComponentName[] = "RNCWebView";
16
-
17
- } // namespace facebook::react
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateShadowNodeCpp.js
9
+ */
10
+
11
+ #include "ShadowNodes.h"
12
+
13
+ namespace facebook::react {
14
+
15
+ extern const char RNCWebViewComponentName[] = "RNCWebView";
16
+
17
+ } // namespace facebook::react
@@ -1,32 +1,32 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateShadowNodeH.js
9
- */
10
-
11
- #pragma once
12
-
13
- #include "EventEmitters.h"
14
- #include "Props.h"
15
- #include "States.h"
16
- #include <react/renderer/components/view/ConcreteViewShadowNode.h>
17
- #include <jsi/jsi.h>
18
-
19
- namespace facebook::react {
20
-
21
- JSI_EXPORT extern const char RNCWebViewComponentName[];
22
-
23
- /*
24
- * `ShadowNode` for <RNCWebView> component.
25
- */
26
- using RNCWebViewShadowNode = ConcreteViewShadowNode<
27
- RNCWebViewComponentName,
28
- RNCWebViewProps,
29
- RNCWebViewEventEmitter,
30
- RNCWebViewState>;
31
-
32
- } // namespace facebook::react
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateShadowNodeH.js
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include "EventEmitters.h"
14
+ #include "Props.h"
15
+ #include "States.h"
16
+ #include <react/renderer/components/view/ConcreteViewShadowNode.h>
17
+ #include <jsi/jsi.h>
18
+
19
+ namespace facebook::react {
20
+
21
+ JSI_EXPORT extern const char RNCWebViewComponentName[];
22
+
23
+ /*
24
+ * `ShadowNode` for <RNCWebView> component.
25
+ */
26
+ using RNCWebViewShadowNode = ConcreteViewShadowNode<
27
+ RNCWebViewComponentName,
28
+ RNCWebViewProps,
29
+ RNCWebViewEventEmitter,
30
+ RNCWebViewState>;
31
+
32
+ } // namespace facebook::react
@@ -1,16 +1,16 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateStateCpp.js
9
- */
10
- #include "States.h"
11
-
12
- namespace facebook::react {
13
-
14
-
15
-
16
- } // namespace facebook::react
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateStateCpp.js
9
+ */
10
+ #include "States.h"
11
+
12
+ namespace facebook::react {
13
+
14
+
15
+
16
+ } // namespace facebook::react
@@ -1,29 +1,29 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateStateH.js
8
- */
9
- #pragma once
10
-
11
- #ifdef ANDROID
12
- #include <folly/dynamic.h>
13
- #endif
14
-
15
- namespace facebook::react {
16
-
17
- class RNCWebViewState {
18
- public:
19
- RNCWebViewState() = default;
20
-
21
- #ifdef ANDROID
22
- RNCWebViewState(RNCWebViewState const &previousState, folly::dynamic data){};
23
- folly::dynamic getDynamic() const {
24
- return {};
25
- };
26
- #endif
27
- };
28
-
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateStateH.js
8
+ */
9
+ #pragma once
10
+
11
+ #ifdef ANDROID
12
+ #include <folly/dynamic.h>
13
+ #endif
14
+
15
+ namespace facebook::react {
16
+
17
+ class RNCWebViewState {
18
+ public:
19
+ RNCWebViewState() = default;
20
+
21
+ #ifdef ANDROID
22
+ RNCWebViewState(RNCWebViewState const &previousState, folly::dynamic data){};
23
+ folly::dynamic getDynamic() const {
24
+ return {};
25
+ };
26
+ #endif
27
+ };
28
+
29
29
  } // namespace facebook::react
@@ -1,44 +1,44 @@
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 hilog from '@ohos.hilog';
6
-
7
- class Logger {
8
- private domain: number;
9
- private prefix: string;
10
- private format: string = '%{public}s, %{public}s';
11
- private isDebug: boolean;
12
-
13
- /**
14
- * constructor.
15
- *
16
- * @param Prefix Identifies the log tag.
17
- * @param domain Domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFFF.
18
- */
19
- constructor(prefix: string = 'MyApp', domain: number = 0xFF00, isDebug = false) {
20
- this.prefix = prefix;
21
- this.domain = domain;
22
- this.isDebug = isDebug;
23
- }
24
-
25
- debug(...args: string[]): void {
26
- if (this.isDebug) {
27
- hilog.debug(this.domain, this.prefix, this.format, args);
28
- }
29
- }
30
-
31
- info(...args: string[]): void {
32
- hilog.info(this.domain, this.prefix, this.format, args);
33
- }
34
-
35
- warn(...args: string[]): void {
36
- hilog.warn(this.domain, this.prefix, this.format, args);
37
- }
38
-
39
- error(...args: string[]): void {
40
- hilog.error(this.domain, this.prefix, this.format, args);
41
- }
42
- }
43
-
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 hilog from '@ohos.hilog';
6
+
7
+ class Logger {
8
+ private domain: number;
9
+ private prefix: string;
10
+ private format: string = '%{public}s, %{public}s';
11
+ private isDebug: boolean;
12
+
13
+ /**
14
+ * constructor.
15
+ *
16
+ * @param Prefix Identifies the log tag.
17
+ * @param domain Domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFFF.
18
+ */
19
+ constructor(prefix: string = 'MyApp', domain: number = 0xFF00, isDebug = false) {
20
+ this.prefix = prefix;
21
+ this.domain = domain;
22
+ this.isDebug = isDebug;
23
+ }
24
+
25
+ debug(...args: string[]): void {
26
+ if (this.isDebug) {
27
+ hilog.debug(this.domain, this.prefix, this.format, args);
28
+ }
29
+ }
30
+
31
+ info(...args: string[]): void {
32
+ hilog.info(this.domain, this.prefix, this.format, args);
33
+ }
34
+
35
+ warn(...args: string[]): void {
36
+ hilog.warn(this.domain, this.prefix, this.format, args);
37
+ }
38
+
39
+ error(...args: string[]): void {
40
+ hilog.error(this.domain, this.prefix, this.format, args);
41
+ }
42
+ }
43
+
44
44
  export default new Logger('WebView', 0xFF00, false)