@linzjs/step-ag-grid 26.1.0 → 27.0.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/GridCell.d.ts +5 -28
- package/dist/step-ag-grid.cjs +1 -1
- package/dist/step-ag-grid.cjs.map +1 -1
- package/dist/step-ag-grid.esm.js +1 -1
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/GridCell.test.tsx +3 -2
- package/src/components/GridCell.tsx +4 -38
- package/src/components/gridPopoverEdit/GridButton.tsx +4 -4
- package/src/react-menu3/components/ControlledMenu.tsx +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColDef, EditableCallback, ICellEditorParams, ICellRendererParams } from 'ag-grid-community';
|
|
2
|
-
import {
|
|
2
|
+
import { SuppressKeyboardEventParams, ValueFormatterFunc, ValueGetterFunc } from 'ag-grid-community';
|
|
3
3
|
import { ReactElement } from 'react';
|
|
4
4
|
import { GridBaseRow } from './Grid';
|
|
5
5
|
import { GenericCellColDef } from './gridRender';
|
|
@@ -8,48 +8,25 @@ export interface GenericCellEditorProps<E> {
|
|
|
8
8
|
editor?: (editorProps: E) => ReactElement;
|
|
9
9
|
editorParams?: E;
|
|
10
10
|
}
|
|
11
|
-
export interface SAICellRendererParams<TData = any, TValue = any, TContext = any> extends Omit<ICellRendererParams<TData, TValue, TContext>, 'data'> {
|
|
12
|
-
data: TData;
|
|
13
|
-
}
|
|
14
11
|
export declare const GridCellRenderer: (props: ICellRendererParams) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export interface SAValueGetterParams<TData = any, TValue = any> extends Omit<ValueGetterParams<TData, TValue>, 'data'> {
|
|
16
|
-
data: TData;
|
|
17
|
-
getValue: (field: string) => any;
|
|
18
|
-
}
|
|
19
|
-
export interface SAValueGetterFunc<TData = any, TValue = any> {
|
|
20
|
-
(params: SAValueGetterParams<TData, TValue>): TValue | null | undefined;
|
|
21
|
-
}
|
|
22
|
-
export interface SAEditableCallbackParams<TData = any, TValue = any> extends Omit<EditableCallbackParams<TData, TValue>, 'data'> {
|
|
23
|
-
data: TData;
|
|
24
|
-
}
|
|
25
|
-
export interface SAEditableCallback<TData = any, TValue = any> {
|
|
26
|
-
(params: SAEditableCallbackParams<TData, TValue>): boolean;
|
|
27
|
-
}
|
|
28
|
-
export interface SAValueFormatterParams<TData = any, TValue = any> extends Omit<ValueFormatterParams<TData, TValue>, 'data' | 'value'> {
|
|
29
|
-
data: TData;
|
|
30
|
-
value: TValue;
|
|
31
|
-
}
|
|
32
|
-
export interface SAValueFormatterFunc<TData = any, TValue = any> {
|
|
33
|
-
(params: SAValueFormatterParams<TData, TValue>): string;
|
|
34
|
-
}
|
|
35
12
|
export interface ColDefT<TData extends GridBaseRow, ValueType = any> extends ColDef<TData, ValueType> {
|
|
36
13
|
editable?: boolean | EditableCallback<TData, ValueType>;
|
|
37
14
|
valueGetter?: string | ValueGetterFunc<TData, ValueType>;
|
|
38
15
|
valueFormatter?: string | ValueFormatterFunc<TData, ValueType>;
|
|
39
|
-
cellRenderer?: ((props:
|
|
16
|
+
cellRenderer?: ((props: ICellRendererParams<TData, ValueType>) => ReactElement | string | false | null | undefined) | string;
|
|
40
17
|
cellRendererParams?: {
|
|
41
18
|
singleClickEdit?: boolean;
|
|
42
19
|
rightHoverElement?: ReactElement;
|
|
43
20
|
originalCellRenderer?: any;
|
|
44
21
|
editAction?: (selectedRows: TData[]) => void;
|
|
45
22
|
shortcutKeys?: Record<string, () => void>;
|
|
46
|
-
warning?: (props:
|
|
47
|
-
info?: (props:
|
|
23
|
+
warning?: (props: ICellRendererParams<TData, ValueType>) => ReactElement | string | false | null | undefined;
|
|
24
|
+
info?: (props: ICellRendererParams<TData, ValueType>) => ReactElement | string | false | null | undefined;
|
|
48
25
|
};
|
|
49
26
|
editor?: (editorProps: any) => ReactElement;
|
|
50
27
|
}
|
|
51
28
|
export declare const suppressCellKeyboardEvents: (e: SuppressKeyboardEventParams) => any;
|
|
52
|
-
export declare const generateFilterGetter: <TData extends GridBaseRow, ValueType>(field: string | undefined, filterValueGetter: string | ValueGetterFunc<TData, ValueType> | undefined, valueFormatter: string | ValueFormatterFunc<TData, ValueType> | undefined) => string |
|
|
29
|
+
export declare const generateFilterGetter: <TData extends GridBaseRow, ValueType>(field: string | undefined, filterValueGetter: string | ValueGetterFunc<TData, ValueType> | undefined, valueFormatter: string | ValueFormatterFunc<TData, ValueType> | undefined) => string | ValueGetterFunc<TData, ValueType> | undefined;
|
|
53
30
|
export declare const GridCell: <TData extends GridBaseRow, TValue = any, Props extends CellEditorCommon = any>(props: GenericCellColDef<TData, TValue>, custom?: {
|
|
54
31
|
multiEdit?: boolean;
|
|
55
32
|
preventAutoEdit?: boolean;
|
package/dist/step-ag-grid.cjs
CHANGED
|
@@ -2066,7 +2066,7 @@ const ControlledMenuFr = ({ 'aria-label': ariaLabel, className, containerProps,
|
|
|
2066
2066
|
}
|
|
2067
2067
|
break;
|
|
2068
2068
|
}
|
|
2069
|
-
}, [anchorRef, saveButtonRef]);
|
|
2069
|
+
}, [anchorRef, onClose, saveButtonRef]);
|
|
2070
2070
|
const handleKeydownTabAndEnter = React.useMemo(() => handleKeyboardTabAndEnter(true), [handleKeyboardTabAndEnter]);
|
|
2071
2071
|
const handleKeyupTabAndEnter = React.useMemo(() => handleKeyboardTabAndEnter(false), [handleKeyboardTabAndEnter]);
|
|
2072
2072
|
React.useEffect(() => {
|