@polyvharmony/live-scenes-foundation 1.3.0-rc.3 → 1.3.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/oh-package.json5 +1 -1
  3. package/package.json +1 -1
  4. package/src/main/ets/common/PLVBasicDataSource.d.ets +19 -19
  5. package/src/main/ets/common/PLVBasicDataSource.js +75 -75
  6. package/src/main/ets/common/PLVCallback.d.ets +20 -19
  7. package/src/main/ets/common/PLVCallback.js +78 -78
  8. package/src/main/ets/common/PLVCommonEnums.js +16 -16
  9. package/src/main/ets/common/PLVDeviceUtils.d.ets +4 -4
  10. package/src/main/ets/common/PLVDeviceUtils.js +9 -9
  11. package/src/main/ets/common/PLVHashMap.d.ets +2 -2
  12. package/src/main/ets/common/PLVHashMap.js +2 -2
  13. package/src/main/ets/common/PLVJSONUtils.d.ets +13 -13
  14. package/src/main/ets/common/PLVJSONUtils.js +46 -46
  15. package/src/main/ets/common/PLVNetUtils.d.ets +4 -4
  16. package/src/main/ets/common/PLVNetUtils.js +24 -24
  17. package/src/main/ets/common/PLVPreferencesUtils.d.ets +9 -9
  18. package/src/main/ets/common/PLVPreferencesUtils.js +16 -16
  19. package/src/main/ets/common/PLVScheduledTask.d.ets +1 -1
  20. package/src/main/ets/common/PLVScheduledTask.js +9 -9
  21. package/src/main/ets/common/PLVSimpleBuffer.d.ets +3 -3
  22. package/src/main/ets/common/PLVSimpleBuffer.js +8 -8
  23. package/src/main/ets/common/PLVSparseArray.d.ets +6 -6
  24. package/src/main/ets/common/PLVSparseArray.js +21 -21
  25. package/src/main/ets/common/PLVTextUtils.d.ets +8 -8
  26. package/src/main/ets/common/PLVTextUtils.js +44 -44
  27. package/src/main/ets/common/PLVTimeUtils.d.ets +1 -1
  28. package/src/main/ets/common/PLVTimeUtils.js +8 -8
  29. package/src/main/ets/common/PLVToastUtils.d.ets +4 -4
  30. package/src/main/ets/common/PLVToastUtils.js +7 -7
  31. package/src/main/ets/common/PLVUACreator.d.ets +1 -1
  32. package/src/main/ets/common/PLVUACreator.js +6 -6
  33. package/src/main/ets/common/PLVUtils.d.ets +25 -24
  34. package/src/main/ets/common/PLVUtils.js +141 -141
  35. package/src/main/ets/common/PLVWebUtils.d.ets +4 -4
  36. package/src/main/ets/common/PLVWebUtils.js +46 -47
  37. package/src/main/ets/common/ui/PLVNodeController.d.ets +11 -9
  38. package/src/main/ets/common/ui/PLVNodeController.js +48 -47
  39. package/src/main/ets/modules/log/PLVLogger.d.ets +11 -11
  40. package/src/main/ets/modules/log/PLVLogger.js +36 -36
  41. package/src/main/ets/modules/log/PLVXLogFilePrinter.d.ets +2 -2
  42. package/src/main/ets/modules/log/PLVXLogFilePrinter.js +14 -12
  43. package/src/main/ets/modules/net/PLVHttpData.d.ets +1 -1
  44. package/src/main/ets/modules/net/PLVHttpData.js +3 -3
  45. package/src/main/ets/modules/net/PLVHttpError.d.ets +2 -2
  46. package/src/main/ets/modules/net/PLVHttpError.js +5 -5
  47. package/src/main/ets/modules/net/PLVHttpRequest.d.ets +10 -9
  48. package/src/main/ets/modules/net/PLVHttpRequest.js +89 -88
  49. package/src/main/ets/modules/net/PLVRequestSetting.d.ets +3 -3
  50. package/src/main/ets/modules/net/PLVRequestSetting.js +14 -14
  51. package/src/main/ets/modules/socket/PLVSocketIO.d.ets +20 -20
  52. package/src/main/ets/modules/socket/PLVSocketIO.js +61 -61
  53. package/src/main/ets/modules/web/PLVFailureLayout.js +17 -18
  54. package/src/main/ets/modules/web/PLVLoadingLayout.js +12 -13
  55. package/src/main/ets/modules/web/PLVNewWindowLayout.js +17 -18
  56. package/src/main/ets/modules/web/PLVSimpleWeb.js +75 -79
  57. package/src/main/ets/modules/web/PLVWebController.d.ets +39 -39
  58. package/src/main/ets/modules/web/PLVWebController.js +106 -106
  59. package/src/main/module.json +1 -1
@@ -9,138 +9,139 @@ import PLVUtils from '../../common/PLVUtils';
9
9
  import { PLVNetUtils } from '../../common/PLVNetUtils';
10
10
  const TAG = '[PLVHttpRequest]';
11
11
  export class PLVHttpRequest {
12
- constructor(g7) {
13
- this.baseURL = g7;
12
+ constructor(w15) {
13
+ this.baseURL = w15;
14
14
  }
15
- ua(f7) {
16
- this.userAgent = f7;
15
+ ua(v15) {
16
+ this.userAgent = v15;
17
17
  return this;
18
18
  }
19
- create(config) {
20
- const c7 = axios.create();
21
- c7.defaults.timeout = 10000;
22
- c7.defaults.readTimeout = 10000;
23
- c7.defaults.connectTimeout = 10000;
24
- c7.defaults.baseURL = this.baseURL;
25
- c7.defaults.headers.common["w1"] = this.userAgent;
26
- if (config?.formUrlEncoded) {
27
- c7.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
19
+ create(i15) {
20
+ const j15 = axios.create();
21
+ j15.defaults.timeout = 10000;
22
+ j15.defaults.readTimeout = 10000;
23
+ j15.defaults.connectTimeout = 10000;
24
+ j15.defaults.baseURL = this.baseURL;
25
+ j15.defaults.headers.common['User-Agent'] = this.userAgent;
26
+ const k15 = (i15?.cacheTime === 0 ? PLVHttpRequest.CACHE_TIMEOUT : i15?.cacheTime) ?? PLVHttpRequest.CACHE_TIMEOUT;
27
+ if (i15?.formUrlEncoded) {
28
+ j15.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
28
29
  }
29
- let cacheKey = '';
30
- c7.interceptors.request.use((e7) => {
31
- if (config?.signKey) {
32
- const data = e7.params ? e7.params : e7.data;
33
- const map = PLVJSONUtils.object2Map(data);
34
- map.delete('log');
35
- data['sign'] = PLVRequestSetting.createSign(map, config.signKey);
30
+ let l15 = '';
31
+ j15.interceptors.request.use((q15) => {
32
+ if (i15?.signKey) {
33
+ const t15 = q15.params ? q15.params : q15.data;
34
+ const u15 = PLVJSONUtils.object2Map(t15);
35
+ u15.delete('log');
36
+ t15['sign'] = PLVRequestSetting.createSign(u15, i15.signKey);
36
37
  }
37
38
  if (PLVHttpRequest.token) {
38
- const params = e7.params;
39
- const data = e7.data;
40
- if (params && Object.keys(params).includes('appId')) {
41
- params['token'] = PLVHttpRequest.token;
42
- params["z1"] = PLVHttpRequest.token;
39
+ const r15 = q15.params;
40
+ const s15 = q15.data;
41
+ if (r15 && Object.keys(r15).includes('appId')) {
42
+ r15['token'] = PLVHttpRequest.token;
43
+ r15['viewerToken'] = PLVHttpRequest.token;
43
44
  }
44
- if (data && Object.keys(data).includes('appId')) {
45
- data['token'] = PLVHttpRequest.token;
46
- data["z1"] = PLVHttpRequest.token;
45
+ if (s15 && Object.keys(s15).includes('appId')) {
46
+ s15['token'] = PLVHttpRequest.token;
47
+ s15['viewerToken'] = PLVHttpRequest.token;
47
48
  }
48
49
  }
49
- if (config?.useCache) {
50
- cacheKey = this.generateCacheKey(e7);
50
+ if (i15?.useCache) {
51
+ l15 = this.generateCacheKey(q15);
51
52
  }
52
- PLVLogger.info(TAG, `--> ${this.method} ${this.baseURL}${config?.url}${PLVNetUtils.formatParams(e7?.params)}`);
53
- PLVLogger.info(TAG, `--> ${PLVNetUtils.formatParams(e7?.data)}`);
54
- return e7;
55
- }, (error) => {
56
- return Promise.reject(error);
53
+ PLVLogger.info(TAG, `--> ${this.method} ${this.baseURL}${i15?.url}${PLVNetUtils.formatParams(q15?.params)}`);
54
+ PLVLogger.info(TAG, `--> ${PLVNetUtils.formatParams(q15?.data)}`);
55
+ return q15;
56
+ }, (p15) => {
57
+ return Promise.reject(p15);
57
58
  });
58
- c7.interceptors.response.use((response) => {
59
- PLVLogger.info(TAG, `<-- ${response.status} ${this.method} ${this.baseURL}${response.config.url}${PLVNetUtils.formatParams(config?.params)} (${response.performanceTiming?.totalTiming}ms)`);
60
- PLVLogger.info(TAG, `Header: ${PLVJSONUtils.safeStringify(response.headers)}`);
61
- PLVLogger.info(TAG, `Result: ${PLVJSONUtils.safeStringify(response.data)}`);
62
- if (config?.aesDecrypted) {
63
- const d7 = response.data;
64
- if (d7) {
65
- d7['data'] = PLVJSONUtils.safeParse(PLVRequestSetting.decryptDataSync(d7['data']));
59
+ j15.interceptors.response.use((n15) => {
60
+ PLVLogger.info(TAG, `<-- ${n15.status} ${this.method} ${this.baseURL}${n15.config.url}${PLVNetUtils.formatParams(i15?.params)} (${n15.performanceTiming?.totalTiming}ms)`);
61
+ PLVLogger.info(TAG, `Header: ${PLVJSONUtils.safeStringify(n15.headers)}`);
62
+ PLVLogger.info(TAG, `Result: ${PLVJSONUtils.safeStringify(n15.data)}`);
63
+ if (i15?.aesDecrypted) {
64
+ const o15 = n15.data;
65
+ if (o15) {
66
+ o15['data'] = PLVJSONUtils.safeParse(PLVRequestSetting.decryptDataSync(o15['data']));
66
67
  }
67
68
  else {
68
69
  PLVLogger.printError(TAG, 'response error', new Error('jsonData undefined'));
69
70
  }
70
71
  }
71
- if (config?.fillData) {
72
- PLVHttpData.fill(config.fillData, response);
72
+ if (i15?.fillData) {
73
+ PLVHttpData.fill(i15.fillData, n15);
73
74
  }
74
- if (cacheKey) {
75
- PLVHttpRequest.CACHE_DATA_MAP.set(cacheKey, response);
75
+ if (l15) {
76
+ PLVHttpRequest.CACHE_DATA_MAP.set(l15, n15);
76
77
  setTimeout(() => {
77
- PLVHttpRequest.CACHE_DATA_MAP.remove(cacheKey);
78
- }, PLVHttpRequest.CACHE_TIMEOUT);
78
+ PLVHttpRequest.CACHE_DATA_MAP.remove(l15);
79
+ }, k15);
79
80
  }
80
- return response;
81
- }, (error) => {
82
- return Promise.reject(error);
81
+ return n15;
82
+ }, (m15) => {
83
+ return Promise.reject(m15);
83
84
  });
84
- return c7;
85
+ return j15;
85
86
  }
86
- request(p) {
87
- return PLVUtils.safePromise((b7, reject) => {
88
- p.then((r) => {
89
- const data = r.data;
90
- if (data) {
91
- for (const key of Object.keys(data)) {
92
- if (key == 'code' && data[key] != 200 + '') {
93
- reject(new PLVHttpError(new AxiosError(PLVJSONUtils.safeStringify(r.data || ''), data[key], undefined, undefined, r)));
87
+ request(b15) {
88
+ return PLVUtils.safePromise((c15, d15) => {
89
+ b15.then((f15) => {
90
+ const g15 = f15.data;
91
+ if (g15) {
92
+ for (const h15 of Object.keys(g15)) {
93
+ if (h15 == 'code' && g15[h15] != 200 + '') {
94
+ d15(new PLVHttpError(new AxiosError(PLVJSONUtils.safeStringify(f15.data || ''), g15[h15], undefined, undefined, f15)));
94
95
  return;
95
96
  }
96
97
  }
97
98
  }
98
- b7(r);
99
- }).catch((err) => {
100
- reject(new PLVHttpError(err));
99
+ c15(f15);
100
+ }).catch((e15) => {
101
+ d15(new PLVHttpError(e15));
101
102
  });
102
103
  });
103
104
  }
104
- get(config) {
105
+ get(a15) {
105
106
  this.method = 'GET';
106
- return this.checkCache(config) || this.request(this.create(config).get(config?.url, config));
107
+ return this.checkCache(a15) || this.request(this.create(a15).get(a15?.url, a15));
107
108
  }
108
- post(config) {
109
+ post(z14) {
109
110
  this.method = 'POST';
110
- return this.checkCache(config) || this.request(this.create(config).post(config?.url, config?.data, config));
111
+ return this.checkCache(z14) || this.request(this.create(z14).post(z14?.url, z14?.data, z14));
111
112
  }
112
- checkCache(config) {
113
- if (config?.useCache) {
114
- const cacheKey = this.generateCacheKey(config);
115
- if (PLVHttpRequest.CACHE_DATA_MAP.hasKey(cacheKey)) {
116
- PLVLogger.info(TAG, `--> ${this.method} ${this.baseURL}${config?.url} use cache`);
117
- return Promise.resolve(PLVHttpRequest.CACHE_DATA_MAP.get(cacheKey));
113
+ checkCache(x14) {
114
+ if (x14?.useCache) {
115
+ const y14 = this.generateCacheKey(x14);
116
+ if (PLVHttpRequest.CACHE_DATA_MAP.hasKey(y14)) {
117
+ PLVLogger.info(TAG, `--> ${this.method} ${this.baseURL}${x14?.url} use cache`);
118
+ return Promise.resolve(PLVHttpRequest.CACHE_DATA_MAP.get(y14));
118
119
  }
119
120
  }
120
121
  return undefined;
121
122
  }
122
- generateCacheKey(config) {
123
- let cacheKey = this.baseURL + '' + config?.url;
124
- const params = config?.params;
125
- const data = config?.data;
126
- const a7 = (record) => {
127
- if (record) {
128
- for (const key of Object.keys(record)) {
129
- if (key == 'timestamp' || key == 'sign' || key == 'token' || key == 'viewerToken') {
123
+ generateCacheKey(q14) {
124
+ let r14 = this.baseURL + '' + q14?.url;
125
+ const s14 = q14?.params;
126
+ const t14 = q14?.data;
127
+ const u14 = (v14) => {
128
+ if (v14) {
129
+ for (const w14 of Object.keys(v14)) {
130
+ if (w14 == 'timestamp' || w14 == 'sign' || w14 == 'token' || w14 == 'viewerToken') {
130
131
  continue;
131
132
  }
132
- if (key == 'appId' && PLVHttpRequest.token) {
133
- cacheKey += PLVHttpRequest.token;
133
+ if (w14 == 'appId' && PLVHttpRequest.token) {
134
+ r14 += PLVHttpRequest.token;
134
135
  }
135
136
  else {
136
- cacheKey += record[key];
137
+ r14 += v14[w14];
137
138
  }
138
139
  }
139
140
  }
140
141
  };
141
- a7(params);
142
- a7(data);
143
- return cacheKey;
142
+ u14(s14);
143
+ u14(t14);
144
+ return r14;
144
145
  }
145
146
  }
146
147
  PLVHttpRequest.CACHE_TIMEOUT = 1000 * 60 * 5;
@@ -3,7 +3,7 @@ export declare class PLVRequestSetting {
3
3
  static readonly PLV_SWITCH_API_INNOR = "polyv_switch_api_innor";
4
4
  static readonly DECRYPT_KEY_1_SRC = "PolyvApiResponse";
5
5
  static readonly DECRYPT_KEY_2_SRC = "PolyvLiveEncrypt";
6
- static createSign(map: Map<string, Object | undefined>, key?: string): string;
7
- static decryptDataSync(data: string): string;
8
- static concatParams(map: Map<string, Object | undefined>): string;
6
+ static createSign(d16: Map<string, Object | undefined>, e16?: string): string;
7
+ static decryptDataSync(b16: string): string;
8
+ static concatParams(x15: Map<string, Object | undefined>): string;
9
9
  }
@@ -1,30 +1,30 @@
1
1
  import buffer from "@ohos.buffer";
2
2
  import { CryptoJS } from '@ohos/crypto-js';
3
3
  export class PLVRequestSetting {
4
- static createSign(map, key) {
5
- const j7 = key + PLVRequestSetting.concatParams(map) + key;
6
- const k7 = CryptoJS.MD5(j7).toString().toUpperCase();
7
- return k7;
4
+ static createSign(d16, e16) {
5
+ const f16 = e16 + PLVRequestSetting.concatParams(d16) + e16;
6
+ const g16 = CryptoJS.MD5(f16).toString().toUpperCase();
7
+ return g16;
8
8
  }
9
- static decryptDataSync(data) {
10
- const i7 = CryptoJS.AES.decrypt(buffer.from(data, 'base64').toString('hex'), CryptoJS.enc.Utf8.parse(PLVRequestSetting.DECRYPT_KEY_1_SRC), {
9
+ static decryptDataSync(b16) {
10
+ const c16 = CryptoJS.AES.decrypt(buffer.from(b16, 'base64').toString('hex'), CryptoJS.enc.Utf8.parse(PLVRequestSetting.DECRYPT_KEY_1_SRC), {
11
11
  format: CryptoJS.format.Hex,
12
12
  iv: CryptoJS.enc.Utf8.parse(PLVRequestSetting.DECRYPT_KEY_2_SRC),
13
13
  mode: CryptoJS.mode.CBC,
14
14
  padding: CryptoJS.pad.Pkcs7
15
15
  }).toString(CryptoJS.enc.Utf8);
16
- return i7;
16
+ return c16;
17
17
  }
18
- static concatParams(map) {
19
- const h7 = Array.from(map.keys()).sort();
20
- const builder = [];
21
- for (const key of h7) {
22
- if (!key || !map.get(key)) {
18
+ static concatParams(x15) {
19
+ const y15 = Array.from(x15.keys()).sort();
20
+ const z15 = [];
21
+ for (const a16 of y15) {
22
+ if (!a16 || !x15.get(a16)) {
23
23
  continue;
24
24
  }
25
- builder.push(key + map.get(key));
25
+ z15.push(a16 + x15.get(a16));
26
26
  }
27
- return builder.join('');
27
+ return z15.join('');
28
28
  }
29
29
  }
30
30
  PLVRequestSetting.KEY_1 = 'polyv_sdk_api_innor';
@@ -5,40 +5,40 @@ export declare class PLVSocketIO {
5
5
  protected onSocketIOStatusListener?: PLVCallback<PLVSocketIOStatus, void>;
6
6
  protected isTokenExpired: boolean;
7
7
  private set_open_listener;
8
- protected set_fail_listener(h8: () => void): void;
9
- protected set_reconnecting_listener(g8: () => void): void;
8
+ protected set_fail_listener(r17: () => void): void;
9
+ protected set_reconnecting_listener(q17: () => void): void;
10
10
  private set_reconnect_listener;
11
- protected set_close_listener(e8: (reason: string) => void): void;
12
- protected set_socket_open_listener(d8: (nsp: string) => void): void;
13
- protected set_socket_close_listener(c8: (nsp: string) => void): void;
14
- protected connect(uri: string): void;
15
- protected connectWithQuery(uri: string, query: string, b8: string): void;
11
+ protected set_close_listener(o17: (reason: string) => void): void;
12
+ protected set_socket_open_listener(n17: (nsp: string) => void): void;
13
+ protected set_socket_close_listener(m17: (nsp: string) => void): void;
14
+ protected connect(l17: string): void;
15
+ protected connectWithQuery(i17: string, j17: string, k17: string): void;
16
16
  connected(): boolean;
17
- disconnect(a8?: boolean): void;
18
- destroy(z7?: boolean): void;
17
+ disconnect(h17?: boolean): void;
18
+ destroy(g17?: boolean): void;
19
19
  protected clear_con_listeners(): void;
20
20
  protected clear_socket_listeners(): void;
21
- protected set_reconnect_attempts(y7: number): void;
22
- protected set_reconnect_delay(x7: number): void;
23
- protected set_reconnect_delay_max(w7: number): void;
21
+ protected set_reconnect_attempts(f17: number): void;
22
+ protected set_reconnect_delay(e17: number): void;
23
+ protected set_reconnect_delay_max(d17: number): void;
24
24
  protected set_logs_default(): void;
25
25
  protected set_logs_quiet(): void;
26
26
  protected set_logs_verbose(): void;
27
27
  private close;
28
28
  private sync_close;
29
- protected set_proxy_basic_auth(uri: string, username: string, password: string): void;
29
+ protected set_proxy_basic_auth(a17: string, b17: string, c17: string): void;
30
30
  private opened;
31
31
  protected get_sessionid(): string;
32
- protected set_nsp(v7: string): void;
33
- protected on(t7: string, u7: (event_json: string) => void): void;
34
- protected once(r7: string, s7: (event_json: string) => void): void;
35
- protected off(q7: string): void;
32
+ protected set_nsp(z16: string): void;
33
+ protected on(w16: string, x16: (event_json: string) => void): void;
34
+ protected once(u16: string, v16: (event_json: string) => void): void;
35
+ protected off(t16: string): void;
36
36
  protected off_all(): void;
37
37
  private socket_close;
38
- protected on_error(p7: (message: string) => void): void;
38
+ protected on_error(s16: (message: string) => void): void;
39
39
  protected off_error(): void;
40
- protected emitSkipCheck(name: string, message: ESObject, o7?: (emit_callback_json: string) => void): void;
41
- emit(name: string, message: ESObject, n7?: (emit_callback_json: string) => void): boolean;
40
+ protected emitSkipCheck(o16: string, p16: ESObject, q16?: (emit_callback_json: string) => void): void;
41
+ emit(k16: string, l16: ESObject, m16?: (emit_callback_json: string) => void): boolean;
42
42
  private replaceJson;
43
43
  }
44
44
  export declare enum PLVSocketIOStatus {
@@ -8,31 +8,31 @@ export class PLVSocketIO {
8
8
  this.socketIOStatus = PLVSocketIOStatus.IDLE;
9
9
  this.isTokenExpired = false;
10
10
  }
11
- set_open_listener(i8) {
12
- this.client.set_open_listener(i8);
11
+ set_open_listener(s17) {
12
+ this.client.set_open_listener(s17);
13
13
  }
14
- set_fail_listener(h8) {
15
- this.client.set_fail_listener(h8);
14
+ set_fail_listener(r17) {
15
+ this.client.set_fail_listener(r17);
16
16
  }
17
- set_reconnecting_listener(g8) {
18
- this.client.set_reconnecting_listener(g8);
17
+ set_reconnecting_listener(q17) {
18
+ this.client.set_reconnecting_listener(q17);
19
19
  }
20
- set_reconnect_listener(f8) {
21
- this.client.set_reconnect_listener(f8);
20
+ set_reconnect_listener(p17) {
21
+ this.client.set_reconnect_listener(p17);
22
22
  }
23
- set_close_listener(e8) {
24
- this.client.set_close_listener(e8);
23
+ set_close_listener(o17) {
24
+ this.client.set_close_listener(o17);
25
25
  }
26
- set_socket_open_listener(d8) {
27
- this.client.set_socket_open_listener(d8);
26
+ set_socket_open_listener(n17) {
27
+ this.client.set_socket_open_listener(n17);
28
28
  }
29
- set_socket_close_listener(c8) {
30
- this.client.set_socket_close_listener(c8);
29
+ set_socket_close_listener(m17) {
30
+ this.client.set_socket_close_listener(m17);
31
31
  }
32
- connect(uri) {
33
- this.connectWithQuery(uri, '', '');
32
+ connect(l17) {
33
+ this.connectWithQuery(l17, '', '');
34
34
  }
35
- connectWithQuery(uri, query, b8) {
35
+ connectWithQuery(i17, j17, k17) {
36
36
  this.isTokenExpired = false;
37
37
  if (this.socketIOStatus == PLVSocketIOStatus.IDLE || this.socketIOStatus == PLVSocketIOStatus.SOCKET_CLOSE) {
38
38
  this.socketIOStatus = PLVSocketIOStatus.CONNECT;
@@ -65,19 +65,19 @@ export class PLVSocketIO {
65
65
  this.set_close_listener(() => {
66
66
  PLVLogger.info(TAG, 'call close');
67
67
  });
68
- this.client.connectWithQuery(uri, query, b8);
68
+ this.client.connectWithQuery(i17, j17, k17);
69
69
  }
70
70
  connected() {
71
71
  return this.opened() && this.socketIOStatus != PLVSocketIOStatus.SOCKET_CLOSE;
72
72
  }
73
- disconnect(a8) {
74
- if (this.socketIOStatus != PLVSocketIOStatus.SOCKET_CLOSE && !a8) {
73
+ disconnect(h17) {
74
+ if (this.socketIOStatus != PLVSocketIOStatus.SOCKET_CLOSE && !h17) {
75
75
  this.socket_close();
76
76
  }
77
77
  this.close();
78
78
  }
79
- destroy(z7) {
80
- this.disconnect(z7);
79
+ destroy(g17) {
80
+ this.disconnect(g17);
81
81
  this.clear_con_listeners();
82
82
  this.clear_socket_listeners();
83
83
  }
@@ -87,14 +87,14 @@ export class PLVSocketIO {
87
87
  clear_socket_listeners() {
88
88
  this.client.clear_socket_listeners();
89
89
  }
90
- set_reconnect_attempts(y7) {
91
- this.client.set_reconnect_attempts(y7);
90
+ set_reconnect_attempts(f17) {
91
+ this.client.set_reconnect_attempts(f17);
92
92
  }
93
- set_reconnect_delay(x7) {
94
- this.client.set_reconnect_delay(x7);
93
+ set_reconnect_delay(e17) {
94
+ this.client.set_reconnect_delay(e17);
95
95
  }
96
- set_reconnect_delay_max(w7) {
97
- this.client.set_reconnect_delay_max(w7);
96
+ set_reconnect_delay_max(d17) {
97
+ this.client.set_reconnect_delay_max(d17);
98
98
  }
99
99
  set_logs_default() {
100
100
  this.client.set_logs_default();
@@ -111,8 +111,8 @@ export class PLVSocketIO {
111
111
  sync_close() {
112
112
  this.client.sync_close();
113
113
  }
114
- set_proxy_basic_auth(uri, username, password) {
115
- this.client.set_proxy_basic_auth(uri, username, password);
114
+ set_proxy_basic_auth(a17, b17, c17) {
115
+ this.client.set_proxy_basic_auth(a17, b17, c17);
116
116
  }
117
117
  opened() {
118
118
  return this.client.opened();
@@ -120,19 +120,19 @@ export class PLVSocketIO {
120
120
  get_sessionid() {
121
121
  return this.client.get_sessionid();
122
122
  }
123
- set_nsp(v7) {
124
- this.client.set_nsp(v7);
123
+ set_nsp(z16) {
124
+ this.client.set_nsp(z16);
125
125
  }
126
- on(t7, u7) {
127
- this.client.on(t7, (json) => {
128
- u7(this.replaceJson(json));
126
+ on(w16, x16) {
127
+ this.client.on(w16, (y16) => {
128
+ x16(this.replaceJson(y16));
129
129
  });
130
130
  }
131
- once(r7, s7) {
132
- this.client.once(r7, s7);
131
+ once(u16, v16) {
132
+ this.client.once(u16, v16);
133
133
  }
134
- off(q7) {
135
- this.client.off(q7);
134
+ off(t16) {
135
+ this.client.off(t16);
136
136
  }
137
137
  off_all() {
138
138
  this.client.off_all();
@@ -140,42 +140,42 @@ export class PLVSocketIO {
140
140
  socket_close() {
141
141
  this.client.socket_close();
142
142
  }
143
- on_error(p7) {
144
- this.client.on_error(p7);
143
+ on_error(s16) {
144
+ this.client.on_error(s16);
145
145
  }
146
146
  off_error() {
147
147
  this.client.off_error();
148
148
  }
149
- emitSkipCheck(name, message, o7) {
150
- this.client.emit(name, message, (json) => {
151
- o7?.(this.replaceJson(json));
149
+ emitSkipCheck(o16, p16, q16) {
150
+ this.client.emit(o16, p16, (r16) => {
151
+ q16?.(this.replaceJson(r16));
152
152
  });
153
153
  }
154
- emit(name, message, n7) {
155
- PLVLogger.info(TAG, `emit: ${message}, name: ${name}, connected: ${this.connected()}`);
154
+ emit(k16, l16, m16) {
155
+ PLVLogger.info(TAG, `emit: ${l16}, name: ${k16}, connected: ${this.connected()}`);
156
156
  if (this.connected()) {
157
- this.client.emit(name, message, (json) => {
158
- n7?.(this.replaceJson(json));
157
+ this.client.emit(k16, l16, (n16) => {
158
+ m16?.(this.replaceJson(n16));
159
159
  });
160
160
  return true;
161
161
  }
162
162
  return false;
163
163
  }
164
- replaceJson(json) {
165
- json = json.replace(/^"{/, '{').replace(/}"$/, '}').replace(/"{/, '{');
166
- const m7 = json.lastIndexOf('}"');
167
- if (m7 !== -1) {
168
- json = json.substring(0, m7) + '}' + json.substring(m7 + 2);
164
+ replaceJson(i16) {
165
+ i16 = i16.replace(/^"{/, '{').replace(/}"$/, '}').replace(/"{/, '{');
166
+ const j16 = i16.lastIndexOf('}"');
167
+ if (j16 !== -1) {
168
+ i16 = i16.substring(0, j16) + '}' + i16.substring(j16 + 2);
169
169
  }
170
- return json;
170
+ return i16;
171
171
  }
172
172
  }
173
173
  export var PLVSocketIOStatus;
174
- (function (l7) {
175
- l7[l7["IDLE"] = 0] = "IDLE";
176
- l7[l7["CONNECT"] = 1] = "CONNECT";
177
- l7[l7["OPEN"] = 2] = "OPEN";
178
- l7[l7["RECONNECT"] = 3] = "RECONNECT";
179
- l7[l7["RECONNECT_SUCCESS"] = 4] = "RECONNECT_SUCCESS";
180
- l7[l7["SOCKET_CLOSE"] = 5] = "SOCKET_CLOSE";
174
+ (function (h16) {
175
+ h16[h16["IDLE"] = 0] = "IDLE";
176
+ h16[h16["CONNECT"] = 1] = "CONNECT";
177
+ h16[h16["OPEN"] = 2] = "OPEN";
178
+ h16[h16["RECONNECT"] = 3] = "RECONNECT";
179
+ h16[h16["RECONNECT_SUCCESS"] = 4] = "RECONNECT_SUCCESS";
180
+ h16[h16["SOCKET_CLOSE"] = 5] = "SOCKET_CLOSE";
181
181
  })(PLVSocketIOStatus || (PLVSocketIOStatus = {}));
@@ -1,46 +1,45 @@
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 PLVFailureLayout extends ViewPU {
7
- constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
8
- super(parent, __localStorage, elmtId, extraInfo);
9
- if (typeof paramsLambda === "function") {
10
- this.paramsGenerator_ = paramsLambda;
6
+ constructor(i18, j18, k18, l18 = -1, m18 = undefined, n18) {
7
+ super(i18, k18, l18, n18);
8
+ if (typeof m18 === "function") {
9
+ this.paramsGenerator_ = m18;
11
10
  }
12
11
  this.handleReload = undefined;
13
- this.setInitiallyProvidedValue(params);
12
+ this.setInitiallyProvidedValue(j18);
14
13
  this.finalizeConstruction();
15
14
  }
16
- setInitiallyProvidedValue(params) {
17
- if (params.handleReload !== undefined) {
18
- this.handleReload = params.handleReload;
15
+ setInitiallyProvidedValue(h18) {
16
+ if (h18.handleReload !== undefined) {
17
+ this.handleReload = h18.handleReload;
19
18
  }
20
19
  }
21
- updateStateVars(params) {
20
+ updateStateVars(g18) {
22
21
  }
23
- purgeVariableDependenciesOnElmtId(rmElmtId) {
22
+ purgeVariableDependenciesOnElmtId(f18) {
24
23
  }
25
24
  aboutToBeDeleted() {
26
25
  SubscriberManager.Get().delete(this.id__());
27
26
  this.aboutToBeDeletedInternal();
28
27
  }
29
28
  initialRender() {
30
- this.observeComponentCreation2((elmtId, isInitialRender) => {
29
+ this.observeComponentCreation2((d18, e18) => {
31
30
  Row.create();
32
31
  Row.justifyContent(FlexAlign.Center);
33
32
  Row.layoutWeight(1);
34
33
  }, Row);
35
- this.observeComponentCreation2((elmtId, isInitialRender) => {
34
+ this.observeComponentCreation2((b18, c18) => {
36
35
  Column.create();
37
36
  }, Column);
38
- this.observeComponentCreation2((elmtId, isInitialRender) => {
37
+ this.observeComponentCreation2((z17, a18) => {
39
38
  Image.create({ "id": -1, "type": 20000, params: ["app.media.plv_web_ic_failure"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
40
39
  Image.width({ "id": -1, "type": 10002, params: ["app.float.plv_web_failure_img_size"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
41
40
  Image.height({ "id": -1, "type": 10002, params: ["app.float.plv_web_failure_img_size"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
42
41
  }, Image);
43
- this.observeComponentCreation2((elmtId, isInitialRender) => {
42
+ this.observeComponentCreation2((x17, y17) => {
44
43
  Text.create({ "id": -1, "type": 10003, params: ["app.string.plv_web_load_failed"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
45
44
  Text.fontColor({ "id": -1, "type": 10001, params: ["app.color.plv_web_reload_title_color"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
46
45
  Text.fontFamily(PLVCommonConstants.HARMONY_HEI_TI_FONT_FAMILY);
@@ -48,7 +47,7 @@ export class PLVFailureLayout extends ViewPU {
48
47
  Text.margin({ top: { "id": -1, "type": 10002, params: ["app.float.plv_web_sm_padding_margin"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" } });
49
48
  }, Text);
50
49
  Text.pop();
51
- this.observeComponentCreation2((elmtId, isInitialRender) => {
50
+ this.observeComponentCreation2((v17, w17) => {
52
51
  Row.create();
53
52
  Row.height({ "id": -1, "type": 10002, params: ["app.float.plv_web_reload_btn_height"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
54
53
  Row.width({ "id": -1, "type": 10002, params: ["app.float.plv_web_reload_btn_width"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
@@ -58,7 +57,7 @@ export class PLVFailureLayout extends ViewPU {
58
57
  Row.borderRadius({ "id": -1, "type": 10002, params: ["app.float.plv_web_large_border_radius"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
59
58
  Row.onClick(() => this.handleReload?.());
60
59
  }, Row);
61
- this.observeComponentCreation2((elmtId, isInitialRender) => {
60
+ this.observeComponentCreation2((t17, u17) => {
62
61
  Text.create({ "id": -1, "type": 10003, params: ["app.string.plv_web_reload"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
63
62
  Text.fontColor({ "id": -1, "type": 10001, params: ["app.color.plv_web_main_red_color"], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
64
63
  Text.fontFamily(PLVCommonConstants.HARMONY_HEI_TI_FONT_FAMILY);