@etsoo/appscript 1.3.30 → 1.3.32
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/lib/cjs/app/CoreApp.d.ts +4 -15
- package/lib/cjs/app/CoreApp.js +4 -0
- package/lib/cjs/app/IApp.d.ts +17 -2
- package/lib/cjs/i18n/en-US.json +1 -0
- package/lib/cjs/i18n/zh-CN.json +1 -0
- package/lib/cjs/i18n/zh-HK.json +1 -0
- package/lib/mjs/app/CoreApp.d.ts +4 -15
- package/lib/mjs/app/CoreApp.js +4 -0
- package/lib/mjs/app/IApp.d.ts +17 -2
- package/lib/mjs/i18n/en-US.json +1 -0
- package/lib/mjs/i18n/zh-CN.json +1 -0
- package/lib/mjs/i18n/zh-HK.json +1 -0
- package/package.json +4 -4
- package/src/app/CoreApp.ts +25 -2
- package/src/app/IApp.ts +28 -4
- package/src/i18n/en-US.json +1 -0
- package/src/i18n/zh-CN.json +1 -0
- package/src/i18n/zh-HK.json +1 -0
package/lib/cjs/app/CoreApp.d.ts
CHANGED
|
@@ -286,21 +286,10 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
286
286
|
* @returns string
|
|
287
287
|
*/
|
|
288
288
|
formatDate(input?: Date | string, options?: DateUtils.FormatOptions, timeZone?: string): string | undefined;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
* @param options Options
|
|
294
|
-
* @returns Result
|
|
295
|
-
*/
|
|
296
|
-
formatMoney(input?: number | bigint, isInteger?: boolean, options?: Intl.NumberFormatOptions): string | undefined;
|
|
297
|
-
/**
|
|
298
|
-
* Format number
|
|
299
|
-
* @param input Input number
|
|
300
|
-
* @param options Options
|
|
301
|
-
* @returns Result
|
|
302
|
-
*/
|
|
303
|
-
formatNumber(input?: number | bigint, options?: Intl.NumberFormatOptions): string | undefined;
|
|
289
|
+
formatMoney(input: null | undefined, isInteger?: boolean, options?: Intl.NumberFormatOptions): undefined;
|
|
290
|
+
formatMoney(input: number | bigint, isInteger?: boolean, options?: Intl.NumberFormatOptions): string;
|
|
291
|
+
formatNumber(input: null | undefined, options?: Intl.NumberFormatOptions): undefined;
|
|
292
|
+
formatNumber(input: number | bigint, options?: Intl.NumberFormatOptions): string;
|
|
304
293
|
/**
|
|
305
294
|
* Format error
|
|
306
295
|
* @param error Error
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -717,6 +717,8 @@ class CoreApp {
|
|
|
717
717
|
* @returns Result
|
|
718
718
|
*/
|
|
719
719
|
formatMoney(input, isInteger = false, options) {
|
|
720
|
+
if (input == null)
|
|
721
|
+
return undefined;
|
|
720
722
|
return shared_1.NumberUtils.formatMoney(input, this.currency, this.culture, isInteger, options);
|
|
721
723
|
}
|
|
722
724
|
/**
|
|
@@ -726,6 +728,8 @@ class CoreApp {
|
|
|
726
728
|
* @returns Result
|
|
727
729
|
*/
|
|
728
730
|
formatNumber(input, options) {
|
|
731
|
+
if (input == null)
|
|
732
|
+
return undefined;
|
|
729
733
|
return shared_1.NumberUtils.format(input, this.culture, options);
|
|
730
734
|
}
|
|
731
735
|
/**
|
package/lib/cjs/app/IApp.d.ts
CHANGED
|
@@ -233,14 +233,29 @@ export interface IApp {
|
|
|
233
233
|
* @param options Options
|
|
234
234
|
* @returns Result
|
|
235
235
|
*/
|
|
236
|
-
formatMoney(input
|
|
236
|
+
formatMoney(input: null | undefined, isInteger?: boolean, options?: Intl.NumberFormatOptions): undefined;
|
|
237
|
+
/**
|
|
238
|
+
* Format money number
|
|
239
|
+
* @param input Input money number
|
|
240
|
+
* @param isInteger Is integer
|
|
241
|
+
* @param options Options
|
|
242
|
+
* @returns Result
|
|
243
|
+
*/
|
|
244
|
+
formatMoney(input: number | bigint, isInteger?: boolean, options?: Intl.NumberFormatOptions): string;
|
|
245
|
+
/**
|
|
246
|
+
* Format number
|
|
247
|
+
* @param input Input number
|
|
248
|
+
* @param options Options
|
|
249
|
+
* @returns Result
|
|
250
|
+
*/
|
|
251
|
+
formatNumber(input: null | undefined, options?: Intl.NumberFormatOptions): undefined;
|
|
237
252
|
/**
|
|
238
253
|
* Format number
|
|
239
254
|
* @param input Input number
|
|
240
255
|
* @param options Options
|
|
241
256
|
* @returns Result
|
|
242
257
|
*/
|
|
243
|
-
formatNumber(input
|
|
258
|
+
formatNumber(input: number | bigint, options?: Intl.NumberFormatOptions): string;
|
|
244
259
|
/**
|
|
245
260
|
* Do refresh token result
|
|
246
261
|
* @param result Result
|
package/lib/cjs/i18n/en-US.json
CHANGED
package/lib/cjs/i18n/zh-CN.json
CHANGED
package/lib/cjs/i18n/zh-HK.json
CHANGED
package/lib/mjs/app/CoreApp.d.ts
CHANGED
|
@@ -286,21 +286,10 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
286
286
|
* @returns string
|
|
287
287
|
*/
|
|
288
288
|
formatDate(input?: Date | string, options?: DateUtils.FormatOptions, timeZone?: string): string | undefined;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
* @param options Options
|
|
294
|
-
* @returns Result
|
|
295
|
-
*/
|
|
296
|
-
formatMoney(input?: number | bigint, isInteger?: boolean, options?: Intl.NumberFormatOptions): string | undefined;
|
|
297
|
-
/**
|
|
298
|
-
* Format number
|
|
299
|
-
* @param input Input number
|
|
300
|
-
* @param options Options
|
|
301
|
-
* @returns Result
|
|
302
|
-
*/
|
|
303
|
-
formatNumber(input?: number | bigint, options?: Intl.NumberFormatOptions): string | undefined;
|
|
289
|
+
formatMoney(input: null | undefined, isInteger?: boolean, options?: Intl.NumberFormatOptions): undefined;
|
|
290
|
+
formatMoney(input: number | bigint, isInteger?: boolean, options?: Intl.NumberFormatOptions): string;
|
|
291
|
+
formatNumber(input: null | undefined, options?: Intl.NumberFormatOptions): undefined;
|
|
292
|
+
formatNumber(input: number | bigint, options?: Intl.NumberFormatOptions): string;
|
|
304
293
|
/**
|
|
305
294
|
* Format error
|
|
306
295
|
* @param error Error
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -714,6 +714,8 @@ export class CoreApp {
|
|
|
714
714
|
* @returns Result
|
|
715
715
|
*/
|
|
716
716
|
formatMoney(input, isInteger = false, options) {
|
|
717
|
+
if (input == null)
|
|
718
|
+
return undefined;
|
|
717
719
|
return NumberUtils.formatMoney(input, this.currency, this.culture, isInteger, options);
|
|
718
720
|
}
|
|
719
721
|
/**
|
|
@@ -723,6 +725,8 @@ export class CoreApp {
|
|
|
723
725
|
* @returns Result
|
|
724
726
|
*/
|
|
725
727
|
formatNumber(input, options) {
|
|
728
|
+
if (input == null)
|
|
729
|
+
return undefined;
|
|
726
730
|
return NumberUtils.format(input, this.culture, options);
|
|
727
731
|
}
|
|
728
732
|
/**
|
package/lib/mjs/app/IApp.d.ts
CHANGED
|
@@ -233,14 +233,29 @@ export interface IApp {
|
|
|
233
233
|
* @param options Options
|
|
234
234
|
* @returns Result
|
|
235
235
|
*/
|
|
236
|
-
formatMoney(input
|
|
236
|
+
formatMoney(input: null | undefined, isInteger?: boolean, options?: Intl.NumberFormatOptions): undefined;
|
|
237
|
+
/**
|
|
238
|
+
* Format money number
|
|
239
|
+
* @param input Input money number
|
|
240
|
+
* @param isInteger Is integer
|
|
241
|
+
* @param options Options
|
|
242
|
+
* @returns Result
|
|
243
|
+
*/
|
|
244
|
+
formatMoney(input: number | bigint, isInteger?: boolean, options?: Intl.NumberFormatOptions): string;
|
|
245
|
+
/**
|
|
246
|
+
* Format number
|
|
247
|
+
* @param input Input number
|
|
248
|
+
* @param options Options
|
|
249
|
+
* @returns Result
|
|
250
|
+
*/
|
|
251
|
+
formatNumber(input: null | undefined, options?: Intl.NumberFormatOptions): undefined;
|
|
237
252
|
/**
|
|
238
253
|
* Format number
|
|
239
254
|
* @param input Input number
|
|
240
255
|
* @param options Options
|
|
241
256
|
* @returns Result
|
|
242
257
|
*/
|
|
243
|
-
formatNumber(input
|
|
258
|
+
formatNumber(input: number | bigint, options?: Intl.NumberFormatOptions): string;
|
|
244
259
|
/**
|
|
245
260
|
* Do refresh token result
|
|
246
261
|
* @param result Result
|
package/lib/mjs/i18n/en-US.json
CHANGED
package/lib/mjs/i18n/zh-CN.json
CHANGED
package/lib/mjs/i18n/zh-HK.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.32",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://github.com/ETSOO/AppScript#readme",
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@etsoo/notificationbase": "^1.1.
|
|
56
|
-
"@etsoo/restclient": "^1.0.
|
|
57
|
-
"@etsoo/shared": "^1.1.
|
|
55
|
+
"@etsoo/notificationbase": "^1.1.15",
|
|
56
|
+
"@etsoo/restclient": "^1.0.77",
|
|
57
|
+
"@etsoo/shared": "^1.1.76",
|
|
58
58
|
"@types/crypto-js": "^4.1.1",
|
|
59
59
|
"crypto-js": "^4.1.1"
|
|
60
60
|
},
|
package/src/app/CoreApp.ts
CHANGED
|
@@ -996,6 +996,16 @@ export abstract class CoreApp<
|
|
|
996
996
|
return DateUtils.format(input, currentCulture.name, options, timeZone);
|
|
997
997
|
}
|
|
998
998
|
|
|
999
|
+
formatMoney(
|
|
1000
|
+
input: null | undefined,
|
|
1001
|
+
isInteger?: boolean,
|
|
1002
|
+
options?: Intl.NumberFormatOptions
|
|
1003
|
+
): undefined;
|
|
1004
|
+
formatMoney(
|
|
1005
|
+
input: number | bigint,
|
|
1006
|
+
isInteger?: boolean,
|
|
1007
|
+
options?: Intl.NumberFormatOptions
|
|
1008
|
+
): string;
|
|
999
1009
|
/**
|
|
1000
1010
|
* Format money number
|
|
1001
1011
|
* @param input Input money number
|
|
@@ -1004,10 +1014,11 @@ export abstract class CoreApp<
|
|
|
1004
1014
|
* @returns Result
|
|
1005
1015
|
*/
|
|
1006
1016
|
formatMoney(
|
|
1007
|
-
input
|
|
1017
|
+
input: number | bigint | null | undefined,
|
|
1008
1018
|
isInteger: boolean = false,
|
|
1009
1019
|
options?: Intl.NumberFormatOptions
|
|
1010
1020
|
) {
|
|
1021
|
+
if (input == null) return undefined;
|
|
1011
1022
|
return NumberUtils.formatMoney(
|
|
1012
1023
|
input,
|
|
1013
1024
|
this.currency,
|
|
@@ -1017,13 +1028,25 @@ export abstract class CoreApp<
|
|
|
1017
1028
|
);
|
|
1018
1029
|
}
|
|
1019
1030
|
|
|
1031
|
+
formatNumber(
|
|
1032
|
+
input: null | undefined,
|
|
1033
|
+
options?: Intl.NumberFormatOptions
|
|
1034
|
+
): undefined;
|
|
1035
|
+
formatNumber(
|
|
1036
|
+
input: number | bigint,
|
|
1037
|
+
options?: Intl.NumberFormatOptions
|
|
1038
|
+
): string;
|
|
1020
1039
|
/**
|
|
1021
1040
|
* Format number
|
|
1022
1041
|
* @param input Input number
|
|
1023
1042
|
* @param options Options
|
|
1024
1043
|
* @returns Result
|
|
1025
1044
|
*/
|
|
1026
|
-
formatNumber(
|
|
1045
|
+
formatNumber(
|
|
1046
|
+
input: number | bigint | null | undefined,
|
|
1047
|
+
options?: Intl.NumberFormatOptions
|
|
1048
|
+
) {
|
|
1049
|
+
if (input == null) return undefined;
|
|
1027
1050
|
return NumberUtils.format(input, this.culture, options);
|
|
1028
1051
|
}
|
|
1029
1052
|
|
package/src/app/IApp.ts
CHANGED
|
@@ -307,10 +307,23 @@ export interface IApp {
|
|
|
307
307
|
* @returns Result
|
|
308
308
|
*/
|
|
309
309
|
formatMoney(
|
|
310
|
-
input
|
|
310
|
+
input: null | undefined,
|
|
311
311
|
isInteger?: boolean,
|
|
312
312
|
options?: Intl.NumberFormatOptions
|
|
313
|
-
):
|
|
313
|
+
): undefined;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Format money number
|
|
317
|
+
* @param input Input money number
|
|
318
|
+
* @param isInteger Is integer
|
|
319
|
+
* @param options Options
|
|
320
|
+
* @returns Result
|
|
321
|
+
*/
|
|
322
|
+
formatMoney(
|
|
323
|
+
input: number | bigint,
|
|
324
|
+
isInteger?: boolean,
|
|
325
|
+
options?: Intl.NumberFormatOptions
|
|
326
|
+
): string;
|
|
314
327
|
|
|
315
328
|
/**
|
|
316
329
|
* Format number
|
|
@@ -319,9 +332,20 @@ export interface IApp {
|
|
|
319
332
|
* @returns Result
|
|
320
333
|
*/
|
|
321
334
|
formatNumber(
|
|
322
|
-
input
|
|
335
|
+
input: null | undefined,
|
|
323
336
|
options?: Intl.NumberFormatOptions
|
|
324
|
-
):
|
|
337
|
+
): undefined;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Format number
|
|
341
|
+
* @param input Input number
|
|
342
|
+
* @param options Options
|
|
343
|
+
* @returns Result
|
|
344
|
+
*/
|
|
345
|
+
formatNumber(
|
|
346
|
+
input: number | bigint,
|
|
347
|
+
options?: Intl.NumberFormatOptions
|
|
348
|
+
): string;
|
|
325
349
|
|
|
326
350
|
/**
|
|
327
351
|
* Do refresh token result
|
package/src/i18n/en-US.json
CHANGED
package/src/i18n/zh-CN.json
CHANGED