@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 +8 -5
- package/dist/index.js.map +1 -1
- package/dist/step-ag-grid.esm.js +8 -5
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/gridForm/GridFormDropDown.tsx +1 -1
- package/src/stories/components/GridPopoutEditDropDown.stories.tsx +45 -2
- package/src/utils/bearing.ts +7 -4
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -4153,6 +4153,9 @@ var bearingCorrectionValueFormatter = function (params) {
|
|
|
4153
4153
|
if (value == null) {
|
|
4154
4154
|
return "-";
|
|
4155
4155
|
}
|
|
4156
|
+
if (typeof value === "string") {
|
|
4157
|
+
return convertDDToDMS(bearingNumberParser(value), true, true);
|
|
4158
|
+
}
|
|
4156
4159
|
return convertDDToDMS(value, true, true);
|
|
4157
4160
|
};
|
|
4158
4161
|
var bearingNumberParser = function (value) {
|
|
@@ -4184,10 +4187,10 @@ var convertDDToDMS = function (dd, showPositiveSymbol, addTrailingZeros) {
|
|
|
4184
4187
|
if (dd === 0)
|
|
4185
4188
|
addTrailingZeros = false;
|
|
4186
4189
|
// toFixed rounds parts up greater than 60, which has to be corrected below
|
|
4187
|
-
var _a = dd.toFixed(5).split("."), bearingWholeString = _a[0],
|
|
4190
|
+
var _a = dd.toFixed(5).split("."), bearingWholeString = _a[0], bearingDecimalString = _a[1];
|
|
4188
4191
|
var bearingWhole = Math.abs(parseInt(bearingWholeString));
|
|
4189
|
-
var minNumeric = parseInt(
|
|
4190
|
-
var secNumeric = parseInt(
|
|
4192
|
+
var minNumeric = parseInt(bearingDecimalString === null || bearingDecimalString === void 0 ? void 0 : bearingDecimalString.substring(0, 2));
|
|
4193
|
+
var secNumeric = parseInt(bearingDecimalString === null || bearingDecimalString === void 0 ? void 0 : bearingDecimalString.substring(2, 4));
|
|
4191
4194
|
// If the toFixed caused rounding beyond 60 minutes/seconds then apply the carry
|
|
4192
4195
|
if (secNumeric >= 60) {
|
|
4193
4196
|
minNumeric++;
|
|
@@ -4202,7 +4205,7 @@ var convertDDToDMS = function (dd, showPositiveSymbol, addTrailingZeros) {
|
|
|
4202
4205
|
}
|
|
4203
4206
|
var minString = minNumeric.toString().padStart(2, "0");
|
|
4204
4207
|
var secString = secNumeric.toString().padStart(2, "0");
|
|
4205
|
-
var deciSecString =
|
|
4208
|
+
var deciSecString = bearingDecimalString === null || bearingDecimalString === void 0 ? void 0 : bearingDecimalString.substring(4, 5);
|
|
4206
4209
|
var dmsString = "".concat(showPositiveSymbol && dd > 0 ? "+" : "").concat(dd < 0 ? "-" : "").concat(bearingWhole, "\u00B0");
|
|
4207
4210
|
if (addTrailingZeros || deciSecString != "0") {
|
|
4208
4211
|
dmsString += "\u00A0".concat(minString, "'\u00A0").concat(secString, ".").concat(deciSecString, "\""); // "\xa0" is here for non-breaking space
|
|
@@ -4432,7 +4435,7 @@ var GridFormDropDown = function (props) {
|
|
|
4432
4435
|
return (jsx("div", __assign({ style: { display: "flex", width: "100%" } }, { children: 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); } }) })));
|
|
4433
4436
|
} })), jsx(MenuDivider, {}, "$$divider_filter")] })), jsx(ComponentLoadingWrapper, __assign({ loading: !options }, { children: jsxs(Fragment, { children: [options && options.length == (filteredValues === null || filteredValues === void 0 ? void 0 : filteredValues.length) && jsx(MenuItem, { children: "[Empty]" }), options === null || options === void 0 ? void 0 : options.map(function (item, index) {
|
|
4434
4437
|
var _a;
|
|
4435
|
-
return item.value === MenuSeparatorString ? (jsx(MenuDivider, {}, "$$divider_".concat(index))) : filteredValues.includes(item.value) ? null : (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(
|
|
4438
|
+
return item.value === MenuSeparatorString ? (jsx(MenuDivider, {}, "$$divider_".concat(index))) : filteredValues.includes(item.value) ? null : (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)));
|
|
4436
4439
|
})] }) }))] }));
|
|
4437
4440
|
};
|
|
4438
4441
|
|