@linzjs/step-ag-grid 8.1.0 → 8.2.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.
- package/dist/index.css +19 -5
- package/dist/src/components/gridForm/GridFormDropDown.d.ts +2 -2
- package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +1 -0
- package/dist/src/components/gridPopoverEdit/GridPopoverEditDropDown.d.ts +2 -2
- package/dist/src/utils/bearing.d.ts +2 -0
- package/dist/step-ag-grid.esm.js +39 -36
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/GridCell.tsx +2 -2
- package/src/components/gridForm/GridFormDropDown.tsx +8 -4
- package/src/components/gridForm/GridFormEditBearing.tsx +1 -1
- package/src/components/gridForm/GridFormMultiSelect.tsx +10 -8
- package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +8 -13
- package/src/components/gridPopoverEdit/GridPopoverEditDropDown.ts +3 -3
- package/src/react-menu3/styles/_var.scss +1 -1
- package/src/stories/grid/gridForm/GridFormDropDown.stories.tsx +2 -6
- package/src/stories/grid/gridForm/GridFormEditBearing.stories.tsx +8 -12
- package/src/stories/grid/gridForm/GridFormEditBearingCorrection.stories.tsx +8 -12
- package/src/stories/grid/gridForm/GridFormMessage.stories.tsx +0 -1
- package/src/stories/grid/gridForm/GridFormMultiSelect.stories.tsx +70 -0
- package/src/stories/grid/gridForm/GridFormTextArea.stories.tsx +44 -0
- package/src/stories/grid/gridForm/GridFormTextInput.stories.tsx +44 -0
- package/src/styles/Grid.scss +1 -1
- package/src/styles/GridFormMultiSelect.scss +4 -0
- package/src/styles/GridIcon.scss +10 -0
- package/src/styles/lui-overrides.scss +1 -1
- package/src/styles/react-menu-customisations.scss +2 -2
- package/src/utils/bearing.test.ts +46 -3
- package/src/utils/bearing.ts +14 -0
package/dist/index.css
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
.step-ag-grid-react-menu .szh-menu__item,
|
|
24
24
|
.step-ag-grid-react-menu .szh-menu__header {
|
|
25
|
-
padding: 0.375rem
|
|
25
|
+
padding: 0.375rem 0.75rem;
|
|
26
26
|
}
|
|
27
27
|
.step-ag-grid-react-menu .LuiCheckboxInput {
|
|
28
28
|
margin-bottom: 0;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
color: #2a292c;
|
|
58
58
|
font-family: "Open Sans", system-ui, sans-serif;
|
|
59
59
|
font-style: normal;
|
|
60
|
-
font-weight:
|
|
60
|
+
font-weight: normal;
|
|
61
61
|
}
|
|
62
62
|
.step-ag-grid-react-menu.szh-menu div,
|
|
63
63
|
.step-ag-grid-react-menu.szh-menu a[role=menuitem] {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
color: #2a292c;
|
|
66
66
|
font-family: "Open Sans", system-ui, sans-serif;
|
|
67
67
|
font-style: normal;
|
|
68
|
-
font-weight:
|
|
68
|
+
font-weight: normal;
|
|
69
69
|
}
|
|
70
70
|
.step-ag-grid-react-menu.szh-menu li[role=menuitem]:hover {
|
|
71
71
|
background-color: #e2f3f7;
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
}
|
|
236
236
|
.szh-menu__item--disabled {
|
|
237
237
|
cursor: default;
|
|
238
|
-
color: #
|
|
238
|
+
color: #989189;
|
|
239
239
|
}
|
|
240
240
|
.szh-menu__group {
|
|
241
241
|
box-sizing: border-box;
|
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
.Grid-popoverContainer {
|
|
347
|
-
padding:
|
|
347
|
+
padding: 0.375rem 0.75rem;
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
.ag-cell .GridCell-editableIcon {
|
|
@@ -427,6 +427,10 @@
|
|
|
427
427
|
overflow-y: auto;
|
|
428
428
|
}
|
|
429
429
|
|
|
430
|
+
.GridMultiSelect-noOptions {
|
|
431
|
+
justify-content: center;
|
|
432
|
+
}
|
|
433
|
+
|
|
430
434
|
.GridFormSubComponentTextInput-full-width-input {
|
|
431
435
|
width: 100%;
|
|
432
436
|
padding: 0;
|
|
@@ -441,11 +445,21 @@
|
|
|
441
445
|
fill: #3a7cdf;
|
|
442
446
|
}
|
|
443
447
|
|
|
448
|
+
.AgGridGenericCellRenderer-ic_info_outlineIcon {
|
|
449
|
+
margin-right: 4px;
|
|
450
|
+
fill: #3a7cdf;
|
|
451
|
+
}
|
|
452
|
+
|
|
444
453
|
.AgGridGenericCellRenderer-ic_warningIcon {
|
|
445
454
|
margin-right: 4px;
|
|
446
455
|
fill: #ea6a2e;
|
|
447
456
|
}
|
|
448
457
|
|
|
458
|
+
.AgGridGenericCellRenderer-ic_warning_outlineIcon {
|
|
459
|
+
margin-right: 4px;
|
|
460
|
+
fill: #ea6a2e;
|
|
461
|
+
}
|
|
462
|
+
|
|
449
463
|
.GridIcon-disabled {
|
|
450
464
|
fill: #beb9b4 !important;
|
|
451
465
|
}
|
|
@@ -22,7 +22,7 @@ export declare const MenuHeaderItem: (title: string) => {
|
|
|
22
22
|
value: string;
|
|
23
23
|
};
|
|
24
24
|
export type SelectOption = null | string | FinalSelectOption;
|
|
25
|
-
export interface
|
|
25
|
+
export interface GridFormDropDownProps<RowType extends GridBaseRow> extends CellEditorCommon {
|
|
26
26
|
className?: "GridPopoverEditDropDown-containerSmall" | "GridPopoverEditDropDown-containerMedium" | "GridPopoverEditDropDown-containerLarge" | "GridPopoverEditDropDown-containerUnlimited" | string | undefined;
|
|
27
27
|
filtered?: "local" | "reload";
|
|
28
28
|
filterDefaultValue?: string;
|
|
@@ -33,5 +33,5 @@ export interface GridFormPopoutDropDownProps<RowType extends GridBaseRow> extend
|
|
|
33
33
|
onSelectFilter?: (props: GridPopoutEditDropDownSelectedItem<RowType>) => Promise<void>;
|
|
34
34
|
options: SelectOption[] | ((selectedRows: RowType[], filter?: string) => Promise<SelectOption[] | undefined> | SelectOption[] | undefined) | undefined;
|
|
35
35
|
}
|
|
36
|
-
export declare const GridFormDropDown: <RowType extends GridBaseRow>(props:
|
|
36
|
+
export declare const GridFormDropDown: <RowType extends GridBaseRow>(props: GridFormDropDownProps<RowType>) => JSX.Element;
|
|
37
37
|
export {};
|
|
@@ -19,6 +19,7 @@ export interface GridFormMultiSelectProps<RowType extends GridBaseRow> extends C
|
|
|
19
19
|
filtered?: boolean;
|
|
20
20
|
filterPlaceholder?: string;
|
|
21
21
|
filterHelpText?: string | ((filter: string, options: MultiSelectOption[]) => string | undefined);
|
|
22
|
+
noOptionsMessage?: string;
|
|
22
23
|
onSelectFilter?: (props: {
|
|
23
24
|
filter: string;
|
|
24
25
|
options: MultiSelectOption[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColDefT, GenericCellEditorProps } from "../GridCell";
|
|
2
2
|
import { GridBaseRow } from "../Grid";
|
|
3
|
-
import {
|
|
3
|
+
import { GridFormDropDownProps } from "../gridForm/GridFormDropDown";
|
|
4
4
|
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
|
-
export declare const GridPopoverEditDropDown: <RowType extends GridBaseRow>(colDef: GenericCellColDef<RowType>, props: GenericCellEditorProps<
|
|
5
|
+
export declare const GridPopoverEditDropDown: <RowType extends GridBaseRow>(colDef: GenericCellColDef<RowType>, props: GenericCellEditorProps<GridFormDropDownProps<RowType>>) => ColDefT<RowType>;
|
|
@@ -3,3 +3,5 @@ export declare const bearingCorrectionValueFormatter: (value: any) => string;
|
|
|
3
3
|
export declare const bearingNumberParser: (value: string) => number | null;
|
|
4
4
|
export declare const bearingStringValidator: (value: string, customInvalid?: ((value: number | null) => string | null) | undefined) => string | null;
|
|
5
5
|
export declare const convertDDToDMS: (dd: number | null, showPositiveSymbol?: boolean, addTrailingZeros?: boolean) => string;
|
|
6
|
+
export declare const bearingRangeValidator: (value: number | null) => "Bearing is required" | "Bearing must be less than 360 degrees" | "Bearing must not be negative" | null;
|
|
7
|
+
export declare const bearingCorrectionRangeValidator: (value: number | null) => "Bearing correction is required" | "Bearing correction must be less than 360 degrees" | "Bearing correction must be greater then -180 degrees" | null;
|
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -2981,7 +2981,7 @@ var GridCellRenderer = function (props) {
|
|
|
2981
2981
|
var warningText = warningFn ? warningFn(props) : undefined;
|
|
2982
2982
|
var infoFn = rendererParams === null || rendererParams === void 0 ? void 0 : rendererParams.info;
|
|
2983
2983
|
var infoText = infoFn ? infoFn(props) : undefined;
|
|
2984
|
-
return (jsx(GridLoadableCell, __assign({ isLoading: checkUpdating((_b = (_a = colDef.field) !== null && _a !== void 0 ? _a : colDef.colId) !== null && _b !== void 0 ? _b : "", props.data.id) }, { children: jsxs(Fragment$1, { children: [typeof warningText === "string" && jsx(GridIcon, { icon: "
|
|
2984
|
+
return (jsx(GridLoadableCell, __assign({ isLoading: checkUpdating((_b = (_a = colDef.field) !== null && _a !== void 0 ? _a : colDef.colId) !== null && _b !== void 0 ? _b : "", props.data.id) }, { children: jsxs(Fragment$1, { children: [typeof warningText === "string" && jsx(GridIcon, { icon: "ic_warning_outline", title: warningText }), typeof infoText === "string" && jsx(GridIcon, { icon: "ic_info_outline", title: infoText }), jsx("div", __assign({ style: { display: "flex", flex: 1, overflow: "hidden" } }, { children: ((_c = colDef === null || colDef === void 0 ? void 0 : colDef.cellRendererParams) === null || _c === void 0 ? void 0 : _c.originalCellRenderer) ? (jsx(colDef.cellRendererParams.originalCellRenderer, __assign({}, props))) : (jsx("span", __assign({ title: props.valueFormatted }, { children: props.valueFormatted }))) })), fnOrVar((_d = props.colDef) === null || _d === void 0 ? void 0 : _d.editable, props) && (rendererParams === null || rendererParams === void 0 ? void 0 : rendererParams.rightHoverElement) && (jsx("div", __assign({ style: { display: "flex", alignItems: "center" } }, { children: rendererParams === null || rendererParams === void 0 ? void 0 : rendererParams.rightHoverElement })))] }) })));
|
|
2985
2985
|
};
|
|
2986
2986
|
var suppressCellKeyboardEvents = function (e) {
|
|
2987
2987
|
var _a, _b, _c, _d;
|
|
@@ -3428,9 +3428,9 @@ var GridFormDropDown = function (props) {
|
|
|
3428
3428
|
} }, { children: function (_a) {
|
|
3429
3429
|
var _b;
|
|
3430
3430
|
var ref = _a.ref;
|
|
3431
|
-
return (jsxs("div", __assign({ style: { display: "flex", flexDirection: "column", width: "100%" } }, { children: [jsx("input", { className: "LuiTextInput-input", ref: ref, type: "text", placeholder: (_b = props.filterPlaceholder) !== null && _b !== void 0 ? _b : "
|
|
3431
|
+
return (jsxs("div", __assign({ style: { display: "flex", flexDirection: "column", width: "100%" } }, { children: [jsx("input", { className: "LuiTextInput-input", ref: ref, type: "text", placeholder: (_b = props.filterPlaceholder) !== null && _b !== void 0 ? _b : "Filter...", "data-testid": "filteredMenu-free-text-input", defaultValue: filter, "data-allowtabtosave": true, "data-disableenterautosave": !props.onSelectFilter &&
|
|
3432
3432
|
!(filteredValues && filteredValues.length === 1 && !filteredValues[0].subComponent), onChange: function (e) { return setFilter(e.target.value); } }), props.filterHelpText && isNotEmpty(filter) && (jsx(FormError, { error: null, helpText: props.filterHelpText }))] })));
|
|
3433
|
-
} })), jsx(MenuDivider, {}, "$$divider_filter")] }))), jsx(ComponentLoadingWrapper, __assign({ loading: !options, className: "GridFormDropDown-options" }, { children: jsxs(Fragment$1, { children: [options && (isEmpty(options) || (filteredValues && isEmpty(filteredValues))) && (jsx(MenuItem, __assign({ className: "GridPopoverEditDropDown-noOptions" }, { children: (_b = props.noOptionsMessage) !== null && _b !== void 0 ? _b : "No Options" }), "".concat(fieldToString(field), "-empty"))), options === null || options === void 0 ? void 0 : options.map(function (item, index) {
|
|
3433
|
+
} })), jsx(MenuDivider, {}, "$$divider_filter")] }))), jsx(ComponentLoadingWrapper, __assign({ loading: !options, className: "GridFormDropDown-options" }, { children: jsxs(Fragment$1, { children: [options && (isEmpty(options) || (filteredValues && isEmpty(filteredValues))) && (jsx(MenuItem, __assign({ className: "GridPopoverEditDropDown-noOptions", disabled: true }, { children: (_b = props.noOptionsMessage) !== null && _b !== void 0 ? _b : "No Options" }), "".concat(fieldToString(field), "-empty"))), options === null || options === void 0 ? void 0 : options.map(function (item, index) {
|
|
3434
3434
|
var _a;
|
|
3435
3435
|
showHeader = null;
|
|
3436
3436
|
if (item.value === MenuSeparatorString) {
|
|
@@ -3637,12 +3637,13 @@ var textMatch = function (text, filter) {
|
|
|
3637
3637
|
};
|
|
3638
3638
|
|
|
3639
3639
|
var GridFormMultiSelect = function (props) {
|
|
3640
|
-
var _a
|
|
3640
|
+
var _a;
|
|
3641
|
+
var _b = useGridPopoverContext(), selectedRows = _b.selectedRows, data = _b.data;
|
|
3641
3642
|
var subComponentIsValidRef = useRef({});
|
|
3642
3643
|
var optionsInitialising = useRef(false);
|
|
3643
|
-
var
|
|
3644
|
-
var
|
|
3645
|
-
var
|
|
3644
|
+
var _c = useState(""), filter = _c[0], setFilter = _c[1];
|
|
3645
|
+
var _d = useState(""), initialValues = _d[0], setInitialValues = _d[1];
|
|
3646
|
+
var _e = useState(), options = _e[0], setOptions = _e[1];
|
|
3646
3647
|
var invalid = useCallback(function () {
|
|
3647
3648
|
if (!options)
|
|
3648
3649
|
return true;
|
|
@@ -3700,7 +3701,7 @@ var GridFormMultiSelect = function (props) {
|
|
|
3700
3701
|
var headerGroups = useMemo(function () {
|
|
3701
3702
|
if (!options)
|
|
3702
3703
|
return undefined;
|
|
3703
|
-
var result = groupBy(options.filter(function (o) { return textMatch(o.label, filter) && o.value; }), "filter");
|
|
3704
|
+
var result = groupBy(options.filter(function (o) { return textMatch(o.label, filter) && o.value != null; }), "filter");
|
|
3704
3705
|
// remove leading/trailing/duplicate dividers
|
|
3705
3706
|
return fromPairs(toPairs(result).map(function (_a) {
|
|
3706
3707
|
var key = _a[0], arr = _a[1];
|
|
@@ -3726,12 +3727,15 @@ var GridFormMultiSelect = function (props) {
|
|
|
3726
3727
|
}));
|
|
3727
3728
|
}, [filter, options]);
|
|
3728
3729
|
var headers = useMemo(function () { var _a; return (_a = props.headers) !== null && _a !== void 0 ? _a : [{ header: "" }]; }, [props.headers]);
|
|
3729
|
-
var
|
|
3730
|
+
var _f = useGridPopoverHook({
|
|
3730
3731
|
className: props.className,
|
|
3731
3732
|
invalid: invalid,
|
|
3732
3733
|
save: save
|
|
3733
|
-
}), popoverWrapper =
|
|
3734
|
-
return popoverWrapper(jsx(ComponentLoadingWrapper, __assign({ loading: !options, className: "GridFormMultiSelect-container" }, { children: options && (jsxs(Fragment$1, { children: [props.filtered && (jsx(FilterInput, __assign({}, { headerGroups: headerGroups, options: options, setOptions: setOptions, filter: filter, setFilter: setFilter, triggerSave: triggerSave }, { filterHelpText: props.filterHelpText, onSelectFilter: props.onSelectFilter, filterPlaceholder: props.filterPlaceholder }))), headerGroups && (
|
|
3734
|
+
}), popoverWrapper = _f.popoverWrapper, triggerSave = _f.triggerSave;
|
|
3735
|
+
return popoverWrapper(jsx(ComponentLoadingWrapper, __assign({ loading: !options, className: "GridFormMultiSelect-container" }, { children: options && (jsxs(Fragment$1, { children: [props.filtered && (jsx(FilterInput, __assign({}, { headerGroups: headerGroups, options: options, setOptions: setOptions, filter: filter, setFilter: setFilter, triggerSave: triggerSave }, { filterHelpText: props.filterHelpText, onSelectFilter: props.onSelectFilter, filterPlaceholder: props.filterPlaceholder }))), headerGroups && (isEmpty(headerGroups) || !toPairs(headerGroups).some(function (_a) {
|
|
3736
|
+
_a[0]; var options = _a[1];
|
|
3737
|
+
return !isEmpty(options);
|
|
3738
|
+
})) && (jsx(MenuItem, __assign({ className: "GridMultiSelect-noOptions", disabled: true }, { children: (_a = props.noOptionsMessage) !== null && _a !== void 0 ? _a : "No Options" }), "noOptions")), headerGroups && !isEmpty(headerGroups) && (jsx("div", __assign({ className: "GridFormMultiSelect-options" }, { children: headers.map(function (header, index) {
|
|
3735
3739
|
var subOptions = headerGroups["".concat(header.filter)];
|
|
3736
3740
|
return (!isEmpty(subOptions) && (jsxs(Fragment, { children: [header.header && jsx(MenuHeader, { children: header.header }), subOptions.map(function (item, index) {
|
|
3737
3741
|
return item.value === MenuSeparatorString ? (jsx(MenuDivider, {}, "div_".concat(index))) : (jsxs(Fragment, { children: [jsx(MenuRadioItem, { item: item, options: options, setOptions: setOptions }), item.checked && item.subComponent && (jsx(MenuSubComponent, __assign({}, { item: item, options: options, setOptions: setOptions, data: data, triggerSave: triggerSave }, { subComponentIsValid: subComponentIsValidRef.current })))] }, "val_".concat(item.value)));
|
|
@@ -3812,10 +3816,7 @@ var FilterInput = function (props) {
|
|
|
3812
3816
|
lastKeyWasEnter.current = false;
|
|
3813
3817
|
}
|
|
3814
3818
|
}, [addCustomFilterValue, filter, onSelectFilter, setFilter, toggleSelectAllVisible, triggerSave]);
|
|
3815
|
-
return (jsxs(Fragment$1, { children: [jsx(FocusableItem, __assign({ className: "filter-item" }, { children: function (_) { return (jsxs("div", __assign({ style: { width: "100%" }, className: "GridFormMultiSelect-filter" }, { children: [jsx("input", { className: "LuiTextInput-input", type: "text", placeholder: filterPlaceholder !== null && filterPlaceholder !== void 0 ? filterPlaceholder : "
|
|
3816
|
-
_a[0]; var options = _a[1];
|
|
3817
|
-
return !isEmpty(options);
|
|
3818
|
-
}) && (jsx("div", __assign({ className: "szh-menu__item GridPopoverEditDropDown-noOptions" }, { children: "No Options" })))] }));
|
|
3819
|
+
return (jsxs(Fragment$1, { children: [jsx(FocusableItem, __assign({ className: "filter-item" }, { children: function (_) { return (jsxs("div", __assign({ style: { width: "100%" }, className: "GridFormMultiSelect-filter" }, { children: [jsx("input", { className: "LuiTextInput-input", type: "text", placeholder: filterPlaceholder !== null && filterPlaceholder !== void 0 ? filterPlaceholder : "Filter...", "data-testid": "filteredMenu-free-text-input", value: filter, "data-disableenterautosave": true, "data-allowtabtosave": true, onChange: function (e) { return setFilter(e.target.value); }, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp }), filterHelpText && (jsx(FormError, { error: null, helpText: typeof filterHelpText === "function" ? filterHelpText(filter.trim(), options) : filterHelpText }))] }))); } }), "filter"), jsx(MenuDivider, {}, "$$divider_filter")] }));
|
|
3819
3820
|
};
|
|
3820
3821
|
var MenuRadioItem = function (props) {
|
|
3821
3822
|
var _a, _b;
|
|
@@ -3830,7 +3831,7 @@ var MenuRadioItem = function (props) {
|
|
|
3830
3831
|
e.keepOpen = true;
|
|
3831
3832
|
toggleValue(item);
|
|
3832
3833
|
}
|
|
3833
|
-
} }, { children: jsx(LuiCheckboxInput, { isChecked: (_a = item.checked) !== null && _a !== void 0 ? _a : false, value: "".concat(item.value), label: jsxs(Fragment$1, { children: [item.warning && jsx(GridIcon, { icon: "
|
|
3834
|
+
} }, { children: jsx(LuiCheckboxInput, { isChecked: (_a = item.checked) !== null && _a !== void 0 ? _a : false, value: "".concat(item.value), label: jsxs(Fragment$1, { children: [item.warning && jsx(GridIcon, { icon: "ic_warning_outline", title: item.warning }), (_b = item.label) !== null && _b !== void 0 ? _b : (item.value == null ? "<".concat(item.value, ">") : "".concat(item.value))] }), inputProps: {
|
|
3834
3835
|
onClick: function (e) {
|
|
3835
3836
|
// Click is handled by MenuItem onClick
|
|
3836
3837
|
e.preventDefault();
|
|
@@ -4090,6 +4091,24 @@ var convertDDToDMS = function (dd, showPositiveSymbol, addTrailingZeros) {
|
|
|
4090
4091
|
dmsString += "\u00A0".concat(minString, "'");
|
|
4091
4092
|
}
|
|
4092
4093
|
return dmsString;
|
|
4094
|
+
};
|
|
4095
|
+
var bearingRangeValidator = function (value) {
|
|
4096
|
+
if (value === null)
|
|
4097
|
+
return "Bearing is required";
|
|
4098
|
+
if (value >= 360)
|
|
4099
|
+
return "Bearing must be less than 360 degrees";
|
|
4100
|
+
if (value < 0)
|
|
4101
|
+
return "Bearing must not be negative";
|
|
4102
|
+
return null;
|
|
4103
|
+
};
|
|
4104
|
+
var bearingCorrectionRangeValidator = function (value) {
|
|
4105
|
+
if (value === null)
|
|
4106
|
+
return "Bearing correction is required";
|
|
4107
|
+
if (value >= 360)
|
|
4108
|
+
return "Bearing correction must be less than 360 degrees";
|
|
4109
|
+
if (value <= -180)
|
|
4110
|
+
return "Bearing correction must be greater then -180 degrees";
|
|
4111
|
+
return null;
|
|
4093
4112
|
};
|
|
4094
4113
|
|
|
4095
4114
|
var css_248z$1 = ".LuiTextInput{margin-bottom:0}.LuiTextInput-formatted{color:#beb9b4;line-height:48px;position:absolute;right:14px;top:0}";
|
|
@@ -4140,7 +4159,7 @@ var GridFormEditBearing = function (props) {
|
|
|
4140
4159
|
invalid: invalid,
|
|
4141
4160
|
save: save
|
|
4142
4161
|
}).popoverWrapper;
|
|
4143
|
-
return popoverWrapper(jsx("div", __assign({ className: "GridFormEditBearing-input
|
|
4162
|
+
return popoverWrapper(jsx("div", __assign({ className: "GridFormEditBearing-input" }, { children: jsx(TextInputFormatted, { value: defaultValue, onChange: function (e) {
|
|
4144
4163
|
setValue(e.target.value.trim());
|
|
4145
4164
|
}, autoFocus: true, placeholder: props.placeHolder, formatted: bearingStringValidator(value, props.range) || !props.formatValue
|
|
4146
4165
|
? "?"
|
|
@@ -4153,15 +4172,7 @@ var GridPopoverEditBearingLike = function (colDef, props) {
|
|
|
4153
4172
|
var GridPopoverEditBearingEditorParams = {
|
|
4154
4173
|
placeHolder: "Enter bearing",
|
|
4155
4174
|
formatValue: bearingValueFormatter,
|
|
4156
|
-
range:
|
|
4157
|
-
if (value === null)
|
|
4158
|
-
return "Bearing is required";
|
|
4159
|
-
if (value >= 360)
|
|
4160
|
-
return "Bearing must be less than 360 degrees";
|
|
4161
|
-
if (value < 0)
|
|
4162
|
-
return "Bearing must not be negative";
|
|
4163
|
-
return null;
|
|
4164
|
-
}
|
|
4175
|
+
range: bearingRangeValidator
|
|
4165
4176
|
};
|
|
4166
4177
|
var GridPopoverEditBearing = function (colDef, props) {
|
|
4167
4178
|
return GridPopoverEditBearingLike(colDef, {
|
|
@@ -4172,15 +4183,7 @@ var GridPopoverEditBearing = function (colDef, props) {
|
|
|
4172
4183
|
var GridPopoverEditBearingCorrectionEditorParams = {
|
|
4173
4184
|
placeHolder: "Enter bearing correction",
|
|
4174
4185
|
formatValue: bearingCorrectionValueFormatter,
|
|
4175
|
-
range:
|
|
4176
|
-
if (value === null)
|
|
4177
|
-
return "Bearing correction is required";
|
|
4178
|
-
if (value >= 360)
|
|
4179
|
-
return "Bearing correction must be less than 360 degrees";
|
|
4180
|
-
if (value <= -180)
|
|
4181
|
-
return "Bearing correction must be greater then -180 degrees";
|
|
4182
|
-
return null;
|
|
4183
|
-
}
|
|
4186
|
+
range: bearingCorrectionRangeValidator
|
|
4184
4187
|
};
|
|
4185
4188
|
var GridPopoverEditBearingCorrection = function (colDef, props) {
|
|
4186
4189
|
return GridPopoverEditBearingLike(colDef, {
|
|
@@ -24935,5 +24938,5 @@ var clickActionButton = function (text, container) { return __awaiter(void 0, vo
|
|
|
24935
24938
|
});
|
|
24936
24939
|
}); };
|
|
24937
24940
|
|
|
24938
|
-
export { ActionButton, ComponentLoadingWrapper, ControlledMenu, Editor, FocusableItem, GenericCellEditorComponentWrapper, Grid, GridCell, GridCellMultiEditor, GridCellMultiSelectClassRules, GridCellRenderer, GridContext, GridContextProvider, GridFormDropDown, GridFormEditBearing, GridFormMessage, GridFormMultiSelect, GridFormPopoverMenu, GridFormSubComponentTextArea, GridFormSubComponentTextInput, GridFormTextArea, GridFormTextInput, GridHeaderSelect, GridIcon, GridLoadableCell, GridPopoutEditMultiSelect, GridPopoverContext, GridPopoverContextProvider, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridSubComponentContext, GridUpdatingContext, GridUpdatingContextProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, bearingCorrectionValueFormatter, bearingNumberParser, bearingStringValidator, bearingValueFormatter, clickActionButton, clickMenuOption, clickMultiSelectOption, closeMenu, closePopover, convertDDToDMS, countRows, deselectRow, editCell, findActionButton, findCell, findCellContains, findMenuOption, findMultiSelectOption, findOpenPopover, findParentWithClass, findRow, fnOrVar, getMultiSelectOptions, hasParentClass, isCellReadOnly, isFloat, isNotEmpty, openAndClickMenuOption, openAndFindMenuOption, queryMenuOption, queryRow, selectCell, selectRow, stringByteLengthIsInvalid, suppressCellKeyboardEvents, typeInputByLabel, typeInputByPlaceholder, typeOnlyInput, typeOtherInput, typeOtherTextArea, useDeferredPromise, useGridPopoverContext, useGridPopoverHook, useMenuState, usePostSortRowsHook, validateMenuOptions, wait$2 as wait };
|
|
24941
|
+
export { ActionButton, ComponentLoadingWrapper, ControlledMenu, Editor, FocusableItem, GenericCellEditorComponentWrapper, Grid, GridCell, GridCellMultiEditor, GridCellMultiSelectClassRules, GridCellRenderer, GridContext, GridContextProvider, GridFormDropDown, GridFormEditBearing, GridFormMessage, GridFormMultiSelect, GridFormPopoverMenu, GridFormSubComponentTextArea, GridFormSubComponentTextInput, GridFormTextArea, GridFormTextInput, GridHeaderSelect, GridIcon, GridLoadableCell, GridPopoutEditMultiSelect, GridPopoverContext, GridPopoverContextProvider, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridSubComponentContext, GridUpdatingContext, GridUpdatingContextProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, bearingCorrectionRangeValidator, bearingCorrectionValueFormatter, bearingNumberParser, bearingRangeValidator, bearingStringValidator, bearingValueFormatter, clickActionButton, clickMenuOption, clickMultiSelectOption, closeMenu, closePopover, convertDDToDMS, countRows, deselectRow, editCell, findActionButton, findCell, findCellContains, findMenuOption, findMultiSelectOption, findOpenPopover, findParentWithClass, findRow, fnOrVar, getMultiSelectOptions, hasParentClass, isCellReadOnly, isFloat, isNotEmpty, openAndClickMenuOption, openAndFindMenuOption, queryMenuOption, queryRow, selectCell, selectRow, stringByteLengthIsInvalid, suppressCellKeyboardEvents, typeInputByLabel, typeInputByPlaceholder, typeOnlyInput, typeOtherInput, typeOtherTextArea, useDeferredPromise, useGridPopoverContext, useGridPopoverHook, useMenuState, usePostSortRowsHook, validateMenuOptions, wait$2 as wait };
|
|
24939
24942
|
//# sourceMappingURL=step-ag-grid.esm.js.map
|