@linzjs/step-ag-grid 10.0.2 → 12.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 +10 -5
- package/dist/src/components/Grid.d.ts +0 -4
- package/dist/src/components/GridCell.d.ts +1 -1
- package/dist/src/components/GridFilter.d.ts +2 -0
- package/dist/src/components/GridWrapper.d.ts +6 -0
- package/dist/src/components/gridFilter/GridFilterQuick.d.ts +5 -0
- package/dist/src/components/gridFilter/GridFilters.d.ts +5 -0
- package/dist/src/contexts/GridContext.d.ts +5 -0
- package/dist/step-ag-grid.esm.js +51515 -53615
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/components/Grid.tsx +24 -55
- package/src/components/GridFilter.ts +12 -0
- package/src/components/GridWrapper.tsx +12 -0
- package/src/components/gridFilter/GridFilterQuick.tsx +29 -0
- package/src/components/gridFilter/GridFilters.tsx +7 -0
- package/src/contexts/GridContext.tsx +20 -0
- package/src/contexts/GridContextProvider.tsx +51 -17
- package/src/react-menu3/components/ControlledMenu.tsx +1 -1
- package/src/stories/grid/GridPopoverEditBearing.stories.tsx +0 -1
- package/src/stories/grid/GridReadOnly.stories.tsx +46 -14
- package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +46 -13
- package/src/styles/Grid.scss +11 -5
- package/src/utils/textValidator.test.ts +4 -0
- package/src/utils/textValidator.ts +1 -1
package/dist/index.css
CHANGED
|
@@ -324,6 +324,12 @@
|
|
|
324
324
|
flex-direction: column;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
+
.Grid-wrapper {
|
|
328
|
+
display: flex;
|
|
329
|
+
flex-direction: column;
|
|
330
|
+
flex: 1;
|
|
331
|
+
}
|
|
332
|
+
|
|
327
333
|
.Grid-sortIsStale span.ag-icon.ag-icon-desc::after {
|
|
328
334
|
content: "*";
|
|
329
335
|
}
|
|
@@ -331,10 +337,13 @@
|
|
|
331
337
|
content: "*";
|
|
332
338
|
}
|
|
333
339
|
|
|
334
|
-
.Grid-
|
|
340
|
+
.Grid-container-filters {
|
|
335
341
|
width: 100%;
|
|
336
342
|
margin-bottom: 16px;
|
|
337
343
|
flex: 0;
|
|
344
|
+
display: flex;
|
|
345
|
+
flex-direction: row;
|
|
346
|
+
grid-column-gap: 1em;
|
|
338
347
|
}
|
|
339
348
|
|
|
340
349
|
.Grid-quickFilterBox {
|
|
@@ -384,10 +393,6 @@
|
|
|
384
393
|
width: 100%;
|
|
385
394
|
}
|
|
386
395
|
|
|
387
|
-
.Grid-container.ag-theme-alpine ag-cell-label-container {
|
|
388
|
-
padding: 0;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
396
|
.GridPopoverEditDropDown-containerSmall .GridFormDropDown-options {
|
|
392
397
|
max-height: 120px;
|
|
393
398
|
overflow-y: auto;
|
|
@@ -8,16 +8,12 @@ export interface GridProps {
|
|
|
8
8
|
readOnly?: boolean;
|
|
9
9
|
selectable?: boolean;
|
|
10
10
|
["data-testid"]?: string;
|
|
11
|
-
quickFilter?: boolean;
|
|
12
|
-
quickFilterPlaceholder?: string;
|
|
13
|
-
quickFilterValue?: string;
|
|
14
11
|
domLayout?: GridOptions["domLayout"];
|
|
15
12
|
externalSelectedItems?: any[];
|
|
16
13
|
setExternalSelectedItems?: (items: any[]) => void;
|
|
17
14
|
defaultColDef?: GridOptions["defaultColDef"];
|
|
18
15
|
columnDefs: ColDef[];
|
|
19
16
|
rowData: GridOptions["rowData"];
|
|
20
|
-
noRowsOverlayText?: string;
|
|
21
17
|
postSortRows?: GridOptions["postSortRows"];
|
|
22
18
|
animateRows?: boolean;
|
|
23
19
|
rowClassRules?: GridOptions["rowClassRules"];
|
|
@@ -23,4 +23,4 @@ export declare const GridCell: <RowType extends GridBaseRow, Props extends CellE
|
|
|
23
23
|
export interface CellEditorCommon {
|
|
24
24
|
className?: string | undefined;
|
|
25
25
|
}
|
|
26
|
-
export declare const GenericCellEditorComponentWrapper: (editor?: ((props: any) => JSX.Element) | undefined) => import("react").ForwardRefExoticComponent<ICellEditorParams
|
|
26
|
+
export declare const GenericCellEditorComponentWrapper: (editor?: ((props: any) => JSX.Element) | undefined) => import("react").ForwardRefExoticComponent<ICellEditorParams & import("react").RefAttributes<unknown>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GridApi, RowNode } from "ag-grid-community";
|
|
3
3
|
import { GridBaseRow } from "../components/Grid";
|
|
4
|
+
export type GridFilterExternal = (data: any, rowNode: RowNode) => boolean;
|
|
4
5
|
export interface GridContextType {
|
|
5
6
|
gridReady: boolean;
|
|
6
7
|
setGridApi: (gridApi: GridApi | undefined) => void;
|
|
@@ -28,5 +29,9 @@ export interface GridContextType {
|
|
|
28
29
|
externallySelectedItemsAreInSync: boolean;
|
|
29
30
|
setExternallySelectedItemsAreInSync: (inSync: boolean) => void;
|
|
30
31
|
waitForExternallySelectedItemsToBeInSync: () => Promise<void>;
|
|
32
|
+
addExternalFilter: (filter: GridFilterExternal) => void;
|
|
33
|
+
removeExternalFilter: (filter: GridFilterExternal) => void;
|
|
34
|
+
isExternalFilterPresent: () => boolean;
|
|
35
|
+
doesExternalFilterPass: (node: RowNode) => boolean;
|
|
31
36
|
}
|
|
32
37
|
export declare const GridContext: import("react").Context<GridContextType>;
|