@linzjs/step-ag-grid 7.9.0 → 7.10.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.
@@ -20,6 +20,7 @@ export interface GridProps {
20
20
  postSortRows?: GridOptions["postSortRows"];
21
21
  animateRows?: boolean;
22
22
  rowClassRules?: GridOptions["rowClassRules"];
23
+ rowSelection?: "single" | "multiple";
23
24
  }
24
25
  /**
25
26
  * Wrapper for AgGrid to add commonly used functionality.
@@ -2669,12 +2669,12 @@ var GridHeaderSelect = function (_a) {
2669
2669
  * Wrapper for AgGrid to add commonly used functionality.
2670
2670
  */
2671
2671
  var Grid = function (params) {
2672
- var _a, _b;
2673
- var _c = useContext(GridContext), gridReady = _c.gridReady, setGridApi = _c.setGridApi, setQuickFilter = _c.setQuickFilter, ensureRowVisible = _c.ensureRowVisible, selectRowsById = _c.selectRowsById, ensureSelectedRowIsVisible = _c.ensureSelectedRowIsVisible, sizeColumnsToFit = _c.sizeColumnsToFit;
2672
+ var _a, _b, _c;
2673
+ var _d = useContext(GridContext), gridReady = _d.gridReady, setGridApi = _d.setGridApi, setQuickFilter = _d.setQuickFilter, ensureRowVisible = _d.ensureRowVisible, selectRowsById = _d.selectRowsById, ensureSelectedRowIsVisible = _d.ensureSelectedRowIsVisible, sizeColumnsToFit = _d.sizeColumnsToFit;
2674
2674
  var checkUpdating = useContext(GridUpdatingContext).checkUpdating;
2675
- var _d = useState(""), internalQuickFilter = _d[0], setInternalQuickFilter = _d[1];
2675
+ var _e = useState(""), internalQuickFilter = _e[0], setInternalQuickFilter = _e[1];
2676
2676
  var lastSelectedIds = useRef([]);
2677
- var _e = useState(false), staleGrid = _e[0], setStaleGrid = _e[1];
2677
+ var _f = useState(false), staleGrid = _f[0], setStaleGrid = _f[1];
2678
2678
  var postSortRows = usePostSortRowsHook({ setStaleGrid: setStaleGrid });
2679
2679
  /**
2680
2680
  * AgGrid checkbox select does not pass clicks within cell but not on the checkbox to checkbox.
@@ -2832,7 +2832,7 @@ var Grid = function (params) {
2832
2832
  }, [columnDefs === null || columnDefs === void 0 ? void 0 : columnDefs.length, sizeColumnsToFit]);
2833
2833
  return (jsxs("div", __assign({ "data-testid": params["data-testid"], className: clsx("Grid-container", "ag-theme-alpine", staleGrid && "Grid-sortIsStale") }, { children: [params.quickFilter && (jsx("div", __assign({ className: "Grid-quickFilter" }, { children: jsx("input", { "aria-label": "Search", className: "lui-margin-top-xxs lui-margin-bottom-xxs Grid-quickFilterBox", type: "text", placeholder: (_a = params.quickFilterPlaceholder) !== null && _a !== void 0 ? _a : "Search...", value: internalQuickFilter, onChange: function (event) {
2834
2834
  setInternalQuickFilter(event.target.value);
2835
- } }) }))), jsx(AgGridReact, { animateRows: params.animateRows, rowClassRules: params.rowClassRules, defaultColDef: params.defaultColDef, getRowId: function (params) { return "".concat(params.data.id); }, suppressRowClickSelection: true, rowSelection: "multiple", suppressBrowserResizeObserver: true, colResizeDefault: "shift", onFirstDataRendered: sizeColumnsToFit, onGridSizeChanged: sizeColumnsToFit, suppressClickEdit: true, onCellKeyPress: onCellKeyPress, onCellClicked: onCellClicked, onCellDoubleClicked: onCellDoubleClick, onCellEditingStarted: refreshSelectedRows, onCellEditingStopped: onCellEditingStopped, domLayout: params.domLayout, columnDefs: columnDefs, rowData: params.rowData, noRowsOverlayComponent: noRowsOverlayComponent, onGridReady: onGridReady, onSortChanged: ensureSelectedRowIsVisible, postSortRows: (_b = params.postSortRows) !== null && _b !== void 0 ? _b : postSortRows, onSelectionChanged: synchroniseExternalStateToGridSelection })] })));
2835
+ } }) }))), jsx(AgGridReact, { animateRows: params.animateRows, rowClassRules: params.rowClassRules, defaultColDef: params.defaultColDef, getRowId: function (params) { return "".concat(params.data.id); }, suppressRowClickSelection: true, rowSelection: (_b = params.rowSelection) !== null && _b !== void 0 ? _b : "multiple", suppressBrowserResizeObserver: true, colResizeDefault: "shift", onFirstDataRendered: sizeColumnsToFit, onGridSizeChanged: sizeColumnsToFit, suppressClickEdit: true, onCellKeyPress: onCellKeyPress, onCellClicked: onCellClicked, onCellDoubleClicked: onCellDoubleClick, onCellEditingStarted: refreshSelectedRows, onCellEditingStopped: onCellEditingStopped, domLayout: params.domLayout, columnDefs: columnDefs, rowData: params.rowData, noRowsOverlayComponent: noRowsOverlayComponent, onGridReady: onGridReady, onSortChanged: ensureSelectedRowIsVisible, postSortRows: (_c = params.postSortRows) !== null && _c !== void 0 ? _c : postSortRows, onSelectionChanged: synchroniseExternalStateToGridSelection })] })));
2836
2836
  };
2837
2837
 
2838
2838
  var GridCellMultiSelectClassRules = {
@@ -3916,7 +3916,7 @@ var bearingCorrectionValueFormatter = function (params) {
3916
3916
  return "–";
3917
3917
  }
3918
3918
  if (typeof value === "string") {
3919
- return convertDDToDMS(bearingNumberParser(value), true, true);
3919
+ return convertDDToDMS(bearingNumberParser(value), true, false);
3920
3920
  }
3921
3921
  return convertDDToDMS(value, true, false);
3922
3922
  };