@etsoo/materialui 1.0.75 → 1.0.77
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/texts/MoneyText.js
CHANGED
|
@@ -10,5 +10,7 @@ export function MoneyText(props) {
|
|
|
10
10
|
// Destruct
|
|
11
11
|
const { currency, isInteger = false, locale, options = {}, value, ...rest } = props;
|
|
12
12
|
// Layout
|
|
13
|
-
return (React.createElement(Typography, { component: "span", fontSize: "inherit", ...rest },
|
|
13
|
+
return (React.createElement(Typography, { component: "span", fontSize: "inherit", ...rest }, value == null
|
|
14
|
+
? ''
|
|
15
|
+
: NumberUtils.formatMoney(value, currency, locale, isInteger, options)));
|
|
14
16
|
}
|
package/lib/texts/NumberText.js
CHANGED
|
@@ -10,5 +10,5 @@ export function NumberText(props) {
|
|
|
10
10
|
// Destruct
|
|
11
11
|
const { locale, options = {}, value, ...rest } = props;
|
|
12
12
|
// Layout
|
|
13
|
-
return (React.createElement(Typography, { component: "span", fontSize: "inherit", ...rest }, NumberUtils.format(value, locale, options)));
|
|
13
|
+
return (React.createElement(Typography, { component: "span", fontSize: "inherit", ...rest }, value == null ? '' : NumberUtils.format(value, locale, options)));
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.77",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"@emotion/css": "^11.10.5",
|
|
52
52
|
"@emotion/react": "^11.10.5",
|
|
53
53
|
"@emotion/styled": "^11.10.5",
|
|
54
|
-
"@etsoo/appscript": "^1.3.
|
|
55
|
-
"@etsoo/notificationbase": "^1.1.
|
|
56
|
-
"@etsoo/react": "^1.6.
|
|
57
|
-
"@etsoo/shared": "^1.1.
|
|
54
|
+
"@etsoo/appscript": "^1.3.33",
|
|
55
|
+
"@etsoo/notificationbase": "^1.1.16",
|
|
56
|
+
"@etsoo/react": "^1.6.26",
|
|
57
|
+
"@etsoo/shared": "^1.1.77",
|
|
58
58
|
"@mui/icons-material": "^5.10.9",
|
|
59
59
|
"@mui/material": "^5.10.13",
|
|
60
60
|
"@types/pica": "^9.0.1",
|
package/src/texts/MoneyText.tsx
CHANGED
|
@@ -37,13 +37,15 @@ export function MoneyText(props: MoneyTextProps) {
|
|
|
37
37
|
// Layout
|
|
38
38
|
return (
|
|
39
39
|
<Typography component="span" fontSize="inherit" {...rest}>
|
|
40
|
-
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
{value == null
|
|
41
|
+
? ''
|
|
42
|
+
: NumberUtils.formatMoney(
|
|
43
|
+
value,
|
|
44
|
+
currency,
|
|
45
|
+
locale,
|
|
46
|
+
isInteger,
|
|
47
|
+
options
|
|
48
|
+
)}
|
|
47
49
|
</Typography>
|
|
48
50
|
);
|
|
49
51
|
}
|
package/src/texts/NumberText.tsx
CHANGED
|
@@ -19,7 +19,7 @@ export interface NumberTextProps extends TypographyProps {
|
|
|
19
19
|
/**
|
|
20
20
|
* Value
|
|
21
21
|
*/
|
|
22
|
-
value?: number | bigint;
|
|
22
|
+
value?: number | bigint | null;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -34,7 +34,7 @@ export function NumberText(props: NumberTextProps) {
|
|
|
34
34
|
// Layout
|
|
35
35
|
return (
|
|
36
36
|
<Typography component="span" fontSize="inherit" {...rest}>
|
|
37
|
-
{NumberUtils.format(value, locale, options)}
|
|
37
|
+
{value == null ? '' : NumberUtils.format(value, locale, options)}
|
|
38
38
|
</Typography>
|
|
39
39
|
);
|
|
40
40
|
}
|