@polyvharmony/live-scenes-foundation 1.3.2-rc.1 → 1.3.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.
- package/CHANGELOG.md +29 -1
- package/Index.d.ets +2 -0
- package/ets/modules.abc +0 -0
- package/libs/plvsocket.har +0 -0
- package/oh-package.json5 +1 -1
- package/package.json +1 -1
- package/src/main/ets/common/IPLVBackwardInterface.d.ets +2 -0
- package/src/main/ets/common/PLVBasicDataSource.d.ets +2 -0
- package/src/main/ets/common/PLVCallback.d.ets +10 -8
- package/src/main/ets/common/PLVCommonConstants.d.ets +2 -0
- package/src/main/ets/common/PLVCommonEnums.d.ets +2 -0
- package/src/main/ets/common/PLVDeviceUtils.d.ets +4 -2
- package/src/main/ets/common/PLVHashMap.d.ets +3 -1
- package/src/main/ets/common/PLVJSONUtils.d.ets +14 -12
- package/src/main/ets/common/PLVNetUtils.d.ets +6 -4
- package/src/main/ets/common/PLVPreferencesUtils.d.ets +10 -8
- package/src/main/ets/common/PLVScheduledTask.d.ets +3 -1
- package/src/main/ets/common/PLVSimpleBuffer.d.ets +5 -3
- package/src/main/ets/common/PLVSparseArray.d.ets +8 -6
- package/src/main/ets/common/PLVTextUtils.d.ets +10 -8
- package/src/main/ets/common/PLVTimeUtils.d.ets +3 -1
- package/src/main/ets/common/PLVToastUtils.d.ets +4 -2
- package/src/main/ets/common/PLVType.d.ets +2 -0
- package/src/main/ets/common/PLVUACreator.d.ets +3 -1
- package/src/main/ets/common/PLVUtils.d.ets +24 -22
- package/src/main/ets/common/PLVWebUtils.d.ets +6 -4
- package/src/main/ets/common/ui/PLVNodeController.d.ets +10 -8
- package/src/main/ets/modules/log/PLVLogger.d.ets +10 -8
- package/src/main/ets/modules/log/PLVXLogFilePrinter.d.ets +4 -2
- package/src/main/ets/modules/log/PLVXLogWorker.d.ets +2 -0
- package/src/main/ets/modules/net/PLVApiConstants.d.ets +2 -0
- package/src/main/ets/modules/net/PLVHttpData.d.ets +3 -1
- package/src/main/ets/modules/net/PLVHttpError.d.ets +4 -2
- package/src/main/ets/modules/net/PLVHttpRequest.d.ets +10 -8
- package/src/main/ets/modules/net/PLVRequestSetting.d.ets +5 -3
- package/src/main/ets/modules/socket/PLVSocketIO.d.ets +22 -20
- package/src/main/ets/modules/web/PLVFailureLayout.d.ets +2 -0
- package/src/main/ets/modules/web/PLVLoadingLayout.d.ets +2 -0
- package/src/main/ets/modules/web/PLVNewWindowLayout.d.ets +2 -0
- package/src/main/ets/modules/web/PLVSimpleWeb.d.ets +2 -0
- package/src/main/ets/modules/web/PLVWebController.d.ets +39 -37
- package/src/main/ets/modules/web/PLVWebModel.d.ets +2 -0
- package/src/main/module.json +1 -1
- package/Index.js +0 -30
- package/src/main/ets/common/IPLVBackwardInterface.js +0 -1
- package/src/main/ets/common/PLVBasicDataSource.js +0 -172
- package/src/main/ets/common/PLVCallback.js +0 -186
- package/src/main/ets/common/PLVCommonConstants.js +0 -11
- package/src/main/ets/common/PLVCommonEnums.js +0 -22
- package/src/main/ets/common/PLVDeviceUtils.js +0 -36
- package/src/main/ets/common/PLVHashMap.js +0 -7
- package/src/main/ets/common/PLVJSONUtils.js +0 -103
- package/src/main/ets/common/PLVNetUtils.js +0 -35
- package/src/main/ets/common/PLVPreferencesUtils.js +0 -30
- package/src/main/ets/common/PLVScheduledTask.js +0 -44
- package/src/main/ets/common/PLVSimpleBuffer.js +0 -30
- package/src/main/ets/common/PLVSparseArray.js +0 -44
- package/src/main/ets/common/PLVTextUtils.js +0 -79
- package/src/main/ets/common/PLVTimeUtils.js +0 -14
- package/src/main/ets/common/PLVToastUtils.js +0 -17
- package/src/main/ets/common/PLVType.js +0 -1
- package/src/main/ets/common/PLVUACreator.js +0 -11
- package/src/main/ets/common/PLVUtils.js +0 -241
- package/src/main/ets/common/PLVWebUtils.js +0 -78
- package/src/main/ets/common/ui/PLVNodeController.js +0 -104
- package/src/main/ets/modules/log/PLVLogger.js +0 -67
- package/src/main/ets/modules/log/PLVXLogFilePrinter.js +0 -39
- package/src/main/ets/modules/log/PLVXLogWorker.js +0 -4
- package/src/main/ets/modules/net/PLVApiConstants.js +0 -7
- package/src/main/ets/modules/net/PLVHttpData.js +0 -8
- package/src/main/ets/modules/net/PLVHttpError.js +0 -13
- package/src/main/ets/modules/net/PLVHttpRequest.js +0 -148
- package/src/main/ets/modules/net/PLVRequestSetting.js +0 -33
- package/src/main/ets/modules/socket/PLVSocketIO.js +0 -181
- package/src/main/ets/modules/web/PLVFailureLayout.js +0 -76
- package/src/main/ets/modules/web/PLVLoadingLayout.js +0 -45
- package/src/main/ets/modules/web/PLVNewWindowLayout.js +0 -61
- package/src/main/ets/modules/web/PLVSimpleWeb.js +0 -256
- package/src/main/ets/modules/web/PLVWebController.js +0 -283
- package/src/main/ets/modules/web/PLVWebModel.js +0 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
// @keepTs
|
|
2
|
+
// @ts-nocheck
|
|
1
3
|
export declare class PLVRequestSetting {
|
|
2
4
|
static readonly KEY_1 = "polyv_sdk_api_innor";
|
|
3
5
|
static readonly PLV_SWITCH_API_INNOR = "polyv_switch_api_innor";
|
|
4
6
|
static readonly DECRYPT_KEY_1_SRC = "PolyvApiResponse";
|
|
5
7
|
static readonly DECRYPT_KEY_2_SRC = "PolyvLiveEncrypt";
|
|
6
|
-
static createSign(
|
|
7
|
-
static decryptDataSync(
|
|
8
|
-
static concatParams(
|
|
8
|
+
static createSign(s16: Map<string, Object | undefined>, t16?: string): string;
|
|
9
|
+
static decryptDataSync(q16: string): string;
|
|
10
|
+
static concatParams(m16: Map<string, Object | undefined>): string;
|
|
9
11
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// @keepTs
|
|
2
|
+
// @ts-nocheck
|
|
1
3
|
import { PLVCallback } from '../../common/PLVCallback';
|
|
2
4
|
export declare class PLVSocketIO {
|
|
3
5
|
private client;
|
|
@@ -5,40 +7,40 @@ export declare class PLVSocketIO {
|
|
|
5
7
|
protected onSocketIOStatusListener?: PLVCallback<PLVSocketIOStatus, void>;
|
|
6
8
|
protected isTokenExpired: boolean;
|
|
7
9
|
private set_open_listener;
|
|
8
|
-
protected set_fail_listener(
|
|
9
|
-
protected set_reconnecting_listener(
|
|
10
|
+
protected set_fail_listener(f18: () => void): void;
|
|
11
|
+
protected set_reconnecting_listener(e18: () => void): void;
|
|
10
12
|
private set_reconnect_listener;
|
|
11
|
-
protected set_close_listener(
|
|
12
|
-
protected set_socket_open_listener(
|
|
13
|
-
protected set_socket_close_listener(
|
|
14
|
-
protected connect(
|
|
15
|
-
protected connectWithQuery(
|
|
13
|
+
protected set_close_listener(c18: (reason: string) => void): void;
|
|
14
|
+
protected set_socket_open_listener(b18: (nsp: string) => void): void;
|
|
15
|
+
protected set_socket_close_listener(a18: (nsp: string) => void): void;
|
|
16
|
+
protected connect(z17: string): void;
|
|
17
|
+
protected connectWithQuery(w17: string, x17: string, y17: string): void;
|
|
16
18
|
connected(): boolean;
|
|
17
|
-
disconnect(
|
|
18
|
-
destroy(
|
|
19
|
+
disconnect(v17?: boolean): void;
|
|
20
|
+
destroy(u17?: boolean): void;
|
|
19
21
|
protected clear_con_listeners(): void;
|
|
20
22
|
protected clear_socket_listeners(): void;
|
|
21
|
-
protected set_reconnect_attempts(
|
|
22
|
-
protected set_reconnect_delay(
|
|
23
|
-
protected set_reconnect_delay_max(
|
|
23
|
+
protected set_reconnect_attempts(t17: number): void;
|
|
24
|
+
protected set_reconnect_delay(s17: number): void;
|
|
25
|
+
protected set_reconnect_delay_max(r17: number): void;
|
|
24
26
|
protected set_logs_default(): void;
|
|
25
27
|
protected set_logs_quiet(): void;
|
|
26
28
|
protected set_logs_verbose(): void;
|
|
27
29
|
private close;
|
|
28
30
|
private sync_close;
|
|
29
|
-
protected set_proxy_basic_auth(
|
|
31
|
+
protected set_proxy_basic_auth(o17: string, p17: string, q17: string): void;
|
|
30
32
|
private opened;
|
|
31
33
|
protected get_sessionid(): string;
|
|
32
|
-
protected set_nsp(
|
|
33
|
-
protected on(
|
|
34
|
-
protected once(
|
|
35
|
-
protected off(
|
|
34
|
+
protected set_nsp(n17: string): void;
|
|
35
|
+
protected on(k17: string, l17: (event_json: string) => void): void;
|
|
36
|
+
protected once(i17: string, j17: (event_json: string) => void): void;
|
|
37
|
+
protected off(h17: string): void;
|
|
36
38
|
protected off_all(): void;
|
|
37
39
|
private socket_close;
|
|
38
|
-
protected on_error(
|
|
40
|
+
protected on_error(g17: (message: string) => void): void;
|
|
39
41
|
protected off_error(): void;
|
|
40
|
-
protected emitSkipCheck(
|
|
41
|
-
emit(
|
|
42
|
+
protected emitSkipCheck(c17: string, d17: ESObject, e17?: (emit_callback_json: string) => void): void;
|
|
43
|
+
emit(y16: string, z16: ESObject, a17?: (emit_callback_json: string) => void): boolean;
|
|
42
44
|
private replaceJson;
|
|
43
45
|
}
|
|
44
46
|
export declare enum PLVSocketIOStatus {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// @keepTs
|
|
2
|
+
// @ts-nocheck
|
|
1
3
|
import webview from "@ohos.web.webview";
|
|
2
4
|
import { PLVCallback, PLVCallback2 } from '../../common/PLVCallback';
|
|
3
5
|
import { PLVFullScreenStatus, PLVWebpageStatus } from '../../common/PLVCommonEnums';
|
|
@@ -41,48 +43,48 @@ export declare class PLVWebController extends webview.WebviewController {
|
|
|
41
43
|
_overScrollMode: OverScrollMode;
|
|
42
44
|
private dialogController;
|
|
43
45
|
private jsBridge;
|
|
44
|
-
constructor(
|
|
46
|
+
constructor(b24?: string);
|
|
45
47
|
accessBackward(): boolean;
|
|
46
48
|
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(
|
|
49
|
+
darkMode(y23: WebDarkMode): PLVWebController;
|
|
50
|
+
forceDarkAccess(x23: boolean): PLVWebController;
|
|
51
|
+
domStorageAccess(w23: boolean): PLVWebController;
|
|
52
|
+
zoomAccess(v23: boolean): PLVWebController;
|
|
53
|
+
fileAccess(u23: boolean): PLVWebController;
|
|
54
|
+
multiWindowAccess(t23: boolean): PLVWebController;
|
|
55
|
+
allowWindowOpenMethod(s23: boolean): PLVWebController;
|
|
56
|
+
javaScriptAccess(r23: boolean): PLVWebController;
|
|
57
|
+
mixMode(q23: MixedMode): PLVWebController;
|
|
58
|
+
cacheMode(p23: CacheMode): PLVWebController;
|
|
59
|
+
onControllerAttached(o23: PLVCallback<void, void>): PLVWebController;
|
|
60
|
+
addOnControllerAttached(n23: PLVCallback<void, void>): PLVWebController;
|
|
61
|
+
onInterceptRequest(m23: PLVCallback<WebResourceRequest, WebResourceResponse>): PLVWebController;
|
|
62
|
+
onLoadIntercept(l23: PLVCallback<WebResourceRequest, boolean>): PLVWebController;
|
|
63
|
+
onWindowNew(k23: PLVCallback<OnWindowNewEvent, boolean>): PLVWebController;
|
|
64
|
+
onShowFileSelector(j23: PLVCallback<OnShowFileSelectorEvent, boolean>): PLVWebController;
|
|
65
|
+
onFullScreenEnter(i23: PLVCallback<void, boolean>): PLVWebController;
|
|
66
|
+
onFullScreenExit(h23: PLVCallback<void, boolean>): PLVWebController;
|
|
67
|
+
onProgressChange(g23: PLVCallback<OnProgressChangeEvent, void>): PLVWebController;
|
|
68
|
+
onPageBegin(f23: PLVCallback<OnPageBeginEvent, void>): PLVWebController;
|
|
69
|
+
onPageEnd(e23: PLVCallback<OnPageEndEvent, void>): PLVWebController;
|
|
70
|
+
addOnPageEnd(d23: PLVCallback<OnPageEndEvent, void>): PLVWebController;
|
|
71
|
+
onErrorReceive(c23: PLVCallback<OnErrorReceiveEvent, void>): PLVWebController;
|
|
72
|
+
backgroundColor(b23: ResourceColor): this;
|
|
73
|
+
verticalScrollBarAccess(a23: boolean): this;
|
|
74
|
+
nestedScrollOptions(z22: NestedScrollOptions): this;
|
|
75
|
+
overScrollMode(y22: OverScrollMode): void;
|
|
76
|
+
userAgent(x22?: string): this;
|
|
77
|
+
addOnReloaded(w22: PLVCallback): this;
|
|
78
|
+
registerHandler(u22: string, v22: PLVCallback2<string, PLVCallback<string>>): this;
|
|
79
|
+
callHandle(r22: string, s22: string, t22: PLVCallback<string>): this;
|
|
80
|
+
loadHtmlData(o22?: string): this;
|
|
81
|
+
loadUrlCatch(k22: string | Resource): void;
|
|
80
82
|
handleControllerAttached(): void;
|
|
81
83
|
handleFullScreenExit(): void;
|
|
82
84
|
handleFullScreenEnter(): void;
|
|
83
|
-
handleWindowNew(
|
|
84
|
-
handleIsLoadIntercept(
|
|
85
|
-
handlePageEnd(
|
|
85
|
+
handleWindowNew(g22: OnWindowNewEvent, h22: (webviewController: WebviewController) => CustomDialogController): void;
|
|
86
|
+
handleIsLoadIntercept(e22: WebResourceRequest | undefined): boolean;
|
|
87
|
+
handlePageEnd(b22: OnPageEndEvent): void;
|
|
86
88
|
handleErrorReceive(): void;
|
|
87
89
|
private getVideoWHEnterFullScreen;
|
|
88
90
|
}
|
package/src/main/module.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"app":{"bundleName":"net.plv.livescenes.demo","debug":false,"versionCode":
|
|
1
|
+
{"app":{"bundleName":"net.plv.livescenes.demo","debug":false,"versionCode":1030300,"versionName":"1.3.3","minAPIVersion":50000012,"targetAPIVersion":60000020,"apiReleaseType":"Release","targetMinorAPIVersion":0,"targetPatchAPIVersion":0,"compileSdkVersion":"6.0.0.47","compileSdkType":"HarmonyOS","appEnvironments":[],"bundleType":"app","buildMode":"release"},"module":{"name":"foundation","type":"har","deviceTypes":["default","tablet","2in1"],"packageName":"@polyvharmony/live-scenes-foundation","installationFree":false,"virtualMachine":"ark12.0.2.0","compileMode":"esmodule","dependencies":[]}}
|
package/Index.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export { PLVNodeControllerManager, PLVNodeController } from './src/main/ets/common/ui/PLVNodeController';
|
|
2
|
-
export { default as PLVLazyDataSource } from './src/main/ets/common/PLVBasicDataSource';
|
|
3
|
-
export { PLVCustomBuilder, PLVMediaQueryListener, PLVAvoidAreaChangeListener, PLVStateData, PLVStatefulData, PLVDisposable, PLVPromiseValue, PLVLazyValue, PLVAsyncLazyValue, PLVEventNotify } from './src/main/ets/common/PLVCallback';
|
|
4
|
-
export { default as PLVCommonConstants } from './src/main/ets/common/PLVCommonConstants';
|
|
5
|
-
export { PLVDeviceUtils } from './src/main/ets/common/PLVDeviceUtils';
|
|
6
|
-
export { PLVHashMap } from './src/main/ets/common/PLVHashMap';
|
|
7
|
-
export { PLVWebpageStatus, PLVFullScreenStatus, PLVPrintLogLevel } from './src/main/ets/common/PLVCommonEnums';
|
|
8
|
-
export { default as PLVJSONUtils } from './src/main/ets/common/PLVJSONUtils';
|
|
9
|
-
export { PLVPreferencesUtils } from './src/main/ets/common/PLVPreferencesUtils';
|
|
10
|
-
export { PLVScheduledTask } from './src/main/ets/common/PLVScheduledTask';
|
|
11
|
-
export { PLVSimpleBuffer } from './src/main/ets/common/PLVSimpleBuffer';
|
|
12
|
-
export { PLVSparseArray } from './src/main/ets/common/PLVSparseArray';
|
|
13
|
-
export { PLVTextUtils } from './src/main/ets/common/PLVTextUtils';
|
|
14
|
-
export { PLVUACreator } from './src/main/ets/common/PLVUACreator';
|
|
15
|
-
export { default as PLVToastUtils } from './src/main/ets/common/PLVToastUtils';
|
|
16
|
-
export { default as PLVUtils } from './src/main/ets/common/PLVUtils';
|
|
17
|
-
export { PLVWebUtils } from './src/main/ets/common/PLVWebUtils';
|
|
18
|
-
export { PLVTimeUtils } from './src/main/ets/common/PLVTimeUtils';
|
|
19
|
-
export { default as PLVLogger } from './src/main/ets/modules/log/PLVLogger';
|
|
20
|
-
export { PLVHttpRequest } from './src/main/ets/modules/net/PLVHttpRequest';
|
|
21
|
-
export { PLVApiConstants } from './src/main/ets/modules/net/PLVApiConstants';
|
|
22
|
-
export { PLVRequestSetting } from './src/main/ets/modules/net/PLVRequestSetting';
|
|
23
|
-
export { PLVHttpError } from './src/main/ets/modules/net/PLVHttpError';
|
|
24
|
-
export { PLVHttpData } from './src/main/ets/modules/net/PLVHttpData';
|
|
25
|
-
export { PLVNetUtils } from './src/main/ets/common/PLVNetUtils';
|
|
26
|
-
export { PLVSocketIO, PLVSocketIOStatus } from './src/main/ets/modules/socket/PLVSocketIO';
|
|
27
|
-
export { PLVNewWindowLayout } from './src/main/ets/modules/web/PLVNewWindowLayout';
|
|
28
|
-
export { PLVWebController } from './src/main/ets/modules/web/PLVWebController';
|
|
29
|
-
export { PLVSimpleWeb } from './src/main/ets/modules/web/PLVSimpleWeb';
|
|
30
|
-
export { FormData } from '@ohos/axios';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import PLVLogger from '../modules/log/PLVLogger';
|
|
2
|
-
const TAG = '[PLVLazyDataSource]';
|
|
3
|
-
class PLVBasicDataSource {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.listeners = [];
|
|
6
|
-
}
|
|
7
|
-
totalCount() {
|
|
8
|
-
return 0;
|
|
9
|
-
}
|
|
10
|
-
getData(h1) {
|
|
11
|
-
return undefined;
|
|
12
|
-
}
|
|
13
|
-
registerDataChangeListener(g1) {
|
|
14
|
-
if (this.listeners.indexOf(g1) < 0) {
|
|
15
|
-
PLVLogger.info(TAG, 'registerDataChangeListener');
|
|
16
|
-
this.listeners.push(g1);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
unregisterDataChangeListener(e1) {
|
|
20
|
-
const f1 = this.listeners.indexOf(e1);
|
|
21
|
-
if (f1 >= 0) {
|
|
22
|
-
PLVLogger.info(TAG, 'unregisterDataChangeListener');
|
|
23
|
-
this.listeners.splice(f1, 1);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
notifyDataReload() {
|
|
27
|
-
this.listeners.forEach(d1 => {
|
|
28
|
-
d1.onDataReloaded();
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
notifyDataAdd(b1) {
|
|
32
|
-
this.listeners.forEach(c1 => {
|
|
33
|
-
c1.onDataAdd(b1);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
notifyDataChange(z) {
|
|
37
|
-
this.listeners.forEach(a1 => {
|
|
38
|
-
a1.onDataChange(z);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
notifyDataDelete(x) {
|
|
42
|
-
this.listeners.forEach(y => {
|
|
43
|
-
y.onDataDelete(x);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
notifyDataMove(u, v) {
|
|
47
|
-
this.listeners.forEach(w => {
|
|
48
|
-
w.onDataMove(u, v);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
notifyDatasetChange(s) {
|
|
52
|
-
this.listeners.forEach(t => {
|
|
53
|
-
t.onDatasetChange(s);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
export default class PLVLazyDataSource extends PLVBasicDataSource {
|
|
58
|
-
constructor() {
|
|
59
|
-
super(...arguments);
|
|
60
|
-
this.dataArray = [];
|
|
61
|
-
}
|
|
62
|
-
bindSource(r) {
|
|
63
|
-
r._bindSource = this;
|
|
64
|
-
this._beBindSource = r;
|
|
65
|
-
this.dataArray = r.dataArray;
|
|
66
|
-
}
|
|
67
|
-
unbindSource() {
|
|
68
|
-
if (this._beBindSource) {
|
|
69
|
-
this._beBindSource._bindSource = undefined;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
totalCount() {
|
|
73
|
-
return this.dataArray.length;
|
|
74
|
-
}
|
|
75
|
-
getData(q) {
|
|
76
|
-
return this.dataArray[q];
|
|
77
|
-
}
|
|
78
|
-
addData(n, ...o) {
|
|
79
|
-
if (o.length === 0) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
this.dataArray.splice(n, 0, ...o);
|
|
83
|
-
const p = [{
|
|
84
|
-
type: DataOperationType.ADD,
|
|
85
|
-
index: n,
|
|
86
|
-
count: o.length
|
|
87
|
-
}];
|
|
88
|
-
if (this._bindSource) {
|
|
89
|
-
this._bindSource.notifyDatasetChange(p);
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
this.notifyDatasetChange(p);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
pushData(...k) {
|
|
96
|
-
if (k.length === 0) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const l = this.totalCount();
|
|
100
|
-
this.dataArray.push(...k);
|
|
101
|
-
const m = [{
|
|
102
|
-
type: DataOperationType.ADD,
|
|
103
|
-
index: l,
|
|
104
|
-
count: k.length
|
|
105
|
-
}];
|
|
106
|
-
if (this._bindSource) {
|
|
107
|
-
this._bindSource.notifyDatasetChange(m);
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
this.notifyDatasetChange(m);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
deleteData(i) {
|
|
114
|
-
this.dataArray.splice(i, 1);
|
|
115
|
-
const j = [{
|
|
116
|
-
type: DataOperationType.DELETE,
|
|
117
|
-
index: i,
|
|
118
|
-
count: 1
|
|
119
|
-
}];
|
|
120
|
-
if (this._bindSource) {
|
|
121
|
-
this._bindSource.notifyDatasetChange(j);
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
this.notifyDatasetChange(j);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
moveData(e, f) {
|
|
128
|
-
const g = this.dataArray[e];
|
|
129
|
-
this.dataArray[e] = this.dataArray[f];
|
|
130
|
-
this.dataArray[f] = g;
|
|
131
|
-
const h = [{
|
|
132
|
-
type: DataOperationType.MOVE,
|
|
133
|
-
index: {
|
|
134
|
-
from: e, to: f
|
|
135
|
-
}
|
|
136
|
-
}];
|
|
137
|
-
if (this._bindSource) {
|
|
138
|
-
this._bindSource.notifyDatasetChange(h);
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
this.notifyDatasetChange(h);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
changeData(b, c) {
|
|
145
|
-
this.dataArray.splice(b, 1, c);
|
|
146
|
-
const d = [{
|
|
147
|
-
type: DataOperationType.CHANGE,
|
|
148
|
-
index: b
|
|
149
|
-
}];
|
|
150
|
-
if (this._bindSource) {
|
|
151
|
-
this._bindSource.notifyDatasetChange(d);
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
this.notifyDatasetChange(d);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
clearData() {
|
|
158
|
-
this.dataArray.length = 0;
|
|
159
|
-
this.reloadData();
|
|
160
|
-
}
|
|
161
|
-
reloadData() {
|
|
162
|
-
const a = [{
|
|
163
|
-
type: DataOperationType.RELOAD
|
|
164
|
-
}];
|
|
165
|
-
if (this._bindSource) {
|
|
166
|
-
this._bindSource.notifyDatasetChange(a);
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
this.notifyDatasetChange(a);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (x2, y2, z2, a3) {
|
|
2
|
-
var b3 = arguments.length, c3 = b3 < 3 ? y2 : a3 === null ? a3 = Object.getOwnPropertyDescriptor(y2, z2) : a3, d3;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
4
|
-
c3 = Reflect.decorate(x2, y2, z2, a3);
|
|
5
|
-
else
|
|
6
|
-
for (var e3 = x2.length - 1; e3 >= 0; e3--)
|
|
7
|
-
if (d3 = x2[e3])
|
|
8
|
-
c3 = (b3 < 3 ? d3(c3) : b3 > 3 ? d3(y2, z2, c3) : d3(y2, z2)) || c3;
|
|
9
|
-
return b3 > 3 && c3 && Object.defineProperty(y2, z2, c3), c3;
|
|
10
|
-
};
|
|
11
|
-
import PLVLogger from '../modules/log/PLVLogger';
|
|
12
|
-
import PLVUtils from './PLVUtils';
|
|
13
|
-
export function PLVCustomBuilder(u2, v2 = null) {
|
|
14
|
-
const w2 = u2;
|
|
15
|
-
}
|
|
16
|
-
export class PLVMediaQueryListener {
|
|
17
|
-
constructor(s2, t2) {
|
|
18
|
-
this.listener = s2;
|
|
19
|
-
this.callback = t2;
|
|
20
|
-
}
|
|
21
|
-
off() {
|
|
22
|
-
this.listener?.off("change", this.callback);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export class PLVAvoidAreaChangeListener {
|
|
26
|
-
constructor(q2, r2) {
|
|
27
|
-
this.windowClass = q2;
|
|
28
|
-
this.callback = r2;
|
|
29
|
-
}
|
|
30
|
-
off() {
|
|
31
|
-
try {
|
|
32
|
-
this.windowClass?.off("avoidAreaChange", this.callback);
|
|
33
|
-
}
|
|
34
|
-
catch (p2) {
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
export class PLVStateData {
|
|
39
|
-
constructor(o2) {
|
|
40
|
-
this.data = o2;
|
|
41
|
-
}
|
|
42
|
-
copy() {
|
|
43
|
-
return this.copyValue(this.data);
|
|
44
|
-
}
|
|
45
|
-
copyValue(n2) {
|
|
46
|
-
return new PLVStateData(n2);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
export class PLVStatefulData extends PLVStateData {
|
|
50
|
-
constructor(k2, l2 = true, m2) {
|
|
51
|
-
super(k2);
|
|
52
|
-
this.isSuccess = l2;
|
|
53
|
-
this.error = m2;
|
|
54
|
-
}
|
|
55
|
-
static success(j2) {
|
|
56
|
-
return new PLVStatefulData(j2, true);
|
|
57
|
-
}
|
|
58
|
-
static error(i2) {
|
|
59
|
-
return new PLVStatefulData(undefined, false, i2);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
export class PLVDisposable {
|
|
63
|
-
constructor() {
|
|
64
|
-
this._dispose = false;
|
|
65
|
-
}
|
|
66
|
-
isDispose() {
|
|
67
|
-
return this._dispose;
|
|
68
|
-
}
|
|
69
|
-
dispose() {
|
|
70
|
-
this._dispose = true;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
export class PLVPromiseValue {
|
|
74
|
-
constructor() {
|
|
75
|
-
this.callbacks = [];
|
|
76
|
-
}
|
|
77
|
-
set(g2) {
|
|
78
|
-
if (this.value == undefined) {
|
|
79
|
-
this.resolve?.(g2);
|
|
80
|
-
}
|
|
81
|
-
if (this.value != g2) {
|
|
82
|
-
this.callbacks.forEach(h2 => {
|
|
83
|
-
h2(g2);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
this.value = g2;
|
|
87
|
-
}
|
|
88
|
-
observe(f2) {
|
|
89
|
-
if (this.value != undefined) {
|
|
90
|
-
f2(this.value);
|
|
91
|
-
}
|
|
92
|
-
this.callbacks.push(f2);
|
|
93
|
-
}
|
|
94
|
-
get() {
|
|
95
|
-
if (this.value != undefined) {
|
|
96
|
-
return this.value;
|
|
97
|
-
}
|
|
98
|
-
if (!this.promise) {
|
|
99
|
-
this.promise = PLVUtils.safePromise((d2, e2) => {
|
|
100
|
-
this.resolve = d2;
|
|
101
|
-
if (this.value != undefined) {
|
|
102
|
-
d2(this.value);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
return this.promise;
|
|
107
|
-
}
|
|
108
|
-
clear() {
|
|
109
|
-
this.callbacks = [];
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
let PLVLazyValue = class PLVLazyValue {
|
|
113
|
-
constructor(c2) {
|
|
114
|
-
this._callback = c2;
|
|
115
|
-
}
|
|
116
|
-
get(b2) {
|
|
117
|
-
if (this._value == undefined) {
|
|
118
|
-
this._value = this._callback(b2);
|
|
119
|
-
}
|
|
120
|
-
return this._value;
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
PLVLazyValue = __decorate([
|
|
124
|
-
Observed
|
|
125
|
-
], PLVLazyValue);
|
|
126
|
-
export { PLVLazyValue };
|
|
127
|
-
let PLVAsyncLazyValue = class PLVAsyncLazyValue {
|
|
128
|
-
constructor(a2) {
|
|
129
|
-
this._callback = a2;
|
|
130
|
-
}
|
|
131
|
-
get(x1, y1) {
|
|
132
|
-
if (this._value === undefined) {
|
|
133
|
-
this._callback(y1, (z1) => {
|
|
134
|
-
this._value = z1;
|
|
135
|
-
x1(this._value);
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
x1(this._value);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
PLVAsyncLazyValue = __decorate([
|
|
144
|
-
Observed
|
|
145
|
-
], PLVAsyncLazyValue);
|
|
146
|
-
export { PLVAsyncLazyValue };
|
|
147
|
-
export class PLVEventNotify {
|
|
148
|
-
constructor(v1, w1 = true) {
|
|
149
|
-
this.tag = '[PLVEventNotify]';
|
|
150
|
-
this.events = new Map();
|
|
151
|
-
this.emitLogToFile = true;
|
|
152
|
-
this.tag = PLVUtils.getClassTag(v1) || this.tag;
|
|
153
|
-
this.emitLogToFile = w1;
|
|
154
|
-
}
|
|
155
|
-
on(r1, s1, t1) {
|
|
156
|
-
PLVLogger.info(PLVUtils.getClassTag(t1) || this.tag, `on event: ${r1}`);
|
|
157
|
-
const u1 = this.events.get(r1) || [];
|
|
158
|
-
u1.push(s1);
|
|
159
|
-
this.events.set(r1, u1);
|
|
160
|
-
}
|
|
161
|
-
off(m1, n1, o1) {
|
|
162
|
-
PLVLogger.info(PLVUtils.getClassTag(o1) || this.tag, `off event: ${m1}`);
|
|
163
|
-
if (n1) {
|
|
164
|
-
const p1 = this.events.get(m1) || [];
|
|
165
|
-
const q1 = p1.indexOf(n1);
|
|
166
|
-
if (q1 !== -1) {
|
|
167
|
-
p1.splice(q1, 1);
|
|
168
|
-
}
|
|
169
|
-
this.events.set(m1, p1);
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
this.events.delete(m1);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
emit(i1, ...j1) {
|
|
176
|
-
PLVLogger.info(this.tag, `emit event: ${i1}, args: ${j1}`, this.emitLogToFile);
|
|
177
|
-
const k1 = this.events.get(i1) || [];
|
|
178
|
-
k1.forEach(l1 => {
|
|
179
|
-
l1(...j1);
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
clear() {
|
|
183
|
-
PLVLogger.info(this.tag, `clear event notify`);
|
|
184
|
-
this.events.clear();
|
|
185
|
-
}
|
|
186
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export default class PLVCommonConstants {
|
|
2
|
-
}
|
|
3
|
-
PLVCommonConstants.TAG = "[PLVLiveSDK]";
|
|
4
|
-
PLVCommonConstants.HARMONY_HEI_TI_FONT_FAMILY = 'HarmonyHeiTi';
|
|
5
|
-
PLVCommonConstants.FULL_PERCENT = '100%';
|
|
6
|
-
PLVCommonConstants.AUTO = 'auto';
|
|
7
|
-
PLVCommonConstants.CONTAINER = '__container__';
|
|
8
|
-
PLVCommonConstants.JS_PRE = 'javascript:';
|
|
9
|
-
PLVCommonConstants.LENGTH_SHORT = 2000;
|
|
10
|
-
PLVCommonConstants.LENGTH_LONG = 3500;
|
|
11
|
-
PLVCommonConstants.DELAY_TIME_S = 100;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export var PLVWebpageStatus;
|
|
2
|
-
(function (h3) {
|
|
3
|
-
h3["INIT"] = "init";
|
|
4
|
-
h3["ERROR"] = "error";
|
|
5
|
-
h3["FINISHED"] = "finished";
|
|
6
|
-
})(PLVWebpageStatus || (PLVWebpageStatus = {}));
|
|
7
|
-
export var PLVFullScreenStatus;
|
|
8
|
-
(function (g3) {
|
|
9
|
-
g3["IDLE"] = "idle";
|
|
10
|
-
g3["ENTER"] = "enter";
|
|
11
|
-
g3["EXIT"] = "exit";
|
|
12
|
-
})(PLVFullScreenStatus || (PLVFullScreenStatus = {}));
|
|
13
|
-
export var PLVPrintLogLevel;
|
|
14
|
-
(function (f3) {
|
|
15
|
-
f3[f3["ALL"] = 0] = "ALL";
|
|
16
|
-
f3[f3["VERBOSE"] = 2] = "VERBOSE";
|
|
17
|
-
f3[f3["DEBUG"] = 3] = "DEBUG";
|
|
18
|
-
f3[f3["INFO"] = 4] = "INFO";
|
|
19
|
-
f3[f3["WARN"] = 5] = "WARN";
|
|
20
|
-
f3[f3["ERROR"] = 6] = "ERROR";
|
|
21
|
-
f3[f3["NONE"] = 99] = "NONE";
|
|
22
|
-
})(PLVPrintLogLevel || (PLVPrintLogLevel = {}));
|