@iyulab/flex-table 0.40.0 → 0.40.1

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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.40.1] - 2026-09-30
4
+
5
+ ### Fixed
6
+
7
+ - **The Enter that finishes an IME composition no longer commits the cell edit and moves down**, and
8
+ no longer jumps to the next match in the find panel. Typing Korean (or another composed language)
9
+ committed the cell before the last syllable was in. Requires `@iyulab/components` 1.51.0 or later.
10
+
11
+ - **The React wrapper maps every custom event.** `row-reorder`, `column-visibility-change`,
12
+ `comment-change`, `data-import`, `fill-handle-apply`, `find-replace` and `header-context-menu` had no
13
+ `on*` prop; they are now `onRowReorder`, `onColumnVisibilityChange`, `onCommentChange`,
14
+ `onDataImport`, `onFillHandleApply`, `onFindReplace` and `onHeaderContextMenu`.
15
+
16
+ ### Documentation
17
+
18
+ - README corrected against the source: the `context-menu` detail and that it is cancelable,
19
+ `cell-select` can be `null`, XLSX export, the `footerData` type, and the `format` function's
20
+ arguments.
21
+ - The package now ships an agent skill (`skills/iyulab-flex-table/`) — the component API, the React
22
+ wrapper and data-source hooks, and styling in a form coding agents load directly.
23
+
3
24
  ## [0.40.0] - 2026-09-28
4
25
 
5
26
  ### Changed
package/README.md CHANGED
@@ -60,7 +60,7 @@ npm install @iyulab/flex-table
60
60
  - **Filter Types** — Text search, number range, boolean toggle, date/datetime range picker
61
61
  - **Row Operations** — `addRow()`, `deleteRows()`, `updateRows()` with undo
62
62
  - **Undo/Redo** — Ctrl+Z / Ctrl+Y for all operations; configurable stack size
63
- - **Export** — CSV, TSV, JSON; full data or selection-only
63
+ - **Export** — CSV, TSV, JSON, XLSX; full data or selection-only
64
64
  - **Dark Theme** — Auto via `prefers-color-scheme`, or manual `theme="dark"`
65
65
  - **Row Numbers** — Optional `show-row-numbers` attribute with sticky positioning
66
66
  - **Footer Row** — Summary/aggregate row via `footer-data` property
@@ -110,7 +110,7 @@ guarantee about a *constrained* host. `height-model.browser.test.ts` pins both s
110
110
  | `selectable` | `selectable` | `boolean` | `false` | Enable row-level checkbox selection |
111
111
  | `selectionMode` | `selection-mode` | `'single' \| 'multi'` | `'multi'` | Row selection mode |
112
112
  | `dataMode` | `data-mode` | `'client' \| 'server'` | `'client'` | Client-side or server-side data processing |
113
- | `footerData` | `footer-data` | `Record<string, string>` | `null` | Footer/summary row data (keys match column keys) |
113
+ | `footerData` | `footer-data` | `Record<string, string \| TemplateResult> \| null` | `null` | Footer/summary row data (keys match column keys) |
114
114
  | `emptyMessage` | `empty-message` | `string` | `'No data'` | Shown when `data` is empty |
115
115
  | `noMatchingMessage` | `no-matching-message` | `string` | `'No matching data'` | Shown when `data` has rows but every one is hidden by an active column filter |
116
116
  | `stylesheets` | — | `CSSStyleSheet[]` | `[]` | Constructable stylesheets adopted into the shadow root alongside the grid's own styles — the escape hatch for styling content a `render` function inserts, since document CSS doesn't cross the shadow boundary. Reassigning swaps the previous set, it doesn't accumulate |
@@ -161,7 +161,7 @@ The `validator` callback returns `null` if valid, or an error message string. On
161
161
 
162
162
  Both control how a cell's raw value is displayed, but they differ in what they replace:
163
163
 
164
- - **`format`**: a plain string pattern (Excel-style, e.g. `'#,##0.00'`, `'0.00%'`, `'$#,##0'`, `'yyyy-MM-dd'`) or a `(value) => string` function. Only the *displayed text* changes — editing, sorting, filtering, and export all keep operating on the raw underlying value. Use this for number/date/currency display formatting.
164
+ - **`format`**: a plain string pattern (Excel-style, e.g. `'#,##0.00'`, `'0.00%'`, `'$#,##0'`, `'yyyy-MM-dd'`) or a `(value, row, col) => string` function. Only the *displayed text* changes — editing, sorting, filtering, and export all keep operating on the raw underlying value. Use this for number/date/currency display formatting.
165
165
  - **`render`**: a `(value, row, col) => TemplateResult | string` function that replaces the cell's rendered content entirely — badges, links, icons, multi-field composites. Sorting/filtering still use the raw value, but the visual output is fully custom.
166
166
 
167
167
  ```typescript
@@ -242,7 +242,7 @@ Default is `false`, matching `clear-undo-on-data-change`.
242
242
 
243
243
  | Method | Returns | Description |
244
244
  |--------|---------|-------------|
245
- | `exportToString(format, options?)` | `string` | Export to `'csv'` / `'tsv'` / `'json'`. Pass `{ selectionOnly: true }` for selection range |
245
+ | `exportToString(format, options?)` | `string \| Uint8Array` | Export to `'csv'` / `'tsv'` / `'json'` (a string) or `'xlsx'` (bytes). Pass `{ selectionOnly: true }` for selection range |
246
246
  | `exportToFile(format, filename?)` | `void` | Export and trigger browser file download |
247
247
 
248
248
  ## Events
@@ -253,7 +253,7 @@ All events use `CustomEvent` with `bubbles: true, composed: true`.
253
253
 
254
254
  | Event | Detail | Description |
255
255
  |-------|--------|-------------|
256
- | `cell-select` | `{ row, col }` | Cell focus changed |
256
+ | `cell-select` | `{ row, col }` or `null` | Cell focus changed (`null` when no cell is active) |
257
257
  | `cell-edit-start` | `{ row, col, key, value }` | Cell editing started |
258
258
  | `cell-edit-commit` | `{ row, col, key, oldValue, newValue }` | Cell value committed |
259
259
  | `cell-edit-cancel` | `{ row, col }` | Cell edit cancelled (Escape) |
@@ -306,7 +306,7 @@ All events use `CustomEvent` with `bubbles: true, composed: true`.
306
306
  | Event | Detail | Description |
307
307
  |-------|--------|-------------|
308
308
  | `undo-state-change` | `{ canUndo, canRedo }` | Undo/redo availability changed |
309
- | `context-menu` | `{ x, y, row, col, dataRow, column }` | Right-click on cell |
309
+ | `context-menu` | `{ x, y, row, col, key, value, rowData }` | Right-click on cell. Cancelable — `preventDefault()` suppresses the built-in menu |
310
310
 
311
311
  ## CSS Custom Properties
312
312