@linzjs/step-ag-grid 2.1.2 → 2.1.3
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/README.md +2 -2
- package/dist/index.js +16 -11
- package/dist/index.js.map +1 -1
- package/dist/src/components/Grid.d.ts +1 -0
- package/dist/src/components/GridCell.d.ts +1 -1
- package/dist/src/components/gridForm/GridFormEditBearing.d.ts +1 -1
- package/dist/src/components/gridForm/GridFormMessage.d.ts +1 -1
- package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +1 -1
- package/dist/src/components/gridForm/GridFormPopoutMenu.d.ts +1 -1
- package/dist/src/components/gridForm/GridFormTextArea.d.ts +1 -1
- package/dist/src/components/gridForm/GridFormTextInput.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoverEditBearing.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoverEditDropDown.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoverMenu.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoverMessage.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoverTextArea.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoverTextInput.d.ts +1 -1
- package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +1 -1
- package/dist/src/contexts/GridContext.d.ts +1 -1
- package/dist/src/index.d.ts +28 -28
- package/dist/step-ag-grid.esm.js +16 -11
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +3 -2
- package/src/components/Grid.tsx +5 -4
- package/src/components/GridCell.tsx +7 -7
- package/src/components/GridPopoverHook.tsx +3 -3
- package/src/components/PostSortRowsHook.ts +8 -2
- package/src/components/gridForm/GridFormDropDown.tsx +2 -2
- package/src/components/gridForm/GridFormEditBearing.tsx +2 -2
- package/src/components/gridForm/GridFormMessage.tsx +1 -1
- package/src/components/gridForm/GridFormMultiSelect.tsx +3 -3
- package/src/components/gridForm/GridFormPopoutMenu.tsx +3 -3
- package/src/components/gridForm/GridFormTextArea.tsx +1 -1
- package/src/components/gridForm/GridFormTextInput.tsx +1 -1
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.ts +1 -3
- package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +2 -4
- package/src/components/gridPopoverEdit/GridPopoverEditDropDown.ts +1 -3
- package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +1 -1
- package/src/components/gridPopoverEdit/GridPopoverMessage.ts +1 -1
- package/src/components/gridPopoverEdit/GridPopoverTextArea.ts +1 -1
- package/src/components/gridPopoverEdit/GridPopoverTextInput.ts +1 -1
- package/src/components/gridRender/GridRenderGenericCell.tsx +2 -2
- package/src/components/gridRender/GridRenderPopoutMenuCell.tsx +1 -1
- package/src/contexts/GridContext.tsx +1 -1
- package/src/contexts/GridContextProvider.tsx +2 -2
- package/src/contexts/GridPopoverContextProvider.tsx +2 -2
- package/src/index.ts +28 -28
- package/src/react-menu3/components/ControlledMenu.tsx +1 -1
- package/src/stories/components/FormTest.tsx +4 -4
- package/src/stories/components/GridPopoutBearing.stories.tsx +6 -6
- package/src/stories/components/GridPopoutEditDropDown.stories.tsx +7 -7
- package/src/stories/components/GridPopoutEditGeneric.stories.tsx +4 -4
- package/src/stories/components/GridPopoutEditGenericTextArea.stories.tsx +7 -7
- package/src/stories/components/GridPopoutEditMultiSelect.stories.tsx +9 -9
- package/src/stories/components/GridReadOnly.stories.tsx +7 -7
- package/src/stories/components/ReactMenu.stories.tsx +2 -2
|
@@ -11,7 +11,7 @@ export declare const GridCellRenderer: (props: ICellRendererParams) => JSX.Eleme
|
|
|
11
11
|
export interface ColDefT<RowType extends GridBaseRow> extends ColDef {
|
|
12
12
|
_?: RowType;
|
|
13
13
|
}
|
|
14
|
-
export declare const GridCell: <RowType extends GridBaseRow, Props>(props: GenericCellColDef<RowType>, custom?: {
|
|
14
|
+
export declare const GridCell: <RowType extends GridBaseRow, Props extends CellEditorCommon>(props: GenericCellColDef<RowType>, custom?: {
|
|
15
15
|
multiEdit?: boolean | undefined;
|
|
16
16
|
editor?: ((editorProps: Props) => JSX.Element) | undefined;
|
|
17
17
|
editorParams?: Props | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "../../styles/GridFormEditBearing.scss";
|
|
3
3
|
import { GridBaseRow } from "../Grid";
|
|
4
|
-
import { CellEditorCommon } from "
|
|
4
|
+
import { CellEditorCommon } from "../GridCell";
|
|
5
5
|
export interface GridFormEditBearingProps<RowType extends GridBaseRow> extends CellEditorCommon {
|
|
6
6
|
placeHolder?: string;
|
|
7
7
|
range?: (value: number | null) => string | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GridBaseRow } from "../Grid";
|
|
3
|
-
import { CellEditorCommon, CellParams } from "
|
|
3
|
+
import { CellEditorCommon, CellParams } from "../GridCell";
|
|
4
4
|
export interface GridFormMessageProps<RowType extends GridBaseRow> extends CellEditorCommon {
|
|
5
5
|
message: (cellParams: CellParams<RowType>) => Promise<string | JSX.Element> | string | JSX.Element;
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "../../styles/GridFormMultiSelect.scss";
|
|
3
3
|
import { GridBaseRow } from "../Grid";
|
|
4
|
-
import { CellEditorCommon } from "
|
|
4
|
+
import { CellEditorCommon } from "../GridCell";
|
|
5
5
|
interface MultiFinalSelectOption<ValueType> {
|
|
6
6
|
value: ValueType;
|
|
7
7
|
label?: JSX.Element | string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GridBaseRow } from "../Grid";
|
|
3
|
-
import { CellEditorCommon } from "
|
|
3
|
+
import { CellEditorCommon } from "../GridCell";
|
|
4
4
|
export interface GridFormPopoutMenuProps<RowType extends GridBaseRow> extends CellEditorCommon {
|
|
5
5
|
options: (selectedRows: RowType[]) => Promise<MenuOption<RowType>[]>;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GridBaseRow } from "../Grid";
|
|
3
|
-
import { CellEditorCommon } from "
|
|
3
|
+
import { CellEditorCommon } from "../GridCell";
|
|
4
4
|
export interface GridFormTextAreaProps<RowType extends GridBaseRow> extends CellEditorCommon {
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
required?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GridBaseRow } from "../Grid";
|
|
3
|
-
import { CellEditorCommon } from "
|
|
3
|
+
import { CellEditorCommon } from "../GridCell";
|
|
4
4
|
export interface GridFormTextInputProps<RowType extends GridBaseRow> extends CellEditorCommon {
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
units?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColDefT, GenericCellEditorProps } from "../GridCell";
|
|
2
2
|
import { GridBaseRow } from "../Grid";
|
|
3
3
|
import { GridFormMultiSelectProps } from "../gridForm/GridFormMultiSelect";
|
|
4
|
-
import { GenericCellColDef } from "
|
|
4
|
+
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
5
|
export declare const GridPopoutEditMultiSelect: <RowType extends GridBaseRow, ValueType>(colDef: GenericCellColDef<RowType>, props: GenericCellEditorProps<GridFormMultiSelectProps<RowType, ValueType>>) => ColDefT<RowType>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColDefT, GenericCellEditorProps } from "../GridCell";
|
|
2
2
|
import { GridFormEditBearingProps } from "../gridForm/GridFormEditBearing";
|
|
3
3
|
import { GridBaseRow } from "../Grid";
|
|
4
|
-
import { GenericCellColDef } from "
|
|
4
|
+
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
5
|
export declare const GridPopoverEditBearingLike: <RowType extends GridBaseRow>(colDef: GenericCellColDef<RowType>, props: GenericCellEditorProps<GridFormEditBearingProps<RowType>>) => ColDefT<RowType>;
|
|
6
6
|
export declare const GridPopoverEditBearing: <RowType extends GridBaseRow>(colDef: GenericCellColDef<RowType>, props: GenericCellEditorProps<GridFormEditBearingProps<RowType>>) => ColDefT<RowType>;
|
|
7
7
|
export declare const GridPopoverEditBearingCorrection: <RowType extends GridBaseRow>(colDef: GenericCellColDef<RowType>, props: GenericCellEditorProps<GridFormEditBearingProps<RowType>>) => ColDefT<RowType>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColDefT, GenericCellEditorProps } from "../GridCell";
|
|
2
2
|
import { GridBaseRow } from "../Grid";
|
|
3
3
|
import { GridFormPopoutDropDownProps } from "../gridForm/GridFormDropDown";
|
|
4
|
-
import { GenericCellColDef } from "
|
|
4
|
+
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
5
|
export declare const GridPopoverEditDropDown: <RowType extends GridBaseRow, ValueType>(colDef: GenericCellColDef<RowType>, props: GenericCellEditorProps<GridFormPopoutDropDownProps<RowType, ValueType>>) => ColDefT<RowType>;
|
|
@@ -2,7 +2,7 @@ import "./GridPopoverMenu.scss";
|
|
|
2
2
|
import { GridBaseRow } from "../Grid";
|
|
3
3
|
import { ColDefT, GenericCellEditorProps } from "../GridCell";
|
|
4
4
|
import { GridFormPopoutMenuProps } from "../gridForm/GridFormPopoutMenu";
|
|
5
|
-
import { GenericCellColDef } from "
|
|
5
|
+
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
6
6
|
/**
|
|
7
7
|
* Popout burger menu
|
|
8
8
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColDefT, GenericCellEditorProps } from "../GridCell";
|
|
2
2
|
import { GridFormMessageProps } from "../gridForm/GridFormMessage";
|
|
3
3
|
import { GridBaseRow } from "../Grid";
|
|
4
|
-
import { GenericCellColDef } from "
|
|
4
|
+
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
5
|
export declare const GridPopoverMessage: <RowType extends GridBaseRow>(colDef: GenericCellColDef<RowType>, props: GenericCellEditorProps<GridFormMessageProps<RowType>>) => ColDefT<RowType>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColDefT, GenericCellEditorProps } from "../GridCell";
|
|
2
2
|
import { GridBaseRow } from "../Grid";
|
|
3
3
|
import { GridFormTextAreaProps } from "../gridForm/GridFormTextArea";
|
|
4
|
-
import { GenericCellColDef } from "
|
|
4
|
+
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
5
|
export declare const GridPopoverTextArea: <RowType extends GridBaseRow>(colDef: GenericCellColDef<RowType>, params: GenericCellEditorProps<GridFormTextAreaProps<RowType>>) => ColDefT<RowType>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColDefT, GenericCellEditorProps } from "../GridCell";
|
|
2
2
|
import { GridBaseRow } from "../Grid";
|
|
3
3
|
import { GridFormTextInputProps } from "../gridForm/GridFormTextInput";
|
|
4
|
-
import { GenericCellColDef } from "
|
|
4
|
+
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
5
|
export declare const GridPopoverTextInput: <RowType extends GridBaseRow>(colDef: GenericCellColDef<RowType>, params: GenericCellEditorProps<GridFormTextInputProps<RowType>>) => ColDefT<RowType>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "../../styles/GridRenderGenericCell.scss";
|
|
3
3
|
import { ICellRendererParams } from "ag-grid-community";
|
|
4
4
|
import { GridBaseRow } from "../Grid";
|
|
5
|
-
import { ColDefT } from "
|
|
5
|
+
import { ColDefT } from "../GridCell";
|
|
6
6
|
export interface RowICellRendererParams<RowType extends GridBaseRow> extends ICellRendererParams {
|
|
7
7
|
data: RowType;
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GridApi } from "ag-grid-community";
|
|
3
|
-
import { GridBaseRow } from "
|
|
3
|
+
import { GridBaseRow } from "../components/Grid";
|
|
4
4
|
export interface GridContextType {
|
|
5
5
|
gridReady: () => boolean;
|
|
6
6
|
setGridApi: (gridApi: GridApi | undefined) => void;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
export * from "
|
|
1
|
+
export * from "./react-menu3/index";
|
|
2
2
|
export * from "./react-menu3/types";
|
|
3
|
-
export * from "
|
|
4
|
-
export * from "
|
|
5
|
-
export * from "
|
|
6
|
-
export * from "
|
|
7
|
-
export type { GridBaseRow } from "
|
|
8
|
-
export { Grid } from "
|
|
9
|
-
export * from "
|
|
10
|
-
export { GridIcon } from "
|
|
11
|
-
export { ComponentLoadingWrapper } from "
|
|
12
|
-
export { GenericMultiEditCellClass } from "
|
|
13
|
-
export { GridLoadableCell } from "
|
|
14
|
-
export { useGridPopoverHook } from "
|
|
15
|
-
export { usePostSortRowsHook } from "
|
|
16
|
-
export
|
|
17
|
-
export { GridRenderPopoutMenuCell } from "
|
|
18
|
-
export { GridPopoutEditMultiSelect } from "
|
|
19
|
-
export { GridPopoverMenu } from "
|
|
20
|
-
export { GridPopoverEditBearing } from "
|
|
21
|
-
export { GridPopoverEditBearingCorrection } from "
|
|
22
|
-
export { GridPopoverEditDropDown } from "
|
|
23
|
-
export { GridPopoverMessage } from "
|
|
24
|
-
export { GridPopoverTextArea } from "
|
|
25
|
-
export { GridPopoverTextInput } from "
|
|
26
|
-
export { GridHeaderSelect } from "
|
|
3
|
+
export * from "./contexts/GridUpdatingContext";
|
|
4
|
+
export * from "./contexts/GridUpdatingContextProvider";
|
|
5
|
+
export * from "./contexts/GridContext";
|
|
6
|
+
export * from "./contexts/GridContextProvider";
|
|
7
|
+
export type { GridBaseRow } from "./components/Grid";
|
|
8
|
+
export { Grid } from "./components/Grid";
|
|
9
|
+
export * from "./components/GridCell";
|
|
10
|
+
export { GridIcon } from "./components/GridIcon";
|
|
11
|
+
export { ComponentLoadingWrapper } from "./components/ComponentLoadingWrapper";
|
|
12
|
+
export { GenericMultiEditCellClass } from "./components/GenericCellClass";
|
|
13
|
+
export { GridLoadableCell } from "./components/GridLoadableCell";
|
|
14
|
+
export { useGridPopoverHook } from "./components/GridPopoverHook";
|
|
15
|
+
export { usePostSortRowsHook } from "./components/PostSortRowsHook";
|
|
16
|
+
export * from "./components/gridRender/GridRenderGenericCell";
|
|
17
|
+
export { GridRenderPopoutMenuCell } from "./components/gridRender/GridRenderPopoutMenuCell";
|
|
18
|
+
export { GridPopoutEditMultiSelect } from "./components/gridPopoverEdit/GridPopoutEditMultiSelect";
|
|
19
|
+
export { GridPopoverMenu } from "./components/gridPopoverEdit/GridPopoverMenu";
|
|
20
|
+
export { GridPopoverEditBearing } from "./components/gridPopoverEdit/GridPopoverEditBearing";
|
|
21
|
+
export { GridPopoverEditBearingCorrection } from "./components/gridPopoverEdit/GridPopoverEditBearing";
|
|
22
|
+
export { GridPopoverEditDropDown } from "./components/gridPopoverEdit/GridPopoverEditDropDown";
|
|
23
|
+
export { GridPopoverMessage } from "./components/gridPopoverEdit/GridPopoverMessage";
|
|
24
|
+
export { GridPopoverTextArea } from "./components/gridPopoverEdit/GridPopoverTextArea";
|
|
25
|
+
export { GridPopoverTextInput } from "./components/gridPopoverEdit/GridPopoverTextInput";
|
|
26
|
+
export { GridHeaderSelect } from "./components/gridHeader/GridHeaderSelect";
|
|
27
27
|
export { TextAreaInput } from "./lui/TextAreaInput";
|
|
28
28
|
export { TextInputFormatted } from "./lui/TextInputFormatted";
|
|
29
|
-
export { GridSubComponentTextArea } from "
|
|
30
|
-
export * from "
|
|
31
|
-
export * from "
|
|
29
|
+
export { GridSubComponentTextArea } from "./components/GridSubComponentTextArea";
|
|
30
|
+
export * from "./utils/bearing";
|
|
31
|
+
export * from "./utils/util";
|
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -2216,7 +2216,11 @@ var usePostSortRowsHook = function (_a) {
|
|
|
2216
2216
|
var restorePreviousSortColumnState = function () { return columnApi.applyColumnState({ state: previousColSort.current }); };
|
|
2217
2217
|
var hasNewRows = function () { return nodes.some(function (row) { return previousRowSortIndex[row.data.id] == null; }); };
|
|
2218
2218
|
var sortIsStale = function () {
|
|
2219
|
-
|
|
2219
|
+
// If there are new rows we want to them to be at the bottom of the grid, so we treat it as sort not stale
|
|
2220
|
+
if (hasNewRows())
|
|
2221
|
+
return false;
|
|
2222
|
+
// Otherwise check if the stored sort index matches the new sort index
|
|
2223
|
+
return nodes.some(function (node, index) { return previousRowSortIndex[node.data.id] != index; });
|
|
2220
2224
|
};
|
|
2221
2225
|
var sortNodesByPreviousSort = function () {
|
|
2222
2226
|
return nodes.sort(function (a, b) {
|
|
@@ -2272,6 +2276,7 @@ var usePostSortRowsHook = function (_a) {
|
|
|
2272
2276
|
if (!sortWasStale.current) {
|
|
2273
2277
|
// backup sort state, so we can restore it when sort is clicked on a stale column
|
|
2274
2278
|
previousColSort.current = copyCurrentSortSettings();
|
|
2279
|
+
backupSortOrder();
|
|
2275
2280
|
sortWasStale.current = true;
|
|
2276
2281
|
setStaleGrid(true);
|
|
2277
2282
|
}
|
|
@@ -2321,12 +2326,12 @@ var GridHeaderSelect = function (_a) {
|
|
|
2321
2326
|
* Wrapper for AgGrid to add commonly used functionality.
|
|
2322
2327
|
*/
|
|
2323
2328
|
var Grid = function (params) {
|
|
2324
|
-
var _a;
|
|
2325
|
-
var
|
|
2329
|
+
var _a, _b;
|
|
2330
|
+
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;
|
|
2326
2331
|
var checkUpdating = useContext(GridUpdatingContext).checkUpdating;
|
|
2327
|
-
var
|
|
2332
|
+
var _d = useState(""), internalQuickFilter = _d[0], setInternalQuickFilter = _d[1];
|
|
2328
2333
|
var lastSelectedIds = useRef([]);
|
|
2329
|
-
var
|
|
2334
|
+
var _e = useState(false), staleGrid = _e[0], setStaleGrid = _e[1];
|
|
2330
2335
|
var postSortRows = usePostSortRowsHook({ setStaleGrid: setStaleGrid });
|
|
2331
2336
|
/**
|
|
2332
2337
|
* AgGrid checkbox select does not pass clicks within cell but not on the checkbox to checkbox.
|
|
@@ -2470,7 +2475,7 @@ var Grid = function (params) {
|
|
|
2470
2475
|
}, [columnDefs === null || columnDefs === void 0 ? void 0 : columnDefs.length, sizeColumnsToFit]);
|
|
2471
2476
|
return (jsxs("div", __assign({ "data-testid": params.dataTestId, 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) {
|
|
2472
2477
|
setInternalQuickFilter(event.target.value);
|
|
2473
|
-
} }) }))), jsx(AgGridReact, { getRowId: function (params) { return "".concat(params.data.id); }, suppressRowClickSelection: true, rowSelection: "multiple", suppressBrowserResizeObserver: true, colResizeDefault: "shift", onFirstDataRendered: sizeColumnsToFit, onGridSizeChanged: sizeColumnsToFit, suppressClickEdit: true, onCellKeyDown: onCellKeyDown, onCellClicked: onCellClicked, onCellDoubleClicked: onCellDoubleClick, onCellEditingStarted: refreshSelectedRows, onCellEditingStopped: onCellEditingStopped, domLayout: params.domLayout, columnDefs: columnDefs, rowData: params.rowData, noRowsOverlayComponent: noRowsOverlayComponent, onGridReady: onGridReady, onSortChanged: ensureSelectedRowIsVisible, postSortRows: postSortRows, onSelectionChanged: synchroniseExternalStateToGridSelection })] })));
|
|
2478
|
+
} }) }))), jsx(AgGridReact, { getRowId: function (params) { return "".concat(params.data.id); }, suppressRowClickSelection: true, rowSelection: "multiple", suppressBrowserResizeObserver: true, colResizeDefault: "shift", onFirstDataRendered: sizeColumnsToFit, onGridSizeChanged: sizeColumnsToFit, suppressClickEdit: true, onCellKeyDown: onCellKeyDown, 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 })] })));
|
|
2474
2479
|
};
|
|
2475
2480
|
|
|
2476
2481
|
var GenericMultiEditCellClass = function (props) {
|
|
@@ -2612,7 +2617,7 @@ var GridCellRenderer = function (props) {
|
|
|
2612
2617
|
return ((_a = colDef === null || colDef === void 0 ? void 0 : colDef.cellRendererParams) === null || _a === void 0 ? void 0 : _a.originalCellRenderer) ? (jsx(GridLoadableCell, __assign({ isLoading: checkUpdating((_c = (_b = colDef.field) !== null && _b !== void 0 ? _b : colDef.colId) !== null && _c !== void 0 ? _c : "", props.data.id) }, { children: jsxs(Fragment$1, { children: [typeof warningText === "string" && jsx(GridIcon, { icon: "ic_warning", title: warningText }), typeof infoText === "string" && jsx(GridIcon, { icon: "ic_info", title: infoText }), jsx(colDef.cellRendererParams.originalCellRenderer, __assign({}, props))] }) }))) : (jsx(GridRendererGenericCell, __assign({}, props)));
|
|
2613
2618
|
};
|
|
2614
2619
|
/*
|
|
2615
|
-
*
|
|
2620
|
+
* All cells should use this
|
|
2616
2621
|
*/
|
|
2617
2622
|
var GridCell = function (props, custom) {
|
|
2618
2623
|
var _a;
|
|
@@ -2648,7 +2653,7 @@ var GenericCellEditorComponent3 = function (props) {
|
|
|
2648
2653
|
var multiEdit = (_a = cellEditorParams === null || cellEditorParams === void 0 ? void 0 : cellEditorParams.multiEdit) !== null && _a !== void 0 ? _a : false;
|
|
2649
2654
|
// TODO don't need all these props in context
|
|
2650
2655
|
setProps(props, multiEdit);
|
|
2651
|
-
return (jsxs(Fragment$1, { children: [jsx(
|
|
2656
|
+
return (jsxs(Fragment$1, { children: [jsx(colDef.cellRenderer, __assign({}, props)), (props === null || props === void 0 ? void 0 : props.editor) && jsx(props.editor, __assign({}, cellEditorParams, propsRef.current))] }));
|
|
2652
2657
|
};
|
|
2653
2658
|
|
|
2654
2659
|
/**
|
|
@@ -3112,7 +3117,7 @@ var GridFormMultiSelect = function (props) {
|
|
|
3112
3117
|
};
|
|
3113
3118
|
|
|
3114
3119
|
var GridPopoutEditMultiSelect = function (colDef, props) {
|
|
3115
|
-
return GridCell(__assign({ initialWidth: 65, maxWidth: 150
|
|
3120
|
+
return GridCell(__assign({ initialWidth: 65, maxWidth: 150 }, colDef), __assign(__assign({ editor: GridFormMultiSelect }, props), { editorParams: __assign({ className: "GridMultiSelect-containerMedium" }, props.editorParams) }));
|
|
3116
3121
|
};
|
|
3117
3122
|
|
|
3118
3123
|
var css_248z$2 = ".GridPopoutMenu-burger{cursor:pointer}.GridPopoutMenu-burger svg{fill:#007198}.GridPopoutMenu-burgerDisabled svg{fill:#989189}";
|
|
@@ -3336,7 +3341,7 @@ var GridFormEditBearing = function (_props) {
|
|
|
3336
3341
|
};
|
|
3337
3342
|
|
|
3338
3343
|
var GridPopoverEditBearingLike = function (colDef, props) {
|
|
3339
|
-
return GridCell(__assign({ initialWidth: 65, maxWidth: 150, valueFormatter: bearingValueFormatter
|
|
3344
|
+
return GridCell(__assign({ initialWidth: 65, maxWidth: 150, valueFormatter: bearingValueFormatter }, colDef), __assign({ editor: GridFormEditBearing }, props));
|
|
3340
3345
|
};
|
|
3341
3346
|
var GridPopoverEditBearing = function (colDef, props) {
|
|
3342
3347
|
return GridPopoverEditBearingLike(__assign({ valueFormatter: bearingValueFormatter }, colDef), {
|
|
@@ -3368,7 +3373,7 @@ var GridPopoverEditBearingCorrection = function (colDef, props) {
|
|
|
3368
3373
|
};
|
|
3369
3374
|
|
|
3370
3375
|
var GridPopoverEditDropDown = function (colDef, props) {
|
|
3371
|
-
return GridCell(__assign({ initialWidth: 65, maxWidth: 150
|
|
3376
|
+
return GridCell(__assign({ initialWidth: 65, maxWidth: 150 }, colDef), __assign(__assign({ editor: GridFormDropDown }, props), { editorParams: __assign({
|
|
3372
3377
|
// Defaults to medium size container
|
|
3373
3378
|
className: "GridPopoverEditDropDown-containerMedium" }, props.editorParams) }));
|
|
3374
3379
|
};
|