@linzjs/step-ag-grid 1.4.1 → 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
@@ -3923,7 +3923,7 @@ var useGridPopoverHook = function (props, save) {
3923
3923
  return function () { };
3924
3924
  }, [handleScreenMouseDown, handleScreenMouseEvent, isOpen]);
3925
3925
  var popoverWrapper = React.useCallback(function (children) {
3926
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: anchorRef.current && (jsxRuntime.jsxs(ControlledMenu, __assign({ state: isOpen ? "open" : "closed", portal: true, unmountOnClose: true, anchorRef: anchorRef, menuClassName: "lui-menu", onClose: function (event) { return triggerSave(event.reason).then(); } }, { children: [saving && (jsxRuntime.jsx("div", { style: {
3926
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: anchorRef.current && (jsxRuntime.jsxs(ControlledMenu, __assign({ state: isOpen ? "open" : "closed", portal: lodashEs.isEmpty(document.querySelectorAll(".PopoutWindowContainer")), unmountOnClose: true, anchorRef: anchorRef, menuClassName: "lui-menu", onClose: function (event) { return triggerSave(event.reason).then(); } }, { children: [saving && (jsxRuntime.jsx("div", { style: {
3927
3927
  position: "absolute",
3928
3928
  left: 0,
3929
3929
  top: 0,
@@ -4129,7 +4129,7 @@ var GridFormPopoutMenu = function (props) {
4129
4129
  }); }, [props.field, props.selectedRows, updatingCells]);
4130
4130
  var selectedRowCount = props.selectedRows.length;
4131
4131
  var filteredOptions = options === null || options === void 0 ? void 0 : options.filter(function (menuOption) {
4132
- return menuOption.label === MenuSeparator || selectedRowCount === 1 || menuOption.multiEdit;
4132
+ return menuOption.label === MenuSeparator || selectedRowCount === 1 || menuOption.supportsMultiEdit;
4133
4133
  });
4134
4134
  var popoverWrapper = useGridPopoverHook(props).popoverWrapper;
4135
4135
  return popoverWrapper(jsxRuntime.jsx(ComponentLoadingWrapper, __assign({ loading: !filteredOptions }, { children: jsxRuntime.jsx("div", __assign({ className: "Grid-popoverContainerList" }, { children: options === null || options === void 0 ? void 0 : options.map(function (item, index) {
@@ -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