@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.
Files changed (60) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/ResourceTable.txt +17 -17
  3. package/oh-package.json5 +1 -1
  4. package/package.json +1 -1
  5. package/src/main/ets/common/PLVBasicDataSource.d.ets +19 -19
  6. package/src/main/ets/common/PLVBasicDataSource.js +75 -75
  7. package/src/main/ets/common/PLVCallback.d.ets +20 -19
  8. package/src/main/ets/common/PLVCallback.js +78 -78
  9. package/src/main/ets/common/PLVCommonEnums.js +16 -16
  10. package/src/main/ets/common/PLVDeviceUtils.d.ets +4 -4
  11. package/src/main/ets/common/PLVDeviceUtils.js +9 -9
  12. package/src/main/ets/common/PLVHashMap.d.ets +2 -2
  13. package/src/main/ets/common/PLVHashMap.js +2 -2
  14. package/src/main/ets/common/PLVJSONUtils.d.ets +13 -13
  15. package/src/main/ets/common/PLVJSONUtils.js +46 -46
  16. package/src/main/ets/common/PLVNetUtils.d.ets +4 -4
  17. package/src/main/ets/common/PLVNetUtils.js +24 -24
  18. package/src/main/ets/common/PLVPreferencesUtils.d.ets +9 -9
  19. package/src/main/ets/common/PLVPreferencesUtils.js +16 -16
  20. package/src/main/ets/common/PLVScheduledTask.d.ets +1 -1
  21. package/src/main/ets/common/PLVScheduledTask.js +9 -9
  22. package/src/main/ets/common/PLVSimpleBuffer.d.ets +3 -3
  23. package/src/main/ets/common/PLVSimpleBuffer.js +8 -8
  24. package/src/main/ets/common/PLVSparseArray.d.ets +6 -6
  25. package/src/main/ets/common/PLVSparseArray.js +21 -21
  26. package/src/main/ets/common/PLVTextUtils.d.ets +8 -8
  27. package/src/main/ets/common/PLVTextUtils.js +44 -44
  28. package/src/main/ets/common/PLVTimeUtils.d.ets +1 -1
  29. package/src/main/ets/common/PLVTimeUtils.js +8 -8
  30. package/src/main/ets/common/PLVToastUtils.d.ets +4 -4
  31. package/src/main/ets/common/PLVToastUtils.js +7 -7
  32. package/src/main/ets/common/PLVUACreator.d.ets +1 -1
  33. package/src/main/ets/common/PLVUACreator.js +6 -6
  34. package/src/main/ets/common/PLVUtils.d.ets +25 -24
  35. package/src/main/ets/common/PLVUtils.js +141 -141
  36. package/src/main/ets/common/PLVWebUtils.d.ets +4 -4
  37. package/src/main/ets/common/PLVWebUtils.js +46 -47
  38. package/src/main/ets/common/ui/PLVNodeController.d.ets +11 -9
  39. package/src/main/ets/common/ui/PLVNodeController.js +48 -47
  40. package/src/main/ets/modules/log/PLVLogger.d.ets +11 -11
  41. package/src/main/ets/modules/log/PLVLogger.js +36 -36
  42. package/src/main/ets/modules/log/PLVXLogFilePrinter.d.ets +2 -2
  43. package/src/main/ets/modules/log/PLVXLogFilePrinter.js +14 -12
  44. package/src/main/ets/modules/net/PLVHttpData.d.ets +1 -1
  45. package/src/main/ets/modules/net/PLVHttpData.js +3 -3
  46. package/src/main/ets/modules/net/PLVHttpError.d.ets +2 -2
  47. package/src/main/ets/modules/net/PLVHttpError.js +5 -5
  48. package/src/main/ets/modules/net/PLVHttpRequest.d.ets +10 -9
  49. package/src/main/ets/modules/net/PLVHttpRequest.js +89 -88
  50. package/src/main/ets/modules/net/PLVRequestSetting.d.ets +3 -3
  51. package/src/main/ets/modules/net/PLVRequestSetting.js +14 -14
  52. package/src/main/ets/modules/socket/PLVSocketIO.d.ets +20 -20
  53. package/src/main/ets/modules/socket/PLVSocketIO.js +61 -61
  54. package/src/main/ets/modules/web/PLVFailureLayout.js +17 -18
  55. package/src/main/ets/modules/web/PLVLoadingLayout.js +12 -13
  56. package/src/main/ets/modules/web/PLVNewWindowLayout.js +17 -18
  57. package/src/main/ets/modules/web/PLVSimpleWeb.js +75 -79
  58. package/src/main/ets/modules/web/PLVWebController.d.ets +39 -39
  59. package/src/main/ets/modules/web/PLVWebController.js +106 -106
  60. package/src/main/module.json +1 -1
@@ -1,4 +1,4 @@
1
- import { preferences } from '@kit.ArkData';
1
+ import preferences from "@ohos.data.preferences";
2
2
  export declare class PLVPreferencesUtils {
3
3
  private constructor();
4
4
  /**
@@ -7,7 +7,7 @@ export declare class PLVPreferencesUtils {
7
7
  * @param value
8
8
  * @param preferenceName
9
9
  */
10
- static put(key: string, value: preferences.ValueType, u3?: string): Promise<void>;
10
+ static put(z5: string, a6: preferences.ValueType, b6?: string): Promise<void>;
11
11
  /**
12
12
  * 获取缓存值
13
13
  * @param key
@@ -15,44 +15,44 @@ export declare class PLVPreferencesUtils {
15
15
  * @param preferenceName
16
16
  * @returns
17
17
  */
18
- static get(key: string, defValue: preferences.ValueType, t3?: string): Promise<preferences.ValueType>;
18
+ static get(w5: string, x5: preferences.ValueType, y5?: string): Promise<preferences.ValueType>;
19
19
  /**
20
20
  * 获取string类型的缓存值
21
21
  * @param key
22
22
  * @returns
23
23
  */
24
- static getString(key: string, s3?: string): Promise<string>;
24
+ static getString(u5: string, v5?: string): Promise<string>;
25
25
  /**
26
26
  * 获取number类型的缓存值
27
27
  * @param key
28
28
  * @returns
29
29
  */
30
- static getNumber(key: string, r3?: string, defaultValue?: number): Promise<number>;
30
+ static getNumber(r5: string, s5?: string, t5?: number): Promise<number>;
31
31
  /**
32
32
  * 获取boolean类型的缓存值
33
33
  * @param key
34
34
  * @param preferenceName
35
35
  * @returns
36
36
  */
37
- static getBoolean(key: string, q3?: string): Promise<boolean>;
37
+ static getBoolean(p5: string, q5?: string): Promise<boolean>;
38
38
  /**
39
39
  * 检查缓存的Preferences实例中是否包含名为给定Key的存储键值对
40
40
  * @param key
41
41
  * @param preferenceName
42
42
  * @returns
43
43
  */
44
- static has(key: string, p3?: string): Promise<boolean>;
44
+ static has(n5: string, o5?: string): Promise<boolean>;
45
45
  /**
46
46
  * 删除缓存值
47
47
  * @param key
48
48
  * @param preferenceName
49
49
  * @returns
50
50
  */
51
- static delete(key: string, n3?: string): Promise<void>;
51
+ static delete(l5: string, m5?: string): Promise<void>;
52
52
  /**
53
53
  * 清空缓存
54
54
  * @param preferenceName
55
55
  * @returns
56
56
  */
57
- static clear(m3?: string): Promise<void>;
57
+ static clear(k5?: string): Promise<void>;
58
58
  }
@@ -3,28 +3,28 @@ const defaultPreferenceName = "PLV_SP_HARMONY_UTILS_PREFERENCES";
3
3
  export class PLVPreferencesUtils {
4
4
  constructor() {
5
5
  }
6
- static async put(key, value, u3 = defaultPreferenceName) {
7
- await PreferencesUtil.put(key, value, u3);
6
+ static async put(z5, a6, b6 = defaultPreferenceName) {
7
+ await PreferencesUtil.put(z5, a6, b6);
8
8
  }
9
- static async get(key, defValue, t3 = defaultPreferenceName) {
10
- return PreferencesUtil.get(key, defValue, t3);
9
+ static async get(w5, x5, y5 = defaultPreferenceName) {
10
+ return PreferencesUtil.get(w5, x5, y5);
11
11
  }
12
- static async getString(key, s3 = defaultPreferenceName) {
13
- return (await PreferencesUtil.get(key, "", s3));
12
+ static async getString(u5, v5 = defaultPreferenceName) {
13
+ return (await PreferencesUtil.get(u5, "", v5));
14
14
  }
15
- static async getNumber(key, r3 = defaultPreferenceName, defaultValue = 0) {
16
- return (await PreferencesUtil.get(key, defaultValue, r3));
15
+ static async getNumber(r5, s5 = defaultPreferenceName, t5 = 0) {
16
+ return (await PreferencesUtil.get(r5, t5, s5));
17
17
  }
18
- static async getBoolean(key, q3 = defaultPreferenceName) {
19
- return (await PreferencesUtil.get(key, false, q3));
18
+ static async getBoolean(p5, q5 = defaultPreferenceName) {
19
+ return (await PreferencesUtil.get(p5, false, q5));
20
20
  }
21
- static async has(key, p3 = defaultPreferenceName) {
22
- return PreferencesUtil.has(key, p3);
21
+ static async has(n5, o5 = defaultPreferenceName) {
22
+ return PreferencesUtil.has(n5, o5);
23
23
  }
24
- static async delete(key, n3 = defaultPreferenceName) {
25
- return PreferencesUtil.delete(key, n3);
24
+ static async delete(l5, m5 = defaultPreferenceName) {
25
+ return PreferencesUtil.delete(l5, m5);
26
26
  }
27
- static async clear(m3 = defaultPreferenceName) {
28
- return PreferencesUtil.clear(m3);
27
+ static async clear(k5 = defaultPreferenceName) {
28
+ return PreferencesUtil.clear(k5);
29
29
  }
30
30
  }
@@ -5,7 +5,7 @@ export declare class PLVScheduledTask {
5
5
  timerId?: number;
6
6
  nextExecutionTime: number;
7
7
  isRunning: boolean;
8
- constructor(callback: Function, delay: number, period?: number);
8
+ constructor(f6: Function, g6: number, h6?: number);
9
9
  start(): void;
10
10
  scheduleNextExecution(): Promise<void>;
11
11
  cancel(): void;
@@ -1,10 +1,10 @@
1
1
  import PLVLogger from '../modules/log/PLVLogger';
2
2
  const TAG = '[PLVScheduledTask]';
3
3
  export class PLVScheduledTask {
4
- constructor(callback, delay, period = delay) {
5
- this.callback = callback;
6
- this.delay = delay;
7
- this.period = period;
4
+ constructor(f6, g6, h6 = g6) {
5
+ this.callback = f6;
6
+ this.delay = g6;
7
+ this.period = h6;
8
8
  this.timerId = undefined;
9
9
  this.nextExecutionTime = 0;
10
10
  this.isRunning = false;
@@ -21,18 +21,18 @@ export class PLVScheduledTask {
21
21
  if (!this.isRunning) {
22
22
  return;
23
23
  }
24
- const now = Date.now();
25
- const v3 = Math.max(0, this.nextExecutionTime - now);
24
+ const c6 = Date.now();
25
+ const d6 = Math.max(0, this.nextExecutionTime - c6);
26
26
  this.timerId = setTimeout(async () => {
27
27
  try {
28
28
  await this.callback();
29
29
  }
30
- catch (error) {
31
- PLVLogger.printError(TAG, 'scheduleNextExecution error', error);
30
+ catch (e6) {
31
+ PLVLogger.printError(TAG, 'scheduleNextExecution error', e6);
32
32
  }
33
33
  this.nextExecutionTime = Date.now() + this.period;
34
34
  this.scheduleNextExecution();
35
- }, v3);
35
+ }, d6);
36
36
  }
37
37
  cancel() {
38
38
  if (!this.isRunning) {
@@ -4,8 +4,8 @@ export declare class PLVSimpleBuffer<T> {
4
4
  private intervalId?;
5
5
  private timespan;
6
6
  private isRelease;
7
- constructor(y3?: number);
8
- observe(callback?: PLVCallback<T[]>): void;
7
+ constructor(k6?: number);
8
+ observe(j6?: PLVCallback<T[]>): void;
9
9
  release(): void;
10
- push(x3: T): void;
10
+ push(i6: T): void;
11
11
  }
@@ -1,16 +1,16 @@
1
- const w3 = 500;
1
+ const SOCKET_EVENT_BUFFER_TIMESPAN = 500;
2
2
  export class PLVSimpleBuffer {
3
- constructor(y3 = w3) {
3
+ constructor(k6 = SOCKET_EVENT_BUFFER_TIMESPAN) {
4
4
  this.buffer = [];
5
- this.timespan = w3;
5
+ this.timespan = SOCKET_EVENT_BUFFER_TIMESPAN;
6
6
  this.isRelease = false;
7
- this.timespan = y3;
7
+ this.timespan = k6;
8
8
  }
9
- observe(callback) {
9
+ observe(j6) {
10
10
  if (this.intervalId == undefined) {
11
11
  this.intervalId = setInterval(() => {
12
12
  if (this.buffer.length > 0) {
13
- callback?.(this.buffer);
13
+ j6?.(this.buffer);
14
14
  this.buffer.length = 0;
15
15
  }
16
16
  }, this.timespan);
@@ -21,10 +21,10 @@ export class PLVSimpleBuffer {
21
21
  clearInterval(this.intervalId);
22
22
  this.buffer.length = 0;
23
23
  }
24
- push(x3) {
24
+ push(i6) {
25
25
  if (this.isRelease) {
26
26
  return;
27
27
  }
28
- this.buffer.push(x3);
28
+ this.buffer.push(i6);
29
29
  }
30
30
  }
@@ -1,10 +1,10 @@
1
1
  export declare class PLVSparseArray<V> {
2
2
  private entries;
3
- set(key: number, value: V): void;
4
- get(key: number): V | undefined;
5
- delete(key: number): void;
3
+ set(y6: number, z6: V): void;
4
+ get(v6: number): V | undefined;
5
+ delete(t6: number): void;
6
6
  size(): number;
7
- forEach(callback: (key: number, value: V) => void): void;
8
- forEachReverse(callback: (key: number, value: V) => void): void;
9
- someReverse(callback: (key: number, value: V) => boolean): boolean;
7
+ forEach(r6: (key: number, value: V) => void): void;
8
+ forEachReverse(o6: (key: number, value: V) => void): void;
9
+ someReverse(l6: (key: number, value: V) => boolean): boolean;
10
10
  }
@@ -2,40 +2,40 @@ export class PLVSparseArray {
2
2
  constructor() {
3
3
  this.entries = [];
4
4
  }
5
- set(key, value) {
6
- const h4 = this.entries.findIndex((i4) => i4[0] >= key);
7
- if (h4 >= 0 && this.entries[h4][0] === key) {
8
- this.entries[h4][1] = value;
5
+ set(y6, z6) {
6
+ const a7 = this.entries.findIndex((b7) => b7[0] >= y6);
7
+ if (a7 >= 0 && this.entries[a7][0] === y6) {
8
+ this.entries[a7][1] = z6;
9
9
  }
10
10
  else {
11
- this.entries.splice(h4 >= 0 ? h4 : this.entries.length, 0, [key, value]);
11
+ this.entries.splice(a7 >= 0 ? a7 : this.entries.length, 0, [y6, z6]);
12
12
  }
13
13
  }
14
- get(key) {
15
- const f4 = this.entries.find((g4) => g4[0] === key);
16
- return f4 ? f4[1] : undefined;
14
+ get(v6) {
15
+ const w6 = this.entries.find((x6) => x6[0] === v6);
16
+ return w6 ? w6[1] : undefined;
17
17
  }
18
- delete(key) {
19
- this.entries = this.entries.filter((e4) => e4[0] !== key);
18
+ delete(t6) {
19
+ this.entries = this.entries.filter((u6) => u6[0] !== t6);
20
20
  }
21
21
  size() {
22
22
  return this.entries.length;
23
23
  }
24
- forEach(callback) {
25
- for (const d4 of this.entries) {
26
- callback(d4[0], d4[1]);
24
+ forEach(r6) {
25
+ for (const s6 of this.entries) {
26
+ r6(s6[0], s6[1]);
27
27
  }
28
28
  }
29
- forEachReverse(callback) {
30
- for (let b4 = this.entries.length - 1; b4 >= 0; b4--) {
31
- const c4 = this.entries[b4];
32
- callback(c4[0], c4[1]);
29
+ forEachReverse(o6) {
30
+ for (let p6 = this.entries.length - 1; p6 >= 0; p6--) {
31
+ const q6 = this.entries[p6];
32
+ o6(q6[0], q6[1]);
33
33
  }
34
34
  }
35
- someReverse(callback) {
36
- for (let z3 = this.entries.length - 1; z3 >= 0; z3--) {
37
- const a4 = this.entries[z3];
38
- if (callback(a4[0], a4[1])) {
35
+ someReverse(l6) {
36
+ for (let m6 = this.entries.length - 1; m6 >= 0; m6--) {
37
+ const n6 = this.entries[m6];
38
+ if (l6(n6[0], n6[1])) {
39
39
  return true;
40
40
  }
41
41
  }
@@ -1,10 +1,10 @@
1
1
  export declare class PLVTextUtils {
2
- static checkValidDataLength(...str: string[]): boolean;
3
- static parseString(input?: string): string[];
4
- static convertSpecialString(input?: string): string;
5
- static toString(num?: number): string | undefined;
6
- static toWString(data?: number): string | undefined;
7
- static toKString(data?: number): string | undefined;
8
- static fixPic(k4?: string): string;
9
- static isNumberZero(number?: string): boolean;
2
+ static checkValidDataLength(...r7: string[]): boolean;
3
+ static parseString(j7?: string): string[];
4
+ static convertSpecialString(i7?: string): string;
5
+ static toString(h7?: number): string | undefined;
6
+ static toWString(g7?: number): string | undefined;
7
+ static toKString(f7?: number): string | undefined;
8
+ static fixPic(e7?: string): string;
9
+ static isNumberZero(c7?: string): boolean;
10
10
  }
@@ -1,37 +1,37 @@
1
1
  export class PLVTextUtils {
2
- static checkValidDataLength(...str) {
3
- for (const s of str) {
4
- if (s.length == 0) {
2
+ static checkValidDataLength(...r7) {
3
+ for (const s7 of r7) {
4
+ if (s7.length == 0) {
5
5
  return false;
6
6
  }
7
7
  }
8
8
  return true;
9
9
  }
10
- static parseString(input) {
11
- if (!(input = PLVTextUtils.convertSpecialString(input))) {
10
+ static parseString(j7) {
11
+ if (!(j7 = PLVTextUtils.convertSpecialString(j7))) {
12
12
  return undefined;
13
13
  }
14
- const l4 = /\[([^\[\]]{1,5})\]/g;
15
- let match;
16
- let m4 = 0;
17
- const result = [];
18
- while ((match = l4.exec(input)) !== null) {
19
- const o4 = match[0];
20
- if (match.index > m4) {
21
- const p4 = input.slice(m4, match.index);
22
- result.push(p4);
14
+ const k7 = /\[([^\[\]]{1,5})\]/g;
15
+ let l7;
16
+ let m7 = 0;
17
+ const n7 = [];
18
+ while ((l7 = k7.exec(j7)) !== null) {
19
+ const p7 = l7[0];
20
+ if (l7.index > m7) {
21
+ const q7 = j7.slice(m7, l7.index);
22
+ n7.push(q7);
23
23
  }
24
- result.push(o4);
25
- m4 = l4.lastIndex;
24
+ n7.push(p7);
25
+ m7 = k7.lastIndex;
26
26
  }
27
- if (m4 < input.length) {
28
- const n4 = input.slice(m4);
29
- result.push(n4);
27
+ if (m7 < j7.length) {
28
+ const o7 = j7.slice(m7);
29
+ n7.push(o7);
30
30
  }
31
- return result;
31
+ return n7;
32
32
  }
33
- static convertSpecialString(input) {
34
- return input?.replace(/&lt;/g, "<")
33
+ static convertSpecialString(i7) {
34
+ return i7?.replace(/&lt;/g, "<")
35
35
  .replace(/&lt/g, "<")
36
36
  .replace(/&gt;/g, ">")
37
37
  .replace(/&gt/g, ">")
@@ -42,38 +42,38 @@ export class PLVTextUtils {
42
42
  .replace(/&#39;/g, "'")
43
43
  .replace(/&amp;/g, "&");
44
44
  }
45
- static toString(num) {
46
- return (num || num == 0) ? num + '' : undefined;
45
+ static toString(h7) {
46
+ return (h7 || h7 == 0) ? h7 + '' : undefined;
47
47
  }
48
- static toWString(data) {
49
- if (data && data > 10000) {
50
- return (data / 10000).toFixed(1) + 'w';
48
+ static toWString(g7) {
49
+ if (g7 && g7 > 10000) {
50
+ return (g7 / 10000).toFixed(1) + 'w';
51
51
  }
52
- return PLVTextUtils.toString(data);
52
+ return PLVTextUtils.toString(g7);
53
53
  }
54
- static toKString(data) {
55
- if (data && data > 1000) {
56
- return (data / 1000).toFixed(1) + 'k';
54
+ static toKString(f7) {
55
+ if (f7 && f7 > 1000) {
56
+ return (f7 / 1000).toFixed(1) + 'k';
57
57
  }
58
- return PLVTextUtils.toString(data);
58
+ return PLVTextUtils.toString(f7);
59
59
  }
60
- static fixPic(k4) {
61
- if (!k4) {
62
- return k4 || '';
60
+ static fixPic(e7) {
61
+ if (!e7) {
62
+ return e7 || '';
63
63
  }
64
- if (k4.startsWith('//')) {
65
- return `http:${k4}`;
64
+ if (e7.startsWith('//')) {
65
+ return `http:${e7}`;
66
66
  }
67
- else if (k4.startsWith('/')) {
68
- return `http://livestatic.videocc.net${k4}`;
67
+ else if (e7.startsWith('/')) {
68
+ return `http://livestatic.videocc.net${e7}`;
69
69
  }
70
- return k4;
70
+ return e7;
71
71
  }
72
- static isNumberZero(number) {
73
- if (!number) {
72
+ static isNumberZero(c7) {
73
+ if (!c7) {
74
74
  return true;
75
75
  }
76
- const j4 = parseFloat(number);
77
- return j4 === 0;
76
+ const d7 = parseFloat(c7);
77
+ return d7 === 0;
78
78
  }
79
79
  }
@@ -4,5 +4,5 @@ export declare class PLVTimeUtils {
4
4
  * @param millisecond
5
5
  * @param fit 小时是否适配"00"
6
6
  */
7
- static generateTime(q4: number, r4: boolean): string;
7
+ static generateTime(t7: number, u7: boolean): string;
8
8
  }
@@ -1,14 +1,14 @@
1
1
  export class PLVTimeUtils {
2
- static generateTime(q4, r4) {
3
- const s4 = Math.floor(q4 / 1000);
4
- const t4 = s4 % 60;
5
- const u4 = Math.floor((s4 / 60) % 60);
6
- const v4 = Math.floor(s4 / 3600);
7
- if (r4 || v4 > 0) {
8
- return `${v4.toString().padStart(2, '0')}:${u4.toString().padStart(2, '0')}:${t4.toString().padStart(2, '0')}`;
2
+ static generateTime(t7, u7) {
3
+ const v7 = Math.floor(t7 / 1000);
4
+ const w7 = v7 % 60;
5
+ const x7 = Math.floor((v7 / 60) % 60);
6
+ const y7 = Math.floor(v7 / 3600);
7
+ if (u7 || y7 > 0) {
8
+ return `${y7.toString().padStart(2, '0')}:${x7.toString().padStart(2, '0')}:${w7.toString().padStart(2, '0')}`;
9
9
  }
10
10
  else {
11
- return `${u4.toString().padStart(2, '0')}:${t4.toString().padStart(2, '0')}`;
11
+ return `${x7.toString().padStart(2, '0')}:${w7.toString().padStart(2, '0')}`;
12
12
  }
13
13
  }
14
14
  }
@@ -1,7 +1,7 @@
1
1
  export declare class PLVToastUtils {
2
- shortShow(message: string | Resource): void;
3
- longShow(message: string | Resource): void;
2
+ shortShow(c8: string | Resource): void;
3
+ longShow(b8: string | Resource): void;
4
4
  private show;
5
5
  }
6
- declare const u8: PLVToastUtils;
7
- export default u8;
6
+ declare const _default: PLVToastUtils;
7
+ export default _default;
@@ -1,16 +1,16 @@
1
1
  import promptAction from "@ohos.promptAction";
2
2
  import PLVCommonConstants from './PLVCommonConstants';
3
3
  export class PLVToastUtils {
4
- shortShow(message) {
5
- this.show(message, PLVCommonConstants.LENGTH_SHORT);
4
+ shortShow(c8) {
5
+ this.show(c8, PLVCommonConstants.LENGTH_SHORT);
6
6
  }
7
- longShow(message) {
8
- this.show(message, PLVCommonConstants.LENGTH_LONG);
7
+ longShow(b8) {
8
+ this.show(b8, PLVCommonConstants.LENGTH_LONG);
9
9
  }
10
- show(message, duration) {
10
+ show(z7, a8) {
11
11
  promptAction.showToast({
12
- message: message,
13
- duration: duration
12
+ message: z7,
13
+ duration: a8
14
14
  });
15
15
  }
16
16
  }
@@ -1,3 +1,3 @@
1
1
  export declare class PLVUACreator {
2
- static createUA(w4: string, x4?: string): string;
2
+ static createUA(d8: string, e8?: string): string;
3
3
  }
@@ -1,11 +1,11 @@
1
1
  import deviceInfo from '@ohos.deviceInfo';
2
2
  export class PLVUACreator {
3
- static createUA(w4, x4) {
4
- let y4 = w4;
5
- if (x4) {
6
- y4 += `(${x4})`;
3
+ static createUA(d8, e8) {
4
+ let f8 = d8;
5
+ if (e8) {
6
+ f8 += `(${e8})`;
7
7
  }
8
- y4 += ` ohos/${deviceInfo.osFullName} (HarmonyOS ${deviceInfo.osFullName}; ${deviceInfo.brand} ${deviceInfo.productModel};)`;
9
- return y4;
8
+ f8 += ` ohos/${deviceInfo.osFullName} (HarmonyOS ${deviceInfo.osFullName}; ${deviceInfo.brand} ${deviceInfo.productModel};)`;
9
+ return f8;
10
10
  }
11
11
  }
@@ -1,32 +1,33 @@
1
1
  import { PLVAvoidAreaChangeListener, PLVCallback, PLVCallback2, PLVDisposable, PLVMediaQueryListener } from './PLVCallback';
2
- import { common } from '@kit.AbilityKit';
3
- import { mediaquery, window } from '@kit.ArkUI';
2
+ import common from "@ohos.app.ability.common";
3
+ import mediaquery from "@ohos.mediaquery";
4
+ import window from "@ohos.window";
4
5
  import { PLVReject, PLVResolve } from './PLVType';
5
6
  export default class PLVUtils {
6
7
  private static readonly TIMES;
7
8
  private constructor();
8
- static init(context: common.UIAbilityContext, windowStage: window.WindowStage): void;
9
- static getClassTag(tag?: string | Object, d6?: boolean): string | undefined;
10
- static retryWhen<T = void>(when: PLVCallback<void, T>, retry: PLVCallback<void, T>): Promise<Awaited<T>>;
11
- static disposablePromise<T>(promise: Promise<T>, c6?: PLVDisposable): Promise<T>;
12
- static safePromise<T = void>(callback: PLVCallback2<PLVResolve<T>, PLVReject, void>, a6?: PLVDisposable): Promise<T>;
13
- static retryPromise<T>(w5: number, x5: number, promise: Promise<T>, y5?: PLVDisposable): Promise<T>;
14
- static delay(delay?: number): Promise<void>;
15
- static validCallback(callback: string): boolean;
9
+ static init(f11: common.UIAbilityContext, g11: window.WindowStage): void;
10
+ static getClassTag(c11?: string | Object, d11?: boolean): string | undefined;
11
+ static retryWhen<u23 = void>(y10: PLVCallback<void, u23>, z10: PLVCallback<void, u23>): Promise<Awaited<u23>>;
12
+ static disposablePromise<t23>(v10: Promise<t23>, w10?: PLVDisposable): Promise<t23>;
13
+ static safePromise<s23 = void>(p10: PLVCallback2<PLVResolve<s23>, PLVReject, void>, q10?: PLVDisposable): Promise<s23>;
14
+ static retryPromise<r23>(h10: number, i10: number, j10: Promise<r23>, k10?: PLVDisposable): Promise<r23>;
15
+ static delay(f10?: number): Promise<void>;
16
+ static validCallback(e10: string): boolean;
16
17
  static getPid(): string;
17
18
  static getDeviceId(): string;
18
- static undefinedToValue<T>(data: T, callback: PLVCallback<T, void>, delay?: number): undefined;
19
- static copyText(text: string): Promise<void>;
20
- static listenerOrientation(callback: PLVCallback<mediaquery.MediaQueryResult>): PLVMediaQueryListener;
21
- static listenerAvoidAreaChange(callback: PLVCallback<window.AvoidAreaOptions>): PLVAvoidAreaChangeListener;
22
- static changeOrientation(o5: boolean, component?: Object, p5?: window.Window): void;
23
- static isLandscape(component?: Object): boolean;
24
- static setWindowFullScreen(isLayoutFullScreen?: boolean, isFullScreen?: boolean, component?: Object, h5?: window.Window): Promise<Object[]>;
25
- static setWindowSystemBarProperties(systemBarProperties?: window.SystemBarProperties): void;
26
- static startScan(component?: Object): Promise<string>;
27
- static getVideoRectJS(e5: boolean): string;
28
- static getExitFullScreenJS(c5: boolean): string;
29
- static colorResourceToHex(resource: Resource): string;
30
- static colorIntToHex(z4: number, a5?: boolean): string;
31
- static debounce(func: Function, delay?: number, key?: string): void;
19
+ static undefinedToValue<q23>(z9: q23, a10: PLVCallback<q23, void>, b10?: number): undefined;
20
+ static copyText(y9: string): Promise<void>;
21
+ static listenerOrientation(w9: PLVCallback<mediaquery.MediaQueryResult>): PLVMediaQueryListener;
22
+ static listenerAvoidAreaChange(t9: PLVCallback<window.AvoidAreaOptions>): PLVAvoidAreaChangeListener;
23
+ static changeOrientation(m9: boolean, n9?: Object, o9?: window.Window): void;
24
+ static isLandscape(k9?: Object): boolean;
25
+ static setWindowFullScreen(z8?: boolean, a9?: boolean, b9?: Object, c9?: window.Window): Promise<Object[]>;
26
+ static setWindowSystemBarProperties(y8?: window.SystemBarProperties): void;
27
+ static startScan(s8?: Object): Promise<string>;
28
+ static getVideoRectJS(q8: boolean): string;
29
+ static getExitFullScreenJS(o8: boolean): string;
30
+ static colorResourceToHex(n8: Resource): string;
31
+ static colorIntToHex(k8: number, l8?: boolean): string;
32
+ static debounce(g8: Function, h8?: number, i8?: string): void;
32
33
  }