@umriss-ui/table 0.55.1 → 0.56.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/API.md +2 -2
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/table.css +1 -1
- package/dist/table.js +1960 -1955
- package/docs/llms-full.md +88 -34
- package/package.json +3 -3
package/docs/llms-full.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @umriss-ui/table 0.
|
|
1
|
+
# @umriss-ui/table 0.56.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
|
|
|
@@ -387,7 +387,7 @@ A value cut short at the edge of its cell shows whole in a tip, under the pointe
|
|
|
387
387
|
| `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 9 more |
|
|
388
388
|
| `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 |
|
|
389
389
|
| `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) |
|
|
390
|
-
| `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
|
|
390
|
+
| `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 149 more |
|
|
391
391
|
| `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) |
|
|
392
392
|
|
|
393
393
|
###### Events
|
|
@@ -405,7 +405,7 @@ Also takes every attribute of `<div>` – without `children`.
|
|
|
405
405
|
|
|
406
406
|
| Prop | Type | Default | Description |
|
|
407
407
|
|---|---|---|---|
|
|
408
|
-
| `rowKey` *required* | `(row: Z) => Key` | — | 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
|
|
408
|
+
| `rowKey` *required* | `(row: Z) => Key` | — | 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 149 more |
|
|
409
409
|
| `pageSize` | `number` | `10` | How many rows a page holds in flow, or with `maxHeight`, and the start value in a frame of definite height before it is measured: there a page holds the whole lines the frame leaves between the head and the pager.<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 12 more |
|
|
410
410
|
| `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 |
|
|
411
411
|
| `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 24 more |
|
|
@@ -716,10 +716,10 @@ type TextOperator = "contains" | "notContains" | "startsWith" | "endsWith" | "eq
|
|
|
716
716
|
|
|
717
717
|
#### Known limits
|
|
718
718
|
|
|
719
|
-
- No cell range selection and no built-in undo: an edit is reported, never applied, and the application owns the rows; undo is a recipe over the reported edits ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
720
|
-
- 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.
|
|
719
|
+
- No cell range selection and no built-in undo: an edit is reported, never applied, and the application owns the rows; undo is a recipe over the reported edits ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md)).
|
|
720
|
+
- 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.56.0/docs/adr/0032-what-umriss-is-not.md)).
|
|
721
721
|
|
|
722
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
722
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
723
723
|
|
|
724
724
|
### Provider
|
|
725
725
|
|
|
@@ -1127,6 +1127,57 @@ export default function EveryColumnOption() {
|
|
|
1127
1127
|
}
|
|
1128
1128
|
```
|
|
1129
1129
|
|
|
1130
|
+
##### Align a column
|
|
1131
|
+
|
|
1132
|
+
`align` sets the side of the whole column - head label with its tools, values, footer - to `"start"`, `"center"` or `"end"`. `numeric` keeps deciding the figures: a number column can stand left or centred in tabular figures, a text column flush right without them. A centred value or label wider than its column is cut at the end.
|
|
1133
|
+
|
|
1134
|
+
```tsx
|
|
1135
|
+
import { Badge, Stack, Text } from "@umriss-ui/core";
|
|
1136
|
+
import { ColumnMenu, Toolbar, useTable } from "@umriss-ui/table";
|
|
1137
|
+
|
|
1138
|
+
interface Part {
|
|
1139
|
+
sku: string;
|
|
1140
|
+
state: "OK" | "LOW" | "OUT";
|
|
1141
|
+
bin: string;
|
|
1142
|
+
stock: number;
|
|
1143
|
+
lot: number;
|
|
1144
|
+
supplier: string;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
const TONE = { OK: "success", LOW: "warning", OUT: "danger" } as const;
|
|
1148
|
+
|
|
1149
|
+
const PARTS: Part[] = [
|
|
1150
|
+
{ sku: "BR-2041", state: "OK", bin: "A1", stock: 120, lot: 40871, supplier: "Holloway Garden Supplies" },
|
|
1151
|
+
{ sku: "BR-2042", state: "LOW", bin: "A12", stock: 4, lot: 40872, supplier: "Oakridge Pharmacy" },
|
|
1152
|
+
{ sku: "BR-2057", state: "OK", bin: "C3", stock: 38, lot: 40873, supplier: "Brixley Cycles" },
|
|
1153
|
+
{ sku: "BR-2063", state: "OUT", bin: "D14", stock: 0, lot: 40874, supplier: "Nimbrel Software" },
|
|
1154
|
+
];
|
|
1155
|
+
|
|
1156
|
+
export default function AlignAColumn() {
|
|
1157
|
+
const { Table, Column } = useTable(PARTS, { rowKey: (p) => p.sku });
|
|
1158
|
+
return (
|
|
1159
|
+
<Stack gap={3}>
|
|
1160
|
+
<Table aria-label="Parts">
|
|
1161
|
+
<Toolbar>
|
|
1162
|
+
<ColumnMenu />
|
|
1163
|
+
</Toolbar>
|
|
1164
|
+
<Column value="sku" label="Part" rowHeader />
|
|
1165
|
+
<Column value="state" label="State" align="center" width={110} sortable filter="list">
|
|
1166
|
+
{(s) => <Badge tone={TONE[s]}>{s}</Badge>}
|
|
1167
|
+
</Column>
|
|
1168
|
+
<Column value="bin" label="Bin" align="center" sortable={false} />
|
|
1169
|
+
<Column value="stock" label="Stock" numeric align="center" sortable aggregate="sum" />
|
|
1170
|
+
<Column value="lot" label="Lot" align="start" />
|
|
1171
|
+
<Column value="supplier" label="Supplier" align="end" width={120} sortable />
|
|
1172
|
+
</Table>
|
|
1173
|
+
<Text size="xs" tone="muted">
|
|
1174
|
+
State and Bin stand centred, Stock centred in tabular figures, Lot is a number that stands left, Supplier is text flush right and cut at its width.
|
|
1175
|
+
</Text>
|
|
1176
|
+
</Stack>
|
|
1177
|
+
);
|
|
1178
|
+
}
|
|
1179
|
+
```
|
|
1180
|
+
|
|
1130
1181
|
#### When to use something else
|
|
1131
1182
|
|
|
1132
1183
|
- Restricting a column to some of its values → Filter
|
|
@@ -1147,15 +1198,15 @@ The `label` is the column header's text, and so what a screen reader says for ev
|
|
|
1147
1198
|
|
|
1148
1199
|
| Prop | Type | Default | Description |
|
|
1149
1200
|
|---|---|---|---|
|
|
1150
|
-
| `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
|
|
1201
|
+
| `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 149 more |
|
|
1151
1202
|
| `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) |
|
|
1152
1203
|
| `format` | `FormatFor``<Z[K]>` | — | A standard presentation by name: `"percent"`, `"count"` or `{ decimals }` for numbers, `"date"`, `"time"`, `"dateTime"`, `"timeWithSeconds"` or `"dateTimeWithSeconds"` for points in time. Alignment, sorting, export and footer stay with the value.<br>Shown in: [Compute a value from the row](#column), [Every column option in one head](#column), [Set wording and formats once (Provider)](#provider) and 42 more |
|
|
1153
|
-
| `filter` | `FilterFor``<Z[K]>` | — | A filter in the column header: `"list"` offers the values that occur, `"range"` two bounds (numbers or points in time), `"text"` operators over a text, a filter from `columnFilter` asks whatever it asks itself. Its condition stands in the table toolbar.<br>Shown in: [Every column option in one head](#column), [A label wider than its column (Width and pinning)](#width-and-pinning)
|
|
1204
|
+
| `filter` | `FilterFor``<Z[K]>` | — | A filter in the column header: `"list"` offers the values that occur, `"range"` two bounds (numbers or points in time), `"text"` operators over a text, a filter from `columnFilter` asks whatever it asks itself. Its condition stands in the table toolbar.<br>Shown in: [Every column option in one head](#column), [Align a column](#column), [A label wider than its column (Width and pinning)](#width-and-pinning) and 15 more |
|
|
1154
1205
|
| `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) |
|
|
1155
1206
|
| `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 8 more |
|
|
1156
1207
|
| `editOptions` | `readonly ``Present``<Z[K]>[]` | the values that occur | What `edit="select"` offers. From `EditOptions`.<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 2 more |
|
|
1157
1208
|
| `validate` | `(value: Z[K] \| 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. 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), [Check an edit before it is reported (Edits)](#edits) and 3 more |
|
|
1158
|
-
| `children` | `Presentation``<Z[K], Z>` | — | How the value appears: `(value, row)`. Never called for an absent value. Required where the value has no text form.<br>Shown in: [Draw a value with other components (Formats)](#formats), [Show absent values (Formats)](#formats)
|
|
1209
|
+
| `children` | `Presentation``<Z[K], Z>` | — | How the value appears: `(value, row)`. Never called for an absent value. Required where the value has no text form.<br>Shown in: [Align a column](#column), [Draw a value with other components (Formats)](#formats), [Show absent values (Formats)](#formats) and 11 more |
|
|
1159
1210
|
|
|
1160
1211
|
Also every prop of `ColumnBase`, `ValuePaths` and `AggregateOptions`.
|
|
1161
1212
|
|
|
@@ -1163,15 +1214,16 @@ Also every prop of `ColumnBase`, `ValuePaths` and `AggregateOptions`.
|
|
|
1163
1214
|
|
|
1164
1215
|
| Prop | Type | Default | Description |
|
|
1165
1216
|
|---|---|---|---|
|
|
1166
|
-
| `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
|
|
1167
|
-
| `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
|
|
1168
|
-
| `numeric` | `boolean` | decided by the first value present | Right-aligned with tabular figures.<br>Shown in: [A header over columns](#column), [Every column option in one head](#column), [
|
|
1169
|
-
| `
|
|
1217
|
+
| `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 149 more |
|
|
1218
|
+
| `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 148 more |
|
|
1219
|
+
| `numeric` | `boolean` | decided by the first value present | Right-aligned with tabular figures.<br>Shown in: [A header over columns](#column), [Every column option in one head](#column), [Align a column](#column) and 2 more |
|
|
1220
|
+
| `align` | `"start" \| "center" \| "end"` | `"end"` for a numeric column, otherwise `"start"` | The side the whole column stands on - label with its tools, values, footer, aggregates and loading rows: flush at the start, centred, or flush at the end. It decides the side alone; `numeric` keeps deciding the figures.<br>Shown in: [Align a column](#column), [Share a column between tables (Presets)](#presets) |
|
|
1221
|
+
| `width` | `number` | the browser's | Initial width in pixels.<br>Shown in: [Every column option in one head](#column), [Align a column](#column), [Fit long values (Formats)](#formats) and 23 more |
|
|
1170
1222
|
| `flex` | `number` | none: the column is as wide as its content | A share of the width the other columns leave, so that the table fills its frame: two columns with `flex={1}` split it equally. A width, declared or dragged by hand, ends the flex of that column.<br>Shown in: [Every column option in one head](#column), [Columns that share the width (Width and pinning)](#width-and-pinning), [Share a column between tables (Presets)](#presets) |
|
|
1171
1223
|
| `minWidth` | `number` | — | The least width of a column with `flex`, in pixels.<br>Shown in: [Every column option in one head](#column), [Columns that share the width (Width and pinning)](#width-and-pinning), [Share a column between tables (Presets)](#presets) |
|
|
1172
1224
|
| `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), [Columns that share the width (Width and pinning)](#width-and-pinning) and 2 more |
|
|
1173
1225
|
| `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: [Every column option in one head](#column), [Pin columns to both sides (Width and pinning)](#width-and-pinning), [Share a column between tables (Presets)](#presets) and 3 more |
|
|
1174
|
-
| `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)
|
|
1226
|
+
| `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: [Align a column](#column), [Fit long values (Formats)](#formats), [Fit what does not fit (Formats)](#formats) and 12 more |
|
|
1175
1227
|
| `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) |
|
|
1176
1228
|
| `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) |
|
|
1177
1229
|
|
|
@@ -2431,6 +2483,7 @@ From `ColumnBase` — the full table stands on [Column](#column).
|
|
|
2431
2483
|
| [`label`](#column) *required* | `string` | — | Names the column in its header, in the column menu and in the header row of the export. |
|
|
2432
2484
|
| [`rowHeader`](#column) | `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. |
|
|
2433
2485
|
| [`numeric`](#column) | `boolean` | decided by the first value present | Right-aligned with tabular figures. |
|
|
2486
|
+
| [`align`](#column) | `"start" \| "center" \| "end"` | `"end"` for a numeric column, otherwise `"start"` | The side the whole column stands on - label with its tools, values, footer, aggregates and loading rows: flush at the start, centred, or flush at the end. It decides the side alone; `numeric` keeps deciding the figures. |
|
|
2434
2487
|
| [`width`](#column) | `number` | the browser's | Initial width in pixels. |
|
|
2435
2488
|
| [`flex`](#column) | `number` | none: the column is as wide as its content | A share of the width the other columns leave, so that the table fills its frame: two columns with `flex={1}` split it equally. A width, declared or dragged by hand, ends the flex of that column. |
|
|
2436
2489
|
| [`minWidth`](#column) | `number` | — | The least width of a column with `flex`, in pixels. |
|
|
@@ -2626,7 +2679,7 @@ From `ExportProps` — the full table stands on [Export](#export).
|
|
|
2626
2679
|
|
|
2627
2680
|
- In [server mode](#server-mode) the table sorts nothing itself; the sort goes to the server in the request.
|
|
2628
2681
|
|
|
2629
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
2682
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
2630
2683
|
|
|
2631
2684
|
### Search
|
|
2632
2685
|
|
|
@@ -2856,7 +2909,7 @@ type TableRef = Omit<TableSnapshot<unknown, any>, "setFilter" | "conditionOf"> &
|
|
|
2856
2909
|
|
|
2857
2910
|
- In [server mode](#server-mode) the table searches nothing itself; the term goes to the server in the request.
|
|
2858
2911
|
|
|
2859
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
2912
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
2860
2913
|
|
|
2861
2914
|
### Filter
|
|
2862
2915
|
|
|
@@ -3925,7 +3978,7 @@ type Absent = null | undefined;
|
|
|
3925
3978
|
|
|
3926
3979
|
- In [server mode](#server-mode) a list filter offers what the application names; the table cannot count values it does not hold.
|
|
3927
3980
|
|
|
3928
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
3981
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
3929
3982
|
|
|
3930
3983
|
### Pre-filter
|
|
3931
3984
|
|
|
@@ -5207,11 +5260,11 @@ export default function GroupAndFoldFromControls() {
|
|
|
5207
5260
|
|
|
5208
5261
|
#### Known limits
|
|
5209
5262
|
|
|
5210
|
-
- No pivot and no more than three levels ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
5263
|
+
- No pivot and no more than three levels ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md)).
|
|
5211
5264
|
- No bar to drag headers onto: grouping is chosen in the column menu.
|
|
5212
5265
|
- In [server mode](#server-mode) the server groups: the request carries `grouping`, the answer `groups`, and a page counts lines.
|
|
5213
5266
|
|
|
5214
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
5267
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
5215
5268
|
|
|
5216
5269
|
### Tree rows
|
|
5217
5270
|
|
|
@@ -5877,7 +5930,7 @@ From `ToolbarProps` — the full table stands on [Toolbar](#toolbar).
|
|
|
5877
5930
|
- Not in [server mode](#server-mode).
|
|
5878
5931
|
- One column set for every level; a level without a value shows it as absent.
|
|
5879
5932
|
|
|
5880
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
5933
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
5881
5934
|
|
|
5882
5935
|
### Aggregate
|
|
5883
5936
|
|
|
@@ -6347,7 +6400,7 @@ The keys of [First table](#first-table) and Input apply here.
|
|
|
6347
6400
|
|
|
6348
6401
|
| Prop | Type | Default | Description |
|
|
6349
6402
|
|---|---|---|---|
|
|
6350
|
-
| `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; a string is not coerced - it is left out and warns once in development.<br>Shown in: [Total a column](#aggregate), [Find the extremes](#aggregate), [Show a range of dates](#aggregate) and
|
|
6403
|
+
| `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; a string is not coerced - it is left out and warns once in development.<br>Shown in: [Total a column](#aggregate), [Find the extremes](#aggregate), [Show a range of dates](#aggregate) and 41 more |
|
|
6351
6404
|
| `aggregateLabel` | `string` | — | The word for an `aggregate` function of one's own: it stands before the value in the footer and is what a screen reader reads. A group header shows no word. A built-in kind keeps its own word, the wording's; a name beside it is ignored.<br>Shown in: [Name your own aggregate](#aggregate), [Share a column between tables (Presets)](#presets) |
|
|
6352
6405
|
| `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 |
|
|
6353
6406
|
|
|
@@ -6419,7 +6472,7 @@ type Displayable = string | number | boolean | Date;
|
|
|
6419
6472
|
|
|
6420
6473
|
- 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.
|
|
6421
6474
|
|
|
6422
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
6475
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6423
6476
|
|
|
6424
6477
|
## Rows
|
|
6425
6478
|
|
|
@@ -6691,7 +6744,7 @@ From `ToolbarProps` — the full table stands on [Toolbar](#toolbar).
|
|
|
6691
6744
|
|
|
6692
6745
|
- 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.
|
|
6693
6746
|
|
|
6694
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
6747
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6695
6748
|
|
|
6696
6749
|
### Row appearance
|
|
6697
6750
|
|
|
@@ -7728,7 +7781,7 @@ The parts the table puts in name themselves: the search field “Search table”
|
|
|
7728
7781
|
|
|
7729
7782
|
| Prop | Type | Default | Description |
|
|
7730
7783
|
|---|---|---|---|
|
|
7731
|
-
| `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
|
|
7784
|
+
| `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 48 more |
|
|
7732
7785
|
| `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) |
|
|
7733
7786
|
| `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) |
|
|
7734
7787
|
| `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) |
|
|
@@ -8453,7 +8506,7 @@ The keys of [First table](#first-table), Input, [ColumnMenu](#columnmenu), Selec
|
|
|
8453
8506
|
|
|
8454
8507
|
| Prop | Type | Default | Description |
|
|
8455
8508
|
|---|---|---|---|
|
|
8456
|
-
| `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
|
|
8509
|
+
| `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 48 more |
|
|
8457
8510
|
| `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) |
|
|
8458
8511
|
| `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) |
|
|
8459
8512
|
| `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) |
|
|
@@ -9499,7 +9552,7 @@ Everything the library puts out as text.
|
|
|
9499
9552
|
|
|
9500
9553
|
- 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; the browser's print is the print layout (see Print above).
|
|
9501
9554
|
|
|
9502
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
9555
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9503
9556
|
|
|
9504
9557
|
### View
|
|
9505
9558
|
|
|
@@ -10106,7 +10159,7 @@ type TableRef = Omit<TableSnapshot<unknown, any>, "setFilter" | "conditionOf"> &
|
|
|
10106
10159
|
|
|
10107
10160
|
- In [server mode](#server-mode) the page goes to the server in the request, and `rowCount` decides how many pages there are.
|
|
10108
10161
|
|
|
10109
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
10162
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
10110
10163
|
|
|
10111
10164
|
### Virtualisation
|
|
10112
10165
|
|
|
@@ -10512,7 +10565,7 @@ From `ToolbarProps` — the full table stands on [Toolbar](#toolbar).
|
|
|
10512
10565
|
- Paging and virtualisation do not combine; one table does one or the other.
|
|
10513
10566
|
- No loading more rows while scrolling: a table on a server pages ([Server mode](#server-mode)).
|
|
10514
10567
|
|
|
10515
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
10568
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
10516
10569
|
|
|
10517
10570
|
### Benchmark
|
|
10518
10571
|
|
|
@@ -12324,7 +12377,7 @@ From `ToolbarProps` — the full table stands on [Toolbar](#toolbar).
|
|
|
12324
12377
|
- A list filter offers what `filterOptions` names; the table cannot count values it does not hold.
|
|
12325
12378
|
- No loading more rows while scrolling: paging and virtualisation do not combine.
|
|
12326
12379
|
|
|
12327
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
12380
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
12328
12381
|
|
|
12329
12382
|
## Editing
|
|
12330
12383
|
|
|
@@ -13063,9 +13116,9 @@ From `ToolbarProps` — the full table stands on [Toolbar](#toolbar).
|
|
|
13063
13116
|
|
|
13064
13117
|
#### Known limits
|
|
13065
13118
|
|
|
13066
|
-
- No cell range selection and no built-in undo: the history of the reported edits is the application's ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
13119
|
+
- No cell range selection and no built-in undo: the history of the reported edits is the application's ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md)).
|
|
13067
13120
|
|
|
13068
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
13121
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
13069
13122
|
|
|
13070
13123
|
## Limits and alarms
|
|
13071
13124
|
|
|
@@ -13314,6 +13367,7 @@ The keys of [First table](#first-table) apply here.
|
|
|
13314
13367
|
| `limits` *required* | `LimitSet` | — | The limit set every value is read against.<br>Shown in: [Read latency against its objective](#verdictcolumn), [Sort by verdict or by value](#verdictcolumn), [Judge a computed share](#verdictcolumn) and 6 more |
|
|
13315
13368
|
| `format` | `NumberFormat` | — | How the value and its excess are written.<br>Shown in: [Judge a computed share](#verdictcolumn), [Show the worst in the footer](#verdictcolumn), [Carry the worst verdict up (Aggregate)](#aggregate) and 1 more |
|
|
13316
13369
|
| `sortBy` | `"verdict" \| "value"` | `"verdict"` | What the column sorts by: by the weight of the verdict (with equal weight the existing order stays) – or by the value.<br>Shown in: [Sort by verdict or by value](#verdictcolumn) |
|
|
13370
|
+
| `align` | `"start" \| "center" \| "end"` | `"end"` | The side the whole column stands on: flush at the start, centred, or flush at the end. |
|
|
13317
13371
|
| `width` | `number` | the browser's | Initial width in pixels.<br>Shown in: [Pin columns to both sides (Width and pinning)](#width-and-pinning) |
|
|
13318
13372
|
| `flex` | `number` | none: the column is as wide as its content | A share of the width the other columns leave, so that the table fills its frame: two columns with `flex={1}` split it equally. A width, declared or dragged by hand, ends the flex of that column. |
|
|
13319
13373
|
| `minWidth` | `number` | — | The least width of a column with `flex`, in pixels. |
|
|
@@ -13409,7 +13463,7 @@ type Severity = "warning" | "alarm";
|
|
|
13409
13463
|
- No list filter: four verdicts are sorted, not filtered.
|
|
13410
13464
|
- 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)).
|
|
13411
13465
|
|
|
13412
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.
|
|
13466
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/table-v0.56.0/docs/adr/0032-what-umriss-is-not.md).
|
|
13413
13467
|
|
|
13414
13468
|
## API index
|
|
13415
13469
|
|
|
@@ -14294,8 +14348,8 @@ row. Pass it as `of` to a part that stands outside the table.
|
|
|
14294
14348
|
|
|
14295
14349
|
| Prop | Type | Default | Description |
|
|
14296
14350
|
|---|---|---|---|
|
|
14297
|
-
| `Table` *required* | `(props: `[`TableProps`](#first-table)`<Z, Key>) => 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
|
|
14298
|
-
| `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
|
|
14351
|
+
| `Table` *required* | `(props: `[`TableProps`](#first-table)`<Z, Key>) => 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 149 more |
|
|
14352
|
+
| `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 149 more |
|
|
14299
14353
|
| `VerdictColumn` *required* | `VerdictColumnComponent``<Z>` | — | <br>Shown in: [A bar, a scale, an icon and a limit (Conditional formatting)](#conditional-formatting), [Pin columns to both sides (Width and pinning)](#width-and-pinning), [Read a day's deliveries by depot (Grouping)](#grouping-1) and 6 more |
|
|
14300
14354
|
| `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 |
|
|
14301
14355
|
| `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 11 more |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umriss-ui/table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.0",
|
|
4
4
|
"description": "React data table for data-dense applications - sorting, filtering, grouping, aggregates, virtualisation. Declared the way it reads: columns as JSX, typed against their rows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Roman Händler",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@umriss-ui/core": "^0.
|
|
72
|
+
"@umriss-ui/core": "^0.56.0",
|
|
73
73
|
"react": ">=19",
|
|
74
74
|
"react-dom": ">=19"
|
|
75
75
|
},
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@types/node": "^22.20.2",
|
|
80
80
|
"@types/react": "^19.0.0",
|
|
81
81
|
"@types/react-dom": "^19.0.0",
|
|
82
|
-
"@umriss-ui/core": "0.
|
|
82
|
+
"@umriss-ui/core": "0.56.0",
|
|
83
83
|
"@umriss-ui/demo": "0.0.0",
|
|
84
84
|
"@vitejs/plugin-react": "^4.3.4",
|
|
85
85
|
"happy-dom": "^21.0.4",
|