@oliasoft-open-source/react-ui-library 4.12.7 → 4.12.8

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.d.ts CHANGED
@@ -1546,7 +1546,7 @@ declare interface IUnitConfigItem {
1546
1546
  }
1547
1547
 
1548
1548
  export declare interface IUnitInputProps {
1549
- name: string | {
1549
+ name?: string | {
1550
1550
  fieldName?: string;
1551
1551
  };
1552
1552
  placeholder?: string;
package/dist/index.js CHANGED
@@ -70192,9 +70192,13 @@ const convertUnit = ({
70192
70192
  }) => {
70193
70193
  var _a2;
70194
70194
  const value = isValueWithUnit(inputValue) ? getValue$1(inputValue) : inputValue;
70195
+ const isInfinity = [Infinity, -Infinity].includes(Number(value));
70195
70196
  if (doNotConvertValue) {
70196
70197
  return { value, error: null };
70197
70198
  }
70199
+ if (isInfinity) {
70200
+ return { value, error: null };
70201
+ }
70198
70202
  const defaultFromUnit = fromUnit || (isValueWithUnit(inputValue) ? getUnit(inputValue) : unitFromQuantity(unitkey));
70199
70203
  if (!((_a2 = validateNumber(value)) == null ? void 0 : _a2.valid)) {
70200
70204
  return { value: void 0, error: "Invalid number format" };
@@ -70346,7 +70350,7 @@ const UnitInput = ({
70346
70350
  initialPredefinedOption ? PredefinedOptionsMenuState.PREDEFINED : PredefinedOptionsMenuState.CUSTOM
70347
70351
  );
70348
70352
  const isAutoValue = propValue === "" && autoValue;
70349
- const disableInternalErrorValidationMessages = !!(disabledValidation || autoValue);
70353
+ const disableInternalErrorValidationMessages = !!(disabledValidation || autoValue || disabled2);
70350
70354
  const foundPredefinedMenuOption = predefinedOptions && predefinedOptions.find((el2) => {
70351
70355
  if (!(el2 == null ? void 0 : el2.value)) return;
70352
70356
  if (selectedPredefinedOptionKey) {