@linzjs/step-ag-grid 7.13.1 → 7.14.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.
@@ -2,15 +2,24 @@
2
2
  import { ICellRendererParams } from "ag-grid-community";
3
3
  import { GridBaseRow } from "../Grid";
4
4
  import { ColDefT } from "../GridCell";
5
- import { EditableCallbackParams, SuppressKeyboardEventParams } from "ag-grid-community/dist/lib/entities/colDef";
5
+ import { EditableCallbackParams, SuppressKeyboardEventParams, ValueFormatterParams, ValueGetterParams } from "ag-grid-community/dist/lib/entities/colDef";
6
6
  export interface RowICellRendererParams<RowType extends GridBaseRow> extends ICellRendererParams {
7
7
  data: RowType;
8
8
  }
9
9
  export interface RowEditableCallbackParams<RowType extends GridBaseRow> extends EditableCallbackParams {
10
10
  data: RowType;
11
11
  }
12
+ export interface RowValueFormatterParams<RowType extends GridBaseRow> extends ValueFormatterParams {
13
+ data: RowType;
14
+ }
15
+ export interface RowValueGetterParams<RowType extends GridBaseRow> extends ValueGetterParams {
16
+ data: RowType;
17
+ }
12
18
  export interface GenericCellColDef<RowType extends GridBaseRow> extends ColDefT<RowType> {
19
+ cellRenderer?: (params: RowICellRendererParams<RowType>) => any;
13
20
  cellRendererParams?: GenericCellRendererParams<RowType>;
21
+ valueGetter?: string | ((params: RowValueGetterParams<RowType>) => any);
22
+ valueFormatter?: string | ((params: RowValueFormatterParams<RowType>) => string);
14
23
  editable?: boolean | ((params: RowEditableCallbackParams<RowType>) => boolean);
15
24
  }
16
25
  export interface GenericCellRendererParams<RowType extends GridBaseRow> {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@linzjs/step-ag-grid",
3
3
  "repository": "github:linz/step-ag-grid.git",
4
4
  "license": "MIT",
5
- "version": "7.13.1",
5
+ "version": "7.14.0",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -1,7 +1,12 @@
1
1
  import { ICellRendererParams } from "ag-grid-community";
2
2
  import { GridBaseRow } from "../Grid";
3
3
  import { ColDefT } from "../GridCell";
4
- import { EditableCallbackParams, SuppressKeyboardEventParams } from "ag-grid-community/dist/lib/entities/colDef";
4
+ import {
5
+ EditableCallbackParams,
6
+ SuppressKeyboardEventParams,
7
+ ValueFormatterParams,
8
+ ValueGetterParams,
9
+ } from "ag-grid-community/dist/lib/entities/colDef";
5
10
 
6
11
  export interface RowICellRendererParams<RowType extends GridBaseRow> extends ICellRendererParams {
7
12
  data: RowType;
@@ -11,8 +16,19 @@ export interface RowEditableCallbackParams<RowType extends GridBaseRow> extends
11
16
  data: RowType;
12
17
  }
13
18
 
19
+ export interface RowValueFormatterParams<RowType extends GridBaseRow> extends ValueFormatterParams {
20
+ data: RowType;
21
+ }
22
+
23
+ export interface RowValueGetterParams<RowType extends GridBaseRow> extends ValueGetterParams {
24
+ data: RowType;
25
+ }
26
+
14
27
  export interface GenericCellColDef<RowType extends GridBaseRow> extends ColDefT<RowType> {
28
+ cellRenderer?: (params: RowICellRendererParams<RowType>) => any;
15
29
  cellRendererParams?: GenericCellRendererParams<RowType>;
30
+ valueGetter?: string | ((params: RowValueGetterParams<RowType>) => any);
31
+ valueFormatter?: string | ((params: RowValueFormatterParams<RowType>) => string);
16
32
  editable?: boolean | ((params: RowEditableCallbackParams<RowType>) => boolean);
17
33
  }
18
34
 
@@ -142,13 +142,6 @@ const GridEditDropDownTemplate: ComponentStory<typeof Grid> = (props: GridProps)
142
142
  filtered: "reload",
143
143
  filterPlaceholder: "Search me...",
144
144
  options: optionsFn,
145
- optionsRequestCancel: () => {
146
- // TODO wrap options in an abortable request
147
- // When performing rest requests call the abort controller,
148
- // otherwise you'll get multiple requests coming back in different order
149
- // eslint-disable-next-line no-console
150
- console.log("optionsRequestCancelled");
151
- },
152
145
  },
153
146
  },
154
147
  ),