@etsoo/materialui 1.4.22 → 1.4.24
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/README.md +2 -1
- package/__tests__/ReactAppTests.tsx +6 -4
- package/babel.config.json +12 -12
- package/lib/AddresSelector.d.ts +8 -2
- package/lib/AddresSelector.js +1 -1
- package/lib/AuditDisplay.d.ts +1 -1
- package/lib/BackButton.d.ts +1 -1
- package/lib/BackButton.js +5 -5
- package/lib/CountryList.d.ts +5 -4
- package/lib/CountryList.js +3 -3
- package/lib/CustomFabProps.d.ts +3 -3
- package/lib/DataGridEx.js +3 -6
- package/lib/DataGridRenderers.d.ts +3 -3
- package/lib/DataGridRenderers.js +17 -17
- package/lib/DataTable.d.ts +1 -7
- package/lib/DataTable.js +3 -13
- package/lib/DialogButton.d.ts +2 -2
- package/lib/DialogButton.js +4 -4
- package/lib/EmailInput.d.ts +2 -2
- package/lib/EmailInput.js +2 -2
- package/lib/FlexBox.d.ts +3 -3
- package/lib/FlexBox.js +1 -1
- package/lib/GridDataFormat.d.ts +2 -2
- package/lib/GridDataFormat.js +7 -7
- package/lib/GridUtils.js +2 -1
- package/lib/ListItemRightIcon.d.ts +1 -1
- package/lib/ListItemRightIcon.js +2 -2
- package/lib/LoadingButton.d.ts +1 -1
- package/lib/LoadingButton.js +2 -2
- package/lib/MUGlobal.d.ts +6 -6
- package/lib/MUGlobal.js +20 -22
- package/lib/MobileListItemRenderer.d.ts +3 -3
- package/lib/MobileListItemRenderer.js +8 -10
- package/lib/PList.js +1 -1
- package/lib/ProgressCount.js +12 -12
- package/lib/RegionsRQ.d.ts +22 -0
- package/lib/RegionsRQ.js +1 -0
- package/lib/SearchField.d.ts +1 -1
- package/lib/SearchField.js +4 -4
- package/lib/SearchOptionGroup.d.ts +2 -2
- package/lib/SearchOptionGroup.js +3 -3
- package/lib/Switch.d.ts +3 -3
- package/lib/Switch.js +5 -5
- package/lib/TabBox.d.ts +5 -5
- package/lib/TabBox.js +5 -5
- package/lib/TableEx.js +4 -7
- package/lib/TooltipClick.d.ts +3 -3
- package/lib/TooltipClick.js +3 -3
- package/lib/TwoFieldInput.d.ts +2 -2
- package/lib/TwoFieldInput.js +13 -13
- package/lib/app/IServicePage.d.ts +1 -1
- package/lib/app/Labels.d.ts +1 -1
- package/lib/app/Labels.js +31 -31
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/texts/MoneyText.d.ts +1 -1
- package/lib/texts/MoneyText.js +3 -3
- package/lib/texts/NumberText.d.ts +1 -1
- package/lib/texts/NumberText.js +3 -3
- package/package.json +20 -20
- package/src/AddresSelector.tsx +31 -4
- package/src/AuditDisplay.tsx +1 -1
- package/src/BackButton.tsx +39 -39
- package/src/CountryList.tsx +49 -48
- package/src/CustomFabProps.ts +19 -19
- package/src/DataGridEx.tsx +2 -7
- package/src/DataGridRenderers.tsx +119 -119
- package/src/DataTable.tsx +2 -31
- package/src/DialogButton.tsx +149 -151
- package/src/EmailInput.tsx +9 -11
- package/src/FlexBox.tsx +6 -6
- package/src/GridDataFormat.tsx +58 -58
- package/src/GridUtils.ts +2 -1
- package/src/ListItemRightIcon.tsx +3 -3
- package/src/LoadingButton.tsx +53 -53
- package/src/MUGlobal.ts +196 -203
- package/src/MobileListItemRenderer.tsx +63 -65
- package/src/NotifierPromptProps.ts +16 -16
- package/src/PList.tsx +14 -14
- package/src/ProgressCount.tsx +144 -148
- package/src/RegionsRQ.ts +26 -0
- package/src/SearchField.tsx +59 -59
- package/src/SearchOptionGroup.tsx +20 -20
- package/src/Switch.tsx +72 -72
- package/src/TabBox.tsx +87 -89
- package/src/TableEx.tsx +5 -8
- package/src/TooltipClick.tsx +62 -64
- package/src/TwoFieldInput.tsx +104 -104
- package/src/app/IServicePage.ts +1 -1
- package/src/app/Labels.ts +67 -67
- package/src/index.ts +1 -0
- package/src/texts/MoneyText.tsx +29 -35
- package/src/texts/NumberText.tsx +23 -23
package/src/TwoFieldInput.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Input, InputAdornment } from
|
|
2
|
-
import ArrowRightAltIcon from
|
|
3
|
-
import { useDimensions } from
|
|
4
|
-
import React from
|
|
5
|
-
import { DateUtils, DomUtils } from
|
|
6
|
-
import { InputField, InputFieldProps } from
|
|
1
|
+
import { Input, InputAdornment } from "@mui/material";
|
|
2
|
+
import ArrowRightAltIcon from "@mui/icons-material/ArrowRightAlt";
|
|
3
|
+
import { useDimensions } from "@etsoo/react";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { DateUtils, DomUtils } from "@etsoo/shared";
|
|
6
|
+
import { InputField, InputFieldProps } from "./InputField";
|
|
7
7
|
|
|
8
8
|
type ValueType = string | number | Date | null | undefined;
|
|
9
9
|
|
|
@@ -11,20 +11,20 @@ type ValueType = string | number | Date | null | undefined;
|
|
|
11
11
|
* TwoField Input props
|
|
12
12
|
*/
|
|
13
13
|
export type TwoFieldInputProps = Omit<
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
InputFieldProps,
|
|
15
|
+
"InputProps" | "value"
|
|
16
16
|
> & {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Values
|
|
19
|
+
*/
|
|
20
|
+
values?: unknown | [ValueType, ValueType];
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
/**
|
|
23
|
+
* On values change, return false to prevent further onChange handler
|
|
24
|
+
*/
|
|
25
|
+
onValuesChange?: (
|
|
26
|
+
values: [ValueType, ValueType]
|
|
27
|
+
) => boolean | void | Promise<boolean | void>;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -33,99 +33,99 @@ export type TwoFieldInputProps = Omit<
|
|
|
33
33
|
* @returns Component
|
|
34
34
|
*/
|
|
35
35
|
export function TwoFieldInput(props: TwoFieldInputProps) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
// Destruct
|
|
37
|
+
const {
|
|
38
|
+
name,
|
|
39
|
+
inputProps,
|
|
40
|
+
type = inputProps?.inputMode,
|
|
41
|
+
values,
|
|
42
|
+
onValuesChange,
|
|
43
|
+
onChange,
|
|
44
|
+
onInput,
|
|
45
|
+
...rest
|
|
46
|
+
} = props;
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
// Local values
|
|
49
|
+
const localValues: [ValueType, ValueType] =
|
|
50
|
+
values == null
|
|
51
|
+
? [null, null]
|
|
52
|
+
: Array.isArray(values)
|
|
53
|
+
? (values as [ValueType, ValueType])
|
|
54
|
+
: [values as ValueType, null];
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
// Ref
|
|
57
|
+
const valueRef = React.useRef<[ValueType, ValueType]>(localValues);
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
59
|
+
// Watch container
|
|
60
|
+
const { dimensions } = useDimensions(
|
|
61
|
+
1,
|
|
62
|
+
(target, rect) => {
|
|
63
|
+
const width = (rect.width - 64) / 2;
|
|
64
|
+
const inputs = target.querySelectorAll("input");
|
|
65
|
+
inputs[0].style.width = `${width}px`;
|
|
66
|
+
inputs[1].parentElement!.style.width = `${width}px`;
|
|
67
|
+
},
|
|
68
|
+
0
|
|
69
|
+
);
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
// Handle change
|
|
72
|
+
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
73
|
+
const value = DomUtils.getInputValue(event.target);
|
|
74
|
+
const index = event.target.name.endsWith("-start") ? 0 : 1;
|
|
75
|
+
valueRef.current[index] = value;
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
if (onValuesChange) {
|
|
78
|
+
if (onValuesChange(valueRef.current) === false) return;
|
|
79
|
+
}
|
|
80
|
+
if (onChange) onChange(event);
|
|
81
|
+
};
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
const formatValue = (v: ValueType, type?: string) => {
|
|
84
|
+
if (v == null) return "";
|
|
85
|
+
if (typeof v === "number") return v;
|
|
86
|
+
if (type === "date" || type === "datetime-local")
|
|
87
|
+
return DateUtils.formatForInput(v, type);
|
|
88
|
+
return v;
|
|
89
|
+
};
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
React.useEffect(() => {
|
|
92
|
+
valueRef.current = localValues;
|
|
93
|
+
}, [localValues]);
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}}
|
|
112
|
-
>
|
|
113
|
-
<ArrowRightAltIcon />
|
|
114
|
-
<Input
|
|
115
|
-
type={type}
|
|
116
|
-
name={`${name}-end`}
|
|
117
|
-
value={formatValue(localValues[1], type)}
|
|
118
|
-
disableUnderline
|
|
119
|
-
onInput={onInput}
|
|
120
|
-
onChange={handleChange}
|
|
121
|
-
inputProps={inputProps}
|
|
122
|
-
/>
|
|
123
|
-
</InputAdornment>
|
|
124
|
-
)
|
|
95
|
+
// Layout
|
|
96
|
+
return (
|
|
97
|
+
<InputField
|
|
98
|
+
name={`${name}-start`}
|
|
99
|
+
type={type}
|
|
100
|
+
value={formatValue(localValues[0], type)}
|
|
101
|
+
ref={dimensions[0][0]}
|
|
102
|
+
inputProps={inputProps}
|
|
103
|
+
InputProps={{
|
|
104
|
+
endAdornment: (
|
|
105
|
+
<InputAdornment
|
|
106
|
+
position="end"
|
|
107
|
+
sx={{
|
|
108
|
+
display: "flex",
|
|
109
|
+
alignItems: "center",
|
|
110
|
+
gap: 1
|
|
125
111
|
}}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
112
|
+
>
|
|
113
|
+
<ArrowRightAltIcon />
|
|
114
|
+
<Input
|
|
115
|
+
type={type}
|
|
116
|
+
name={`${name}-end`}
|
|
117
|
+
value={formatValue(localValues[1], type)}
|
|
118
|
+
disableUnderline
|
|
119
|
+
onInput={onInput}
|
|
120
|
+
onChange={handleChange}
|
|
121
|
+
inputProps={inputProps}
|
|
122
|
+
/>
|
|
123
|
+
</InputAdornment>
|
|
124
|
+
)
|
|
125
|
+
}}
|
|
126
|
+
onInput={onInput}
|
|
127
|
+
onChange={handleChange}
|
|
128
|
+
{...rest}
|
|
129
|
+
/>
|
|
130
|
+
);
|
|
131
131
|
}
|
package/src/app/IServicePage.ts
CHANGED
package/src/app/Labels.ts
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { DataTypes, Utils } from
|
|
1
|
+
import { DataTypes, Utils } from "@etsoo/shared";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Labels
|
|
5
5
|
*/
|
|
6
6
|
export namespace Labels {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Common page labels
|
|
9
|
+
*/
|
|
10
|
+
export const CommonPage = {
|
|
11
|
+
add: "Add",
|
|
12
|
+
back: "Back",
|
|
13
|
+
delete: "Delete",
|
|
14
|
+
more: "More",
|
|
15
|
+
pullToRefresh: "Pull down to refresh",
|
|
16
|
+
refresh: "Refresh",
|
|
17
|
+
refreshing: "Refreshing",
|
|
18
|
+
releaseToRefresh: "Release to refresh",
|
|
19
|
+
reset: "Reset",
|
|
20
|
+
save: "Save",
|
|
21
|
+
scrollTop: "Scroll to top",
|
|
22
|
+
submit: "Submit"
|
|
23
|
+
};
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Notification MU labels
|
|
27
|
+
*/
|
|
28
|
+
export const NotificationMU = {
|
|
29
|
+
alertTitle: "Warning",
|
|
30
|
+
alertOK: "OK",
|
|
31
|
+
confirmTitle: "Confirm",
|
|
32
|
+
confirmYes: "OK",
|
|
33
|
+
confirmNo: "Cancel",
|
|
34
|
+
promptTitle: "Input",
|
|
35
|
+
promptCancel: "Cancel",
|
|
36
|
+
promptOK: "OK",
|
|
37
|
+
loading: "Loading",
|
|
38
|
+
success: "Success",
|
|
39
|
+
warning: "Warning",
|
|
40
|
+
info: "Information"
|
|
41
|
+
};
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
/**
|
|
44
|
+
* UserAvatarEditor labels
|
|
45
|
+
*/
|
|
46
|
+
export const UserAvatarEditor = {
|
|
47
|
+
done: "Done",
|
|
48
|
+
reset: "Reset",
|
|
49
|
+
rotateLeft: "Rotate left 90°",
|
|
50
|
+
rotateRight: "Rotate right 90°",
|
|
51
|
+
upload: "Upload",
|
|
52
|
+
zoom: "Zoom"
|
|
53
|
+
};
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
/**
|
|
56
|
+
* setLabelReference key reference
|
|
57
|
+
*/
|
|
58
|
+
export interface setLabelsReference {
|
|
59
|
+
commonPage?: DataTypes.StringDictionary;
|
|
60
|
+
notificationMU?: DataTypes.StringDictionary;
|
|
61
|
+
userAvatarEditor?: DataTypes.StringDictionary;
|
|
62
|
+
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Set components' labels
|
|
66
|
+
* @param labels Labels
|
|
67
|
+
* @param reference Key reference
|
|
68
|
+
*/
|
|
69
|
+
export const setLabels = (
|
|
70
|
+
labels: DataTypes.StringRecord,
|
|
71
|
+
reference: setLabelsReference = {}
|
|
72
|
+
) => {
|
|
73
|
+
Utils.setLabels(CommonPage, labels, reference.commonPage);
|
|
74
|
+
Utils.setLabels(NotificationMU, labels, reference.notificationMU);
|
|
75
|
+
Utils.setLabels(UserAvatarEditor, labels, reference.userAvatarEditor);
|
|
76
|
+
};
|
|
77
77
|
}
|
package/src/index.ts
CHANGED
|
@@ -94,6 +94,7 @@ export * from "./PList";
|
|
|
94
94
|
export * from "./ProgressCount";
|
|
95
95
|
export * from "./PullToRefreshUI";
|
|
96
96
|
export * from "./QuickList";
|
|
97
|
+
export * from "./RegionsRQ";
|
|
97
98
|
export * from "./ResponsibleContainer";
|
|
98
99
|
export * from "./ResponsiveStyleValue";
|
|
99
100
|
export * from "./ScrollerListEx";
|
package/src/texts/MoneyText.tsx
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { NumberUtils } from
|
|
2
|
-
import { Typography } from
|
|
3
|
-
import React from
|
|
4
|
-
import { NumberTextProps } from
|
|
1
|
+
import { NumberUtils } from "@etsoo/shared";
|
|
2
|
+
import { Typography } from "@mui/material";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { NumberTextProps } from "./NumberText";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Money text props
|
|
8
8
|
*/
|
|
9
9
|
export interface MoneyTextProps extends NumberTextProps {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Currency, USD for US dollar
|
|
12
|
+
*/
|
|
13
|
+
currency?: string;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Is integer number
|
|
17
|
+
*/
|
|
18
|
+
isInteger?: boolean;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -24,28 +24,22 @@ export interface MoneyTextProps extends NumberTextProps {
|
|
|
24
24
|
* @returns Component
|
|
25
25
|
*/
|
|
26
26
|
export function MoneyText(props: MoneyTextProps) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
// Destruct
|
|
28
|
+
const {
|
|
29
|
+
currency,
|
|
30
|
+
isInteger = false,
|
|
31
|
+
locale,
|
|
32
|
+
options = {},
|
|
33
|
+
value,
|
|
34
|
+
...rest
|
|
35
|
+
} = props;
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
locale,
|
|
46
|
-
isInteger,
|
|
47
|
-
options
|
|
48
|
-
)}
|
|
49
|
-
</Typography>
|
|
50
|
-
);
|
|
37
|
+
// Layout
|
|
38
|
+
return (
|
|
39
|
+
<Typography component="span" fontSize="inherit" {...rest}>
|
|
40
|
+
{value == null
|
|
41
|
+
? ""
|
|
42
|
+
: NumberUtils.formatMoney(value, currency, locale, isInteger, options)}
|
|
43
|
+
</Typography>
|
|
44
|
+
);
|
|
51
45
|
}
|
package/src/texts/NumberText.tsx
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { NumberUtils } from
|
|
2
|
-
import { Typography, TypographyProps } from
|
|
3
|
-
import React from
|
|
1
|
+
import { NumberUtils } from "@etsoo/shared";
|
|
2
|
+
import { Typography, TypographyProps } from "@mui/material";
|
|
3
|
+
import React from "react";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Number text props
|
|
7
7
|
*/
|
|
8
8
|
export interface NumberTextProps extends TypographyProps {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Locale
|
|
11
|
+
*/
|
|
12
|
+
locale?: string | string[];
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Options
|
|
16
|
+
*/
|
|
17
|
+
options?: Intl.NumberFormatOptions;
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Value
|
|
21
|
+
*/
|
|
22
|
+
value?: number | bigint | null;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -28,13 +28,13 @@ export interface NumberTextProps extends TypographyProps {
|
|
|
28
28
|
* @returns Component
|
|
29
29
|
*/
|
|
30
30
|
export function NumberText(props: NumberTextProps) {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
// Destruct
|
|
32
|
+
const { locale, options = {}, value, ...rest } = props;
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
// Layout
|
|
35
|
+
return (
|
|
36
|
+
<Typography component="span" fontSize="inherit" {...rest}>
|
|
37
|
+
{value == null ? "" : NumberUtils.format(value, locale, options)}
|
|
38
|
+
</Typography>
|
|
39
|
+
);
|
|
40
40
|
}
|