@umriss-ui/table 0.3.2 → 0.4.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 CHANGED
@@ -22,6 +22,192 @@ is one of the internal numbers from before core's first publication as `0.1.0`
22
22
 
23
23
  ---
24
24
 
25
+ ## 0.4.0 – Grid, server, pinning, availability (Sep. 2026)
26
+
27
+ Needs `@umriss-ui/core` 0.10: it reads the new wording keys and `--u-shadow-sticky`; the peer range moves to `^0.10.0`.
28
+
29
+ ### Added
30
+
31
+ - **Manual mode, for data the browser does not hold**: `useTable(page, {
32
+ manual: true, rowCount, onViewChange })`. The rows are the page a server
33
+ answered and `rowCount` its filtered set; the table searches, filters,
34
+ sorts and pages nothing of its own. `onViewChange(view)` receives a
35
+ `ManualView` - search, conditions, sort, page and page size, always
36
+ present - once when the table first stands and once per change of those
37
+ five (a width or a hidden column fetches nothing). `loading` then lays as
38
+ many placeholders as the page had rows over it, in its rows' height and its
39
+ columns' widths, with `aria-busy`. A list filter offers what
40
+ `filterOptions(column)` names (with a warning in development where it
41
+ names nothing). Keys selected on another page stay selected, and a bulk
42
+ action receives every selected row the table has seen; "select all" selects
43
+ the page and says so ("Select all on this page"). The export writes the
44
+ page, and its button says so ("Export page"). There is no grouping, no
45
+ footer, no pre-filter and no virtualisation in manual mode - each would be
46
+ the page's and not the server's; a grouping asked for is passed over with
47
+ a warning in development. `TableSnapshot` gains `rowCount` and `manual`.
48
+ Without `manual` nothing changes.
49
+ - **Grid mode, on request** (ADR-0034): `<Table grid>` makes the table
50
+ `role="grid"` (`treegrid` when grouped) and one tab stop with an **Active
51
+ cell** - the arrows walk the cells of the head, the rows, group headers,
52
+ folded spans, details and the footer; Home and End go to the row's ends,
53
+ Ctrl+Home and Ctrl+End to the table's, PageUp and PageDown by the rows in
54
+ view. A cell's own controls leave the tab order and are reached with Enter
55
+ or F2 and left with Escape. The Active cell holds on to its row and its
56
+ column: it follows a sort, stands where a filtered row stood, and walks to
57
+ rows a virtual window has not rendered. Without `grid` nothing changes.
58
+ - **Editing in place**: `edit` on a column - `"text"`, `"number"`,
59
+ `"select"` (over `editOptions`, or the values that occur), `"date"`, or an
60
+ editor of one's own receiving `CellEditorProps` - gives it the core field
61
+ for its value. Enter, F2 or typing starts an edit, Enter commits, Escape
62
+ cancels, Tab commits and moves on to the next cell that edits; a picked day
63
+ commits at once. `validate(value, row)` keeps a draft that does not pass
64
+ open, its message beneath the field. The table applies nothing:
65
+ `onCellEdit({ rowKey, columnId, value, row })` on `<Table>` reports, and the
66
+ cell shows the value once the rows carry it. New types `CellEdit`,
67
+ `CellEditorProps`, `EditFor`, `EditOptions`.
68
+ - **The Windows contrast mode** (`forced-colors: active`, forced-colors 03).
69
+ A selected row keeps its selection as lines in the system's selection colour
70
+ and a focused virtual row its ring as lines in the text colour, both drawn
71
+ inside the cells, where the sticky cells cannot paint over them; the frame,
72
+ the panels and every focus ring keep an outline where the box-shadow stood,
73
+ and a group's share bar a system colour. Nothing changes outside forced
74
+ colours.
75
+ - **`docs/llms-full.md`**, the package's documentation as one Markdown file for
76
+ a coding agent, in the npm package and pinned to its version: every demo page
77
+ with its import line, its examples' source, its props tables and why it is
78
+ built as it is, and the declaration of every other export. The same text
79
+ stands online as <https://romanhaendler.github.io/umriss-ui/table/llms-full.txt>,
80
+ with an index of the pages beside it (`llms.txt`).
81
+ - **Availability, the second field beside the lifecycle** (ISA-18.2's special
82
+ states): `availability?: "in-service" | "shelved" | "suppressed-by-design" |
83
+ "out-of-service"` on `Alarm`, never merged into the four lifecycle values.
84
+ Without a statement an alarm is in service, so existing alarms read as
85
+ before. A shelved alarm carries `shelf: { until, by }` - and cannot be
86
+ written without it.
87
+ - **Four pure transitions**, one alarm in and one out, performed by the
88
+ application: `shelve(alarm, until, by)`, `unshelve`, `takeOutOfService`,
89
+ `returnToService`. One that does not apply returns the same object. A shelf
90
+ never overwrites out of service or suppressed by design, and taking out of
91
+ service never overwrites suppressed by design - the plant's logic owns it.
92
+ - **`availabilityAt(alarm, asOf)`**: a shelf that has reached its end is in
93
+ service again at the as-of time - by the model's clock, not by a timer.
94
+ `AlarmRow.availability` carries that value.
95
+ - **`isHiddenFromOperation`, `AVAILABILITIES`, the types `Availability` and
96
+ `Shelf`**, and on the projection **`hiddenFromOperation`**: how many of the
97
+ filtered set are hidden. The model still removes nothing.
98
+ - **An `availability` column** in `alarmColumns` / `ALARM_COLUMNS` (its label
99
+ from `wording.columnAvailability`), valued by rank like the priority.
100
+ - **`<AlarmList>` shows what is hidden from operation**: the row stays,
101
+ drawn neutrally - no edge, the priority a word without its colour, the type
102
+ muted - with its availability as a word before its lifecycle ("Shelved until
103
+ 11:10 by M. Keller"). The bar counts them ("Hidden from operation: 3").
104
+ - **`hiddenOnly` and `onHiddenOnlyChange` on `<AlarmList>`**: with the
105
+ handler the count becomes a switch for the view; the application filters
106
+ with the table's own `filter` and `isHiddenFromOperation`. The switch stays
107
+ while the view is on, even at zero.
108
+ - **Any column can be pinned**: `pin="start"` or `pin="end"` on a `Column` or
109
+ a `VerdictColumn` keeps it in view while the table scrolls sideways, in a
110
+ block before or after every other column. The selection and the expander
111
+ stick with the start block (and a group span with them), the row actions
112
+ with the end block; a group header's label and aggregates stick in their
113
+ blocks, and virtual rows pin like any other. A shadow on a block's inner
114
+ edge shows only while content lies under it.
115
+ - **`t.pinned` and `t.setPin(column, "start" | "end" | null)`**, and
116
+ **`pinned` in the view**: the user's choice, whole, once it deviates from
117
+ what the columns declare (`{}` when every declared pin was undone). A view
118
+ handed in as `initialView` restores it.
119
+ - **The column menu pins**: two keys per column, "Pin to start" and "Pin to
120
+ end"; the key of the side a column is pinned to stands in the accent and
121
+ reads "Unpin". The focus stays on the key that was pressed while the entry
122
+ moves to its block.
123
+
124
+ ### Changed
125
+
126
+ - **`stickyRowHeader` is `pin="start"` on the row header.** It looks as
127
+ before; the difference is that the row header can now be unpinned (with
128
+ `setPin`) and share its block with other pinned columns. The sticky offsets
129
+ are measured from the head row instead of assumed from the 34 px of a
130
+ control cell, so a control cell that grows no longer slides under the row
131
+ header.
132
+ - **In the column menu a column moves only inside its block** (start, the
133
+ unpinned ones, end). Before, only the sticky row header was held in place.
134
+
135
+ - **`DEFAULT_ORDER` begins with availability**: in service above hidden, then
136
+ priority, acknowledgement and time as before. Only alarms with an
137
+ availability of their own move.
138
+ - **`standingUnacknowledged` counts only alarms in service.** The live figure
139
+ calls somebody over; it must not call them to a shelved alarm.
140
+ - **A done alarm's row (`keepDone`) is muted as it always claimed to be.**
141
+ Its colour stood on the row, and the table's cells set their own; it now
142
+ stands on the cells.
143
+ - **Final polish of pinning, grid mode and the alarm list** (table-column-pinning
144
+ 03, table-grid-mode 05, alarm-standards 05):
145
+ - The shadow of a pinned block and of a stuck group header comes from core's
146
+ `--u-shadow-sticky`: dark as a shadow in the dark theme, no longer a glow.
147
+ - A group header draws its top line inside its cells in every table, as a
148
+ table with pinned columns already did - one drawing, one look.
149
+ - In grid mode the open editor lies over its cell at the cell's size, and
150
+ the message of a draft that does not validate hangs beneath it in a
151
+ popover (core `Popover`); nothing in the table shifts while editing.
152
+ - The scroll area carries a `scroll-padding` of the sticky head's height and
153
+ the pinned blocks' widths, so a cell the keys walk to is scrolled clear of
154
+ them; a pinned cell's own scroll target is shifted out of that padding, so
155
+ focusing it does not scroll the table back.
156
+ - Space in a grid with selection selects or deselects the Active cell's row,
157
+ from any of its cells (as AG Grid and MUI do); without selection it does
158
+ nothing - it no longer starts a text edit either.
159
+ - In a grid with an editable column every cell that does not edit carries
160
+ `aria-readonly="true"`.
161
+ - `AlarmList` shows the availability as a small neutral badge before the
162
+ lifecycle state; until when and by whom stand in its tooltip and are
163
+ spoken with it. The state keeps to one line. A shelf that ends on another
164
+ day than the as-of time shows its date beside the time. The "Hidden from
165
+ operation" switch's label is in the live figure's size.
166
+ - **`Alarm` is a type, no longer an interface** - the union with the shelf
167
+ needs it. `Partial<Alarm>` spread into an `Alarm` no longer compiles; name
168
+ the fields you mean (`Pick<Alarm, "cleared" | "acknowledgedAt">`).
169
+
170
+ ### Fixed
171
+
172
+ - **A table's rounded corner stays whole** under a sticky head or pinned
173
+ cells: the scroll area carries the frame's radius and clips to it.
174
+ - **A group header whose first column carries an aggregate keeps its
175
+ aggregates under their columns.** Grouped by one level, its label stood in a
176
+ cell over no column, which a browser counts as one, and every aggregate
177
+ stood a column too far right. The label now takes the first column's place
178
+ in the header; its sum stays in the footer.
179
+
180
+ ---
181
+
182
+ ## 0.3.3 – Depth work on the table (Sep. 2026)
183
+
184
+ Needs `@umriss-ui/core` 0.9: it reads `--u-tracking-figures`; the peer range moves to `^0.9.0`.
185
+
186
+ ### Changed
187
+
188
+ - **Every head reads the same way: label, arrow, funnel.** A numeric head
189
+ mirrored that order, so its arrow and funnel stood before the label - and
190
+ its funnel beside the funnel of the column before. The group now keeps the
191
+ order in every column and stands flush right in a numeric one, ending where
192
+ the figures end.
193
+ - **A selected row carries core's `--u-color-accent-subtle`**, a step deeper
194
+ under the pointer. Before, only the checkbox said a row was selected.
195
+ - **The head follows `density="compact"`.** Its padding shrank with the rows'
196
+ and it stood half again as tall as a row below it.
197
+ - **The head is 1 to 3 px lower in every table**: the sort key sits at the top
198
+ of its cell instead of on the baseline of its label.
199
+
200
+ ### Fixed
201
+
202
+ - **A numeric head's label stands on the line of its neighbours'**; it stood
203
+ 1.13 px higher.
204
+ - **A focused virtual row shows its ring all round.** The sticky selection and
205
+ row-header cells painted over it; the cells now draw it themselves.
206
+ - **A loading placeholder stands where its value will**: right in a numeric
207
+ column.
208
+
209
+ ---
210
+
25
211
  ## 0.3.2 – Core 0.8.0: the canon of states (Sep. 2026)
26
212
 
27
213
  Needs `@umriss-ui/core` 0.8: it reads core's pressed surfaces and motion tokens; the peer range moves to `^0.8.0`.
package/README.md CHANGED
@@ -111,8 +111,18 @@ stylesheets by hand.
111
111
  * **For producing plants**: `VerdictColumn` reads a measured value against a
112
112
  limit set, and `AlarmList` shows alarms with a lifecycle — standing or
113
113
  cleared, acknowledged or not. The library generates no alarms (ADR-0009).
114
- * **Twenty thousand rows** where it has to be: virtualisation, sticky parts and
115
- column widths that survive a view being restored.
114
+ * **A million rows on a server**: in manual mode the rows are one page a server
115
+ answered; the table reports the view - search, conditions, sort, page -
116
+ once per change and shows placeholders over the previous page while the
117
+ next is on its way.
118
+ * **Twenty thousand rows** where it has to be: virtualisation, sticky parts,
119
+ columns pinned to either side and column widths that survive a view being
120
+ restored.
121
+ * **A grid, on request** (ADR-0034): `<Table grid>` is one tab stop whose
122
+ Active cell the arrows walk, and a column with `edit` is edited in place -
123
+ with the core field for its value, a `validate` that keeps a wrong draft
124
+ open, and `onCellEdit` reporting what the application applies. Without
125
+ `grid` the table stays a native table.
116
126
 
117
127
  ## More
118
128
 
@@ -121,6 +131,11 @@ stylesheets by hand.
121
131
  shows running examples with their source and the props table generated from
122
132
  `src/`.
123
133
  * [`CHANGELOG.md`](CHANGELOG.md) — what changes for a caller.
134
+ * **For a coding agent**: `docs/llms-full.md` inside the installed package —
135
+ the demo as one Markdown file, pinned to the installed version: every page
136
+ with its examples' source, its props tables and why it is built as it is,
137
+ and the declaration of every other export. Online, for the latest version:
138
+ <https://romanhaendler.github.io/umriss-ui/table/llms.txt>.
124
139
  * [`../../docs/design-language.md`](../../docs/design-language.md) — the design
125
140
  language all five packages share.
126
141
  * [`../core/README.md`](../core/README.md) — the component library underneath.