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

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.
Files changed (91) hide show
  1. package/dist/404.html +1 -0
  2. package/dist/index.js +78 -58
  3. package/dist/index.js.map +1 -1
  4. package/dist/storybook/assets/{Color-KGDBMAHA-DeGjmgTY.js → Color-KGDBMAHA-C4DMqLTk.js} +1 -1
  5. package/dist/storybook/assets/{DocsRenderer-PKQXORMH-DJIj_qEG.js → DocsRenderer-PKQXORMH-4sK5I5fh.js} +1 -1
  6. package/dist/storybook/assets/{accordion.stories-BTxV-ybU.js → accordion.stories-BSRBp5Mg.js} +2 -2
  7. package/dist/storybook/assets/{afe.stories-DFQsvqIV.js → afe.stories-DM18uTAa.js} +2 -2
  8. package/dist/storybook/assets/{buttons-and-links-BHGzZGPV.js → buttons-and-links-BAJT7RF7.js} +1 -1
  9. package/dist/storybook/assets/{casing-loads.stories-CJpnsmsZ.js → casing-loads.stories-CE6GJ021.js} +2 -2
  10. package/dist/storybook/assets/{cell.stories-Bpl0Squh.js → cell.stories-BkZwSf40.js} +2 -2
  11. package/dist/storybook/assets/check-box.stories-BJ0ShmeC.js +97 -0
  12. package/dist/storybook/assets/check-box.test-case.stories-CzuYZkUh.js +30 -0
  13. package/dist/storybook/assets/{chunk-HLWAVYOI-D2p4xoma.js → chunk-HLWAVYOI-wyESLsMA.js} +1 -1
  14. package/dist/storybook/assets/{color-D9KYOiNh.js → color-CXm-Xks7.js} +1 -1
  15. package/dist/storybook/assets/enum-Bnn40S8Q.js +1 -0
  16. package/dist/storybook/assets/footer.stories-C1SojIiD.js +3 -0
  17. package/dist/storybook/assets/form.stories-BLcmnfy8.js +49 -0
  18. package/dist/storybook/assets/{formation.stories-BT8VrcqV.js → formation.stories-DZ9-Ct5F.js} +2 -2
  19. package/dist/storybook/assets/helpers-JJxzGegQ.js +1 -0
  20. package/dist/storybook/assets/iframe-DGCZgYKU.js +2 -0
  21. package/dist/storybook/assets/{index-C0Iaso0O.js → index-D-ApmKaY.js} +88 -88
  22. package/dist/storybook/assets/{index-CNkaN_wz.js → index-DHATsyTR.js} +1 -1
  23. package/dist/storybook/assets/{input-group.stories-CElwRt3p.js → input-group.stories-EhmORqH9.js} +3 -3
  24. package/dist/storybook/assets/{input-validation-Ccgprl1C.js → input-validation-BdnKKR1J.js} +2 -2
  25. package/dist/storybook/assets/{inputs-DtQ245kS.js → inputs-Cpi6xZLB.js} +2 -2
  26. package/dist/storybook/assets/{layout-forms-Bm7FYA3V.js → layout-forms-DxC0zO_Y.js} +5 -5
  27. package/dist/storybook/assets/{layout-general-V7ekuEG7.js → layout-general-Be4RMwPl.js} +1 -1
  28. package/dist/storybook/assets/menu.stories-DLJSzJa-.js +82 -0
  29. package/dist/storybook/assets/menu.test-case.stories-DyrNbGBs.js +3 -0
  30. package/dist/storybook/assets/modal.stories-DOgeTuHT.js +200 -0
  31. package/dist/storybook/assets/modal.test-case.stories-DQ1Izuq6.js +21 -0
  32. package/dist/storybook/assets/{number-input-Bpg4Yqmo.js → number-input-CJJvhIIv.js} +1 -1
  33. package/dist/storybook/assets/number-input.stories-CKVq60XH.js +89 -0
  34. package/dist/storybook/assets/number-input.test-case.stories-Dh1F7N8M.js +92 -0
  35. package/dist/storybook/assets/{padding-and-spacing-IKi7rvQ-.js → padding-and-spacing-BZdh5XRo.js} +1 -1
  36. package/dist/storybook/assets/{pagination-CLt-kUlx.js → pagination-DWc8zp3k.js} +1 -1
  37. package/dist/storybook/assets/{pagination.stories-CTRM0Xou.js → pagination.stories-B5cOvzik.js} +2 -2
  38. package/dist/storybook/assets/popover.stories-p9_-pH_Q.js +10 -0
  39. package/dist/storybook/assets/{preview-ZgLLfBPl.js → preview-B3bzTGOp.js} +2 -2
  40. package/dist/storybook/assets/{preview-CtQzjqBP.js → preview-NGnahGuq.js} +1 -1
  41. package/dist/storybook/assets/{projects.stories-BQswWVCx.js → projects.stories-Co_WnKSx.js} +2 -2
  42. package/dist/storybook/assets/{radio-button-DmDuw4DA.js → radio-button-C4ljBRED.js} +1 -1
  43. package/dist/storybook/assets/radio-button.stories-D1rWr6ms.js +61 -0
  44. package/dist/storybook/assets/radio-button.test-case.stories-DglmHlWs.js +11 -0
  45. package/dist/storybook/assets/{reservoirs.stories-B12tIrmZ.js → reservoirs.stories-UW_8sofe.js} +2 -2
  46. package/dist/storybook/assets/{rich-text-input.stories-DkaOBgbE.js → rich-text-input.stories-CK_OTGiV.js} +3 -3
  47. package/dist/storybook/assets/{row.stories-msEoNdGI.js → row.stories-D11wLSt6.js} +2 -2
  48. package/dist/storybook/assets/select-03uRbc4I.js +61 -0
  49. package/dist/storybook/assets/select.input-CJed_LLR.js +1 -0
  50. package/dist/storybook/assets/select.stories-Bpffz9TF.js +498 -0
  51. package/dist/storybook/assets/select.stories-data-DxgWKlU6.js +1 -0
  52. package/dist/storybook/assets/select.test-case.stories-DwDNDHax.js +82 -0
  53. package/dist/storybook/assets/{site.stories-umpPYjkq.js → site.stories-ZGohyW6Z.js} +2 -2
  54. package/dist/storybook/assets/{table-5Y5KPNSk.js → table-DyOsClUv.js} +1 -1
  55. package/dist/storybook/assets/{table.stories-Clltxls0.js → table.stories-C1GgZCCR.js} +2 -2
  56. package/dist/storybook/assets/{tabs-C3NG6m9W.js → tabs-BoToLVEP.js} +1 -1
  57. package/dist/storybook/assets/tabs.stories-B52iEaHf.js +30 -0
  58. package/dist/storybook/assets/{title.stories-CsrYTGde.js → title.stories-jatDyjoM.js} +3 -3
  59. package/dist/storybook/assets/toaster.stories-G6nKp3uV.js +84 -0
  60. package/dist/storybook/assets/toaster.test-case.stories-CCHTh_U1.js +6 -0
  61. package/dist/storybook/assets/toggle.stories-BAislK3I.js +106 -0
  62. package/dist/storybook/assets/toggle.test-case.stories-CeUwdhGD.js +36 -0
  63. package/dist/storybook/assets/{tooltip.test-case.stories-CHibN8rC.js → tooltip.test-case.stories-C0wxGvKJ.js} +1 -1
  64. package/dist/storybook/assets/unit-input-CooRJQnF.js +10 -0
  65. package/dist/storybook/assets/unit-input.stories-zmSrl6iW.js +198 -0
  66. package/dist/storybook/assets/unit-input.test-case.stories-C1xRJ1EZ.js +220 -0
  67. package/dist/storybook/assets/unit-table.stories-Bl2gHPKG.js +152 -0
  68. package/dist/storybook/assets/unit-table.test-case.stories-DpSewGv4.js +1 -0
  69. package/dist/storybook/assets/use-previous-D775JrO6.js +1 -0
  70. package/dist/storybook/iframe.html +1 -1
  71. package/dist/storybook/index.json +1 -1
  72. package/dist/storybook/project.json +1 -1
  73. package/package.json +1 -1
  74. package/dist/storybook/assets/check-box.stories-DfbWw6mD.js +0 -126
  75. package/dist/storybook/assets/footer.stories-DgjDE_JR.js +0 -3
  76. package/dist/storybook/assets/form.stories-BrUnmw7R.js +0 -49
  77. package/dist/storybook/assets/iframe-B8VgeFPT.js +0 -2
  78. package/dist/storybook/assets/initialize-context-DOqEe1Xq.js +0 -1
  79. package/dist/storybook/assets/menu.stories-xWX80Eh2.js +0 -84
  80. package/dist/storybook/assets/modal.stories-LhoWfDE6.js +0 -220
  81. package/dist/storybook/assets/number-input.stories-DhCjZ37u.js +0 -180
  82. package/dist/storybook/assets/popover.stories-CGm0M5fv.js +0 -10
  83. package/dist/storybook/assets/radio-button.stories-5gvV0LD0.js +0 -71
  84. package/dist/storybook/assets/select-DnRuRG_N.js +0 -61
  85. package/dist/storybook/assets/select.input-D0UkAPd9.js +0 -1
  86. package/dist/storybook/assets/select.stories-B9w9ONzj.js +0 -579
  87. package/dist/storybook/assets/tabs.stories-dsXjRHJy.js +0 -30
  88. package/dist/storybook/assets/toaster.stories-HO4VBTy-.js +0 -89
  89. package/dist/storybook/assets/toggle.stories-qTHFTXxI.js +0 -141
  90. package/dist/storybook/assets/unit-input.stories-QnEpR0rY.js +0 -426
  91. package/dist/storybook/assets/unit-table.stories-BZCc0yfc.js +0 -152
package/dist/404.html ADDED
@@ -0,0 +1 @@
1
+ <!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-DoFa61ar.js"></script><link rel="stylesheet" crossorigin href="/react-ui-library/assets/index-BpSdrNXy.css"></head><body><div id="content"></div></body>
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, roundToFixed, validateNumber, cleanNumStr, stripLeadingZeros, unitFromQuantity, ALT_UNITS, isValueWithUnit, withUnit, convertSamePrecision, getValue as getValue$1, getUnit, KNOWN_UNITS, split as split$1, label as label$b, isValidNum, getAltUnitsListByQuantity, altUnitsList, convertAndGetValue, getUnitsForQuantity, roundByMagnitudeToFixed } from "@oliasoft-open-source/units";
19
+ import { toString as toString$1, isScientificStringNum, roundToPrecision, toNum, roundToFixed, validateNumber, cleanNumStr, stripLeadingZeros, unitFromQuantity, getUnit, ALT_UNITS, isValueWithUnit, getValue as getValue$1, withUnit, convertSamePrecision, convertAndGetValue, KNOWN_UNITS, 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;
@@ -55766,7 +55766,6 @@ const NumberInput = ({
55766
55766
  };
55767
55767
  const onInputBlur = (evt) => {
55768
55768
  setFocus(false);
55769
- onChangeValue(evt);
55770
55769
  onBlur(evt);
55771
55770
  };
55772
55771
  const shouldDisplayRound = enableDisplayRounding && !focus2 && valid;
@@ -70176,6 +70175,10 @@ var PredefinedOptionsMenuState = /* @__PURE__ */ ((PredefinedOptionsMenuState2)
70176
70175
  const isWrongValue = (val) => {
70177
70176
  return val === "undefined" || val === void 0 || val === "" || val === "null" || val === null || val === "NaN" || isNaN(val);
70178
70177
  };
70178
+ const isValueWithUnknownUnit = (value) => {
70179
+ if (!value) return false;
70180
+ return Boolean(getUnit(value));
70181
+ };
70179
70182
  const checkConversion = ({
70180
70183
  value,
70181
70184
  unitkey,
@@ -70194,31 +70197,43 @@ const checkConversion = ({
70194
70197
  }
70195
70198
  return true;
70196
70199
  };
70197
- const convertUnit = (stringValue = "", toUnit, unitkey, defaultFromUnit = "", doNotConvertValue = false) => {
70200
+ const convertUnit = ({
70201
+ value: inputValue,
70202
+ unitkey,
70203
+ toUnit,
70204
+ fromUnit,
70205
+ doNotConvertValue = false,
70206
+ exactPrecision = false
70207
+ }) => {
70198
70208
  var _a2;
70199
- if (doNotConvertValue) return stringValue;
70200
- if (!((_a2 = validateNumber(stringValue)) == null ? void 0 : _a2.valid)) return;
70201
- if (toUnit && !isWrongValue(stringValue)) {
70202
- try {
70203
- const valueWithUnit = isValueWithUnit(stringValue) ? stringValue : withUnit(stringValue, defaultFromUnit);
70204
- const shouldConvert = checkConversion({
70205
- value: valueWithUnit,
70206
- toUnit,
70207
- unitkey
70208
- });
70209
- if (shouldConvert) {
70210
- const result = convertSamePrecision(valueWithUnit, toUnit);
70211
- return getValue$1(result);
70212
- }
70213
- return getValue$1(valueWithUnit);
70214
- } catch (e2) {
70209
+ const value = isValueWithUnit(inputValue) ? getValue$1(inputValue) : inputValue;
70210
+ if (doNotConvertValue) {
70211
+ return { value, error: null };
70212
+ }
70213
+ const defaultFromUnit = fromUnit || (isValueWithUnit(inputValue) ? getUnit(inputValue) : unitFromQuantity(unitkey));
70214
+ if (!((_a2 = validateNumber(value)) == null ? void 0 : _a2.valid)) {
70215
+ return { value: void 0, error: "Invalid number format" };
70216
+ }
70217
+ if (!toUnit) {
70218
+ return { value: void 0, error: "Target unit is missing" };
70219
+ }
70220
+ if (!defaultFromUnit) {
70221
+ return { value: void 0, error: "Source unit is missing" };
70222
+ }
70223
+ if (isWrongValue(value)) {
70224
+ return { value: void 0, error: "Value is invalid for conversion" };
70225
+ }
70226
+ try {
70227
+ const valueWithUnit = withUnit(value, defaultFromUnit);
70228
+ if (checkConversion({ value: valueWithUnit, toUnit, unitkey })) {
70229
+ const result = exactPrecision ? convertSamePrecision(valueWithUnit, toUnit) : convertAndGetValue(valueWithUnit, toUnit);
70230
+ return { value: getValue$1(safeToString(result)), error: null };
70215
70231
  }
70232
+ return { value: getValue$1(valueWithUnit), error: null };
70233
+ } catch (e2) {
70234
+ return { value: void 0, error: "Conversion not possible" };
70216
70235
  }
70217
70236
  };
70218
- const isValueWithUnknownUnit = (value) => {
70219
- if (!value) return false;
70220
- return Boolean(getUnit(value));
70221
- };
70222
70237
  const safeConvertValue = ({
70223
70238
  value = "",
70224
70239
  toUnit,
@@ -70230,18 +70245,19 @@ const safeConvertValue = ({
70230
70245
  const rawValue = getValue$1(value);
70231
70246
  const isInvalidInput = isWrongValue(rawValue);
70232
70247
  if (isInvalidInput) {
70233
- return rawValue;
70248
+ return { value: rawValue };
70234
70249
  }
70235
70250
  if (!isWithUnit) {
70236
- return value;
70251
+ return { value };
70237
70252
  }
70238
- return convertUnit(
70239
- rawValue,
70240
- toUnit,
70253
+ return convertUnit({
70254
+ value,
70241
70255
  unitkey,
70242
- defaultFromUnit,
70243
- doNotConvertValue
70244
- );
70256
+ toUnit,
70257
+ fromUnit: defaultFromUnit,
70258
+ doNotConvertValue,
70259
+ exactPrecision: true
70260
+ });
70245
70261
  };
70246
70262
  const getStringName = (name2) => {
70247
70263
  if (isObject$5(name2) && !isArray$1(name2) && !isFunction$3(name2)) {
@@ -70321,14 +70337,14 @@ const UnitInput = ({
70321
70337
  const knownUnit = isKnownUnit(value, preferredUnit);
70322
70338
  const initDisplayUnit = initUnit || preferredUnit || propUnit;
70323
70339
  const previousInitUnit = usePrevious(initDisplayUnit);
70324
- const convertedValue = safeConvertValue({
70340
+ const { value: convertedValue } = safeConvertValue({
70325
70341
  value,
70326
70342
  toUnit: initDisplayUnit,
70327
70343
  unitkey,
70328
70344
  defaultFromUnit: propUnit,
70329
70345
  doNotConvertValue
70330
70346
  });
70331
- const convertedAutoValue = safeConvertValue({
70347
+ const { value: convertedAutoValue } = safeConvertValue({
70332
70348
  value: autoValue,
70333
70349
  toUnit: initDisplayUnit,
70334
70350
  unitkey,
@@ -70337,7 +70353,7 @@ const UnitInput = ({
70337
70353
  });
70338
70354
  const initDisplayLayer = convertedValue !== "" ? { value: convertedValue, unit: initDisplayUnit } : convertedAutoValue !== "" ? { value: convertedAutoValue, unit: initDisplayUnit } : { value: propValue, unit: propUnit };
70339
70355
  const [displayLayer, setDisplayLayer] = useState(initDisplayLayer);
70340
- const derivedAllowEmpty = (displayLayer == null ? void 0 : displayLayer.value) === void 0;
70356
+ const derivedAllowEmpty = allowEmpty || (displayLayer == null ? void 0 : displayLayer.value) === void 0;
70341
70357
  const [predefinedOptionsMenuState, setPredefinedOptionsMenuState] = useState(
70342
70358
  initialPredefinedOption ? PredefinedOptionsMenuState.PREDEFINED : PredefinedOptionsMenuState.CUSTOM
70343
70359
  );
@@ -70349,10 +70365,12 @@ const UnitInput = ({
70349
70365
  return selectedPredefinedOptionKey === el2.valueKey;
70350
70366
  }
70351
70367
  const predefinedMenuItemUnit = isValueWithUnit(el2.value) ? getUnit(el2.value) : "";
70352
- return withUnit(
70353
- convertUnit(value, predefinedMenuItemUnit, unitkey),
70354
- predefinedMenuItemUnit
70355
- ) === el2.value;
70368
+ const { value: resultValue = value } = convertUnit({
70369
+ value: String(value),
70370
+ unitkey,
70371
+ toUnit: predefinedMenuItemUnit
70372
+ });
70373
+ return withUnit(resultValue, predefinedMenuItemUnit) === el2.value;
70356
70374
  });
70357
70375
  const getAlternativeUnits = () => {
70358
70376
  const valueToList = isAutoValue ? autoValue : value ?? "";
@@ -70409,22 +70427,24 @@ const UnitInput = ({
70409
70427
  if (initDisplayUnit) {
70410
70428
  let newValue, newUnit = "";
70411
70429
  if (previousInitUnit !== initDisplayUnit) {
70412
- newValue = safeConvertValue({
70430
+ const { value: resultValue } = safeConvertValue({
70413
70431
  value,
70414
70432
  toUnit: initDisplayUnit,
70415
70433
  unitkey,
70416
70434
  defaultFromUnit: propUnit,
70417
70435
  doNotConvertValue
70418
70436
  });
70437
+ newValue = resultValue;
70419
70438
  newUnit = initDisplayUnit;
70420
70439
  } else if (withUnit(displayLayer.value, displayLayer.unit) !== value) {
70421
- newValue = safeConvertValue({
70440
+ const { value: resultValue } = safeConvertValue({
70422
70441
  value,
70423
70442
  toUnit: displayLayer.unit,
70424
70443
  unitkey,
70425
70444
  defaultFromUnit: propUnit,
70426
70445
  doNotConvertValue
70427
70446
  });
70447
+ newValue = resultValue;
70428
70448
  newUnit = displayLayer.unit;
70429
70449
  }
70430
70450
  if (newValue !== void 0) {
@@ -70496,22 +70516,24 @@ const UnitInput = ({
70496
70516
  }
70497
70517
  const getPlaceholder = (placeholder22) => {
70498
70518
  if (isAutoValue) {
70499
- return safeConvertValue({
70519
+ const { value: resultValue } = safeConvertValue({
70500
70520
  value: autoValue,
70501
70521
  toUnit: displayLayer.unit,
70502
70522
  unitkey,
70503
70523
  defaultFromUnit: propAutoUnit,
70504
70524
  doNotConvertValue
70505
70525
  });
70526
+ return resultValue;
70506
70527
  } else if (isValueWithUnit(placeholder22)) {
70507
70528
  const placeholderUnit = getUnit(placeholder22);
70508
- return safeConvertValue({
70529
+ const { value: resultValue } = safeConvertValue({
70509
70530
  value: placeholder22,
70510
70531
  toUnit: displayLayer.unit,
70511
70532
  unitkey,
70512
70533
  defaultFromUnit: placeholderUnit,
70513
70534
  doNotConvertValue
70514
70535
  });
70536
+ return resultValue;
70515
70537
  }
70516
70538
  return placeholder22;
70517
70539
  };
@@ -70616,20 +70638,6 @@ const normalizeUnits = (unitConfig) => unitConfig.reduce(
70616
70638
  },
70617
70639
  { preferredUnits: {}, storageUnits: {} }
70618
70640
  );
70619
- const tryConvertValue = (value, unitKey, selectedUnit, storageUnit) => {
70620
- if (checkConversion({
70621
- value,
70622
- unitkey: unitKey,
70623
- toUnit: selectedUnit
70624
- })) {
70625
- try {
70626
- return convertAndGetValue(value, selectedUnit, storageUnit);
70627
- } catch {
70628
- return value;
70629
- }
70630
- }
70631
- return value;
70632
- };
70633
70641
  const convertVisibleRows = ({
70634
70642
  headers,
70635
70643
  rows,
@@ -70671,7 +70679,13 @@ const convertVisibleRows = ({
70671
70679
  const selectedUnit = selectedUnits[unitKey];
70672
70680
  const storageUnit = storageUnits[unitKey];
70673
70681
  const unitChanged = selectedUnit !== storageUnit;
70674
- const convertedValue = unitChanged ? tryConvertValue(value, unitKey, selectedUnit, storageUnit) : cell2.value;
70682
+ const { value: resultValue = value } = convertUnit({
70683
+ value: safeToString(value),
70684
+ unitkey: unitKey,
70685
+ toUnit: selectedUnit,
70686
+ fromUnit: storageUnit
70687
+ });
70688
+ const convertedValue = unitChanged ? resultValue : cell2.value;
70675
70689
  const formattedDisplayValue = formatDisplayValue ? formatDisplayValue(convertedValue) : convertedValue;
70676
70690
  return {
70677
70691
  ...cell2,
@@ -70686,7 +70700,13 @@ const convertVisibleRows = ({
70686
70700
  const selectedUnit2 = selectedUnits[unitKey];
70687
70701
  const unitChanged2 = selectedUnit2 !== storageUnit2;
70688
70702
  const nextUnit = convertBackToStorageUnit ? storageUnit2 : selectedUnit2;
70689
- const nextValueConverted = unitChanged2 ? tryConvertValue(value2, unitKey, nextUnit, selectedUnit2) : value2;
70703
+ const { value: resultValue2 = value2 } = convertUnit({
70704
+ value: String(value2),
70705
+ unitkey: unitKey,
70706
+ toUnit: nextUnit,
70707
+ fromUnit: selectedUnit2
70708
+ });
70709
+ const nextValueConverted = unitChanged2 ? resultValue2 : value2;
70690
70710
  if ("onChange" in cell2) {
70691
70711
  const { onChange } = cell2;
70692
70712
  const event = {