@linzjs/step-ag-grid 1.4.2 → 1.4.4

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
@@ -4162,6 +4162,9 @@ var bearingCorrectionValueFormatter = function (params) {
4162
4162
  if (value == null) {
4163
4163
  return "-";
4164
4164
  }
4165
+ if (typeof value === "string") {
4166
+ return convertDDToDMS(bearingNumberParser(value), true, true);
4167
+ }
4165
4168
  return convertDDToDMS(value, true, true);
4166
4169
  };
4167
4170
  var bearingNumberParser = function (value) {
@@ -4193,10 +4196,10 @@ var convertDDToDMS = function (dd, showPositiveSymbol, addTrailingZeros) {
4193
4196
  if (dd === 0)
4194
4197
  addTrailingZeros = false;
4195
4198
  // toFixed rounds parts up greater than 60, which has to be corrected below
4196
- var _a = dd.toFixed(5).split("."), bearingWholeString = _a[0], beringDecimalString = _a[1];
4199
+ var _a = dd.toFixed(5).split("."), bearingWholeString = _a[0], bearingDecimalString = _a[1];
4197
4200
  var bearingWhole = Math.abs(parseInt(bearingWholeString));
4198
- var minNumeric = parseInt(beringDecimalString === null || beringDecimalString === void 0 ? void 0 : beringDecimalString.substring(0, 2));
4199
- var secNumeric = parseInt(beringDecimalString === null || beringDecimalString === void 0 ? void 0 : beringDecimalString.substring(2, 4));
4201
+ var minNumeric = parseInt(bearingDecimalString === null || bearingDecimalString === void 0 ? void 0 : bearingDecimalString.substring(0, 2));
4202
+ var secNumeric = parseInt(bearingDecimalString === null || bearingDecimalString === void 0 ? void 0 : bearingDecimalString.substring(2, 4));
4200
4203
  // If the toFixed caused rounding beyond 60 minutes/seconds then apply the carry
4201
4204
  if (secNumeric >= 60) {
4202
4205
  minNumeric++;
@@ -4211,7 +4214,7 @@ var convertDDToDMS = function (dd, showPositiveSymbol, addTrailingZeros) {
4211
4214
  }
4212
4215
  var minString = minNumeric.toString().padStart(2, "0");
4213
4216
  var secString = secNumeric.toString().padStart(2, "0");
4214
- var deciSecString = beringDecimalString === null || beringDecimalString === void 0 ? void 0 : beringDecimalString.substring(4, 5);
4217
+ var deciSecString = bearingDecimalString === null || bearingDecimalString === void 0 ? void 0 : bearingDecimalString.substring(4, 5);
4215
4218
  var dmsString = "".concat(showPositiveSymbol && dd > 0 ? "+" : "").concat(dd < 0 ? "-" : "").concat(bearingWhole, "\u00B0");
4216
4219
  if (addTrailingZeros || deciSecString != "0") {
4217
4220
  dmsString += "\u00A0".concat(minString, "'\u00A0").concat(secString, ".").concat(deciSecString, "\""); // "\xa0" is here for non-breaking space
@@ -4441,7 +4444,7 @@ var GridFormDropDown = function (props) {
4441
4444
  return (jsxRuntime.jsx("div", __assign({ style: { display: "flex", width: "100%" } }, { children: jsxRuntime.jsx("input", { autoFocus: true, className: "free-text-input", style: { border: "0px" }, ref: ref, type: "text", placeholder: (_b = formProps.filterPlaceholder) !== null && _b !== void 0 ? _b : "Placeholder", "data-testid": "filteredMenu-free-text-input", defaultValue: filter, onChange: function (e) { return setFilter(e.target.value.toLowerCase()); }, onKeyDown: function (e) { return onFilterKeyDown(e); } }) })));
4442
4445
  } })), jsxRuntime.jsx(MenuDivider, {}, "$$divider_filter")] })), jsxRuntime.jsx(ComponentLoadingWrapper, __assign({ loading: !options }, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [options && options.length == (filteredValues === null || filteredValues === void 0 ? void 0 : filteredValues.length) && jsxRuntime.jsx(MenuItem, { children: "[Empty]" }), options === null || options === void 0 ? void 0 : options.map(function (item, index) {
4443
4446
  var _a;
4444
- return item.value === MenuSeparatorString ? (jsxRuntime.jsx(MenuDivider, {}, "$$divider_".concat(index))) : filteredValues.includes(item.value) ? null : (jsxRuntime.jsx(MenuItem, __assign({ disabled: !!item.disabled, title: item.disabled && typeof item.disabled !== "boolean" ? item.disabled : "", value: item.value, onClick: function () { return selectItemHandler(item.value); } }, { children: (_a = item.label) !== null && _a !== void 0 ? _a : (item.value == null ? "<".concat(item.value, ">") : "".concat(item.value)) }), "".concat(item.value)));
4447
+ return item.value === MenuSeparatorString ? (jsxRuntime.jsx(MenuDivider, {}, "$$divider_".concat(index))) : filteredValues.includes(item.value) ? null : (jsxRuntime.jsx(MenuItem, __assign({ disabled: !!item.disabled, title: item.disabled && typeof item.disabled !== "boolean" ? item.disabled : "", value: item.value, onClick: function () { return selectItemHandler(item.value); } }, { children: (_a = item.label) !== null && _a !== void 0 ? _a : (item.value == null ? "<".concat(item.value, ">") : "".concat(item.value)) }), "".concat(props.field, "-").concat(index)));
4445
4448
  })] }) }))] }));
4446
4449
  };
4447
4450