@linzjs/step-ag-grid 7.13.1 → 7.15.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/src/components/gridRender/GridRenderGenericCell.d.ts +10 -1
- package/dist/src/utils/testUtil.d.ts +1 -0
- package/dist/step-ag-grid.esm.js +17 -1
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/gridRender/GridRenderGenericCell.tsx +17 -1
- package/src/stories/grid/GridPopoutEditDropDown.stories.tsx +0 -7
- package/src/utils/testUtil.ts +7 -0
package/package.json
CHANGED
|
@@ -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 {
|
|
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
|
),
|
package/src/utils/testUtil.ts
CHANGED
|
@@ -137,6 +137,13 @@ export const clickMultiSelectOption = async (value: string): Promise<void> => {
|
|
|
137
137
|
menuItem.parentElement && userEvent.click(menuItem.parentElement);
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
+
export const typeInput = async (value: string): Promise<void> => {
|
|
141
|
+
const openMenu = await findOpenMenu();
|
|
142
|
+
const input = await findQuick({ child: { tagName: "input[type='text']" } }, openMenu);
|
|
143
|
+
userEvent.clear(input);
|
|
144
|
+
userEvent.type(input, value);
|
|
145
|
+
};
|
|
146
|
+
|
|
140
147
|
export const typeOtherInput = async (value: string): Promise<void> => {
|
|
141
148
|
const openMenu = await findOpenMenu();
|
|
142
149
|
const otherInput = await findQuick({ classes: ".subComponent", child: { tagName: "input[type='text']" } }, openMenu);
|