@alaarab/ogrid-mcp 2.6.0 → 2.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/bundled-docs/api/README.md +20 -20
- package/bundled-docs/api/components-column-chooser.mdx +1 -1
- package/bundled-docs/api/components-column-header-filter.mdx +1 -1
- package/bundled-docs/api/components-datagrid-table.mdx +1 -1
- package/bundled-docs/api/components-pagination-controls.mdx +1 -1
- package/bundled-docs/api/components-sidebar.mdx +1 -1
- package/bundled-docs/api/components-status-bar.mdx +1 -1
- package/bundled-docs/api/js-api.mdx +2 -2
- package/bundled-docs/features/cell-references.mdx +9 -9
- package/bundled-docs/features/column-chooser.mdx +4 -1
- package/bundled-docs/features/column-groups.mdx +10 -3
- package/bundled-docs/features/column-pinning.mdx +7 -3
- package/bundled-docs/features/column-reordering.mdx +6 -4
- package/bundled-docs/features/column-types.mdx +1 -1
- package/bundled-docs/features/context-menu.mdx +8 -4
- package/bundled-docs/features/csv-export.mdx +7 -7
- package/bundled-docs/features/editing.mdx +21 -21
- package/bundled-docs/features/filtering.mdx +15 -15
- package/bundled-docs/features/formulas.mdx +27 -27
- package/bundled-docs/features/grid-api.mdx +2 -2
- package/bundled-docs/features/keyboard-navigation.mdx +5 -5
- package/bundled-docs/features/pagination.mdx +1 -1
- package/bundled-docs/features/row-selection.mdx +3 -2
- package/bundled-docs/getting-started/overview.mdx +16 -4
- package/bundled-docs/getting-started/quick-start.mdx +11 -11
- package/bundled-docs/getting-started/vanilla-js.mdx +26 -23
- package/bundled-docs/guides/accessibility.mdx +11 -11
- package/bundled-docs/guides/browser-support-matrix.mdx +73 -0
- package/bundled-docs/guides/framework-showcase.mdx +18 -18
- package/bundled-docs/guides/mcp.mdx +9 -9
- package/package.json +1 -1
- package/bundled-docs/features/row-grouping.mdx +0 -313
|
@@ -7,21 +7,21 @@ description: Excel-like formula support with 93 built-in functions, live recalcu
|
|
|
7
7
|
|
|
8
8
|
# Formulas
|
|
9
9
|
|
|
10
|
-
Type `=SUM(A1:A5)` into any editable cell and it evaluates instantly. Change a value in A1 and everything that depends on it recalculates.
|
|
10
|
+
Type `=SUM(A1:A5)` into any editable cell and it evaluates instantly. Change a value in A1 and everything that depends on it recalculates. It works like Excel, built right into your grid — no external library, no backend call, no wiring required.
|
|
11
11
|
|
|
12
|
-
The engine adds ~12KB gzipped and is completely tree-shakeable
|
|
12
|
+
The engine adds ~12KB gzipped and is completely **tree-shakeable** — grids without `formulas={true}` don't pay any cost.
|
|
13
13
|
|
|
14
14
|
## Live Demo
|
|
15
15
|
|
|
16
16
|
<FormulasDemo />
|
|
17
17
|
|
|
18
18
|
:::tip Try it in your framework
|
|
19
|
-
The demo uses Radix UI styling. The formula engine is framework-agnostic
|
|
19
|
+
The demo uses Radix UI styling. The formula engine itself is framework-agnostic — same behavior in React, Angular, Vue, and Vanilla JS.
|
|
20
20
|
:::
|
|
21
21
|
|
|
22
22
|
## Why bother with in-grid formulas?
|
|
23
23
|
|
|
24
|
-
If you've ever had users copy grid data into Excel to calculate totals
|
|
24
|
+
If you've ever had users copy grid data into Excel to calculate totals or derived fields — then paste it back — formulas solve that. Users can build their own calculations directly in the table, results stay live, and you don't have to build a calculator UI.
|
|
25
25
|
|
|
26
26
|
## Enable formulas
|
|
27
27
|
|
|
@@ -63,7 +63,7 @@ function App() {
|
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
:::tip Switching UI libraries
|
|
66
|
-
Same props across all React packages
|
|
66
|
+
Same props across all React packages — just change the import:
|
|
67
67
|
|
|
68
68
|
- **Radix** (lightweight, default): `from '@alaarab/ogrid-react-radix'`
|
|
69
69
|
- **Fluent UI** (Microsoft 365 / SPFx): `from '@alaarab/ogrid-react-fluent'` - wrap in `<FluentProvider>`
|
|
@@ -106,7 +106,7 @@ Same API across Angular packages. Change the import:
|
|
|
106
106
|
- **Angular Material**: `from '@alaarab/ogrid-angular-material'`
|
|
107
107
|
- **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
|
|
108
108
|
|
|
109
|
-
All components are standalone
|
|
109
|
+
All components are standalone — no NgModule required.
|
|
110
110
|
:::
|
|
111
111
|
|
|
112
112
|
</TabItem>
|
|
@@ -174,7 +174,7 @@ formulaState.setFormula(2, 0, '=A1+B1', grid.getApi().getDataAccessor());
|
|
|
174
174
|
|
|
175
175
|
## Entering formulas
|
|
176
176
|
|
|
177
|
-
Type any value starting with `=` into an editable cell. The engine parses and evaluates it, then shows the result. The formula string is stored separately from your data
|
|
177
|
+
Type any value starting with `=` into an editable cell. The engine parses and evaluates it, then shows the result. The formula string is stored separately from your data — your `data[]` array is never modified by formulas.
|
|
178
178
|
|
|
179
179
|
```
|
|
180
180
|
=A1+B1 → adds two cells
|
|
@@ -185,7 +185,7 @@ Type any value starting with `=` into an editable cell. The engine parses and ev
|
|
|
185
185
|
|
|
186
186
|
## Pre-loading formulas
|
|
187
187
|
|
|
188
|
-
Use `initialFormulas` to seed formulas when the grid mounts
|
|
188
|
+
Use `initialFormulas` to seed formulas when the grid mounts — useful for reports with fixed summary rows:
|
|
189
189
|
|
|
190
190
|
```tsx
|
|
191
191
|
<OGrid
|
|
@@ -202,24 +202,24 @@ Coordinates are 0-based: `col` is the position in your flat columns array, `row`
|
|
|
202
202
|
|
|
203
203
|
## How recalculation works
|
|
204
204
|
|
|
205
|
-
The engine
|
|
205
|
+
The engine builds a dependency graph. When A1 changes, it finds every formula that references A1, then recalculates them in topological order — dependents of dependents are handled correctly. Circular references produce a `#CIRC!` error instead of an infinite loop.
|
|
206
206
|
|
|
207
207
|
## Formula-aware copy, paste, and fill
|
|
208
208
|
|
|
209
209
|
When `formulas` is enabled:
|
|
210
210
|
|
|
211
|
-
- **Copy**
|
|
212
|
-
- **Paste**
|
|
213
|
-
- **Fill handle**
|
|
211
|
+
- **Copy** — copies the formula string (`=SUM(A1:A5)`), not the computed value
|
|
212
|
+
- **Paste** — if the pasted value starts with `=`, it becomes a formula in the target cell
|
|
213
|
+
- **Fill handle** — dragging a formula cell down adjusts relative references. `=A1+B1` dragged down becomes `=A2+B2`. Lock references with `$`: `=$A$1` never adjusts.
|
|
214
214
|
|
|
215
215
|
## Cell reference syntax
|
|
216
216
|
|
|
217
217
|
| Syntax | Example | What it means |
|
|
218
218
|
|--------|---------|---------|
|
|
219
|
-
| Relative | `A1` | Column A, Row 1
|
|
219
|
+
| Relative | `A1` | Column A, Row 1 — adjusts when filled |
|
|
220
220
|
| Absolute column | `$A1` | Column A locked, row adjusts |
|
|
221
221
|
| Absolute row | `A$1` | Row 1 locked, column adjusts |
|
|
222
|
-
| Fully absolute | `$A$1` | Both locked
|
|
222
|
+
| Fully absolute | `$A$1` | Both locked — never adjusts |
|
|
223
223
|
| Range | `A1:B5` | Rectangular block from A1 to B5 |
|
|
224
224
|
| Named range | `Revenue` | Resolves to a defined cell or range |
|
|
225
225
|
| Cross-sheet | `Sheet2!A1` | Cell A1 from another sheet |
|
|
@@ -238,7 +238,7 @@ Give meaningful names to cells or ranges you reference often:
|
|
|
238
238
|
/>
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
Now write `=SUM(Revenue)` or `=A1*TaxRate` instead of cryptic coordinates. Named ranges are case-insensitive
|
|
241
|
+
Now write `=SUM(Revenue)` or `=A1*TaxRate` instead of cryptic coordinates. Named ranges are case-insensitive — `Revenue`, `revenue`, and `REVENUE` all resolve to the same range.
|
|
242
242
|
|
|
243
243
|
You can also manage them at runtime:
|
|
244
244
|
|
|
@@ -293,9 +293,9 @@ Reference cells from other grids by registering sheet accessors:
|
|
|
293
293
|
```
|
|
294
294
|
|
|
295
295
|
Then write:
|
|
296
|
-
- `=Sheet2!A1`
|
|
297
|
-
- `=SUM(Sheet2!A1:A10)`
|
|
298
|
-
- `='Sales Data'!B5`
|
|
296
|
+
- `=Sheet2!A1` — single cell from Sheet2
|
|
297
|
+
- `=SUM(Sheet2!A1:A10)` — range from Sheet2
|
|
298
|
+
- `='Sales Data'!B5` — quoted name for sheets with spaces
|
|
299
299
|
|
|
300
300
|
Referencing an unregistered sheet produces a `#REF!` error.
|
|
301
301
|
|
|
@@ -320,15 +320,15 @@ Formula errors display in red (controlled by `--ogrid-formula-error-color`):
|
|
|
320
320
|
|-------|---------|
|
|
321
321
|
| `#REF!` | Cell reference points outside the grid, or unregistered sheet |
|
|
322
322
|
| `#DIV/0!` | Division by zero |
|
|
323
|
-
| `#VALUE!` | Wrong argument type
|
|
324
|
-
| `#NAME?` | Unknown function name
|
|
323
|
+
| `#VALUE!` | Wrong argument type — text where a number was expected |
|
|
324
|
+
| `#NAME?` | Unknown function name — check spelling |
|
|
325
325
|
| `#CIRC!` | Circular reference detected |
|
|
326
326
|
| `#N/A` | No match found (VLOOKUP, MATCH, XLOOKUP) |
|
|
327
|
-
| `#NUM!` | Invalid numeric argument
|
|
327
|
+
| `#NUM!` | Invalid numeric argument — e.g., LARGE with k larger than the list |
|
|
328
328
|
| `#ERROR!` | General parse or eval error |
|
|
329
329
|
|
|
330
330
|
:::tip Pro tip
|
|
331
|
-
`#NAME?` is almost always a typo. Formula function names are case-insensitive
|
|
331
|
+
`#NAME?` is almost always a typo. Formula function names are case-insensitive — `sum`, `SUM`, and `Sum` all work — but `=SUMM(A1:A5)` gives `#NAME?`.
|
|
332
332
|
:::
|
|
333
333
|
|
|
334
334
|
## All 93 built-in functions
|
|
@@ -358,7 +358,7 @@ Formula errors display in red (controlled by `--ogrid-formula-error-color`):
|
|
|
358
358
|
|
|
359
359
|
| Prop | Type | Default | Description |
|
|
360
360
|
|------|------|---------|-------------|
|
|
361
|
-
| `formulas` | `boolean` | `false` | Enable formula support. Tree-shakeable
|
|
361
|
+
| `formulas` | `boolean` | `false` | Enable formula support. Tree-shakeable — zero cost when not used. |
|
|
362
362
|
| `initialFormulas` | `Array<{ col, row, formula }>` | — | Pre-load formulas on mount (0-based col/row indices). |
|
|
363
363
|
| `onFormulaRecalc` | `(result: IRecalcResult) => void` | — | Called after each recalculation with the updated cell list. |
|
|
364
364
|
| `formulaFunctions` | `Record<string, IFormulaFunction>` | — | Custom functions to register alongside built-ins. |
|
|
@@ -367,10 +367,10 @@ Formula errors display in red (controlled by `--ogrid-formula-error-color`):
|
|
|
367
367
|
|
|
368
368
|
## Next steps
|
|
369
369
|
|
|
370
|
-
- [Editing & Clipboard](./editing)
|
|
371
|
-
- [Cell References](./cell-references)
|
|
372
|
-
- [CSV Export](./csv-export)
|
|
373
|
-
- [Status Bar](./status-bar)
|
|
370
|
+
- [Editing & Clipboard](./editing) — formula-aware copy, paste, and fill handle
|
|
371
|
+
- [Cell References](./cell-references) — Excel-style column letters and the name box
|
|
372
|
+
- [CSV Export](./csv-export) — export formula strings or computed values
|
|
373
|
+
- [Status Bar](./status-bar) — live SUM/AVERAGE/COUNT on selected cells
|
|
374
374
|
|
|
375
375
|
## Community
|
|
376
376
|
|
|
@@ -172,9 +172,9 @@ async function handleRefresh() {
|
|
|
172
172
|
</TabItem>
|
|
173
173
|
</Tabs>
|
|
174
174
|
|
|
175
|
-
##
|
|
175
|
+
## How It Works
|
|
176
176
|
|
|
177
|
-
Pass a `ref` to `OGrid
|
|
177
|
+
Pass a `ref` to the `OGrid` component. The ref exposes the `IOGridApi<T>` interface with methods for programmatic grid control.
|
|
178
178
|
|
|
179
179
|
### API Methods
|
|
180
180
|
|
|
@@ -7,7 +7,7 @@ description: Full keyboard support for navigating, editing, selecting, and opera
|
|
|
7
7
|
|
|
8
8
|
# Keyboard Navigation
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
OGrid supports comprehensive keyboard navigation for moving between cells, editing values, selecting ranges, and performing clipboard and undo operations -- all without touching the mouse.
|
|
11
11
|
|
|
12
12
|
## Live Demo
|
|
13
13
|
|
|
@@ -119,7 +119,7 @@ const grid = new OGrid(document.getElementById('grid'), {
|
|
|
119
119
|
</TabItem>
|
|
120
120
|
</Tabs>
|
|
121
121
|
|
|
122
|
-
Click
|
|
122
|
+
Click any cell to make it the active cell, then use the keyboard to navigate and edit.
|
|
123
123
|
|
|
124
124
|
## Navigation
|
|
125
125
|
|
|
@@ -197,9 +197,9 @@ Copied data uses tab-separated format compatible with Excel and Google Sheets. M
|
|
|
197
197
|
|
|
198
198
|
Undo/redo requires the `onUndo`, `onRedo`, `canUndo`, and `canRedo` props to be wired up (typically via the `useUndoRedo` hook).
|
|
199
199
|
|
|
200
|
-
## How
|
|
200
|
+
## How It Works
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
Keyboard navigation is handled by the `useKeyboardNavigation` hook in core, which is automatically wired into the grid when `cellSelection` is enabled (the default). The hook listens for `keydown` events on the grid wrapper element and translates them into active cell movements, selection range changes, or editing actions.
|
|
203
203
|
|
|
204
204
|
### Disabling Cell Selection
|
|
205
205
|
|
|
@@ -233,4 +233,4 @@ On macOS, Ctrl is replaced by the Command key for all shortcuts (Cmd+C, Cmd+V, C
|
|
|
233
233
|
|
|
234
234
|
- [Context Menu](./context-menu) -- right-click menu mirrors keyboard shortcuts
|
|
235
235
|
- [Status Bar](./status-bar) -- shows aggregations for keyboard-selected ranges
|
|
236
|
-
- [Column Pinning](./column-pinning) -- navigation works across pinned and scrollable columns
|
|
236
|
+
- [Column Pinning](./column-pinning) -- navigation works seamlessly across pinned and scrollable columns
|
|
@@ -7,7 +7,7 @@ description: Built-in pagination with configurable page sizes for client-side an
|
|
|
7
7
|
|
|
8
8
|
# Pagination
|
|
9
9
|
|
|
10
|
-
OGrid includes a built-in pagination bar with page navigation buttons, page size selector, and a row count summary. It works with both client-side data arrays and server-side data sources.
|
|
10
|
+
OGrid includes a built-in pagination bar with page navigation buttons, page size selector, and a row count summary. It works seamlessly with both client-side data arrays and server-side data sources.
|
|
11
11
|
|
|
12
12
|
## Live Demo
|
|
13
13
|
|
|
@@ -149,8 +149,9 @@ const grid = new OGrid(document.getElementById('grid'), {
|
|
|
149
149
|
rowSelection: 'multiple',
|
|
150
150
|
});
|
|
151
151
|
|
|
152
|
-
grid.on('selectionChange', ({
|
|
153
|
-
console.log(`${
|
|
152
|
+
grid.on('selectionChange', ({ selectedItems, selectedRowIds }) => {
|
|
153
|
+
console.log(`${selectedItems.length} rows selected`);
|
|
154
|
+
console.log('Selected row IDs:', selectedRowIds);
|
|
154
155
|
});
|
|
155
156
|
|
|
156
157
|
// Programmatic access
|
|
@@ -6,11 +6,11 @@ description: What is OGrid and why use it
|
|
|
6
6
|
|
|
7
7
|
# Overview
|
|
8
8
|
|
|
9
|
-
OGrid is
|
|
9
|
+
OGrid is a lightweight, open-source data grid library that delivers spreadsheet-grade features without the enterprise paywall. It ships with React, Angular, and Vue adapters -- each with multiple UI library implementations -- plus a vanilla JS package, all powered by a shared TypeScript core.
|
|
10
10
|
|
|
11
11
|
## Why OGrid?
|
|
12
12
|
|
|
13
|
-
Most production-grade data grids
|
|
13
|
+
Most production-grade React data grids fall into one of two camps: free but limited, or feature-rich but locked behind expensive licenses. OGrid bridges that gap.
|
|
14
14
|
|
|
15
15
|
- **Free and MIT-licensed.** Every feature is included. No enterprise tier, no feature gating.
|
|
16
16
|
- **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.
|
|
@@ -80,11 +80,14 @@ Each UI package is a thin shell (~1,500 lines) that calls the same core logic an
|
|
|
80
80
|
| `@alaarab/ogrid-vue-vuetify` | Vuetify 3 | Vue + Material Design |
|
|
81
81
|
| `@alaarab/ogrid-vue-primevue` | PrimeVue 4 | Vue + PrimeVue ecosystem |
|
|
82
82
|
|
|
83
|
-
All packages within a framework export the same `OGrid` component with the same props. Switching UI libraries is a one-line import change - your column definitions, event handlers, data sources, and API calls stay identical.
|
|
83
|
+
All packages within a framework export the same `OGrid` component with the same props. Switching UI libraries is a one-line import change - your column definitions, event handlers, data sources, and API calls stay identical within that framework family.
|
|
84
84
|
|
|
85
85
|
### Why This Matters
|
|
86
86
|
|
|
87
|
-
|
|
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
|
+
- **Shared core, aligned behavior.** Most behavior is implemented once in core, with package-specific docs and tests calling out the remaining differences.
|
|
90
|
+
- **Small surface area.** No duplicated state logic to drift out of sync.
|
|
88
91
|
|
|
89
92
|
## Packages
|
|
90
93
|
|
|
@@ -142,6 +145,15 @@ A bug fix in core lands across all frameworks instantly. You can migrate between
|
|
|
142
145
|
|
|
143
146
|
OGrid is designed as a drop-in replacement for AG Grid with a simpler, more React-idiomatic API. If you are migrating from AG Grid, see the [Migration Guide](../guides/migration-from-ag-grid).
|
|
144
147
|
|
|
148
|
+
## Browser verification
|
|
149
|
+
|
|
150
|
+
OGrid's browser checks now have an explicit contract:
|
|
151
|
+
|
|
152
|
+
- A fast smoke suite runs on every push through the main CI workflow
|
|
153
|
+
- The broader Playwright matrix runs across all 10 example apps only when you dispatch it manually
|
|
154
|
+
|
|
155
|
+
See the [Browser Support Matrix](../guides/browser-support-matrix) for the current coverage map and commands.
|
|
156
|
+
|
|
145
157
|
## Next Steps
|
|
146
158
|
|
|
147
159
|
- [Installation](./installation) -- install OGrid for your framework
|
|
@@ -7,7 +7,7 @@ description: A sortable, filterable, editable data grid in under 50 lines
|
|
|
7
7
|
|
|
8
8
|
# Quick Start
|
|
9
9
|
|
|
10
|
-
Here's a grid in 60 seconds
|
|
10
|
+
Here's a grid in 60 seconds — sorting, filtering, editing, pagination, and keyboard navigation, all working out of the box.
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
@@ -213,7 +213,7 @@ All Angular packages share the same component API. Change one import:
|
|
|
213
213
|
- **Angular Material**: `from '@alaarab/ogrid-angular-material'`
|
|
214
214
|
- **PrimeNG**: `from '@alaarab/ogrid-angular-primeng'`
|
|
215
215
|
|
|
216
|
-
All components are standalone
|
|
216
|
+
All components are standalone — no NgModule required.
|
|
217
217
|
:::
|
|
218
218
|
|
|
219
219
|
</TabItem>
|
|
@@ -321,11 +321,11 @@ The JS package has a class-based imperative API. See the [Vanilla JS guide](./va
|
|
|
321
321
|
|
|
322
322
|
Paste those ~40 lines and you have:
|
|
323
323
|
|
|
324
|
-
- **Sorting**
|
|
325
|
-
- **Filtering**
|
|
326
|
-
- **Inline editing**
|
|
327
|
-
- **Currency formatting**
|
|
328
|
-
- **Pagination, keyboard nav, cell selection, status bar**
|
|
324
|
+
- **Sorting** — click any column header, ascending/descending, shift-click for multi-sort
|
|
325
|
+
- **Filtering** — the Department column gets a multi-select dropdown filter
|
|
326
|
+
- **Inline editing** — double-click any salary cell to edit in place
|
|
327
|
+
- **Currency formatting** — `valueFormatter` formats numbers on display without affecting stored values
|
|
328
|
+
- **Pagination, keyboard nav, cell selection, status bar** — all there, no extra config
|
|
329
329
|
|
|
330
330
|
## Three concepts worth knowing
|
|
331
331
|
|
|
@@ -419,7 +419,7 @@ grid.destroy();
|
|
|
419
419
|
|
|
420
420
|
## What's next?
|
|
421
421
|
|
|
422
|
-
- [Sorting](../features/sorting), [Filtering](../features/filtering), [Editing](../features/editing)
|
|
423
|
-
- [Server-Side Data](../features/server-side-data)
|
|
424
|
-
- [Grid API](../api/js-api)
|
|
425
|
-
- [Column Definitions](../api/types)
|
|
422
|
+
- [Sorting](../features/sorting), [Filtering](../features/filtering), [Editing](../features/editing) — dig into individual features
|
|
423
|
+
- [Server-Side Data](../features/server-side-data) — connect to a REST API or GraphQL endpoint
|
|
424
|
+
- [Grid API](../api/js-api) — full reference for programmatic control
|
|
425
|
+
- [Column Definitions](../api/types) — every column option explained
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
sidebar_position: 4
|
|
3
3
|
title: Vanilla JS
|
|
4
|
-
description: OGrid without a framework
|
|
4
|
+
description: OGrid without a framework — pure JavaScript, class-based API
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
# Vanilla JS
|
|
9
9
|
|
|
10
|
-
You don't need React, Angular, or Vue to use OGrid. The `@alaarab/ogrid-js` package gives you a
|
|
10
|
+
You don't need React, Angular, or Vue to use OGrid. The `@alaarab/ogrid-js` package gives you a sortable, filterable, editable data grid with the shared OGrid core through a simple class-based API — just a container element and an options object.
|
|
11
11
|
|
|
12
12
|
It's a good fit if you're working on an internal tool, a dashboard that can't take on a framework, or you're embedding a grid inside an existing non-framework app.
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ Or drop it into an HTML file directly using a CDN (no build tools needed):
|
|
|
27
27
|
|
|
28
28
|
## Build a real example
|
|
29
29
|
|
|
30
|
-
Let's make an order management dashboard. It tracks orders by status, amount, and customer
|
|
30
|
+
Let's make an order management dashboard. It tracks orders by status, amount, and customer — sortable, filterable, and editable inline.
|
|
31
31
|
|
|
32
32
|
```html
|
|
33
33
|
<div id="orders-grid" style="height: 500px;"></div>
|
|
@@ -88,15 +88,17 @@ Let's make an order management dashboard. It tracks orders by status, amount, an
|
|
|
88
88
|
|
|
89
89
|
## What you get out of the box
|
|
90
90
|
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
- **
|
|
94
|
-
- **
|
|
95
|
-
- **
|
|
96
|
-
- **
|
|
97
|
-
- **
|
|
98
|
-
- **
|
|
99
|
-
- **
|
|
91
|
+
The JS package shares the same data model and most feature concepts as the framework packages, but browser-level interaction parity is still tracked package by package.
|
|
92
|
+
|
|
93
|
+
- **Sorting** — click column headers
|
|
94
|
+
- **Filtering** — multi-select dropdown on the Status column
|
|
95
|
+
- **Inline editing** — double-click any Amount cell to edit
|
|
96
|
+
- **Cell selection** — click and drag to select ranges
|
|
97
|
+
- **Keyboard navigation** — arrow keys, Tab, Home/End, Ctrl+Arrow
|
|
98
|
+
- **Clipboard** — Ctrl+C/V/X works like a spreadsheet
|
|
99
|
+
- **Undo/redo** — Ctrl+Z/Y
|
|
100
|
+
- **Status bar** — row count and selection aggregations
|
|
101
|
+
- **Pagination** — page controls at the bottom
|
|
100
102
|
|
|
101
103
|
## Constructor
|
|
102
104
|
|
|
@@ -104,7 +106,7 @@ Let's make an order management dashboard. It tracks orders by status, amount, an
|
|
|
104
106
|
const grid = new OGrid(containerElement, options);
|
|
105
107
|
```
|
|
106
108
|
|
|
107
|
-
The container element defines where the grid renders. OGrid fills it completely
|
|
109
|
+
The container element defines where the grid renders. OGrid fills it completely — give it an explicit height (CSS or inline).
|
|
108
110
|
|
|
109
111
|
## Key options
|
|
110
112
|
|
|
@@ -134,23 +136,24 @@ grid.on('cellValueChanged', ({ item, columnId, oldValue, newValue }) => {
|
|
|
134
136
|
// save to backend
|
|
135
137
|
});
|
|
136
138
|
|
|
137
|
-
grid.on('selectionChange', ({
|
|
138
|
-
console.log(`${
|
|
139
|
-
updateActionBar(
|
|
139
|
+
grid.on('selectionChange', ({ selectedItems, selectedRowIds }) => {
|
|
140
|
+
console.log(`${selectedItems.length} rows selected`);
|
|
141
|
+
updateActionBar(selectedItems, selectedRowIds);
|
|
140
142
|
});
|
|
141
143
|
|
|
142
|
-
grid.on('sortChange', ({
|
|
143
|
-
|
|
144
|
+
grid.on('sortChange', ({ sort }) => {
|
|
145
|
+
if (!sort) return;
|
|
146
|
+
console.log(`Sorted by ${sort.field} ${sort.direction}`);
|
|
144
147
|
});
|
|
145
148
|
```
|
|
146
149
|
|
|
147
150
|
| Event | Payload | When it fires |
|
|
148
151
|
|-------|---------|---------------|
|
|
149
152
|
| `cellValueChanged` | `{ item, columnId, oldValue, newValue }` | A cell edit is committed |
|
|
150
|
-
| `sortChange` | `{
|
|
153
|
+
| `sortChange` | `{ sort }` | User changes sort |
|
|
151
154
|
| `filterChange` | `{ filters }` | User changes filters |
|
|
152
155
|
| `pageChange` | `{ page }` | User navigates pages |
|
|
153
|
-
| `selectionChange` | `{
|
|
156
|
+
| `selectionChange` | `{ selectedItems, selectedRowIds }` | Row selection changes |
|
|
154
157
|
|
|
155
158
|
## Programmatic control
|
|
156
159
|
|
|
@@ -210,6 +213,6 @@ grid.destroy();
|
|
|
210
213
|
|
|
211
214
|
## What's next?
|
|
212
215
|
|
|
213
|
-
- [JS API Reference](../api/js-api)
|
|
214
|
-
- [Features](../features/sorting)
|
|
215
|
-
- [Theming Guide](../guides/theming)
|
|
216
|
+
- [JS API Reference](../api/js-api) — full method and options reference
|
|
217
|
+
- [Features](../features/sorting) — feature guides, with JS notes where behavior differs from framework packages
|
|
218
|
+
- [Theming Guide](../guides/theming) — deep dive into CSS customization
|
|
@@ -5,21 +5,21 @@ title: Accessibility
|
|
|
5
5
|
|
|
6
6
|
# Accessibility
|
|
7
7
|
|
|
8
|
-
Good accessibility isn't just compliance
|
|
8
|
+
Good accessibility isn't just compliance — it's building software that works for everyone. A keyboard user in a tight workflow shouldn't have to reach for the mouse. A screen reader user deserves the same experience as anyone else.
|
|
9
9
|
|
|
10
|
-
OGrid is built with this in mind. Keyboard navigation, screen reader support, high contrast mode, and ARIA semantics are all baked in
|
|
10
|
+
OGrid is built with this in mind. Keyboard navigation, screen reader support, high contrast mode, and ARIA semantics are all baked in — you don't configure them, you just benefit from them.
|
|
11
11
|
|
|
12
12
|
## What's built in by default
|
|
13
13
|
|
|
14
14
|
You get all of this without any extra setup:
|
|
15
15
|
|
|
16
|
-
- Full keyboard navigation
|
|
16
|
+
- Full keyboard navigation — arrow keys, Tab, Home/End, Ctrl+Arrow, all working like a spreadsheet
|
|
17
17
|
- Screen reader announcements for sort, filter, edit, selection, and pagination changes
|
|
18
18
|
- Proper ARIA roles and attributes on the grid, rows, cells, and headers
|
|
19
19
|
- `:focus-visible` indicators so keyboard users always know where they are
|
|
20
20
|
- Focus trapping in dropdowns and popovers (Escape always gets you out)
|
|
21
21
|
- High contrast mode support via CSS custom properties with system color fallbacks
|
|
22
|
-
- Semantic HTML
|
|
22
|
+
- Semantic HTML — real `<table>`, `<thead>`, `<th>`, `<td>` elements that assistive tech understands
|
|
23
23
|
|
|
24
24
|
The one thing you do need to add: an `aria-label` on the grid. It's one prop.
|
|
25
25
|
|
|
@@ -113,7 +113,7 @@ Key attributes and what they do:
|
|
|
113
113
|
| `aria-expanded` | Open/closed state of filter dropdowns |
|
|
114
114
|
| `aria-current="page"` | Current page in pagination |
|
|
115
115
|
|
|
116
|
-
The status bar uses `role="status"` with `aria-live="polite"
|
|
116
|
+
The status bar uses `role="status"` with `aria-live="polite"` — it announces changes without interrupting what the user is doing.
|
|
117
117
|
|
|
118
118
|
## Screen reader support
|
|
119
119
|
|
|
@@ -221,22 +221,22 @@ npm install --save-dev jest-axe
|
|
|
221
221
|
|
|
222
222
|
Automated tests catch structural issues but can't cover everything. Before shipping:
|
|
223
223
|
|
|
224
|
-
- [ ] Navigate the entire grid using only the keyboard
|
|
224
|
+
- [ ] Navigate the entire grid using only the keyboard — no mouse
|
|
225
225
|
- [ ] Enable VoiceOver (`Cmd+F5`) or NVDA and navigate through sort, filter, edit
|
|
226
|
-
- [ ] Test at 200% zoom
|
|
227
|
-
- [ ] Toggle Windows High Contrast Mode
|
|
226
|
+
- [ ] Test at 200% zoom — nothing should overflow or become unusable
|
|
227
|
+
- [ ] Toggle Windows High Contrast Mode — all content should remain visible
|
|
228
228
|
- [ ] Verify `aria-label` is set on the grid (one of the most common misses)
|
|
229
229
|
|
|
230
230
|
## Known limitations
|
|
231
231
|
|
|
232
232
|
**Virtual scrolling:** When `virtualScroll.enabled` is true, only visible rows are in the DOM. Screen readers won't know the full dataset size unless you set `aria-rowcount` on the grid wrapper manually.
|
|
233
233
|
|
|
234
|
-
**Custom cell renderers:** If you use `renderCell` to render custom content inside cells, you're responsible for making that content accessible
|
|
234
|
+
**Custom cell renderers:** If you use `renderCell` to render custom content inside cells, you're responsible for making that content accessible — ARIA attributes, keyboard interaction, announcements. The grid provides the structure; your custom content needs to carry its own accessibility.
|
|
235
235
|
|
|
236
236
|
## Resources
|
|
237
237
|
|
|
238
|
-
- [ARIA Grid Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/)
|
|
238
|
+
- [ARIA Grid Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/) — the spec OGrid follows
|
|
239
239
|
- [WCAG 2.1 Quick Reference](https://www.w3.org/WAI/WCAG21/quickref/)
|
|
240
|
-
- [axe DevTools Browser Extension](https://www.deque.com/axe/devtools/)
|
|
240
|
+
- [axe DevTools Browser Extension](https://www.deque.com/axe/devtools/) — free in-browser auditing
|
|
241
241
|
|
|
242
242
|
Found an accessibility issue? [Open an issue](https://github.com/alaarab/ogrid/issues) and tag it `accessibility` with your browser, screen reader version, and reproduction steps.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 6
|
|
3
|
+
title: Browser Support Matrix
|
|
4
|
+
description: What runs in browser CI today, what the smoke suite covers, and which projects are in the full Playwright matrix
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Browser Support Matrix
|
|
8
|
+
|
|
9
|
+
OGrid ships 10 UI packages, but not every browser check needs to run on every push. The browser contract is split into two layers:
|
|
10
|
+
|
|
11
|
+
- `npm 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 all 10 example apps only when you dispatch it manually.
|
|
13
|
+
|
|
14
|
+
## Main CI smoke suite
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm run test:e2e:smoke
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Projects in the smoke gate:
|
|
23
|
+
|
|
24
|
+
- `react-radix`
|
|
25
|
+
- `angular-material`
|
|
26
|
+
- `vue-vuetify`
|
|
27
|
+
- `js`
|
|
28
|
+
|
|
29
|
+
Journeys covered by the smoke suite:
|
|
30
|
+
|
|
31
|
+
- Grid renders with the shared demo columns and first page of rows
|
|
32
|
+
- Sorting changes the visible row order
|
|
33
|
+
- Text filtering narrows results and clearing the filter restores the page
|
|
34
|
+
- Inline editing commits a new value
|
|
35
|
+
|
|
36
|
+
This suite is the merge gate because it covers the shared spreadsheet contract through four different rendering stacks without turning every push into a full browser matrix run.
|
|
37
|
+
|
|
38
|
+
## Full Playwright matrix
|
|
39
|
+
|
|
40
|
+
The manual browser workflow runs the main browser suite against every example app:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm run test:e2e:matrix
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
| Framework package | Playwright project | Example port | Main CI smoke | Full matrix |
|
|
47
|
+
|---|---|---:|---|---|
|
|
48
|
+
| `@alaarab/ogrid-react-fluent` | `react-fluent` | 3001 | No | Yes |
|
|
49
|
+
| `@alaarab/ogrid-react-material` | `react-material` | 3002 | No | Yes |
|
|
50
|
+
| `@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
|
+
|
|
59
|
+
## Docs homepage coverage
|
|
60
|
+
|
|
61
|
+
The docs homepage is verified separately because it runs against the built Docusaurus site under the `/ogrid/` base path:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm run test:e2e:docs
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
That check currently runs in the `Deploy Docs` workflow after `npm run docs:build`.
|
|
68
|
+
|
|
69
|
+
## Interpreting failures
|
|
70
|
+
|
|
71
|
+
- A smoke suite failure is a release-blocking regression for the shared grid contract.
|
|
72
|
+
- A full-matrix failure means one wrapper or example app diverged from the documented behavior and should be audited before the next release.
|
|
73
|
+
- A docs homepage failure means the public site or deployment assumptions changed.
|