@react-native-ohos/react-native-webview 13.15.1-rc.1 → 13.15.1-rc.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 (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 +570 -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
@@ -1,263 +1,263 @@
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: GenerateEventEmitterH.js
9
- */
10
- #pragma once
11
-
12
- #include <react/renderer/components/view/ViewEventEmitter.h>
13
-
14
-
15
- namespace facebook::react {
16
- class RNCWebViewEventEmitter : public ViewEventEmitter {
17
- public:
18
- using ViewEventEmitter::ViewEventEmitter;
19
-
20
- struct OnContentSizeChange {
21
- std::string url;
22
- bool loading;
23
- std::string title;
24
- bool canGoBack;
25
- bool canGoForward;
26
- double lockIdentifier;
27
- };
28
-
29
- struct OnRenderProcessGone {
30
- bool didCrash;
31
- };
32
-
33
- struct OnContentProcessDidTerminate {
34
- std::string url;
35
- bool loading;
36
- std::string title;
37
- bool canGoBack;
38
- bool canGoForward;
39
- double lockIdentifier;
40
- };
41
-
42
- struct OnCustomMenuSelection {
43
- std::string label;
44
- std::string key;
45
- std::string selectedText;
46
- };
47
-
48
- struct OnFileDownload {
49
- std::string downloadUrl;
50
- };
51
-
52
- struct OnLoadingError {
53
- std::string url;
54
- bool loading;
55
- std::string title;
56
- bool canGoBack;
57
- bool canGoForward;
58
- double lockIdentifier;
59
- std::string domain;
60
- int code;
61
- std::string description;
62
- };
63
-
64
- enum class OnLoadingFinishNavigationType {
65
- Click,
66
- Formsubmit,
67
- Backforward,
68
- Reload,
69
- Formresubmit,
70
- Other
71
- };
72
-
73
- static char const *toString(const OnLoadingFinishNavigationType value) {
74
- switch (value) {
75
- case OnLoadingFinishNavigationType::Click: return "click";
76
- case OnLoadingFinishNavigationType::Formsubmit: return "formsubmit";
77
- case OnLoadingFinishNavigationType::Backforward: return "backforward";
78
- case OnLoadingFinishNavigationType::Reload: return "reload";
79
- case OnLoadingFinishNavigationType::Formresubmit: return "formresubmit";
80
- case OnLoadingFinishNavigationType::Other: return "other";
81
- }
82
- }
83
-
84
- struct OnLoadingFinish {
85
- std::string url;
86
- bool loading;
87
- std::string title;
88
- bool canGoBack;
89
- bool canGoForward;
90
- double lockIdentifier;
91
- OnLoadingFinishNavigationType navigationType;
92
- std::string mainDocumentURL;
93
- };
94
-
95
- struct OnLoadingProgress {
96
- std::string url;
97
- bool loading;
98
- std::string title;
99
- bool canGoBack;
100
- bool canGoForward;
101
- double lockIdentifier;
102
- double progress;
103
- };
104
-
105
- enum class OnLoadingStartNavigationType {
106
- Click,
107
- Formsubmit,
108
- Backforward,
109
- Reload,
110
- Formresubmit,
111
- Other
112
- };
113
-
114
- static char const *toString(const OnLoadingStartNavigationType value) {
115
- switch (value) {
116
- case OnLoadingStartNavigationType::Click: return "click";
117
- case OnLoadingStartNavigationType::Formsubmit: return "formsubmit";
118
- case OnLoadingStartNavigationType::Backforward: return "backforward";
119
- case OnLoadingStartNavigationType::Reload: return "reload";
120
- case OnLoadingStartNavigationType::Formresubmit: return "formresubmit";
121
- case OnLoadingStartNavigationType::Other: return "other";
122
- }
123
- }
124
-
125
- struct OnLoadingStart {
126
- std::string url;
127
- bool loading;
128
- std::string title;
129
- bool canGoBack;
130
- bool canGoForward;
131
- double lockIdentifier;
132
- OnLoadingStartNavigationType navigationType;
133
- std::string mainDocumentURL;
134
- };
135
-
136
- struct OnHttpError {
137
- std::string url;
138
- bool loading;
139
- std::string title;
140
- bool canGoBack;
141
- bool canGoForward;
142
- double lockIdentifier;
143
- std::string description;
144
- int statusCode;
145
- };
146
-
147
- struct OnMessage {
148
- std::string url;
149
- bool loading;
150
- std::string title;
151
- bool canGoBack;
152
- bool canGoForward;
153
- double lockIdentifier;
154
- std::string data;
155
- };
156
-
157
- struct OnOpenWindow {
158
- std::string targetUrl;
159
- };
160
-
161
- struct OnScrollContentInset {
162
- double bottom;
163
- double left;
164
- double right;
165
- double top;
166
- };
167
-
168
- struct OnScrollContentOffset {
169
- double y;
170
- double x;
171
- };
172
-
173
- struct OnScrollContentSize {
174
- double height;
175
- double width;
176
- };
177
-
178
- struct OnScrollLayoutMeasurement {
179
- double height;
180
- double width;
181
- };
182
-
183
- struct OnScrollTargetContentOffset {
184
- double y;
185
- double x;
186
- };
187
-
188
- struct OnScrollVelocity {
189
- double y;
190
- double x;
191
- };
192
-
193
- struct OnScroll {
194
- OnScrollContentInset contentInset;
195
- OnScrollContentOffset contentOffset;
196
- OnScrollContentSize contentSize;
197
- OnScrollLayoutMeasurement layoutMeasurement;
198
- OnScrollTargetContentOffset targetContentOffset;
199
- OnScrollVelocity velocity;
200
- double zoomScale;
201
- bool responderIgnoreScroll;
202
- };
203
-
204
- enum class OnShouldStartLoadWithRequestNavigationType {
205
- Click,
206
- Formsubmit,
207
- Backforward,
208
- Reload,
209
- Formresubmit,
210
- Other
211
- };
212
-
213
- static char const *toString(const OnShouldStartLoadWithRequestNavigationType value) {
214
- switch (value) {
215
- case OnShouldStartLoadWithRequestNavigationType::Click: return "click";
216
- case OnShouldStartLoadWithRequestNavigationType::Formsubmit: return "formsubmit";
217
- case OnShouldStartLoadWithRequestNavigationType::Backforward: return "backforward";
218
- case OnShouldStartLoadWithRequestNavigationType::Reload: return "reload";
219
- case OnShouldStartLoadWithRequestNavigationType::Formresubmit: return "formresubmit";
220
- case OnShouldStartLoadWithRequestNavigationType::Other: return "other";
221
- }
222
- }
223
-
224
- struct OnShouldStartLoadWithRequest {
225
- std::string url;
226
- bool loading;
227
- std::string title;
228
- bool canGoBack;
229
- bool canGoForward;
230
- double lockIdentifier;
231
- OnShouldStartLoadWithRequestNavigationType navigationType;
232
- std::string mainDocumentURL;
233
- bool isTopFrame;
234
- };
235
- void onContentSizeChange(OnContentSizeChange value) const;
236
-
237
- void onRenderProcessGone(OnRenderProcessGone value) const;
238
-
239
- void onContentProcessDidTerminate(OnContentProcessDidTerminate value) const;
240
-
241
- void onCustomMenuSelection(OnCustomMenuSelection value) const;
242
-
243
- void onFileDownload(OnFileDownload value) const;
244
-
245
- void onLoadingError(OnLoadingError value) const;
246
-
247
- void onLoadingFinish(OnLoadingFinish value) const;
248
-
249
- void onLoadingProgress(OnLoadingProgress value) const;
250
-
251
- void onLoadingStart(OnLoadingStart value) const;
252
-
253
- void onHttpError(OnHttpError value) const;
254
-
255
- void onMessage(OnMessage value) const;
256
-
257
- void onOpenWindow(OnOpenWindow value) const;
258
-
259
- void onScroll(OnScroll value) const;
260
-
261
- void onShouldStartLoadWithRequest(OnShouldStartLoadWithRequest value) const;
262
- };
263
- } // 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: GenerateEventEmitterH.js
9
+ */
10
+ #pragma once
11
+
12
+ #include <react/renderer/components/view/ViewEventEmitter.h>
13
+
14
+
15
+ namespace facebook::react {
16
+ class RNCWebViewEventEmitter : public ViewEventEmitter {
17
+ public:
18
+ using ViewEventEmitter::ViewEventEmitter;
19
+
20
+ struct OnContentSizeChange {
21
+ std::string url;
22
+ bool loading;
23
+ std::string title;
24
+ bool canGoBack;
25
+ bool canGoForward;
26
+ double lockIdentifier;
27
+ };
28
+
29
+ struct OnRenderProcessGone {
30
+ bool didCrash;
31
+ };
32
+
33
+ struct OnContentProcessDidTerminate {
34
+ std::string url;
35
+ bool loading;
36
+ std::string title;
37
+ bool canGoBack;
38
+ bool canGoForward;
39
+ double lockIdentifier;
40
+ };
41
+
42
+ struct OnCustomMenuSelection {
43
+ std::string label;
44
+ std::string key;
45
+ std::string selectedText;
46
+ };
47
+
48
+ struct OnFileDownload {
49
+ std::string downloadUrl;
50
+ };
51
+
52
+ struct OnLoadingError {
53
+ std::string url;
54
+ bool loading;
55
+ std::string title;
56
+ bool canGoBack;
57
+ bool canGoForward;
58
+ double lockIdentifier;
59
+ std::string domain;
60
+ int code;
61
+ std::string description;
62
+ };
63
+
64
+ enum class OnLoadingFinishNavigationType {
65
+ Click,
66
+ Formsubmit,
67
+ Backforward,
68
+ Reload,
69
+ Formresubmit,
70
+ Other
71
+ };
72
+
73
+ static char const *toString(const OnLoadingFinishNavigationType value) {
74
+ switch (value) {
75
+ case OnLoadingFinishNavigationType::Click: return "click";
76
+ case OnLoadingFinishNavigationType::Formsubmit: return "formsubmit";
77
+ case OnLoadingFinishNavigationType::Backforward: return "backforward";
78
+ case OnLoadingFinishNavigationType::Reload: return "reload";
79
+ case OnLoadingFinishNavigationType::Formresubmit: return "formresubmit";
80
+ case OnLoadingFinishNavigationType::Other: return "other";
81
+ }
82
+ }
83
+
84
+ struct OnLoadingFinish {
85
+ std::string url;
86
+ bool loading;
87
+ std::string title;
88
+ bool canGoBack;
89
+ bool canGoForward;
90
+ double lockIdentifier;
91
+ OnLoadingFinishNavigationType navigationType;
92
+ std::string mainDocumentURL;
93
+ };
94
+
95
+ struct OnLoadingProgress {
96
+ std::string url;
97
+ bool loading;
98
+ std::string title;
99
+ bool canGoBack;
100
+ bool canGoForward;
101
+ double lockIdentifier;
102
+ double progress;
103
+ };
104
+
105
+ enum class OnLoadingStartNavigationType {
106
+ Click,
107
+ Formsubmit,
108
+ Backforward,
109
+ Reload,
110
+ Formresubmit,
111
+ Other
112
+ };
113
+
114
+ static char const *toString(const OnLoadingStartNavigationType value) {
115
+ switch (value) {
116
+ case OnLoadingStartNavigationType::Click: return "click";
117
+ case OnLoadingStartNavigationType::Formsubmit: return "formsubmit";
118
+ case OnLoadingStartNavigationType::Backforward: return "backforward";
119
+ case OnLoadingStartNavigationType::Reload: return "reload";
120
+ case OnLoadingStartNavigationType::Formresubmit: return "formresubmit";
121
+ case OnLoadingStartNavigationType::Other: return "other";
122
+ }
123
+ }
124
+
125
+ struct OnLoadingStart {
126
+ std::string url;
127
+ bool loading;
128
+ std::string title;
129
+ bool canGoBack;
130
+ bool canGoForward;
131
+ double lockIdentifier;
132
+ OnLoadingStartNavigationType navigationType;
133
+ std::string mainDocumentURL;
134
+ };
135
+
136
+ struct OnHttpError {
137
+ std::string url;
138
+ bool loading;
139
+ std::string title;
140
+ bool canGoBack;
141
+ bool canGoForward;
142
+ double lockIdentifier;
143
+ std::string description;
144
+ int statusCode;
145
+ };
146
+
147
+ struct OnMessage {
148
+ std::string url;
149
+ bool loading;
150
+ std::string title;
151
+ bool canGoBack;
152
+ bool canGoForward;
153
+ double lockIdentifier;
154
+ std::string data;
155
+ };
156
+
157
+ struct OnOpenWindow {
158
+ std::string targetUrl;
159
+ };
160
+
161
+ struct OnScrollContentInset {
162
+ double bottom;
163
+ double left;
164
+ double right;
165
+ double top;
166
+ };
167
+
168
+ struct OnScrollContentOffset {
169
+ double y;
170
+ double x;
171
+ };
172
+
173
+ struct OnScrollContentSize {
174
+ double height;
175
+ double width;
176
+ };
177
+
178
+ struct OnScrollLayoutMeasurement {
179
+ double height;
180
+ double width;
181
+ };
182
+
183
+ struct OnScrollTargetContentOffset {
184
+ double y;
185
+ double x;
186
+ };
187
+
188
+ struct OnScrollVelocity {
189
+ double y;
190
+ double x;
191
+ };
192
+
193
+ struct OnScroll {
194
+ OnScrollContentInset contentInset;
195
+ OnScrollContentOffset contentOffset;
196
+ OnScrollContentSize contentSize;
197
+ OnScrollLayoutMeasurement layoutMeasurement;
198
+ OnScrollTargetContentOffset targetContentOffset;
199
+ OnScrollVelocity velocity;
200
+ double zoomScale;
201
+ bool responderIgnoreScroll;
202
+ };
203
+
204
+ enum class OnShouldStartLoadWithRequestNavigationType {
205
+ Click,
206
+ Formsubmit,
207
+ Backforward,
208
+ Reload,
209
+ Formresubmit,
210
+ Other
211
+ };
212
+
213
+ static char const *toString(const OnShouldStartLoadWithRequestNavigationType value) {
214
+ switch (value) {
215
+ case OnShouldStartLoadWithRequestNavigationType::Click: return "click";
216
+ case OnShouldStartLoadWithRequestNavigationType::Formsubmit: return "formsubmit";
217
+ case OnShouldStartLoadWithRequestNavigationType::Backforward: return "backforward";
218
+ case OnShouldStartLoadWithRequestNavigationType::Reload: return "reload";
219
+ case OnShouldStartLoadWithRequestNavigationType::Formresubmit: return "formresubmit";
220
+ case OnShouldStartLoadWithRequestNavigationType::Other: return "other";
221
+ }
222
+ }
223
+
224
+ struct OnShouldStartLoadWithRequest {
225
+ std::string url;
226
+ bool loading;
227
+ std::string title;
228
+ bool canGoBack;
229
+ bool canGoForward;
230
+ double lockIdentifier;
231
+ OnShouldStartLoadWithRequestNavigationType navigationType;
232
+ std::string mainDocumentURL;
233
+ bool isTopFrame;
234
+ };
235
+ void onContentSizeChange(OnContentSizeChange value) const;
236
+
237
+ void onRenderProcessGone(OnRenderProcessGone value) const;
238
+
239
+ void onContentProcessDidTerminate(OnContentProcessDidTerminate value) const;
240
+
241
+ void onCustomMenuSelection(OnCustomMenuSelection value) const;
242
+
243
+ void onFileDownload(OnFileDownload value) const;
244
+
245
+ void onLoadingError(OnLoadingError value) const;
246
+
247
+ void onLoadingFinish(OnLoadingFinish value) const;
248
+
249
+ void onLoadingProgress(OnLoadingProgress value) const;
250
+
251
+ void onLoadingStart(OnLoadingStart value) const;
252
+
253
+ void onHttpError(OnHttpError value) const;
254
+
255
+ void onMessage(OnMessage value) const;
256
+
257
+ void onOpenWindow(OnOpenWindow value) const;
258
+
259
+ void onScroll(OnScroll value) const;
260
+
261
+ void onShouldStartLoadWithRequest(OnShouldStartLoadWithRequest value) const;
262
+ };
263
+ } // namespace facebook::react