@oliasoft-open-source/react-ui-library 4.15.6-beta-1 → 4.15.6-beta-3

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 CHANGED
@@ -16,7 +16,7 @@ import * as PropTypes from "prop-types";
16
16
  import PropTypes__default from "prop-types";
17
17
  import ReactDOM, { createPortal, unstable_batchedUpdates, render } from "react-dom";
18
18
  import { noop as noop$3, set, get as get$2, isString as isString$3, isNumber as isNumber$1, isBoolean as isBoolean$2, isFunction as isFunction$3, isEmpty, isArray as isArray$1, toNumber, debounce as debounce$2, isObject as isObject$5, isEqual as isEqual$4 } from "lodash";
19
- import { toString as toString$1, isScientificStringNum, roundToPrecision, toNum, validateNumber, cleanNumStr, stripLeadingZeros, roundToFixed, roundByMagnitude, unitFromQuantity, getUnit, KNOWN_UNITS, ALT_UNITS, isValueWithUnit, getValue as getValue$1, withUnit, convertSamePrecision, convertAndGetValue, round as round$1, split as split$1, label as label$b, isValidNum, getAltUnitsListByQuantity, altUnitsList, getUnitsForQuantity, roundByMagnitudeToFixed } from "@oliasoft-open-source/units";
19
+ import { toString as toString$1, isScientificStringNum, roundToPrecision, toNum, validateNumber, cleanNumStr, stripLeadingZeros, roundToFixed, roundByMagnitude, unitFromQuantity, getUnit, KNOWN_UNITS, ALT_UNITS, isValueWithUnit, getValue as getValue$1, withUnit, convertSamePrecision, convertAndGetValue, split as split$1, label as label$b, isValidNum, getAltUnitsListByQuantity, altUnitsList, getUnitsForQuantity, roundByMagnitudeToFixed } from "@oliasoft-open-source/units";
20
20
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
21
21
  function getDefaultExportFromCjs(x2) {
22
22
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
@@ -20943,7 +20943,7 @@ const Trigger = ({
20943
20943
  evt.stopPropagation();
20944
20944
  onClickTrigger(evt);
20945
20945
  if (typeof setInputFocus === "function") {
20946
- requestAnimationFrame(() => setInputFocus());
20946
+ setInputFocus();
20947
20947
  }
20948
20948
  },
20949
20949
  onFocus,
@@ -70306,10 +70306,6 @@ const initializeContext = (context2) => {
70306
70306
  UnitContext = context2;
70307
70307
  }
70308
70308
  };
70309
- const safeRoundNumbers = (value) => {
70310
- const isScientific = isScientificStringNum(value);
70311
- return !isScientific ? safeToString(round$1(toNum(value))) : value;
70312
- };
70313
70309
  const predefinedMenuActive = "_predefinedMenuActive_ye9w9_1";
70314
70310
  const inputWrapper = "_inputWrapper_ye9w9_4";
70315
70311
  const styles = {
@@ -70616,7 +70612,7 @@ const UnitInput = ({
70616
70612
  sections: alternativeUnits.map(([value2, altUnit, label2]) => {
70617
70613
  const displayUnit = label2 || altUnit || "";
70618
70614
  const safeValue = isValidNum(value2) ? value2 : "";
70619
- const displayValue = enableCosmeticRounding ? safeRoundNumbers(safeValue) : safeValue;
70615
+ const displayValue = enableCosmeticRounding ? roundNumberCosmetic(safeValue) : safeValue;
70620
70616
  return {
70621
70617
  type: "Option",
70622
70618
  label: displayValue,