@linzjs/step-ag-grid 28.5.0 → 29.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/index.css +11 -7
- package/dist/src/components/Grid.d.ts +5 -1
- package/dist/src/contexts/GridContext.d.ts +3 -4
- package/dist/src/contexts/GridPopoverContext.d.ts +1 -0
- package/dist/src/contexts/GridUpdatingContext.d.ts +1 -0
- package/dist/src/lui/reactUtils.d.ts +4 -0
- package/dist/step-ag-grid.cjs +265 -247
- package/dist/step-ag-grid.cjs.map +1 -1
- package/dist/step-ag-grid.esm.js +266 -248
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +21 -22
- package/src/components/Grid.tsx +118 -113
- package/src/components/GridPopoverHook.tsx +25 -20
- package/src/components/gridFilter/useGridFilter.ts +3 -3
- package/src/components/gridHook/useGridContextMenu.tsx +3 -3
- package/src/contexts/GridContext.tsx +11 -14
- package/src/contexts/GridContextProvider.tsx +164 -137
- package/src/contexts/GridPopoverContext.tsx +2 -0
- package/src/contexts/GridPopoverContextProvider.tsx +9 -5
- package/src/contexts/GridUpdatingContext.tsx +5 -0
- package/src/contexts/GridUpdatingContextProvider.tsx +35 -28
- package/src/lui/reactUtils.tsx +24 -0
- package/src/react-menu3/components/MenuList.tsx +3 -0
- package/src/stories/grid/GridFilterButtons.stories.tsx +1 -1
- package/src/stories/grid/GridNonEditableRow.stories.tsx +1 -1
- package/src/stories/grid/GridPinnedRow.stories.tsx +1 -1
- package/src/stories/grid/GridPopoutContextMenu.stories.tsx +3 -3
- package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +2 -2
- package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +8 -4
- package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +1 -0
- package/src/stories/grid/GridReadOnly.stories.tsx +1 -1
- package/src/stories/grid/GridViewList.stories.tsx +1 -1
- package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +5 -3
- package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +3 -2
- package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +3 -2
- package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +3 -2
- package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +3 -2
- package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +3 -2
- package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +3 -2
- package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +3 -2
- package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +2 -2
- package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +2 -2
package/dist/index.css
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Scrollbar (Only Chrome)
|
|
5
5
|
*/
|
|
6
|
-
/** Free text input */
|
|
7
6
|
}
|
|
8
7
|
.step-ag-grid-react-menu ::-webkit-scrollbar {
|
|
9
8
|
width: 20px;
|
|
@@ -27,6 +26,9 @@
|
|
|
27
26
|
.step-ag-grid-react-menu .LuiCheckboxInput {
|
|
28
27
|
margin-bottom: 0;
|
|
29
28
|
}
|
|
29
|
+
.step-ag-grid-react-menu {
|
|
30
|
+
/** Free text input */
|
|
31
|
+
}
|
|
30
32
|
.step-ag-grid-react-menu .free-text-input {
|
|
31
33
|
line-height: 33px;
|
|
32
34
|
padding-left: 4px;
|
|
@@ -179,15 +181,17 @@
|
|
|
179
181
|
margin: 0;
|
|
180
182
|
padding: 0;
|
|
181
183
|
list-style: none;
|
|
184
|
+
}
|
|
185
|
+
.szh-menu:focus {
|
|
186
|
+
outline: none;
|
|
187
|
+
}
|
|
188
|
+
.szh-menu {
|
|
182
189
|
box-sizing: border-box;
|
|
183
190
|
width: max-content;
|
|
184
191
|
z-index: 100;
|
|
185
192
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
186
193
|
background-color: #fff;
|
|
187
194
|
}
|
|
188
|
-
.szh-menu:focus {
|
|
189
|
-
outline: none;
|
|
190
|
-
}
|
|
191
195
|
.szh-menu__arrow {
|
|
192
196
|
box-sizing: border-box;
|
|
193
197
|
width: 0.75rem;
|
|
@@ -214,12 +218,12 @@
|
|
|
214
218
|
top: 0.375rem;
|
|
215
219
|
transform: translateX(-50%) rotate(45deg);
|
|
216
220
|
}
|
|
217
|
-
.szh-menu__item {
|
|
218
|
-
cursor: pointer;
|
|
219
|
-
}
|
|
220
221
|
.szh-menu__item:focus {
|
|
221
222
|
outline: none;
|
|
222
223
|
}
|
|
224
|
+
.szh-menu__item {
|
|
225
|
+
cursor: pointer;
|
|
226
|
+
}
|
|
223
227
|
.szh-menu__item--hover {
|
|
224
228
|
background-color: #ebebeb;
|
|
225
229
|
}
|
|
@@ -32,6 +32,10 @@ export interface GridProps<TData extends GridBaseRow = GridBaseRow> {
|
|
|
32
32
|
rowClassRules?: GridOptions['rowClassRules'];
|
|
33
33
|
rowSelection?: 'single' | 'multiple';
|
|
34
34
|
autoSelectFirstRow?: boolean;
|
|
35
|
+
onCellFocused?: (props: {
|
|
36
|
+
colDef: ColDef<TData>;
|
|
37
|
+
data: TData;
|
|
38
|
+
}) => void;
|
|
35
39
|
onColumnMoved?: GridOptions['onColumnMoved'];
|
|
36
40
|
rowDragText?: GridOptions['rowDragText'];
|
|
37
41
|
onRowDragEnd?: (props: GridOnRowDragEndProps<TData>) => Promise<void> | void;
|
|
@@ -61,7 +65,7 @@ export interface GridProps<TData extends GridBaseRow = GridBaseRow> {
|
|
|
61
65
|
* When pressing tab whilst editing the grid will select and edit the next cell if available.
|
|
62
66
|
* Once the last cell to edit closes this callback is called.
|
|
63
67
|
*/
|
|
64
|
-
|
|
68
|
+
onBulkEditingComplete?: () => void;
|
|
65
69
|
/**
|
|
66
70
|
* Context menu definition if required.
|
|
67
71
|
*/
|
|
@@ -19,7 +19,6 @@ export interface GridContextType<TData extends GridBaseRow> {
|
|
|
19
19
|
getColumnIds: (filter?: keyof ColDef | ((r: ColDef) => boolean | undefined | null | number | string)) => string[];
|
|
20
20
|
setApis: (gridApi: GridApi | undefined, hasExternallySelectedItems: boolean, dataTestId?: string) => void;
|
|
21
21
|
prePopupOps: () => void;
|
|
22
|
-
postPopupOps: () => void;
|
|
23
22
|
setQuickFilter: (quickFilter: string) => void;
|
|
24
23
|
editingCells: () => boolean;
|
|
25
24
|
getSelectedRows: <T extends GridBaseRow>() => T[];
|
|
@@ -38,12 +37,11 @@ export interface GridContextType<TData extends GridBaseRow> {
|
|
|
38
37
|
getFirstRowId: () => number;
|
|
39
38
|
autoSizeColumns: (props?: AutoSizeColumnsProps) => AutoSizeColumnsResult;
|
|
40
39
|
sizeColumnsToFit: () => void;
|
|
41
|
-
cancelEdit: () => void;
|
|
42
40
|
startCellEditing: ({ rowId, colId }: {
|
|
43
41
|
rowId: number;
|
|
44
42
|
colId: string;
|
|
45
43
|
}) => Promise<void>;
|
|
46
|
-
|
|
44
|
+
resetFocusedCellAfterCellEditing: () => void;
|
|
47
45
|
updatingCells: (props: {
|
|
48
46
|
selectedRows: GridBaseRow[];
|
|
49
47
|
field?: string;
|
|
@@ -59,7 +57,8 @@ export interface GridContextType<TData extends GridBaseRow> {
|
|
|
59
57
|
invisibleColumnIds: string[] | undefined;
|
|
60
58
|
setInvisibleColumnIds: (colIds: string[]) => void;
|
|
61
59
|
downloadCsv: (csvExportParams?: CsvExportParams) => void;
|
|
62
|
-
|
|
60
|
+
onBulkEditingComplete: () => void;
|
|
61
|
+
setOnBulkEditingComplete: (callback: (() => void) | undefined) => void;
|
|
63
62
|
showNoRowsOverlay: () => void;
|
|
64
63
|
}
|
|
65
64
|
export declare const GridContext: import("react").Context<GridContextType<any>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type GridUpdatingContextType = {
|
|
2
|
+
anyUpdating: () => boolean;
|
|
2
3
|
checkUpdating: (fields: string | string[], id: number | string) => boolean;
|
|
3
4
|
modifyUpdating: (fields: string | string[], ids: (number | string)[], fn: () => void | Promise<void>) => Promise<void>;
|
|
4
5
|
updatedDep: number;
|