@alaarab/ogrid-js 2.0.0-beta → 2.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/README.md +73 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<strong>OGrid JS</strong> — Vanilla JavaScript data grid with zero framework dependencies.
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://www.npmjs.com/package/@alaarab/ogrid-js"><img src="https://img.shields.io/npm/v/@alaarab/ogrid-js?color=%23217346&label=npm" alt="npm version" /></a>
|
|
7
|
+
<a href="https://github.com/alaarab/ogrid/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT License" /></a>
|
|
8
|
+
<img src="https://img.shields.io/badge/TypeScript-strict-blue" alt="TypeScript strict" />
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://alaarab.github.io/ogrid/">Documentation</a> · <a href="https://alaarab.github.io/ogrid/docs/getting-started/overview">Getting Started</a> · <a href="https://alaarab.github.io/ogrid/docs/api/ogrid-props">API Reference</a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Vanilla JS data grid for [OGrid](https://github.com/alaarab/ogrid) — full feature parity with the React packages, no framework required. Class-based state with EventEmitter replaces React hooks. Depends only on [`@alaarab/ogrid-core`](https://www.npmjs.com/package/@alaarab/ogrid-core).
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
- Sorting, filtering, pagination (client-side and server-side)
|
|
22
|
+
- Cell selection, keyboard navigation, clipboard (copy/cut/paste)
|
|
23
|
+
- Inline cell editing with undo/redo (batch support)
|
|
24
|
+
- Fill handle (drag-to-fill)
|
|
25
|
+
- Row selection (single/multiple, shift-click range, select all)
|
|
26
|
+
- Column resizing and pinning (left/right)
|
|
27
|
+
- Column chooser, sidebar (columns & filters panels)
|
|
28
|
+
- Header filters (text, multiSelect, date)
|
|
29
|
+
- Context menu
|
|
30
|
+
- Status bar with aggregations
|
|
31
|
+
- Marching ants copy/cut overlay
|
|
32
|
+
- Server-side data source with `fetchPage`
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { OGrid } from '@alaarab/ogrid-js';
|
|
38
|
+
|
|
39
|
+
const grid = new OGrid(document.getElementById('grid')!, {
|
|
40
|
+
columns: [
|
|
41
|
+
{ columnId: 'name', header: 'Name' },
|
|
42
|
+
{ columnId: 'age', header: 'Age', type: 'numeric' },
|
|
43
|
+
],
|
|
44
|
+
data: [
|
|
45
|
+
{ name: 'Alice', age: 30 },
|
|
46
|
+
{ name: 'Bob', age: 25 },
|
|
47
|
+
],
|
|
48
|
+
pagination: true,
|
|
49
|
+
pageSize: 10,
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Access the API
|
|
53
|
+
const api = grid.getApi();
|
|
54
|
+
|
|
55
|
+
// Clean up
|
|
56
|
+
grid.destroy();
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Install
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm install @alaarab/ogrid-js
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Peer dep: `@alaarab/ogrid-core`.
|
|
66
|
+
|
|
67
|
+
## Documentation
|
|
68
|
+
|
|
69
|
+
Full docs at **[alaarab.github.io/ogrid](https://alaarab.github.io/ogrid/)**.
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
MIT — Free forever.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid-js",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "OGrid vanilla JS – framework-free data grid with sorting, filtering, pagination, and spreadsheet-style editing.",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"files": ["dist", "README.md", "LICENSE"],
|
|
24
24
|
"engines": { "node": ">=18" },
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@alaarab/ogrid-core": "2.0.0
|
|
26
|
+
"@alaarab/ogrid-core": "2.0.0"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": { "access": "public" }
|
|
29
29
|
}
|