@protobase/cli 0.94.8 → 0.94.9
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/dist/cli/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.94.
|
|
3
|
+
"version": "0.94.9",
|
|
4
4
|
"description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@better-auth/core": "^1.7.12",
|
|
45
45
|
"@hono/node-server": "^2.1.3",
|
|
46
|
-
"@protobase/config": "0.94.
|
|
47
|
-
"@protobase/layout": "0.94.
|
|
48
|
-
"@protobase/query": "0.94.
|
|
49
|
-
"@protobase/schema": "0.94.
|
|
50
|
-
"@protobase/server": "0.94.
|
|
51
|
-
"@protobase/ui": "0.94.
|
|
52
|
-
"@protobase/workflows": "0.94.
|
|
46
|
+
"@protobase/config": "0.94.9",
|
|
47
|
+
"@protobase/layout": "0.94.9",
|
|
48
|
+
"@protobase/query": "0.94.9",
|
|
49
|
+
"@protobase/schema": "0.94.9",
|
|
50
|
+
"@protobase/server": "0.94.9",
|
|
51
|
+
"@protobase/ui": "0.94.9",
|
|
52
|
+
"@protobase/workflows": "0.94.9",
|
|
53
53
|
"@react-email/render": "^2.1.0",
|
|
54
54
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
55
55
|
"@sentry/vite-plugin": "^11.10.0",
|
|
@@ -26,6 +26,7 @@ The page of one record, with its sections, related records, galleries, charts an
|
|
|
26
26
|
- [Conditional sections](../reference/ui-config.md#form-and-read-view): Sections and fields show only while editing, only while reading, or only when a condition on the record holds.
|
|
27
27
|
- [Galleries](../reference/ui-config.md#galleries): A record's photos show as tiles that open a full-screen lightbox, with keyboard and swipe navigation.
|
|
28
28
|
- [Related records](../reference/ui-config.md#related-records): Every record page shows how many records point at it, and can list related records, also through a join resource, as a table, another display or cards with buttons, each row or card with a button to an address its fields name.
|
|
29
|
+
- [A related record in full](../reference/ui-config.md#a-related-record-in-full): A related record can show its fields in full, without a card, for reading tabs such as notes.
|
|
29
30
|
- [Record lines](../reference/ui-config.md#record-lines): The related table a record's view marks as its lines, such as an invoice's, shows all of them on its page, where you edit, add, remove and reorder them, and Save writes the record and its lines together.
|
|
30
31
|
- [Custom section fallbacks](../reference/custom-components.md#record-section-fallbacks) (experimental): Where your own component on a record page cannot be drawn, such as on a watch, what you declare shows in its place: any main-column item in the main column, conversations included, and sidebar maps and sidebar custom components in the sidebar.
|
|
31
32
|
- [Conversations](../reference/ui-config.md#conversations): A record page holds a chat about the record, such as a task's, with its messages in markdown and a box that sends one, declared in its layout with no component of the app's own.
|
|
@@ -952,13 +952,13 @@ Without any configuration, the record page's rail has a **Related records** card
|
|
|
952
952
|
| `from` | A field of this record whose value `field` must hold, instead of this record's key, such as the task of a question, to list the task's links: `{ resource: 'task_links', field: 'task_id', from: 'task_id' }`. Same type as `field` (a relation to the same resource), not sensitive, and not with `through`. A record with no value lists nothing. |
|
|
953
953
|
| `through` | `{ resource, field, key?, filter? }`: the join records whose `field` (a filterable relation) holds this record's key; their `key` values (default their primary key, filterable, and pointing at one resource with `field`) pick the listed records, in one read with [`related()`](api.md#filtering-through-related-records), so an index must serve `key` too. |
|
|
954
954
|
| `filter`, `sort` | AIP-160 and AIP-132 on `resource`, as in the list API. `filter` narrows the listed records, `through.filter` the join records. |
|
|
955
|
-
| `columns` | Fields of `resource`, through relations too (`unit_id.property_id`); default the view's list columns without `field`. The first links to the record a row opens. With `presentation: 'cards'`, the fields each card shows. |
|
|
956
|
-
| `presentation` | `'cards'` shows the records as [cards](#related-records-as-cards) instead of the table or display. |
|
|
955
|
+
| `columns` | Fields of `resource`, through relations too (`unit_id.property_id`); default the view's list columns without `field`. The first links to the record a row opens. With `presentation: 'cards'`, the fields each card shows; with `presentation: 'record'`, the fields of the record it shows. |
|
|
956
|
+
| `presentation` | `'cards'` shows the records as [cards](#related-records-as-cards) instead of the table or display; `'record'` shows [one record in full](#a-related-record-in-full). |
|
|
957
957
|
| `actions` | Named actions of `resource`'s view, by name, as buttons on each card; only with `presentation: 'cards'`. |
|
|
958
958
|
| `button` | `{ label, to }`: a [button on each row](blocks.md#row-buttons), or each card, to an address the row's fields name, such as `{ label: '{verb}', to: { kind: 'record', resource: 'tasks', key: '{task_id}', tab: 'Review' } }`; a row without a value for a field it names shows none. Not with `lines`. |
|
|
959
959
|
| `open` | The relation of `resource` whose record a row opens, for rows that link this record to another. By default the one relation in `resource`'s primary key besides `field`, when there is exactly one (a join resource such as `task_dependencies` keyed on `[task_id, type, depends_on_id]`); otherwise rows open their own records. The row's menu then has **Open** for the other record and **Edit** for the link itself. |
|
|
960
|
-
| `limit` | How many records it shows, 1 to 100; default 10. When there are more, the section says so beside View all, such as "The first 10 of 37.". Before 0.13 this was `pageSize`, rows per page; rename it. |
|
|
961
|
-
| `display` | The display of `resource`'s list it opens in, and View all opens, such as `cards`; default the list's. |
|
|
960
|
+
| `limit` | How many records it shows, 1 to 100; default 10. Not with `presentation: 'record'`. When there are more, the section says so beside View all, such as "The first 10 of 37.". Before 0.13 this was `pageSize`, rows per page; rename it. |
|
|
961
|
+
| `display` | The display of `resource`'s list it opens in, and View all opens, such as `cards`; default the list's. Not with `presentation: 'record'`. |
|
|
962
962
|
| `help`, `empty` | A line under the title, and the text when nothing matches (default "Nothing here yet."). |
|
|
963
963
|
| `hideEmpty` | `true` leaves the section off the page while it has no records. |
|
|
964
964
|
| `lines` | `true` makes the section the record's [lines](#record-lines), edited in place with the record. |
|
|
@@ -1031,6 +1031,23 @@ l.related('Waiting on you', {
|
|
|
1031
1031
|
|
|
1032
1032
|
An action that `actions` names must be a named action of `resource`'s view. The cards have no display switch or **Reorder**; View all opens the list as a table section would.
|
|
1033
1033
|
|
|
1034
|
+
#### A related record in full
|
|
1035
|
+
|
|
1036
|
+
With `presentation: 'record'` the section shows one related record as part of the page, for a tab meant for reading, such as an objective's notes kept in a record of their own: no card, no title of the record, nothing cut short with **Show more**, and no View all while there is only the one record. It shows the first record in `sort` order, each of `columns` in full as the record page shows it (a markdown field rendered), leaving out a field the record has no value for. On the heading's line, a link **Open** and the singular name of `resource`'s view, such as **Open note**, goes to the record's own page, with `button` before it. When more records match, View all under the record opens them all in the list, so a section such as the latest review does not hide the older ones. With one column the value stands alone, without its label; with several each is under its label. Without a record it shows `empty`, or with `hideEmpty` nothing. A change to the record shows as soon as the page hears of it, as in every related section of a [live](live.md) resource.
|
|
1037
|
+
|
|
1038
|
+
```ts
|
|
1039
|
+
l.tab('Notes', [
|
|
1040
|
+
l.related('Coordinator notes', {
|
|
1041
|
+
resource: 'objective_notes',
|
|
1042
|
+
field: 'objective_id',
|
|
1043
|
+
presentation: 'record',
|
|
1044
|
+
columns: ['notes'],
|
|
1045
|
+
}),
|
|
1046
|
+
])
|
|
1047
|
+
```
|
|
1048
|
+
|
|
1049
|
+
It takes no `limit`, `display` or `actions`.
|
|
1050
|
+
|
|
1034
1051
|
### Charts of related records
|
|
1035
1052
|
|
|
1036
1053
|
`l.chart(title, options)` draws line graphs of numeric fields of the records that point at the record on the page, over a timestamp of theirs, as a virtual machine's page graphs its CPU and network from the samples an app keeps of it, about one a minute. The section has a switch between the last **Hour**, per minute, the last **Day**, per 5 minutes, and the last **Week**, per hour, and one between the **Average** and the **Maximum** of each bucket. A bucket without a sample is a gap in the line, never 0. Each series is a line of its own colour, with a legend when there are several, and the tooltip shows each value with its field's prefix, suffix and decimals; the axis has one scale, so a chart holds series of one unit, such as bytes in and out.
|