gm-datagrid 0.1.24 → 0.1.26

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/CHANGELOG.md ADDED
@@ -0,0 +1,347 @@
1
+ # Changelog
2
+
3
+ All notable changes to `gm-datagrid` are documented here.
4
+
5
+ ---
6
+
7
+ ## [0.1.25] — 2026-03-11
8
+
9
+ ### Fixed
10
+
11
+ - **`ViewCell`**: clicks on links, buttons, and inputs inside `renderCell` no longer trigger grid cell selection / focus handlers (avoids console errors when navigating from ID columns).
12
+
13
+ ---
14
+
15
+ ## [0.1.24] — 2026-03-11
16
+
17
+ ### Added
18
+
19
+ - **Toolbar slots** (`slot` / `slotProps`): project-agnostic bulk actions (`bulkAction`), create control (`creator`), sync button (`synchronizer`), and trailing `actions`.
20
+ - **`GridBulkActionsHost`** — injects `selectedRows`, `selectedCount`, `onRefresh`, and `clearSelection` into a host component.
21
+ - **`statusSwitch`** grid prop + per-column `statusSwitch: true | object | false` with `RecordStatusSwitchCell` and `resolveColumnStatusSwitchConfig`.
22
+ - **`useGMGrid`**: `getSelectedRows()`, `getRows()`, `data`, `selectedCount`.
23
+ - **`GMDatagridRef`**: `getRows()`.
24
+ - **`autoCheckboxSelection`** (default `true`) — enables checkboxes when `slot.bulkAction` is set.
25
+
26
+ ### Fixed
27
+
28
+ - **`getSelectedRows()`** ref API now returns selections across the full dataset, not only the current page.
29
+
30
+ ---
31
+
32
+ ## [0.1.23] — 2026-05-05
33
+
34
+ ### Changed
35
+ - **`calculateSubTotal` redesign — type-aware aggregation defaults**: Columns with `calculateSubTotal: true` no longer require an explicit `aggregationModel` prop. The aggregation model is now auto-derived on mount from `calculateSubTotal` columns, with a sensible default function chosen per column type:
36
+ - **Numeric** (`number`, `price`, `total`, `int`, `discount`, `percent`, `tax`, `margin`) → `sum`
37
+ - **Date / dateTime** → `count-distinct`
38
+ - **Boolean / active** → `count-true`
39
+ - **Status / labels** → `count-distinct`
40
+ - **String / text / default** → `count`
41
+ - **Aggregation pill restricted to `calculateSubTotal` columns**: The interactive function-picker pill in column headers is now only shown for columns that have `calculateSubTotal: true`, removing visual noise on non-aggregate columns.
42
+ - **Expanded aggregation function set**: The function picker now exposes all available functions filtered by column type rather than always showing the same five numeric functions:
43
+ - New functions: `count` (`#`), `count-distinct` (`≠#`), `count-true` (`✓`), `count-false` (`✗`)
44
+ - Numeric columns: `sum`, `avg`, `min`, `max`, `count`
45
+ - Date columns: `min`, `max`, `count-distinct`, `count`
46
+ - Boolean columns: `count-true`, `count-false`, `count`
47
+ - Status/labels: `count-distinct`, `count`
48
+ - String/default: `min`, `max`, `count-distinct`, `count`
49
+ - **Footer display for non-numeric results**: Aggregation footer now correctly displays string and date results (e.g. `min`/`max` on text columns) without attempting numeric formatting.
50
+
51
+ ---
52
+
53
+ ## [0.1.22] — 2026-05-05
54
+
55
+ ### Fixed
56
+ - **Aggregation picker crash**: Wrapped `MenuItem` items inside the aggregation function `Popover` with a `<MenuList>` to provide the required `MenuListContext`, resolving the *"MUI: MenuListContext is missing"* runtime error.
57
+
58
+ ---
59
+
60
+ ## [0.1.21] — 2026-05-05
61
+
62
+ ### Added
63
+ - **Automatic Group Aggregate Preloading**: All grouping rows are now automatically pre-fetched from the engine upon grouping, ensuring subtotals are visible even for collapsed groups without requiring initial expansion.
64
+
65
+ ### Fixed
66
+ - **Wasm RefCell Sync**: Refactored `toggleGroup` and group preloading logic to perform engine calls strictly outside React state updaters, preventing potential `RefCell` recursive borrow panics.
67
+ - **Type Safety**: Fixed implicit `any` errors in grouping logic in `GridContext.tsx`.
68
+
69
+ ---
70
+
71
+ ## [0.1.20] — 2026-05-05
72
+
73
+ ### Added
74
+
75
+ #### Column-aligned Group Subtotals
76
+ When grouping is active, group headers now render as full-width rows with cells aligned to the grid columns.
77
+
78
+ - **Inline aggregates:** Aggregation values (sum, avg, etc.) are now displayed directly in the group header row, perfectly aligned with their respective columns.
79
+ - **Improved visibility:** Subtotals are visible whether the group is collapsed or expanded.
80
+ - **Redundancy reduction:** Removed the separate "aggregation sub-row" in favor of the integrated header subtotal row, providing a cleaner, more compact spreadsheet-like experience.
81
+ - **First-column grouping:** The primary grouping column cell displays the group key, row count, and expand/collapse toggle.
82
+
83
+ ---
84
+
85
+ ## [0.1.19] — 2026-04-22
86
+
87
+ ### Added
88
+
89
+ #### Aggregation footer row
90
+ A sticky footer row below the data body displays computed aggregate values per column. Compatible with MUI DataGrid Premium's `aggregationModel` API.
91
+
92
+ - **Feature flag** `aggregable` (default `false`) — opt-in; zero overhead on grids that don't use it.
93
+ - **Controlled model** `aggregationModel?: AggregationModel` — `{ field: fn }` map; mirrors MUI DataGrid Premium `aggregationModel`.
94
+ - **Uncontrolled init** via `initialState.aggregation.model` — seeds the model on first mount without taking full control.
95
+ - **Change callback** `onAggregationModelChange?: (model) => void` — fired whenever the aggregation model changes.
96
+ - **Built-in functions:** `sum`, `avg`, `min`, `max`, `size` — computed in TypeScript via `engine.get_all_rows()`, no Wasm changes required.
97
+ - **Per-column flags:**
98
+ - `aggregable?: boolean` — set to `false` to exclude a column from the footer and function picker.
99
+ - `availableAggregationFunctions?: AggregationFunction[]` — restricts which functions appear in the column's picker.
100
+ - **Function symbol** (`Σ`, `x̄`, `min`, `max`, `#`) rendered beside each footer value with a tooltip showing the full function name and formatted result.
101
+ - **Formatting** respects `col.valueFormatter`; falls back to locale-aware `toLocaleString` with correct decimal places per type (`price` → 4 dp, `total`/`avg` → 2 dp, others → 0 dp).
102
+ - **Scroll sync** — `aggFooterRef.scrollLeft` tracks the body scroll alongside `headerRowRef` and `filterRowRef`.
103
+
104
+ #### Interactive function picker (Popover)
105
+ Clicking the aggregation pill in any aggregable column header opens a Popover listing all available functions (or the `availableAggregationFunctions` subset). Selecting a function updates the model and fires `onAggregationModelChange`. A **Remove aggregation** action clears the column from the model.
106
+
107
+ #### Group aggregation sub-rows
108
+ When `groupable` and `aggregable` are both enabled, every expanded group shows a compact sub-row (blue left border, muted background) with per-group aggregate values aligned to their columns — powered by the new `useGroupAggregations` hook.
109
+
110
+ #### Full i18n coverage
111
+ All previously hardcoded UI strings are now sourced from the `GridLabels` locale system. 14 new keys added to both `es` and `en` locales:
112
+
113
+ | Key | `es` | `en` |
114
+ |---|---|---|
115
+ | `noRows` | `0 registros` | `0 records` |
116
+ | `rowsRange` | `{from}–{to} de {total} registros` | `{from}–{to} of {total} records` |
117
+ | `rowsPerPage` | `Filas por página:` | `Rows per page:` |
118
+ | `firstPage` | `Primera página` | `First page` |
119
+ | `prevPage` | `Página anterior` | `Previous page` |
120
+ | `nextPage` | `Página siguiente` | `Next page` |
121
+ | `lastPage` | `Última página` | `Last page` |
122
+ | `selectAll` | `Seleccionar todo` | `Select all` |
123
+ | `deselectAll` | `Deseleccionar todo` | `Deselect all` |
124
+ | `selectionSingular` | `elemento seleccionado` | `item selected` |
125
+ | `selectionPlural` | `elementos seleccionados` | `items selected` |
126
+ | `clearSelection` | `Limpiar` | `Clear` |
127
+ | `emptyGroup` | `(Sin valor)` | `(Empty)` |
128
+ | `engineError` | `No se pudo inicializar el motor de datos` | `Could not initialize the data engine` |
129
+
130
+ `aggregationFns` (map of fn → label) and `aggregationTooltipLabel` were also added in both locales.
131
+
132
+ ---
133
+
134
+ ## [0.1.18] — 2026-04-22
135
+
136
+ ### Fixed
137
+ - **Global keyboard event listeners intercepted keystrokes outside the grid** — `useKeyboardNav` and `useClipboard` both attached their `keydown` listener to `document`, meaning every keystroke on the page was evaluated by the grid regardless of where focus was. This caused the following regressions:
138
+ - **Text selection broken** — pressing `Shift+Arrow` in any `<input>` or `<textarea>` on the same page fired grid cell navigation instead of extending the text selection.
139
+ - **Arrow key navigation hijacked** — bare `Arrow` keys in other inputs/selects moved the grid's focused cell.
140
+ - **`Ctrl+Arrow` (word-jump) and browser shortcuts stolen** — while the handler let `Ctrl+Arrow` through when the event originated *inside* the grid, the same guard did not apply to events from *outside* the grid.
141
+ - **Grid clipboard (`Ctrl+C` / `Ctrl+V`) fired everywhere** — copy/paste shortcuts triggered grid serialization even when a regular text field had focus.
142
+
143
+ **Root cause:** both hooks called `document.addEventListener('keydown', …)` unconditionally.
144
+
145
+ **Fix:**
146
+ - Added a `gridRootRef: React.RefObject<HTMLDivElement | null>` prop to both `useKeyboardNav` and `useClipboard`.
147
+ - `GMDatagridInner` now creates a single `gridRootRef = useRef<HTMLDivElement>(null)` and attaches it to the outermost grid `<Box>` with `tabIndex={0}` and `outline: none`.
148
+ - **`useKeyboardNav`** — listener moved from `document` to `gridRootRef.current`. An early-exit guard (`root.contains(document.activeElement)`) is kept as a secondary safety net for events that bubble up from inside the grid but fire before React's synthetic system.
149
+ - **`useClipboard`** — listener stays on `document` (clipboard events must be accessible globally when the grid is focused) but now checks `gridRootRef.current.contains(document.activeElement)` before acting.
150
+ - `Ctrl+Arrow`, `Shift+Arrow`, `Ctrl+A`, and all other modifier combos pass through untouched when focus is outside the grid.
151
+ - Inside a focused grid cell (view mode), bare `Arrow` keys still move the focused cell; `Ctrl+Arrow` and `Meta+Arrow` are explicitly passed through so OS/browser word-jump shortcuts are never stolen.
152
+ - In edit mode, **only** `Escape`, `Enter`, and `Tab` are intercepted; all other keys (including `Shift+Arrow`, `Ctrl+A`) reach the native `<input>` unchanged.
153
+
154
+ ---
155
+
156
+ ## [0.1.17] — 2026-04-20
157
+
158
+ ### Fixed
159
+ - **Missing `exceljs` dependency declaration** — `exceljs` was installed and used by the xlsx export feature (added in 0.1.16) but was absent from `package.json` `dependencies`. Consumers who installed `gm-datagrid` from the npm registry received a `Cannot find module 'exceljs'` runtime error on any `.xlsx` export action. Added `"exceljs": "^4.4.0"` to `dependencies` so npm/pnpm/yarn correctly install it as a transitive dependency.
160
+
161
+ ---
162
+
163
+ ## [0.1.16] — 2026-04-20
164
+
165
+ ### Changed
166
+ - **xlsx export migrated from Rust/Wasm to client-side [ExcelJS](https://github.com/exceljs/exceljs)** — the toolbar `.xlsx` download is now generated entirely in TypeScript, consistent with how `csv`, `txt`, and `json` are produced. The Wasm engine is no longer involved in xlsx generation.
167
+ - **Header row styling** — bold white text on GStore primary blue (`#251BBC`) background with a medium bottom border.
168
+ - **Freeze pane** — header row is frozen (Excel row 1 stays visible while scrolling).
169
+ - **Zebra striping** — even data rows receive a light grey (`#F5F5F5`) background fill.
170
+ - **Number formats preserved** — same Excel `numFmt` strings as before: `#,##0` (NUMBER/INT), `#,##0.0000` (PRICE), `#,##0.00` (TOTAL), `0.00` (progress types).
171
+ - **Date columns** — raw ISO strings are converted to native `Date` objects so Excel stores them as proper date values with `dd/mm/yyyy` / `dd/mm/yyyy hh:mm:ss` number formats.
172
+ - **Right-alignment** — all numeric columns are right-aligned.
173
+ - **Auto-column width** — measured from header + first 200 data rows; clamped to 8–60 chars.
174
+ - **`valueFormatter` respected** — non-numeric, non-date columns pass through `getCellText()` (same pipeline as csv/txt) so custom formatters apply.
175
+ - **`exportableFields` whitelist** — fully enforced client-side via `getExportColumns()` without needing a separate Wasm call.
176
+
177
+ ### Removed
178
+ - `engine.export_to_excel()` and `engine.export_to_excel_columns()` are no longer called from the React layer. The Rust export code in `core-engine/src/engine/export.rs` remains for potential server-side use but is no longer part of the browser download path.
179
+
180
+ ---
181
+
182
+ ## [0.1.15] — 2026-04-20
183
+
184
+ ### Fixed
185
+ - **Export producing empty files (xlsx silent no-op / csv headers only)** — `engineRef` in `GMDatagridInner` was a local `useRef(null)` that was never assigned; the real `GridEngine` instance lived inside `GridContext` and was never accessible to `useExport`. Fix: exposed `engine` on `GridContextValue`, destructure it from `useGMGrid()` in `GMDatagridInner`, and keep `engineRef.current` in sync each render so all export formats call into the live Wasm engine.
186
+
187
+ ---
188
+
189
+ ## [0.1.14] — 2026-04-20
190
+
191
+ ### Added
192
+ - **Multi-format export** — the toolbar export button now opens a **format picker menu** (MUI `Menu`) when more than one format is enabled. Supported formats: `xlsx`, `csv`, `txt`, `json`.
193
+ - `xlsx` — generated by the Rust/Wasm engine (unchanged behaviour).
194
+ - `csv` — RFC 4180 CSV with UTF-8 BOM for Excel compatibility. Respects `valueFormatter`.
195
+ - `txt` — tab-separated values, compatible with Excel copy-paste.
196
+ - `json` — JSON array of objects keyed by column `field`.
197
+ - **`exportFormats` prop** (`ExportFormat[]`, default `['xlsx', 'csv']`) — controls which formats appear in the menu. Single-format grids skip the menu and download directly.
198
+ - **`ExportFormat`** type (`'xlsx' | 'csv' | 'txt' | 'json'`) exported from package root.
199
+ - **i18n** — new `export` and `exportFormats` keys added to `GridLabels` / `GRID_LABELS` (Spanish + English). Override with the `labels` prop as usual.
200
+
201
+ ### Changed
202
+ - **`editable` flag now defaults to `false`** — inline editing must be explicitly opted in with `editable` on the grid or `editable: true` on individual columns.
203
+ - `ToolbarButtons` no longer accepts `onExport?: () => void`; replaced with `exportFormats` + `onExportFormat` for format-aware dispatch.
204
+ - `GridToolbar` and `MobileToolbar` interfaces updated accordingly (backward-compatible via the `{...toolbarProps}` spread in `GMDatagridInner`).
205
+ - Non-exportable column types (`ACTION`, `MENU_ACTION`, `IMAGE`) are automatically excluded from CSV/TXT/JSON exports.
206
+
207
+ ---
208
+
209
+ ## [0.1.13] — 2026-04-20
210
+
211
+ ### Added
212
+ - **`editable` feature flag** (`boolean`, default `true`) — when `false`, inline editing is disabled globally regardless of per-column `editable` flags.
213
+ - **`editableColumns` prop** (`string[]`) — whitelist of field names that may be edited. When set, only these fields are editable regardless of per-column `editable` flags in `ColumnDef`.
214
+ - **`onCellEditStart(params: CellEditParams)`** — MUI DataGrid-compatible callback fired when a cell enters edit mode. `params` contains `{ id, field, value, row }`.
215
+ - **`onCellEditStop(params: CellEditParams)`** — MUI DataGrid-compatible callback fired when a cell exits edit mode (saved or cancelled).
216
+ - **`isCellEditable(params: CellEditParams) => boolean`** — per-row/cell editability guard. Works like MUI DataGrid's `isCellEditable` prop.
217
+ - **`ref.startCellEditMode({ id, field })`** — programmatically puts a cell into edit mode (MUI DataGrid API compatible).
218
+ - **`ref.stopCellEditMode({ id, field, ignoreModifications? })`** — programmatically saves or discards a cell edit (MUI DataGrid API compatible).
219
+ - **`CellEditParams`** type exported from package root.
220
+
221
+ ### Changed
222
+ - Editability is now resolved through a 4-level hierarchy: `editable` flag → `editableColumns` whitelist → `col.editable` per-column flag → `isCellEditable()` callback.
223
+ - `useInlineEdit` fires `onCellEditStart` / `onCellEditStop` before any async validation, so parent components always receive the event even when `processRowUpdate` rejects.
224
+
225
+ ---
226
+
227
+ ## [0.1.12] — 2026-04-20
228
+
229
+ ### Fixed
230
+ - **Mobile horizontal scroll — header and filter row no longer stay frozen** when the grid body is scrolled horizontally on small screens. The header row and filter row had `overflowX: hidden` and were independent siblings of the scrollable body, so they never moved. Fixed by adding `headerRowRef` and `filterRowRef` and attaching a passive `scroll` listener on the body container that mirrors `scrollLeft` to both rows. The scrollbar remains invisible on both overlay rows while the column labels and filter inputs track the body scroll precisely.
231
+
232
+ ---
233
+
234
+ ## [0.1.11] — 2026-04-20
235
+
236
+ ### Fixed
237
+ - **Wasm init concurrency panic** — multiple `<GMDatagrid>` instances mounting simultaneously each called `wasm.default?.()` (the wasm-pack `init` function) concurrently. The init function stores the `WebAssembly.Instance` in a module-level variable; concurrent calls corrupted the internal `RefCell` borrow state before any engine was constructed, causing: *"recursive use of an object detected which would lead to unsafe aliasing in rust"* at `set_columns`. Fixed by introducing a **module-level singleton promise** (`wasmModulePromise`) in `useGridEngine.ts` — `init()` is called exactly once regardless of how many grid instances mount. Subsequent hooks await the already-resolved promise and each create their own independent `GridEngine` instance. On explicit `retry()` the singleton is cleared so a fresh init can be attempted.
238
+
239
+ ---
240
+
241
+ ## [0.1.10] — 2026-04-20
242
+
243
+ ### Fixed
244
+ - **Wasm `RefCell` aliasing panic** — `engine.get_group_page()` was being called inside a React state-updater function passed to `setExpandedGroups`. React (Strict Mode) can invoke state updaters more than once in the same synchronous flush. Because wasm-bindgen wraps every `&mut self` / `&self` method with a `RefCell` borrow, a second invocation while the first borrow was still live triggered: *"recursive use of an object detected which would lead to unsafe aliasing in rust"*. Fixed by capturing the expand direction (`isExpanding`) before calling `setState`, then executing `engine.get_group_page()` outside the updater — as a plain call in the event handler body where all wasm borrows are guaranteed to be fully released.
245
+
246
+ ---
247
+
248
+ ## [0.1.9] — 2026-04-20
249
+
250
+ ### Added
251
+ - **`exportable` flag** (`boolean`, default `true`) — when `false` the Export button is hidden entirely.
252
+ - **`exportableColumns` prop** (`string[]`) — whitelist of field names included in the `.xlsx` export. When omitted, all visible columns are exported.
253
+ - **`filterable` flag** (`boolean`, default `true`) — when `false` the filter toggle button and filter row are hidden; `handleColumnFilter` / `buildFilterGroup` become no-ops.
254
+ - **`filterableColumns` prop** (`string[]`) — only the listed fields show a filter input. Columns not in the list render an empty cell in the filter row.
255
+ - **`sortable` flag** (`boolean`, default `true`) — when `false` all column headers lose their sort cursor and click handler.
256
+ - **`sortableColumns` prop** (`string[]`) — only the listed fields respond to header clicks; others render without a sort cursor.
257
+ - **`groupable` flag** (`boolean`, default `false`) — when `true` the group-by picker appears in the toolbar. Previously the picker was always rendered for all non-action columns.
258
+ - **`groupableColumns` prop** (`string[]`) — restricts the group-by picker to the listed fields. When omitted all non-action columns are offered.
259
+
260
+ ### Changed
261
+ - `ToolbarButtons` — `onExport` is now optional; button is rendered only when the handler is defined.
262
+ - `GridToolbar` / `MobileToolbar` — `onExport` prop is now optional.
263
+ - `useExport` — accepts new `exportableFields?: Set<string>` param; when set, calls `engine.export_to_excel_columns()` instead of the full export.
264
+ - Column header cells now compute `canSort` per column and suppress the pointer cursor and sort arrow when sorting is disabled for that field.
265
+ - Filter row computes filterability via `isColumnFilterable()` which intersects the per-column `filterable` flag with the global `filterable` flag and `filterableColumns` whitelist.
266
+
267
+ ---
268
+
269
+ ## [0.1.8] — 2026-04-20
270
+
271
+ ### Added
272
+ - **`locale` prop** — pass `locale="en"` or `locale="es"` (default) to `GMDatagrid` / `GMGridContainer` to switch all built-in UI strings (filter operator labels, tooltips, placeholders, boolean chip labels) to the selected language.
273
+ - **i18n engine** — new `src/lib/i18n.ts` module exports `GRID_LABELS`, `GridLabels`, and `GridLocale`. Extend it to add more locales.
274
+ - **`FilterCellLabels` type** — new exported interface. Pass `labels` prop directly to `FilterCell` when embedding it standalone outside the grid.
275
+ - **"Clear all filters" button** — a `FilterListOff` icon button (⚠ warning colour) appears in the desktop toolbar immediately to the right of the filter badge when one or more column filters are active. One click clears all column filters, the quick-filter text, and the engine filter group.
276
+ - **Mobile filter button** — `FilterListIcon` with badge is now rendered in the **always-visible** mobile toolbar header row (not inside the collapsible section), so users can open the filter panel without expanding the toolbar first.
277
+ - **Mobile clear-filters chip** — when `activeFilterCount > 0`, a "Limpiar filtros" chip with a delete icon appears inside the mobile collapsible section.
278
+ - **Localised quick-filter placeholder** — `quickFilterPlaceholder` now defaults to `labels.search` ("Buscar…" / "Search…") so it tracks the selected locale automatically.
279
+
280
+ ### Changed
281
+ - `DateOperatorFilter` — operator dropdown labels are now driven by `dateOpLabels` prop (falls back to English defaults when not provided).
282
+ - `BooleanFilter` — "Todos / Sí / No" chip labels accept `allLabel`, `yesLabel`, `noLabel` props.
283
+ - `EnumFilter` — "Todos" / "All" option driven by `allLabel` prop.
284
+ - `NumericRangeFilter` — min/max tooltips driven by `minLabel` / `maxLabel` props.
285
+ - `GridToolbar` filter toggle tooltip now uses `labels.filterBy` / `labels.hideFilters`.
286
+ - `GridToolbar` group-by picker "Sin agrupar" option now uses `labels.noGroup`.
287
+
288
+ ---
289
+
290
+ ## [0.1.7] — 2026-04-17
291
+
292
+ ### Added
293
+ - **Date filter operators** — date and dateTime columns now show an operator dropdown with 8 options:
294
+ - *es* (`equals`), *no es* (`notEquals`)
295
+ - *es posterior a* (`gt`), *es a partir de* (`gte`)
296
+ - *es anterior a* (`lt`), *es hasta* (`lte`)
297
+ - *está vacío* (`isNull`), *no está vacío* (`isNotNull`)
298
+ - Calendar input is hidden automatically for `isNull` / `isNotNull`.
299
+ - **`DateFilterValue` type** — new exported type `{ op: DateFilterOp; value: string }` and `DateFilterOp` union for typed date filter state.
300
+ - **Rust engine — ISO date string comparisons** — `filter.rs` now handles `gt`, `gte`, `lt`, `lte`, `notEquals` on `CellValue::Text`; ISO 8601 strings compare correctly via lexicographic ordering.
301
+
302
+ ### Fixed
303
+ - **Numeric range filter cursor-jump** — `NumericRangeFilter` (min/max inputs) now uses local state + 300 ms debounce instead of fully controlled inputs, preventing the cursor from jumping to the end of the field on every keystroke.
304
+
305
+ ---
306
+
307
+ ## [0.1.6] — 2026-04-10
308
+
309
+ ### Added
310
+ - **Pagination footer** — page pill navigation, rows-per-page selector, and total row count display rendered below the grid body.
311
+ - **Pagination props** added to `GMDatagridProps`:
312
+ - `paginationModel?: { page: number; pageSize: number }`
313
+ - `onPaginationModelChange?: (model: { page: number; pageSize: number }) => void`
314
+ - `pageSizeOptions?: number[]` (default `[25, 50, 100]`)
315
+ - `rowCount?: number`
316
+ - `paginationMode?: 'client' | 'server'` (default `'client'`)
317
+
318
+ ---
319
+
320
+ ## [0.1.5] — 2026-03-28
321
+
322
+ ### Added
323
+ - **MUI palette token migration** — all hardcoded colour values replaced with MUI theme palette tokens; full dark-mode support.
324
+
325
+ ---
326
+
327
+ ## [0.1.0] — 2026-03-01
328
+
329
+ ### Added
330
+ - Initial release.
331
+ - Rust/Wasm core engine (`GridEngine`) with multi-column sort, filter, aggregation, and Excel export via `rust_xlsxwriter`.
332
+ - React wrapper with virtualized rendering (100 k rows @ 60 FPS target).
333
+ - Column types: `string`, `number`, `price`, `total`, `discount`, `percent`, `tax`, `margin`, `date`, `dateTime`, `status`, `labels`, `image`, `action`, `menu-action`, `id`, `int`, `code`, `array`, `text`.
334
+ - `calculateSubTotal` — running column subtotals updated as filters change.
335
+ - `GMGridContainer` — drop-in compatibility alias preserving the legacy API (`sourceApi`, `apiParameters`, `localData`, `ref.refresh()`, `ref.setParams()`, `useGMGrid()`).
336
+ - Excel export (Wasm → `Blob` download).
337
+ - TSV clipboard — Ctrl+C / Ctrl+V interoperable with Excel and Google Sheets; large pastes (> 500 rows) offloaded to a Web Worker.
338
+ - Inline cell editing with `processRowUpdate` (sync and async / server-side validation).
339
+ - Keyboard navigation — Arrow, Enter, Tab, Shift+Tab, Escape, F2.
340
+ - Column resize with `localStorage` persistence.
341
+ - Column pinning (`pin: 'left' | 'right'`).
342
+ - Row checkbox selection (`checkboxSelection`, `onRowSelectionChange`, `GMDatagridRef.getSelectedRows()`).
343
+ - Quick filter toolbar backed by `match-sorter` (fuzzy ranked search across string/text/code columns).
344
+ - Type-aware `FilterCell` per column: text, enum Select, numeric min/max range, date, boolean 3-state chip.
345
+ - `GMGridEmptyState` — three variants: empty, filtered (with clear action), error (with retry).
346
+ - `useCache` hook integration — master-data caching via `localStorage` with TTL.
347
+ - Storybook stories for `ViewCell`, `GridToolbar`, and `GMDatagrid`.
@@ -13,8 +13,7 @@ interface VirtualizationState {
13
13
  }
14
14
  /**
15
15
  * Computes which rows are visible in the viewport.
16
- * Uses a single rAF loop — never onScroll with synchronous setState.
17
- * Always cancels the loop on unmount to prevent memory leaks.
16
+ * Updates on scroll/resize — no perpetual rAF setState loop.
18
17
  */
19
18
  export declare function useVirtualization({ rows, containerRef, density, overscan, }: UseVirtualizationProps): VirtualizationState;
20
19
  export {};