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 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
- - 📥 One-click `.xlsx` export (generated in Wasm, no server round-trip)
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` | Generated by Rust/Wasm; preserves number & date formats, column widths |
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 CSV/TXT/JSON exports.
506
+ `ACTION`, `MENU_ACTION`, and `IMAGE` columns are automatically excluded from all exports.
507
+
508
+ ### xlsx formatting
514
509
 
515
- Column formatting is preserved in the xlsx export:
510
+ The generated `.xlsx` file includes:
516
511
 
517
- - `PRICE` / `TOTAL` columns use Excel number formats
518
- - `DATE` / `DATE_TIME` columns use Excel date formats
519
- - Progress types (`DISCOUNT`, `PERCENT`, etc.) export as raw numbers (0–100)
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
 
@@ -9,6 +9,7 @@ interface GridContextValue extends DataSetState {
9
9
  pageSize: number;
10
10
  setPage: (p: number) => void;
11
11
  setPageSize: (s: number) => void;
12
+ engine: any;
12
13
  engineReady: boolean;
13
14
  engineError: Error | null;
14
15
  retryEngine: () => void;