@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,62 +1,62 @@
1
- var u1 = (this && this.u1) || function (j2, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.v1 === "function")
4
- r = Reflect.v1(j2, target, key, desc);
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
5
  else
6
- for (var k2 = j2.length - 1; k2 >= 0; k2--)
7
- if (d = j2[k2])
8
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
- return c > 3 && r && Object.defineProperty(target, key, r), r;
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
10
  };
11
11
  import PLVLogger from '../modules/log/PLVLogger';
12
12
  import PLVUtils from './PLVUtils';
13
- export function PLVCustomBuilder(data, parent = null) {
14
- const i2 = data;
13
+ export function PLVCustomBuilder(u2, v2 = null) {
14
+ const w2 = u2;
15
15
  }
16
16
  export class PLVMediaQueryListener {
17
- constructor(listener, callback) {
18
- this.listener = listener;
19
- this.callback = callback;
17
+ constructor(s2, t2) {
18
+ this.listener = s2;
19
+ this.callback = t2;
20
20
  }
21
21
  off() {
22
22
  this.listener?.off("change", this.callback);
23
23
  }
24
24
  }
25
25
  export class PLVAvoidAreaChangeListener {
26
- constructor(h2, callback) {
27
- this.windowClass = h2;
28
- this.callback = callback;
26
+ constructor(q2, r2) {
27
+ this.windowClass = q2;
28
+ this.callback = r2;
29
29
  }
30
30
  off() {
31
31
  try {
32
32
  this.windowClass?.off("avoidAreaChange", this.callback);
33
33
  }
34
- catch (e) {
34
+ catch (p2) {
35
35
  }
36
36
  }
37
37
  }
38
38
  export class PLVStateData {
39
- constructor(data) {
40
- this.data = data;
39
+ constructor(o2) {
40
+ this.data = o2;
41
41
  }
42
42
  copy() {
43
43
  return this.copyValue(this.data);
44
44
  }
45
- copyValue(data) {
46
- return new PLVStateData(data);
45
+ copyValue(n2) {
46
+ return new PLVStateData(n2);
47
47
  }
48
48
  }
49
49
  export class PLVStatefulData extends PLVStateData {
50
- constructor(data, isSuccess = true, error) {
51
- super(data);
52
- this.isSuccess = isSuccess;
53
- this.error = error;
50
+ constructor(k2, l2 = true, m2) {
51
+ super(k2);
52
+ this.isSuccess = l2;
53
+ this.error = m2;
54
54
  }
55
- static success(data) {
56
- return new PLVStatefulData(data, true);
55
+ static success(j2) {
56
+ return new PLVStatefulData(j2, true);
57
57
  }
58
- static error(error) {
59
- return new PLVStatefulData(undefined, false, error);
58
+ static error(i2) {
59
+ return new PLVStatefulData(undefined, false, i2);
60
60
  }
61
61
  }
62
62
  export class PLVDisposable {
@@ -74,32 +74,32 @@ export class PLVPromiseValue {
74
74
  constructor() {
75
75
  this.callbacks = [];
76
76
  }
77
- set(value) {
77
+ set(g2) {
78
78
  if (this.value == undefined) {
79
- this.resolve?.(value);
79
+ this.resolve?.(g2);
80
80
  }
81
- if (this.value != value) {
82
- this.callbacks.forEach(callback => {
83
- callback(value);
81
+ if (this.value != g2) {
82
+ this.callbacks.forEach(h2 => {
83
+ h2(g2);
84
84
  });
85
85
  }
86
- this.value = value;
86
+ this.value = g2;
87
87
  }
88
- observe(callback) {
88
+ observe(f2) {
89
89
  if (this.value != undefined) {
90
- callback(this.value);
90
+ f2(this.value);
91
91
  }
92
- this.callbacks.push(callback);
92
+ this.callbacks.push(f2);
93
93
  }
94
94
  get() {
95
95
  if (this.value != undefined) {
96
96
  return this.value;
97
97
  }
98
98
  if (!this.promise) {
99
- this.promise = PLVUtils.safePromise((g2, reject) => {
100
- this.resolve = g2;
99
+ this.promise = PLVUtils.safePromise((d2, e2) => {
100
+ this.resolve = d2;
101
101
  if (this.value != undefined) {
102
- g2(this.value);
102
+ d2(this.value);
103
103
  }
104
104
  });
105
105
  }
@@ -110,73 +110,73 @@ export class PLVPromiseValue {
110
110
  }
111
111
  }
112
112
  let PLVLazyValue = class PLVLazyValue {
113
- constructor(f2) {
114
- this._callback = f2;
113
+ constructor(c2) {
114
+ this._callback = c2;
115
115
  }
116
- get(param) {
116
+ get(b2) {
117
117
  if (this._value == undefined) {
118
- this._value = this._callback(param);
118
+ this._value = this._callback(b2);
119
119
  }
120
120
  return this._value;
121
121
  }
122
122
  };
123
- PLVLazyValue = u1([
123
+ PLVLazyValue = __decorate([
124
124
  Observed
125
125
  ], PLVLazyValue);
126
126
  export { PLVLazyValue };
127
127
  let PLVAsyncLazyValue = class PLVAsyncLazyValue {
128
- constructor(e2) {
129
- this._callback = e2;
128
+ constructor(a2) {
129
+ this._callback = a2;
130
130
  }
131
- get(callback, param) {
131
+ get(x1, y1) {
132
132
  if (this._value === undefined) {
133
- this._callback(param, (value) => {
134
- this._value = value;
135
- callback(this._value);
133
+ this._callback(y1, (z1) => {
134
+ this._value = z1;
135
+ x1(this._value);
136
136
  });
137
137
  }
138
138
  else {
139
- callback(this._value);
139
+ x1(this._value);
140
140
  }
141
141
  }
142
142
  };
143
- PLVAsyncLazyValue = u1([
143
+ PLVAsyncLazyValue = __decorate([
144
144
  Observed
145
145
  ], PLVAsyncLazyValue);
146
146
  export { PLVAsyncLazyValue };
147
147
  export class PLVEventNotify {
148
- constructor(c2, d2 = true) {
148
+ constructor(v1, w1 = true) {
149
149
  this.tag = '[PLVEventNotify]';
150
150
  this.events = new Map();
151
151
  this.emitLogToFile = true;
152
- this.tag = PLVUtils.getClassTag(c2) || this.tag;
153
- this.emitLogToFile = d2;
154
- }
155
- on(event, callback, a2) {
156
- PLVLogger.info(PLVUtils.getClassTag(a2) || this.tag, `on event: ${event}`);
157
- const b2 = this.events.get(event) || [];
158
- b2.push(callback);
159
- this.events.set(event, b2);
160
- }
161
- off(event, callback, w1) {
162
- PLVLogger.info(PLVUtils.getClassTag(w1) || this.tag, `off event: ${event}`);
163
- if (callback) {
164
- const z1 = this.events.get(event) || [];
165
- const index = z1.indexOf(callback);
166
- if (index !== -1) {
167
- z1.splice(index, 1);
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
168
  }
169
- this.events.set(event, z1);
169
+ this.events.set(m1, p1);
170
170
  }
171
171
  else {
172
- this.events.delete(event);
172
+ this.events.delete(m1);
173
173
  }
174
174
  }
175
- emit(event, ...args) {
176
- PLVLogger.info(this.tag, `emit event: ${event}, args: ${args}`, this.emitLogToFile);
177
- const v1 = this.events.get(event) || [];
178
- v1.forEach(callback => {
179
- callback(...args);
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
180
  });
181
181
  }
182
182
  clear() {
@@ -1,22 +1,22 @@
1
1
  export var PLVWebpageStatus;
2
- (function (n2) {
3
- n2["INIT"] = "init";
4
- n2["ERROR"] = "error";
5
- n2["FINISHED"] = "finished";
2
+ (function (h3) {
3
+ h3["INIT"] = "init";
4
+ h3["ERROR"] = "error";
5
+ h3["FINISHED"] = "finished";
6
6
  })(PLVWebpageStatus || (PLVWebpageStatus = {}));
7
7
  export var PLVFullScreenStatus;
8
- (function (m2) {
9
- m2["IDLE"] = "idle";
10
- m2["ENTER"] = "enter";
11
- m2["EXIT"] = "exit";
8
+ (function (g3) {
9
+ g3["IDLE"] = "idle";
10
+ g3["ENTER"] = "enter";
11
+ g3["EXIT"] = "exit";
12
12
  })(PLVFullScreenStatus || (PLVFullScreenStatus = {}));
13
13
  export var PLVPrintLogLevel;
14
- (function (l2) {
15
- l2[l2["ALL"] = 0] = "ALL";
16
- l2[l2["VERBOSE"] = 2] = "VERBOSE";
17
- l2[l2["DEBUG"] = 3] = "DEBUG";
18
- l2[l2["INFO"] = 4] = "INFO";
19
- l2[l2["WARN"] = 5] = "WARN";
20
- l2[l2["ERROR"] = 6] = "ERROR";
21
- l2[l2["NONE"] = 99] = "NONE";
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
22
  })(PLVPrintLogLevel || (PLVPrintLogLevel = {}));
@@ -1,11 +1,11 @@
1
- import { ConfigurationConstant } from '@kit.AbilityKit';
2
- import { window } from '@kit.ArkUI';
1
+ import ConfigurationConstant from "@ohos.app.ability.ConfigurationConstant";
2
+ import window from "@ohos.window";
3
3
  export declare class PLVDeviceUtils {
4
4
  static getNavigationIndicatorHeight(): number;
5
5
  static getStatusBarHeight(): number;
6
6
  static getWidth(): number;
7
7
  static getHeight(): number;
8
8
  static getMinDisplaySide(): number;
9
- static setColorMode(colorMode: ConfigurationConstant.ColorMode): void;
10
- static setWindowSystemBarProperties(systemBarProperties?: window.SystemBarProperties): void;
9
+ static setColorMode(m3: ConfigurationConstant.ColorMode): void;
10
+ static setWindowSystemBarProperties(i3?: window.SystemBarProperties): void;
11
11
  }
@@ -17,20 +17,20 @@ export class PLVDeviceUtils {
17
17
  static getMinDisplaySide() {
18
18
  return Math.min(PLVDeviceUtils.getWidth(), PLVDeviceUtils.getHeight());
19
19
  }
20
- static setColorMode(colorMode) {
21
- AppUtil.getContext().getApplicationContext().setColorMode(colorMode);
20
+ static setColorMode(m3) {
21
+ AppUtil.getContext().getApplicationContext().setColorMode(m3);
22
22
  }
23
- static setWindowSystemBarProperties(systemBarProperties) {
23
+ static setWindowSystemBarProperties(i3) {
24
24
  try {
25
- let o2 = AppUtil.getMainWindow();
26
- if (systemBarProperties) {
27
- o2.setWindowSystemBarProperties(systemBarProperties).catch((error) => {
28
- PLVLogger.error(TAG, `setWindowSystemBarProperties-error ~ code: ${error.code} -·- message: ${error.message}`);
25
+ let k3 = AppUtil.getMainWindow();
26
+ if (i3) {
27
+ k3.setWindowSystemBarProperties(i3).catch((l3) => {
28
+ PLVLogger.error(TAG, `setWindowSystemBarProperties-error ~ code: ${l3.code} -·- message: ${l3.message}`);
29
29
  });
30
30
  }
31
31
  }
32
- catch (err) {
33
- PLVLogger.error(TAG, JSON.stringify(err));
32
+ catch (j3) {
33
+ PLVLogger.error(TAG, JSON.stringify(j3));
34
34
  }
35
35
  }
36
36
  }
@@ -1,4 +1,4 @@
1
- import { HashMap } from '@kit.ArkTS';
1
+ import HashMap from "@ohos.util.HashMap";
2
2
  export declare class PLVHashMap<K, V> extends HashMap<K, V> {
3
- set(key: K, value: V): PLVHashMap<K, V>;
3
+ set(n3: K, o3: V): PLVHashMap<K, V>;
4
4
  }
@@ -1,7 +1,7 @@
1
1
  import HashMap from "@ohos.util.HashMap";
2
2
  export class PLVHashMap extends HashMap {
3
- set(key, value) {
4
- super.set(key, value);
3
+ set(n3, o3) {
4
+ super.set(n3, o3);
5
5
  return this;
6
6
  }
7
7
  }
@@ -2,20 +2,20 @@ import { ClassConstructor } from 'class-transformer';
2
2
  import { PLVHttpData } from '../modules/net/PLVHttpData';
3
3
  import { PLVJSONObject } from './PLVType';
4
4
  export default class PLVJSONUtils {
5
- static safeStringify(value?: Object, replacer?: (this: object, key: string, value: object) => object | undefined): string;
6
- static safeParse(text?: string): object | undefined;
7
- static json2Bean<T>(z2: ClassConstructor<T>, a3: string): T | undefined;
8
- static bean2Json(data: Object | Array<Object | String | Number | Boolean> | null | undefined): string;
9
- static bean2Bean<T, V>(w2: T, plain: V): T | undefined;
10
- static httpData2Bean<T>(v2: T, plain: PLVHttpData<T>): T | undefined;
11
- static json2Map(u2: string): Map<string, Object>;
12
- static object2Map(object: PLVJSONObject): Map<string, Object | undefined>;
13
- static map2json(map: Map<string, Object | undefined>): Record<string, Object>;
14
- static map2jsonStr(map: Map<string, Object>, replacer?: (this: object, key: string, value: object) => object | undefined): string;
15
- static toUnescapedData(t2: string): string;
16
- static toFillData<T extends v8>(q2: ClassConstructor<T> | T, r2: string | Object | undefined): T | undefined;
5
+ static safeStringify(p4?: Object, q4?: (this: object, key: string, value: object) => object | undefined): string;
6
+ static safeParse(n4?: string): object | undefined;
7
+ static json2Bean<a24>(k4: ClassConstructor<a24>, l4: string): a24 | undefined;
8
+ static bean2Json(i4: Object | Array<Object | String | Number | Boolean> | null | undefined): string;
9
+ static bean2Bean<y23, z23>(f4: y23, g4: z23): y23 | undefined;
10
+ static httpData2Bean<x23>(b4: x23, c4: PLVHttpData<x23>): x23 | undefined;
11
+ static json2Map(a4: string): Map<string, Object>;
12
+ static object2Map(z3: PLVJSONObject): Map<string, Object | undefined>;
13
+ static map2json(v3: Map<string, Object | undefined>): Record<string, Object>;
14
+ static map2jsonStr(t3: Map<string, Object>, u3?: (this: object, key: string, value: object) => object | undefined): string;
15
+ static toUnescapedData(s3: string): string;
16
+ static toFillData<w23 extends FillData>(p3: ClassConstructor<w23> | w23, q3: string | Object | undefined): w23 | undefined;
17
17
  }
18
- interface v8 {
18
+ interface FillData {
19
19
  fill(): void;
20
20
  }
21
21
  export {};
@@ -1,103 +1,103 @@
1
1
  import { instanceToPlain, plainToClass, plainToClassFromExist } from 'class-transformer';
2
2
  export default class PLVJSONUtils {
3
- static safeStringify(value, replacer) {
3
+ static safeStringify(p4, q4) {
4
4
  try {
5
- return JSON.stringify(value || new Object(), replacer);
5
+ return JSON.stringify(p4 || new Object(), q4);
6
6
  }
7
- catch (e) {
7
+ catch (r4) {
8
8
  return '';
9
9
  }
10
10
  }
11
- static safeParse(text) {
11
+ static safeParse(n4) {
12
12
  try {
13
- return JSON.parse(text || '');
13
+ return JSON.parse(n4 || '');
14
14
  }
15
- catch (e) {
15
+ catch (o4) {
16
16
  return undefined;
17
17
  }
18
18
  }
19
- static json2Bean(z2, a3) {
19
+ static json2Bean(k4, l4) {
20
20
  try {
21
- return plainToClass(z2, JSON.parse(a3), {
21
+ return plainToClass(k4, JSON.parse(l4), {
22
22
  enableImplicitConversion: false, exposeDefaultValues: true
23
23
  });
24
24
  }
25
- catch (e) {
25
+ catch (m4) {
26
26
  return undefined;
27
27
  }
28
28
  }
29
- static bean2Json(data) {
29
+ static bean2Json(i4) {
30
30
  try {
31
- if (data == null || data == undefined) {
31
+ if (i4 == null || i4 == undefined) {
32
32
  return '';
33
33
  }
34
- return JSON.stringify(instanceToPlain(data));
34
+ return JSON.stringify(instanceToPlain(i4));
35
35
  }
36
- catch (e) {
36
+ catch (j4) {
37
37
  return "";
38
38
  }
39
39
  }
40
- static bean2Bean(w2, plain) {
40
+ static bean2Bean(f4, g4) {
41
41
  try {
42
- return plainToClassFromExist(w2, plain, {
42
+ return plainToClassFromExist(f4, g4, {
43
43
  enableImplicitConversion: false, exposeDefaultValues: true
44
44
  });
45
45
  }
46
- catch (e) {
46
+ catch (h4) {
47
47
  return undefined;
48
48
  }
49
49
  }
50
- static httpData2Bean(v2, plain) {
50
+ static httpData2Bean(b4, c4) {
51
51
  try {
52
- plain.data = plainToClassFromExist(v2, plain.data, {
52
+ c4.data = plainToClassFromExist(b4, c4.data, {
53
53
  enableImplicitConversion: false, exposeDefaultValues: true
54
54
  });
55
55
  try {
56
- plain.data.fill();
56
+ c4.data.fill();
57
57
  }
58
- catch (err) {
58
+ catch (e4) {
59
59
  }
60
- return plain.data;
60
+ return c4.data;
61
61
  }
62
- catch (e) {
62
+ catch (d4) {
63
63
  return undefined;
64
64
  }
65
65
  }
66
- static json2Map(u2) {
67
- return new Map(Object.entries(JSON.parse(u2)));
66
+ static json2Map(a4) {
67
+ return new Map(Object.entries(JSON.parse(a4)));
68
68
  }
69
- static object2Map(object) {
70
- return new Map(Object.entries(object));
69
+ static object2Map(z3) {
70
+ return new Map(Object.entries(z3));
71
71
  }
72
- static map2json(map) {
73
- const obj = {};
74
- map.forEach((value, key) => {
75
- if (key && value) {
76
- obj[key] = value;
72
+ static map2json(v3) {
73
+ const w3 = {};
74
+ v3.forEach((x3, y3) => {
75
+ if (y3 && x3) {
76
+ w3[y3] = x3;
77
77
  }
78
78
  });
79
- return obj;
79
+ return w3;
80
80
  }
81
- static map2jsonStr(map, replacer) {
82
- return PLVJSONUtils.safeStringify(PLVJSONUtils.map2json(map), replacer);
81
+ static map2jsonStr(t3, u3) {
82
+ return PLVJSONUtils.safeStringify(PLVJSONUtils.map2json(t3), u3);
83
83
  }
84
- static toUnescapedData(t2) {
85
- if (!t2.includes('\\')) {
86
- return t2;
84
+ static toUnescapedData(s3) {
85
+ if (!s3.includes('\\')) {
86
+ return s3;
87
87
  }
88
- return t2.substring(1, t2.length - 1)
88
+ return s3.substring(1, s3.length - 1)
89
89
  .replace(/\\"/g, '"')
90
90
  .replace(/\\\\/g, '\\');
91
91
  }
92
- static toFillData(q2, r2) {
93
- let s2 = undefined;
94
- if (typeof r2 === 'string') {
95
- s2 = PLVJSONUtils.json2Bean(q2, r2);
92
+ static toFillData(p3, q3) {
93
+ let r3 = undefined;
94
+ if (typeof q3 === 'string') {
95
+ r3 = PLVJSONUtils.json2Bean(p3, q3);
96
96
  }
97
- else if (typeof r2 === 'object') {
98
- s2 = PLVJSONUtils.bean2Bean(q2, r2);
97
+ else if (typeof q3 === 'object') {
98
+ r3 = PLVJSONUtils.bean2Bean(p3, q3);
99
99
  }
100
- s2?.fill();
101
- return s2;
100
+ r3?.fill();
101
+ return r3;
102
102
  }
103
103
  }
@@ -1,6 +1,6 @@
1
1
  export declare class PLVNetUtils {
2
- static replaceUrl(h3: string, i3: Map<string, string | undefined>): string;
3
- static formatUrl(g3: string, record: Record<string, string | undefined>): string;
4
- static formatParams(params?: Record<string, string>, d3?: boolean): string;
5
- static appendParams(b3: string, params?: Record<string, string>): string;
2
+ static replaceUrl(d5: string, e5: Map<string, string | undefined>): string;
3
+ static formatUrl(b5: string, c5: Record<string, string | undefined>): string;
4
+ static formatParams(v4?: Record<string, string>, w4?: boolean): string;
5
+ static appendParams(s4: string, t4?: Record<string, string>): string;
6
6
  }
@@ -1,35 +1,35 @@
1
1
  export class PLVNetUtils {
2
- static replaceUrl(h3, i3) {
3
- const j3 = /{(\w+?)}/g;
4
- let match;
5
- let k3 = h3;
6
- while ((match = j3.exec(h3)) !== null) {
7
- const key = match[1];
8
- const l3 = i3.get(key);
9
- if (l3 !== undefined) {
10
- k3 = k3.replace(match[0], l3);
2
+ static replaceUrl(d5, e5) {
3
+ const f5 = /{(\w+?)}/g;
4
+ let g5;
5
+ let h5 = d5;
6
+ while ((g5 = f5.exec(d5)) !== null) {
7
+ const i5 = g5[1];
8
+ const j5 = e5.get(i5);
9
+ if (j5 !== undefined) {
10
+ h5 = h5.replace(g5[0], j5);
11
11
  }
12
12
  }
13
- return k3;
13
+ return h5;
14
14
  }
15
- static formatUrl(g3, record) {
16
- return PLVNetUtils.replaceUrl(g3, new Map(Object.entries(record)));
15
+ static formatUrl(b5, c5) {
16
+ return PLVNetUtils.replaceUrl(b5, new Map(Object.entries(c5)));
17
17
  }
18
- static formatParams(params, d3) {
19
- let e3 = '';
20
- if (params) {
21
- let f3 = true;
22
- Object.entries(params).forEach((value, index) => {
23
- if (value?.[0] && value?.[1]) {
24
- e3 += (f3 && !d3 ? '?' : '&') + value?.[0] + '=' + value?.[1];
25
- f3 = false;
18
+ static formatParams(v4, w4) {
19
+ let x4 = '';
20
+ if (v4) {
21
+ let y4 = true;
22
+ Object.entries(v4).forEach((z4, a5) => {
23
+ if (z4?.[0] && z4?.[1]) {
24
+ x4 += (y4 && !w4 ? '?' : '&') + z4?.[0] + '=' + z4?.[1];
25
+ y4 = false;
26
26
  }
27
27
  });
28
28
  }
29
- return e3;
29
+ return x4;
30
30
  }
31
- static appendParams(b3, params) {
32
- const c3 = b3.includes('?');
33
- return b3 + PLVNetUtils.formatParams(params, c3);
31
+ static appendParams(s4, t4) {
32
+ const u4 = s4.includes('?');
33
+ return s4 + PLVNetUtils.formatParams(t4, u4);
34
34
  }
35
35
  }