@iyulab/flex-table 0.40.1 → 0.40.3
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 +31 -0
- package/README.md +2 -1
- package/dist/clipboard/clipboard.d.ts +2 -6
- package/dist/{flex-table-Dl5CYn-V.js → flex-table-DvETrA1w.js} +218 -934
- package/dist/flex-table.js +1 -1
- package/dist/react.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.40.3] - 2026-09-30
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Screen readers get the position of a row and a cell in the whole table, not in the rendered part.**
|
|
8
|
+
The grid renders only the visible rows and columns, so without indices a screen reader announced the
|
|
9
|
+
first rendered row as row 1 after scrolling. Rows now carry `aria-rowindex` and cells, column headers
|
|
10
|
+
and footer cells `aria-colindex` (1-based, in display order). `aria-rowcount` now counts the header
|
|
11
|
+
row and the footer row as the ARIA grid pattern defines it (it counted data rows only, so it is one or
|
|
12
|
+
two higher than before). The footer row's cells now have the grid cell role — the footer was a row
|
|
13
|
+
without cells.
|
|
14
|
+
|
|
15
|
+
## [0.40.2] - 2026-09-30
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **`Locale.set()` from `@iyulab/components` reaches the table again.** The build copied the parts of
|
|
20
|
+
`@iyulab/components` this package uses (`Locale`, number and date formatting, the IME check) into its
|
|
21
|
+
own bundle, so the table kept a separate locale of its own: an app that switched language with
|
|
22
|
+
`Locale.set()` saw the table's menus, labels and formatted values stay in the language detected at
|
|
23
|
+
startup (it matched only when `<html lang>` was already right). `@iyulab/components` is now imported,
|
|
24
|
+
not copied.
|
|
25
|
+
- **Copying cells quotes a cell that contains a line break, a tab or a double quote**, so a multi-line
|
|
26
|
+
note pastes into Excel or Google Sheets as one cell instead of splitting into rows. Pasting keeps a
|
|
27
|
+
trailing row of empty cells, which used to be dropped. The clipboard format now comes from
|
|
28
|
+
`@iyulab/components` (`encodeTsv` / `decodeTsv`).
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Requires `@iyulab/components` 1.52.0 or later (peer).
|
|
33
|
+
|
|
3
34
|
## [0.40.1] - 2026-09-30
|
|
4
35
|
|
|
5
36
|
### Fixed
|
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ npm install @iyulab/flex-table
|
|
|
67
67
|
- **Data Mode** — Client-side or server-side sorting/filtering (`dataMode`)
|
|
68
68
|
- **Context Menu** — `context-menu` event for custom right-click menus
|
|
69
69
|
- **React Wrapper** — `@iyulab/flex-table/react` subpath for idiomatic React usage
|
|
70
|
-
- **ARIA** — `role="grid"`, `aria-sort`, `aria-selected`, `aria-readonly`, `aria-invalid`, `aria-rowcount`, `aria-colcount`
|
|
70
|
+
- **ARIA** — `role="grid"`, `aria-sort`, `aria-selected`, `aria-readonly`, `aria-invalid`, `aria-rowcount`, `aria-colcount`, `aria-rowindex`, `aria-colindex`
|
|
71
71
|
|
|
72
72
|
## Sizing
|
|
73
73
|
|
|
@@ -471,6 +471,7 @@ conformance claim for the success criteria it does not list.
|
|
|
471
471
|
| SC 2.5.8 Target Size (Minimum) | Sortable headers, column menu buttons, the open column menu, the open filter dropdown (text and number), the find/replace bar, the cell context menu and row selection checkboxes are at least 24×24 CSS px or meet the spacing exception (24px between centers, counting the neighbouring resize handles), and are actually hit at that position. Two small targets use the equivalent-control exception: the 6px column resize handle (every resize is also in the column menu) and the hidden-column marker (its column menu offers **Show: …**) | `tests/browser/target-size.browser.test.ts` (real Chromium) |
|
|
472
472
|
| SC 2.1.1 Keyboard (pointer-cursor check) | Nothing the grid renders shows a pointer cursor without being an interactive element. Sorting by header click also has a keyboard path — the column menu's **Sort ascending** / **Sort descending** (the check alone cannot see that, because the header cell wraps the menu button) | `tests/browser/target-size.browser.test.ts` · `src/flex-table.test.ts` |
|
|
473
473
|
| SC 2.5.7 Dragging Movements | Resizing never requires a drag — the column menu's **Auto-fit width**, **Wider** and **Narrower** are single clicks | `tests/browser/column-menu.browser.test.ts` |
|
|
474
|
+
| SC 1.3.1 Info and Relationships (virtualized grid) | Only the visible rows and columns are in the DOM, so every row carries `aria-rowindex` and every cell `aria-colindex` (1-based, in display order), and the grid's `aria-rowcount` / `aria-colcount` give the full size — the header row is row 1, data rows start at 2, and the footer row (if any) is last. A screen reader announces "row 621 of 10001" after scrolling instead of counting the rows that happen to be rendered. The footer row's cells are grid cells | `tests/browser/aria-grid-index.browser.test.ts` |
|
|
474
475
|
|
|
475
476
|
Not yet measured: the boolean and date filter dropdowns and the comment popup. Color contrast comes
|
|
476
477
|
from the `@iyulab/components` tokens this package reads.
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import type { CellRange } from '../core/selection.js';
|
|
2
2
|
import type { ColumnDefinition, DataRow } from '../models/types.js';
|
|
3
3
|
/**
|
|
4
|
-
* Copy selected range to clipboard as TSV
|
|
4
|
+
* Copy selected range to clipboard as TSV — the spreadsheet clipboard format (see `encodeTsv`):
|
|
5
|
+
* a cell containing a tab, a line break or a quote is quoted, so it pastes into Excel as one cell.
|
|
5
6
|
*/
|
|
6
7
|
export declare function copyToClipboard(data: DataRow[], columns: ColumnDefinition[], range: CellRange): string;
|
|
7
|
-
/**
|
|
8
|
-
* Parse TSV/CSV clipboard text into a 2D array of strings.
|
|
9
|
-
* Handles RFC 4180 quoted fields: double-quote escaping, embedded tabs/newlines.
|
|
10
|
-
*/
|
|
11
|
-
export declare function parseClipboardText(text: string): string[][];
|
|
12
8
|
export declare function parseValueForColumn(raw: string, col: ColumnDefinition): unknown;
|