Methods
(inner) formatNumericValue(params) → {string}
The formatNumericValue method will attempt to format params.newValue or params.value as localeString by passing the formatterParams to the localeString() method.
0 must be 0.
NULL is a number and must be parsed as float to be not a number [!isNaN].
The prefix and suffix are concatenated with the localString as params.stringValue.
Unless the formatterParams are NULL the mapp.language property will be assigned as locale for the localeString.
The maximumFractionDigits will be set to 0 for integer type params.
The maximumFractionDigits can be configured as params.round property.
Name | Type | Description |
---|---|---|
params | Object | The config object argument. |
Name | Type | Attributes | Description |
---|---|---|---|
params.suffix | String | Suffix appended to stringValue. | |
params.prefix | String | Prefix prepended to stringValue. | |
params.formatterParams | Object | Configuration for the localeString creation. | |
params.type | String | <optional> | "integer" type params must be formatted with maximumFractionDigits=0. |
params.round | Integer | <optional> | The round value will be assigned as maximumFractionDigits for the localeString options argument. |
- Source
The concatenated stringValue.
- Type:
- string
(inner) unformatStringValue(params) → {number|null}
This function removes the specified prefix and suffix from the input string, then unformats the remaining value based on the provided locale settings. It handles locale-specific decimal separators and removes non-numeric characters. The resulting numeric value is returned as a parsed float.
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params | Object | The configuration object. Properties
|
The numeric value extracted from the stringValue, or null if the input is empty or invalid.
- Type:
- number |
null