@umriss-ui/table 0.15.0 → 0.34.0
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 +50 -2
- package/README.md +26 -7
- package/dist/index.d.ts +21 -513
- package/dist/table.css +1 -1
- package/dist/table.js +2985 -3217
- package/docs/llms-full.md +238 -1517
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
# Changes to `@umriss-ui/table`
|
|
2
2
|
|
|
3
3
|
This document describes what changes for **callers** of the package: exports,
|
|
4
|
-
props, behaviour.
|
|
5
|
-
(`docs/journal.md`) and in the specs under `.scratch/`.
|
|
4
|
+
props, behaviour.
|
|
6
5
|
|
|
7
6
|
**The numbers** follow the rule of `@umriss-ui/core` and `@umriss-ui/charts`: the
|
|
8
7
|
middle digit rises when something is added, the last one when something is
|
|
9
8
|
repaired, and **whatever changes existing behaviour stands under a heading
|
|
10
9
|
"Changed" of its own**, no matter which digit rose.
|
|
11
10
|
|
|
11
|
+
From 0.34.0 all five packages share one number: they are released together, and a package without a change of its own still gets a heading for it.
|
|
12
|
+
|
|
12
13
|
**Names read forwards.** Where an entry describes a name that has since been
|
|
13
14
|
renamed, it is named here as it is called today; names that were removed stand
|
|
14
15
|
as they stood.
|
|
@@ -22,6 +23,53 @@ is one of the internal numbers from before core's first publication as `0.1.0`
|
|
|
22
23
|
|
|
23
24
|
---
|
|
24
25
|
|
|
26
|
+
## 0.34.0 – The alarm list leaves, and a view is set (Oct. 2026)
|
|
27
|
+
|
|
28
|
+
From this version all five packages carry one number and are released
|
|
29
|
+
together. Needs `@umriss-ui/core` 0.34; the peer range is `^0.34.0`.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- **A new row in a tree that is a grid has as many cells as the head.** With `tree`, grid mode, `onRowAdd` and a `RowDetail`, the placeholder row for a new row counted the expander column the tree leaves out, and stood one cell too wide.
|
|
34
|
+
|
|
35
|
+
- **A tree is never cut into pages.** Where the body computed its rows anew - a column that registers after the hook has run - a tree with a `Pagination` part could be paged; the hook never paged a tree, and the two now agree.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- **`AlarmList`, `alarmModel` and every other export of the alarm model are removed.** An application shows its alerts in a `Table`; the scenario "Work through the alerts" does.
|
|
40
|
+
|
|
41
|
+
- **`footer` on a column and `filter` in the hook's options are gone.** They were the old names of `aggregate` and `preFilter`, deprecated since the rename. A column with `footer="sum"` is `aggregate="sum"`, `useTable(rows, { filter })` is `useTable(rows, { preFilter })`; the old names are no longer read, so they do nothing, and the type `FooterFor` is no longer exported.
|
|
42
|
+
|
|
43
|
+
- **`initialView` is read once, and `t.setView(view)` goes to another view later.** A different `initialView` on a later render used to be applied when its content differed, and a view the table had reported itself, handed back within a second, was told apart by the clock; now it is ignored, as React ignores a changed `defaultValue`. A caller who kept the reported view in state and handed it back (`useState` plus `onViewChange: setView` plus `initialView: view`) writes `const t = useTable(rows, { initialView })` and calls `t.setView(kept)` where it restored; two tables kept in step use `onViewChange: (v) => other.setView(v)` in both directions. `setView` is not reported through `onViewChange`, which reports what the reader did, and a view with the content already shown changes nothing.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 0.16.0 – Rows are copied, and the CSV follows the language (Oct. 2026)
|
|
48
|
+
|
|
49
|
+
Needs `@umriss-ui/core` 0.33; the peer range moves to `^0.33.0`.
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
|
|
53
|
+
- **The unit tests run against React 18.3.1 and 19 in CI**, and the table is rendered to a string with no `window` in a test (`tests-unit/ssr.test.tsx`).
|
|
54
|
+
|
|
55
|
+
- **A snooze's reason is shown in the tip and spoken.** `<AlarmList>` passes the reason `snooze()` stored (trimmed, none when blank) to `availabilitySnoozed`: "Snoozed until 14:00 by M. Weber: valve being replaced". The badge stays one word. Needs `@umriss-ui/core` with the third argument.
|
|
56
|
+
- **Rows that change every second were tested, and what holds is stated in the README**: sort, selection by key, an open Row draft, the Active cell, the scroll position and the virtual window across ticks (`tests-unit/rowsThatKeepArriving.test.tsx`). No fault was found, so no ticket follows; grouping, tree rows and real scroll and focus in a browser are not proved.
|
|
57
|
+
|
|
58
|
+
- **Ctrl or Cmd with C copies the selected rows, or - in grid mode with no selection - the Active cell.** The rows come in the visible columns under a header line, tab-separated, with the export's values and the formats' decimal mark; a screen reader hears "3 rows copied", "Cell copied" or "Could not copy" through core's one voice (`announce`) and not a region of the table's own. What was copied flashes once in an accent tint (held without the fade under reduced motion, the system's selection colours under forced colours). Marked text and a focused field keep the browser's own copy; in an open cell editor with nothing marked in it the key copies the value that stands in the field. `selectionAsText()` on the table hands the same text to a button of your own. Needs `@umriss-ui/core` with `announce`, `copiedRows`, `copiedCell` and `copyFailed`.
|
|
59
|
+
|
|
60
|
+
### Changed
|
|
61
|
+
|
|
62
|
+
- **The CSV follows the language in use (ADR-0061).** With the English defaults the export now has commas between fields, a decimal point and `yes`/`no`; `asCsv()` without a provider returns that text. A German application - wording and formats from `@umriss-ui/core/wording/de` - gets the file it got before, byte for byte. German wording with English formats gets German words with comma and point: take both halves (ADR-0024). The separator is a semicolon wherever the formats' decimal mark is a comma.
|
|
63
|
+
- **Every entry begins with `"use client";`.** The built file `dist/table.js` starts with the directive, then the stylesheet import, so a bundler that splits server from client code takes each as client code. The directive is written to the built entries only; the sources are unchanged.
|
|
64
|
+
|
|
65
|
+
- **Every export is a client component.** A hook called in a Server Component now fails with React's message about a client reference, not one about `useState`.
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- **A sticking group line is no longer covered by the pinned cells of the rows it passes.** With a pinned column and a scrolled body, the line's pinned part - its label, the fold, the checkbox - was painted over by the data rows' pinned cells, and only the part right of the pinned block showed. The line's pinned cells, and a span group's pinned cell, stand one level above them.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
25
73
|
## 0.15.0 – A reason when snoozing (Oct. 2026)
|
|
26
74
|
|
|
27
75
|
Needs `@umriss-ui/core` 0.32; the peer range moves to `^0.32.0`.
|
package/README.md
CHANGED
|
@@ -17,7 +17,12 @@ pnpm add @umriss-ui/table @umriss-ui/core
|
|
|
17
17
|
|
|
18
18
|
`@umriss-ui/core` is a **peer dependency** (ADR-0016): the table reads its
|
|
19
19
|
provider, its formats and its wording, and enters it by the public entry only.
|
|
20
|
-
React 18 or 19 as a peer as well.
|
|
20
|
+
React 18 or 19 as a peer as well; the unit tests run against 18.3 and 19 in CI.
|
|
21
|
+
|
|
22
|
+
Every entry begins with `"use client"`, the directive a framework
|
|
23
|
+
with Server Components reads to treat a module as client code. No test runs
|
|
24
|
+
inside such a framework: the
|
|
25
|
+
table is rendered to a string in a test.
|
|
21
26
|
|
|
22
27
|
## The smallest table that runs
|
|
23
28
|
|
|
@@ -78,8 +83,7 @@ Each line gets a group header with its count and its sum under the Quantity
|
|
|
78
83
|
column; the customers stand beside their orders as a span (ADR-0029). Without
|
|
79
84
|
`defaultGrouping` the user groups from the column menu. `aggregate` takes `sum`,
|
|
80
85
|
`avg`, `min`, `max`, `range`, `count`, `distinct` or a function of one's own, and
|
|
81
|
-
is the footer over the filtered set as well
|
|
82
|
-
and the old name still works for this version.
|
|
86
|
+
is the footer over the filtered set as well.
|
|
83
87
|
|
|
84
88
|
## Styles
|
|
85
89
|
|
|
@@ -120,14 +124,17 @@ stylesheets by hand.
|
|
|
120
124
|
* **Around the table**: toolbar, search, column menu, export, paging — each
|
|
121
125
|
usable inside the table toolbar or anywhere else on the page with `of`, and
|
|
122
126
|
one `size` for the whole bar that a control of one's own can match.
|
|
127
|
+
* **Export and copy follow the language** (ADR-0061): the CSV takes its decimal
|
|
128
|
+
mark from the formats, yes/no from the wording and its separator from the
|
|
129
|
+
mark - English gets commas and a point, `@umriss-ui/core/wording/de` the file
|
|
130
|
+
it always had. Ctrl or Cmd with C copies the selected rows as tab-separated
|
|
131
|
+
text (in grid mode with no selection, the Active cell), says so in a live
|
|
132
|
+
region, and `selectionAsText()` hands the same text to a button of one's own.
|
|
123
133
|
* **On a row**: a detail row that stays open across a change of filter, row
|
|
124
134
|
actions that stay quiet until the row is meant, and a bulk action that always
|
|
125
135
|
receives a list.
|
|
126
136
|
* **For monitoring**: `VerdictColumn` reads a measured value against a
|
|
127
|
-
limit set
|
|
128
|
-
resolved, acknowledged or not. It offers snoozing and reports what the
|
|
129
|
-
operator asked for; the application applies it or refuses. The library
|
|
130
|
-
generates no alarms (ADR-0009).
|
|
137
|
+
limit set. The library generates no alarms.
|
|
131
138
|
* **A million rows on a server**: in server mode (`server: true`, `rowCount`)
|
|
132
139
|
the rows are one page a server answered; the table reports the request -
|
|
133
140
|
search, conditions, sort, page, page size - through `onRequest` once per
|
|
@@ -135,6 +142,18 @@ stylesheets by hand.
|
|
|
135
142
|
* **Twenty thousand rows** where it has to be: virtualisation, sticky parts,
|
|
136
143
|
columns pinned to either side and column widths that survive a view being
|
|
137
144
|
restored.
|
|
145
|
+
* **Rows that change every second** (`tests-unit/rowsThatKeepArriving.test.tsx`):
|
|
146
|
+
`rows` may be a new array each second - values move, a row appears, one goes.
|
|
147
|
+
The sort stays and the rows stand in its order; a row keeps its place in the
|
|
148
|
+
markup by its `rowKey`; the selection holds by key (the count follows the rows
|
|
149
|
+
there are, and a key whose row is gone waits in the set and ticks again if the
|
|
150
|
+
row returns); an open Row draft stays open with what was typed and shows its
|
|
151
|
+
other fields as they were when it opened, and closes only when its row is gone
|
|
152
|
+
from `rows`; the Active cell stays on its row by key when a re-sort moves it,
|
|
153
|
+
and where its row is gone the cell now at its index takes over; the scroll
|
|
154
|
+
position and a `virtual` window stay on the same rows. Real scroll and focus
|
|
155
|
+
under the row motion are not proved (a browser case is open); nor are grouping
|
|
156
|
+
and tree rows.
|
|
138
157
|
* **A grid, on request** (ADR-0034, ADR-0036): `<Table grid>` is one tab stop
|
|
139
158
|
whose Active cell the arrows walk, and a column with `edit` is edited in
|
|
140
159
|
place from the first click - with the core field for its value, a `validate`
|