gm-datagrid 0.1.14 → 0.1.17
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 +16 -14
- package/dist/context/GridContext.d.ts +1 -0
- package/dist/gm-datagrid.js +40332 -3364
- package/dist/gm-datagrid.umd.cjs +78 -22
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -8,8 +8,7 @@ Enterprise-grade, Excel-like data grid for React — powered by a **Rust/WebAsse
|
|
|
8
8
|
- ✏️ Inline cell editing with async validation and automatic revert on error
|
|
9
9
|
- 📊 Column subtotals updated live as filters change
|
|
10
10
|
- 📅 Date filter operators — is / is not / is after / is before / is empty / is not empty
|
|
11
|
-
- 📥
|
|
12
|
-
- 📤 **Multi-format export** — toolbar picker for `xlsx`, `csv`, `txt`, `json`
|
|
11
|
+
- 📥 **Multi-format export** — toolbar picker for `xlsx` (styled, freeze pane, zebra striping via ExcelJS), `csv`, `txt`, `json`
|
|
13
12
|
- 🌐 Built-in **i18n** — `locale="es"` / `locale="en"` with full label overrides
|
|
14
13
|
- 🔒 **Feature flags** — selectively disable export, filters, sort, or grouping per instance
|
|
15
14
|
- 🧹 **Clear all filters** button in toolbar (desktop + mobile)
|
|
@@ -476,12 +475,6 @@ function App() {
|
|
|
476
475
|
|
|
477
476
|
---
|
|
478
477
|
|
|
479
|
-
## Excel export
|
|
480
|
-
|
|
481
|
-
The toolbar includes an **Export** button that generates a `.xlsx` file entirely inside the Wasm engine — no server call required. The exported file reflects the current sort and filter state.
|
|
482
|
-
|
|
483
|
-
---
|
|
484
|
-
|
|
485
478
|
## Multi-format export
|
|
486
479
|
|
|
487
480
|
By default the toolbar shows an export button that downloads both `.xlsx` and `.csv`. When more than one format is enabled a **format picker menu** opens on click:
|
|
@@ -505,18 +498,27 @@ By default the toolbar shows an export button that downloads both `.xlsx` and `.
|
|
|
505
498
|
|
|
506
499
|
| Format | Extension | Notes |
|
|
507
500
|
|---|---|---|
|
|
508
|
-
| `xlsx` | `.xlsx` |
|
|
501
|
+
| `xlsx` | `.xlsx` | Client-side via [ExcelJS](https://github.com/exceljs/exceljs) — styled headers, freeze pane, zebra striping, native number/date cell types |
|
|
509
502
|
| `csv` | `.csv` | RFC 4180, UTF-8 BOM — opens correctly in Excel |
|
|
510
503
|
| `txt` | `.txt` | Tab-separated values — paste directly into Excel |
|
|
511
504
|
| `json` | `.json` | Array of objects keyed by column `field` |
|
|
512
505
|
|
|
513
|
-
`ACTION`, `MENU_ACTION`, and `IMAGE` columns are automatically excluded from
|
|
506
|
+
`ACTION`, `MENU_ACTION`, and `IMAGE` columns are automatically excluded from all exports.
|
|
507
|
+
|
|
508
|
+
### xlsx formatting
|
|
514
509
|
|
|
515
|
-
|
|
510
|
+
The generated `.xlsx` file includes:
|
|
516
511
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
512
|
+
| Feature | Detail |
|
|
513
|
+
|---|---|
|
|
514
|
+
| **Header row** | Bold white text, GStore blue (`#251BBC`) fill, medium bottom border |
|
|
515
|
+
| **Freeze pane** | Header row stays visible while scrolling |
|
|
516
|
+
| **Zebra striping** | Alternating light grey rows for readability |
|
|
517
|
+
| **Number formats** | `#,##0` (NUMBER/INT), `#,##0.0000` (PRICE), `#,##0.00` (TOTAL), `0.00` (progress types) |
|
|
518
|
+
| **Date formats** | Native Excel date cells — `dd/mm/yyyy` / `dd/mm/yyyy hh:mm:ss` |
|
|
519
|
+
| **Alignment** | Numeric columns are right-aligned |
|
|
520
|
+
| **Column widths** | Auto-sized from header + first 200 rows (clamped 8–60 chars) |
|
|
521
|
+
| **`valueFormatter`** | Applied to string/status/label columns — same output as csv/txt |
|
|
520
522
|
|
|
521
523
|
---
|
|
522
524
|
|