@umriss-ui/table 0.43.0 → 0.45.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 +37 -0
- package/README.md +39 -3
- package/dist/index.d.ts +137 -19
- package/dist/table.css +1 -1
- package/dist/table.js +2430 -2179
- package/dist/xlsx.d.ts +48 -0
- package/dist/xlsx.js +128 -0
- package/docs/llms-full.md +1272 -98
- package/package.json +12 -4
package/docs/llms-full.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @umriss-ui/table 0.
|
|
1
|
+
# @umriss-ui/table 0.45.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
|
|
|
@@ -981,7 +981,7 @@ Rows of records to scan, sort, search and select (also called a data table or da
|
|
|
981
981
|
import { useTable } from "@umriss-ui/table";
|
|
982
982
|
```
|
|
983
983
|
|
|
984
|
-
[`useTable`](#api-index-1) takes the rows and hands back the `Table` and the `Column` that belong to them, so a column can only name a field the row has. The parts that touch no row, such as `Toolbar` or `Search`, are ordinary imports.
|
|
984
|
+
[`useTable`](#api-index-1) takes the rows and hands back the `Table` and the `Column` that belong to them, so a column can only name a field the row has. The rows are one object per row in an array; anything else (an object of columns, an Arrow table, a typed array) is read as no rows, shows the empty state and warns once in development, and `Array.from` makes rows of an Arrow table or a typed array. The parts that touch no row, such as `Toolbar` or `Search`, are ordinary imports.
|
|
985
985
|
|
|
986
986
|
Every option of the hook and every prop of the table stands in the tables below; each feature has a page of its own in the sidebar.
|
|
987
987
|
|
|
@@ -1247,14 +1247,14 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
|
|
|
1247
1247
|
|
|
1248
1248
|
| Prop | Type | Default | Description |
|
|
1249
1249
|
|---|---|---|---|
|
|
1250
|
-
| `selectable` | `boolean` | — | Adds the selection column. "All" means: the filtered set.<br>Shown in: [Name the row (Column)](#column), [Pin columns to both sides (Width and pinning)](#width-and-pinning), [Keep the header and the names in view (Width and pinning)](#width-and-pinning) and
|
|
1250
|
+
| `selectable` | `boolean` | — | Adds the selection column. "All" means: the filtered set.<br>Shown in: [Name the row (Column)](#column), [Pin columns to both sides (Width and pinning)](#width-and-pinning), [Keep the header and the names in view (Width and pinning)](#width-and-pinning) and 16 more |
|
|
1251
1251
|
| `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), [Fold groups into a summary (Grouping)](#grouping-1), [Group twenty thousand rows (Grouping)](#grouping-1) and 7 more |
|
|
1252
1252
|
| `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), [Stripes across a wide table (Row appearance)](#row-appearance), [Show, hide and arrange (ColumnMenu)](#columnmenu) and 1 more |
|
|
1253
1253
|
| `striped` | `boolean` | — | Discreet zebra stripes.<br>Shown in: [Stripes across a wide table (Row appearance)](#row-appearance) |
|
|
1254
1254
|
| `density` | `"regular" \| "compact"` | the density of the `UmrissProvider`, else `"regular"` | How tightly the rows stand.<br>Shown in: [Fit long group names in a compact table (Grouping)](#grouping-1), [Employees in the detail (Tree rows)](#tree-rows), [Own staff and teams (Tree rows)](#tree-rows) and 4 more |
|
|
1255
1255
|
| `maxHeight` | `string` | — | Height of the scroll area, e.g. "480px". A virtualised table needs it.<br>Shown in: [Keep the header and the names in view (Width and pinning)](#width-and-pinning), [Fold groups into a summary (Grouping)](#grouping-1), [Group twenty thousand rows (Grouping)](#grouping-1) and 6 more |
|
|
1256
1256
|
| `empty` | `ReactNode` | — | What stands in the body when there are no rows. Empty because of a filter the table shows itself – with the way back.<br>Shown in: [Restrict which rows a table has (Pre-filter)](#pre-filter), [Show loading, empty, failed and no match (Row appearance)](#row-appearance) |
|
|
1257
|
-
| `loading` | `boolean` | — | Shows placeholder rows instead of the rows.<br>Shown in: [Rows from a request (Filter)](#filter), [Show loading, empty, failed and no match (Row appearance)](#row-appearance), [
|
|
1257
|
+
| `loading` | `boolean` | — | Shows placeholder rows instead of the rows.<br>Shown in: [Rows from a request (Filter)](#filter), [Show loading, empty, failed and no match (Row appearance)](#row-appearance), [Load pages from a server (Server mode)](#server-mode) |
|
|
1258
1258
|
| `rowProps` | `(row: Z) => ``RowAttributes` | — | Classes and data attributes per row.<br>Shown in: [Mark rows by their state (Row appearance)](#row-appearance) |
|
|
1259
1259
|
| `currentRow` | `string \| null` | — | The key of the row the rest of the screen follows - the table marks it with `aria-current` and an accent bar, apart from the selection. The table keeps no copy: pass the key you hold, `null` for none.<br>Shown in: [The current row (Selection)](#selection), [Another view chooses a row (Virtualisation)](#virtualisation) |
|
|
1260
1260
|
| `onCurrentRowChange` | `(key: string, row: Z) => void` | — | A primary click on a row, outside its controls - the checkbox, the expander, the actions and any button of yours in a cell - with the row's key and the row. Also called for the row already current, so that you decide whether a second click clears it. By the keyboard: in a native table the content of the row-header cell becomes a button (Enter and Space), so a control of your own in that cell would stand inside it; in grid mode Enter on a cell with nothing to edit or enter. Without a `rowHeader` column the keyboard cannot choose a row.<br>Shown in: [The current row (Selection)](#selection), [Another view chooses a row (Virtualisation)](#virtualisation) |
|
|
@@ -1262,7 +1262,7 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
|
|
|
1262
1262
|
| `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: [Bring a row into view from outside (Virtualisation)](#virtualisation), [Work cell by cell (Grid mode)](#grid-mode), [Combine grid mode with groups, pinning and many rows (Grid mode)](#grid-mode) and 7 more |
|
|
1263
1263
|
| `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), [Check a whole row before it is saved (Edits)](#edits), [Keep a list: add, change and delete rows (Edits)](#edits) and 1 more |
|
|
1264
1264
|
| `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) |
|
|
1265
|
-
| `children` | `ReactNode` | — | Columns, `RowDetail`, `RowActions` and the unbound parts.<br>Shown in: [Show a list of services](#first-table), [Search and page from a header of your own](#first-table), [Sort, arrange and export from controls of your own](#first-table) and
|
|
1265
|
+
| `children` | `ReactNode` | — | Columns, `RowDetail`, `RowActions` and the unbound parts.<br>Shown in: [Show a list of services](#first-table), [Search and page from a header of your own](#first-table), [Sort, arrange and export from controls of your own](#first-table) and 128 more |
|
|
1266
1266
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [Find a late shipment (Scenarios)](#find-a-late-shipment), [Plan the team's capacity (Scenarios)](#plan-the-teams-capacity) |
|
|
1267
1267
|
|
|
1268
1268
|
###### Events
|
|
@@ -1274,19 +1274,13 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
|
|
|
1274
1274
|
| `onRowAdd` | `(add: ``RowAdd``) => void` | — | Grid mode: puts up a "New row" button - in the table toolbar, or beneath the table without one. It opens an empty Row draft above the rows; saved, it is reported whole. The row appears when the rows passed in carry it.<br>Shown in: [Keep a list: add, change and delete rows (Edits)](#edits) |
|
|
1275
1275
|
| `onRowDelete` | `(remove: ``RowDelete``<Z>) => void` | — | Grid mode: a Delete button on every row, which asks inside its row before the delete is reported. The table removes nothing.<br>Shown in: [Keep a list: add, change and delete rows (Edits)](#edits), [Edit a dense table (Edits)](#edits) |
|
|
1276
1276
|
|
|
1277
|
-
###### Accessibility
|
|
1278
|
-
|
|
1279
|
-
| Prop | Type | Default | Description |
|
|
1280
|
-
|---|---|---|---|
|
|
1281
|
-
| `ariaLabel` | `string` | — | *Deprecated* since 0.43 - use `aria-label`. Accessible name of the table. |
|
|
1282
|
-
|
|
1283
1277
|
Also takes every attribute of `<div>` – without `children`.
|
|
1284
1278
|
|
|
1285
1279
|
##### `TableOptions<Z>`
|
|
1286
1280
|
|
|
1287
1281
|
| Prop | Type | Default | Description |
|
|
1288
1282
|
|---|---|---|---|
|
|
1289
|
-
| `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), [Search and page from a header of your own](#first-table), [Sort, arrange and export from controls of your own](#first-table) and
|
|
1283
|
+
| `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), [Search and page from a header of your own](#first-table), [Sort, arrange and export from controls of your own](#first-table) and 128 more |
|
|
1290
1284
|
| `pageSize` | `number` | `10` | How many rows a page holds.<br>Shown in: [Search and page from a header of your own](#first-table), [Ask a question over several fields (Filter)](#filter), [Restrict which rows a table has (Pre-filter)](#pre-filter) and 7 more |
|
|
1291
1285
|
| `defaultSort` | `SortLevel`` \| readonly ``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), [A label wider than its column (Width and pinning)](#width-and-pinning), [Sort by several columns (Sorting)](#sorting) and 10 more |
|
|
1292
1286
|
| `defaultGrouping` | `GroupingId``<Z> \| readonly ``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-1), [Group on two levels (Grouping)](#grouping-1), [Group on three levels (Grouping)](#grouping-1) and 23 more |
|
|
@@ -1349,6 +1343,7 @@ Also takes every attribute of `<div>` – without `children`.
|
|
|
1349
1343
|
| `virtual` *required* | `boolean` | — | Whether it virtualises.<br>Shown in: [Search and page from a header of your own](#first-table) |
|
|
1350
1344
|
| `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) |
|
|
1351
1345
|
| `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) |
|
|
1346
|
+
| `request` *required* | `TableRequest`` \| null` | — | Server mode: the request `onRequest` last received, or is about to; `null` outside it.<br>Shown in: [Show loading, and hold a late answer (Server mode)](#server-mode) |
|
|
1352
1347
|
|
|
1353
1348
|
##### Types on this page
|
|
1354
1349
|
|
|
@@ -1429,11 +1424,11 @@ the application.
|
|
|
1429
1424
|
|
|
1430
1425
|
| Prop | Type | Default | Description |
|
|
1431
1426
|
|---|---|---|---|
|
|
1432
|
-
| `search` | `string` | — | <br>Shown in: [Show loading, empty, failed and no match (Row appearance)](#row-appearance), [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode) and
|
|
1433
|
-
| `conditions` | `Readonly<Record<string, unknown>>` | — | The conditions of the column filters, per column. A condition for a column that does not exist, or whose filter is of another kind, falls out.<br>Shown in: [Ask a question over several fields (Filter)](#filter), [A dispatcher's bar (Toolbar controls)](#toolbar-controls), [Hand the table one page (Server mode)](#server-mode) and
|
|
1434
|
-
| `sort` | `readonly ``SortLevel``<K>[]` | — | <br>Shown in: [Keep and restore a view (View)](#view), [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode) and
|
|
1435
|
-
| `page` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode), [Name the values a list filter offers (Server mode)](#server-mode) and
|
|
1436
|
-
| `pageSize` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode), [Name the values a list filter offers (Server mode)](#server-mode) and
|
|
1427
|
+
| `search` | `string` | — | <br>Shown in: [Show loading, empty, failed and no match (Row appearance)](#row-appearance), [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode) and 6 more |
|
|
1428
|
+
| `conditions` | `Readonly<Record<string, unknown>>` | — | The conditions of the column filters, per column. A condition for a column that does not exist, or whose filter is of another kind, falls out.<br>Shown in: [Ask a question over several fields (Filter)](#filter), [A dispatcher's bar (Toolbar controls)](#toolbar-controls), [Hand the table one page (Server mode)](#server-mode) and 7 more |
|
|
1429
|
+
| `sort` | `readonly ``SortLevel``<K>[]` | — | <br>Shown in: [Keep and restore a view (View)](#view), [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode) and 6 more |
|
|
1430
|
+
| `page` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode), [Name the values a list filter offers (Server mode)](#server-mode) and 5 more |
|
|
1431
|
+
| `pageSize` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode), [Name the values a list filter offers (Server mode)](#server-mode) and 5 more |
|
|
1437
1432
|
| `hidden` | `readonly K[]` | — | <br>Shown in: [Keep and restore a view (View)](#view) |
|
|
1438
1433
|
| `order` | `readonly K[]` | — | |
|
|
1439
1434
|
| `widths` | `Readonly<Record<string, number>>` | — | Column widths the user has dragged, in pixels. |
|
|
@@ -1457,6 +1452,9 @@ selection.
|
|
|
1457
1452
|
| `clear` *required* | `() => void` | — | <br>Shown in: [Hold the selection yourself (Selection)](#selection), [Work through the alerts (Scenarios)](#work-through-the-alerts), [Find a late shipment (Scenarios)](#find-a-late-shipment) |
|
|
1458
1453
|
| `allSelected` *required* | `boolean` | — | true when every key passed in is selected. |
|
|
1459
1454
|
| `someSelected` *required* | `boolean` | — | true when some - but not all - are selected. |
|
|
1455
|
+
| `allMatching` *required* | `boolean` | — | Every row that matches is selected, those on no page held included. While it stands `selected` is empty and `count` is 0, and `isSelected(id)` is `!except.has(id)`. Store it with the keys when the selection is held outside. |
|
|
1456
|
+
| `except` *required* | `ReadonlySet<T>` | — | While `allMatching`: the keys unticked since. |
|
|
1457
|
+
| `selectMatching` *required* | `() => void` | — | Selects all that match; the keys selected before are dropped. |
|
|
1460
1458
|
| `count` *required* | `number` | — | <br>Shown in: [Select rows (Selection)](#selection), [Hold the selection yourself (Selection)](#selection), [Copy the selection (Export)](#export) and 2 more |
|
|
1461
1459
|
|
|
1462
1460
|
###### `Pin`
|
|
@@ -1483,6 +1481,18 @@ interface SetFilter<Z> {
|
|
|
1483
1481
|
}
|
|
1484
1482
|
```
|
|
1485
1483
|
|
|
1484
|
+
###### `TableRequest<K extends string = string>`
|
|
1485
|
+
|
|
1486
|
+
The request server mode reports to `onRequest`: the parts of the view that
|
|
1487
|
+
decide the rows - search, conditions, sort, page and page size - and
|
|
1488
|
+
nothing else, each at its default as well. A server has no default of the
|
|
1489
|
+
table's to fall back on, and a request it has to complete is one it
|
|
1490
|
+
completes wrongly. A width, an order, a pin or a fold is no part of it.
|
|
1491
|
+
|
|
1492
|
+
```ts
|
|
1493
|
+
type TableRequest<K extends string = string> = Required<Pick<TableView<K>, "search" | "conditions" | "sort" | "page" | "pageSize">>;
|
|
1494
|
+
```
|
|
1495
|
+
|
|
1486
1496
|
###### `SortDirection`
|
|
1487
1497
|
|
|
1488
1498
|
The direction of one sort level: `asc` puts the smallest value on top,
|
|
@@ -1546,10 +1556,10 @@ type Absent = null | undefined;
|
|
|
1546
1556
|
|
|
1547
1557
|
#### Known limits
|
|
1548
1558
|
|
|
1549
|
-
- No cell range selection and no undo: an edit is reported, never applied, and the application owns the rows ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
1550
|
-
- No pivot: compute the pivoted rows and map one computed column per key from the data, as in [a matrix with row and column totals](#aggregate) ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
1559
|
+
- No cell range selection and no undo: an edit is reported, never applied, and the application owns the rows ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md)).
|
|
1560
|
+
- No pivot: compute the pivoted rows and map one computed column per key from the data, as in [a matrix with row and column totals](#aggregate) ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md)).
|
|
1551
1561
|
|
|
1552
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
1562
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
1553
1563
|
|
|
1554
1564
|
### Provider
|
|
1555
1565
|
|
|
@@ -1671,7 +1681,7 @@ From `ExportProps` — the full table stands on [Export](#export).
|
|
|
1671
1681
|
|
|
1672
1682
|
| Prop | Type | Default | Description |
|
|
1673
1683
|
|---|---|---|---|
|
|
1674
|
-
| [`filename`](#export) | `string` | the wording's "table.csv" | File name of the download. |
|
|
1684
|
+
| [`filename`](#export) | `string` | the base of the wording's "table.csv" with the format's extension | File name of the download. |
|
|
1675
1685
|
|
|
1676
1686
|
## Columns
|
|
1677
1687
|
|
|
@@ -1689,7 +1699,11 @@ Without a presentation the value type decides: text on the left, numbers right-a
|
|
|
1689
1699
|
|
|
1690
1700
|
A computed value needs an `id`. One column is the row header: it names the row, cannot be hidden, and the row's checkbox and actions are read out with it.
|
|
1691
1701
|
|
|
1692
|
-
A computed `value` (like `sortValue`, `groupValue` and `rowKey`) may be written inline: a new function with the same source text counts as the same one, and nothing is recomputed. A closure that reads an outer variable which has changed reads as unchanged;
|
|
1702
|
+
A computed `value` (like `sortValue`, `groupValue` and `rowKey`) may be written inline: a new function with the same source text counts as the same one, and nothing is recomputed. A closure that reads an outer variable which has changed reads as unchanged; carry the variable in the row data, or give the column a `key` that changes with it. Development warns once per column.
|
|
1703
|
+
|
|
1704
|
+
A value sorts by its kind, and a string sorts as text: numbers given as strings are converted in the rows or given `sortValue={Number}`.
|
|
1705
|
+
|
|
1706
|
+
A point in time is a `Date` in the row; an epoch number or an ISO string is converted there. A date format on a column that holds no `Date` shows the value raw, and in development the table says so once.
|
|
1693
1707
|
|
|
1694
1708
|
#### Examples
|
|
1695
1709
|
|
|
@@ -1857,9 +1871,9 @@ The `label` is the column header's text, and so what a screen reader says for ev
|
|
|
1857
1871
|
|
|
1858
1872
|
| Prop | Type | Default | Description |
|
|
1859
1873
|
|---|---|---|---|
|
|
1860
|
-
| `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), [Compute a value from the row](#column), [Let the value type decide](#column) and
|
|
1874
|
+
| `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), [Compute a value from the row](#column), [Let the value type decide](#column) and 128 more |
|
|
1861
1875
|
| `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), [Share a column between tables (Presets)](#presets) |
|
|
1862
|
-
| `format` | `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), [Set wording and formats once (Provider)](#provider), [Pick a standard format (Formats)](#formats) and
|
|
1876
|
+
| `format` | `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), [Set wording and formats once (Provider)](#provider), [Pick a standard format (Formats)](#formats) and 36 more |
|
|
1863
1877
|
| `filter` | `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), [Share a column between tables (Presets)](#presets), [Choose from the values that occur (Filter)](#filter) and 11 more |
|
|
1864
1878
|
| `group` | `GroupFor``<Z[K]>` | — | Groups points in time by `"day"`, `"week"`, `"month"` or `"year"`.<br>Shown in: [Share a column between tables (Presets)](#presets), [Group dates by month (Grouping)](#grouping-1) |
|
|
1865
1879
|
| `edit` | `EditFor``<Z[K], Z>` | — | Edits the column's cells in place in grid mode: Enter, F2 or typing starts it, Enter or Tab commits, Escape cancels. The table applies nothing - the edit is reported through the table's `onCellEdit`. From `EditOptions`.<br>Shown in: [Share a column between tables (Presets)](#presets), [Combine grid mode with groups, pinning and many rows (Grid mode)](#grid-mode), [Edit a comments column (Edits)](#edits) and 6 more |
|
|
@@ -1873,13 +1887,13 @@ Also every prop of `ColumnBase`, `ValuePaths` and `AggregateOptions`.
|
|
|
1873
1887
|
|
|
1874
1888
|
| Prop | Type | Default | Description |
|
|
1875
1889
|
|---|---|---|---|
|
|
1876
|
-
| `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), [Compute a value from the row](#column), [Let the value type decide](#column) and
|
|
1877
|
-
| `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), [Compute a value from the row](#column), [Let the value type decide](#column) and
|
|
1890
|
+
| `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), [Compute a value from the row](#column), [Let the value type decide](#column) and 128 more |
|
|
1891
|
+
| `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), [Compute a value from the row](#column), [Let the value type decide](#column) and 127 more |
|
|
1878
1892
|
| `numeric` | `boolean` | decided by the first value present | Right-aligned with tabular figures.<br>Shown in: [Share a column between tables (Presets)](#presets) |
|
|
1879
1893
|
| `width` | `number` | the browser's | Initial width in pixels.<br>Shown in: [Fit long values (Formats)](#formats), [Fit what does not fit (Formats)](#formats), [Let people set the width (Width and pinning)](#width-and-pinning) and 15 more |
|
|
1880
1894
|
| `resizable` | `boolean` | — | Shows the drag grip on the header cell.<br>Shown in: [Let people set the width (Width and pinning)](#width-and-pinning), [Pin and size from controls of your own (Width and pinning)](#width-and-pinning), [Share a column between tables (Presets)](#presets) and 1 more |
|
|
1881
1895
|
| `pin` | `Pin`<br>`"start" \| "end"` | — | Keeps the column in view while the table scrolls sideways: in a block before every other column, or after them. The user can change it in the column menu; the view carries the change. Pinned blocks take at most half of the width the table shows: on a narrower one the end block, then the start block scrolls with the rest, and sticks again when there is room.<br>Shown in: [Pin columns to both sides (Width and pinning)](#width-and-pinning), [Share a column between tables (Presets)](#presets), [Combine grid mode with groups, pinning and many rows (Grid mode)](#grid-mode) and 1 more |
|
|
1882
|
-
| `sortable` | `boolean` | `true` when the value is text, a number, a point in time or a boolean | Whether the column can be sorted by.<br>Shown in: [Fit long values (Formats)](#formats), [Fit what does not fit (Formats)](#formats), [Let people set the width (Width and pinning)](#width-and-pinning) and
|
|
1896
|
+
| `sortable` | `boolean` | `true` when the value is text, a number, a point in time or a boolean | Whether the column can be sorted by.<br>Shown in: [Fit long values (Formats)](#formats), [Fit what does not fit (Formats)](#formats), [Let people set the width (Width and pinning)](#width-and-pinning) and 9 more |
|
|
1883
1897
|
| `searchable` | `boolean` | `true` for text, `false` otherwise | Takes part in the search.<br>Shown in: [Share a column between tables (Presets)](#presets), [Leave a column out (Search)](#search), [An uneven organisation (Tree rows)](#tree-rows) |
|
|
1884
1898
|
| `groupable` | `boolean` | `true` when its value is text, a number, a point in time or a boolean, or it has a `groupValue` | Can the table be grouped by this column?<br>Shown in: [Share a column between tables (Presets)](#presets), [Switch grouping off (Grouping)](#grouping-1) |
|
|
1885
1899
|
|
|
@@ -2692,7 +2706,7 @@ From `ActionProps` — the full table stands on [RowActions](#rowactions).
|
|
|
2692
2706
|
|
|
2693
2707
|
| Prop | Type | Default | Description |
|
|
2694
2708
|
|---|---|---|---|
|
|
2695
|
-
| [`onSelect`](#rowactions)
|
|
2709
|
+
| [`onSelect`](#rowactions) | `(row: Z) => void` | — | Gets the row the action was triggered on. |
|
|
2696
2710
|
|
|
2697
2711
|
From `ToolbarProps` — the full table stands on [Toolbar](#toolbar).
|
|
2698
2712
|
|
|
@@ -3055,13 +3069,13 @@ From `ExportProps` — the full table stands on [Export](#export).
|
|
|
3055
3069
|
|
|
3056
3070
|
| Prop | Type | Default | Description |
|
|
3057
3071
|
|---|---|---|---|
|
|
3058
|
-
| [`onExport`](#export) | `(
|
|
3072
|
+
| [`onExport`](#export) | `(content: R) => void` | — | Gets what the format wrote instead of triggering a file. |
|
|
3059
3073
|
|
|
3060
3074
|
#### Known limits
|
|
3061
3075
|
|
|
3062
3076
|
- In [server mode](#server-mode) the table sorts nothing itself; the sort goes to the server in the request.
|
|
3063
3077
|
|
|
3064
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
3078
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
3065
3079
|
|
|
3066
3080
|
### Search
|
|
3067
3081
|
|
|
@@ -3285,7 +3299,7 @@ type TableRef = Omit<TableSnapshot<unknown>, "setFilter" | "conditionOf"> & {
|
|
|
3285
3299
|
|
|
3286
3300
|
- In [server mode](#server-mode) the table searches nothing itself; the term goes to the server in the request.
|
|
3287
3301
|
|
|
3288
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
3302
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
3289
3303
|
|
|
3290
3304
|
### Filter
|
|
3291
3305
|
|
|
@@ -4312,7 +4326,7 @@ type Absent = null | undefined;
|
|
|
4312
4326
|
- No text filter per column: the search covers text.
|
|
4313
4327
|
- In [server mode](#server-mode) a list filter offers what the application names; the table cannot count values it does not hold.
|
|
4314
4328
|
|
|
4315
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
4329
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
4316
4330
|
|
|
4317
4331
|
### Pre-filter
|
|
4318
4332
|
|
|
@@ -5594,11 +5608,11 @@ export default function GroupAndFoldFromControls() {
|
|
|
5594
5608
|
|
|
5595
5609
|
#### Known limits
|
|
5596
5610
|
|
|
5597
|
-
- No pivot and no more than three levels ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
5611
|
+
- No pivot and no more than three levels ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md)).
|
|
5598
5612
|
- No bar to drag headers onto: grouping is chosen in the column menu.
|
|
5599
5613
|
- No groups in [server mode](#server-mode): they would be made of one page.
|
|
5600
5614
|
|
|
5601
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
5615
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
5602
5616
|
|
|
5603
5617
|
### Tree rows
|
|
5604
5618
|
|
|
@@ -6196,7 +6210,7 @@ From `ToolbarProps` — the full table stands on [Toolbar](#toolbar).
|
|
|
6196
6210
|
- Not in [server mode](#server-mode), and no branches loaded on demand yet.
|
|
6197
6211
|
- One column set for every level; a level without a value shows it as absent.
|
|
6198
6212
|
|
|
6199
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
6213
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6200
6214
|
|
|
6201
6215
|
### Aggregate
|
|
6202
6216
|
|
|
@@ -6620,7 +6634,7 @@ The keys of [First table](#first-table) and Input apply here.
|
|
|
6620
6634
|
|
|
6621
6635
|
| Prop | Type | Default | Description |
|
|
6622
6636
|
|---|---|---|---|
|
|
6623
|
-
| `aggregate` | `AggregateFor``<W, Z>` | — | What the column's values come to: in the footer over the filtered set, in a group's header over its rows. `"sum"`, `"avg"` for numbers; `"min"`, `"max"` for numbers and points in time; `"range"` for points in time; `"count"`, `"distinct"` for every value with a text form - or a function of one's own. Always from the values, never from other aggregates; absent values count towards nothing.<br>Shown in: [Total a column](#aggregate), [Find the extremes](#aggregate), [Show a range of dates](#aggregate) and
|
|
6637
|
+
| `aggregate` | `AggregateFor``<W, Z>` | — | What the column's values come to: in the footer over the filtered set, in a group's header over its rows. `"sum"`, `"avg"` for numbers; `"min"`, `"max"` for numbers and points in time; `"range"` for points in time; `"count"`, `"distinct"` for every value with a text form - or a function of one's own. Always from the values, never from other aggregates; absent values count towards nothing.<br>Shown in: [Total a column](#aggregate), [Find the extremes](#aggregate), [Show a range of dates](#aggregate) and 36 more |
|
|
6624
6638
|
| `share` | `boolean` | — | The share bar in a group's header – the group's share of the filtered set's sum. It stands under the first column with a sum, one per header; `false` passes it on to the next.<br>Shown in: [Show each group's share](#aggregate), [Weight a rate by its rows](#aggregate), [Share a column between tables (Presets)](#presets) and 2 more |
|
|
6625
6639
|
|
|
6626
6640
|
##### Types on this page
|
|
@@ -6689,9 +6703,9 @@ type Displayable = string | number | boolean | Date;
|
|
|
6689
6703
|
|
|
6690
6704
|
#### Known limits
|
|
6691
6705
|
|
|
6692
|
-
-
|
|
6706
|
+
- In [server mode](#server-mode) the footer shows the sums the server hands in as `totals`, and nothing without them: a sum over one page would misstate the server's set.
|
|
6693
6707
|
|
|
6694
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
6708
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6695
6709
|
|
|
6696
6710
|
## Rows
|
|
6697
6711
|
|
|
@@ -6918,9 +6932,9 @@ From `ToolbarProps` — the full table stands on [Toolbar](#toolbar).
|
|
|
6918
6932
|
|
|
6919
6933
|
#### Known limits
|
|
6920
6934
|
|
|
6921
|
-
- In [server mode](#server-mode) “select all” selects the page the table holds.
|
|
6935
|
+
- In [server mode](#server-mode) “select all” selects the page, and with the page ticked the table offers all that match: a state that a bulk action receives as `{ request, except }`, since the table holds no rows for it.
|
|
6922
6936
|
|
|
6923
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
6937
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6924
6938
|
|
|
6925
6939
|
### Row appearance
|
|
6926
6940
|
|
|
@@ -7706,22 +7720,22 @@ What an action does is the application's to say: a result that should be heard -
|
|
|
7706
7720
|
|
|
7707
7721
|
| Prop | Type | Default | Description |
|
|
7708
7722
|
|---|---|---|---|
|
|
7709
|
-
| `children` *required* | `ReactNode` | — | The row's `Action`s.<br>Shown in: [Two actions](#rowactions), [Act on a selection](#rowactions), [More than two actions](#rowactions) and
|
|
7723
|
+
| `children` *required* | `ReactNode` | — | The row's `Action`s.<br>Shown in: [Two actions](#rowactions), [Act on a selection](#rowactions), [More than two actions](#rowactions) and 8 more |
|
|
7710
7724
|
| `pin` | `boolean` | `true` | Whether the actions column sticks at the end of the row while the table scrolls sideways. `false` leaves it in the flow, for a place too narrow for a pinned block - the application decides, by its own measure. A column pinned to the end takes the actions with it regardless.<br>Shown in: [Find a late shipment (Scenarios)](#find-a-late-shipment) |
|
|
7711
7725
|
|
|
7712
|
-
##### `ActionProps<Z>`
|
|
7726
|
+
##### `ActionProps<Z, S extends boolean = false>`
|
|
7713
7727
|
|
|
7714
7728
|
| Prop | Type | Default | Description |
|
|
7715
7729
|
|---|---|---|---|
|
|
7716
|
-
| `children` *required* | `string` | — | The label – text, because it is read out together with the row's name.<br>Shown in: [Two actions](#rowactions), [Act on a selection](#rowactions), [More than two actions](#rowactions) and
|
|
7730
|
+
| `children` *required* | `string` | — | The label – text, because it is read out together with the row's name.<br>Shown in: [Two actions](#rowactions), [Act on a selection](#rowactions), [More than two actions](#rowactions) and 8 more |
|
|
7717
7731
|
| `tone` | `"default" \| "danger"` | — | `"danger"` for an action that destroys something – that is how it appears in the menu and in the table toolbar.<br>Shown in: [More than two actions](#rowactions), [Find a late shipment (Scenarios)](#find-a-late-shipment) |
|
|
7718
|
-
| `bulk` | `false \| true` | — | Acts on a list: at the row on a list made from it, in the table toolbar on the selection within the filtered set.<br>Shown in: [Act on a selection](#rowactions), [Select a whole group (Grouping)](#grouping-1), [Read a day's deliveries by depot (Grouping)](#grouping-1) and
|
|
7732
|
+
| `bulk` | `false \| true` | — | Acts on a list: at the row on a list made from it, in the table toolbar on the selection within the filtered set.<br>Shown in: [Act on a selection](#rowactions), [Select a whole group (Grouping)](#grouping-1), [Read a day's deliveries by depot (Grouping)](#grouping-1) and 3 more |
|
|
7719
7733
|
|
|
7720
7734
|
###### Events
|
|
7721
7735
|
|
|
7722
7736
|
| Prop | Type | Default | Description |
|
|
7723
7737
|
|---|---|---|---|
|
|
7724
|
-
| `onSelect`
|
|
7738
|
+
| `onSelect` | `(row: Z) => void` | — | Gets the row the action was triggered on.<br>Shown in: [Two actions](#rowactions), [Act on a selection](#rowactions), [More than two actions](#rowactions) and 8 more |
|
|
7725
7739
|
|
|
7726
7740
|
## Around the table
|
|
7727
7741
|
|
|
@@ -7906,7 +7920,7 @@ The parts the table puts in name themselves: the search field “Search table”
|
|
|
7906
7920
|
|
|
7907
7921
|
| Prop | Type | Default | Description |
|
|
7908
7922
|
|---|---|---|---|
|
|
7909
|
-
| `children` | `ReactNode` | — | Search, column menu, export – on the left in the table toolbar, before the conditions.<br>Shown in: [Search, arrange and export](#toolbar), [Place it outside the table](#toolbar), [Set wording and formats once (Provider)](#provider) and
|
|
7923
|
+
| `children` | `ReactNode` | — | Search, column menu, export – on the left in the table toolbar, before the conditions.<br>Shown in: [Search, arrange and export](#toolbar), [Place it outside the table](#toolbar), [Set wording and formats once (Provider)](#provider) and 40 more |
|
|
7910
7924
|
| `size` | `ToolbarSize`<br>`"sm" \| "md"` | `"sm"` | The size of every control the table puts into it - search, column menu, export, "reset", the bulk actions -: `sm` or `md`. A control of one's own takes the same size by its own prop.<br>Shown in: [A larger toolbar (Toolbar controls)](#toolbar-controls), [A dispatcher's bar (Toolbar controls)](#toolbar-controls) |
|
|
7911
7925
|
| `of` | `TableRef` | — | The table, when the table toolbar does not stand inside it. If it then stands behind the table in the tree, it registers only after the first frame – until then a table with a search or a column filter shows its own toolbar. Placed before the table, there is no such change.<br>Shown in: [Place it outside the table](#toolbar), [Review cost centres against budget (Scenarios)](#review-cost-centres-against-budget) |
|
|
7912
7926
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [Find a late shipment (Scenarios)](#find-a-late-shipment), [Plan the team's capacity (Scenarios)](#plan-the-teams-capacity) |
|
|
@@ -8631,7 +8645,7 @@ The keys of [First table](#first-table), Input, [ColumnMenu](#columnmenu), Selec
|
|
|
8631
8645
|
|
|
8632
8646
|
| Prop | Type | Default | Description |
|
|
8633
8647
|
|---|---|---|---|
|
|
8634
|
-
| `children` | `ReactNode` | — | Search, column menu, export – on the left in the table toolbar, before the conditions.<br>Shown in: [Controls of your own at the toolbar's size](#toolbar-controls), [A larger toolbar](#toolbar-controls), [A dispatcher's bar](#toolbar-controls) and
|
|
8648
|
+
| `children` | `ReactNode` | — | Search, column menu, export – on the left in the table toolbar, before the conditions.<br>Shown in: [Controls of your own at the toolbar's size](#toolbar-controls), [A larger toolbar](#toolbar-controls), [A dispatcher's bar](#toolbar-controls) and 40 more |
|
|
8635
8649
|
| `size` | `ToolbarSize`<br>`"sm" \| "md"` | `"sm"` | The size of every control the table puts into it - search, column menu, export, "reset", the bulk actions -: `sm` or `md`. A control of one's own takes the same size by its own prop.<br>Shown in: [A larger toolbar](#toolbar-controls), [A dispatcher's bar](#toolbar-controls) |
|
|
8636
8650
|
| `of` | `TableRef` | — | The table, when the table toolbar does not stand inside it. If it then stands behind the table in the tree, it registers only after the first frame – until then a table with a search or a column filter shows its own toolbar. Placed before the table, there is no such change.<br>Shown in: [Place it outside the table (Toolbar)](#toolbar), [Review cost centres against budget (Scenarios)](#review-cost-centres-against-budget) |
|
|
8637
8651
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [Find a late shipment (Scenarios)](#find-a-late-shipment), [Plan the team's capacity (Scenarios)](#plan-the-teams-capacity) |
|
|
@@ -8818,9 +8832,9 @@ A button that writes the rows the user sees into a CSV file for a spreadsheet (a
|
|
|
8818
8832
|
import { Export } from "@umriss-ui/table";
|
|
8819
8833
|
```
|
|
8820
8834
|
|
|
8821
|
-
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
|
|
8835
|
+
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 column of days as its day (2026-03-17), any other point in time as an ISO 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)).
|
|
8822
8836
|
|
|
8823
|
-
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.
|
|
8837
|
+
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; with `exportRows` it asks the application for every match and writes those. The same text is `t.asCsv()`, without a button. `format={xlsx}` from `@umriss-ui/table/xlsx` writes an Excel workbook instead - numbers, dates and booleans as what they are, the table's column widths, dates in the reader's local time - and `label` lets two buttons stand side by side; `onExport` then gets the bytes. A sheet over 1,048,576 rows throws a `RangeError`, and a text over 32,767 characters is cut.
|
|
8824
8838
|
|
|
8825
8839
|
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.
|
|
8826
8840
|
|
|
@@ -8953,17 +8967,118 @@ export default function CopyTheSelection() {
|
|
|
8953
8967
|
}
|
|
8954
8968
|
```
|
|
8955
8969
|
|
|
8970
|
+
##### Choose the format
|
|
8971
|
+
|
|
8972
|
+
Hand `Export` a `format` – `csv` or one of your own, a value with an extension, a MIME type and a `write` – and name its button with `label`; `exportAs` writes the same format without a button.
|
|
8973
|
+
|
|
8974
|
+
```tsx
|
|
8975
|
+
import { useState } from "react";
|
|
8976
|
+
import { Stack, Text } from "@umriss-ui/core";
|
|
8977
|
+
import { Export, Toolbar, csv, useTable } from "@umriss-ui/table";
|
|
8978
|
+
import type { ExportFormat } from "@umriss-ui/table";
|
|
8979
|
+
|
|
8980
|
+
interface Shipment {
|
|
8981
|
+
id: string;
|
|
8982
|
+
weight: number;
|
|
8983
|
+
delivered: Date | null;
|
|
8984
|
+
}
|
|
8985
|
+
|
|
8986
|
+
const SHIPMENTS: Shipment[] = [
|
|
8987
|
+
{ id: "FP-1004210", weight: 23.5, delivered: new Date(Date.UTC(2026, 2, 17, 8, 12)) },
|
|
8988
|
+
{ id: "FP-1004223", weight: 14, delivered: null },
|
|
8989
|
+
];
|
|
8990
|
+
|
|
8991
|
+
/* Writes the sheet as JSON: the typed cells, a date as its ISO text. */
|
|
8992
|
+
const json: ExportFormat = {
|
|
8993
|
+
extension: "json",
|
|
8994
|
+
mime: "application/json",
|
|
8995
|
+
write: (sheet) =>
|
|
8996
|
+
JSON.stringify(sheet.rows.map((row) => Object.fromEntries(sheet.columns.map((c, i) => [c.label, row[i]])))),
|
|
8997
|
+
};
|
|
8998
|
+
|
|
8999
|
+
export default function ChooseTheFormat() {
|
|
9000
|
+
const [text, setText] = useState("Not exported yet.");
|
|
9001
|
+
const table = useTable(SHIPMENTS, { rowKey: (s) => s.id });
|
|
9002
|
+
const { Table, Column } = table;
|
|
9003
|
+
|
|
9004
|
+
return (
|
|
9005
|
+
<Stack gap={3}>
|
|
9006
|
+
<Table aria-label="Shipments to export">
|
|
9007
|
+
<Toolbar>
|
|
9008
|
+
<Export format={csv} label="Export CSV" onExport={setText} />
|
|
9009
|
+
<Export format={json} label="Export JSON" onExport={setText} />
|
|
9010
|
+
</Toolbar>
|
|
9011
|
+
<Column value="id" label="Shipment" rowHeader />
|
|
9012
|
+
<Column value="weight" label="Weight (kg)" />
|
|
9013
|
+
<Column value="delivered" label="Delivered" format="dateTime" />
|
|
9014
|
+
</Table>
|
|
9015
|
+
<Text as="pre" size="xs" mono>
|
|
9016
|
+
{text}
|
|
9017
|
+
</Text>
|
|
9018
|
+
<Text size="xs">{table.exportAs(json).length} characters as JSON</Text>
|
|
9019
|
+
</Stack>
|
|
9020
|
+
);
|
|
9021
|
+
}
|
|
9022
|
+
```
|
|
9023
|
+
|
|
9024
|
+
##### An Excel file
|
|
9025
|
+
|
|
9026
|
+
Hand `Export` the `xlsx` format from `@umriss-ui/table/xlsx` for a workbook with real numbers, dates and booleans; with `onExport` it gets the bytes, for a server. An application that never imports the subpath never pays for it.
|
|
9027
|
+
|
|
9028
|
+
```tsx
|
|
9029
|
+
import { useState } from "react";
|
|
9030
|
+
import { Stack, Text } from "@umriss-ui/core";
|
|
9031
|
+
import { Export, Toolbar, csv, useTable } from "@umriss-ui/table";
|
|
9032
|
+
import { xlsx } from "@umriss-ui/table/xlsx";
|
|
9033
|
+
|
|
9034
|
+
interface Shipment {
|
|
9035
|
+
id: string;
|
|
9036
|
+
weight: number;
|
|
9037
|
+
delivered: Date | null;
|
|
9038
|
+
signed: boolean;
|
|
9039
|
+
}
|
|
9040
|
+
|
|
9041
|
+
const SHIPMENTS: Shipment[] = [
|
|
9042
|
+
{ id: "FP-1004210", weight: 23.5, delivered: new Date(2026, 2, 17, 8, 12), signed: true },
|
|
9043
|
+
{ id: "FP-1004223", weight: 14, delivered: null, signed: false },
|
|
9044
|
+
];
|
|
9045
|
+
|
|
9046
|
+
export default function AnExcelFile() {
|
|
9047
|
+
const [size, setSize] = useState<number | null>(null);
|
|
9048
|
+
const { Table, Column } = useTable(SHIPMENTS, { rowKey: (s) => s.id });
|
|
9049
|
+
|
|
9050
|
+
return (
|
|
9051
|
+
<Stack gap={3}>
|
|
9052
|
+
<Table aria-label="Shipments to export">
|
|
9053
|
+
<Toolbar>
|
|
9054
|
+
<Export format={csv} label="Export CSV" />
|
|
9055
|
+
<Export format={xlsx} label="Export Excel" />
|
|
9056
|
+
<Export format={xlsx} label="Take the bytes" onExport={(bytes) => setSize(bytes.length)} />
|
|
9057
|
+
</Toolbar>
|
|
9058
|
+
<Column value="id" label="Shipment" rowHeader />
|
|
9059
|
+
<Column value="weight" label="Weight (kg)" />
|
|
9060
|
+
<Column value="delivered" label="Delivered" format="dateTime" />
|
|
9061
|
+
<Column value="signed" label="Signed" />
|
|
9062
|
+
</Table>
|
|
9063
|
+
<Text size="xs">{size === null ? "Not exported yet." : `${size} bytes of workbook`}</Text>
|
|
9064
|
+
</Stack>
|
|
9065
|
+
);
|
|
9066
|
+
}
|
|
9067
|
+
```
|
|
9068
|
+
|
|
8956
9069
|
#### Keyboard
|
|
8957
9070
|
|
|
8958
9071
|
The keys of [First table](#first-table), Input and Button apply here.
|
|
8959
9072
|
|
|
8960
9073
|
#### API
|
|
8961
9074
|
|
|
8962
|
-
##### `ExportProps
|
|
9075
|
+
##### `ExportProps<R = string>`
|
|
8963
9076
|
|
|
8964
9077
|
| Prop | Type | Default | Description |
|
|
8965
9078
|
|---|---|---|---|
|
|
8966
|
-
| `
|
|
9079
|
+
| `format` | `ExportFormat``<R>` | `csv` | What is written: `csv`, or a format of one's own.<br>Shown in: [Choose the format](#export), [An Excel file](#export) |
|
|
9080
|
+
| `filename` | `string` | the base of the wording's "table.csv" with the format's extension | File name of the download.<br>Shown in: [Download a file](#export), [Set wording and formats once (Provider)](#provider), [Search takes the line (Search)](#search) and 6 more |
|
|
9081
|
+
| `label` | `ReactNode` | the wording's export label | The button's text.<br>Shown in: [Choose the format](#export), [An Excel file](#export) |
|
|
8967
9082
|
| `size` | `ToolbarSize`<br>`"sm" \| "md"` | the size of the toolbar it stands in, `"sm"` outside one | The size of the part: `sm` or `md`.<br>Shown in: [Parts outside a toolbar (Toolbar)](#toolbar) |
|
|
8968
9083
|
| `of` | `TableRef` | — | The table, when the part does not stand inside it: the return value of `useTable`.<br>Shown in: [Place it outside the table (Toolbar)](#toolbar), [Parts outside a toolbar (Toolbar)](#toolbar), [Review cost centres against budget (Scenarios)](#review-cost-centres-against-budget) |
|
|
8969
9084
|
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [Find a late shipment (Scenarios)](#find-a-late-shipment), [Plan the team's capacity (Scenarios)](#plan-the-teams-capacity) |
|
|
@@ -8972,12 +9087,23 @@ The keys of [First table](#first-table), Input and Button apply here.
|
|
|
8972
9087
|
|
|
8973
9088
|
| Prop | Type | Default | Description |
|
|
8974
9089
|
|---|---|---|---|
|
|
8975
|
-
| `onExport` | `(
|
|
9090
|
+
| `onExport` | `(content: R) => void` | — | Gets what the format wrote instead of triggering a file.<br>Shown in: [Take the text](#export), [Choose the format](#export), [An Excel file](#export) and 1 more |
|
|
8976
9091
|
|
|
8977
9092
|
Also takes every attribute of `<button>`.
|
|
8978
9093
|
|
|
8979
9094
|
##### Types on this page
|
|
8980
9095
|
|
|
9096
|
+
###### `ExportFormat<R = string>`
|
|
9097
|
+
|
|
9098
|
+
A way to write the export: the file's extension and MIME type, and the
|
|
9099
|
+
function that turns the sheet into `R` - text or bytes.
|
|
9100
|
+
|
|
9101
|
+
| Prop | Type | Default | Description |
|
|
9102
|
+
|---|---|---|---|
|
|
9103
|
+
| `extension` *required* | `string` | — | <br>Shown in: [Choose the format](#export) |
|
|
9104
|
+
| `mime` *required* | `string` | — | <br>Shown in: [Choose the format](#export) |
|
|
9105
|
+
| `write` *required* | `(sheet: ``ExportSheet``, context: ``ExportContext``) => R` | — | <br>Shown in: [Choose the format](#export) |
|
|
9106
|
+
|
|
8981
9107
|
###### `ToolbarSize`
|
|
8982
9108
|
|
|
8983
9109
|
The size of a toolbar's controls.
|
|
@@ -8998,11 +9124,394 @@ type TableRef = Omit<TableSnapshot<unknown>, "setFilter" | "conditionOf"> & {
|
|
|
8998
9124
|
};
|
|
8999
9125
|
```
|
|
9000
9126
|
|
|
9127
|
+
###### `ExportSheet`
|
|
9128
|
+
|
|
9129
|
+
What a format writes: the header labels, the widths the table holds, whether
|
|
9130
|
+
a column's own `exportValue` made its values (`own`: written as they come),
|
|
9131
|
+
and the rows as typed cells. A tree's level is its first column, a number.
|
|
9132
|
+
|
|
9133
|
+
| Prop | Type | Default | Description |
|
|
9134
|
+
|---|---|---|---|
|
|
9135
|
+
| `columns` *required* | `readonly { label: string; width?: number; own?: true }[]` | — | <br>Shown in: [Choose the format](#export) |
|
|
9136
|
+
| `rows` *required* | `readonly (readonly ``ExportCell``[])[]` | — | <br>Shown in: [Choose the format](#export) |
|
|
9137
|
+
|
|
9138
|
+
###### `ExportContext`
|
|
9139
|
+
|
|
9140
|
+
What the language in use hands a format.
|
|
9141
|
+
|
|
9142
|
+
| Prop | Type | Default | Description |
|
|
9143
|
+
|---|---|---|---|
|
|
9144
|
+
| `formats` *required* | `Formats` | — | |
|
|
9145
|
+
| `wording` *required* | `Wording` | — | |
|
|
9146
|
+
| `wallClock` | `(d: Date) => { year: number; month: number; day: number; hours: number; minutes: number; seconds: number }` | — | The wall-clock fields of an instant in the table's time zone; absent without one, where the writer reads the Date's own. A format that must import nothing gets the zone this way, as data. |
|
|
9147
|
+
|
|
9148
|
+
###### `ExportCell`
|
|
9149
|
+
|
|
9150
|
+
What a spreadsheet cell holds: numbers, booleans and points in time stay
|
|
9151
|
+
what they are, an absent value is `undefined`.
|
|
9152
|
+
|
|
9153
|
+
```ts
|
|
9154
|
+
type ExportCell = string | number | boolean | Date | undefined;
|
|
9155
|
+
```
|
|
9156
|
+
|
|
9157
|
+
###### `Formats`
|
|
9158
|
+
|
|
9159
|
+
From `@umriss-ui/core`.
|
|
9160
|
+
|
|
9161
|
+
Everything the library knows about formatting.
|
|
9162
|
+
|
|
9163
|
+
| Prop | Type | Default | Description |
|
|
9164
|
+
|---|---|---|---|
|
|
9165
|
+
| `locale` *required* | `string` | — | The language tag the set was built in: "en-GB". |
|
|
9166
|
+
| `timeZone` *required* | `string \| undefined` | — | The IANA name of the time zone instants are written in, or `undefined` for the reader's own. |
|
|
9167
|
+
| `timeZoneName` *required* | `(d: Date) => string` | — | The zone's generic name in the set's locale: "Central European Time". Empty until the page has hydrated where no zone is named. |
|
|
9168
|
+
| `date` *required* | `(d: Date) => string` | — | Date as displayed: 17/03/2026<br>Shown in: [Set wording and formats once (Provider)](#provider) |
|
|
9169
|
+
| `dateShort` *required* | `(d: Date) => string` | — | Short form without the year, in the range footer: 17/03 |
|
|
9170
|
+
| `month` *required* | `(d: Date) => string` | — | The calendar's month header: March 2026 |
|
|
9171
|
+
| `monthName` *required* | `(d: Date) => string` | — | The month alone, in the calendar head's month list: March |
|
|
9172
|
+
| `dateLong` *required* | `(d: Date) => string` | — | Accessible name of a calendar cell: Tuesday, 17 March 2026 |
|
|
9173
|
+
| `time` *required* | `(d: Date, withSeconds: boolean) => string` | — | Time of day, optionally with seconds: 09:05 or 09:05:03<br>Shown in: [Work through the alerts (Scenarios)](#work-through-the-alerts), [Find a late shipment (Scenarios)](#find-a-late-shipment) |
|
|
9174
|
+
| `dateTime` *required* | `(d: Date, withSeconds: boolean) => string` | — | Date and time together: 17/03/2026, 09:05 |
|
|
9175
|
+
| `offset` *required* | `(d: Date) => string` | — | Short form of the UTC offset: GMT+2 |
|
|
9176
|
+
| `number` *required* | `(n: number, decimals?: number) => string` | — | A number in the set's notation. Without a digit count the value stands to the tenth decimal place, and a non-zero value that would read 0 there is written in scientific notation; with one it is padded and rounded to exactly that many places. |
|
|
9177
|
+
| `numberWith` *required* | `(n: number, options: Intl.NumberFormatOptions) => string` | — | A number written with Intl's own options in the set's locale: a currency, a year without grouping, scientific notation. Pure Intl options - the `decimals` shorthand is expanded by `writeNumber` before it. Like the others it writes no negative zero unless the options set `signDisplay`. |
|
|
9178
|
+
| `count` *required* | `(n: number) => string` | — | A count. Kept apart from `number` because it makes a different promise: a count is whole, and Intl's own rounding (at most three decimal places) is right for it and wrong for a measurement.<br>Shown in: [Scroll twenty thousand rows (Virtualisation)](#virtualisation) |
|
|
9179
|
+
| `percent` *required* | `(share: number) => string` | — | A share from 0 to 1 as whole per cent: 74 % |
|
|
9180
|
+
| `compareText` *required* | `(a: string, b: string) => number` | — | The ordering of two texts by the set's collation. |
|
|
9181
|
+
| `relative` *required* | `(ms: number) => string` | — | An elapsed duration as a phrase: "3 minutes ago". The amount comes in milliseconds, counted back from now. |
|
|
9182
|
+
|
|
9183
|
+
###### `Wording`
|
|
9184
|
+
|
|
9185
|
+
From `@umriss-ui/core`.
|
|
9186
|
+
|
|
9187
|
+
Everything the library puts out as text.
|
|
9188
|
+
|
|
9189
|
+
| Prop | Type | Default | Description |
|
|
9190
|
+
|---|---|---|---|
|
|
9191
|
+
| `clearInput` *required* | `string` | — | The cross in the text field. |
|
|
9192
|
+
| `clearSelection` *required* | `string` | — | The cross in the select and in the combobox. |
|
|
9193
|
+
| `decreaseValue` *required* | `string` | — | Stepper buttons of the number field. |
|
|
9194
|
+
| `increaseValue` *required* | `string` | — | |
|
|
9195
|
+
| `comboboxPlaceholder` *required* | `string` | — | |
|
|
9196
|
+
| `noMatches` *required* | `string` | — | Empty state of both lists. |
|
|
9197
|
+
| `multiSelectPlaceholder` *required* | `string` | — | |
|
|
9198
|
+
| `multiSelectSearchPlaceholder` *required* | `string` | — | |
|
|
9199
|
+
| `searchOptions` *required* | `string` | — | |
|
|
9200
|
+
| `options` *required* | `string` | — | Group name of the option list. |
|
|
9201
|
+
| `optionScope` *required* | `string` | — | Group name of the scope switch. |
|
|
9202
|
+
| `optionScopeAll` *required* | `string` | — | |
|
|
9203
|
+
| `optionScopeSelected` *required* | `(count: number) => string` | — | The second scope, with the count in the text. |
|
|
9204
|
+
| `selectAll` *required* | `string` | — | |
|
|
9205
|
+
| `selectNone` *required* | `string` | — | |
|
|
9206
|
+
| `invertSelection` *required* | `string` | — | |
|
|
9207
|
+
| `nothingSelected` *required* | `string` | — | |
|
|
9208
|
+
| `removeSelectedValue` *required* | `(beschriftung: string) => string` | — | The cross on a selected value in the trigger. |
|
|
9209
|
+
| `manageMoreSelected` *required* | `(count: number) => string` | — | The "+N" counter in the trigger. |
|
|
9210
|
+
| `multiSelectSummary` *required* | `(gewaehlt: number, total: number) => string` | — | The summary in the panel: "3 / 12". The sentence structure belongs to the language, even where it is only a slash here. |
|
|
9211
|
+
| `optionCount` *required* | `(count: number) => string` | — | How many options stand, when a list opens or its filter changes; never zero - an empty list says its own empty text. Named, like the three below, after the moment it is spoken in: an announcement labels no element. |
|
|
9212
|
+
| `optionActive` *required* | `( label: string, state: { selected?: boolean; disabled?: boolean; group?: string }, ) => string` | — | The option the keys moved onto, with what VoiceOver leaves out. |
|
|
9213
|
+
| `optionAdded` *required* | `(label: string) => string` | — | A value the multi-select took or gave away where no checkbox had the focus to say it - Enter in the search, a chip, Backspace. |
|
|
9214
|
+
| `optionRemoved` *required* | `(label: string) => string` | — | |
|
|
9215
|
+
| `palettePlaceholder` *required* | `string` | — | What stands in the empty field. |
|
|
9216
|
+
| `paletteField` *required* | `string` | — | Accessible name of the field. Deliberately kept apart from the placeholder - whoever labels the field differently does not thereby rename the window. |
|
|
9217
|
+
| `palettePanel` *required* | `string` | — | Accessible name of the window. |
|
|
9218
|
+
| `paletteList` *required* | `string` | — | Accessible name of the list of finds. |
|
|
9219
|
+
| `paletteNoFinds` *required* | `string` | — | The one line when the query finds nothing. |
|
|
9220
|
+
| `paletteFindCount` *required* | `(count: number) => string` | — | What the screen reader hears when the number of finds changes. |
|
|
9221
|
+
| `paletteMoreFinds` *required* | `(count: number) => string` | — | The last line when more finds exist than `maxFinds` lets stand. |
|
|
9222
|
+
| `paletteHintMove` *required* | `string` | — | The three key hints in the footer, each the text beside the key. |
|
|
9223
|
+
| `paletteHintChoose` *required* | `string` | — | |
|
|
9224
|
+
| `paletteHintClose` *required* | `string` | — | |
|
|
9225
|
+
| `paletteKeyEsc` *required* | `string` | — | The legend on the Escape key. The arrows and the return key are glyphs and therefore do not stand here; "Esc" is a word and is called something else elsewhere. |
|
|
9226
|
+
| `datePlaceholder` *required* | `string` | — | |
|
|
9227
|
+
| `datePanel` *required* | `string` | — | Accessible name of the panel. Deliberately kept apart from the placeholder: whoever labels the field differently does not thereby rename the dialog. |
|
|
9228
|
+
| `dateClear` *required* | `string` | — | |
|
|
9229
|
+
| `typeDate` *required* | `string` | — | The name of the DatePicker panel's typed field. |
|
|
9230
|
+
| `notADate` *required* | `string` | — | Announced when the typed text is no date. |
|
|
9231
|
+
| `dateOutOfRange` *required* | `(min: string \| null, max: string \| null) => string` | — | Announced when the typed date lies outside `min` and `max`; each bound is written in the formats in use, `null` where there is none. |
|
|
9232
|
+
| `dateTimePlaceholder` *required* | `string` | — | |
|
|
9233
|
+
| `dateTimePanel` *required* | `string` | — | |
|
|
9234
|
+
| `dateTimeClear` *required* | `string` | — | |
|
|
9235
|
+
| `dateRangePlaceholder` *required* | `string` | — | |
|
|
9236
|
+
| `dateRangePanel` *required* | `string` | — | |
|
|
9237
|
+
| `dateRangeClear` *required* | `string` | — | |
|
|
9238
|
+
| `dateTimeRangePanel` *required* | `string` | — | Accessible name of the panel in the range with time of day. |
|
|
9239
|
+
| `dateTimeRangeClear` *required* | `string` | — | The clearing x of the range with time - kept apart from the range without, so that an application can call the two differently. |
|
|
9240
|
+
| `previousMonth` *required* | `string` | — | |
|
|
9241
|
+
| `nextMonth` *required* | `string` | — | |
|
|
9242
|
+
| `monthSelect` *required* | `string` | — | Name of the calendar head's month list. |
|
|
9243
|
+
| `yearSelect` *required* | `string` | — | Name of the calendar head's year list. |
|
|
9244
|
+
| `quickSelect` *required* | `string` | — | Group name of the preset column. |
|
|
9245
|
+
| `today` *required* | `string` | — | |
|
|
9246
|
+
| `now` *required* | `string` | — | |
|
|
9247
|
+
| `clear` *required* | `string` | — | |
|
|
9248
|
+
| `apply` *required* | `string` | — | |
|
|
9249
|
+
| `allDay` *required* | `string` | — | |
|
|
9250
|
+
| `timeOfDay` *required* | `string` | — | |
|
|
9251
|
+
| `hour` *required* | `string` | — | |
|
|
9252
|
+
| `minute` *required* | `string` | — | |
|
|
9253
|
+
| `second` *required* | `string` | — | |
|
|
9254
|
+
| `sideFrom` *required* | `string` | — | Header of the two time columns in the range with time of day. |
|
|
9255
|
+
| `sideTo` *required* | `string` | — | |
|
|
9256
|
+
| `startHour` *required* | `string` | — | Accessible name of the time fields, per side. |
|
|
9257
|
+
| `startMinute` *required* | `string` | — | |
|
|
9258
|
+
| `startSecond` *required* | `string` | — | |
|
|
9259
|
+
| `endHour` *required* | `string` | — | |
|
|
9260
|
+
| `endMinute` *required* | `string` | — | |
|
|
9261
|
+
| `endSecond` *required* | `string` | — | |
|
|
9262
|
+
| `timeFieldIncrease` *required* | `(feld: string) => string` | — | Stepper buttons of a time field; the label comes from above. |
|
|
9263
|
+
| `timeFieldDecrease` *required* | `(feld: string) => string` | — | |
|
|
9264
|
+
| `chooseStartDate` *required* | `string` | — | Footer of the range panels. |
|
|
9265
|
+
| `chooseEndDate` *required* | `string` | — | |
|
|
9266
|
+
| `days` *required* | `(count: number) => string` | — | "3 days" or "1 day" - the plural belongs to the language. |
|
|
9267
|
+
| `daysSelected` *required* | `(count: number) => string` | — | "3 days selected" |
|
|
9268
|
+
| `rangePreview` *required* | `(from: string, to: string, count: number) => string` | — | "17.03. – 19.03. · 3 days" while dragging; the dates come from the formats. |
|
|
9269
|
+
| `daysAllDay` *required* | `(count: number) => string` | — | "3 days (all day)" |
|
|
9270
|
+
| `duration` *required* | `(teile: readonly string[]) => string` | — | "Duration: 1 day 2 hrs 30 min" |
|
|
9271
|
+
| `hoursShort` *required* | `(count: number) => string` | — | |
|
|
9272
|
+
| `minutesShort` *required* | `(count: number) => string` | — | |
|
|
9273
|
+
| `timeMissingHint` *required* | `(timeOfDay: string) => string` | — | Daylight-saving change: the hour that does not exist. |
|
|
9274
|
+
| `timeMissingHintSide` *required* | `(side: string, timeOfDay: string) => string` | — | The same, with the side put in front ("From"/"To"). |
|
|
9275
|
+
| `timeAmbiguousHint` *required* | `string` | — | Daylight-saving change: the hour that occurs twice. |
|
|
9276
|
+
| `timeAmbiguousHintSide` *required* | `(side: string) => string` | — | |
|
|
9277
|
+
| `timeEarlier` *required* | `(versatz: string) => string` | — | |
|
|
9278
|
+
| `timeLater` *required* | `(versatz: string) => string` | — | |
|
|
9279
|
+
| `weekdays` *required* | `readonly string[]` | — | The calendar's weekday headers, starting at Monday. |
|
|
9280
|
+
| `presets` *required* | `{ today: string; yesterday: string; last7Days: string; last30Days: string; thisMonth: string; previousMonth: string; thisQuarter: string; thisYear: string; }` | — | The quick-select ranges, in the order of PRESET_LABELS. |
|
|
9281
|
+
| `pagination` *required* | `string` | — | |
|
|
9282
|
+
| `rows` *required* | `string` | — | |
|
|
9283
|
+
| `rowsPerPage` *required* | `string` | — | |
|
|
9284
|
+
| `pageOfPages` *required* | `(page: number, total: number, formatted?: { page: string; total: string }) => string` | — | "Page 2 of 7". `formatted` carries both numbers in the provider's formats, where the caller has them - a table over a server has "Page 1 of 100,000". |
|
|
9285
|
+
| `previousPage` *required* | `string` | — | |
|
|
9286
|
+
| `nextPage` *required* | `string` | — | |
|
|
9287
|
+
| `filterReset` *required* | `string` | — | The two buttons in the column filter's footer. |
|
|
9288
|
+
| `filterDone` *required* | `string` | — | |
|
|
9289
|
+
| `columns` *required* | `string` | — | The column menu's button.<br>Shown in: [Set wording and formats once (Provider)](#provider) |
|
|
9290
|
+
| `arrangeColumns` *required* | `string` | — | Accessible name of the list in the column menu. |
|
|
9291
|
+
| `columnForward` *required* | `(column: string) => string` | — | The two buttons that move a column in the column menu. |
|
|
9292
|
+
| `columnBackward` *required* | `(column: string) => string` | — | |
|
|
9293
|
+
| `pinColumnToStart` *required* | `(column: string) => string` | — | The column menu's pin keys: to a side, and back when it is pinned there. |
|
|
9294
|
+
| `pinColumnToEnd` *required* | `(column: string) => string` | — | |
|
|
9295
|
+
| `unpinColumn` *required* | `(column: string) => string` | — | |
|
|
9296
|
+
| `columnForwardHint` *required* | `string` | — | The tooltips over those four keys: short, without the column, which stands in the same line. The keys' names above keep it for a screen reader. |
|
|
9297
|
+
| `columnBackwardHint` *required* | `string` | — | |
|
|
9298
|
+
| `pinToStartHint` *required* | `string` | — | |
|
|
9299
|
+
| `pinToEndHint` *required* | `string` | — | |
|
|
9300
|
+
| `unpinHint` *required* | `string` | — | |
|
|
9301
|
+
| `exportLabel` *required* | `string` | — | The export button.<br>Shown in: [Set wording and formats once (Provider)](#provider) |
|
|
9302
|
+
| `exportPageLabel` *required* | `string` | — | The export button of a table in server mode, which holds and writes one page. |
|
|
9303
|
+
| `exporting` *required* | `string` | — | The status while the application prepares an export of every match. |
|
|
9304
|
+
| `exportFailed` *required* | `string` | — | The alert beside the export button when preparing the export failed without a message. |
|
|
9305
|
+
| `exportFileName` *required* | `string` | — | The export's file name, where the application names none. |
|
|
9306
|
+
| `exportSheetName` *required* | `string` | — | The name of the sheet an XLSX export holds. |
|
|
9307
|
+
| `tableSearchPlaceholder` *required* | `string` | — | Placeholder and accessible name of the search field.<br>Shown in: [Set wording and formats once (Provider)](#provider) |
|
|
9308
|
+
| `tableSearchLabel` *required* | `string` | — | |
|
|
9309
|
+
| `filterColumn` *required* | `(column: string) => string` | — | The filter button of a column: "Filter Region". |
|
|
9310
|
+
| `filterHint` *required* | `string` | — | The tooltip over that button. |
|
|
9311
|
+
| `selectRow` *required* | `(row: string) => string` | — | The selection of one row, named after its row header. |
|
|
9312
|
+
| `selectAllRows` *required* | `string` | — | The selection of every row in the filtered set. |
|
|
9313
|
+
| `selectAllOnPage` *required* | `string` | — | The same checkbox in server mode, where the table holds one page of a server's. |
|
|
9314
|
+
| `expandRowNamed` *required* | `(row: string) => string` | — | The expand button, named after the row header. |
|
|
9315
|
+
| `collapseRowNamed` *required* | `(row: string) => string` | — | |
|
|
9316
|
+
| `rowActions` *required* | `string` | — | Header of the actions column - for the screen reader, not visible. |
|
|
9317
|
+
| `rowAction` *required* | `(aktion: string, row: string) => string` | — | One action on a row: "Open: A-2041". |
|
|
9318
|
+
| `rowActionsMenu` *required* | `(row: string) => string` | — | The menu holding a row's actions. |
|
|
9319
|
+
| `editCell` *required* | `(column: string, row: string) => string` | — | The editor of a cell in a table's grid mode, named after its column and its row: "Edit Budget: Marketing". |
|
|
9320
|
+
| `newRow` *required* | `string` | — | The button above a grid that opens an empty row to fill in, and the name of that row while it has none ([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)). |
|
|
9321
|
+
| `saveRow` *required* | `string` | — | A row draft's buttons, named with the row through `rowAction`. |
|
|
9322
|
+
| `discardRow` *required* | `string` | — | |
|
|
9323
|
+
| `deleteRow` *required* | `string` | — | A row's delete button, and its question once pressed: Delete? Delete / Keep. |
|
|
9324
|
+
| `deleteRowAsk` *required* | `string` | — | |
|
|
9325
|
+
| `keepRow` *required* | `string` | — | |
|
|
9326
|
+
| `saveOrDiscardFirst` *required* | `string` | — | Said where someone tries to leave a row draft unsaved. |
|
|
9327
|
+
| `cellAbsentValue` *required* | `string` | — | What the screen reader hears for an absent value. Visibly a muted dash stands there. |
|
|
9328
|
+
| `booleanYes` *required* | `string` | — | A boolean without a presentation of its own. |
|
|
9329
|
+
| `booleanNo` *required* | `string` | — | |
|
|
9330
|
+
| `footerSum` *required* | `string` | — | The kind of a footer number, read out before the number. |
|
|
9331
|
+
| `footerAverage` *required* | `string` | — | |
|
|
9332
|
+
| `footerMinimum` *required* | `string` | — | |
|
|
9333
|
+
| `footerMaximum` *required* | `string` | — | |
|
|
9334
|
+
| `footerRange` *required* | `string` | — | |
|
|
9335
|
+
| `footerCount` *required* | `string` | — | |
|
|
9336
|
+
| `footerDistinct` *required* | `string` | — | |
|
|
9337
|
+
| `footerAggregate` *required* | `string` | — | An aggregate the application computes itself. |
|
|
9338
|
+
| `grouping` *required* | `string` | — | The grouping section of the column menu, and the menu entry per column. |
|
|
9339
|
+
| `groupBy` *required* | `(label: string) => string` | — | |
|
|
9340
|
+
| `groupedBy` *required* | `string` | — | The grouping's tag in the table toolbar: "Grouped by" Region › Customer. |
|
|
9341
|
+
| `removeGrouping` *required* | `string` | — | |
|
|
9342
|
+
| `removeGroupingLevel` *required* | `(label: string) => string` | — | |
|
|
9343
|
+
| `foldAll` *required* | `string` | — | |
|
|
9344
|
+
| `unfoldAll` *required* | `string` | — | |
|
|
9345
|
+
| `groupNoValue` *required* | `string` | — | The group of rows without a value. |
|
|
9346
|
+
| `groupContinued` *required* | `string` | — | Beside a group repeated at the top of a page that begins inside it. |
|
|
9347
|
+
| `foldGroup` *required* | `(name: string, count: string) => string` | — | The fold of a group, with its value and its count. |
|
|
9348
|
+
| `unfoldGroup` *required* | `(name: string, count: string) => string` | — | |
|
|
9349
|
+
| `foldBranch` *required* | `(row: string) => string` | — | The fold of a branch in a table with tree rows, named after its row - not `expandRowNamed`, which names the row detail's expander on the same row. |
|
|
9350
|
+
| `unfoldBranch` *required* | `(row: string) => string` | — | |
|
|
9351
|
+
| `levelColumn` *required* | `string` | — | The first column of a tree's export. |
|
|
9352
|
+
| `pathRow` *required* | `string` | — | A row shown only because a descendant matches the search or a filter. |
|
|
9353
|
+
| `footerTopLevel` *required* | `string` | — | The footer of a tree: it sums the top level, since a parent holds its children. |
|
|
9354
|
+
| `footerOfMatches` *required* | `string` | — | The footer of a server-mode table: its sums come from the server and cover every match, not the page. Read out only. |
|
|
9355
|
+
| `selectGroup` *required* | `(name: string) => string` | — | The box that selects every row of a group. |
|
|
9356
|
+
| `calendarWeek` *required* | `(week: number, year: number) => string` | — | A group of the week key: "Week 42, 2026". |
|
|
9357
|
+
| `entries` *required* | `(count: number, formatted: string) => string` | — | "128 entries" in the pagination bar; the plural belongs to the language. |
|
|
9358
|
+
| `selectedCount` *required* | `(count: number, formatted: string) => string` | — | "3 selected" in the pagination bar and the table toolbar. |
|
|
9359
|
+
| `selectedOnPage` *required* | `(count: number, formatted: string) => string` | — | The first sentence of the offer in a server-mode table, once the page is ticked: "All 50 on this page are selected." |
|
|
9360
|
+
| `selectAllMatching` *required* | `(count: number, formatted: string) => string` | — | The button after it, for the rows the server holds: "Select all 12,400 that match". |
|
|
9361
|
+
| `allMatchingSelected` *required* | `(count: number, formatted: string) => string` | — | The line once they are selected: "All 12,400 that match are selected." |
|
|
9362
|
+
| `copiedRows` *required* | `(count: number, formatted: string) => string` | — | Said to a screen reader after Ctrl+C copied rows: "3 rows copied". |
|
|
9363
|
+
| `copiedCell` *required* | `string` | — | Said after Ctrl+C copied the active cell of a grid. |
|
|
9364
|
+
| `copyFailed` *required* | `string` | — | Said when the clipboard refused or is not there. |
|
|
9365
|
+
| `noEntries` *required* | `string` | — | Empty because there are no rows. |
|
|
9366
|
+
| `nothingMatchesFilters` *required* | `string` | — | Empty because search and filters leave nothing - something else. |
|
|
9367
|
+
| `treeSearchPlaceholder` *required* | `string` | — | |
|
|
9368
|
+
| `treeNoMatches` *required* | `string` | — | |
|
|
9369
|
+
| `conditions` *required* | `string` | — | Group name of the conditions in the table toolbar. |
|
|
9370
|
+
| `removeConditionNamed` *required* | `(label: string, value: string) => string` | — | The button that removes a condition: "Remove Region: EU, US". |
|
|
9371
|
+
| `editConditionNamed` *required* | `(label: string, value: string) => string` | — | The condition itself, which opens its filter: "Edit Region: EU, US". |
|
|
9372
|
+
| `moreValues` *required* | `(count: number, formatted: string) => string` | — | The remainder of a long list in a condition: "+1". |
|
|
9373
|
+
| `filterFrom` *required* | `string` | — | The two fields of the range filter. |
|
|
9374
|
+
| `filterTo` *required* | `string` | — | |
|
|
9375
|
+
| `rangeFromTo` *required* | `(from: string, to: string) => string` | — | The condition of a range filter: "100–500", "from 100", "to 500". |
|
|
9376
|
+
| `rangeFrom` *required* | `(from: string) => string` | — | |
|
|
9377
|
+
| `rangeTo` *required* | `(to: string) => string` | — | |
|
|
9378
|
+
| `rangeInvalid` *required* | `string` | — | When "From" lies behind "To". The condition stays the last valid one. |
|
|
9379
|
+
| `resetAll` *required* | `string` | — | Clears search and conditions - in the table toolbar and in the empty body. |
|
|
9380
|
+
| `tryAgain` *required* | `string` | — | The button under a server-mode table's error that sends the request once more. |
|
|
9381
|
+
| `filteredOfTotal` *required* | `(matches: string, total: string) => string` | — | "43 of 1.204" - the numbers come from the formats. |
|
|
9382
|
+
| `verdictOk` *required* | `string` | — | The four outcomes of an assessment, as a word beside the value. Colour alone carries no meaning - the word stands here for that reason. |
|
|
9383
|
+
| `verdictWarning` *required* | `string` | — | |
|
|
9384
|
+
| `verdictAlarm` *required* | `string` | — | |
|
|
9385
|
+
| `verdictUnknown` *required* | `string` | — | |
|
|
9386
|
+
| `statAbsentValue` *required* | `string` | — | What stands in the value field when there is no value. No dash, no zero: either could be a value. |
|
|
9387
|
+
| `target` *required* | `string` | — | |
|
|
9388
|
+
| `deviationAbove` *required* | `(betrag: string) => string` | — | "3,2 above target" or "1,5 below target" - the amount comes from the formats, which is where the comma is from. |
|
|
9389
|
+
| `deviationBelow` *required* | `(betrag: string) => string` | — | |
|
|
9390
|
+
| `deviationOnTarget` *required* | `string` | — | |
|
|
9391
|
+
| `freshnessFresh` *required* | `string` | — | The three freshness states. They are a DIFFERENT axis from the verdict: a stale value keeps its verdict ([ADR-0010](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0010-a-stale-value-keeps-its-verdict.md)). |
|
|
9392
|
+
| `freshnessStale` *required* | `string` | — | |
|
|
9393
|
+
| `freshnessDisconnected` *required* | `string` | — | |
|
|
9394
|
+
| `qualityGood` *required* | `string` | — | The three quality levels ([ADR-0077](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0077-a-bad-value-keeps-its-verdict.md)) - the THIRD axis, beside the verdict and the freshness: how far the value's source vouches for it. A bad value keeps its verdict and its age. |
|
|
9395
|
+
| `qualityUncertain` *required* | `string` | — | |
|
|
9396
|
+
| `qualityBad` *required* | `string` | — | |
|
|
9397
|
+
| `asOfAgo` *required* | `(duration: string) => string` | — | "As of: 3 minutes ago", where the duration comes from the formats. |
|
|
9398
|
+
| `close` *required* | `string` | — | |
|
|
9399
|
+
| `closeToast` *required* | `string` | — | |
|
|
9400
|
+
| `toastDeckCount` *required* | `(count: number) => string` | — | The count on the front toast of a closed deck; pressing it shows them all. |
|
|
9401
|
+
| `toastRegion` *required* | `string` | — | The name of the toasts' region, which Alt+T moves the focus into. |
|
|
9402
|
+
| `confirm` *required* | `string` | — | |
|
|
9403
|
+
| `cancel` *required* | `string` | — | |
|
|
9404
|
+
| `loading` *required* | `string` | — | |
|
|
9405
|
+
| `fillLevel` *required* | `string` | — | Generic name of a fill-level bar, where the caller names none. |
|
|
9406
|
+
| `progress` *required* | `string` | — | Generic name of a progress bar, where the caller names none. |
|
|
9407
|
+
| `breadcrumb` *required* | `string` | — | The accessible name of a breadcrumb's navigation landmark. |
|
|
9408
|
+
| `breadcrumbFolded` *required* | `string` | — | The key that opens a breadcrumb's folded middle levels as a menu. |
|
|
9409
|
+
| `splitter` *required* | `string` | — | The separator between a splitter's panes, where the caller names none - a caller who can should name the first pane instead (APG). |
|
|
9410
|
+
| `stepDone` *required* | `string` | — | A stepper's step that is behind it, said beside its label to a screen reader; the current step is `aria-current` and needs no word. |
|
|
9411
|
+
| `stepUpcoming` *required* | `string` | — | A step still ahead. |
|
|
9412
|
+
| `stepFailed` *required* | `string` | — | A step that failed - behind the current one or the current one itself. |
|
|
9413
|
+
| `chooseFile` *required* | `string` | — | The key of a file input that takes one file - and its name where no field names it. |
|
|
9414
|
+
| `chooseFiles` *required* | `string` | — | The same key where it takes several. |
|
|
9415
|
+
| `dropFile` *required* | `string` | — | The words beside the key that say the zone takes a drop. |
|
|
9416
|
+
| `dropFiles` *required* | `string` | — | |
|
|
9417
|
+
| `removeFile` *required* | `(name: string) => string` | — | The cross beside a chosen file. |
|
|
9418
|
+
| `fileNotAccepted` *required* | `(name: string) => string` | — | A dropped file the input's `accept` does not take. |
|
|
9419
|
+
| `show` *required* | `string` | — | |
|
|
9420
|
+
| `hide` *required* | `string` | — | |
|
|
9421
|
+
| `moreActions` *required* | `string` | — | |
|
|
9422
|
+
| `remove` *required* | `string` | — | The cross on a tag without text content. |
|
|
9423
|
+
| `removeTag` *required* | `(beschriftung: string) => string` | — | The cross on a tag with text content. |
|
|
9424
|
+
| `scheduleOverlap` *required* | `string` | — | The two findings, named on the ghost of a drag. |
|
|
9425
|
+
| `scheduleViolatedDependency` *required* | `string` | — | |
|
|
9426
|
+
| `scheduleGhostTimes` *required* | `(from: string, to: string) => string` | — | The new times on the ghost: "08:15–10:00" - the times come from the formats. |
|
|
9427
|
+
| `scheduleLeadIn` *required* | `string` | — | The parts of a subtask and a dependency, named in the tooltip. |
|
|
9428
|
+
| `scheduleLeadOut` *required* | `string` | — | |
|
|
9429
|
+
| `scheduleDependency` *required* | `string` | — | |
|
|
9430
|
+
| `scheduleRoute` *required* | `(from: string, to: string) => string` | — | "A-2041-1 → A-2041-2": the two subtasks a dependency joins. |
|
|
9431
|
+
| `scheduleOverlapWith` *required* | `(other: string) => string` | — | "Overlap with A-2043-2" - the other subtask on the lane. |
|
|
9432
|
+
| `scheduleViolatedBy` *required* | `(amount: string) => string` | — | "Violated dependency, 15 min short" - the amount from `minutesShort`. |
|
|
9433
|
+
| `scheduleLaneRefused` *required* | `string` | — | On the ghost of a drag over a lane the subtask may not go to. |
|
|
9434
|
+
| `scheduleBlockedTime` *required* | `string` | — | On the ghost of a drag held back from a lane's blocked time. |
|
|
9435
|
+
| `scheduleInBlockedTime` *required* | `(label: string \| undefined) => string` | — | "In blocked time (Leave)" - a subtask covering its lane's blocked time, with the blocked time's label where it has one. |
|
|
9436
|
+
| `scheduleMilestone` *required* | `(name: string) => string` | — | "Milestone: Release" - a milestone named by its label (or id), so that the tooltip and the spoken readout say what kind of thing it is. |
|
|
9437
|
+
| `scheduleFoldGroup` *required* | `string` | — | The chevron of a lane group's header, which folds it into one row and unfolds it again. The group's own label stands beside the button, so the name is what the ACTION is, not which group it acts on. |
|
|
9438
|
+
| `scheduleUnfoldGroup` *required* | `string` | — | |
|
|
9439
|
+
| `scheduleLaneCount` *required* | `(count: number) => string` | — | How many lanes a group holds, beside its name in the header. |
|
|
9440
|
+
| `scheduleRoleDescription` *required* | `string` | — | What a screen reader calls the plot that takes the keys (`aria-roledescription`, schedule-a11y S1). |
|
|
9441
|
+
| `scheduleSummary` *required* | `(summary: { lanes: number; subtasks: number; from: string; to: string; overlaps: number; violated: number; /** Subtasks in blocked time; said only where there are any. */ blocked: number; /** Milestones of the plan; said only where there are any. */ milestones: number; }) => string` | — | The plot's description (S6): the lanes, the subtasks in view, the visible span with both ends formatted, and the findings of the plan by kind. |
|
|
9442
|
+
| `scheduleKeyHelp` *required* | `string` | — | The keys that walk the plot, select and edit - read after the summary. |
|
|
9443
|
+
| `dashboardEdit` *required* | `string` | — | The editing bar's buttons and the label that says the mode is on. |
|
|
9444
|
+
| `dashboardEditing` *required* | `string` | — | |
|
|
9445
|
+
| `dashboardCancel` *required* | `string` | — | |
|
|
9446
|
+
| `dashboardDone` *required* | `string` | — | |
|
|
9447
|
+
| `dashboardUndo` *required* | `string` | — | |
|
|
9448
|
+
| `dashboardRedo` *required* | `string` | — | |
|
|
9449
|
+
| `dashboardReset` *required* | `string` | — | |
|
|
9450
|
+
| `dashboardMenu` *required* | `(title: string) => string` | — | The name of a widget's menu button: the widget's title is the thing. |
|
|
9451
|
+
| `dashboardPlace` *required* | `(place: number, of: number) => string` | — | At the top of the menu, and in the name of a head the arrow keys move. |
|
|
9452
|
+
| `dashboardHead` *required* | `(title: string, place: number, of: number) => string` | — | |
|
|
9453
|
+
| `dashboardMoveStart` *required* | `string` | — | |
|
|
9454
|
+
| `dashboardMoveEarlier` *required* | `string` | — | |
|
|
9455
|
+
| `dashboardMoveLater` *required* | `string` | — | |
|
|
9456
|
+
| `dashboardMoveEnd` *required* | `string` | — | |
|
|
9457
|
+
| `dashboardRemove` *required* | `string` | — | |
|
|
9458
|
+
| `dashboardSizes` *required* | `{ small: string; medium: string; wide: string; tall: string; large: string; full: string }` | — | The closed set of size names, worded once for every widget type. |
|
|
9459
|
+
| `dashboardSizeEntry` *required* | `(size: string, share: string, current: boolean) => string` | — | A size's entry in a widget's menu: its name and its share of the width (`share` is "¼" or "5/12", empty for the whole width); `current` marks the size the widget stands at. |
|
|
9460
|
+
| `dashboardHeadingLabel` *required* | `string` | — | The built-in heading type: its name, its sentence in the catalogue, the text a new heading starts with and the label of its text field. |
|
|
9461
|
+
| `dashboardHeadingSentence` *required* | `string` | — | |
|
|
9462
|
+
| `dashboardHeadingText` *required* | `string` | — | |
|
|
9463
|
+
| `dashboardHeadingField` *required* | `string` | — | |
|
|
9464
|
+
| `dashboardLeft` *required* | `string` | — | Said when "Done" leaves the mode and nothing was changed. |
|
|
9465
|
+
| `dashboardMoved` *required* | `(title: string, from: number, to: number, of: number) => string` | — | What is spoken after a change. |
|
|
9466
|
+
| `dashboardDragCancelled` *required* | `(title: string) => string` | — | |
|
|
9467
|
+
| `dashboardResized` *required* | `(title: string, size: string) => string` | — | |
|
|
9468
|
+
| `dashboardRemoved` *required* | `(title: string) => string` | — | |
|
|
9469
|
+
| `dashboardKept` *required* | `string` | — | |
|
|
9470
|
+
| `dashboardCancelled` *required* | `string` | — | |
|
|
9471
|
+
| `dashboardAddWidget` *required* | `string` | — | The catalogue and the options. |
|
|
9472
|
+
| `dashboardCatalogue` *required* | `string` | — | |
|
|
9473
|
+
| `dashboardCatalogueSentence` *required* | `string` | — | |
|
|
9474
|
+
| `dashboardAdd` *required* | `string` | — | |
|
|
9475
|
+
| `dashboardAddType` *required* | `(label: string) => string` | — | |
|
|
9476
|
+
| `dashboardFootprint` *required* | `(columns: number, rows: number) => string` | — | |
|
|
9477
|
+
| `dashboardAdded` *required* | `(title: string, place: number, of: number) => string` | — | |
|
|
9478
|
+
| `dashboardOptions` *required* | `string` | — | |
|
|
9479
|
+
| `dashboardOptionsChanged` *required* | `(title: string) => string` | — | |
|
|
9480
|
+
| `dashboardEmpty` *required* | `string` | — | |
|
|
9481
|
+
| `dashboardEmptyEditing` *required* | `string` | — | |
|
|
9482
|
+
| `dashboardFailed` *required* | `string` | — | |
|
|
9483
|
+
| `dashboardUndone` *required* | `string` | — | |
|
|
9484
|
+
| `dashboardRedone` *required* | `string` | — | |
|
|
9485
|
+
| `dashboardResetDone` *required* | `string` | — | |
|
|
9486
|
+
| `calculationSumSymbol` *required* | `string` | — | The four operators as symbols in a formula line. |
|
|
9487
|
+
| `calculationDifferenceSymbol` *required* | `string` | — | |
|
|
9488
|
+
| `calculationProductSymbol` *required* | `string` | — | |
|
|
9489
|
+
| `calculationQuotientSymbol` *required* | `string` | — | |
|
|
9490
|
+
| `calculationSumWord` *required* | `string` | — | The same four as words, in the accessible sentence of a line. |
|
|
9491
|
+
| `calculationDifferenceWord` *required* | `string` | — | |
|
|
9492
|
+
| `calculationProductWord` *required* | `string` | — | |
|
|
9493
|
+
| `calculationQuotientWord` *required* | `string` | — | |
|
|
9494
|
+
| `calculationEquals` *required* | `string` | — | Between the parts of the sentence: "Availability equals ...". |
|
|
9495
|
+
| `calculationApproximately` *required* | `string` | — | Before a result marked "≈" in the sentence. |
|
|
9496
|
+
| `calculationApproximateNote` *required* | `string` | — | Beside a result marked "≈": why the rounded operands do not give it. |
|
|
9497
|
+
| `calculationPercent` *required* | `string` | — | How a percentage is read out: "91.6 percent". |
|
|
9498
|
+
| `calculationMissing` *required* | `(label: string) => string` | — | Why a quantity has no number - the label is the given at the root of it, or the divisor that is zero. |
|
|
9499
|
+
| `calculationDivisionByZero` *required* | `(label: string) => string` | — | |
|
|
9500
|
+
| `calculationAboveTarget` *required* | `(target: string) => string` | — | The target beside the result, with the target's number and unit. |
|
|
9501
|
+
| `calculationBelowTarget` *required* | `(target: string) => string` | — | |
|
|
9502
|
+
| `calculationOnTarget` *required* | `(target: string) => string` | — | |
|
|
9503
|
+
| `calculationWorstInside` *required* | `(verdict: string) => string` | — | The quiet marker on a folded quantity whose derivation holds a worse verdict than its own; the verdict word comes from `verdict*`. |
|
|
9504
|
+
| `calculationSource` *required* | `(source: string) => string` | — | Where a given number came from. |
|
|
9505
|
+
| `calculationShowDerivation` *required* | `(label: string) => string` | — | The disclosure button of a derivation, named after the quantity. |
|
|
9506
|
+
| `calculationHideDerivation` *required* | `(label: string) => string` | — | |
|
|
9507
|
+
| `calculationOperandCount` *required* | `(count: number) => string` | — | On a folded line whose operator has more operands than are written out beneath it ([ADR-0028](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0028-a-calculation-is-a-tree-or-a-chain.md)): how many there are. |
|
|
9508
|
+
| `calculationNoOperands` *required* | `string` | — | On the line of a sum with no operands, where its formula would stand ([ADR-0049](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0049-a-sum-takes-rows-from-data.md)). |
|
|
9509
|
+
|
|
9001
9510
|
#### Known limits
|
|
9002
9511
|
|
|
9003
|
-
-
|
|
9512
|
+
- Two formats: CSV, and the Excel workbook from `@umriss-ui/table/xlsx` - one sheet, no styling, no formulas, no group rows, no compression; no PDF or print layout.
|
|
9004
9513
|
|
|
9005
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
9514
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9006
9515
|
|
|
9007
9516
|
### View
|
|
9008
9517
|
|
|
@@ -9415,7 +9924,7 @@ type TableRef = Omit<TableSnapshot<unknown>, "setFilter" | "conditionOf"> & {
|
|
|
9415
9924
|
|
|
9416
9925
|
- In [server mode](#server-mode) the page goes to the server in the request, and `rowCount` decides how many pages there are.
|
|
9417
9926
|
|
|
9418
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
9927
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9419
9928
|
|
|
9420
9929
|
### Virtualisation
|
|
9421
9930
|
|
|
@@ -9726,7 +10235,7 @@ From `ToolbarProps` — the full table stands on [Toolbar](#toolbar).
|
|
|
9726
10235
|
- Paging and virtualisation do not combine; one table does one or the other.
|
|
9727
10236
|
- No loading more rows while scrolling: a table on a server pages ([Server mode](#server-mode)).
|
|
9728
10237
|
|
|
9729
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
10238
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9730
10239
|
|
|
9731
10240
|
### Benchmark
|
|
9732
10241
|
|
|
@@ -10112,7 +10621,9 @@ import { useTable } from "@umriss-ui/table";
|
|
|
10112
10621
|
|
|
10113
10622
|
`onRequest` reports the request whenever what decides the rows changes – search, conditions, sort, page, page size – complete, defaults included, since a server has no default of the table's.
|
|
10114
10623
|
|
|
10115
|
-
|
|
10624
|
+
`answers` names the request the rows answer: while it is not the table's current request the table is loading, so a late answer is never shown as current. Without it the rows are taken as current.
|
|
10625
|
+
|
|
10626
|
+
`error` shows the application's message in place of the rows, with “Try again”; `totals` fill the footer over every match; `exportRows` writes every match. What to cap, what to sum and when to clear `error` stay the application's.
|
|
10116
10627
|
|
|
10117
10628
|
#### Examples
|
|
10118
10629
|
|
|
@@ -10702,12 +11213,13 @@ export default function ListFilter() {
|
|
|
10702
11213
|
}
|
|
10703
11214
|
```
|
|
10704
11215
|
|
|
10705
|
-
##### Show loading, and
|
|
11216
|
+
##### Show loading, and hold a late answer
|
|
10706
11217
|
|
|
10707
|
-
`
|
|
11218
|
+
`answers` names the request the rows answer. While it is not the table's current request the table is busy as `loading` makes it: the page it has stays, dimmed after a moment, and nothing below it moves. Here every answer takes a different time, so they arrive out of order on purpose - page on quickly and the table stays busy until the answer to the page you are on has come; the others are never shown as current.
|
|
10708
11219
|
|
|
10709
11220
|
```tsx
|
|
10710
11221
|
import { useRef, useState } from "react";
|
|
11222
|
+
import { Stack, Text } from "@umriss-ui/core";
|
|
10711
11223
|
import { Pagination, useTable } from "@umriss-ui/table";
|
|
10712
11224
|
import type { TableRequest } from "@umriss-ui/table";
|
|
10713
11225
|
|
|
@@ -10863,48 +11375,47 @@ const SHIPMENTS: readonly Shipment[] = TOURS.flatMap((one) =>
|
|
|
10863
11375
|
}),
|
|
10864
11376
|
);
|
|
10865
11377
|
|
|
10866
|
-
/* Every
|
|
10867
|
-
|
|
10868
|
-
|
|
11378
|
+
/* Every second request is slow, so an answer is overtaken by the next one:
|
|
11379
|
+
page on quickly to see it hold. */
|
|
10869
11380
|
const serve = (view: TableRequest) => {
|
|
10870
11381
|
const start = (view.page - 1) * view.pageSize;
|
|
10871
|
-
return { rows: SHIPMENTS.slice(start, start + view.pageSize), rowCount: SHIPMENTS.length };
|
|
11382
|
+
return { rows: SHIPMENTS.slice(start, start + view.pageSize), rowCount: SHIPMENTS.length, answers: view };
|
|
10872
11383
|
};
|
|
10873
11384
|
|
|
10874
11385
|
export default function LoadingAndLateAnswers() {
|
|
10875
11386
|
const [answer, setAnswer] = useState(() => serve({ search: "", conditions: {}, sort: [], page: 1, pageSize: 10 }));
|
|
10876
|
-
const
|
|
10877
|
-
const latest = useRef<TableRequest | null>(null);
|
|
11387
|
+
const asked = useRef(0);
|
|
10878
11388
|
|
|
10879
|
-
const { Table, Column } = useTable(answer.rows, {
|
|
11389
|
+
const { Table, Column, request } = useTable(answer.rows, {
|
|
10880
11390
|
rowKey: (s) => s.id,
|
|
10881
11391
|
server: true,
|
|
10882
11392
|
rowCount: answer.rowCount,
|
|
11393
|
+
answers: answer.answers,
|
|
10883
11394
|
onRequest: (view) => {
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
setTimeout(() => {
|
|
10887
|
-
if (latest.current !== view) return;
|
|
10888
|
-
setAnswer(serve(view));
|
|
10889
|
-
setLoading(false);
|
|
10890
|
-
}, LATENCY);
|
|
11395
|
+
asked.current += 1;
|
|
11396
|
+
setTimeout(() => setAnswer(serve(view)), asked.current % 2 === 0 ? 1200 : 300);
|
|
10891
11397
|
},
|
|
10892
11398
|
});
|
|
10893
11399
|
|
|
10894
11400
|
return (
|
|
10895
|
-
<
|
|
10896
|
-
<
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
<
|
|
10900
|
-
|
|
11401
|
+
<Stack gap={2}>
|
|
11402
|
+
<Text size="xs" tone="muted">
|
|
11403
|
+
Asked for page {request?.page}, showing page {answer.answers.page}.
|
|
11404
|
+
</Text>
|
|
11405
|
+
<Table aria-label="Shipments on the server">
|
|
11406
|
+
<Column value="id" label="Shipment" rowHeader sortable={false} />
|
|
11407
|
+
<Column value="customer" label="Customer" sortable={false} />
|
|
11408
|
+
<Column value="weight" label="Weight (kg)" sortable={false} />
|
|
11409
|
+
<Pagination />
|
|
11410
|
+
</Table>
|
|
11411
|
+
</Stack>
|
|
10901
11412
|
);
|
|
10902
11413
|
}
|
|
10903
11414
|
```
|
|
10904
11415
|
|
|
10905
11416
|
##### Load pages from a server
|
|
10906
11417
|
|
|
10907
|
-
`server` hands the table one page and the server's `rowCount`; `onRequest` reports search, conditions, sort and page to fetch the next.
|
|
11418
|
+
`server` hands the table one page and the server's `rowCount`; `onRequest` reports search, conditions, sort and page to fetch the next. A typed search is reported after a pause of 300 ms, so the server is asked once for "pump", not four times; Enter, an emptied field, `setSearch` and any other change report at once. The table has no cancel token: the application aborts the previous fetch itself, with an `AbortController`.
|
|
10908
11419
|
|
|
10909
11420
|
```tsx
|
|
10910
11421
|
import { useRef, useState } from "react";
|
|
@@ -10979,6 +11490,15 @@ function serve(view: TableRequest): { rows: Request[]; rowCount: number } {
|
|
|
10979
11490
|
return { rows, rowCount };
|
|
10980
11491
|
}
|
|
10981
11492
|
|
|
11493
|
+
/* The export asks the server for every match, the way a spreadsheet wants it;
|
|
11494
|
+
the application caps the file and refuses what is too large. */
|
|
11495
|
+
const EXPORT_CAP = 5000;
|
|
11496
|
+
const everyMatch = async (view: TableRequest) => {
|
|
11497
|
+
const { rows, rowCount } = serve({ ...view, page: 1, pageSize: EXPORT_CAP });
|
|
11498
|
+
if (rowCount > EXPORT_CAP) throw new Error(`${rowCount.toLocaleString("en")} rows match; narrow the search to ${EXPORT_CAP.toLocaleString("en")} or fewer.`);
|
|
11499
|
+
return rows;
|
|
11500
|
+
};
|
|
11501
|
+
|
|
10982
11502
|
const FIRST: TableRequest = { search: "", conditions: {}, sort: [BY_ID], page: 1, pageSize: 10 };
|
|
10983
11503
|
const same = (a: TableRequest, b: TableRequest) =>
|
|
10984
11504
|
JSON.stringify([a.search, a.conditions, a.sort, a.page, a.pageSize]) ===
|
|
@@ -10989,6 +11509,7 @@ export default function AMillionRowsOnAServer() {
|
|
|
10989
11509
|
const [answer, setAnswer] = useState(() => ({ view: FIRST, ...serve(FIRST) }));
|
|
10990
11510
|
const [loading, setLoading] = useState(false);
|
|
10991
11511
|
const latest = useRef(FIRST);
|
|
11512
|
+
const controller = useRef<AbortController | null>(null);
|
|
10992
11513
|
|
|
10993
11514
|
const t = useTable(answer.rows, {
|
|
10994
11515
|
rowKey: (r) => r.id,
|
|
@@ -10997,17 +11518,23 @@ export default function AMillionRowsOnAServer() {
|
|
|
10997
11518
|
rowCount: answer.rowCount,
|
|
10998
11519
|
onRequest: (view) => {
|
|
10999
11520
|
latest.current = view;
|
|
11521
|
+
/* The previous fetch is the application's to abort; here it is a timer. */
|
|
11522
|
+
controller.current?.abort();
|
|
11523
|
+
const own = new AbortController();
|
|
11524
|
+
controller.current = own;
|
|
11000
11525
|
/* Back to the view on screen before its successor was answered: the
|
|
11001
11526
|
pending answer is dropped, so nothing is loading any more. */
|
|
11002
11527
|
if (same(view, answer.view)) return setLoading(false);
|
|
11003
11528
|
setLoading(true);
|
|
11004
|
-
setTimeout(() => {
|
|
11529
|
+
const timer = setTimeout(() => {
|
|
11005
11530
|
if (latest.current !== view) return;
|
|
11006
11531
|
setAnswer({ view, ...serve(view) });
|
|
11007
11532
|
setLoading(false);
|
|
11008
11533
|
}, LATENCY);
|
|
11534
|
+
own.signal.addEventListener("abort", () => clearTimeout(timer));
|
|
11009
11535
|
},
|
|
11010
11536
|
filterOptions: (column) => (column === "service" ? SERVICES : []),
|
|
11537
|
+
exportRows: everyMatch,
|
|
11011
11538
|
});
|
|
11012
11539
|
const { Table, Column } = t;
|
|
11013
11540
|
const { search, sort, page, pageSize } = answer.view;
|
|
@@ -11034,6 +11561,184 @@ export default function AMillionRowsOnAServer() {
|
|
|
11034
11561
|
}
|
|
11035
11562
|
```
|
|
11036
11563
|
|
|
11564
|
+
##### Show a failed fetch
|
|
11565
|
+
|
|
11566
|
+
`error` is the message the application wrote when the fetch failed. It stands where the rows were, with "Try again", which reports the same request once more. With `answers` the message is the failure of that request and shows only while it is the table's current one. The table clears nothing: the application sets and clears `error`. Here the second page fails the first time it is asked for.
|
|
11567
|
+
|
|
11568
|
+
```tsx
|
|
11569
|
+
import { useState } from "react";
|
|
11570
|
+
import { Stack, Text } from "@umriss-ui/core";
|
|
11571
|
+
import { Pagination, useTable } from "@umriss-ui/table";
|
|
11572
|
+
import type { TableRequest } from "@umriss-ui/table";
|
|
11573
|
+
|
|
11574
|
+
interface Order {
|
|
11575
|
+
id: string;
|
|
11576
|
+
customer: string;
|
|
11577
|
+
amount: number;
|
|
11578
|
+
}
|
|
11579
|
+
|
|
11580
|
+
const CUSTOMERS = ["Holloway Garden Supplies", "Marlow & Finch Books", "Oakridge Pharmacy", "Brixley Cycles", "Tamsin's Bakery"] as const;
|
|
11581
|
+
const ORDERS: readonly Order[] = Array.from({ length: 120 }, (_, i) => ({
|
|
11582
|
+
id: `ORD-${String(i + 1).padStart(4, "0")}`,
|
|
11583
|
+
customer: CUSTOMERS[(i * 3) % CUSTOMERS.length]!,
|
|
11584
|
+
amount: 40 + ((i * 7919) % 900),
|
|
11585
|
+
}));
|
|
11586
|
+
|
|
11587
|
+
const pageOf = (view: TableRequest) => ORDERS.slice((view.page - 1) * view.pageSize, view.page * view.pageSize);
|
|
11588
|
+
|
|
11589
|
+
export default function AFailedFetch() {
|
|
11590
|
+
const [answer, setAnswer] = useState<{ rows: readonly Order[]; answers: TableRequest; error?: string }>(() => {
|
|
11591
|
+
const first: TableRequest = { search: "", conditions: {}, sort: [], page: 1, pageSize: 10 };
|
|
11592
|
+
return { rows: pageOf(first), answers: first };
|
|
11593
|
+
});
|
|
11594
|
+
const [failed, setFailed] = useState(false);
|
|
11595
|
+
|
|
11596
|
+
const { Table, Column } = useTable(answer.rows, {
|
|
11597
|
+
rowKey: (o) => o.id,
|
|
11598
|
+
server: true,
|
|
11599
|
+
rowCount: ORDERS.length,
|
|
11600
|
+
answers: answer.answers,
|
|
11601
|
+
...(answer.error ? { error: answer.error } : {}),
|
|
11602
|
+
onRequest: (view) => {
|
|
11603
|
+
setTimeout(() => {
|
|
11604
|
+
if (view.page === 2 && !failed) {
|
|
11605
|
+
setFailed(true);
|
|
11606
|
+
setAnswer({ rows: [], answers: view, error: "The orders could not be loaded: the server did not answer." });
|
|
11607
|
+
} else setAnswer({ rows: pageOf(view), answers: view });
|
|
11608
|
+
}, 300);
|
|
11609
|
+
},
|
|
11610
|
+
});
|
|
11611
|
+
|
|
11612
|
+
return (
|
|
11613
|
+
<Stack gap={2}>
|
|
11614
|
+
<Table aria-label="Orders on the server">
|
|
11615
|
+
<Column value="id" label="Order" rowHeader sortable={false} />
|
|
11616
|
+
<Column value="customer" label="Customer" sortable={false} />
|
|
11617
|
+
<Column value="amount" label="Amount" sortable={false} />
|
|
11618
|
+
<Pagination />
|
|
11619
|
+
</Table>
|
|
11620
|
+
<Text size="xs" tone="muted">Page 2 fails once; press Try again.</Text>
|
|
11621
|
+
</Stack>
|
|
11622
|
+
);
|
|
11623
|
+
}
|
|
11624
|
+
```
|
|
11625
|
+
|
|
11626
|
+
##### Select all that match
|
|
11627
|
+
|
|
11628
|
+
With the page ticked, the table offers "Select all 12,400 that match". The selection is then a state, not a list: all that match, except the rows unticked since. A bulk action receives rows, or - once that state stands - `{ request, except }`, and the `except` key tells the two apart; carrying it out is the server's. A change of search or conditions clears the selection.
|
|
11629
|
+
|
|
11630
|
+
```tsx
|
|
11631
|
+
import { useState } from "react";
|
|
11632
|
+
import { Stack, Text } from "@umriss-ui/core";
|
|
11633
|
+
import { Pagination, Toolbar, useTable } from "@umriss-ui/table";
|
|
11634
|
+
import type { AllMatching, TableRequest } from "@umriss-ui/table";
|
|
11635
|
+
|
|
11636
|
+
interface Order {
|
|
11637
|
+
id: string;
|
|
11638
|
+
customer: string;
|
|
11639
|
+
amount: number;
|
|
11640
|
+
}
|
|
11641
|
+
|
|
11642
|
+
const CUSTOMERS = ["Holloway Garden Supplies", "Marlow & Finch Books", "Oakridge Pharmacy", "Brixley Cycles", "Tamsin's Bakery"] as const;
|
|
11643
|
+
const ORDERS: readonly Order[] = Array.from({ length: 12_400 }, (_, i) => ({
|
|
11644
|
+
id: `ORD-${String(i + 1).padStart(5, "0")}`,
|
|
11645
|
+
customer: CUSTOMERS[(i * 3) % CUSTOMERS.length]!,
|
|
11646
|
+
amount: 40 + ((i * 7919) % 900),
|
|
11647
|
+
}));
|
|
11648
|
+
|
|
11649
|
+
const pageOf = (view: TableRequest) => ORDERS.slice((view.page - 1) * view.pageSize, view.page * view.pageSize);
|
|
11650
|
+
|
|
11651
|
+
export default function SelectAllThatMatch() {
|
|
11652
|
+
const [answer, setAnswer] = useState(() => {
|
|
11653
|
+
const first: TableRequest = { search: "", conditions: {}, sort: [], page: 1, pageSize: 10 };
|
|
11654
|
+
return { rows: pageOf(first), answers: first };
|
|
11655
|
+
});
|
|
11656
|
+
const [done, setDone] = useState("Nothing archived yet.");
|
|
11657
|
+
|
|
11658
|
+
const { Table, Column, RowActions, Action } = useTable(answer.rows, {
|
|
11659
|
+
rowKey: (o) => o.id,
|
|
11660
|
+
server: true,
|
|
11661
|
+
rowCount: ORDERS.length,
|
|
11662
|
+
answers: answer.answers,
|
|
11663
|
+
onRequest: (view) => setTimeout(() => setAnswer({ rows: pageOf(view), answers: view }), 200),
|
|
11664
|
+
});
|
|
11665
|
+
|
|
11666
|
+
const archive = (selected: readonly Order[] | AllMatching) =>
|
|
11667
|
+
setDone(
|
|
11668
|
+
"except" in selected
|
|
11669
|
+
? `The server archives every match of the request, except ${selected.except.length} orders.`
|
|
11670
|
+
: `The server archives ${selected.length} named orders.`,
|
|
11671
|
+
);
|
|
11672
|
+
|
|
11673
|
+
return (
|
|
11674
|
+
<Stack gap={2}>
|
|
11675
|
+
<Table selectable aria-label="Orders on the server">
|
|
11676
|
+
<Toolbar />
|
|
11677
|
+
<Column value="id" label="Order" rowHeader sortable={false} />
|
|
11678
|
+
<Column value="customer" label="Customer" sortable={false} />
|
|
11679
|
+
<Column value="amount" label="Amount" sortable={false} />
|
|
11680
|
+
<RowActions>
|
|
11681
|
+
<Action bulk onSelect={archive}>Archive</Action>
|
|
11682
|
+
</RowActions>
|
|
11683
|
+
<Pagination />
|
|
11684
|
+
</Table>
|
|
11685
|
+
<Text size="xs" tone="muted">{done}</Text>
|
|
11686
|
+
</Stack>
|
|
11687
|
+
);
|
|
11688
|
+
}
|
|
11689
|
+
```
|
|
11690
|
+
|
|
11691
|
+
##### Show sums from the server
|
|
11692
|
+
|
|
11693
|
+
`totals` come beside the rows, by column id: the value of the column's declared `aggregate` over every match, not over the page. The footer shows them in the column's format; a key left out shows the absent value, and while an answer is out the cells are skeleton, never the old sums.
|
|
11694
|
+
|
|
11695
|
+
```tsx
|
|
11696
|
+
import { useState } from "react";
|
|
11697
|
+
import { Pagination, useTable } from "@umriss-ui/table";
|
|
11698
|
+
import type { TableRequest } from "@umriss-ui/table";
|
|
11699
|
+
|
|
11700
|
+
interface Order {
|
|
11701
|
+
id: string;
|
|
11702
|
+
customer: string;
|
|
11703
|
+
amount: number;
|
|
11704
|
+
}
|
|
11705
|
+
|
|
11706
|
+
const CUSTOMERS = ["Holloway Garden Supplies", "Marlow & Finch Books", "Oakridge Pharmacy", "Brixley Cycles", "Tamsin's Bakery"] as const;
|
|
11707
|
+
const ORDERS: readonly Order[] = Array.from({ length: 1000 }, (_, i) => ({
|
|
11708
|
+
id: `ORD-${String(i + 1).padStart(4, "0")}`,
|
|
11709
|
+
customer: CUSTOMERS[(i * 3) % CUSTOMERS.length]!,
|
|
11710
|
+
amount: 40 + ((i * 7919) % 900),
|
|
11711
|
+
}));
|
|
11712
|
+
|
|
11713
|
+
const serve = (view: TableRequest) => ({
|
|
11714
|
+
rows: ORDERS.slice((view.page - 1) * view.pageSize, view.page * view.pageSize),
|
|
11715
|
+
answers: view,
|
|
11716
|
+
totals: { id: ORDERS.length, amount: ORDERS.reduce((sum, o) => sum + o.amount, 0) },
|
|
11717
|
+
});
|
|
11718
|
+
|
|
11719
|
+
export default function SumsFromTheServer() {
|
|
11720
|
+
const [answer, setAnswer] = useState(() => serve({ search: "", conditions: {}, sort: [], page: 1, pageSize: 10 }));
|
|
11721
|
+
|
|
11722
|
+
const { Table, Column } = useTable(answer.rows, {
|
|
11723
|
+
rowKey: (o) => o.id,
|
|
11724
|
+
server: true,
|
|
11725
|
+
rowCount: ORDERS.length,
|
|
11726
|
+
answers: answer.answers,
|
|
11727
|
+
totals: answer.totals,
|
|
11728
|
+
onRequest: (view) => setTimeout(() => setAnswer(serve(view)), 400),
|
|
11729
|
+
});
|
|
11730
|
+
|
|
11731
|
+
return (
|
|
11732
|
+
<Table aria-label="Orders on the server">
|
|
11733
|
+
<Column value="id" label="Order" rowHeader sortable={false} aggregate="count" />
|
|
11734
|
+
<Column value="customer" label="Customer" sortable={false} />
|
|
11735
|
+
<Column value="amount" label="Amount" sortable={false} aggregate="sum" />
|
|
11736
|
+
<Pagination />
|
|
11737
|
+
</Table>
|
|
11738
|
+
);
|
|
11739
|
+
}
|
|
11740
|
+
```
|
|
11741
|
+
|
|
11037
11742
|
#### When to use something else
|
|
11038
11743
|
|
|
11039
11744
|
- Thousands of rows that are all in the browser → Virtualisation
|
|
@@ -11064,6 +11769,7 @@ From `TableSnapshot` — the full table stands on [First table](#first-table).
|
|
|
11064
11769
|
| Prop | Type | Default | Description |
|
|
11065
11770
|
|---|---|---|---|
|
|
11066
11771
|
| [`selection`](#first-table) *required* | [`TableSelection`](#first-table)`<string>` | — | The selection – its own or the one handed in through `selection`. |
|
|
11772
|
+
| [`request`](#first-table) *required* | [`TableRequest`](#first-table)` \| null` | — | Server mode: the request `onRequest` last received, or is about to; `null` outside it. |
|
|
11067
11773
|
|
|
11068
11774
|
From `FieldColumn` — the full table stands on [Column](#column).
|
|
11069
11775
|
|
|
@@ -11086,6 +11792,31 @@ From `SearchProps` — the full table stands on [Search](#search).
|
|
|
11086
11792
|
|---|---|---|---|
|
|
11087
11793
|
| [`placeholder`](#search) | `string` | the wording's "Search …" | The placeholder in the field. |
|
|
11088
11794
|
|
|
11795
|
+
From `AggregateOptions` — the full table stands on [Aggregate](#aggregate).
|
|
11796
|
+
|
|
11797
|
+
| Prop | Type | Default | Description |
|
|
11798
|
+
|---|---|---|---|
|
|
11799
|
+
| [`aggregate`](#aggregate) | [`AggregateFor`](#aggregate)`<W, Z>` | — | What the column's values come to: in the footer over the filtered set, in a group's header over its rows. `"sum"`, `"avg"` for numbers; `"min"`, `"max"` for numbers and points in time; `"range"` for points in time; `"count"`, `"distinct"` for every value with a text form - or a function of one's own. Always from the values, never from other aggregates; absent values count towards nothing. |
|
|
11800
|
+
|
|
11801
|
+
From `RowActionsProps` — the full table stands on [RowActions](#rowactions).
|
|
11802
|
+
|
|
11803
|
+
| Prop | Type | Default | Description |
|
|
11804
|
+
|---|---|---|---|
|
|
11805
|
+
| [`children`](#rowactions) *required* | `ReactNode` | — | The row's `Action`s. |
|
|
11806
|
+
|
|
11807
|
+
From `ActionProps` — the full table stands on [RowActions](#rowactions).
|
|
11808
|
+
|
|
11809
|
+
| Prop | Type | Default | Description |
|
|
11810
|
+
|---|---|---|---|
|
|
11811
|
+
| [`children`](#rowactions) *required* | `string` | — | The label – text, because it is read out together with the row's name. |
|
|
11812
|
+
| [`bulk`](#rowactions) | `false \| true` | — | Acts on a list: at the row on a list made from it, in the table toolbar on the selection within the filtered set. |
|
|
11813
|
+
|
|
11814
|
+
###### Events
|
|
11815
|
+
|
|
11816
|
+
| Prop | Type | Default | Description |
|
|
11817
|
+
|---|---|---|---|
|
|
11818
|
+
| [`onSelect`](#rowactions) | `(row: Z) => void` | — | Gets the row the action was triggered on. |
|
|
11819
|
+
|
|
11089
11820
|
From `ToolbarProps` — the full table stands on [Toolbar](#toolbar).
|
|
11090
11821
|
|
|
11091
11822
|
| Prop | Type | Default | Description |
|
|
@@ -11094,12 +11825,13 @@ From `ToolbarProps` — the full table stands on [Toolbar](#toolbar).
|
|
|
11094
11825
|
|
|
11095
11826
|
#### Known limits
|
|
11096
11827
|
|
|
11097
|
-
- The table sorts, filters and pages nothing itself, and it shows no groups
|
|
11098
|
-
-
|
|
11828
|
+
- The table sorts, filters and pages nothing itself, and it shows no groups: they would be made of one page. Groups from the server are the next piece, with a spec of their own.
|
|
11829
|
+
- The footer shows only `totals` the application hands in.
|
|
11830
|
+
- Without `exportRows` the export acts on the page the table holds, and the export button says so.
|
|
11099
11831
|
- A list filter offers what `filterOptions` names; the table cannot count values it does not hold.
|
|
11100
11832
|
- No loading more rows while scrolling: paging and virtualisation do not combine.
|
|
11101
11833
|
|
|
11102
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
11834
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
11103
11835
|
|
|
11104
11836
|
## Editing
|
|
11105
11837
|
|
|
@@ -11311,7 +12043,7 @@ From `ActionProps` — the full table stands on [RowActions](#rowactions).
|
|
|
11311
12043
|
|
|
11312
12044
|
| Prop | Type | Default | Description |
|
|
11313
12045
|
|---|---|---|---|
|
|
11314
|
-
| [`onSelect`](#rowactions)
|
|
12046
|
+
| [`onSelect`](#rowactions) | `(row: Z) => void` | — | Gets the row the action was triggered on. |
|
|
11315
12047
|
|
|
11316
12048
|
### Edits
|
|
11317
12049
|
|
|
@@ -11686,9 +12418,9 @@ From `ToolbarProps` — the full table stands on [Toolbar](#toolbar).
|
|
|
11686
12418
|
|
|
11687
12419
|
#### Known limits
|
|
11688
12420
|
|
|
11689
|
-
- No cell range selection and no undo ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
12421
|
+
- No cell range selection and no undo ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md)).
|
|
11690
12422
|
|
|
11691
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
12423
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
11692
12424
|
|
|
11693
12425
|
## Limits and alarms
|
|
11694
12426
|
|
|
@@ -12029,7 +12761,7 @@ type Severity = "warning" | "alarm";
|
|
|
12029
12761
|
- No list filter: four verdicts are sorted, not filtered.
|
|
12030
12762
|
- It does not judge whether a value is stale; a stale value keeps its verdict ([ADR-0010](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0010-a-stale-value-keeps-its-verdict.md)).
|
|
12031
12763
|
|
|
12032
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
12764
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.45.0/docs/adr/0032-what-umriss-is-not.md).
|
|
12033
12765
|
|
|
12034
12766
|
## API index
|
|
12035
12767
|
|
|
@@ -12087,6 +12819,9 @@ compiler.
|
|
|
12087
12819
|
as `of` to a part that stands outside the table.
|
|
12088
12820
|
|
|
12089
12821
|
```ts
|
|
12822
|
+
function useTable<Z>(rows: readonly Z[], options: Extract<TableOptions<Z>, {
|
|
12823
|
+
server: true;
|
|
12824
|
+
}>): Table<Z, true>;
|
|
12090
12825
|
function useTable<Z>(rows: readonly Z[], options: TableOptions<Z>): Table<Z>;
|
|
12091
12826
|
```
|
|
12092
12827
|
|
|
@@ -12141,6 +12876,19 @@ function rowFilter<Z, B>(definition: RowFilter<Z, B>): RowFilter<Z, B>;
|
|
|
12141
12876
|
|
|
12142
12877
|
Used on [Filter](#filter) and [Toolbar controls](#toolbar-controls).
|
|
12143
12878
|
|
|
12879
|
+
#### Constants
|
|
12880
|
+
|
|
12881
|
+
##### `csv`
|
|
12882
|
+
|
|
12883
|
+
The CSV: the language's conventions; a column of days as the zone's day,
|
|
12884
|
+
other points in time as ISO text.
|
|
12885
|
+
|
|
12886
|
+
```ts
|
|
12887
|
+
const csv: ExportFormat;
|
|
12888
|
+
```
|
|
12889
|
+
|
|
12890
|
+
Used on [Scenarios](#scenarios), [Provider](#provider), [Sorting](#sorting), [Search](#search), [Grouping](#grouping-1), [Toolbar](#toolbar) and [Export](#export).
|
|
12891
|
+
|
|
12144
12892
|
#### Types
|
|
12145
12893
|
|
|
12146
12894
|
##### `Absent`
|
|
@@ -12204,6 +12952,20 @@ type AggregateKind = "sum" | "avg" | "min" | "max" | "range" | "count" | "distin
|
|
|
12204
12952
|
|
|
12205
12953
|
Its table stands on [Aggregate](#aggregate).
|
|
12206
12954
|
|
|
12955
|
+
##### `AllMatching`
|
|
12956
|
+
|
|
12957
|
+
What a server-mode bulk action receives, in the toolbar, while all that
|
|
12958
|
+
match are selected: the request they match and the keys unticked since.
|
|
12959
|
+
`Array.isArray` tells it from rows - the rows are typed as a mutable array
|
|
12960
|
+
so that it narrows both ways.
|
|
12961
|
+
|
|
12962
|
+
| Prop | Type | Default | Description |
|
|
12963
|
+
|---|---|---|---|
|
|
12964
|
+
| `request` *required* | `TableRequest` | — | |
|
|
12965
|
+
| `except` *required* | `readonly string[]` | — | <br>Shown in: [Select all that match (Server mode)](#server-mode) |
|
|
12966
|
+
|
|
12967
|
+
Used on [Server mode](#server-mode).
|
|
12968
|
+
|
|
12207
12969
|
##### `CellEdit<Z>`
|
|
12208
12970
|
|
|
12209
12971
|
An edit the user committed - reported, not applied.
|
|
@@ -12388,10 +13150,53 @@ The props a column carries for editing in grid mode (`<Table grid>`).
|
|
|
12388
13150
|
| `editOptions` | `readonly ``Present``<W>[]` | the values that occur | What `edit="select"` offers.<br>Shown in: [Share a column between tables (Presets)](#presets), [Check an edit before it is reported (Edits)](#edits), [Save a row on purpose (Edits)](#edits) and 1 more |
|
|
12389
13151
|
| `validate` | `(value: W \| null, row: Z) => string \| null \| undefined` | — | Checks a draft before it is reported: a message keeps the editor open and stands beneath the field, as in a `FormField`; nothing lets it through.<br>Shown in: [Share a column between tables (Presets)](#presets), [Combine grid mode with groups, pinning and many rows (Grid mode)](#grid-mode), [Check an edit before it is reported (Edits)](#edits) and 3 more |
|
|
12390
13152
|
|
|
13153
|
+
##### `ExportCell`
|
|
13154
|
+
|
|
13155
|
+
What a spreadsheet cell holds: numbers, booleans and points in time stay
|
|
13156
|
+
what they are, an absent value is `undefined`.
|
|
13157
|
+
|
|
13158
|
+
```ts
|
|
13159
|
+
type ExportCell = string | number | boolean | Date | undefined;
|
|
13160
|
+
```
|
|
13161
|
+
|
|
13162
|
+
##### `ExportContext`
|
|
13163
|
+
|
|
13164
|
+
What the language in use hands a format.
|
|
13165
|
+
|
|
13166
|
+
| Prop | Type | Default | Description |
|
|
13167
|
+
|---|---|---|---|
|
|
13168
|
+
| `formats` *required* | `Formats` | — | |
|
|
13169
|
+
| `wording` *required* | `Wording` | — | |
|
|
13170
|
+
| `wallClock` | `(d: Date) => { year: number; month: number; day: number; hours: number; minutes: number; seconds: number }` | — | The wall-clock fields of an instant in the table's time zone; absent without one, where the writer reads the Date's own. A format that must import nothing gets the zone this way, as data. |
|
|
13171
|
+
|
|
13172
|
+
##### `ExportFormat<R = string>`
|
|
13173
|
+
|
|
13174
|
+
A way to write the export: the file's extension and MIME type, and the
|
|
13175
|
+
function that turns the sheet into `R` - text or bytes.
|
|
13176
|
+
|
|
13177
|
+
| Prop | Type | Default | Description |
|
|
13178
|
+
|---|---|---|---|
|
|
13179
|
+
| `extension` *required* | `string` | — | <br>Shown in: [Choose the format (Export)](#export) |
|
|
13180
|
+
| `mime` *required* | `string` | — | <br>Shown in: [Choose the format (Export)](#export) |
|
|
13181
|
+
| `write` *required* | `(sheet: ``ExportSheet``, context: ``ExportContext``) => R` | — | <br>Shown in: [Choose the format (Export)](#export) |
|
|
13182
|
+
|
|
13183
|
+
Used on [Export](#export).
|
|
13184
|
+
|
|
12391
13185
|
##### `ExportProps`
|
|
12392
13186
|
|
|
12393
13187
|
Its table stands on [Export](#export).
|
|
12394
13188
|
|
|
13189
|
+
##### `ExportSheet`
|
|
13190
|
+
|
|
13191
|
+
What a format writes: the header labels, the widths the table holds, whether
|
|
13192
|
+
a column's own `exportValue` made its values (`own`: written as they come),
|
|
13193
|
+
and the rows as typed cells. A tree's level is its first column, a number.
|
|
13194
|
+
|
|
13195
|
+
| Prop | Type | Default | Description |
|
|
13196
|
+
|---|---|---|---|
|
|
13197
|
+
| `columns` *required* | `readonly { label: string; width?: number; own?: true }[]` | — | <br>Shown in: [Choose the format (Export)](#export) |
|
|
13198
|
+
| `rows` *required* | `readonly (readonly ``ExportCell``[])[]` | — | <br>Shown in: [Choose the format (Export)](#export) |
|
|
13199
|
+
|
|
12395
13200
|
##### `Field<Z>`
|
|
12396
13201
|
|
|
12397
13202
|
The field names of a row.
|
|
@@ -12716,19 +13521,19 @@ only what the first leaves open.
|
|
|
12716
13521
|
| `column` *required* | `K` | — | <br>Shown in: [Sort, arrange and export from controls of your own (First table)](#first-table), [A label wider than its column (Width and pinning)](#width-and-pinning), [Sort by several columns (Sorting)](#sorting) and 10 more |
|
|
12717
13522
|
| `direction` *required* | `SortDirection`<br>`"asc" \| "desc"` | — | <br>Shown in: [Sort, arrange and export from controls of your own (First table)](#first-table), [A label wider than its column (Width and pinning)](#width-and-pinning), [Sort by several columns (Sorting)](#sorting) and 10 more |
|
|
12718
13523
|
|
|
12719
|
-
##### `Table<Z>`
|
|
13524
|
+
##### `Table<Z, S extends boolean = false>`
|
|
12720
13525
|
|
|
12721
13526
|
What `useTable` returns: the table's state, and its parts typed at the
|
|
12722
13527
|
row. Pass it as `of` to a part that stands outside the table.
|
|
12723
13528
|
|
|
12724
13529
|
| Prop | Type | Default | Description |
|
|
12725
13530
|
|---|---|---|---|
|
|
12726
|
-
| `Table` *required* | `(props: `[`TableProps`](#first-table)`<Z>) => ReactNode` | — | <br>Shown in: [A first table (Installation)](#installation), [Show a list of services (First table)](#first-table), [Search and page from a header of your own (First table)](#first-table) and
|
|
12727
|
-
| `Column` *required* | `ColumnComponent``<Z>` | — | <br>Shown in: [A first table (Installation)](#installation), [Show a list of services (First table)](#first-table), [Search and page from a header of your own (First table)](#first-table) and
|
|
13531
|
+
| `Table` *required* | `(props: `[`TableProps`](#first-table)`<Z>) => ReactNode` | — | <br>Shown in: [A first table (Installation)](#installation), [Show a list of services (First table)](#first-table), [Search and page from a header of your own (First table)](#first-table) and 128 more |
|
|
13532
|
+
| `Column` *required* | `ColumnComponent``<Z>` | — | <br>Shown in: [A first table (Installation)](#installation), [Show a list of services (First table)](#first-table), [Search and page from a header of your own (First table)](#first-table) and 128 more |
|
|
12728
13533
|
| `VerdictColumn` *required* | `VerdictColumnComponent``<Z>` | — | <br>Shown in: [Pin columns to both sides (Width and pinning)](#width-and-pinning), [Read a day's deliveries by depot (Grouping)](#grouping-1), [Carry the worst verdict up (Aggregate)](#aggregate) and 5 more |
|
|
12729
13534
|
| `RowDetail` *required* | `(props: `[`RowDetailProps`](#rowdetail)`<Z>) => ReactNode` | — | <br>Shown in: [Keep the header and the names in view (Width and pinning)](#width-and-pinning), [Employees in the detail (Tree rows)](#tree-rows), [Own staff and teams (Tree rows)](#tree-rows) and 5 more |
|
|
12730
|
-
| `RowActions` *required* | `(props: `[`RowActionsProps`](#rowactions)`) => ReactNode` | — | <br>Shown in: [Name the row (Column)](#column), [Pin columns to both sides (Width and pinning)](#width-and-pinning), [Select a whole group (Grouping)](#grouping-1) and
|
|
12731
|
-
| `Action` *required* | `(props: `[`ActionProps`](#rowactions)`<Z>) => ReactNode` | — | <br>Shown in: [Name the row (Column)](#column), [Pin columns to both sides (Width and pinning)](#width-and-pinning), [Select a whole group (Grouping)](#grouping-1) and
|
|
13535
|
+
| `RowActions` *required* | `(props: `[`RowActionsProps`](#rowactions)`) => ReactNode` | — | <br>Shown in: [Name the row (Column)](#column), [Pin columns to both sides (Width and pinning)](#width-and-pinning), [Select a whole group (Grouping)](#grouping-1) and 8 more |
|
|
13536
|
+
| `Action` *required* | `(props: `[`ActionProps`](#rowactions)`<Z, S>) => ReactNode` | — | <br>Shown in: [Name the row (Column)](#column), [Pin columns to both sides (Width and pinning)](#width-and-pinning), [Select a whole group (Grouping)](#grouping-1) and 8 more |
|
|
12732
13537
|
| `GroupBy` *required* | `GroupByComponent``<Z>` | — | <br>Shown in: [Group by a value that is no column (Grouping)](#grouping-1), [Group twenty thousand rows (Grouping)](#grouping-1), [Read a day's deliveries by depot (Grouping)](#grouping-1) |
|
|
12733
13538
|
| `scrollToRow` *required* | `(key: string) => boolean` | — | Brings the row with this key into view and returns `true`: in a paged table its page, in a scroll area, virtual or not, the scroll to it. `false`, with nothing changed, for a key the table does not have, a row a search, a condition or the `preFilter` hides, a row inside a folded group or branch, or a table not mounted; nothing is unfolded and no filter cleared. In server mode it reaches the rows of the page it holds.<br>Shown in: [Bring a row into view from outside (Virtualisation)](#virtualisation) |
|
|
12734
13539
|
| `focusCell` *required* | `(key: string, column: string) => boolean` | — | In grid mode, brings the row into view as `scrollToRow` does, makes the cell of that row and column the Active cell and moves the focus to it. Outside grid mode, for a column the table does not show, and wherever `scrollToRow` returns `false`, it returns `false` and changes nothing.<br>Shown in: [Bring a row into view from outside (Virtualisation)](#virtualisation) |
|
|
@@ -12775,6 +13580,7 @@ row. Pass it as `of` to a part that stands outside the table.
|
|
|
12775
13580
|
| `virtual` *required* | `boolean` | — | Whether it virtualises. From `TableSnapshot`.<br>Shown in: [Search and page from a header of your own (First table)](#first-table) |
|
|
12776
13581
|
| `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) |
|
|
12777
13582
|
| `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) |
|
|
13583
|
+
| `request` *required* | `TableRequest`` \| null` | — | Server mode: the request `onRequest` last received, or is about to; `null` outside it. From `TableSnapshot`.<br>Shown in: [Show loading, and hold a late answer (Server mode)](#server-mode) |
|
|
12778
13584
|
|
|
12779
13585
|
Used on [Scenarios](#scenarios), [Installation](#installation), [First table](#first-table), [Provider](#provider), [Column](#column), [Formats](#formats), [Width and pinning](#width-and-pinning), [Presets](#presets), [Sorting](#sorting), [Search](#search), [Filter](#filter), [Pre-filter](#pre-filter), [Grouping](#grouping-1), [Tree rows](#tree-rows), [Aggregate](#aggregate), [Selection](#selection), [Row appearance](#row-appearance), [RowDetail](#rowdetail), [RowActions](#rowactions), [Toolbar](#toolbar), [Toolbar controls](#toolbar-controls), [ColumnMenu](#columnmenu), [Export](#export), [View](#view), [Pagination](#pagination), [Virtualisation](#virtualisation), [Benchmark](#benchmark), [Server mode](#server-mode), [Grid mode](#grid-mode), [Edits](#edits) and [VerdictColumn](#verdictcolumn).
|
|
12780
13586
|
|
|
@@ -12847,6 +13653,9 @@ selection.
|
|
|
12847
13653
|
| `clear` *required* | `() => void` | — | <br>Shown in: [Hold the selection yourself (Selection)](#selection), [Work through the alerts (Scenarios)](#work-through-the-alerts), [Find a late shipment (Scenarios)](#find-a-late-shipment) |
|
|
12848
13654
|
| `allSelected` *required* | `boolean` | — | true when every key passed in is selected. |
|
|
12849
13655
|
| `someSelected` *required* | `boolean` | — | true when some - but not all - are selected. |
|
|
13656
|
+
| `allMatching` *required* | `boolean` | — | Every row that matches is selected, those on no page held included. While it stands `selected` is empty and `count` is 0, and `isSelected(id)` is `!except.has(id)`. Store it with the keys when the selection is held outside. |
|
|
13657
|
+
| `except` *required* | `ReadonlySet<T>` | — | While `allMatching`: the keys unticked since. |
|
|
13658
|
+
| `selectMatching` *required* | `() => void` | — | Selects all that match; the keys selected before are dropped. |
|
|
12850
13659
|
| `count` *required* | `number` | — | <br>Shown in: [Select rows (Selection)](#selection), [Hold the selection yourself (Selection)](#selection), [Copy the selection (Export)](#export) and 2 more |
|
|
12851
13660
|
|
|
12852
13661
|
##### `TableSnapshot`
|
|
@@ -12862,11 +13671,11 @@ the application.
|
|
|
12862
13671
|
|
|
12863
13672
|
| Prop | Type | Default | Description |
|
|
12864
13673
|
|---|---|---|---|
|
|
12865
|
-
| `search` | `string` | — | <br>Shown in: [Show loading, empty, failed and no match (Row appearance)](#row-appearance), [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode) and
|
|
12866
|
-
| `conditions` | `Readonly<Record<string, unknown>>` | — | The conditions of the column filters, per column. A condition for a column that does not exist, or whose filter is of another kind, falls out.<br>Shown in: [Ask a question over several fields (Filter)](#filter), [A dispatcher's bar (Toolbar controls)](#toolbar-controls), [Hand the table one page (Server mode)](#server-mode) and
|
|
12867
|
-
| `sort` | `readonly ``SortLevel``<K>[]` | — | <br>Shown in: [Keep and restore a view (View)](#view), [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode) and
|
|
12868
|
-
| `page` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode), [Name the values a list filter offers (Server mode)](#server-mode) and
|
|
12869
|
-
| `pageSize` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode), [Name the values a list filter offers (Server mode)](#server-mode) and
|
|
13674
|
+
| `search` | `string` | — | <br>Shown in: [Show loading, empty, failed and no match (Row appearance)](#row-appearance), [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode) and 6 more |
|
|
13675
|
+
| `conditions` | `Readonly<Record<string, unknown>>` | — | The conditions of the column filters, per column. A condition for a column that does not exist, or whose filter is of another kind, falls out.<br>Shown in: [Ask a question over several fields (Filter)](#filter), [A dispatcher's bar (Toolbar controls)](#toolbar-controls), [Hand the table one page (Server mode)](#server-mode) and 7 more |
|
|
13676
|
+
| `sort` | `readonly ``SortLevel``<K>[]` | — | <br>Shown in: [Keep and restore a view (View)](#view), [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode) and 6 more |
|
|
13677
|
+
| `page` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode), [Name the values a list filter offers (Server mode)](#server-mode) and 5 more |
|
|
13678
|
+
| `pageSize` | `number` | — | <br>Shown in: [Hand the table one page (Server mode)](#server-mode), [Sort and search on the server (Server mode)](#server-mode), [Name the values a list filter offers (Server mode)](#server-mode) and 5 more |
|
|
12870
13679
|
| `hidden` | `readonly K[]` | — | <br>Shown in: [Keep and restore a view (View)](#view) |
|
|
12871
13680
|
| `order` | `readonly K[]` | — | |
|
|
12872
13681
|
| `widths` | `Readonly<Record<string, number>>` | — | Column widths the user has dragged, in pixels. |
|
|
@@ -12922,8 +13731,373 @@ interface VerdictColumnComponent<Z> {
|
|
|
12922
13731
|
}
|
|
12923
13732
|
```
|
|
12924
13733
|
|
|
13734
|
+
#### @umriss-ui/table/xlsx
|
|
13735
|
+
|
|
13736
|
+
##### `xlsx`
|
|
13737
|
+
|
|
13738
|
+
The Excel workbook format for `Export`: one sheet, a header line, numbers, dates, booleans and text as what they are, and the table's column widths. `onExport` gets the bytes.
|
|
13739
|
+
|
|
13740
|
+
```ts
|
|
13741
|
+
const xlsx: ExportFormat<Uint8Array>;
|
|
13742
|
+
```
|
|
13743
|
+
|
|
13744
|
+
Used on [Export](#export).
|
|
13745
|
+
|
|
12925
13746
|
#### Types on this page
|
|
12926
13747
|
|
|
13748
|
+
##### `Formats`
|
|
13749
|
+
|
|
13750
|
+
From `@umriss-ui/core`.
|
|
13751
|
+
|
|
13752
|
+
Everything the library knows about formatting.
|
|
13753
|
+
|
|
13754
|
+
| Prop | Type | Default | Description |
|
|
13755
|
+
|---|---|---|---|
|
|
13756
|
+
| `locale` *required* | `string` | — | The language tag the set was built in: "en-GB". |
|
|
13757
|
+
| `timeZone` *required* | `string \| undefined` | — | The IANA name of the time zone instants are written in, or `undefined` for the reader's own. |
|
|
13758
|
+
| `timeZoneName` *required* | `(d: Date) => string` | — | The zone's generic name in the set's locale: "Central European Time". Empty until the page has hydrated where no zone is named. |
|
|
13759
|
+
| `date` *required* | `(d: Date) => string` | — | Date as displayed: 17/03/2026<br>Shown in: [Set wording and formats once (Provider)](#provider) |
|
|
13760
|
+
| `dateShort` *required* | `(d: Date) => string` | — | Short form without the year, in the range footer: 17/03 |
|
|
13761
|
+
| `month` *required* | `(d: Date) => string` | — | The calendar's month header: March 2026 |
|
|
13762
|
+
| `monthName` *required* | `(d: Date) => string` | — | The month alone, in the calendar head's month list: March |
|
|
13763
|
+
| `dateLong` *required* | `(d: Date) => string` | — | Accessible name of a calendar cell: Tuesday, 17 March 2026 |
|
|
13764
|
+
| `time` *required* | `(d: Date, withSeconds: boolean) => string` | — | Time of day, optionally with seconds: 09:05 or 09:05:03<br>Shown in: [Work through the alerts (Scenarios)](#work-through-the-alerts), [Find a late shipment (Scenarios)](#find-a-late-shipment) |
|
|
13765
|
+
| `dateTime` *required* | `(d: Date, withSeconds: boolean) => string` | — | Date and time together: 17/03/2026, 09:05 |
|
|
13766
|
+
| `offset` *required* | `(d: Date) => string` | — | Short form of the UTC offset: GMT+2 |
|
|
13767
|
+
| `number` *required* | `(n: number, decimals?: number) => string` | — | A number in the set's notation. Without a digit count the value stands to the tenth decimal place, and a non-zero value that would read 0 there is written in scientific notation; with one it is padded and rounded to exactly that many places. |
|
|
13768
|
+
| `numberWith` *required* | `(n: number, options: Intl.NumberFormatOptions) => string` | — | A number written with Intl's own options in the set's locale: a currency, a year without grouping, scientific notation. Pure Intl options - the `decimals` shorthand is expanded by `writeNumber` before it. Like the others it writes no negative zero unless the options set `signDisplay`. |
|
|
13769
|
+
| `count` *required* | `(n: number) => string` | — | A count. Kept apart from `number` because it makes a different promise: a count is whole, and Intl's own rounding (at most three decimal places) is right for it and wrong for a measurement.<br>Shown in: [Scroll twenty thousand rows (Virtualisation)](#virtualisation) |
|
|
13770
|
+
| `percent` *required* | `(share: number) => string` | — | A share from 0 to 1 as whole per cent: 74 % |
|
|
13771
|
+
| `compareText` *required* | `(a: string, b: string) => number` | — | The ordering of two texts by the set's collation. |
|
|
13772
|
+
| `relative` *required* | `(ms: number) => string` | — | An elapsed duration as a phrase: "3 minutes ago". The amount comes in milliseconds, counted back from now. |
|
|
13773
|
+
|
|
13774
|
+
##### `Wording`
|
|
13775
|
+
|
|
13776
|
+
From `@umriss-ui/core`.
|
|
13777
|
+
|
|
13778
|
+
Everything the library puts out as text.
|
|
13779
|
+
|
|
13780
|
+
| Prop | Type | Default | Description |
|
|
13781
|
+
|---|---|---|---|
|
|
13782
|
+
| `clearInput` *required* | `string` | — | The cross in the text field. |
|
|
13783
|
+
| `clearSelection` *required* | `string` | — | The cross in the select and in the combobox. |
|
|
13784
|
+
| `decreaseValue` *required* | `string` | — | Stepper buttons of the number field. |
|
|
13785
|
+
| `increaseValue` *required* | `string` | — | |
|
|
13786
|
+
| `comboboxPlaceholder` *required* | `string` | — | |
|
|
13787
|
+
| `noMatches` *required* | `string` | — | Empty state of both lists. |
|
|
13788
|
+
| `multiSelectPlaceholder` *required* | `string` | — | |
|
|
13789
|
+
| `multiSelectSearchPlaceholder` *required* | `string` | — | |
|
|
13790
|
+
| `searchOptions` *required* | `string` | — | |
|
|
13791
|
+
| `options` *required* | `string` | — | Group name of the option list. |
|
|
13792
|
+
| `optionScope` *required* | `string` | — | Group name of the scope switch. |
|
|
13793
|
+
| `optionScopeAll` *required* | `string` | — | |
|
|
13794
|
+
| `optionScopeSelected` *required* | `(count: number) => string` | — | The second scope, with the count in the text. |
|
|
13795
|
+
| `selectAll` *required* | `string` | — | |
|
|
13796
|
+
| `selectNone` *required* | `string` | — | |
|
|
13797
|
+
| `invertSelection` *required* | `string` | — | |
|
|
13798
|
+
| `nothingSelected` *required* | `string` | — | |
|
|
13799
|
+
| `removeSelectedValue` *required* | `(beschriftung: string) => string` | — | The cross on a selected value in the trigger. |
|
|
13800
|
+
| `manageMoreSelected` *required* | `(count: number) => string` | — | The "+N" counter in the trigger. |
|
|
13801
|
+
| `multiSelectSummary` *required* | `(gewaehlt: number, total: number) => string` | — | The summary in the panel: "3 / 12". The sentence structure belongs to the language, even where it is only a slash here. |
|
|
13802
|
+
| `optionCount` *required* | `(count: number) => string` | — | How many options stand, when a list opens or its filter changes; never zero - an empty list says its own empty text. Named, like the three below, after the moment it is spoken in: an announcement labels no element. |
|
|
13803
|
+
| `optionActive` *required* | `( label: string, state: { selected?: boolean; disabled?: boolean; group?: string }, ) => string` | — | The option the keys moved onto, with what VoiceOver leaves out. |
|
|
13804
|
+
| `optionAdded` *required* | `(label: string) => string` | — | A value the multi-select took or gave away where no checkbox had the focus to say it - Enter in the search, a chip, Backspace. |
|
|
13805
|
+
| `optionRemoved` *required* | `(label: string) => string` | — | |
|
|
13806
|
+
| `palettePlaceholder` *required* | `string` | — | What stands in the empty field. |
|
|
13807
|
+
| `paletteField` *required* | `string` | — | Accessible name of the field. Deliberately kept apart from the placeholder - whoever labels the field differently does not thereby rename the window. |
|
|
13808
|
+
| `palettePanel` *required* | `string` | — | Accessible name of the window. |
|
|
13809
|
+
| `paletteList` *required* | `string` | — | Accessible name of the list of finds. |
|
|
13810
|
+
| `paletteNoFinds` *required* | `string` | — | The one line when the query finds nothing. |
|
|
13811
|
+
| `paletteFindCount` *required* | `(count: number) => string` | — | What the screen reader hears when the number of finds changes. |
|
|
13812
|
+
| `paletteMoreFinds` *required* | `(count: number) => string` | — | The last line when more finds exist than `maxFinds` lets stand. |
|
|
13813
|
+
| `paletteHintMove` *required* | `string` | — | The three key hints in the footer, each the text beside the key. |
|
|
13814
|
+
| `paletteHintChoose` *required* | `string` | — | |
|
|
13815
|
+
| `paletteHintClose` *required* | `string` | — | |
|
|
13816
|
+
| `paletteKeyEsc` *required* | `string` | — | The legend on the Escape key. The arrows and the return key are glyphs and therefore do not stand here; "Esc" is a word and is called something else elsewhere. |
|
|
13817
|
+
| `datePlaceholder` *required* | `string` | — | |
|
|
13818
|
+
| `datePanel` *required* | `string` | — | Accessible name of the panel. Deliberately kept apart from the placeholder: whoever labels the field differently does not thereby rename the dialog. |
|
|
13819
|
+
| `dateClear` *required* | `string` | — | |
|
|
13820
|
+
| `typeDate` *required* | `string` | — | The name of the DatePicker panel's typed field. |
|
|
13821
|
+
| `notADate` *required* | `string` | — | Announced when the typed text is no date. |
|
|
13822
|
+
| `dateOutOfRange` *required* | `(min: string \| null, max: string \| null) => string` | — | Announced when the typed date lies outside `min` and `max`; each bound is written in the formats in use, `null` where there is none. |
|
|
13823
|
+
| `dateTimePlaceholder` *required* | `string` | — | |
|
|
13824
|
+
| `dateTimePanel` *required* | `string` | — | |
|
|
13825
|
+
| `dateTimeClear` *required* | `string` | — | |
|
|
13826
|
+
| `dateRangePlaceholder` *required* | `string` | — | |
|
|
13827
|
+
| `dateRangePanel` *required* | `string` | — | |
|
|
13828
|
+
| `dateRangeClear` *required* | `string` | — | |
|
|
13829
|
+
| `dateTimeRangePanel` *required* | `string` | — | Accessible name of the panel in the range with time of day. |
|
|
13830
|
+
| `dateTimeRangeClear` *required* | `string` | — | The clearing x of the range with time - kept apart from the range without, so that an application can call the two differently. |
|
|
13831
|
+
| `previousMonth` *required* | `string` | — | |
|
|
13832
|
+
| `nextMonth` *required* | `string` | — | |
|
|
13833
|
+
| `monthSelect` *required* | `string` | — | Name of the calendar head's month list. |
|
|
13834
|
+
| `yearSelect` *required* | `string` | — | Name of the calendar head's year list. |
|
|
13835
|
+
| `quickSelect` *required* | `string` | — | Group name of the preset column. |
|
|
13836
|
+
| `today` *required* | `string` | — | |
|
|
13837
|
+
| `now` *required* | `string` | — | |
|
|
13838
|
+
| `clear` *required* | `string` | — | |
|
|
13839
|
+
| `apply` *required* | `string` | — | |
|
|
13840
|
+
| `allDay` *required* | `string` | — | |
|
|
13841
|
+
| `timeOfDay` *required* | `string` | — | |
|
|
13842
|
+
| `hour` *required* | `string` | — | |
|
|
13843
|
+
| `minute` *required* | `string` | — | |
|
|
13844
|
+
| `second` *required* | `string` | — | |
|
|
13845
|
+
| `sideFrom` *required* | `string` | — | Header of the two time columns in the range with time of day. |
|
|
13846
|
+
| `sideTo` *required* | `string` | — | |
|
|
13847
|
+
| `startHour` *required* | `string` | — | Accessible name of the time fields, per side. |
|
|
13848
|
+
| `startMinute` *required* | `string` | — | |
|
|
13849
|
+
| `startSecond` *required* | `string` | — | |
|
|
13850
|
+
| `endHour` *required* | `string` | — | |
|
|
13851
|
+
| `endMinute` *required* | `string` | — | |
|
|
13852
|
+
| `endSecond` *required* | `string` | — | |
|
|
13853
|
+
| `timeFieldIncrease` *required* | `(feld: string) => string` | — | Stepper buttons of a time field; the label comes from above. |
|
|
13854
|
+
| `timeFieldDecrease` *required* | `(feld: string) => string` | — | |
|
|
13855
|
+
| `chooseStartDate` *required* | `string` | — | Footer of the range panels. |
|
|
13856
|
+
| `chooseEndDate` *required* | `string` | — | |
|
|
13857
|
+
| `days` *required* | `(count: number) => string` | — | "3 days" or "1 day" - the plural belongs to the language. |
|
|
13858
|
+
| `daysSelected` *required* | `(count: number) => string` | — | "3 days selected" |
|
|
13859
|
+
| `rangePreview` *required* | `(from: string, to: string, count: number) => string` | — | "17.03. – 19.03. · 3 days" while dragging; the dates come from the formats. |
|
|
13860
|
+
| `daysAllDay` *required* | `(count: number) => string` | — | "3 days (all day)" |
|
|
13861
|
+
| `duration` *required* | `(teile: readonly string[]) => string` | — | "Duration: 1 day 2 hrs 30 min" |
|
|
13862
|
+
| `hoursShort` *required* | `(count: number) => string` | — | |
|
|
13863
|
+
| `minutesShort` *required* | `(count: number) => string` | — | |
|
|
13864
|
+
| `timeMissingHint` *required* | `(timeOfDay: string) => string` | — | Daylight-saving change: the hour that does not exist. |
|
|
13865
|
+
| `timeMissingHintSide` *required* | `(side: string, timeOfDay: string) => string` | — | The same, with the side put in front ("From"/"To"). |
|
|
13866
|
+
| `timeAmbiguousHint` *required* | `string` | — | Daylight-saving change: the hour that occurs twice. |
|
|
13867
|
+
| `timeAmbiguousHintSide` *required* | `(side: string) => string` | — | |
|
|
13868
|
+
| `timeEarlier` *required* | `(versatz: string) => string` | — | |
|
|
13869
|
+
| `timeLater` *required* | `(versatz: string) => string` | — | |
|
|
13870
|
+
| `weekdays` *required* | `readonly string[]` | — | The calendar's weekday headers, starting at Monday. |
|
|
13871
|
+
| `presets` *required* | `{ today: string; yesterday: string; last7Days: string; last30Days: string; thisMonth: string; previousMonth: string; thisQuarter: string; thisYear: string; }` | — | The quick-select ranges, in the order of PRESET_LABELS. |
|
|
13872
|
+
| `pagination` *required* | `string` | — | |
|
|
13873
|
+
| `rows` *required* | `string` | — | |
|
|
13874
|
+
| `rowsPerPage` *required* | `string` | — | |
|
|
13875
|
+
| `pageOfPages` *required* | `(page: number, total: number, formatted?: { page: string; total: string }) => string` | — | "Page 2 of 7". `formatted` carries both numbers in the provider's formats, where the caller has them - a table over a server has "Page 1 of 100,000". |
|
|
13876
|
+
| `previousPage` *required* | `string` | — | |
|
|
13877
|
+
| `nextPage` *required* | `string` | — | |
|
|
13878
|
+
| `filterReset` *required* | `string` | — | The two buttons in the column filter's footer. |
|
|
13879
|
+
| `filterDone` *required* | `string` | — | |
|
|
13880
|
+
| `columns` *required* | `string` | — | The column menu's button.<br>Shown in: [Set wording and formats once (Provider)](#provider) |
|
|
13881
|
+
| `arrangeColumns` *required* | `string` | — | Accessible name of the list in the column menu. |
|
|
13882
|
+
| `columnForward` *required* | `(column: string) => string` | — | The two buttons that move a column in the column menu. |
|
|
13883
|
+
| `columnBackward` *required* | `(column: string) => string` | — | |
|
|
13884
|
+
| `pinColumnToStart` *required* | `(column: string) => string` | — | The column menu's pin keys: to a side, and back when it is pinned there. |
|
|
13885
|
+
| `pinColumnToEnd` *required* | `(column: string) => string` | — | |
|
|
13886
|
+
| `unpinColumn` *required* | `(column: string) => string` | — | |
|
|
13887
|
+
| `columnForwardHint` *required* | `string` | — | The tooltips over those four keys: short, without the column, which stands in the same line. The keys' names above keep it for a screen reader. |
|
|
13888
|
+
| `columnBackwardHint` *required* | `string` | — | |
|
|
13889
|
+
| `pinToStartHint` *required* | `string` | — | |
|
|
13890
|
+
| `pinToEndHint` *required* | `string` | — | |
|
|
13891
|
+
| `unpinHint` *required* | `string` | — | |
|
|
13892
|
+
| `exportLabel` *required* | `string` | — | The export button.<br>Shown in: [Set wording and formats once (Provider)](#provider) |
|
|
13893
|
+
| `exportPageLabel` *required* | `string` | — | The export button of a table in server mode, which holds and writes one page. |
|
|
13894
|
+
| `exporting` *required* | `string` | — | The status while the application prepares an export of every match. |
|
|
13895
|
+
| `exportFailed` *required* | `string` | — | The alert beside the export button when preparing the export failed without a message. |
|
|
13896
|
+
| `exportFileName` *required* | `string` | — | The export's file name, where the application names none. |
|
|
13897
|
+
| `exportSheetName` *required* | `string` | — | The name of the sheet an XLSX export holds. |
|
|
13898
|
+
| `tableSearchPlaceholder` *required* | `string` | — | Placeholder and accessible name of the search field.<br>Shown in: [Set wording and formats once (Provider)](#provider) |
|
|
13899
|
+
| `tableSearchLabel` *required* | `string` | — | |
|
|
13900
|
+
| `filterColumn` *required* | `(column: string) => string` | — | The filter button of a column: "Filter Region". |
|
|
13901
|
+
| `filterHint` *required* | `string` | — | The tooltip over that button. |
|
|
13902
|
+
| `selectRow` *required* | `(row: string) => string` | — | The selection of one row, named after its row header. |
|
|
13903
|
+
| `selectAllRows` *required* | `string` | — | The selection of every row in the filtered set. |
|
|
13904
|
+
| `selectAllOnPage` *required* | `string` | — | The same checkbox in server mode, where the table holds one page of a server's. |
|
|
13905
|
+
| `expandRowNamed` *required* | `(row: string) => string` | — | The expand button, named after the row header. |
|
|
13906
|
+
| `collapseRowNamed` *required* | `(row: string) => string` | — | |
|
|
13907
|
+
| `rowActions` *required* | `string` | — | Header of the actions column - for the screen reader, not visible. |
|
|
13908
|
+
| `rowAction` *required* | `(aktion: string, row: string) => string` | — | One action on a row: "Open: A-2041". |
|
|
13909
|
+
| `rowActionsMenu` *required* | `(row: string) => string` | — | The menu holding a row's actions. |
|
|
13910
|
+
| `editCell` *required* | `(column: string, row: string) => string` | — | The editor of a cell in a table's grid mode, named after its column and its row: "Edit Budget: Marketing". |
|
|
13911
|
+
| `newRow` *required* | `string` | — | The button above a grid that opens an empty row to fill in, and the name of that row while it has none ([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)). |
|
|
13912
|
+
| `saveRow` *required* | `string` | — | A row draft's buttons, named with the row through `rowAction`. |
|
|
13913
|
+
| `discardRow` *required* | `string` | — | |
|
|
13914
|
+
| `deleteRow` *required* | `string` | — | A row's delete button, and its question once pressed: Delete? Delete / Keep. |
|
|
13915
|
+
| `deleteRowAsk` *required* | `string` | — | |
|
|
13916
|
+
| `keepRow` *required* | `string` | — | |
|
|
13917
|
+
| `saveOrDiscardFirst` *required* | `string` | — | Said where someone tries to leave a row draft unsaved. |
|
|
13918
|
+
| `cellAbsentValue` *required* | `string` | — | What the screen reader hears for an absent value. Visibly a muted dash stands there. |
|
|
13919
|
+
| `booleanYes` *required* | `string` | — | A boolean without a presentation of its own. |
|
|
13920
|
+
| `booleanNo` *required* | `string` | — | |
|
|
13921
|
+
| `footerSum` *required* | `string` | — | The kind of a footer number, read out before the number. |
|
|
13922
|
+
| `footerAverage` *required* | `string` | — | |
|
|
13923
|
+
| `footerMinimum` *required* | `string` | — | |
|
|
13924
|
+
| `footerMaximum` *required* | `string` | — | |
|
|
13925
|
+
| `footerRange` *required* | `string` | — | |
|
|
13926
|
+
| `footerCount` *required* | `string` | — | |
|
|
13927
|
+
| `footerDistinct` *required* | `string` | — | |
|
|
13928
|
+
| `footerAggregate` *required* | `string` | — | An aggregate the application computes itself. |
|
|
13929
|
+
| `grouping` *required* | `string` | — | The grouping section of the column menu, and the menu entry per column. |
|
|
13930
|
+
| `groupBy` *required* | `(label: string) => string` | — | |
|
|
13931
|
+
| `groupedBy` *required* | `string` | — | The grouping's tag in the table toolbar: "Grouped by" Region › Customer. |
|
|
13932
|
+
| `removeGrouping` *required* | `string` | — | |
|
|
13933
|
+
| `removeGroupingLevel` *required* | `(label: string) => string` | — | |
|
|
13934
|
+
| `foldAll` *required* | `string` | — | |
|
|
13935
|
+
| `unfoldAll` *required* | `string` | — | |
|
|
13936
|
+
| `groupNoValue` *required* | `string` | — | The group of rows without a value. |
|
|
13937
|
+
| `groupContinued` *required* | `string` | — | Beside a group repeated at the top of a page that begins inside it. |
|
|
13938
|
+
| `foldGroup` *required* | `(name: string, count: string) => string` | — | The fold of a group, with its value and its count. |
|
|
13939
|
+
| `unfoldGroup` *required* | `(name: string, count: string) => string` | — | |
|
|
13940
|
+
| `foldBranch` *required* | `(row: string) => string` | — | The fold of a branch in a table with tree rows, named after its row - not `expandRowNamed`, which names the row detail's expander on the same row. |
|
|
13941
|
+
| `unfoldBranch` *required* | `(row: string) => string` | — | |
|
|
13942
|
+
| `levelColumn` *required* | `string` | — | The first column of a tree's export. |
|
|
13943
|
+
| `pathRow` *required* | `string` | — | A row shown only because a descendant matches the search or a filter. |
|
|
13944
|
+
| `footerTopLevel` *required* | `string` | — | The footer of a tree: it sums the top level, since a parent holds its children. |
|
|
13945
|
+
| `footerOfMatches` *required* | `string` | — | The footer of a server-mode table: its sums come from the server and cover every match, not the page. Read out only. |
|
|
13946
|
+
| `selectGroup` *required* | `(name: string) => string` | — | The box that selects every row of a group. |
|
|
13947
|
+
| `calendarWeek` *required* | `(week: number, year: number) => string` | — | A group of the week key: "Week 42, 2026". |
|
|
13948
|
+
| `entries` *required* | `(count: number, formatted: string) => string` | — | "128 entries" in the pagination bar; the plural belongs to the language. |
|
|
13949
|
+
| `selectedCount` *required* | `(count: number, formatted: string) => string` | — | "3 selected" in the pagination bar and the table toolbar. |
|
|
13950
|
+
| `selectedOnPage` *required* | `(count: number, formatted: string) => string` | — | The first sentence of the offer in a server-mode table, once the page is ticked: "All 50 on this page are selected." |
|
|
13951
|
+
| `selectAllMatching` *required* | `(count: number, formatted: string) => string` | — | The button after it, for the rows the server holds: "Select all 12,400 that match". |
|
|
13952
|
+
| `allMatchingSelected` *required* | `(count: number, formatted: string) => string` | — | The line once they are selected: "All 12,400 that match are selected." |
|
|
13953
|
+
| `copiedRows` *required* | `(count: number, formatted: string) => string` | — | Said to a screen reader after Ctrl+C copied rows: "3 rows copied". |
|
|
13954
|
+
| `copiedCell` *required* | `string` | — | Said after Ctrl+C copied the active cell of a grid. |
|
|
13955
|
+
| `copyFailed` *required* | `string` | — | Said when the clipboard refused or is not there. |
|
|
13956
|
+
| `noEntries` *required* | `string` | — | Empty because there are no rows. |
|
|
13957
|
+
| `nothingMatchesFilters` *required* | `string` | — | Empty because search and filters leave nothing - something else. |
|
|
13958
|
+
| `treeSearchPlaceholder` *required* | `string` | — | |
|
|
13959
|
+
| `treeNoMatches` *required* | `string` | — | |
|
|
13960
|
+
| `conditions` *required* | `string` | — | Group name of the conditions in the table toolbar. |
|
|
13961
|
+
| `removeConditionNamed` *required* | `(label: string, value: string) => string` | — | The button that removes a condition: "Remove Region: EU, US". |
|
|
13962
|
+
| `editConditionNamed` *required* | `(label: string, value: string) => string` | — | The condition itself, which opens its filter: "Edit Region: EU, US". |
|
|
13963
|
+
| `moreValues` *required* | `(count: number, formatted: string) => string` | — | The remainder of a long list in a condition: "+1". |
|
|
13964
|
+
| `filterFrom` *required* | `string` | — | The two fields of the range filter. |
|
|
13965
|
+
| `filterTo` *required* | `string` | — | |
|
|
13966
|
+
| `rangeFromTo` *required* | `(from: string, to: string) => string` | — | The condition of a range filter: "100–500", "from 100", "to 500". |
|
|
13967
|
+
| `rangeFrom` *required* | `(from: string) => string` | — | |
|
|
13968
|
+
| `rangeTo` *required* | `(to: string) => string` | — | |
|
|
13969
|
+
| `rangeInvalid` *required* | `string` | — | When "From" lies behind "To". The condition stays the last valid one. |
|
|
13970
|
+
| `resetAll` *required* | `string` | — | Clears search and conditions - in the table toolbar and in the empty body. |
|
|
13971
|
+
| `tryAgain` *required* | `string` | — | The button under a server-mode table's error that sends the request once more. |
|
|
13972
|
+
| `filteredOfTotal` *required* | `(matches: string, total: string) => string` | — | "43 of 1.204" - the numbers come from the formats. |
|
|
13973
|
+
| `verdictOk` *required* | `string` | — | The four outcomes of an assessment, as a word beside the value. Colour alone carries no meaning - the word stands here for that reason. |
|
|
13974
|
+
| `verdictWarning` *required* | `string` | — | |
|
|
13975
|
+
| `verdictAlarm` *required* | `string` | — | |
|
|
13976
|
+
| `verdictUnknown` *required* | `string` | — | |
|
|
13977
|
+
| `statAbsentValue` *required* | `string` | — | What stands in the value field when there is no value. No dash, no zero: either could be a value. |
|
|
13978
|
+
| `target` *required* | `string` | — | |
|
|
13979
|
+
| `deviationAbove` *required* | `(betrag: string) => string` | — | "3,2 above target" or "1,5 below target" - the amount comes from the formats, which is where the comma is from. |
|
|
13980
|
+
| `deviationBelow` *required* | `(betrag: string) => string` | — | |
|
|
13981
|
+
| `deviationOnTarget` *required* | `string` | — | |
|
|
13982
|
+
| `freshnessFresh` *required* | `string` | — | The three freshness states. They are a DIFFERENT axis from the verdict: a stale value keeps its verdict ([ADR-0010](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0010-a-stale-value-keeps-its-verdict.md)). |
|
|
13983
|
+
| `freshnessStale` *required* | `string` | — | |
|
|
13984
|
+
| `freshnessDisconnected` *required* | `string` | — | |
|
|
13985
|
+
| `qualityGood` *required* | `string` | — | The three quality levels ([ADR-0077](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0077-a-bad-value-keeps-its-verdict.md)) - the THIRD axis, beside the verdict and the freshness: how far the value's source vouches for it. A bad value keeps its verdict and its age. |
|
|
13986
|
+
| `qualityUncertain` *required* | `string` | — | |
|
|
13987
|
+
| `qualityBad` *required* | `string` | — | |
|
|
13988
|
+
| `asOfAgo` *required* | `(duration: string) => string` | — | "As of: 3 minutes ago", where the duration comes from the formats. |
|
|
13989
|
+
| `close` *required* | `string` | — | |
|
|
13990
|
+
| `closeToast` *required* | `string` | — | |
|
|
13991
|
+
| `toastDeckCount` *required* | `(count: number) => string` | — | The count on the front toast of a closed deck; pressing it shows them all. |
|
|
13992
|
+
| `toastRegion` *required* | `string` | — | The name of the toasts' region, which Alt+T moves the focus into. |
|
|
13993
|
+
| `confirm` *required* | `string` | — | |
|
|
13994
|
+
| `cancel` *required* | `string` | — | |
|
|
13995
|
+
| `loading` *required* | `string` | — | |
|
|
13996
|
+
| `fillLevel` *required* | `string` | — | Generic name of a fill-level bar, where the caller names none. |
|
|
13997
|
+
| `progress` *required* | `string` | — | Generic name of a progress bar, where the caller names none. |
|
|
13998
|
+
| `breadcrumb` *required* | `string` | — | The accessible name of a breadcrumb's navigation landmark. |
|
|
13999
|
+
| `breadcrumbFolded` *required* | `string` | — | The key that opens a breadcrumb's folded middle levels as a menu. |
|
|
14000
|
+
| `splitter` *required* | `string` | — | The separator between a splitter's panes, where the caller names none - a caller who can should name the first pane instead (APG). |
|
|
14001
|
+
| `stepDone` *required* | `string` | — | A stepper's step that is behind it, said beside its label to a screen reader; the current step is `aria-current` and needs no word. |
|
|
14002
|
+
| `stepUpcoming` *required* | `string` | — | A step still ahead. |
|
|
14003
|
+
| `stepFailed` *required* | `string` | — | A step that failed - behind the current one or the current one itself. |
|
|
14004
|
+
| `chooseFile` *required* | `string` | — | The key of a file input that takes one file - and its name where no field names it. |
|
|
14005
|
+
| `chooseFiles` *required* | `string` | — | The same key where it takes several. |
|
|
14006
|
+
| `dropFile` *required* | `string` | — | The words beside the key that say the zone takes a drop. |
|
|
14007
|
+
| `dropFiles` *required* | `string` | — | |
|
|
14008
|
+
| `removeFile` *required* | `(name: string) => string` | — | The cross beside a chosen file. |
|
|
14009
|
+
| `fileNotAccepted` *required* | `(name: string) => string` | — | A dropped file the input's `accept` does not take. |
|
|
14010
|
+
| `show` *required* | `string` | — | |
|
|
14011
|
+
| `hide` *required* | `string` | — | |
|
|
14012
|
+
| `moreActions` *required* | `string` | — | |
|
|
14013
|
+
| `remove` *required* | `string` | — | The cross on a tag without text content. |
|
|
14014
|
+
| `removeTag` *required* | `(beschriftung: string) => string` | — | The cross on a tag with text content. |
|
|
14015
|
+
| `scheduleOverlap` *required* | `string` | — | The two findings, named on the ghost of a drag. |
|
|
14016
|
+
| `scheduleViolatedDependency` *required* | `string` | — | |
|
|
14017
|
+
| `scheduleGhostTimes` *required* | `(from: string, to: string) => string` | — | The new times on the ghost: "08:15–10:00" - the times come from the formats. |
|
|
14018
|
+
| `scheduleLeadIn` *required* | `string` | — | The parts of a subtask and a dependency, named in the tooltip. |
|
|
14019
|
+
| `scheduleLeadOut` *required* | `string` | — | |
|
|
14020
|
+
| `scheduleDependency` *required* | `string` | — | |
|
|
14021
|
+
| `scheduleRoute` *required* | `(from: string, to: string) => string` | — | "A-2041-1 → A-2041-2": the two subtasks a dependency joins. |
|
|
14022
|
+
| `scheduleOverlapWith` *required* | `(other: string) => string` | — | "Overlap with A-2043-2" - the other subtask on the lane. |
|
|
14023
|
+
| `scheduleViolatedBy` *required* | `(amount: string) => string` | — | "Violated dependency, 15 min short" - the amount from `minutesShort`. |
|
|
14024
|
+
| `scheduleLaneRefused` *required* | `string` | — | On the ghost of a drag over a lane the subtask may not go to. |
|
|
14025
|
+
| `scheduleBlockedTime` *required* | `string` | — | On the ghost of a drag held back from a lane's blocked time. |
|
|
14026
|
+
| `scheduleInBlockedTime` *required* | `(label: string \| undefined) => string` | — | "In blocked time (Leave)" - a subtask covering its lane's blocked time, with the blocked time's label where it has one. |
|
|
14027
|
+
| `scheduleMilestone` *required* | `(name: string) => string` | — | "Milestone: Release" - a milestone named by its label (or id), so that the tooltip and the spoken readout say what kind of thing it is. |
|
|
14028
|
+
| `scheduleFoldGroup` *required* | `string` | — | The chevron of a lane group's header, which folds it into one row and unfolds it again. The group's own label stands beside the button, so the name is what the ACTION is, not which group it acts on. |
|
|
14029
|
+
| `scheduleUnfoldGroup` *required* | `string` | — | |
|
|
14030
|
+
| `scheduleLaneCount` *required* | `(count: number) => string` | — | How many lanes a group holds, beside its name in the header. |
|
|
14031
|
+
| `scheduleRoleDescription` *required* | `string` | — | What a screen reader calls the plot that takes the keys (`aria-roledescription`, schedule-a11y S1). |
|
|
14032
|
+
| `scheduleSummary` *required* | `(summary: { lanes: number; subtasks: number; from: string; to: string; overlaps: number; violated: number; /** Subtasks in blocked time; said only where there are any. */ blocked: number; /** Milestones of the plan; said only where there are any. */ milestones: number; }) => string` | — | The plot's description (S6): the lanes, the subtasks in view, the visible span with both ends formatted, and the findings of the plan by kind. |
|
|
14033
|
+
| `scheduleKeyHelp` *required* | `string` | — | The keys that walk the plot, select and edit - read after the summary. |
|
|
14034
|
+
| `dashboardEdit` *required* | `string` | — | The editing bar's buttons and the label that says the mode is on. |
|
|
14035
|
+
| `dashboardEditing` *required* | `string` | — | |
|
|
14036
|
+
| `dashboardCancel` *required* | `string` | — | |
|
|
14037
|
+
| `dashboardDone` *required* | `string` | — | |
|
|
14038
|
+
| `dashboardUndo` *required* | `string` | — | |
|
|
14039
|
+
| `dashboardRedo` *required* | `string` | — | |
|
|
14040
|
+
| `dashboardReset` *required* | `string` | — | |
|
|
14041
|
+
| `dashboardMenu` *required* | `(title: string) => string` | — | The name of a widget's menu button: the widget's title is the thing. |
|
|
14042
|
+
| `dashboardPlace` *required* | `(place: number, of: number) => string` | — | At the top of the menu, and in the name of a head the arrow keys move. |
|
|
14043
|
+
| `dashboardHead` *required* | `(title: string, place: number, of: number) => string` | — | |
|
|
14044
|
+
| `dashboardMoveStart` *required* | `string` | — | |
|
|
14045
|
+
| `dashboardMoveEarlier` *required* | `string` | — | |
|
|
14046
|
+
| `dashboardMoveLater` *required* | `string` | — | |
|
|
14047
|
+
| `dashboardMoveEnd` *required* | `string` | — | |
|
|
14048
|
+
| `dashboardRemove` *required* | `string` | — | |
|
|
14049
|
+
| `dashboardSizes` *required* | `{ small: string; medium: string; wide: string; tall: string; large: string; full: string }` | — | The closed set of size names, worded once for every widget type. |
|
|
14050
|
+
| `dashboardSizeEntry` *required* | `(size: string, share: string, current: boolean) => string` | — | A size's entry in a widget's menu: its name and its share of the width (`share` is "¼" or "5/12", empty for the whole width); `current` marks the size the widget stands at. |
|
|
14051
|
+
| `dashboardHeadingLabel` *required* | `string` | — | The built-in heading type: its name, its sentence in the catalogue, the text a new heading starts with and the label of its text field. |
|
|
14052
|
+
| `dashboardHeadingSentence` *required* | `string` | — | |
|
|
14053
|
+
| `dashboardHeadingText` *required* | `string` | — | |
|
|
14054
|
+
| `dashboardHeadingField` *required* | `string` | — | |
|
|
14055
|
+
| `dashboardLeft` *required* | `string` | — | Said when "Done" leaves the mode and nothing was changed. |
|
|
14056
|
+
| `dashboardMoved` *required* | `(title: string, from: number, to: number, of: number) => string` | — | What is spoken after a change. |
|
|
14057
|
+
| `dashboardDragCancelled` *required* | `(title: string) => string` | — | |
|
|
14058
|
+
| `dashboardResized` *required* | `(title: string, size: string) => string` | — | |
|
|
14059
|
+
| `dashboardRemoved` *required* | `(title: string) => string` | — | |
|
|
14060
|
+
| `dashboardKept` *required* | `string` | — | |
|
|
14061
|
+
| `dashboardCancelled` *required* | `string` | — | |
|
|
14062
|
+
| `dashboardAddWidget` *required* | `string` | — | The catalogue and the options. |
|
|
14063
|
+
| `dashboardCatalogue` *required* | `string` | — | |
|
|
14064
|
+
| `dashboardCatalogueSentence` *required* | `string` | — | |
|
|
14065
|
+
| `dashboardAdd` *required* | `string` | — | |
|
|
14066
|
+
| `dashboardAddType` *required* | `(label: string) => string` | — | |
|
|
14067
|
+
| `dashboardFootprint` *required* | `(columns: number, rows: number) => string` | — | |
|
|
14068
|
+
| `dashboardAdded` *required* | `(title: string, place: number, of: number) => string` | — | |
|
|
14069
|
+
| `dashboardOptions` *required* | `string` | — | |
|
|
14070
|
+
| `dashboardOptionsChanged` *required* | `(title: string) => string` | — | |
|
|
14071
|
+
| `dashboardEmpty` *required* | `string` | — | |
|
|
14072
|
+
| `dashboardEmptyEditing` *required* | `string` | — | |
|
|
14073
|
+
| `dashboardFailed` *required* | `string` | — | |
|
|
14074
|
+
| `dashboardUndone` *required* | `string` | — | |
|
|
14075
|
+
| `dashboardRedone` *required* | `string` | — | |
|
|
14076
|
+
| `dashboardResetDone` *required* | `string` | — | |
|
|
14077
|
+
| `calculationSumSymbol` *required* | `string` | — | The four operators as symbols in a formula line. |
|
|
14078
|
+
| `calculationDifferenceSymbol` *required* | `string` | — | |
|
|
14079
|
+
| `calculationProductSymbol` *required* | `string` | — | |
|
|
14080
|
+
| `calculationQuotientSymbol` *required* | `string` | — | |
|
|
14081
|
+
| `calculationSumWord` *required* | `string` | — | The same four as words, in the accessible sentence of a line. |
|
|
14082
|
+
| `calculationDifferenceWord` *required* | `string` | — | |
|
|
14083
|
+
| `calculationProductWord` *required* | `string` | — | |
|
|
14084
|
+
| `calculationQuotientWord` *required* | `string` | — | |
|
|
14085
|
+
| `calculationEquals` *required* | `string` | — | Between the parts of the sentence: "Availability equals ...". |
|
|
14086
|
+
| `calculationApproximately` *required* | `string` | — | Before a result marked "≈" in the sentence. |
|
|
14087
|
+
| `calculationApproximateNote` *required* | `string` | — | Beside a result marked "≈": why the rounded operands do not give it. |
|
|
14088
|
+
| `calculationPercent` *required* | `string` | — | How a percentage is read out: "91.6 percent". |
|
|
14089
|
+
| `calculationMissing` *required* | `(label: string) => string` | — | Why a quantity has no number - the label is the given at the root of it, or the divisor that is zero. |
|
|
14090
|
+
| `calculationDivisionByZero` *required* | `(label: string) => string` | — | |
|
|
14091
|
+
| `calculationAboveTarget` *required* | `(target: string) => string` | — | The target beside the result, with the target's number and unit. |
|
|
14092
|
+
| `calculationBelowTarget` *required* | `(target: string) => string` | — | |
|
|
14093
|
+
| `calculationOnTarget` *required* | `(target: string) => string` | — | |
|
|
14094
|
+
| `calculationWorstInside` *required* | `(verdict: string) => string` | — | The quiet marker on a folded quantity whose derivation holds a worse verdict than its own; the verdict word comes from `verdict*`. |
|
|
14095
|
+
| `calculationSource` *required* | `(source: string) => string` | — | Where a given number came from. |
|
|
14096
|
+
| `calculationShowDerivation` *required* | `(label: string) => string` | — | The disclosure button of a derivation, named after the quantity. |
|
|
14097
|
+
| `calculationHideDerivation` *required* | `(label: string) => string` | — | |
|
|
14098
|
+
| `calculationOperandCount` *required* | `(count: number) => string` | — | On a folded line whose operator has more operands than are written out beneath it ([ADR-0028](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0028-a-calculation-is-a-tree-or-a-chain.md)): how many there are. |
|
|
14099
|
+
| `calculationNoOperands` *required* | `string` | — | On the line of a sum with no operands, where its formula would stand ([ADR-0049](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0049-a-sum-takes-rows-from-data.md)). |
|
|
14100
|
+
|
|
12927
14101
|
##### `NumberOptions`
|
|
12928
14102
|
|
|
12929
14103
|
From `@umriss-ui/core`.
|