@opencorestack/opengridx 3.6.0 → 3.7.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/CHANGELOG.md +17 -0
- package/dist/index.d.ts +30 -0
- package/dist/opengridx.css +1 -1
- package/dist/opengridx.es.js +8566 -8130
- package/dist/opengridx.es.js.map +1 -1
- package/dist/opengridx.umd.js +15 -15
- package/dist/opengridx.umd.js.map +1 -1
- package/docs/API_REFERENCE.md +3 -2
- package/docs/architecture/datagrid-orchestration.md +46 -29
- package/docs/architecture/grid-row-meta.md +1 -1
- package/docs/customization/slots-api.md +1 -1
- package/docs/customization/theming.md +43 -0
- package/docs/features/virtualization.md +16 -2
- package/docs/performance.md +3 -1
- package/lib/components/AiAssistant/GridAiAssistantPanel.css +3 -1
- package/lib/components/Cell/Cell.css +4 -2
- package/lib/components/ColumnGroupHeader/ColumnGroupHeader.css +2 -2
- package/lib/components/ColumnVisibilityPanel/ColumnVisibilityPanel.css +3 -1
- package/lib/components/DataGrid/DataGrid.css +9 -9
- package/lib/components/DataGrid/DataGrid.tsx +163 -671
- package/lib/components/DataGrid/GridRoot.tsx +239 -0
- package/lib/components/DataGrid/GridViewport.tsx +314 -0
- package/lib/components/FilterPanel/FilterPanel.css +9 -8
- package/lib/components/Header/ColumnMenu.css +4 -3
- package/lib/components/Header/Header.css +5 -4
- package/lib/components/HeaderFilter/HeaderFilter.css +1 -1
- package/lib/components/Pagination/Pagination.css +1 -1
- package/lib/components/Row/Row.css +2 -2
- package/lib/components/Toolbar/GridToolbar.css +8 -7
- package/lib/components/Toolbar/PivotPanel.css +3 -3
- package/lib/hooks/core/useGridDevWarnings.ts +3 -1
- package/lib/hooks/core/useGridEditPipeline.ts +55 -0
- package/lib/hooks/core/useGridRangeEditing.ts +129 -0
- package/lib/hooks/core/useGridRenderWindow.ts +66 -0
- package/lib/hooks/core/useGridScrollViewport.ts +42 -0
- package/lib/hooks/core/useGridSelectionAndStateApi.ts +61 -0
- package/lib/hooks/core/useGridToolbarStack.ts +49 -0
- package/lib/hooks/core/useGridViewApis.ts +46 -0
- package/lib/styles/base/variables.css +12 -0
- package/lib/theme/DataGridThemeProvider.tsx +15 -0
- package/lib/theme/__baseline__/default-theme.darwin.chromium.json +1503 -0
- package/lib/theme/__baseline__/default-theme.darwin.firefox.json +1503 -0
- package/lib/theme/__baseline__/default-theme.darwin.webkit.json +1503 -0
- package/lib/theme/types.ts +31 -0
- package/lib/types/ai.ts +109 -0
- package/lib/types/api.ts +169 -0
- package/lib/types/columns.ts +341 -0
- package/lib/types/dataSource.ts +40 -0
- package/lib/types/editing.ts +77 -0
- package/lib/types/export.ts +164 -0
- package/lib/types/filtering.ts +52 -0
- package/lib/types/grouping.ts +27 -0
- package/lib/types/index.ts +18 -1702
- package/lib/types/locale.ts +51 -0
- package/lib/types/props.ts +405 -0
- package/lib/types/rows.ts +132 -0
- package/lib/types/selection.ts +66 -0
- package/lib/types/slots.ts +56 -0
- package/lib/types/sorting.ts +25 -0
- package/lib/types/state.ts +35 -0
- package/llms.txt +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { GridToolbarProps } from '../components/Toolbar/GridToolbar';
|
|
2
|
+
import type { PaginationProps } from '../components/Pagination/Pagination';
|
|
3
|
+
import type { GridPaginationModel } from './dataSource';
|
|
4
|
+
import type { GridAggregationModel, GridAggregationResult } from './grouping';
|
|
5
|
+
import type { DataGridProps } from './props';
|
|
6
|
+
import type { GridApi } from './api';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Props the grid passes to `slots.toolbar`, before `slotProps.toolbar` is merged over them: the
|
|
10
|
+
* `GridToolbarProps` it controls (columns, models and their change handlers) plus `apiRef`.
|
|
11
|
+
* @since v3.0
|
|
12
|
+
*/
|
|
13
|
+
export interface GridToolbarSlotProps extends GridToolbarProps {
|
|
14
|
+
apiRef: React.MutableRefObject<GridApi>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props the grid passes to `slots.pagination`, before `slotProps.pagination` is merged over them.
|
|
19
|
+
* @since v3.0
|
|
20
|
+
*/
|
|
21
|
+
export type GridPaginationSlotProps = PaginationProps;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Props of `slots.noRowsOverlay` and `slots.loadingOverlay`: the grid passes none of its own, only
|
|
25
|
+
* `slotProps.noRowsOverlay` / `slotProps.loadingOverlay`.
|
|
26
|
+
* @since v3.0
|
|
27
|
+
*/
|
|
28
|
+
export type GridOverlaySlotProps = Record<string, unknown>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Props the grid passes to `slots.footer`, before `slotProps.footer` is merged over them.
|
|
32
|
+
* @since v3.0
|
|
33
|
+
*/
|
|
34
|
+
export interface GridFooterSlotProps {
|
|
35
|
+
apiRef: React.MutableRefObject<GridApi>;
|
|
36
|
+
/** The active aggregation model (`{}` when none). */
|
|
37
|
+
aggregationModel: GridAggregationModel;
|
|
38
|
+
/** The grand-total aggregation result, or `null` when no aggregation is active. */
|
|
39
|
+
aggregationResult: GridAggregationResult | null;
|
|
40
|
+
/**
|
|
41
|
+
* The built-in pager's count: rows after filtering, pinned rows excluded (`rowCount` from the
|
|
42
|
+
* server in server pagination mode). Under tree data / row grouping: the filtered data rows.
|
|
43
|
+
*/
|
|
44
|
+
rowCount: number;
|
|
45
|
+
/** Whether pagination is in effect (false under row grouping and infinite scroll). */
|
|
46
|
+
pagination: boolean;
|
|
47
|
+
paginationModel: GridPaginationModel;
|
|
48
|
+
pageSizeOptions: number[];
|
|
49
|
+
onPaginationModelChange: (model: GridPaginationModel) => void;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** The `slots` prop of `DataGrid`: components that replace built-in parts of the grid. */
|
|
53
|
+
export type GridSlots = NonNullable<DataGridProps['slots']>;
|
|
54
|
+
|
|
55
|
+
/** The `slotProps` prop of `DataGrid`: props for each slot, keyed like `GridSlots`. */
|
|
56
|
+
export type GridSlotProps = NonNullable<DataGridProps['slotProps']>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { GridRowId, GridRowModel, GridValidRowModel } from './rows';
|
|
2
|
+
|
|
3
|
+
export type GridSortDirection = 'asc' | 'desc' | null;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Parameters passed to `GridColDef.sortComparator` for each side of a comparison. For a row-grouping
|
|
7
|
+
* group row, `row` is the synthetic group row and `value` its grouping value.
|
|
8
|
+
* @since v3.1
|
|
9
|
+
*/
|
|
10
|
+
export interface GridSortCellParams<R extends GridValidRowModel = GridRowModel> {
|
|
11
|
+
id: GridRowId;
|
|
12
|
+
field: string;
|
|
13
|
+
row: R;
|
|
14
|
+
value: unknown;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface GridSortModel {
|
|
18
|
+
field: string;
|
|
19
|
+
sort: GridSortDirection;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface GridSortItem {
|
|
23
|
+
field: string;
|
|
24
|
+
sort: 'asc' | 'desc';
|
|
25
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { GridRowId, GridRowModel, GridPinnedRows } from './rows';
|
|
2
|
+
import type { GridColDef, GridColumnVisibilityModel, GridPinnedColumns } from './columns';
|
|
3
|
+
|
|
4
|
+
export interface GridInternalState {
|
|
5
|
+
rows: {
|
|
6
|
+
idRowsLookup: Map<GridRowId, GridRowModel>;
|
|
7
|
+
allRows: GridRowId[];
|
|
8
|
+
/** Row object → its getRowId() key. Rows are stored untouched, so this is how ids are resolved. */
|
|
9
|
+
idByRow: Map<GridRowModel, GridRowId>;
|
|
10
|
+
};
|
|
11
|
+
pagination: {
|
|
12
|
+
/** Server-reported total (dataSource responses); undefined until one arrives. */
|
|
13
|
+
rowCount?: number;
|
|
14
|
+
};
|
|
15
|
+
columns: {
|
|
16
|
+
all: GridColDef[];
|
|
17
|
+
lookup: Map<string, GridColDef>;
|
|
18
|
+
orderedFields: string[];
|
|
19
|
+
columnVisibilityModel: GridColumnVisibilityModel;
|
|
20
|
+
};
|
|
21
|
+
pinning: {
|
|
22
|
+
pinnedColumns: GridPinnedColumns;
|
|
23
|
+
pinnedRows: GridPinnedRows;
|
|
24
|
+
};
|
|
25
|
+
dimensions: {
|
|
26
|
+
rowHeight: number;
|
|
27
|
+
headerHeight: number;
|
|
28
|
+
viewportWidth: number;
|
|
29
|
+
viewportHeight: number;
|
|
30
|
+
};
|
|
31
|
+
dataSource: {
|
|
32
|
+
loading: boolean;
|
|
33
|
+
error: unknown;
|
|
34
|
+
};
|
|
35
|
+
}
|
package/llms.txt
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencorestack/opengridx",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "OpenGridX: High-performance React data infrastructure. Unlock advanced Row Grouping, Excel Export, and Column Pinning without the usual \"Pro\" gatekeeping. Built for speed, scale, and complete architectural freedom. Fully open, virtualization-ready, and feature-complete.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/opengridx.umd.js",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"test:browser": "vitest run --project browser",
|
|
60
60
|
"test:all": "vitest run",
|
|
61
61
|
"test:smoke": "node scripts/smoke.mjs",
|
|
62
|
+
"test:demo": "npm run build && playwright test --config e2e/playwright.demo.config.ts",
|
|
62
63
|
"bench": "node bench/run.mjs",
|
|
63
64
|
"test:watch": "vitest --project unit",
|
|
64
65
|
"coverage": "vitest run --coverage",
|
|
@@ -147,6 +148,7 @@
|
|
|
147
148
|
"vitest": "^4.1.11"
|
|
148
149
|
},
|
|
149
150
|
"overrides": {
|
|
150
|
-
"uuid": "^11.1.1"
|
|
151
|
+
"uuid": "^11.1.1",
|
|
152
|
+
"source-map-js": "^1.2.2"
|
|
151
153
|
}
|
|
152
154
|
}
|