@alaarab/ogrid-mcp 2.9.0 → 2.11.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/bundled-docs/api/README.md +7 -32
- package/bundled-docs/api/column-def.mdx +1 -1
- package/bundled-docs/api/components-column-chooser.mdx +0 -96
- package/bundled-docs/api/components-column-header-filter.mdx +1 -83
- package/bundled-docs/api/components-datagrid-table.mdx +0 -63
- package/bundled-docs/api/components-pagination-controls.mdx +0 -94
- package/bundled-docs/api/components-sidebar.mdx +0 -76
- package/bundled-docs/api/components-status-bar.mdx +0 -66
- package/bundled-docs/api/headless-hooks.mdx +410 -0
- package/bundled-docs/api/ogrid-props.mdx +1 -1
- package/bundled-docs/api/types.mdx +1 -1
- package/bundled-docs/features/cell-references.mdx +2 -116
- package/bundled-docs/features/column-chooser.mdx +0 -131
- package/bundled-docs/features/column-groups.mdx +1 -136
- package/bundled-docs/features/column-pinning.mdx +1 -108
- package/bundled-docs/features/column-reordering.mdx +1 -168
- package/bundled-docs/features/column-types.mdx +0 -71
- package/bundled-docs/features/context-menu.mdx +1 -93
- package/bundled-docs/features/csv-export.mdx +1 -104
- package/bundled-docs/features/editing.mdx +0 -149
- package/bundled-docs/features/filtering.mdx +0 -119
- package/bundled-docs/features/formulas.mdx +2 -102
- package/bundled-docs/features/grid-api.mdx +1 -108
- package/bundled-docs/features/keyboard-navigation.mdx +1 -74
- package/bundled-docs/features/mobile-touch.mdx +0 -71
- package/bundled-docs/features/pagination.mdx +0 -105
- package/bundled-docs/features/performance.mdx +0 -191
- package/bundled-docs/features/premium-inputs.mdx +0 -311
- package/bundled-docs/features/responsive-columns.mdx +1 -76
- package/bundled-docs/features/row-selection.mdx +2 -106
- package/bundled-docs/features/server-side-data.mdx +1 -129
- package/bundled-docs/features/sidebar.mdx +1 -78
- package/bundled-docs/features/sorting.mdx +2 -108
- package/bundled-docs/features/spreadsheet-selection.mdx +2 -79
- package/bundled-docs/features/status-bar.mdx +1 -72
- package/bundled-docs/features/toolbar.mdx +1 -75
- package/bundled-docs/features/virtual-scrolling.mdx +1 -304
- package/bundled-docs/getting-started/headless-or-component.mdx +112 -0
- package/bundled-docs/getting-started/installation.mdx +11 -141
- package/bundled-docs/getting-started/overview.mdx +15 -55
- package/bundled-docs/getting-started/quick-start.mdx +4 -279
- package/bundled-docs/guides/browser-support-matrix.mdx +6 -17
- package/bundled-docs/guides/mcp-live-testing.mdx +0 -82
- package/bundled-docs/guides/mcp.mdx +4 -4
- package/bundled-docs/guides/migration-from-ag-grid.mdx +2 -3
- package/bundled-docs/guides/theming.mdx +50 -23
- package/dist/esm/index.js +9 -39
- package/package.json +5 -5
- package/bundled-docs/api/js-api.mdx +0 -198
- package/bundled-docs/getting-started/vanilla-js.mdx +0 -218
- package/bundled-docs/guides/framework-showcase.mdx +0 -246
|
@@ -6,7 +6,9 @@ description: What is OGrid and why use it
|
|
|
6
6
|
|
|
7
7
|
# Overview
|
|
8
8
|
|
|
9
|
-
OGrid is a lightweight, open-source data grid library that delivers spreadsheet-grade features without the enterprise paywall. It ships
|
|
9
|
+
OGrid is a lightweight, open-source React data grid library that delivers spreadsheet-grade features without the enterprise paywall. It ships React UI implementations for Radix and Fluent UI, all powered by a shared TypeScript core.
|
|
10
|
+
|
|
11
|
+
> **Note:** Angular, Vue, vanilla JS, and Material UI adapters were available through earlier 2.9.x versions and remain on npm at those versions. New development is React-first (Radix / Fluent). See the project README's "Frozen adapters" section if you have an existing install on one of the frozen variants.
|
|
10
12
|
|
|
11
13
|
## Why OGrid?
|
|
12
14
|
|
|
@@ -14,26 +16,24 @@ Most production-grade React data grids fall into one of two camps: free but limi
|
|
|
14
16
|
|
|
15
17
|
- **Free and MIT-licensed.** Every feature is included. No enterprise tier, no feature gating.
|
|
16
18
|
- **25+ built-in features.** Sorting, filtering, pagination, cell editing, clipboard, undo/redo, fill handle, row selection, cell range selection, column pinning, column groups, CSV export, context menu, keyboard navigation, cell references, virtual scrolling, status bar, sidebar, and more.
|
|
17
|
-
- **
|
|
19
|
+
- **Two React UI flavors.** Pick Radix or Fluent — switch later with a one-line import change.
|
|
18
20
|
- **TypeScript-first.** Full strict-mode TypeScript with exported types for every prop, event, and API method.
|
|
19
|
-
- **Lightweight.** The Radix package has no heavy framework dependency. Fluent
|
|
21
|
+
- **Lightweight.** The Radix package has no heavy framework dependency. Fluent uses `@fluentui/react-components` as a peer dependency.
|
|
20
22
|
|
|
21
23
|
## Architecture
|
|
22
24
|
|
|
23
|
-
OGrid is built on a **3-layer architecture**: a pure TypeScript core,
|
|
25
|
+
OGrid is built on a **3-layer architecture**: a pure TypeScript core, a React adapter layer, and thin UI shells. No duplicated logic, no drift.
|
|
24
26
|
|
|
25
27
|
|
|
26
28
|
<ArchitectureDiagram />
|
|
27
29
|
|
|
28
30
|
### Core Layer - `@alaarab/ogrid-core`
|
|
29
31
|
|
|
30
|
-
Pure TypeScript with zero dependencies. Provides the type system (`IOGridProps`, `IColumnDef`, `IOGridApi`, `FilterValue`, etc.) and shared algorithms (`getCellValue`, `buildHeaderRows`, `parseValue`, `normalizeSelectionRange`, etc.)
|
|
31
|
-
|
|
32
|
-
### Framework Adapter Layers
|
|
32
|
+
Pure TypeScript with zero dependencies. Provides the type system (`IOGridProps`, `IColumnDef`, `IOGridApi`, `FilterValue`, etc.) and shared algorithms (`getCellValue`, `buildHeaderRows`, `parseValue`, `normalizeSelectionRange`, etc.) consumed by the React adapter.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
### React Adapter - `@alaarab/ogrid-react`
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Translates Core's algorithms into idiomatic React hooks.
|
|
37
37
|
|
|
38
38
|
| Domain | Hooks |
|
|
39
39
|
|---|---|
|
|
@@ -45,26 +45,7 @@ Each framework adapter translates Core's algorithms into idiomatic framework pat
|
|
|
45
45
|
| **Layout** | `useColumnResize` · `useSideBarState` · `useColumnChooserState` |
|
|
46
46
|
| **Filtering** | `useColumnHeaderFilterState` · `useFilterOptions` |
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Angular v21 services using signals (`signal()`, `computed()`, `effect()`). Standalone components with inline templates. Zone-less by default.
|
|
51
|
-
|
|
52
|
-
| Service | Equivalent |
|
|
53
|
-
|---|---|
|
|
54
|
-
| `OGridService` | `useOGrid` - pagination, sorting, filtering, visibility, editing |
|
|
55
|
-
| `DataGridStateService` | `useDataGridState` - layout, selection, editing, interaction |
|
|
56
|
-
|
|
57
|
-
**Vue** - `@alaarab/ogrid-vue`
|
|
58
|
-
|
|
59
|
-
Vue 3 Composition API composables using `ref()`, `computed()`, `watch()`.
|
|
60
|
-
|
|
61
|
-
| Composable | Equivalent |
|
|
62
|
-
|---|---|
|
|
63
|
-
| `useOGrid` | Pagination, sorting, filtering, column visibility |
|
|
64
|
-
| `useDataGridState` | Layout, cell selection, editing, clipboard, keyboard nav |
|
|
65
|
-
| 20+ feature composables | `useCellEditing`, `useCellSelection`, `useClipboard`, etc. |
|
|
66
|
-
|
|
67
|
-
### UI Layer - Pick Your Framework
|
|
48
|
+
### UI Layer - Pick Your Design System
|
|
68
49
|
|
|
69
50
|
Each UI package is a thin shell (~1,500 lines) that calls the same core logic and renders into native components:
|
|
70
51
|
|
|
@@ -72,21 +53,13 @@ Each UI package is a thin shell (~1,500 lines) that calls the same core logic an
|
|
|
72
53
|
|---|---|---|
|
|
73
54
|
| `@alaarab/ogrid-react-radix` | Radix primitives | Lightweight apps, custom design systems |
|
|
74
55
|
| `@alaarab/ogrid-react-fluent` | Fluent UI v9 | Microsoft 365, SharePoint, Teams apps |
|
|
75
|
-
| `@alaarab/ogrid-react-material` | MUI v7 | Material Design apps, dashboards |
|
|
76
|
-
| `@alaarab/ogrid-angular-radix` | Angular CDK | Lightweight Angular apps, custom design systems |
|
|
77
|
-
| `@alaarab/ogrid-angular-material` | Angular Material v21 | Angular + Material Design |
|
|
78
|
-
| `@alaarab/ogrid-angular-primeng` | PrimeNG v21 | Angular + PrimeNG ecosystem |
|
|
79
|
-
| `@alaarab/ogrid-vue-radix` | Radix primitives (Vue) | Lightweight Vue apps, custom design systems |
|
|
80
|
-
| `@alaarab/ogrid-vue-vuetify` | Vuetify 3 | Vue + Material Design |
|
|
81
|
-
| `@alaarab/ogrid-vue-primevue` | PrimeVue 4 | Vue + PrimeVue ecosystem |
|
|
82
56
|
|
|
83
|
-
|
|
57
|
+
Both packages export the same `OGrid` component with the same props. Switching design systems is a one-line import change - your column definitions, event handlers, data sources, and API calls stay identical.
|
|
84
58
|
|
|
85
59
|
### Why This Matters
|
|
86
60
|
|
|
87
|
-
- **Shared core, broad portability.** A core fix often benefits every package, while wrapper-specific UI behavior is verified in the browser matrix and documented per package.
|
|
88
|
-
- **Zero lock-in.** Migrate between React, Angular, and Vue without rewriting business logic.
|
|
89
61
|
- **Shared core, aligned behavior.** Most behavior is implemented once in core, with package-specific docs and tests calling out the remaining differences.
|
|
62
|
+
- **Zero lock-in.** Migrate between React UI flavors without rewriting business logic.
|
|
90
63
|
- **Small surface area.** No duplicated state logic to drift out of sync.
|
|
91
64
|
|
|
92
65
|
## Packages
|
|
@@ -98,19 +71,6 @@ All packages within a framework export the same `OGrid` component with the same
|
|
|
98
71
|
| `@alaarab/ogrid-react` | [](https://npmjs.com/package/@alaarab/ogrid-react) | React hooks, headless components, utilities |
|
|
99
72
|
| `@alaarab/ogrid-react-radix` | [](https://npmjs.com/package/@alaarab/ogrid-react-radix) | Radix UI implementation (default, lightweight) |
|
|
100
73
|
| `@alaarab/ogrid-react-fluent` | [](https://npmjs.com/package/@alaarab/ogrid-react-fluent) | Fluent UI v9 implementation |
|
|
101
|
-
| `@alaarab/ogrid-react-material` | [](https://npmjs.com/package/@alaarab/ogrid-react-material) | Material UI v7 implementation |
|
|
102
|
-
| **Angular** | | |
|
|
103
|
-
| `@alaarab/ogrid-angular` | [](https://npmjs.com/package/@alaarab/ogrid-angular) | Angular v21 services with signals |
|
|
104
|
-
| `@alaarab/ogrid-angular-radix` | [](https://npmjs.com/package/@alaarab/ogrid-angular-radix) | Angular CDK implementation (lightweight) |
|
|
105
|
-
| `@alaarab/ogrid-angular-material` | [](https://npmjs.com/package/@alaarab/ogrid-angular-material) | Angular Material v21 implementation |
|
|
106
|
-
| `@alaarab/ogrid-angular-primeng` | [](https://npmjs.com/package/@alaarab/ogrid-angular-primeng) | PrimeNG v21 implementation |
|
|
107
|
-
| **Vue** | | |
|
|
108
|
-
| `@alaarab/ogrid-vue` | [](https://npmjs.com/package/@alaarab/ogrid-vue) | Vue 3 composables with Composition API |
|
|
109
|
-
| `@alaarab/ogrid-vue-radix` | [](https://npmjs.com/package/@alaarab/ogrid-vue-radix) | Radix Vue implementation (lightweight) |
|
|
110
|
-
| `@alaarab/ogrid-vue-vuetify` | [](https://npmjs.com/package/@alaarab/ogrid-vue-vuetify) | Vuetify 3 implementation |
|
|
111
|
-
| `@alaarab/ogrid-vue-primevue` | [](https://npmjs.com/package/@alaarab/ogrid-vue-primevue) | PrimeVue 4 implementation |
|
|
112
|
-
| **Other** | | |
|
|
113
|
-
| `@alaarab/ogrid-js` | [](https://npmjs.com/package/@alaarab/ogrid-js) | Vanilla JS data grid (no framework) |
|
|
114
74
|
|
|
115
75
|
## Feature Highlights
|
|
116
76
|
|
|
@@ -150,11 +110,11 @@ OGrid is designed as a drop-in replacement for AG Grid with a simpler, more Reac
|
|
|
150
110
|
OGrid's browser checks now have an explicit contract:
|
|
151
111
|
|
|
152
112
|
- A fast smoke suite runs on every push through the main CI workflow
|
|
153
|
-
- The broader Playwright matrix runs across
|
|
113
|
+
- The broader Playwright matrix runs across the active React example apps only when you dispatch it manually
|
|
154
114
|
|
|
155
115
|
See the [Browser Support Matrix](../guides/browser-support-matrix) for the current coverage map and commands.
|
|
156
116
|
|
|
157
117
|
## Next Steps
|
|
158
118
|
|
|
159
|
-
- [Installation](./installation) -- install OGrid
|
|
160
|
-
- [Quick Start](./quick-start) -- build a grid
|
|
119
|
+
- [Installation](./installation) -- install OGrid
|
|
120
|
+
- [Quick Start](./quick-start) -- build a React grid in 5 minutes
|
|
@@ -11,80 +11,20 @@ Here's a grid in 60 seconds — sorting, filtering, editing, pagination, and key
|
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
|
-
Pick
|
|
15
|
-
|
|
16
|
-
<Tabs groupId="framework">
|
|
17
|
-
<TabItem value="react" label="React" default>
|
|
14
|
+
Pick the React UI flavor that matches your design system:
|
|
18
15
|
|
|
19
16
|
<Tabs groupId="react-ui">
|
|
20
|
-
<TabItem value="radix" label="Radix (Default)" default>
|
|
17
|
+
<TabItem value="radix" label="React + Radix (Default)" default>
|
|
21
18
|
|
|
22
19
|
```bash
|
|
23
20
|
npm install @alaarab/ogrid-react-radix
|
|
24
21
|
```
|
|
25
22
|
|
|
26
23
|
</TabItem>
|
|
27
|
-
<TabItem value="fluent" label="Fluent UI">
|
|
24
|
+
<TabItem value="fluent" label="React + Fluent UI">
|
|
28
25
|
|
|
29
26
|
```bash
|
|
30
27
|
npm install @alaarab/ogrid-react-fluent @fluentui/react-components
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
</TabItem>
|
|
34
|
-
<TabItem value="material" label="Material UI">
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
npm install @alaarab/ogrid-react-material @mui/material @emotion/react @emotion/styled
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
</TabItem>
|
|
41
|
-
</Tabs>
|
|
42
|
-
|
|
43
|
-
</TabItem>
|
|
44
|
-
<TabItem value="angular" label="Angular">
|
|
45
|
-
|
|
46
|
-
<Tabs groupId="angular-ui">
|
|
47
|
-
<TabItem value="angular-material" label="Angular Material" default>
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
npm install @alaarab/ogrid-angular-material @angular/material @angular/cdk
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
</TabItem>
|
|
54
|
-
<TabItem value="angular-primeng" label="PrimeNG">
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
npm install @alaarab/ogrid-angular-primeng primeng
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
</TabItem>
|
|
61
|
-
</Tabs>
|
|
62
|
-
|
|
63
|
-
</TabItem>
|
|
64
|
-
<TabItem value="vue" label="Vue">
|
|
65
|
-
|
|
66
|
-
<Tabs groupId="vue-ui">
|
|
67
|
-
<TabItem value="vue-vuetify" label="Vuetify" default>
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
npm install @alaarab/ogrid-vue-vuetify vuetify
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
</TabItem>
|
|
74
|
-
<TabItem value="vue-primevue" label="PrimeVue">
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
npm install @alaarab/ogrid-vue-primevue primevue
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
</TabItem>
|
|
81
|
-
</Tabs>
|
|
82
|
-
|
|
83
|
-
</TabItem>
|
|
84
|
-
<TabItem value="js" label="Vanilla JS">
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
npm install @alaarab/ogrid-js
|
|
88
28
|
```
|
|
89
29
|
|
|
90
30
|
</TabItem>
|
|
@@ -153,165 +93,6 @@ The `OGrid` component has identical props across all React UI packages. To switc
|
|
|
153
93
|
|
|
154
94
|
- **Radix** (lightweight, no peer deps): `from '@alaarab/ogrid-react-radix'`
|
|
155
95
|
- **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
|
|
156
|
-
- **Material UI** (MUI v7): `from '@alaarab/ogrid-react-material'` - wrap in `<ThemeProvider>`
|
|
157
|
-
:::
|
|
158
|
-
|
|
159
|
-
</TabItem>
|
|
160
|
-
<TabItem value="angular" label="Angular">
|
|
161
|
-
|
|
162
|
-
```typescript
|
|
163
|
-
|
|
164
|
-
interface Employee {
|
|
165
|
-
id: number;
|
|
166
|
-
name: string;
|
|
167
|
-
department: string;
|
|
168
|
-
salary: number;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
@Component({
|
|
172
|
-
standalone: true,
|
|
173
|
-
imports: [OGridComponent],
|
|
174
|
-
template: `<ogrid [props]="gridProps" />`
|
|
175
|
-
})
|
|
176
|
-
export class EmployeeGridComponent {
|
|
177
|
-
private readonly data: Employee[] = [
|
|
178
|
-
{ id: 1, name: 'Alice Johnson', department: 'Engineering', salary: 95000 },
|
|
179
|
-
{ id: 2, name: 'Bob Smith', department: 'Marketing', salary: 72000 },
|
|
180
|
-
{ id: 3, name: 'Carol Williams', department: 'Engineering', salary: 110000 },
|
|
181
|
-
{ id: 4, name: 'David Brown', department: 'Sales', salary: 68000 },
|
|
182
|
-
{ id: 5, name: 'Eva Martinez', department: 'Marketing', salary: 78000 },
|
|
183
|
-
];
|
|
184
|
-
|
|
185
|
-
private readonly columns: IColumnDef<Employee>[] = [
|
|
186
|
-
{ columnId: 'name', name: 'Name', sortable: true },
|
|
187
|
-
{
|
|
188
|
-
columnId: 'department', name: 'Department', sortable: true,
|
|
189
|
-
filterable: { type: 'multiSelect', options: ['Engineering', 'Marketing', 'Sales'] },
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
columnId: 'salary', name: 'Salary', type: 'numeric', sortable: true, editable: true,
|
|
193
|
-
valueFormatter: (value) =>
|
|
194
|
-
new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(value as number),
|
|
195
|
-
},
|
|
196
|
-
];
|
|
197
|
-
|
|
198
|
-
gridProps = {
|
|
199
|
-
columns: this.columns,
|
|
200
|
-
data: this.data,
|
|
201
|
-
getRowId: (row: Employee) => row.id,
|
|
202
|
-
defaultPageSize: 10,
|
|
203
|
-
defaultSortBy: 'name',
|
|
204
|
-
statusBar: true,
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
:::tip Switching UI libraries
|
|
210
|
-
All Angular packages share the same component API. Change one import:
|
|
211
|
-
|
|
212
|
-
- **Radix (CDK)** (lightweight): `from '@alaarab/ogrid-angular-radix'`
|
|
213
|
-
- **Angular Material**: `from '@alaarab/ogrid-angular-material'`
|
|
214
|
-
- **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
|
|
215
|
-
|
|
216
|
-
All components are standalone — no NgModule required.
|
|
217
|
-
:::
|
|
218
|
-
|
|
219
|
-
</TabItem>
|
|
220
|
-
<TabItem value="vue" label="Vue">
|
|
221
|
-
|
|
222
|
-
```vue
|
|
223
|
-
<script setup lang="ts">
|
|
224
|
-
|
|
225
|
-
interface Employee {
|
|
226
|
-
id: number;
|
|
227
|
-
name: string;
|
|
228
|
-
department: string;
|
|
229
|
-
salary: number;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
const data: Employee[] = [
|
|
233
|
-
{ id: 1, name: 'Alice Johnson', department: 'Engineering', salary: 95000 },
|
|
234
|
-
{ id: 2, name: 'Bob Smith', department: 'Marketing', salary: 72000 },
|
|
235
|
-
{ id: 3, name: 'Carol Williams', department: 'Engineering', salary: 110000 },
|
|
236
|
-
{ id: 4, name: 'David Brown', department: 'Sales', salary: 68000 },
|
|
237
|
-
{ id: 5, name: 'Eva Martinez', department: 'Marketing', salary: 78000 },
|
|
238
|
-
];
|
|
239
|
-
|
|
240
|
-
const columns: IColumnDef<Employee>[] = [
|
|
241
|
-
{ columnId: 'name', name: 'Name', sortable: true },
|
|
242
|
-
{
|
|
243
|
-
columnId: 'department', name: 'Department', sortable: true,
|
|
244
|
-
filterable: { type: 'multiSelect', options: ['Engineering', 'Marketing', 'Sales'] },
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
columnId: 'salary', name: 'Salary', type: 'numeric', sortable: true, editable: true,
|
|
248
|
-
valueFormatter: (value) =>
|
|
249
|
-
new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(value as number),
|
|
250
|
-
},
|
|
251
|
-
];
|
|
252
|
-
|
|
253
|
-
const gridProps = {
|
|
254
|
-
columns,
|
|
255
|
-
data,
|
|
256
|
-
getRowId: (row: Employee) => row.id,
|
|
257
|
-
defaultPageSize: 10,
|
|
258
|
-
defaultSortBy: 'name',
|
|
259
|
-
statusBar: true,
|
|
260
|
-
};
|
|
261
|
-
</script>
|
|
262
|
-
|
|
263
|
-
<template>
|
|
264
|
-
<OGrid :gridProps="gridProps" />
|
|
265
|
-
</template>
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
:::tip Switching UI libraries
|
|
269
|
-
All Vue packages share the same API. Change one import:
|
|
270
|
-
|
|
271
|
-
- **Radix (Headless UI)** (lightweight): `from '@alaarab/ogrid-vue-radix'`
|
|
272
|
-
- **Vuetify**: `from '@alaarab/ogrid-vue-vuetify'` - wrap in `<v-app>` for theming
|
|
273
|
-
- **PrimeVue**: `from '@alaarab/ogrid-vue-primevue'`
|
|
274
|
-
:::
|
|
275
|
-
|
|
276
|
-
</TabItem>
|
|
277
|
-
<TabItem value="js" label="Vanilla JS">
|
|
278
|
-
|
|
279
|
-
```js
|
|
280
|
-
|
|
281
|
-
const grid = new OGrid(document.getElementById('grid'), {
|
|
282
|
-
columns: [
|
|
283
|
-
{ columnId: 'name', name: 'Name', sortable: true },
|
|
284
|
-
{
|
|
285
|
-
columnId: 'department',
|
|
286
|
-
name: 'Department',
|
|
287
|
-
sortable: true,
|
|
288
|
-
filterable: { type: 'multiSelect', options: ['Engineering', 'Marketing', 'Sales'] },
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
columnId: 'salary',
|
|
292
|
-
name: 'Salary',
|
|
293
|
-
type: 'numeric',
|
|
294
|
-
sortable: true,
|
|
295
|
-
editable: true,
|
|
296
|
-
valueFormatter: (value) =>
|
|
297
|
-
new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(value),
|
|
298
|
-
},
|
|
299
|
-
],
|
|
300
|
-
data: [
|
|
301
|
-
{ id: 1, name: 'Alice Johnson', department: 'Engineering', salary: 95000 },
|
|
302
|
-
{ id: 2, name: 'Bob Smith', department: 'Marketing', salary: 72000 },
|
|
303
|
-
{ id: 3, name: 'Carol Williams', department: 'Engineering', salary: 110000 },
|
|
304
|
-
{ id: 4, name: 'David Brown', department: 'Sales', salary: 68000 },
|
|
305
|
-
{ id: 5, name: 'Eva Martinez', department: 'Marketing', salary: 78000 },
|
|
306
|
-
],
|
|
307
|
-
getRowId: (row) => row.id,
|
|
308
|
-
pageSize: 10,
|
|
309
|
-
editable: true,
|
|
310
|
-
});
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
:::tip
|
|
314
|
-
The JS package has a class-based imperative API. See the [Vanilla JS guide](./vanilla-js) for events, grid methods, and theming.
|
|
315
96
|
:::
|
|
316
97
|
|
|
317
98
|
</TabItem>
|
|
@@ -356,62 +137,6 @@ function App() {
|
|
|
356
137
|
</>
|
|
357
138
|
);
|
|
358
139
|
}
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
</TabItem>
|
|
362
|
-
<TabItem value="angular" label="Angular">
|
|
363
|
-
|
|
364
|
-
```typescript
|
|
365
|
-
|
|
366
|
-
@Component({
|
|
367
|
-
standalone: true,
|
|
368
|
-
imports: [OGridComponent],
|
|
369
|
-
template: `
|
|
370
|
-
<button (click)="exportCsv()">Export CSV</button>
|
|
371
|
-
<ogrid [props]="gridProps" />
|
|
372
|
-
`
|
|
373
|
-
})
|
|
374
|
-
export class AppComponent {
|
|
375
|
-
constructor(private gridService: OGridService) {}
|
|
376
|
-
|
|
377
|
-
exportCsv() {
|
|
378
|
-
this.gridService.exportToCsv('employees.csv');
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
gridProps = { columns, data, getRowId: (row: any) => row.id };
|
|
382
|
-
}
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
</TabItem>
|
|
386
|
-
<TabItem value="vue" label="Vue">
|
|
387
|
-
|
|
388
|
-
```vue
|
|
389
|
-
<script setup lang="ts">
|
|
390
|
-
|
|
391
|
-
const { exportToCsv } = useOGrid({ columns, data, getRowId: (row) => row.id });
|
|
392
|
-
</script>
|
|
393
|
-
|
|
394
|
-
<template>
|
|
395
|
-
<button @click="exportToCsv('employees.csv')">Export CSV</button>
|
|
396
|
-
<OGrid :gridProps="{ columns, data, getRowId: (row) => row.id }" />
|
|
397
|
-
</template>
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
</TabItem>
|
|
401
|
-
<TabItem value="js" label="Vanilla JS">
|
|
402
|
-
|
|
403
|
-
```js
|
|
404
|
-
|
|
405
|
-
const grid = new OGrid(document.getElementById('grid'), {
|
|
406
|
-
columns, data, getRowId: (row) => row.id,
|
|
407
|
-
});
|
|
408
|
-
|
|
409
|
-
document.getElementById('export-btn').addEventListener('click', () => {
|
|
410
|
-
grid.api.exportToCsv('employees.csv');
|
|
411
|
-
});
|
|
412
|
-
|
|
413
|
-
// Cleanup when done
|
|
414
|
-
grid.destroy();
|
|
415
140
|
```
|
|
416
141
|
|
|
417
142
|
</TabItem>
|
|
@@ -421,5 +146,5 @@ grid.destroy();
|
|
|
421
146
|
|
|
422
147
|
- [Sorting](../features/sorting), [Filtering](../features/filtering), [Editing](../features/editing) — dig into individual features
|
|
423
148
|
- [Server-Side Data](../features/server-side-data) — connect to a REST API or GraphQL endpoint
|
|
424
|
-
- [Grid API](../api/
|
|
149
|
+
- [Grid API](../api/grid-api) — full reference for programmatic control
|
|
425
150
|
- [Column Definitions](../api/types) — every column option explained
|
|
@@ -6,25 +6,22 @@ description: What runs in browser CI today, what the smoke suite covers, and whi
|
|
|
6
6
|
|
|
7
7
|
# Browser Support Matrix
|
|
8
8
|
|
|
9
|
-
OGrid ships
|
|
9
|
+
OGrid ships two React UI packages (Radix and Fluent), and not every browser check needs to run on every push. The browser contract is split into two layers:
|
|
10
10
|
|
|
11
|
-
- `
|
|
12
|
-
- The `Playwright Matrix` GitHub workflow runs the broader browser suite across
|
|
11
|
+
- `bun run test:e2e:smoke` is the fast merge gate that runs on every push and pull request in the main `CI` workflow.
|
|
12
|
+
- The `Playwright Matrix` GitHub workflow runs the broader browser suite across the React + JS example apps only when you dispatch it manually.
|
|
13
13
|
|
|
14
14
|
## Main CI smoke suite
|
|
15
15
|
|
|
16
16
|
The merge gate is intentionally small. It covers the minimum set of user journeys that should fail the build immediately if they break:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
19
|
+
bun run test:e2e:smoke
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Projects in the smoke gate:
|
|
23
23
|
|
|
24
24
|
- `react-radix`
|
|
25
|
-
- `angular-material`
|
|
26
|
-
- `vue-vuetify`
|
|
27
|
-
- `js`
|
|
28
25
|
|
|
29
26
|
Journeys covered by the smoke suite:
|
|
30
27
|
|
|
@@ -43,18 +40,10 @@ The manual browser workflow runs the main browser suite against every example ap
|
|
|
43
40
|
npm run test:e2e:matrix
|
|
44
41
|
```
|
|
45
42
|
|
|
46
|
-
|
|
|
43
|
+
| Package | Playwright project | Example port | Main CI smoke | Full matrix |
|
|
47
44
|
|---|---|---:|---|---|
|
|
48
45
|
| `@alaarab/ogrid-react-fluent` | `react-fluent` | 3001 | No | Yes |
|
|
49
|
-
| `@alaarab/ogrid-react-material` | `react-material` | 3002 | No | Yes |
|
|
50
46
|
| `@alaarab/ogrid-react-radix` | `react-radix` | 3003 | Yes | Yes |
|
|
51
|
-
| `@alaarab/ogrid-angular-radix` | `angular-radix` | 3010 | No | Yes |
|
|
52
|
-
| `@alaarab/ogrid-angular-material` | `angular-material` | 3011 | Yes | Yes |
|
|
53
|
-
| `@alaarab/ogrid-angular-primeng` | `angular-primeng` | 3012 | No | Yes |
|
|
54
|
-
| `@alaarab/ogrid-vue-radix` | `vue-radix` | 3020 | No | Yes |
|
|
55
|
-
| `@alaarab/ogrid-vue-vuetify` | `vue-vuetify` | 3021 | Yes | Yes |
|
|
56
|
-
| `@alaarab/ogrid-vue-primevue` | `vue-primevue` | 3022 | No | Yes |
|
|
57
|
-
| `@alaarab/ogrid-js` | `js` | 3030 | Yes | Yes |
|
|
58
47
|
|
|
59
48
|
## Docs homepage coverage
|
|
60
49
|
|
|
@@ -64,7 +53,7 @@ The docs homepage is verified separately because it runs against the built Docus
|
|
|
64
53
|
npm run test:e2e:docs
|
|
65
54
|
```
|
|
66
55
|
|
|
67
|
-
That check currently runs in the `Deploy Docs` workflow after `
|
|
56
|
+
That check currently runs in the `Deploy Docs` workflow after `bun run docs:build`.
|
|
68
57
|
|
|
69
58
|
## Interpreting failures
|
|
70
59
|
|
|
@@ -75,88 +75,6 @@ export function MyGrid() {
|
|
|
75
75
|
}
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
</TabItem>
|
|
79
|
-
<TabItem value="angular" label="Angular">
|
|
80
|
-
|
|
81
|
-
```typescript
|
|
82
|
-
|
|
83
|
-
@Component({ /* ... */ })
|
|
84
|
-
export class MyGridComponent implements OnInit, OnDestroy {
|
|
85
|
-
data = myRows;
|
|
86
|
-
columns = myColumns;
|
|
87
|
-
service = new OGridService();
|
|
88
|
-
private bridge?: BridgeConnection;
|
|
89
|
-
|
|
90
|
-
ngOnInit() {
|
|
91
|
-
if (!isDevMode()) return;
|
|
92
|
-
this.bridge = connectGridToBridge({
|
|
93
|
-
gridId: 'my-grid',
|
|
94
|
-
getData: () => this.data,
|
|
95
|
-
getColumns: () => this.columns,
|
|
96
|
-
onCellUpdate: (rowIndex, columnId, value) => {
|
|
97
|
-
this.data = this.data.map((row, i) =>
|
|
98
|
-
i === rowIndex ? { ...row, [columnId]: value } : row
|
|
99
|
-
);
|
|
100
|
-
},
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
ngOnDestroy() {
|
|
105
|
-
this.bridge?.disconnect();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
</TabItem>
|
|
111
|
-
<TabItem value="vue" label="Vue">
|
|
112
|
-
|
|
113
|
-
```vue
|
|
114
|
-
<script setup lang="ts">
|
|
115
|
-
|
|
116
|
-
const data = ref(myRows);
|
|
117
|
-
let bridge: ReturnType<typeof connectGridToBridge> | null = null;
|
|
118
|
-
|
|
119
|
-
onMounted(() => {
|
|
120
|
-
if (import.meta.env.DEV) {
|
|
121
|
-
bridge = connectGridToBridge({
|
|
122
|
-
gridId: 'my-grid',
|
|
123
|
-
getData: () => data.value,
|
|
124
|
-
getColumns: () => columns,
|
|
125
|
-
onCellUpdate: (rowIndex, columnId, value) => {
|
|
126
|
-
data.value = data.value.map((row, i) =>
|
|
127
|
-
i === rowIndex ? { ...row, [columnId]: value } : row
|
|
128
|
-
);
|
|
129
|
-
},
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
onUnmounted(() => bridge?.disconnect());
|
|
135
|
-
</script>
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
</TabItem>
|
|
139
|
-
<TabItem value="js" label="Vanilla JS">
|
|
140
|
-
|
|
141
|
-
```js
|
|
142
|
-
|
|
143
|
-
const grid = new OGrid(container, { data: myRows, columns });
|
|
144
|
-
|
|
145
|
-
// Only in development
|
|
146
|
-
if (location.hostname === 'localhost') {
|
|
147
|
-
const bridge = connectGridToBridge({
|
|
148
|
-
gridId: 'my-grid',
|
|
149
|
-
getData: () => grid.getApi().getData(),
|
|
150
|
-
getColumns: () => columns,
|
|
151
|
-
onCellUpdate: (rowIndex, columnId, value) => {
|
|
152
|
-
// Update your data source and refresh
|
|
153
|
-
myRows[rowIndex][columnId] = value;
|
|
154
|
-
grid.getApi().refresh();
|
|
155
|
-
},
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
```
|
|
159
|
-
|
|
160
78
|
</TabItem>
|
|
161
79
|
</Tabs>
|
|
162
80
|
|
|
@@ -65,10 +65,10 @@ Add to your Cursor MCP settings:
|
|
|
65
65
|
Once connected, you can ask your editor questions like:
|
|
66
66
|
|
|
67
67
|
```
|
|
68
|
-
How do I set up server-side pagination
|
|
69
|
-
How do I pin columns
|
|
68
|
+
How do I set up server-side pagination?
|
|
69
|
+
How do I pin columns?
|
|
70
70
|
What's the difference between multiSelect and text filters?
|
|
71
|
-
Show me how to use the formula engine
|
|
71
|
+
Show me how to use the formula engine.
|
|
72
72
|
Help me migrate from AG Grid to OGrid.
|
|
73
73
|
```
|
|
74
74
|
|
|
@@ -166,7 +166,7 @@ See the [Live Testing Bridge guide](./mcp-live-testing) for the full setup and a
|
|
|
166
166
|
|
|
167
167
|
## Version
|
|
168
168
|
|
|
169
|
-
The MCP server is published
|
|
169
|
+
The MCP server is published in lockstep with the grid packages (same version across the monorepo). Check what's installed:
|
|
170
170
|
|
|
171
171
|
```bash
|
|
172
172
|
npx @alaarab/ogrid-mcp --version
|
|
@@ -16,10 +16,9 @@ This guide maps every major AG Grid concept to its OGrid equivalent, so you can
|
|
|
16
16
|
# Remove AG Grid
|
|
17
17
|
npm uninstall ag-grid-react ag-grid-community ag-grid-enterprise
|
|
18
18
|
|
|
19
|
-
# Install OGrid (pick your UI
|
|
20
|
-
npm install @alaarab/ogrid-react-radix
|
|
19
|
+
# Install OGrid (pick your UI implementation)
|
|
20
|
+
npm install @alaarab/ogrid-react-radix # Radix (lightweight, no framework dep)
|
|
21
21
|
npm install @alaarab/ogrid-react-fluent # Fluent UI v9
|
|
22
|
-
npm install @alaarab/ogrid-react-material # Material UI v7
|
|
23
22
|
```
|
|
24
23
|
|
|
25
24
|
## Component Mapping
|