@umriss-ui/table 0.7.2 → 0.7.4
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 +48 -0
- package/dist/index.d.ts +3 -1
- package/dist/table.css +1 -1
- package/dist/table.js +2225 -2169
- package/docs/llms-full.md +64 -6
- package/package.json +3 -3
package/docs/llms-full.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @umriss-ui/table 0.7.
|
|
1
|
+
# @umriss-ui/table 0.7.4
|
|
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
|
|
|
@@ -1000,7 +1000,7 @@ Also every prop of `ColumnBase`, `ValuePaths`.
|
|
|
1000
1000
|
| `numeric` | `boolean` | — | Right-aligned with tabular figures. Without it the first value present decides. |
|
|
1001
1001
|
| `width` | `number` | — | Initial width in pixels; without it the browser decides. |
|
|
1002
1002
|
| `resizable` | `boolean` | — | Shows the drag grip on the header cell. |
|
|
1003
|
-
| `pin` | `Pin` | — | 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. |
|
|
1003
|
+
| `pin` | `Pin` | — | 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. |
|
|
1004
1004
|
| `sortable` | `boolean` | — | Sortable unless stated otherwise, when the value is text, a number, a point in time or a boolean. |
|
|
1005
1005
|
| `searchable` | `boolean` | — | Takes part in the search. Without a statement: yes for text, no otherwise. |
|
|
1006
1006
|
| `groupable` | `boolean` | — | Can the table be grouped by this column? Without a statement: yes, when its value is text, a number, a point in time or a boolean, or it has a `groupValue`. |
|
|
@@ -3316,8 +3316,10 @@ export default function ShareBar() {
|
|
|
3316
3316
|
<Table ariaLabel="Invoices by cost centre and supplier">
|
|
3317
3317
|
<Column value="supplier" label="Supplier" />
|
|
3318
3318
|
<Column value="costCentre" label="Cost centre" />
|
|
3319
|
-
|
|
3319
|
+
{/* The amount with its bar right beside the groups: after the invoice
|
|
3320
|
+
it stood out of view on a phone. */}
|
|
3320
3321
|
<Column value="amount" label="Amount (€)" format={{ decimals: 2 }} aggregate="sum" />
|
|
3322
|
+
<Column value="id" label="Invoice" rowHeader />
|
|
3321
3323
|
<Column value="lines" label="Lines" aggregate="sum" share={false} />
|
|
3322
3324
|
</Table>
|
|
3323
3325
|
);
|
|
@@ -4471,7 +4473,8 @@ function InvoiceList({ start, restart }: { start: TableView; restart: (view: Tab
|
|
|
4471
4473
|
<Text as="span" size="sm" tone="secondary">
|
|
4472
4474
|
What the application would keep
|
|
4473
4475
|
</Text>
|
|
4474
|
-
|
|
4476
|
+
{/* JSON has no space to break at: without this it ran past a phone's card. */}
|
|
4477
|
+
<Text as="code" size="sm" mono data-role="view" style={{ overflowWrap: "anywhere" }}>
|
|
4475
4478
|
{JSON.stringify(t.view)}
|
|
4476
4479
|
</Text>
|
|
4477
4480
|
</Stack>
|
|
@@ -6448,7 +6451,10 @@ The demos' shared data, which some examples import from beside themselves. Copie
|
|
|
6448
6451
|
* where the month is closed (January and February), the forecast for every
|
|
6449
6452
|
* month; Marketing overspends, IT runs under;
|
|
6450
6453
|
* - `INVOICES` - incoming invoices with their lines (quantity, unit price,
|
|
6451
|
-
* discount, VAT rate), and `APPROVALS`, who signed which, or has yet to
|
|
6454
|
+
* discount, VAT rate), and `APPROVALS`, who signed which, or has yet to;
|
|
6455
|
+
* - `TEAMS` - the teams of each cost centre with their headcount, full-time
|
|
6456
|
+
* equivalents and monthly staff cost, and `BUSINESS_LINES`, which cost
|
|
6457
|
+
* centres each of the three business lines holds.
|
|
6452
6458
|
*
|
|
6453
6459
|
* Amounts in euros. "Now" is Tuesday, 17 March 2026. Plain data and small pure
|
|
6454
6460
|
* functions, no imports: copy the file beside an example and it runs.
|
|
@@ -6600,6 +6606,58 @@ export const APPROVALS: readonly Approval[] = [
|
|
|
6600
6606
|
{ invoice: "INV-26-0226", step: "finance", approver: "Martina Vogel", decision: "approved", at: on(3, 2) },
|
|
6601
6607
|
{ invoice: "INV-26-0221", step: "cost centre", approver: "Anika Sørensen", decision: "rejected", at: on(2, 24), comment: "Not ordered - the review was cancelled in January." },
|
|
6602
6608
|
];
|
|
6609
|
+
|
|
6610
|
+
export interface Team {
|
|
6611
|
+
/** The cost centre the team books to. */
|
|
6612
|
+
costCentre: string;
|
|
6613
|
+
name: string;
|
|
6614
|
+
/** People employed, whatever their hours. */
|
|
6615
|
+
headcount: number;
|
|
6616
|
+
/** Full-time equivalents: contracted hours over 40 a week. */
|
|
6617
|
+
fte: number;
|
|
6618
|
+
/** Staff cost of a month, in thousand euros. */
|
|
6619
|
+
monthlyCost: number;
|
|
6620
|
+
}
|
|
6621
|
+
|
|
6622
|
+
/** Every team, on 17 March: 102 people, 91.5 full-time equivalents. */
|
|
6623
|
+
export const TEAMS: readonly Team[] = [
|
|
6624
|
+
{ costCentre: "CC-1100", name: "Field sales North", headcount: 9, fte: 8.6, monthlyCost: 61.2 },
|
|
6625
|
+
{ costCentre: "CC-1100", name: "Field sales South", headcount: 8, fte: 7.5, monthlyCost: 53.9 },
|
|
6626
|
+
{ costCentre: "CC-1100", name: "Inside sales", headcount: 6, fte: 5.2, monthlyCost: 29.8 },
|
|
6627
|
+
{ costCentre: "CC-1100", name: "Key accounts", headcount: 4, fte: 4.0, monthlyCost: 33.6 },
|
|
6628
|
+
{ costCentre: "CC-1200", name: "Brand", headcount: 3, fte: 2.8, monthlyCost: 19.4 },
|
|
6629
|
+
{ costCentre: "CC-1200", name: "Online marketing", headcount: 4, fte: 3.5, monthlyCost: 24.1 },
|
|
6630
|
+
{ costCentre: "CC-1200", name: "Trade fairs", headcount: 2, fte: 1.5, monthlyCost: 10.2 },
|
|
6631
|
+
{ costCentre: "CC-3100", name: "Service desk", headcount: 7, fte: 5.9, monthlyCost: 31.3 },
|
|
6632
|
+
{ costCentre: "CC-3100", name: "Returns", headcount: 3, fte: 2.5, monthlyCost: 12.6 },
|
|
6633
|
+
{ costCentre: "CC-2100", name: "Seating", headcount: 6, fte: 5.8, monthlyCost: 43.5 },
|
|
6634
|
+
{ costCentre: "CC-2100", name: "Desks", headcount: 7, fte: 6.5, monthlyCost: 48.1 },
|
|
6635
|
+
{ costCentre: "CC-2100", name: "Storage", headcount: 5, fte: 4.6, monthlyCost: 33.9 },
|
|
6636
|
+
{ costCentre: "CC-2100", name: "Test lab", headcount: 3, fte: 2.5, monthlyCost: 16.8 },
|
|
6637
|
+
{ costCentre: "CC-2200", name: "Industrial design", headcount: 4, fte: 3.6, monthlyCost: 27.2 },
|
|
6638
|
+
{ costCentre: "CC-2200", name: "Colour and material", headcount: 2, fte: 1.8, monthlyCost: 12.9 },
|
|
6639
|
+
{ costCentre: "CC-4100", name: "Accounting", headcount: 5, fte: 4.4, monthlyCost: 27.5 },
|
|
6640
|
+
{ costCentre: "CC-4100", name: "Controlling", headcount: 3, fte: 3.0, monthlyCost: 21.3 },
|
|
6641
|
+
{ costCentre: "CC-4200", name: "Recruiting", headcount: 2, fte: 1.8, monthlyCost: 12.4 },
|
|
6642
|
+
{ costCentre: "CC-4200", name: "Payroll", headcount: 2, fte: 1.5, monthlyCost: 9.6 },
|
|
6643
|
+
{ costCentre: "CC-4300", name: "Workplace", headcount: 4, fte: 3.8, monthlyCost: 24.2 },
|
|
6644
|
+
{ costCentre: "CC-4300", name: "Applications", headcount: 5, fte: 4.5, monthlyCost: 34.8 },
|
|
6645
|
+
{ costCentre: "CC-4400", name: "Buildings", headcount: 3, fte: 3.0, monthlyCost: 16.9 },
|
|
6646
|
+
{ costCentre: "CC-4400", name: "Canteen", headcount: 5, fte: 3.2, monthlyCost: 14.7 },
|
|
6647
|
+
];
|
|
6648
|
+
|
|
6649
|
+
export interface BusinessLine {
|
|
6650
|
+
name: string;
|
|
6651
|
+
/** Its cost centres, in the order a report lists them. */
|
|
6652
|
+
costCentres: readonly string[];
|
|
6653
|
+
}
|
|
6654
|
+
|
|
6655
|
+
/** How the company reports: three business lines over the nine cost centres. */
|
|
6656
|
+
export const BUSINESS_LINES: readonly BusinessLine[] = [
|
|
6657
|
+
{ name: "Commercial", costCentres: ["CC-1100", "CC-1200", "CC-3100"] },
|
|
6658
|
+
{ name: "Product", costCentres: ["CC-2100", "CC-2200"] },
|
|
6659
|
+
{ name: "Corporate services", costCentres: ["CC-4100", "CC-4200", "CC-4300", "CC-4400"] },
|
|
6660
|
+
];
|
|
6603
6661
|
```
|
|
6604
6662
|
|
|
6605
6663
|
### `logistics.ts`
|
|
@@ -7136,7 +7194,7 @@ export interface AlertType {
|
|
|
7136
7194
|
|
|
7137
7195
|
export const ALERT_TYPES: readonly AlertType[] = [
|
|
7138
7196
|
{ id: "checkout-latency", label: "Checkout · p95 latency above 300 ms", priority: "high" },
|
|
7139
|
-
{ id: "checkout-errors", label: "Checkout · error rate above 2
|
|
7197
|
+
{ id: "checkout-errors", label: "Checkout · error rate above 2\u00a0%", priority: "high" },
|
|
7140
7198
|
{ id: "webhooks-queue", label: "Webhooks · queue older than 5 min", priority: "medium" },
|
|
7141
7199
|
{ id: "search-latency", label: "Search · p95 latency above 250 ms", priority: "medium" },
|
|
7142
7200
|
{ id: "images-disk", label: "Image service · disk 85 % full", priority: "low" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umriss-ui/table",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "React data table for data-dense applications - sorting, filtering, grouping, aggregates, virtualisation. Declared the way it reads: columns as JSX, typed against their rows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Roman Händler",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": ">=18",
|
|
53
53
|
"react-dom": ">=18",
|
|
54
|
-
"@umriss-ui/core": "^0.
|
|
54
|
+
"@umriss-ui/core": "^0.17.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@fontsource/geist-mono": "^5.3.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"typescript": "^5.6.3",
|
|
66
66
|
"vite": "^6.0.0",
|
|
67
67
|
"vite-plugin-dts": "^4.3.0",
|
|
68
|
-
"@umriss-ui/core": "0.
|
|
68
|
+
"@umriss-ui/core": "0.17.0",
|
|
69
69
|
"@umriss-ui/demo": "0.0.0"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|