@polyvharmony/live-scenes-foundation 1.3.0 → 1.3.2-rc.1
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 +29 -0
- package/ResourceTable.txt +17 -17
- package/oh-package.json5 +1 -1
- package/package.json +1 -1
- package/src/main/ets/common/PLVBasicDataSource.d.ets +19 -19
- package/src/main/ets/common/PLVBasicDataSource.js +75 -75
- package/src/main/ets/common/PLVCallback.d.ets +20 -19
- package/src/main/ets/common/PLVCallback.js +78 -78
- package/src/main/ets/common/PLVCommonEnums.js +16 -16
- package/src/main/ets/common/PLVDeviceUtils.d.ets +4 -4
- package/src/main/ets/common/PLVDeviceUtils.js +9 -9
- package/src/main/ets/common/PLVHashMap.d.ets +2 -2
- package/src/main/ets/common/PLVHashMap.js +2 -2
- package/src/main/ets/common/PLVJSONUtils.d.ets +13 -13
- package/src/main/ets/common/PLVJSONUtils.js +46 -46
- package/src/main/ets/common/PLVNetUtils.d.ets +4 -4
- package/src/main/ets/common/PLVNetUtils.js +24 -24
- package/src/main/ets/common/PLVPreferencesUtils.d.ets +9 -9
- package/src/main/ets/common/PLVPreferencesUtils.js +16 -16
- package/src/main/ets/common/PLVScheduledTask.d.ets +1 -1
- package/src/main/ets/common/PLVScheduledTask.js +9 -9
- package/src/main/ets/common/PLVSimpleBuffer.d.ets +3 -3
- package/src/main/ets/common/PLVSimpleBuffer.js +8 -8
- package/src/main/ets/common/PLVSparseArray.d.ets +6 -6
- package/src/main/ets/common/PLVSparseArray.js +21 -21
- package/src/main/ets/common/PLVTextUtils.d.ets +8 -8
- package/src/main/ets/common/PLVTextUtils.js +44 -44
- package/src/main/ets/common/PLVTimeUtils.d.ets +1 -1
- package/src/main/ets/common/PLVTimeUtils.js +8 -8
- package/src/main/ets/common/PLVToastUtils.d.ets +4 -4
- package/src/main/ets/common/PLVToastUtils.js +7 -7
- package/src/main/ets/common/PLVUACreator.d.ets +1 -1
- package/src/main/ets/common/PLVUACreator.js +6 -6
- package/src/main/ets/common/PLVUtils.d.ets +25 -24
- package/src/main/ets/common/PLVUtils.js +141 -141
- package/src/main/ets/common/PLVWebUtils.d.ets +4 -4
- package/src/main/ets/common/PLVWebUtils.js +46 -47
- package/src/main/ets/common/ui/PLVNodeController.d.ets +11 -9
- package/src/main/ets/common/ui/PLVNodeController.js +48 -47
- package/src/main/ets/modules/log/PLVLogger.d.ets +11 -11
- package/src/main/ets/modules/log/PLVLogger.js +36 -36
- package/src/main/ets/modules/log/PLVXLogFilePrinter.d.ets +2 -2
- package/src/main/ets/modules/log/PLVXLogFilePrinter.js +14 -12
- package/src/main/ets/modules/net/PLVHttpData.d.ets +1 -1
- package/src/main/ets/modules/net/PLVHttpData.js +3 -3
- package/src/main/ets/modules/net/PLVHttpError.d.ets +2 -2
- package/src/main/ets/modules/net/PLVHttpError.js +5 -5
- package/src/main/ets/modules/net/PLVHttpRequest.d.ets +10 -9
- package/src/main/ets/modules/net/PLVHttpRequest.js +89 -88
- package/src/main/ets/modules/net/PLVRequestSetting.d.ets +3 -3
- package/src/main/ets/modules/net/PLVRequestSetting.js +14 -14
- package/src/main/ets/modules/socket/PLVSocketIO.d.ets +20 -20
- package/src/main/ets/modules/socket/PLVSocketIO.js +61 -61
- package/src/main/ets/modules/web/PLVFailureLayout.js +17 -18
- package/src/main/ets/modules/web/PLVLoadingLayout.js +12 -13
- package/src/main/ets/modules/web/PLVNewWindowLayout.js +17 -18
- package/src/main/ets/modules/web/PLVSimpleWeb.js +75 -79
- package/src/main/ets/modules/web/PLVWebController.d.ets +39 -39
- package/src/main/ets/modules/web/PLVWebController.js +106 -106
- package/src/main/module.json +1 -1
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
|
2
|
-
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => {
|
|
3
|
-
});
|
|
2
|
+
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
|
4
3
|
}
|
|
5
4
|
import PLVCommonConstants from '../../common/PLVCommonConstants';
|
|
6
5
|
export class PLVLoadingLayout extends ViewPU {
|
|
7
|
-
constructor(
|
|
8
|
-
super(
|
|
9
|
-
if (typeof
|
|
10
|
-
this.paramsGenerator_ =
|
|
6
|
+
constructor(x18, y18, z18, a19 = -1, b19 = undefined, c19) {
|
|
7
|
+
super(x18, z18, a19, c19);
|
|
8
|
+
if (typeof b19 === "function") {
|
|
9
|
+
this.paramsGenerator_ = b19;
|
|
11
10
|
}
|
|
12
|
-
this.setInitiallyProvidedValue(
|
|
11
|
+
this.setInitiallyProvidedValue(y18);
|
|
13
12
|
this.finalizeConstruction();
|
|
14
13
|
}
|
|
15
|
-
setInitiallyProvidedValue(
|
|
14
|
+
setInitiallyProvidedValue(w18) {
|
|
16
15
|
}
|
|
17
|
-
updateStateVars(
|
|
16
|
+
updateStateVars(v18) {
|
|
18
17
|
}
|
|
19
|
-
purgeVariableDependenciesOnElmtId(
|
|
18
|
+
purgeVariableDependenciesOnElmtId(u18) {
|
|
20
19
|
}
|
|
21
20
|
aboutToBeDeleted() {
|
|
22
21
|
SubscriberManager.Get().delete(this.id__());
|
|
23
22
|
this.aboutToBeDeletedInternal();
|
|
24
23
|
}
|
|
25
24
|
initialRender() {
|
|
26
|
-
this.observeComponentCreation2((
|
|
25
|
+
this.observeComponentCreation2((s18, t18) => {
|
|
27
26
|
Column.create();
|
|
28
27
|
Column.height(PLVCommonConstants.FULL_PERCENT);
|
|
29
28
|
Column.width(PLVCommonConstants.FULL_PERCENT);
|
|
30
29
|
}, Column);
|
|
31
|
-
this.observeComponentCreation2((
|
|
30
|
+
this.observeComponentCreation2((q18, r18) => {
|
|
32
31
|
Column.create();
|
|
33
32
|
Column.margin({ top: { "id": -1, "type": 10002, params: ["app.float.plv_web_loading_img_margin"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" } });
|
|
34
33
|
Column.width({ "id": -1, "type": 10002, params: ["app.float.plv_web_loading_img_size"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
|
|
35
34
|
Column.height({ "id": -1, "type": 10002, params: ["app.float.plv_web_loading_img_size"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
|
|
36
35
|
}, Column);
|
|
37
|
-
this.observeComponentCreation2((
|
|
36
|
+
this.observeComponentCreation2((o18, p18) => {
|
|
38
37
|
LoadingProgress.create();
|
|
39
38
|
}, LoadingProgress);
|
|
40
39
|
Column.pop();
|
|
@@ -1,47 +1,46 @@
|
|
|
1
1
|
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
|
2
|
-
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => {
|
|
3
|
-
});
|
|
2
|
+
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
|
4
3
|
}
|
|
5
4
|
import webview from '@ohos.web.webview';
|
|
6
5
|
import PLVLogger from '../log/PLVLogger';
|
|
7
6
|
const TAG = "[PLVNewWindowLayout]";
|
|
8
7
|
export class PLVNewWindowLayout extends ViewPU {
|
|
9
|
-
constructor(
|
|
10
|
-
super(
|
|
11
|
-
if (typeof
|
|
12
|
-
this.paramsGenerator_ =
|
|
8
|
+
constructor(l19, m19, n19, o19 = -1, p19 = undefined, q19) {
|
|
9
|
+
super(l19, n19, o19, q19);
|
|
10
|
+
if (typeof p19 === "function") {
|
|
11
|
+
this.paramsGenerator_ = p19;
|
|
13
12
|
}
|
|
14
13
|
this.controller = undefined;
|
|
15
14
|
this.webviewController = new webview.WebviewController();
|
|
16
|
-
this.setInitiallyProvidedValue(
|
|
15
|
+
this.setInitiallyProvidedValue(m19);
|
|
17
16
|
this.finalizeConstruction();
|
|
18
17
|
}
|
|
19
|
-
setInitiallyProvidedValue(
|
|
20
|
-
if (
|
|
21
|
-
this.controller =
|
|
18
|
+
setInitiallyProvidedValue(k19) {
|
|
19
|
+
if (k19.controller !== undefined) {
|
|
20
|
+
this.controller = k19.controller;
|
|
22
21
|
}
|
|
23
|
-
if (
|
|
24
|
-
this.webviewController =
|
|
22
|
+
if (k19.webviewController !== undefined) {
|
|
23
|
+
this.webviewController = k19.webviewController;
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
|
-
updateStateVars(
|
|
26
|
+
updateStateVars(j19) {
|
|
28
27
|
}
|
|
29
|
-
purgeVariableDependenciesOnElmtId(
|
|
28
|
+
purgeVariableDependenciesOnElmtId(i19) {
|
|
30
29
|
}
|
|
31
30
|
aboutToBeDeleted() {
|
|
32
31
|
SubscriberManager.Get().delete(this.id__());
|
|
33
32
|
this.aboutToBeDeletedInternal();
|
|
34
33
|
}
|
|
35
|
-
setController(
|
|
36
|
-
this.controller =
|
|
34
|
+
setController(h19) {
|
|
35
|
+
this.controller = h19;
|
|
37
36
|
}
|
|
38
37
|
aboutToAppear() {
|
|
39
38
|
}
|
|
40
39
|
initialRender() {
|
|
41
|
-
this.observeComponentCreation2((
|
|
40
|
+
this.observeComponentCreation2((f19, g19) => {
|
|
42
41
|
Column.create();
|
|
43
42
|
}, Column);
|
|
44
|
-
this.observeComponentCreation2((
|
|
43
|
+
this.observeComponentCreation2((d19, e19) => {
|
|
45
44
|
Web.create({ src: "", controller: this.webviewController });
|
|
46
45
|
Web.javaScriptAccess(true);
|
|
47
46
|
Web.zoomAccess(true);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
|
2
|
-
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => {
|
|
3
|
-
});
|
|
2
|
+
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
|
4
3
|
}
|
|
5
4
|
import PLVCommonConstants from '../../common/PLVCommonConstants';
|
|
6
5
|
import { PLVFullScreenStatus, PLVWebpageStatus } from '../../common/PLVCommonEnums';
|
|
@@ -11,62 +10,62 @@ import { PLVNewWindowLayout } from './PLVNewWindowLayout';
|
|
|
11
10
|
import { PLVWebController } from './PLVWebController';
|
|
12
11
|
export const TAG = "[PLVSimpleWeb]";
|
|
13
12
|
export class PLVSimpleWeb extends ViewPU {
|
|
14
|
-
constructor(
|
|
15
|
-
super(
|
|
16
|
-
if (typeof
|
|
17
|
-
this.paramsGenerator_ =
|
|
13
|
+
constructor(b21, c21, d21, e21 = -1, f21 = undefined, g21) {
|
|
14
|
+
super(b21, d21, e21, g21);
|
|
15
|
+
if (typeof f21 === "function") {
|
|
16
|
+
this.paramsGenerator_ = f21;
|
|
18
17
|
}
|
|
19
|
-
this.
|
|
18
|
+
this.__webStatus = new ObservedPropertySimplePU(PLVWebpageStatus.INIT, this, "webStatus");
|
|
20
19
|
this.controller = new PLVWebController();
|
|
21
20
|
this.src = undefined;
|
|
22
21
|
this.incognitoMode = undefined;
|
|
23
22
|
this.showLoading = undefined;
|
|
24
|
-
this.setInitiallyProvidedValue(
|
|
23
|
+
this.setInitiallyProvidedValue(c21);
|
|
25
24
|
this.finalizeConstruction();
|
|
26
25
|
}
|
|
27
|
-
setInitiallyProvidedValue(
|
|
28
|
-
if (
|
|
29
|
-
this.webStatus =
|
|
26
|
+
setInitiallyProvidedValue(a21) {
|
|
27
|
+
if (a21.webStatus !== undefined) {
|
|
28
|
+
this.webStatus = a21.webStatus;
|
|
30
29
|
}
|
|
31
|
-
if (
|
|
32
|
-
this.controller =
|
|
30
|
+
if (a21.controller !== undefined) {
|
|
31
|
+
this.controller = a21.controller;
|
|
33
32
|
}
|
|
34
|
-
if (
|
|
35
|
-
this.src =
|
|
33
|
+
if (a21.src !== undefined) {
|
|
34
|
+
this.src = a21.src;
|
|
36
35
|
}
|
|
37
|
-
if (
|
|
38
|
-
this.incognitoMode =
|
|
36
|
+
if (a21.incognitoMode !== undefined) {
|
|
37
|
+
this.incognitoMode = a21.incognitoMode;
|
|
39
38
|
}
|
|
40
|
-
if (
|
|
41
|
-
this.showLoading =
|
|
39
|
+
if (a21.showLoading !== undefined) {
|
|
40
|
+
this.showLoading = a21.showLoading;
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
|
-
updateStateVars(
|
|
43
|
+
updateStateVars(z20) {
|
|
45
44
|
}
|
|
46
|
-
purgeVariableDependenciesOnElmtId(
|
|
47
|
-
this.
|
|
45
|
+
purgeVariableDependenciesOnElmtId(y20) {
|
|
46
|
+
this.__webStatus.purgeDependencyOnElmtId(y20);
|
|
48
47
|
}
|
|
49
48
|
aboutToBeDeleted() {
|
|
50
|
-
this.
|
|
49
|
+
this.__webStatus.aboutToBeDeleted();
|
|
51
50
|
SubscriberManager.Get().delete(this.id__());
|
|
52
51
|
this.aboutToBeDeletedInternal();
|
|
53
52
|
}
|
|
54
53
|
get webStatus() {
|
|
55
|
-
return this.
|
|
54
|
+
return this.__webStatus.get();
|
|
56
55
|
}
|
|
57
|
-
set webStatus(
|
|
58
|
-
this.
|
|
56
|
+
set webStatus(x20) {
|
|
57
|
+
this.__webStatus.set(x20);
|
|
59
58
|
}
|
|
60
59
|
aboutToAppear() {
|
|
61
60
|
PLVLogger.info(TAG, `load url: ${this.src}`);
|
|
62
61
|
}
|
|
63
62
|
initialRender() {
|
|
64
|
-
this.observeComponentCreation2((
|
|
63
|
+
this.observeComponentCreation2((v20, w20) => {
|
|
65
64
|
Stack.create();
|
|
66
65
|
Stack.width(PLVCommonConstants.FULL_PERCENT);
|
|
67
66
|
Stack.height(PLVCommonConstants.FULL_PERCENT);
|
|
68
67
|
}, Stack);
|
|
69
|
-
this.observeComponentCreation2((
|
|
68
|
+
this.observeComponentCreation2((h20, i20) => {
|
|
70
69
|
Web.create({
|
|
71
70
|
controller: this.controller,
|
|
72
71
|
src: this.src,
|
|
@@ -91,45 +90,44 @@ export class PLVSimpleWeb extends ViewPU {
|
|
|
91
90
|
this.controller.handleControllerAttached();
|
|
92
91
|
this.controller._onControllerAttached?.();
|
|
93
92
|
});
|
|
94
|
-
Web.onInterceptRequest((
|
|
93
|
+
Web.onInterceptRequest((u20) => {
|
|
95
94
|
if (this.controller._onInterceptRequest) {
|
|
96
|
-
return this.controller._onInterceptRequest?.(
|
|
95
|
+
return this.controller._onInterceptRequest?.(u20.request);
|
|
97
96
|
}
|
|
98
97
|
return null;
|
|
99
98
|
});
|
|
100
|
-
Web.onLoadIntercept((
|
|
101
|
-
let
|
|
99
|
+
Web.onLoadIntercept((s20) => {
|
|
100
|
+
let t20 = false;
|
|
102
101
|
if (this.controller._onLoadIntercept) {
|
|
103
|
-
|
|
102
|
+
t20 = this.controller._onLoadIntercept?.(s20.data);
|
|
104
103
|
}
|
|
105
|
-
|
|
106
|
-
return
|
|
104
|
+
t20 = t20 || this.controller.handleIsLoadIntercept(s20.data);
|
|
105
|
+
return t20;
|
|
107
106
|
});
|
|
108
|
-
Web.onWindowNew((
|
|
109
|
-
if (this.controller._onWindowNew?.(
|
|
107
|
+
Web.onWindowNew((o20) => {
|
|
108
|
+
if (this.controller._onWindowNew?.(o20)) {
|
|
110
109
|
return;
|
|
111
110
|
}
|
|
112
|
-
this.controller.handleWindowNew(
|
|
111
|
+
this.controller.handleWindowNew(o20, (p20) => {
|
|
113
112
|
return new CustomDialogController({
|
|
114
113
|
builder: () => {
|
|
115
|
-
let
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
let paramsLambda = () => {
|
|
114
|
+
let q20 = new PLVNewWindowLayout(this, { webviewController: p20 }, undefined, -1, () => { }, { page: "foundation/src/main/ets/modules/web/PLVSimpleWeb.ets", line: 72, col: 24 });
|
|
115
|
+
q20.setController();
|
|
116
|
+
ViewPU.create(q20);
|
|
117
|
+
let r20 = () => {
|
|
120
118
|
return {
|
|
121
|
-
webviewController:
|
|
119
|
+
webviewController: p20
|
|
122
120
|
};
|
|
123
121
|
};
|
|
124
|
-
|
|
122
|
+
q20.paramsGenerator_ = r20;
|
|
125
123
|
},
|
|
126
124
|
cornerRadius: 0
|
|
127
125
|
}, this);
|
|
128
126
|
});
|
|
129
127
|
});
|
|
130
|
-
Web.onShowFileSelector((
|
|
128
|
+
Web.onShowFileSelector((n20) => {
|
|
131
129
|
if (this.controller._onShowFileSelector) {
|
|
132
|
-
return this.controller._onShowFileSelector?.(
|
|
130
|
+
return this.controller._onShowFileSelector?.(n20);
|
|
133
131
|
}
|
|
134
132
|
return true;
|
|
135
133
|
});
|
|
@@ -149,50 +147,49 @@ export class PLVSimpleWeb extends ViewPU {
|
|
|
149
147
|
}
|
|
150
148
|
this.controller.handleFullScreenEnter();
|
|
151
149
|
});
|
|
152
|
-
Web.onProgressChange((
|
|
153
|
-
PLVLogger.info(TAG, 'onProgressChange:' +
|
|
154
|
-
this.controller._onProgressChange?.(
|
|
150
|
+
Web.onProgressChange((m20) => {
|
|
151
|
+
PLVLogger.info(TAG, 'onProgressChange:' + m20?.newProgress);
|
|
152
|
+
this.controller._onProgressChange?.(m20);
|
|
155
153
|
});
|
|
156
|
-
Web.onPageBegin((
|
|
154
|
+
Web.onPageBegin((l20) => {
|
|
157
155
|
PLVLogger.info(TAG, 'onPageBegin');
|
|
158
|
-
this.controller._onPageBegin?.(
|
|
156
|
+
this.controller._onPageBegin?.(l20);
|
|
159
157
|
});
|
|
160
|
-
Web.onErrorReceive((
|
|
161
|
-
PLVLogger.info(TAG, "onErrorReceive:" + `{info:${
|
|
158
|
+
Web.onErrorReceive((k20) => {
|
|
159
|
+
PLVLogger.info(TAG, "onErrorReceive:" + `{info:${k20?.error.getErrorInfo()},code:${k20?.error.getErrorCode()}}`);
|
|
162
160
|
this.controller.handleErrorReceive();
|
|
163
161
|
this.webStatus = PLVWebpageStatus.FINISHED;
|
|
164
|
-
this.controller._onErrorReceive?.(
|
|
162
|
+
this.controller._onErrorReceive?.(k20);
|
|
165
163
|
});
|
|
166
|
-
Web.onPageEnd((
|
|
164
|
+
Web.onPageEnd((j20) => {
|
|
167
165
|
PLVLogger.info(TAG, 'onPageEnd');
|
|
168
|
-
this.controller.handlePageEnd(
|
|
166
|
+
this.controller.handlePageEnd(j20);
|
|
169
167
|
if (this.webStatus != PLVWebpageStatus.ERROR) {
|
|
170
168
|
this.webStatus = PLVWebpageStatus.FINISHED;
|
|
171
|
-
this.controller._onPageEnd?.(
|
|
169
|
+
this.controller._onPageEnd?.(j20);
|
|
172
170
|
}
|
|
173
171
|
});
|
|
174
172
|
}, Web);
|
|
175
|
-
this.observeComponentCreation2((
|
|
173
|
+
this.observeComponentCreation2((z19, a20) => {
|
|
176
174
|
If.create();
|
|
177
175
|
if (this.webStatus === PLVWebpageStatus.INIT && this.showLoading) {
|
|
178
176
|
this.ifElseBranchUpdateFunction(0, () => {
|
|
179
|
-
this.observeComponentCreation2((
|
|
177
|
+
this.observeComponentCreation2((f20, g20) => {
|
|
180
178
|
Column.create();
|
|
181
179
|
Column.backgroundColor(Color.White);
|
|
182
180
|
}, Column);
|
|
183
181
|
{
|
|
184
|
-
this.observeComponentCreation2((
|
|
185
|
-
if (
|
|
186
|
-
let
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
let paramsLambda = () => {
|
|
182
|
+
this.observeComponentCreation2((b20, c20) => {
|
|
183
|
+
if (c20) {
|
|
184
|
+
let d20 = new PLVLoadingLayout(this, {}, undefined, b20, () => { }, { page: "foundation/src/main/ets/modules/web/PLVSimpleWeb.ets", line: 124, col: 11 });
|
|
185
|
+
ViewPU.create(d20);
|
|
186
|
+
let e20 = () => {
|
|
190
187
|
return {};
|
|
191
188
|
};
|
|
192
|
-
|
|
189
|
+
d20.paramsGenerator_ = e20;
|
|
193
190
|
}
|
|
194
191
|
else {
|
|
195
|
-
this.updateStateVarsOfChildByElmtId(
|
|
192
|
+
this.updateStateVarsOfChildByElmtId(b20, {});
|
|
196
193
|
}
|
|
197
194
|
}, { name: "PLVLoadingLayout" });
|
|
198
195
|
}
|
|
@@ -205,11 +202,11 @@ export class PLVSimpleWeb extends ViewPU {
|
|
|
205
202
|
}
|
|
206
203
|
}, If);
|
|
207
204
|
If.pop();
|
|
208
|
-
this.observeComponentCreation2((
|
|
205
|
+
this.observeComponentCreation2((r19, s19) => {
|
|
209
206
|
If.create();
|
|
210
207
|
if (this.webStatus === PLVWebpageStatus.ERROR && this.showLoading) {
|
|
211
208
|
this.ifElseBranchUpdateFunction(0, () => {
|
|
212
|
-
this.observeComponentCreation2((
|
|
209
|
+
this.observeComponentCreation2((x19, y19) => {
|
|
213
210
|
Column.create();
|
|
214
211
|
Column.justifyContent(FlexAlign.Center);
|
|
215
212
|
Column.alignItems(HorizontalAlign.Center);
|
|
@@ -218,17 +215,16 @@ export class PLVSimpleWeb extends ViewPU {
|
|
|
218
215
|
Column.height(PLVCommonConstants.FULL_PERCENT);
|
|
219
216
|
}, Column);
|
|
220
217
|
{
|
|
221
|
-
this.observeComponentCreation2((
|
|
222
|
-
if (
|
|
223
|
-
let
|
|
218
|
+
this.observeComponentCreation2((t19, u19) => {
|
|
219
|
+
if (u19) {
|
|
220
|
+
let v19 = new PLVFailureLayout(this, {
|
|
224
221
|
handleReload: () => {
|
|
225
222
|
this.webStatus = PLVWebpageStatus.INIT;
|
|
226
223
|
this.controller?.refresh();
|
|
227
224
|
}
|
|
228
|
-
}, undefined,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
let paramsLambda = () => {
|
|
225
|
+
}, undefined, t19, () => { }, { page: "foundation/src/main/ets/modules/web/PLVSimpleWeb.ets", line: 131, col: 11 });
|
|
226
|
+
ViewPU.create(v19);
|
|
227
|
+
let w19 = () => {
|
|
232
228
|
return {
|
|
233
229
|
handleReload: () => {
|
|
234
230
|
this.webStatus = PLVWebpageStatus.INIT;
|
|
@@ -236,10 +232,10 @@ export class PLVSimpleWeb extends ViewPU {
|
|
|
236
232
|
}
|
|
237
233
|
};
|
|
238
234
|
};
|
|
239
|
-
|
|
235
|
+
v19.paramsGenerator_ = w19;
|
|
240
236
|
}
|
|
241
237
|
else {
|
|
242
|
-
this.updateStateVarsOfChildByElmtId(
|
|
238
|
+
this.updateStateVarsOfChildByElmtId(t19, {});
|
|
243
239
|
}
|
|
244
240
|
}, { name: "PLVFailureLayout" });
|
|
245
241
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import webview from "@ohos.web.webview";
|
|
2
2
|
import { PLVCallback, PLVCallback2 } from '../../common/PLVCallback';
|
|
3
3
|
import { PLVFullScreenStatus, PLVWebpageStatus } from '../../common/PLVCommonEnums';
|
|
4
|
-
import
|
|
4
|
+
import common from "@ohos.app.ability.common";
|
|
5
5
|
export declare class PLVWebController extends webview.WebviewController {
|
|
6
6
|
static importSDKModuleContext: common.UIAbilityContext;
|
|
7
7
|
_webStatus: PLVWebpageStatus;
|
|
@@ -41,48 +41,48 @@ export declare class PLVWebController extends webview.WebviewController {
|
|
|
41
41
|
_overScrollMode: OverScrollMode;
|
|
42
42
|
private dialogController;
|
|
43
43
|
private jsBridge;
|
|
44
|
-
constructor(
|
|
44
|
+
constructor(m23?: string);
|
|
45
45
|
accessBackward(): boolean;
|
|
46
46
|
backward(): void;
|
|
47
|
-
darkMode(
|
|
48
|
-
forceDarkAccess(
|
|
49
|
-
domStorageAccess(
|
|
50
|
-
zoomAccess(
|
|
51
|
-
fileAccess(
|
|
52
|
-
multiWindowAccess(
|
|
53
|
-
allowWindowOpenMethod(
|
|
54
|
-
javaScriptAccess(
|
|
55
|
-
mixMode(
|
|
56
|
-
cacheMode(
|
|
57
|
-
onControllerAttached(
|
|
58
|
-
addOnControllerAttached(
|
|
59
|
-
onInterceptRequest(
|
|
60
|
-
onLoadIntercept(
|
|
61
|
-
onWindowNew(
|
|
62
|
-
onShowFileSelector(
|
|
63
|
-
onFullScreenEnter(
|
|
64
|
-
onFullScreenExit(
|
|
65
|
-
onProgressChange(
|
|
66
|
-
onPageBegin(
|
|
67
|
-
onPageEnd(
|
|
68
|
-
addOnPageEnd(
|
|
69
|
-
onErrorReceive(
|
|
70
|
-
backgroundColor(
|
|
71
|
-
verticalScrollBarAccess(
|
|
72
|
-
nestedScrollOptions(
|
|
73
|
-
overScrollMode(
|
|
74
|
-
userAgent(
|
|
75
|
-
addOnReloaded(
|
|
76
|
-
registerHandler(
|
|
77
|
-
callHandle(
|
|
78
|
-
loadHtmlData(
|
|
79
|
-
loadUrlCatch(
|
|
47
|
+
darkMode(k23: WebDarkMode): PLVWebController;
|
|
48
|
+
forceDarkAccess(j23: boolean): PLVWebController;
|
|
49
|
+
domStorageAccess(i23: boolean): PLVWebController;
|
|
50
|
+
zoomAccess(h23: boolean): PLVWebController;
|
|
51
|
+
fileAccess(g23: boolean): PLVWebController;
|
|
52
|
+
multiWindowAccess(f23: boolean): PLVWebController;
|
|
53
|
+
allowWindowOpenMethod(e23: boolean): PLVWebController;
|
|
54
|
+
javaScriptAccess(d23: boolean): PLVWebController;
|
|
55
|
+
mixMode(c23: MixedMode): PLVWebController;
|
|
56
|
+
cacheMode(b23: CacheMode): PLVWebController;
|
|
57
|
+
onControllerAttached(a23: PLVCallback<void, void>): PLVWebController;
|
|
58
|
+
addOnControllerAttached(z22: PLVCallback<void, void>): PLVWebController;
|
|
59
|
+
onInterceptRequest(y22: PLVCallback<WebResourceRequest, WebResourceResponse>): PLVWebController;
|
|
60
|
+
onLoadIntercept(x22: PLVCallback<WebResourceRequest, boolean>): PLVWebController;
|
|
61
|
+
onWindowNew(w22: PLVCallback<OnWindowNewEvent, boolean>): PLVWebController;
|
|
62
|
+
onShowFileSelector(v22: PLVCallback<OnShowFileSelectorEvent, boolean>): PLVWebController;
|
|
63
|
+
onFullScreenEnter(u22: PLVCallback<void, boolean>): PLVWebController;
|
|
64
|
+
onFullScreenExit(t22: PLVCallback<void, boolean>): PLVWebController;
|
|
65
|
+
onProgressChange(s22: PLVCallback<OnProgressChangeEvent, void>): PLVWebController;
|
|
66
|
+
onPageBegin(r22: PLVCallback<OnPageBeginEvent, void>): PLVWebController;
|
|
67
|
+
onPageEnd(q22: PLVCallback<OnPageEndEvent, void>): PLVWebController;
|
|
68
|
+
addOnPageEnd(p22: PLVCallback<OnPageEndEvent, void>): PLVWebController;
|
|
69
|
+
onErrorReceive(o22: PLVCallback<OnErrorReceiveEvent, void>): PLVWebController;
|
|
70
|
+
backgroundColor(n22: ResourceColor): this;
|
|
71
|
+
verticalScrollBarAccess(m22: boolean): this;
|
|
72
|
+
nestedScrollOptions(l22: NestedScrollOptions): this;
|
|
73
|
+
overScrollMode(k22: OverScrollMode): void;
|
|
74
|
+
userAgent(j22?: string): this;
|
|
75
|
+
addOnReloaded(i22: PLVCallback): this;
|
|
76
|
+
registerHandler(g22: string, h22: PLVCallback2<string, PLVCallback<string>>): this;
|
|
77
|
+
callHandle(d22: string, e22: string, f22: PLVCallback<string>): this;
|
|
78
|
+
loadHtmlData(a22?: string): this;
|
|
79
|
+
loadUrlCatch(w21: string | Resource): void;
|
|
80
80
|
handleControllerAttached(): void;
|
|
81
81
|
handleFullScreenExit(): void;
|
|
82
82
|
handleFullScreenEnter(): void;
|
|
83
|
-
handleWindowNew(
|
|
84
|
-
handleIsLoadIntercept(
|
|
85
|
-
handlePageEnd(
|
|
83
|
+
handleWindowNew(s21: OnWindowNewEvent, t21: (webviewController: WebviewController) => CustomDialogController): void;
|
|
84
|
+
handleIsLoadIntercept(q21: WebResourceRequest | undefined): boolean;
|
|
85
|
+
handlePageEnd(n21: OnPageEndEvent): void;
|
|
86
86
|
handleErrorReceive(): void;
|
|
87
87
|
private getVideoWHEnterFullScreen;
|
|
88
88
|
}
|