@umriss-ui/table 0.14.0 → 0.16.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/docs/llms-full.md CHANGED
@@ -1,4 +1,4 @@
1
- # @umriss-ui/table 0.14.0
1
+ # @umriss-ui/table 0.16.0
2
2
 
3
3
  > React data table for data-dense applications - sorting, filtering, grouping, aggregates, virtualisation. Declared the way it reads: columns as JSX, typed against their rows.
4
4
 
@@ -1268,7 +1268,7 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
1268
1268
 
1269
1269
  | Prop | Type | Default | Description |
1270
1270
  |---|---|---|---|
1271
- | `selectable` | `boolean` | — | Adds the selection column. "All" means: the filtered set.<br>Shown in: [Name the row (Column)](#/column/row-header), [Pin columns to both sides (Width and pinning)](#/width-and-pinning/pinned-both-sides), [Keep the header and the names in view (Width and pinning)](#/width-and-pinning/sticky-parts) and 12 more |
1271
+ | `selectable` | `boolean` | — | Adds the selection column. "All" means: the filtered set.<br>Shown in: [Name the row (Column)](#/column/row-header), [Pin columns to both sides (Width and pinning)](#/width-and-pinning/pinned-both-sides), [Keep the header and the names in view (Width and pinning)](#/width-and-pinning/sticky-parts) and 13 more |
1272
1272
  | `stickyHeader` | `boolean` | — | Keeps the header row visible while scrolling.<br>Shown in: [Keep the header and the names in view (Width and pinning)](#/width-and-pinning/sticky-parts), [Fold groups into a summary (Grouping)](#/grouping/the-overview), [Group twenty thousand rows (Grouping)](#/grouping/twenty-thousand-rows) and 3 more |
1273
1273
  | `stickyRowHeader` | `boolean` | — | Keeps the row header column visible while scrolling sideways - the same as `pin="start"` on the row header.<br>Shown in: [Keep the header and the names in view (Width and pinning)](#/width-and-pinning/sticky-parts), [Stripes across a wide table (Row appearance)](#/row-appearance/stripes-across-a-wide-table), [Show, hide and arrange (ColumnMenu)](#/columnmenu/show-hide-and-arrange) and 1 more |
1274
1274
  | `striped` | `boolean` | — | Discreet zebra stripes.<br>Shown in: [Stripes across a wide table (Row appearance)](#/row-appearance/stripes-across-a-wide-table) |
@@ -1281,7 +1281,7 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
1281
1281
  | `grid` | `boolean` | — | Grid mode: the table is one tab stop, and the arrows walk its cells - Home and End in the row, Ctrl+Home and Ctrl+End to the table's ends, PageUp and PageDown by the rows in view. A cell's own controls are reached with Enter or F2 and left with Escape; a column with `edit` is edited in place. Without it the table stays a native table.<br>Shown in: [Work cell by cell (Grid mode)](#/grid-mode/grid-mode), [Combine grid mode with groups, pinning and many rows (Grid mode)](#/grid-mode/the-whole-grid), [Edit a comments column (Edits)](#/edits/comments-column) and 6 more |
1282
1282
  | `editMode` | `"cell" \| "row"` | — | Grid mode ([ADR-0036](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0036-a-grid-edits-on-the-first-click-and-saves-rows-on-purpose.md)): `"cell"` reports every cell as it is left (`onCellEdit`); `"row"` opens every cell of a row that edits at once, as one **Row draft**, and reports it only when the row is saved on purpose (`onRowSave`) - by its Save button or Enter; Escape or Discard drops it. A row with a draft is left only by saving or discarding it.<br>Shown in: [Save a row on purpose (Edits)](#/edits/save-a-row-on-purpose), [Check a whole row before it is saved (Edits)](#/edits/check-a-whole-row), [Keep a list: add, change and delete rows (Edits)](#/edits/keep-a-list) and 1 more |
1283
1283
  | `newRow` | `() => Partial<Z>` | — | What a new row starts with - the values the columns read before anything is typed. Without it, nothing.<br>Shown in: [Keep a list: add, change and delete rows (Edits)](#/edits/keep-a-list) |
1284
- | `children` | `ReactNode` | — | Columns, `RowDetail`, `RowActions` and the unbound parts.<br>Shown in: [Show a list of services](#/first-table/first-table), [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) and 115 more |
1284
+ | `children` | `ReactNode` | — | Columns, `RowDetail`, `RowActions` and the unbound parts.<br>Shown in: [Show a list of services](#/first-table/first-table), [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) and 116 more |
1285
1285
 
1286
1286
  ###### Events
1287
1287
 
@@ -1296,7 +1296,7 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
1296
1296
 
1297
1297
  | Prop | Type | Default | Description |
1298
1298
  |---|---|---|---|
1299
- | `ariaLabel` | `string` | — | Accessible name of the table (not of the outer frame).<br>Shown in: [Show a list of services](#/first-table/first-table), [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) and 115 more |
1299
+ | `ariaLabel` | `string` | — | Accessible name of the table (not of the outer frame).<br>Shown in: [Show a list of services](#/first-table/first-table), [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) and 116 more |
1300
1300
 
1301
1301
  ###### Styling
1302
1302
 
@@ -1308,7 +1308,7 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
1308
1308
 
1309
1309
  | Prop | Type | Default | Description |
1310
1310
  |---|---|---|---|
1311
- | `rowKey` *required* | `(row: Z) => string` | — | A stable key per row – the basis of selection and expansion.<br>Shown in: [Show a list of services](#/first-table/first-table), [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) and 115 more |
1311
+ | `rowKey` *required* | `(row: Z) => string` | — | A stable key per row – the basis of selection and expansion.<br>Shown in: [Show a list of services](#/first-table/first-table), [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) and 116 more |
1312
1312
  | `pageSize` | `number` | `10` | How many rows a page holds.<br>Shown in: [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own), [Ask a question over several fields (Filter)](#/filter/a-question-over-several-fields), [Restrict which rows a table has (Pre-filter)](#/pre-filter/pre-filter) and 6 more |
1313
1313
  | `defaultSort` | [`SortLevel`](#type-SortLevel)` \| readonly `[`SortLevel`](#type-SortLevel)`[] \| null` | `null` | The application's sort; it is the default that `view` leaves out.<br>Shown in: [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own), [A label wider than its column (Width and pinning)](#/width-and-pinning/a-label-wider-than-its-column), [Sort by several columns (Sorting)](#/sorting/sort-by-several-columns) and 9 more |
1314
1314
  | `defaultGrouping` | [`GroupingId`](#type-GroupingId)`<Z> \| readonly `[`GroupingId`](#type-GroupingId)`<Z>[]` | ungrouped, until the user groups | The application's grouping: a column or group key, or up to three, the outermost first. It is the default that `view` leaves out.<br>Shown in: [Group by one column (Grouping)](#/grouping/one-level), [Group on two levels (Grouping)](#/grouping/two-levels), [Group on three levels (Grouping)](#/grouping/three-levels) and 22 more |
@@ -1354,7 +1354,7 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
1354
1354
  | `filter` *required* | `Readonly<Record<string, unknown>>` | — | The conditions of the column filters and row filters by id, in the order in which they were set. Whatever fits no column and no row filter is absent.<br>Shown in: [Set a condition from outside the table (Filter)](#/filter/conditions-from-outside) |
1355
1355
  | `setFilter` *required* | [`SetFilter`](#type-SetFilter)`<Z>` | — | Sets the condition of a column filter or a row filter; `null` clears it. Back to page one. A condition that does not fit the kind of the filter – a range on a list filter, a column without a filter, a row filter not in `rowFilters` – is passed over with a warning in development.<br>Shown in: [Set a condition from outside the table (Filter)](#/filter/conditions-from-outside), [Filter by a field no column shows (Filter)](#/filter/a-field-no-column-shows), [Rows from a request (Filter)](#/filter/rows-from-a-request) and 5 more |
1356
1356
  | `conditionOf` *required* | `<B>(filter: `[`RowFilter`](#/filter/type-RowFilter)`<Z, B>) => B \| null` | — | The condition of a row filter, as its type - `null` while it is lifted.<br>Shown in: [Filter by a field no column shows (Filter)](#/filter/a-field-no-column-shows), [Rows from a request (Filter)](#/filter/rows-from-a-request), [Ask a question over several fields (Filter)](#/filter/a-question-over-several-fields) and 3 more |
1357
- | `selection` *required* | [`TableSelection`](#type-TableSelection)`<string>` | — | The selection – its own or the one handed in through `selection`.<br>Shown in: [Select rows (Selection)](#/selection/selection), [Scroll twenty thousand rows (Virtualisation)](#/virtualisation/virtualisation), [Load pages from a server (Server mode)](#/server-mode/a-million-rows-on-a-server) and 1 more |
1357
+ | `selection` *required* | [`TableSelection`](#type-TableSelection)`<string>` | — | The selection – its own or the one handed in through `selection`.<br>Shown in: [Select rows (Selection)](#/selection/selection), [Copy the selection (Export)](#/export/copy-the-selection), [Scroll twenty thousand rows (Virtualisation)](#/virtualisation/virtualisation) and 2 more |
1358
1358
  | `grouping` *required* | `readonly string[]` | — | The ids the table is grouped by, the outermost first – only those a groupable column or a group key carries, at most three.<br>Shown in: [Group and fold from controls of your own (Grouping)](#/grouping/group-and-fold-from-controls-of-your-own) |
1359
1359
  | `setGrouping` *required* | `(grouping: readonly string[]) => void` | — | Groups by these columns or group keys; `[]` ungroups. Back to page one.<br>Shown in: [Group and fold from controls of your own (Grouping)](#/grouping/group-and-fold-from-controls-of-your-own) |
1360
1360
  | `folded` *required* | `readonly string[]` | — | The paths of the folded groups that still occur.<br>Shown in: [Group and fold from controls of your own (Grouping)](#/grouping/group-and-fold-from-controls-of-your-own) |
@@ -1367,6 +1367,7 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
1367
1367
  | `foldAllBranches` *required* | `() => void` | — | Tree rows: closes every branch.<br>Shown in: [Open branches from controls of your own (Tree rows)](#/tree-rows/open-branches-from-controls-of-your-own) |
1368
1368
  | `view` *required* | [`TableView`](#type-TableView) | — | The part of the state an application can keep; whatever still stands as the options set it up is absent.<br>Shown in: [Set a condition from outside the table (Filter)](#/filter/conditions-from-outside), [Fold groups into a summary (Grouping)](#/grouping/the-overview), [Keep and restore a view (View)](#/view/initial-view) |
1369
1369
  | `asCsv` *required* | `() => string` | — | The filtered set in the visible columns as text for a spreadsheet - in server mode the page.<br>Shown in: [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) |
1370
+ | `selectionAsText` *required* | `() => string` | — | The selected rows within the filtered set as tab-separated text under a header line - the text Ctrl+C writes. `""` with nothing selected.<br>Shown in: [Copy the selection (Export)](#/export/copy-the-selection) |
1370
1371
  | `virtual` *required* | `boolean` | — | Whether it virtualises.<br>Shown in: [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own) |
1371
1372
  | `rowCount` *required* | `number` | — | How many rows the filtered set has - in server mode the server's count.<br>Shown in: [Search and page from a header of your own](#/first-table/search-and-page-from-a-header-of-your-own) |
1372
1373
  | `server` *required* | `boolean` | — | Whether it is in server mode: the rows are one page of a server's.<br>Shown in: [Sort, arrange and export from controls of your own](#/first-table/sort-arrange-and-export-from-controls-of-your-own) |
@@ -1475,10 +1476,10 @@ selection.
1475
1476
  | `isSelected` *required* | `(id: T) => boolean` | — | <br>Shown in: [Select rows (Selection)](#/selection/selection), [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself) |
1476
1477
  | `toggle` *required* | `(id: T) => void` | — | <br>Shown in: [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself) |
1477
1478
  | `toggleAll` *required* | `() => void` | — | Selects all the keys passed in - or, when all of them are selected already, deselects them. Keys outside them stay as they are. |
1478
- | `clear` *required* | `() => void` | — | <br>Shown in: [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Snooze and hide (AlarmList)](#/alarmlist/snooze-and-hide) and 3 more |
1479
+ | `clear` *required* | `() => void` | — | <br>Shown in: [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Snooze and hide (AlarmList)](#/alarmlist/snooze-and-hide) and 4 more |
1479
1480
  | `allSelected` *required* | `boolean` | — | true when every key passed in is selected. |
1480
1481
  | `someSelected` *required* | `boolean` | — | true when some - but not all - are selected. |
1481
- | `count` *required* | `number` | — | <br>Shown in: [Select rows (Selection)](#/selection/selection), [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself), [Scroll twenty thousand rows (Virtualisation)](#/virtualisation/virtualisation) and 1 more |
1482
+ | `count` *required* | `number` | — | <br>Shown in: [Select rows (Selection)](#/selection/selection), [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself), [Copy the selection (Export)](#/export/copy-the-selection) and 2 more |
1482
1483
 
1483
1484
  ###### `Pin`
1484
1485
 
@@ -1886,7 +1887,7 @@ The `label` is the column header's text, and so what a screen reader says for ev
1886
1887
 
1887
1888
  | Prop | Type | Default | Description |
1888
1889
  |---|---|---|---|
1889
- | `value` *required* | `K` | — | A field of the row. Supplies the column's `id` at the same time.<br>Shown in: [Read a value from a field](#/column/value-from-field), [Compute a value from the row](#/column/computed-value), [Let the value type decide](#/column/defaults) and 115 more |
1890
+ | `value` *required* | `K` | — | A field of the row. Supplies the column's `id` at the same time.<br>Shown in: [Read a value from a field](#/column/value-from-field), [Compute a value from the row](#/column/computed-value), [Let the value type decide](#/column/defaults) and 116 more |
1890
1891
  | `id` | `string` | — | An id of one's own instead of the field name – for two columns over the same field.<br>Shown in: [Pick a standard format (Formats)](#/formats/format), [Share a column between tables (Presets)](#/presets/presets) |
1891
1892
  | `format` | [`FormatFor`](#type-FormatFor)`<Z[K]>` | — | A standard presentation by name: `"percent"`, `"count"` or `{ decimals }` for numbers, `"date"`, `"time"` or `"dateTime"` for points in time. Alignment, sorting, export and footer stay with the value.<br>Shown in: [Compute a value from the row](#/column/computed-value), [Set wording and formats once (Provider)](#/provider/provider), [Pick a standard format (Formats)](#/formats/format) and 33 more |
1892
1893
  | `filter` | [`FilterFor`](#type-FilterFor)`<Z[K]>` | — | A filter in the column header: `"list"` offers the values that occur, `"range"` two bounds (numbers or points in time), a filter from `columnFilter` asks whatever it asks itself. Its condition stands in the table toolbar.<br>Shown in: [A label wider than its column (Width and pinning)](#/width-and-pinning/a-label-wider-than-its-column), [Share a column between tables (Presets)](#/presets/presets), [Choose from the values that occur (Filter)](#/filter/list-filter) and 11 more |
@@ -1905,8 +1906,8 @@ Also every prop of `ColumnBase` and `ValuePaths`.
1905
1906
 
1906
1907
  | Prop | Type | Default | Description |
1907
1908
  |---|---|---|---|
1908
- | `label` *required* | `string` | — | Names the column in its header, in the column menu and in the header row of the export.<br>Shown in: [Read a value from a field](#/column/value-from-field), [Compute a value from the row](#/column/computed-value), [Let the value type decide](#/column/defaults) and 115 more |
1909
- | `rowHeader` | `boolean` | — | This column names the row: row header cells, never hideable, the column `stickyRowHeader` pins, and the name by which the row's selection, expander and actions are read out. At most one per table.<br>Shown in: [Read a value from a field](#/column/value-from-field), [Compute a value from the row](#/column/computed-value), [Let the value type decide](#/column/defaults) and 114 more |
1909
+ | `label` *required* | `string` | — | Names the column in its header, in the column menu and in the header row of the export.<br>Shown in: [Read a value from a field](#/column/value-from-field), [Compute a value from the row](#/column/computed-value), [Let the value type decide](#/column/defaults) and 116 more |
1910
+ | `rowHeader` | `boolean` | — | This column names the row: row header cells, never hideable, the column `stickyRowHeader` pins, and the name by which the row's selection, expander and actions are read out. At most one per table.<br>Shown in: [Read a value from a field](#/column/value-from-field), [Compute a value from the row](#/column/computed-value), [Let the value type decide](#/column/defaults) and 115 more |
1910
1911
  | `numeric` | `boolean` | decided by the first value present | Right-aligned with tabular figures.<br>Shown in: [Share a column between tables (Presets)](#/presets/presets) |
1911
1912
  | `width` | `number` | the browser's | Initial width in pixels.<br>Shown in: [Fit long values (Formats)](#/formats/long-values), [Fit what does not fit (Formats)](#/formats/values-that-do-not-fit), [Let people set the width (Width and pinning)](#/width-and-pinning/width) and 14 more |
1912
1913
  | `resizable` | `boolean` | — | Shows the drag grip on the header cell.<br>Shown in: [Let people set the width (Width and pinning)](#/width-and-pinning/width), [Pin and size from controls of your own (Width and pinning)](#/width-and-pinning/pin-and-size-from-controls-of-your-own), [Share a column between tables (Presets)](#/presets/presets) and 1 more |
@@ -8850,10 +8851,12 @@ import { Export } from "@umriss-ui/table";
8850
8851
 
8851
8852
  Demo page: https://romanhaendler.github.io/umriss-ui/table/export/
8852
8853
 
8853
- It writes the filtered set across all pages, in the visible columns, in the order and sorting on screen – and the values, not their presentation: numbers with a decimal comma, a point in time as a timestamp, an absent value as an empty field. Fields are separated by semicolons, and a byte order mark tells the spreadsheet it is UTF-8.
8854
+ It writes the filtered set across all pages, in the visible columns, in the order and sorting on screen – and the values, not their presentation: numbers with the decimal mark of the formats, yes and no from the wording, a point in time as a timestamp, an absent value as an empty field. The separator follows the mark – a comma, or a semicolon where the mark is a comma – and a byte order mark tells the spreadsheet it is UTF-8. English gets commas and a point; the German wording and formats from `@umriss-ui/core/wording/de` get the file the table always wrote, and German wording with English formats gets German words with comma and point – take both halves ([ADR-0061](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0061-the-csv-follows-the-language-in-use.md)).
8854
8855
 
8855
8856
  A verdict column exports its value, not the verdict. In [server mode](#/server-mode) the table holds one page of the server's, so it exports that page, and the button says so. The same text is `t.asCsv()`, without a button.
8856
8857
 
8858
+ Ctrl or Cmd with C copies the selected rows – the visible columns under a header line, tab-separated, with the same values and the formats' decimal mark – and in a grid with no selection the Active cell. What was copied flashes once in an accent tint (shown without the fade under reduced motion), and a screen reader is told how many rows were copied, or that the copy failed. Marked text and a focused field keep the browser's own copy; in an open cell editor with nothing marked the key copies the value that stands in the field. `t.selectionAsText()` is the same text for a button of your own, as in the last example.
8859
+
8857
8860
  #### Examples
8858
8861
 
8859
8862
  ##### Download a file
@@ -8939,6 +8942,50 @@ export default function TakeTheText() {
8939
8942
  }
8940
8943
  ```
8941
8944
 
8945
+ ##### Copy the selection
8946
+
8947
+ Ctrl or Cmd with C copies the selected rows, tab-separated under a header line, and they flash once; `selectionAsText()` hands the same text to a button of your own.
8948
+
8949
+ ```tsx
8950
+ import { Button, Stack, Text } from "@umriss-ui/core";
8951
+ import { useTable } from "@umriss-ui/table";
8952
+
8953
+ interface Shipment {
8954
+ id: string;
8955
+ customer: string;
8956
+ weight: number;
8957
+ }
8958
+
8959
+ const SHIPMENTS: Shipment[] = [
8960
+ { id: "FP-1004210", customer: "Holloway Garden Supplies", weight: 23.5 },
8961
+ { id: "FP-1004223", customer: "Northgate Florists", weight: 41.25 },
8962
+ { id: "FP-1004236", customer: "Pellham Hardware", weight: 4 },
8963
+ ];
8964
+
8965
+ export default function CopyTheSelection() {
8966
+ const t = useTable(SHIPMENTS, { rowKey: (s) => s.id });
8967
+ const { Table, Column } = t;
8968
+
8969
+ return (
8970
+ <Stack gap={3}>
8971
+ <Stack direction="row" gap={2} align="center">
8972
+ <Button size="sm" variant="secondary" onClick={() => void navigator.clipboard.writeText(t.selectionAsText())} disabled={t.selection.count === 0}>
8973
+ Copy as table
8974
+ </Button>
8975
+ <Text size="xs" tone="muted">
8976
+ {t.selection.count} selected
8977
+ </Text>
8978
+ </Stack>
8979
+ <Table selectable ariaLabel="Shipments to copy">
8980
+ <Column value="id" label="Shipment" rowHeader />
8981
+ <Column value="customer" label="Customer" />
8982
+ <Column value="weight" label="Weight (kg)" />
8983
+ </Table>
8984
+ </Stack>
8985
+ );
8986
+ }
8987
+ ```
8988
+
8942
8989
  #### Keyboard
8943
8990
 
8944
8991
  The keys of [First table](#/first-table/keyboard-first-table), [Input](https://romanhaendler.github.io/umriss-ui/core/input/#keyboard-input) and [Button](https://romanhaendler.github.io/umriss-ui/core/button/#keyboard-button) apply here.
@@ -10744,6 +10791,7 @@ export default function TheWholeGrid() {
10744
10791
  | `Click` | Opens the editor of a cell that edits; a select shows its list, a day its calendar. |
10745
10792
  | `Enter / F2` | Starts an edit, or reaches the cell's own controls. |
10746
10793
  | `Escape` | Cancels an edit, or goes back from a control to its cell. |
10794
+ | `Ctrl / Cmd + C` | Copies the selected rows, or the active cell; its cell flashes. In an open editor with nothing marked it copies the field's value. |
10747
10795
  | `Space` | Selects the row of the active cell. |
10748
10796
 
10749
10797
  #### Props on this page
@@ -11554,9 +11602,9 @@ Demo page: https://romanhaendler.github.io/umriss-ui/table/alarmlist/
11554
11602
 
11555
11603
  The library receives alerts and raises none ([ADR-0009](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0009-the-library-owns-a-lifecycle-not-a-generation.md)). [`alarmModel`](#/api/alarmModel) turns them into a sorted view – priority, then acknowledgement, then time – and the list shows it; your application applies the transitions ([`acknowledge`](#/api/acknowledge), [`snooze`](#/api/snooze), [`unsnooze`](#/api/unsnooze), [`disable`](#/api/disable), [`enable`](#/api/enable)) to its own state. The lifecycle is one field with four values, active or resolved × acknowledged or not, so an alert that came and went unseen stays until someone acknowledges it.
11556
11604
 
11557
- Availability is a second field: snoozed by a person, with an end and a name; suppressed by the application's logic; or disabled. A hidden alert keeps its lifecycle, stays in the list drawn neutral with its state as a word, and is counted; a snooze ends by the model's clock, with no timer. A flood is marked, never thinned out.
11605
+ Availability is a second field: snoozed by a person, with an end and a name, and the reason when it has one, all in the badge's tip and in what is spoken; suppressed by the application's logic; or disabled. A hidden alert keeps its lifecycle, stays in the list drawn neutral with its state as a word, and is counted; a snooze ends by the model's clock, with no timer. A flood is marked, never thinned out.
11558
11606
 
11559
- The live region announces one number, the active unacknowledged alerts, not each arrival. With `onSnooze` and `snoozeDurations` the list offers snoozing beside “Acknowledge”, and with `onUnsnooze` the ending of a snooze: it reports what the operator asked for and snoozes nothing - your application calls `snooze()` or refuses. The durations are yours; there is no default list. A filter by state or priority is the projection's `filter`, fed by controls of your own. The terms follow ISA-18.2; `docs/standards.md` maps each to its name here.
11607
+ The live region announces one number, the active unacknowledged alerts, not each arrival. With `onSnooze` and `snoozeDurations` the list offers snoozing beside “Acknowledge” (with `snoozeReason`, as a small panel that also asks for a reason, passed on as a third argument), and with `onUnsnooze` the ending of a snooze: it reports what the operator asked for and snoozes nothing - your application calls `snooze()` or refuses. The durations are yours; there is no default list. A filter by state or priority is the projection's `filter`, fed by controls of your own. The terms follow ISA-18.2; `docs/standards.md` maps each to its name here.
11560
11608
 
11561
11609
  #### Examples
11562
11610
 
@@ -11933,6 +11981,58 @@ export default function FilterByStateAndPriority() {
11933
11981
  }
11934
11982
  ```
11935
11983
 
11984
+ ##### Ask for a reason when snoozing
11985
+
11986
+ Pass `snoozeReason` and “Snooze” opens a small panel instead of the menu: the durations, a field for the reason, and a button that reports. With `"required"` the button waits for text; your application stores the reason with `snooze()`, and the list shows it in the snoozed badge's tip and in what is spoken.
11987
+
11988
+ ```tsx
11989
+ import { useMemo, useState } from "react";
11990
+ import { AlarmList, alarmModel, snooze, useTableSelection } from "@umriss-ui/table";
11991
+ import type { Alarm, AlarmType } from "@umriss-ui/table";
11992
+
11993
+ /* Data from the operations world, written out here so the example runs on its own. */
11994
+ const at = (day: number, hours: number, minutes = 0) => new Date(2026, 2, day, hours, minutes).getTime();
11995
+
11996
+ /** Tuesday, 17 March 2026, 10:30 - the moment the screens are read at. */
11997
+ const NOW = at(17, 10, 30);
11998
+
11999
+ const ALERT_TYPES: readonly AlarmType[] = [
12000
+ { id: "checkout-latency", label: "Checkout · p95 latency above 300 ms", priority: "high" },
12001
+ { id: "webhooks-queue", label: "Webhooks · queue older than 5 min", priority: "medium" },
12002
+ { id: "images-disk", label: "Image service · disk 85 % full", priority: "low" },
12003
+ ];
12004
+
12005
+ const ALERTS: readonly Alarm[] = [
12006
+ { id: "a-1", type: "checkout-latency", lifecycle: "active-unacknowledged", raised: at(17, 10, 12) },
12007
+ { id: "a-2", type: "webhooks-queue", lifecycle: "active-acknowledged", raised: at(17, 7, 12), acknowledgedAt: at(17, 8, 2) },
12008
+ { id: "a-3", type: "images-disk", lifecycle: "active-unacknowledged", raised: at(17, 6, 0) },
12009
+ ];
12010
+
12011
+ const MIN = 60_000;
12012
+
12013
+ /* The application's own rule: which durations an operator may choose. */
12014
+ const DURATIONS = [15 * MIN, 60 * MIN, 4 * 60 * MIN] as const;
12015
+
12016
+ export default function AskForAReason() {
12017
+ const [alerts, setAlerts] = useState<readonly Alarm[]>(ALERTS);
12018
+ const view = useMemo(() => alarmModel({ alarms: alerts, types: ALERT_TYPES, asOf: NOW }), [alerts]);
12019
+ const selection = useTableSelection(view.filtered.map((row) => row.id));
12020
+
12021
+ return (
12022
+ <AlarmList
12023
+ view={view}
12024
+ selection={selection}
12025
+ snoozeDurations={DURATIONS}
12026
+ snoozeReason="required"
12027
+ onSnooze={(ids, until, reason) => {
12028
+ setAlerts((current) => current.map((a) => (ids.includes(a.id) ? snooze(a, until, "Jonas Keller", reason) : a)));
12029
+ selection.clear();
12030
+ }}
12031
+ />
12032
+ );
12033
+ }
12034
+ ```
12035
+
11936
12036
  #### When to use something else
11937
12037
 
11938
12038
  - Measured values against limits, without a lifecycle → VerdictColumn
@@ -11943,8 +12043,10 @@ export default function FilterByStateAndPriority() {
11943
12043
  |---|---|
11944
12044
  | `Tab` | Move through the row boxes, “Acknowledge” and the hidden-alerts switch. |
11945
12045
  | `Space` | On a box: tick or untick the alert. On the switch: show only the hidden alerts, or all. |
11946
- | `Enter` | On “Acknowledge”: hand the ticked alerts to `onAcknowledge`. On “Snooze”: open the durations; on a duration: hand the ticked alerts and the end to `onSnooze`. On “Unsnooze”: hand the ticked snoozed alerts to `onUnsnooze`. |
11947
- | `Arrow keys` | In the durations menu: move between them; Escape closes it. |
12046
+ | `Enter` | On “Acknowledge”: hand the ticked alerts to `onAcknowledge`. On “Snooze”: open the durations; on a duration: hand the ticked alerts and the end to `onSnooze`. With `snoozeReason`, “Snooze” opens a panel instead (see Escape and Arrow keys). On “Unsnooze”: hand the ticked snoozed alerts to `onUnsnooze`. |
12047
+ | `Arrow keys` | In the durations menu, or among the durations of the reason panel: move between them; Escape closes the menu. |
12048
+ | `Escape` | In the reason panel: close it without reporting; the focus returns to “Snooze”. A click outside closes it the same way. |
12049
+ | `Enter (in the reason field)` | Report the snooze, as the panel's “Snooze” button does; with `"required"` and no text it does nothing. |
11948
12050
 
11949
12051
  #### Accessibility
11950
12052
 
@@ -11954,15 +12056,18 @@ One polite live region says one number: the active alerts nobody has acknowledge
11954
12056
 
11955
12057
  Each row's box is named after the alert, and “Acknowledge” names how many it will acknowledge; while there is none it is disabled.
11956
12058
 
12059
+ With `snoozeReason`, “Snooze” opens a dialog named after how many alerts it acts on. The focus moves to the chosen duration when it opens and back to “Snooze” when it closes; the durations and the reason field are labelled, and with `"required"` the field is marked and the button disabled until it holds text.
12060
+
11957
12061
  #### API
11958
12062
 
11959
12063
  ##### `AlarmListProps`
11960
12064
 
11961
12065
  | Prop | Type | Default | Description |
11962
12066
  |---|---|---|---|
11963
- | `view` *required* | [`AlarmProjection`](#type-AlarmProjection) | — | The projection from `alarmModel`.<br>Shown in: [Show the alerts](#/alarmlist/show-the-alerts), [Acknowledge alerts](#/alarmlist/acknowledge-alerts), [Mark a flood](#/alarmlist/mark-a-flood) and 5 more |
11964
- | `selection` | [`TableSelection`](#type-TableSelection)`<string>` | — | The caller's selection helper; without it there is no bulk acknowledgement. Deliberately the same one as for any other table: the rules on "everything filtered" versus "this page" are already decided there.<br>Shown in: [Acknowledge alerts](#/alarmlist/acknowledge-alerts), [Snooze and hide](#/alarmlist/snooze-and-hide), [Offer snoozing to the operator](#/alarmlist/offer-snoozing-to-the-operator) and 1 more |
11965
- | `snoozeDurations` | `readonly number[]` | no default | The durations on offer, in milliseconds. Which are permitted is the application's rule, so there is no default list; empty or missing, there is no snooze action.<br>Shown in: [Offer snoozing to the operator](#/alarmlist/offer-snoozing-to-the-operator) |
12067
+ | `view` *required* | [`AlarmProjection`](#type-AlarmProjection) | — | The projection from `alarmModel`.<br>Shown in: [Show the alerts](#/alarmlist/show-the-alerts), [Acknowledge alerts](#/alarmlist/acknowledge-alerts), [Mark a flood](#/alarmlist/mark-a-flood) and 6 more |
12068
+ | `selection` | [`TableSelection`](#type-TableSelection)`<string>` | — | The caller's selection helper; without it there is no bulk acknowledgement. Deliberately the same one as for any other table: the rules on "everything filtered" versus "this page" are already decided there.<br>Shown in: [Acknowledge alerts](#/alarmlist/acknowledge-alerts), [Snooze and hide](#/alarmlist/snooze-and-hide), [Offer snoozing to the operator](#/alarmlist/offer-snoozing-to-the-operator) and 2 more |
12069
+ | `snoozeReason` | `"optional" \| "required"` | — | Asks for a reason when snoozing: "Snooze" then opens a small panel with the durations and a field for the reason, and its button reports. With `"required"` the button waits for text. Without this prop "Snooze" is the menu of durations and reports at once. The list keeps no draft once the panel closes; Escape and a click outside close it without reporting.<br>Shown in: [Ask for a reason when snoozing](#/alarmlist/ask-for-a-reason-when-snoozing) |
12070
+ | `snoozeDurations` | `readonly number[]` | no default | The durations on offer, in milliseconds. Which are permitted is the application's rule, so there is no default list; empty or missing, there is no snooze action.<br>Shown in: [Offer snoozing to the operator](#/alarmlist/offer-snoozing-to-the-operator), [Ask for a reason when snoozing](#/alarmlist/ask-for-a-reason-when-snoozing) |
11966
12071
  | `asOf` | `Date \| number \| null` | — | When the data was true.<br>Shown in: [Tell quiet from disconnected](#/alarmlist/tell-quiet-from-disconnected), [Work through the alerts (Scenarios)](#/scenarios/work-through-the-alerts) |
11967
12072
  | `freshness` | [`FreshnessAges`](#type-FreshnessAges) | — | From when the data counts as stale and from when as disconnected. Without them the list shows no freshness – a time without a rule for when it is too old is no information.<br>Shown in: [Tell quiet from disconnected](#/alarmlist/tell-quiet-from-disconnected), [Work through the alerts (Scenarios)](#/scenarios/work-through-the-alerts) |
11968
12073
  | `density` | `"regular" \| "compact"` | the density of the `UmrissProvider`, else `"compact"` | "compact" reduces the row height for very dense views.<br>Shown in: [Mark a flood](#/alarmlist/mark-a-flood) |
@@ -11974,7 +12079,7 @@ Each row's box is named after the alert, and “Acknowledge” names how many it
11974
12079
  | Prop | Type | Default | Description |
11975
12080
  |---|---|---|---|
11976
12081
  | `onAcknowledge` | `(ids: readonly string[]) => void` | — | Gets the ids that are to be acknowledged. The component does not acknowledge itself – it does not own the alarms.<br>Shown in: [Acknowledge alerts](#/alarmlist/acknowledge-alerts), [Snooze and hide](#/alarmlist/snooze-and-hide), [Work through the alerts (Scenarios)](#/scenarios/work-through-the-alerts) |
11977
- | `onSnooze` | `(ids: readonly string[], until: number) => void` | — | Gets the ids the operator wants to snooze and the end they chose (`asOf` of the view plus a duration of `snoozeDurations`). The component snoozes nothing – the application calls `snooze()` on its own alarms, or refuses. The action stands beside "Acknowledge", on the selection, and needs `selection`, `snoozeDurations` and this handler.<br>Shown in: [Offer snoozing to the operator](#/alarmlist/offer-snoozing-to-the-operator) |
12082
+ | `onSnooze` | `(ids: readonly string[], until: number, reason?: string) => void` | — | Gets the ids the operator wants to snooze and the end they chose (`asOf` of the view plus a duration of `snoozeDurations`). The component snoozes nothing – the application calls `snooze()` on its own alarms, or refuses. The action stands beside "Acknowledge", on the selection, and needs `selection`, `snoozeDurations` and this handler. With `snoozeReason` there is a third argument: the reason, trimmed, or `undefined` when it is optional and left empty. Stored with `snooze()`, the reason is shown after the end and the name in the snoozed badge's tip and in what is spoken.<br>Shown in: [Offer snoozing to the operator](#/alarmlist/offer-snoozing-to-the-operator), [Ask for a reason when snoozing](#/alarmlist/ask-for-a-reason-when-snoozing) |
11978
12083
  | `onUnsnooze` | `(ids: readonly string[]) => void` | — | Gets the ids whose snooze the operator wants to end early. Shown, beside "Acknowledge", only with this handler and a selection.<br>Shown in: [Offer snoozing to the operator](#/alarmlist/offer-snoozing-to-the-operator) |
11979
12084
 
11980
12085
  Also takes every attribute of `<div>` – without `children`.
@@ -11993,7 +12098,7 @@ announces. Give it to `AlarmList` as `view`.
11993
12098
  | `activeUnacknowledged` *required* | `number` | — | Active and unacknowledged within the filtered set - the number for the polite screen reader. From the filtered set, not from the visible page, like every figure in this house. Only alarms in service count: the number calls somebody over, and a hidden alarm is one it must not call to. |
11994
12099
  | `hiddenAlarms` *required* | `number` | — | Hidden within the filtered set: snoozed, suppressed, disabled. They are in the list; this is how many. |
11995
12100
  | `columns` *required* | `readonly `[`ModelColumn`](#type-ModelColumn)`<AlarmRow, AlarmColumn>[]` | — | The visible columns in their order – the basis for the header row, the column menu and the CSV export. From `TableProjection`. |
11996
- | `filtered` *required* | `AlarmRow[]` | — | Everything the filter leaves – the basis for figures and the selection. From `TableProjection`.<br>Shown in: [Acknowledge alerts](#/alarmlist/acknowledge-alerts), [Snooze and hide](#/alarmlist/snooze-and-hide), [Offer snoozing to the operator](#/alarmlist/offer-snoozing-to-the-operator) and 1 more |
12101
+ | `filtered` *required* | `AlarmRow[]` | — | Everything the filter leaves – the basis for figures and the selection. From `TableProjection`.<br>Shown in: [Acknowledge alerts](#/alarmlist/acknowledge-alerts), [Snooze and hide](#/alarmlist/snooze-and-hide), [Offer snoozing to the operator](#/alarmlist/offer-snoozing-to-the-operator) and 2 more |
11997
12102
  | `visible` *required* | `AlarmRow[]` | — | Only the current page - with a grouping, the rows among its lines. From `TableProjection`. |
11998
12103
  | `groups` | [`RowGroup`](#type-RowGroup)`<AlarmRow>[]` | — | With a grouping: the groups, outermost first. From `TableProjection`. |
11999
12104
  | `lines` | [`Line`](#type-Line)`<AlarmRow>[]` | — | With a grouping: every line of the filtered set. From `TableProjection`. |
@@ -12019,10 +12124,10 @@ selection.
12019
12124
  | `isSelected` *required* | `(id: T) => boolean` | — | <br>Shown in: [Select rows (Selection)](#/selection/selection), [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself) |
12020
12125
  | `toggle` *required* | `(id: T) => void` | — | <br>Shown in: [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself) |
12021
12126
  | `toggleAll` *required* | `() => void` | — | Selects all the keys passed in - or, when all of them are selected already, deselects them. Keys outside them stay as they are. |
12022
- | `clear` *required* | `() => void` | — | <br>Shown in: [Acknowledge alerts](#/alarmlist/acknowledge-alerts), [Snooze and hide](#/alarmlist/snooze-and-hide), [Offer snoozing to the operator](#/alarmlist/offer-snoozing-to-the-operator) and 3 more |
12127
+ | `clear` *required* | `() => void` | — | <br>Shown in: [Acknowledge alerts](#/alarmlist/acknowledge-alerts), [Snooze and hide](#/alarmlist/snooze-and-hide), [Offer snoozing to the operator](#/alarmlist/offer-snoozing-to-the-operator) and 4 more |
12023
12128
  | `allSelected` *required* | `boolean` | — | true when every key passed in is selected. |
12024
12129
  | `someSelected` *required* | `boolean` | — | true when some - but not all - are selected. |
12025
- | `count` *required* | `number` | — | <br>Shown in: [Select rows (Selection)](#/selection/selection), [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself), [Scroll twenty thousand rows (Virtualisation)](#/virtualisation/virtualisation) and 1 more |
12130
+ | `count` *required* | `number` | — | <br>Shown in: [Select rows (Selection)](#/selection/selection), [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself), [Copy the selection (Export)](#/export/copy-the-selection) and 2 more |
12026
12131
 
12027
12132
  ###### `FreshnessAges`
12028
12133
 
@@ -12461,7 +12566,7 @@ overwritten by the weaker one, or the end of the snooze would put an alarm
12461
12566
  disabled for maintenance back in service.
12462
12567
 
12463
12568
  ```ts
12464
- function snooze(alarm: Alarm, until: number, by: string): Alarm;
12569
+ function snooze(alarm: Alarm, until: number, by: string, reason?: string): Alarm;
12465
12570
  ```
12466
12571
 
12467
12572
  Used on [Scenarios](#/) and [AlarmList](#/alarmlist).
@@ -12636,12 +12741,12 @@ place in the lifecycle and its moments.
12636
12741
 
12637
12742
  | Prop | Type | Default | Description |
12638
12743
  |---|---|---|---|
12639
- | `id` *required* | `string` | — | <br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 4 more |
12640
- | `type` *required* | `string` | — | Id of the alarm type.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 4 more |
12641
- | `lifecycle` *required* | [`LifecycleState`](#type-LifecycleState)<br>`"active-unacknowledged" \| "active-acknowledged" \| "resolved-unacknowledged" \| "resolved-acknowledged"` | — | <br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 4 more |
12642
- | `raised` *required* | `number` | — | The moment of coming, in milliseconds.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 4 more |
12744
+ | `id` *required* | `string` | — | <br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 5 more |
12745
+ | `type` *required* | `string` | — | Id of the alarm type.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 5 more |
12746
+ | `lifecycle` *required* | [`LifecycleState`](#type-LifecycleState)<br>`"active-unacknowledged" \| "active-acknowledged" \| "resolved-unacknowledged" \| "resolved-acknowledged"` | — | <br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 5 more |
12747
+ | `raised` *required* | `number` | — | The moment of coming, in milliseconds.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 5 more |
12643
12748
  | `resolved` | `number` | — | The moment of resolving; while the alarm is active: none.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 3 more |
12644
- | `acknowledgedAt` | `number` | — | The moment of the acknowledgement, as long as unacknowledged: none.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Snooze and hide (AlarmList)](#/alarmlist/snooze-and-hide) and 3 more |
12749
+ | `acknowledgedAt` | `number` | — | The moment of the acknowledgement, as long as unacknowledged: none.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Snooze and hide (AlarmList)](#/alarmlist/snooze-and-hide) and 4 more |
12645
12750
 
12646
12751
  ##### `AlarmColumn`
12647
12752
 
@@ -12666,9 +12771,9 @@ the rules for chatter and floods.
12666
12771
 
12667
12772
  | Prop | Type | Default | Description |
12668
12773
  |---|---|---|---|
12669
- | `alarms` *required* | `readonly `[`Alarm`](#type-Alarm)`[]` | — | <br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 5 more |
12670
- | `types` *required* | `readonly `[`AlarmType`](#type-AlarmType)`[]` | — | The catalogue of conditions. An alarm whose type is missing is not thrown away.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 5 more |
12671
- | `asOf` *required* | `number` | — | Milliseconds. The age and every window hang on it; nothing reads a clock.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 5 more |
12774
+ | `alarms` *required* | `readonly `[`Alarm`](#type-Alarm)`[]` | — | <br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 6 more |
12775
+ | `types` *required* | `readonly `[`AlarmType`](#type-AlarmType)`[]` | — | The catalogue of conditions. An alarm whose type is missing is not thrown away.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 6 more |
12776
+ | `asOf` *required* | `number` | — | Milliseconds. The age and every window hang on it; nothing reads a clock.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 6 more |
12672
12777
  | `chatter` | [`ChatterRule`](#type-ChatterRule) | — | Without it `frequency` counts every occurrence up to the as-of time and `chatters` stays false.<br>Shown in: [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) |
12673
12778
  | `flood` | [`FloodRule`](#type-FloodRule) | — | Without it no flood is detected and nothing is marked.<br>Shown in: [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) |
12674
12779
  | `keepDone` | `boolean` | `false` | Show the alarms that are done as well (resolved and acknowledged). Default: no - that is the only removal the model performs. |
@@ -12690,7 +12795,7 @@ announces. Give it to `AlarmList` as `view`.
12690
12795
  | `activeUnacknowledged` *required* | `number` | — | Active and unacknowledged within the filtered set - the number for the polite screen reader. From the filtered set, not from the visible page, like every figure in this house. Only alarms in service count: the number calls somebody over, and a hidden alarm is one it must not call to. |
12691
12796
  | `hiddenAlarms` *required* | `number` | — | Hidden within the filtered set: snoozed, suppressed, disabled. They are in the list; this is how many. |
12692
12797
  | `columns` *required* | `readonly `[`ModelColumn`](#type-ModelColumn)`<AlarmRow, AlarmColumn>[]` | — | The visible columns in their order – the basis for the header row, the column menu and the CSV export. From `TableProjection`. |
12693
- | `filtered` *required* | `AlarmRow[]` | — | Everything the filter leaves – the basis for figures and the selection. From `TableProjection`.<br>Shown in: [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Snooze and hide (AlarmList)](#/alarmlist/snooze-and-hide), [Offer snoozing to the operator (AlarmList)](#/alarmlist/offer-snoozing-to-the-operator) and 1 more |
12798
+ | `filtered` *required* | `AlarmRow[]` | — | Everything the filter leaves – the basis for figures and the selection. From `TableProjection`.<br>Shown in: [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Snooze and hide (AlarmList)](#/alarmlist/snooze-and-hide), [Offer snoozing to the operator (AlarmList)](#/alarmlist/offer-snoozing-to-the-operator) and 2 more |
12694
12799
  | `visible` *required* | `AlarmRow[]` | — | Only the current page - with a grouping, the rows among its lines. From `TableProjection`. |
12695
12800
  | `groups` | [`RowGroup`](#type-RowGroup)`<AlarmRow>[]` | — | With a grouping: the groups, outermost first. From `TableProjection`. |
12696
12801
  | `lines` | [`Line`](#type-Line)`<AlarmRow>[]` | — | With a grouping: every line of the filtered set. From `TableProjection`. |
@@ -12711,7 +12816,7 @@ Derived, never stored.
12711
12816
 
12712
12817
  | Prop | Type | Default | Description |
12713
12818
  |---|---|---|---|
12714
- | `id` *required* | `string` | — | Id of the alarm - the key for selection and acknowledgement.<br>Shown in: [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Snooze and hide (AlarmList)](#/alarmlist/snooze-and-hide), [Offer snoozing to the operator (AlarmList)](#/alarmlist/offer-snoozing-to-the-operator) and 1 more |
12819
+ | `id` *required* | `string` | — | Id of the alarm - the key for selection and acknowledgement.<br>Shown in: [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Snooze and hide (AlarmList)](#/alarmlist/snooze-and-hide), [Offer snoozing to the operator (AlarmList)](#/alarmlist/offer-snoozing-to-the-operator) and 2 more |
12715
12820
  | `alarm` *required* | [`Alarm`](#type-Alarm) | — | |
12716
12821
  | `type` *required* | [`AlarmType`](#type-AlarmType) | — | |
12717
12822
  | `lifecycle` *required* | [`LifecycleState`](#type-LifecycleState)<br>`"active-unacknowledged" \| "active-acknowledged" \| "resolved-unacknowledged" \| "resolved-acknowledged"` | — | <br>Shown in: [Filter by state and priority (AlarmList)](#/alarmlist/filter-by-state-and-priority) |
@@ -12733,9 +12838,9 @@ cannot be expressed without it.
12733
12838
 
12734
12839
  | Prop | Type | Default | Description |
12735
12840
  |---|---|---|---|
12736
- | `id` *required* | `string` | — | <br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 5 more |
12737
- | `label` *required* | `string` | — | <br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 5 more |
12738
- | `priority` *required* | [`Priority`](#type-Priority)<br>`"high" \| "medium" \| "low"` | — | <br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 5 more |
12841
+ | `id` *required* | `string` | — | <br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 6 more |
12842
+ | `label` *required* | `string` | — | <br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 6 more |
12843
+ | `priority` *required* | [`Priority`](#type-Priority)<br>`"high" \| "medium" \| "low"` | — | <br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Mark a flood (AlarmList)](#/alarmlist/mark-a-flood) and 6 more |
12739
12844
  | `returnBand` | [`ReturnBand`](#type-ReturnBand) | — | The dead band, when the type has one. |
12740
12845
 
12741
12846
  Used on [Scenarios](#/) and [AlarmList](#/alarmlist).
@@ -13355,6 +13460,7 @@ the way.
13355
13460
  |---|---|---|---|
13356
13461
  | `until` *required* | `number` | — | When it ends, in milliseconds. Reaching it is enough.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Snooze and hide (AlarmList)](#/alarmlist/snooze-and-hide) and 2 more |
13357
13462
  | `by` *required* | `string` | — | Who snoozed it - a snooze is tracked, not anonymous.<br>Shown in: [Show the alerts (AlarmList)](#/alarmlist/show-the-alerts), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Snooze and hide (AlarmList)](#/alarmlist/snooze-and-hide) and 2 more |
13463
+ | `reason` | `string` | — | Why, when the application asked for one. The list shows it in the badge's tip and in what is spoken. |
13358
13464
 
13359
13465
  Used on [Scenarios](#/) and [AlarmList](#/alarmlist).
13360
13466
 
@@ -13384,8 +13490,8 @@ row. Pass it as `of` to a part that stands outside the table.
13384
13490
 
13385
13491
  | Prop | Type | Default | Description |
13386
13492
  |---|---|---|---|
13387
- | `Table` *required* | `(props: `[`TableProps`](#/first-table/type-TableProps)`<Z>) => ReactNode` | — | <br>Shown in: [A first table (Installation)](#/installation/first-table), [Show a list of services (First table)](#/first-table/first-table), [Search and page from a header of your own (First table)](#/first-table/search-and-page-from-a-header-of-your-own) and 115 more |
13388
- | `Column` *required* | [`ColumnComponent`](#type-ColumnComponent)`<Z>` | — | <br>Shown in: [A first table (Installation)](#/installation/first-table), [Show a list of services (First table)](#/first-table/first-table), [Search and page from a header of your own (First table)](#/first-table/search-and-page-from-a-header-of-your-own) and 115 more |
13493
+ | `Table` *required* | `(props: `[`TableProps`](#/first-table/type-TableProps)`<Z>) => ReactNode` | — | <br>Shown in: [A first table (Installation)](#/installation/first-table), [Show a list of services (First table)](#/first-table/first-table), [Search and page from a header of your own (First table)](#/first-table/search-and-page-from-a-header-of-your-own) and 116 more |
13494
+ | `Column` *required* | [`ColumnComponent`](#type-ColumnComponent)`<Z>` | — | <br>Shown in: [A first table (Installation)](#/installation/first-table), [Show a list of services (First table)](#/first-table/first-table), [Search and page from a header of your own (First table)](#/first-table/search-and-page-from-a-header-of-your-own) and 116 more |
13389
13495
  | `VerdictColumn` *required* | [`VerdictColumnComponent`](#type-VerdictColumnComponent)`<Z>` | — | <br>Shown in: [Pin columns to both sides (Width and pinning)](#/width-and-pinning/pinned-both-sides), [Read a day's deliveries by depot (Grouping)](#/grouping/the-dispatch-report), [Carry the worst verdict up (Aggregate)](#/aggregate/worst-verdict) and 5 more |
13390
13496
  | `RowDetail` *required* | `(props: `[`RowDetailProps`](#/rowdetail/type-RowDetailProps)`<Z>) => ReactNode` | — | <br>Shown in: [Keep the header and the names in view (Width and pinning)](#/width-and-pinning/sticky-parts), [Employees in the detail (Tree rows)](#/tree-rows/employees-in-the-detail), [Own staff and teams (Tree rows)](#/tree-rows/own-staff-and-teams) and 5 more |
13391
13497
  | `RowActions` *required* | `(props: `[`RowActionsProps`](#/rowactions/type-RowActionsProps)`) => ReactNode` | — | <br>Shown in: [Name the row (Column)](#/column/row-header), [Pin columns to both sides (Width and pinning)](#/width-and-pinning/pinned-both-sides), [Select a whole group (Grouping)](#/grouping/a-whole-group-selected) and 7 more |
@@ -13416,7 +13522,7 @@ row. Pass it as `of` to a part that stands outside the table.
13416
13522
  | `filter` *required* | `Readonly<Record<string, unknown>>` | — | The conditions of the column filters and row filters by id, in the order in which they were set. Whatever fits no column and no row filter is absent. From `TableSnapshot`.<br>Shown in: [Set a condition from outside the table (Filter)](#/filter/conditions-from-outside) |
13417
13523
  | `setFilter` *required* | [`SetFilter`](#type-SetFilter)`<Z>` | — | Sets the condition of a column filter or a row filter; `null` clears it. Back to page one. A condition that does not fit the kind of the filter – a range on a list filter, a column without a filter, a row filter not in `rowFilters` – is passed over with a warning in development. From `TableSnapshot`.<br>Shown in: [Set a condition from outside the table (Filter)](#/filter/conditions-from-outside), [Filter by a field no column shows (Filter)](#/filter/a-field-no-column-shows), [Rows from a request (Filter)](#/filter/rows-from-a-request) and 5 more |
13418
13524
  | `conditionOf` *required* | `<B>(filter: `[`RowFilter`](#/filter/type-RowFilter)`<Z, B>) => B \| null` | — | The condition of a row filter, as its type - `null` while it is lifted. From `TableSnapshot`.<br>Shown in: [Filter by a field no column shows (Filter)](#/filter/a-field-no-column-shows), [Rows from a request (Filter)](#/filter/rows-from-a-request), [Ask a question over several fields (Filter)](#/filter/a-question-over-several-fields) and 3 more |
13419
- | `selection` *required* | [`TableSelection`](#type-TableSelection)`<string>` | — | The selection – its own or the one handed in through `selection`. From `TableSnapshot`.<br>Shown in: [Select rows (Selection)](#/selection/selection), [Scroll twenty thousand rows (Virtualisation)](#/virtualisation/virtualisation), [Load pages from a server (Server mode)](#/server-mode/a-million-rows-on-a-server) and 1 more |
13525
+ | `selection` *required* | [`TableSelection`](#type-TableSelection)`<string>` | — | The selection – its own or the one handed in through `selection`. From `TableSnapshot`.<br>Shown in: [Select rows (Selection)](#/selection/selection), [Copy the selection (Export)](#/export/copy-the-selection), [Scroll twenty thousand rows (Virtualisation)](#/virtualisation/virtualisation) and 2 more |
13420
13526
  | `grouping` *required* | `readonly string[]` | — | The ids the table is grouped by, the outermost first – only those a groupable column or a group key carries, at most three. From `TableSnapshot`.<br>Shown in: [Group and fold from controls of your own (Grouping)](#/grouping/group-and-fold-from-controls-of-your-own) |
13421
13527
  | `setGrouping` *required* | `(grouping: readonly string[]) => void` | — | Groups by these columns or group keys; `[]` ungroups. Back to page one. From `TableSnapshot`.<br>Shown in: [Group and fold from controls of your own (Grouping)](#/grouping/group-and-fold-from-controls-of-your-own) |
13422
13528
  | `folded` *required* | `readonly string[]` | — | The paths of the folded groups that still occur. From `TableSnapshot`.<br>Shown in: [Group and fold from controls of your own (Grouping)](#/grouping/group-and-fold-from-controls-of-your-own) |
@@ -13429,6 +13535,7 @@ row. Pass it as `of` to a part that stands outside the table.
13429
13535
  | `foldAllBranches` *required* | `() => void` | — | Tree rows: closes every branch. From `TableSnapshot`.<br>Shown in: [Open branches from controls of your own (Tree rows)](#/tree-rows/open-branches-from-controls-of-your-own) |
13430
13536
  | `view` *required* | [`TableView`](#type-TableView) | — | The part of the state an application can keep; whatever still stands as the options set it up is absent. From `TableSnapshot`.<br>Shown in: [Set a condition from outside the table (Filter)](#/filter/conditions-from-outside), [Fold groups into a summary (Grouping)](#/grouping/the-overview), [Keep and restore a view (View)](#/view/initial-view) |
13431
13537
  | `asCsv` *required* | `() => string` | — | The filtered set in the visible columns as text for a spreadsheet - in server mode the page. From `TableSnapshot`.<br>Shown in: [Sort, arrange and export from controls of your own (First table)](#/first-table/sort-arrange-and-export-from-controls-of-your-own) |
13538
+ | `selectionAsText` *required* | `() => string` | — | The selected rows within the filtered set as tab-separated text under a header line - the text Ctrl+C writes. `""` with nothing selected. From `TableSnapshot`.<br>Shown in: [Copy the selection (Export)](#/export/copy-the-selection) |
13432
13539
  | `virtual` *required* | `boolean` | — | Whether it virtualises. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](#/first-table/search-and-page-from-a-header-of-your-own) |
13433
13540
  | `rowCount` *required* | `number` | — | How many rows the filtered set has - in server mode the server's count. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](#/first-table/search-and-page-from-a-header-of-your-own) |
13434
13541
  | `server` *required* | `boolean` | — | Whether it is in server mode: the rows are one page of a server's. From `TableSnapshot`.<br>Shown in: [Sort, arrange and export from controls of your own (First table)](#/first-table/sort-arrange-and-export-from-controls-of-your-own) |
@@ -13501,10 +13608,10 @@ selection.
13501
13608
  | `isSelected` *required* | `(id: T) => boolean` | — | <br>Shown in: [Select rows (Selection)](#/selection/selection), [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself) |
13502
13609
  | `toggle` *required* | `(id: T) => void` | — | <br>Shown in: [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself) |
13503
13610
  | `toggleAll` *required* | `() => void` | — | Selects all the keys passed in - or, when all of them are selected already, deselects them. Keys outside them stay as they are. |
13504
- | `clear` *required* | `() => void` | — | <br>Shown in: [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Snooze and hide (AlarmList)](#/alarmlist/snooze-and-hide) and 3 more |
13611
+ | `clear` *required* | `() => void` | — | <br>Shown in: [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself), [Acknowledge alerts (AlarmList)](#/alarmlist/acknowledge-alerts), [Snooze and hide (AlarmList)](#/alarmlist/snooze-and-hide) and 4 more |
13505
13612
  | `allSelected` *required* | `boolean` | — | true when every key passed in is selected. |
13506
13613
  | `someSelected` *required* | `boolean` | — | true when some - but not all - are selected. |
13507
- | `count` *required* | `number` | — | <br>Shown in: [Select rows (Selection)](#/selection/selection), [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself), [Scroll twenty thousand rows (Virtualisation)](#/virtualisation/virtualisation) and 1 more |
13614
+ | `count` *required* | `number` | — | <br>Shown in: [Select rows (Selection)](#/selection/selection), [Hold the selection yourself (Selection)](#/selection/hold-the-selection-yourself), [Copy the selection (Export)](#/export/copy-the-selection) and 2 more |
13508
13615
 
13509
13616
  ##### `TableSnapshot`
13510
13617
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umriss-ui/table",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "description": "React data table for data-dense applications - sorting, filtering, grouping, aggregates, virtualisation. Declared the way it reads: columns as JSX, typed against their rows.",
5
5
  "license": "MIT",
6
6
  "author": "Roman Händler",
@@ -51,7 +51,7 @@
51
51
  "peerDependencies": {
52
52
  "react": ">=18",
53
53
  "react-dom": ">=18",
54
- "@umriss-ui/core": "^0.31.0"
54
+ "@umriss-ui/core": "^0.33.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@fontsource/geist-mono": "^5.3.0",
@@ -66,7 +66,7 @@
66
66
  "vite": "^6.0.0",
67
67
  "vite-plugin-dts": "^4.3.0",
68
68
  "@umriss-ui/demo": "0.0.0",
69
- "@umriss-ui/core": "0.31.0"
69
+ "@umriss-ui/core": "0.33.0"
70
70
  },
71
71
  "scripts": {
72
72
  "props": "node --disable-warning=ExperimentalWarning --experimental-strip-types demo/props.ts",