@oliasoft-open-source/react-ui-library 4.15.10-beta-2 → 4.16.0-beta-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.
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65867,6 +65867,10 @@ const initializeContext = (context2) => {
|
|
|
65867
65867
|
UnitContext = context2;
|
|
65868
65868
|
}
|
|
65869
65869
|
};
|
|
65870
|
+
const safeRoundNumbers = (value) => {
|
|
65871
|
+
const isScientific = isScientificStringNum(value);
|
|
65872
|
+
return !isScientific ? roundByMagnitude(value) : value;
|
|
65873
|
+
};
|
|
65870
65874
|
const predefinedMenuActive = "_predefinedMenuActive_ye9w9_1";
|
|
65871
65875
|
const inputWrapper = "_inputWrapper_ye9w9_4";
|
|
65872
65876
|
const styles = {
|
|
@@ -66175,7 +66179,7 @@ const UnitInput = ({
|
|
|
66175
66179
|
sections: alternativeUnits.map(([value2, altUnit, label2]) => {
|
|
66176
66180
|
const displayUnit = label2 || altUnit || "";
|
|
66177
66181
|
const safeValue = isValidNum(value2) ? value2 : "";
|
|
66178
|
-
const displayValue = enableCosmeticRounding ?
|
|
66182
|
+
const displayValue = enableCosmeticRounding ? safeRoundNumbers(safeValue) : safeValue;
|
|
66179
66183
|
return {
|
|
66180
66184
|
type: "Option",
|
|
66181
66185
|
label: displayValue,
|