@ai-matrx/records-ui 0.116.47 → 0.116.48
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 +23 -1
- package/dist/index.cjs +46 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +48 -7
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
### Unreleased
|
|
4
4
|
|
|
5
|
+
- **A gallery card is titled like a board card (ADVERSARIAL-4 N1, 2026-10-19).** The gallery read only the host-handed `titleField` and drew "Untitled" when a host left it out and the name column was not a conventional key (`room_name`); it now uses the same `cardTitleField` as the board, so the name is the title and is not repeated as a field. Guard: the gallery clause in `a-card-is-titled-by-what-names-its-record.test.tsx` (red before). Consumer action: none (hosts should still pass the table's `titleField`).
|
|
6
|
+
- **A number tile wears its title; an interface-only reader's chart box says why it is empty; choices read in their words; the row's "Shown to" sentence names what it gates (AT-FIX-G1, 2026-10-19).** `NumberBlockView` draws the element's `title` above the count (the skeleton keeps the line, so the number landing shifts nothing). A `chart` element read through the interface door (no chart door for an outsider) draws "Charts draw for members of this organization." in a box of the chart's own height instead of a hole. Rows read through the interface door get their choice cells in the choice's own words (`withChoiceWords`, from the door's `labels`; a value with no word stays as stored). `ROW_CONTROL_WORDS.whoMayChangeRow` is now `SHOWN_TO_WHO_MAY_CHANGE` from `@ai-matrx/records` ("...can change who sees it."): it governs "Shown to", never the row's cells (those follow the table's Editor level). Guards: `a-number-tile-shows-its-title-and-an-outsiders-chart-says-why.test.tsx` (red before), `a-built-thing-is-archived-and-a-row-says-who-it-is-shown-to.test.tsx`. Consumer action: none.
|
|
7
|
+
|
|
5
8
|
- **A timed-out Make it work tries again (AT-SLOW-2, 2026-10-19).** `RefusalNotice` takes `onRetry` and draws a "Try again" door; `ViewNeeds` passes the same press, which reads the table first so a declare that landed before the client gave up is used, never made twice. Guard: `a-timed-out-make-it-work-tries-again.test.tsx` (red before). Consumer action: none.
|
|
6
9
|
- **Bulk print names every page; gallery cards keep long values inside (AT-SLOW, 2026-10-19).** `BulkActions` takes `titleKey` (Grid passes the table's `title_field`) and hands `PrintWithLayoutDialog` each ticked row's name (`printNames`), so a refused page is titled with the row, not "Record". A gallery tile and card are `min-w-0 overflow-hidden` and each value carries its text as a `title` (`galleryValueTitle`, 300 characters at most), so a long unbroken value is cut with an ellipsis instead of running over the next card. Guards: `a-bulk-print-names-each-page.test.ts`, the new clause in `a-gallery-card-shows-what-it-holds-in-the-grids-format.test.tsx` (red before). Consumer action: none.
|
|
7
10
|
- **A saved form is never kept as unsaved work (2026-10-19).** `FormBuilder`'s keep timer, armed by the last keystroke, could fire after a save dropped the kept copy and before the read-back landed, keeping the saved form again; the next open said "Unsaved changes … restored" over saved work. What the last accepted save wrote is now never kept. Guard: `a-refused-save-keeps-the-builder.test.tsx` (slow read-back clause, red before). Consumer action: none.
|
|
@@ -29,11 +32,30 @@
|
|
|
29
32
|
- Tests: `vitest.setup.ts` gives jsdom a no-op `performance.mark` / `measure`.
|
|
30
33
|
- **New subpath `@ai-matrx/records-ui/data-source`:** `recordsDataSource`, `personActor` and the who-changed words (`whenWords`, `actorWords`, `actorBadge`, `lastChangeSentence`, `SOMEBODY`, `THE_SYSTEM`) alone. `/helpers` also carries the field-type words, the colour resolver and the table builders, which read `@ai-matrx/records/core`; this entry reaches `@ai-matrx/kit` only, and shares the one data-source cache with `/helpers` and the root. Additive. Consumer action: a shell-reachable service that only binds its supabase client or says when imports from `/data-source`.
|
|
31
34
|
|
|
32
|
-
## 0.116.
|
|
35
|
+
## 0.116.48
|
|
33
36
|
|
|
34
37
|
UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
|
|
35
38
|
Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/records-ui/src`.
|
|
36
39
|
|
|
40
|
+
## 0.116.47
|
|
41
|
+
|
|
42
|
+
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
43
|
+
so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
|
|
44
|
+
Diff: `git diff be963e798f 77f29a65b9 -- apps/shared/records-ui/src`
|
|
45
|
+
|
|
46
|
+
Changed shipped source files (11):
|
|
47
|
+
- `apps/shared/records-ui/src/BookingBuilder.tsx`
|
|
48
|
+
- `apps/shared/records-ui/src/BookingSlots.tsx`
|
|
49
|
+
- `apps/shared/records-ui/src/BuiltOnArchive.tsx`
|
|
50
|
+
- `apps/shared/records-ui/src/CommentThread.tsx`
|
|
51
|
+
- `apps/shared/records-ui/src/EmbedFrame.tsx`
|
|
52
|
+
- `apps/shared/records-ui/src/Enrich.tsx`
|
|
53
|
+
- `apps/shared/records-ui/src/FormsPanel.tsx`
|
|
54
|
+
- `apps/shared/records-ui/src/TablePage.tsx`
|
|
55
|
+
- `apps/shared/records-ui/src/objectActions.ts`
|
|
56
|
+
- `apps/shared/records-ui/src/plainWords.ts`
|
|
57
|
+
- `apps/shared/records-ui/src/rights.ts`
|
|
58
|
+
|
|
37
59
|
## 0.116.46
|
|
38
60
|
|
|
39
61
|
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
package/dist/index.cjs
CHANGED
|
@@ -35727,7 +35727,7 @@ var ROW_CONTROL_WORDS = {
|
|
|
35727
35727
|
applying: "Applying\u2026",
|
|
35728
35728
|
whoMayChangeTable: "Only the table's maker or an admin can change these.",
|
|
35729
35729
|
shownTo: "Shown to",
|
|
35730
|
-
whoMayChangeRow:
|
|
35730
|
+
whoMayChangeRow: import_records50.SHOWN_TO_WHO_MAY_CHANGE
|
|
35731
35731
|
};
|
|
35732
35732
|
function appliedLine(done) {
|
|
35733
35733
|
const rows = `${done.changed} ${done.changed === 1 ? "row" : "rows"} changed`;
|
|
@@ -47305,7 +47305,7 @@ function Board({
|
|
|
47305
47305
|
...addCard ? { onNew: () => void addCard() } : {},
|
|
47306
47306
|
...newRowLabel ? { newLabel: newRowLabel } : {},
|
|
47307
47307
|
tableId: view.subject,
|
|
47308
|
-
titleKey,
|
|
47308
|
+
titleKey: titleField?.key ?? titleKey,
|
|
47309
47309
|
onChanged: () => {
|
|
47310
47310
|
records.reload();
|
|
47311
47311
|
onMoved?.();
|
|
@@ -56965,6 +56965,24 @@ function doorField(f) {
|
|
|
56965
56965
|
config: f.system ? { system: f.system } : {}
|
|
56966
56966
|
};
|
|
56967
56967
|
}
|
|
56968
|
+
function choiceKey(value) {
|
|
56969
|
+
return value.replace(/[^A-Za-z0-9]+/g, "").toLowerCase();
|
|
56970
|
+
}
|
|
56971
|
+
function withChoiceWords(document2, labels) {
|
|
56972
|
+
if (!labels) return document2;
|
|
56973
|
+
let out = null;
|
|
56974
|
+
for (const [key, words2] of Object.entries(labels)) {
|
|
56975
|
+
const value = document2[key];
|
|
56976
|
+
const word = (v) => typeof v === "string" ? words2[choiceKey(v)] ?? v : v;
|
|
56977
|
+
const next = Array.isArray(value) ? value.map(word) : word(value);
|
|
56978
|
+
const changed2 = Array.isArray(next) ? next.some((n, i) => n !== value[i]) : next !== value;
|
|
56979
|
+
if (changed2) {
|
|
56980
|
+
out ??= { ...document2 };
|
|
56981
|
+
out[key] = next;
|
|
56982
|
+
}
|
|
56983
|
+
}
|
|
56984
|
+
return out ?? document2;
|
|
56985
|
+
}
|
|
56968
56986
|
function useDoorRows(door, elementId, recordId) {
|
|
56969
56987
|
const client = (0, import_react318.useRecordsClient)();
|
|
56970
56988
|
const [state2, setState] = (0, import_react317.useState)({
|
|
@@ -56988,7 +57006,7 @@ function useDoorRows(door, elementId, recordId) {
|
|
|
56988
57006
|
}, [client, door, elementId, recordId, tick]);
|
|
56989
57007
|
return (0, import_react317.useMemo)(
|
|
56990
57008
|
() => ({
|
|
56991
|
-
rows: (state2.data?.rows ?? []).map((r) => ({ id: r.id, document: r.document })),
|
|
57009
|
+
rows: (state2.data?.rows ?? []).map((r) => ({ id: r.id, document: withChoiceWords(r.document, state2.data?.labels) })),
|
|
56992
57010
|
fields: (state2.data?.fields ?? []).map(doorField),
|
|
56993
57011
|
total: state2.data ? state2.data.count : null,
|
|
56994
57012
|
loading: state2.loading,
|
|
@@ -57197,8 +57215,8 @@ function BlockBody(inner2) {
|
|
|
57197
57215
|
case "applet":
|
|
57198
57216
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(AppletBlockView, { block });
|
|
57199
57217
|
case "chart": {
|
|
57218
|
+
if (props.through) return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(ChartThroughNote, { title: block.title ?? props.chart?.title ?? null });
|
|
57200
57219
|
if (!props.chart) return null;
|
|
57201
|
-
if (props.through) return null;
|
|
57202
57220
|
const index = props.run?.blocks.findIndex((b) => b.id === props.chart?.id) ?? -1;
|
|
57203
57221
|
const result = index >= 0 ? props.run.blocks[index] : null;
|
|
57204
57222
|
return result ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(ChartBlock, { block: result, subject: props.subject }) : /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(RecordsSkeleton, { layout: "chart" });
|
|
@@ -57443,8 +57461,30 @@ function ReviewBlockView({ block, viewerUserId, extra }) {
|
|
|
57443
57461
|
function NumberBlockView({ block, viewerUserId, extra }) {
|
|
57444
57462
|
const read = useElementRows(block, viewerUserId, extra, false);
|
|
57445
57463
|
if (read.error) return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(RefusalLine, { error: read.error });
|
|
57446
|
-
|
|
57447
|
-
|
|
57464
|
+
const title = block.title ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("p", { className: "truncate text-xs text-muted-foreground", "data-records-page-number-title": block.id, children: block.title }) : null;
|
|
57465
|
+
if (read.waiting || read.total === null) {
|
|
57466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(import_jsx_runtime181.Fragment, { children: [
|
|
57467
|
+
title,
|
|
57468
|
+
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_design_system159.Skeleton, { className: "h-12 w-24" })
|
|
57469
|
+
] });
|
|
57470
|
+
}
|
|
57471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(import_jsx_runtime181.Fragment, { children: [
|
|
57472
|
+
title,
|
|
57473
|
+
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)("p", { className: "text-3xl font-semibold tabular-nums", "data-records-page-number": block.id, children: (0, import_format14.formatCount)(read.total) })
|
|
57474
|
+
] });
|
|
57475
|
+
}
|
|
57476
|
+
function ChartThroughNote({ title }) {
|
|
57477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: "flex flex-col gap-2", "data-records-page-chart-note": "through", children: [
|
|
57478
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: title }) : null,
|
|
57479
|
+
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
57480
|
+
"p",
|
|
57481
|
+
{
|
|
57482
|
+
className: "flex items-center justify-center rounded-md border border-dashed p-3 text-center text-xs text-muted-foreground",
|
|
57483
|
+
style: { height: CHART_PLOT_PX },
|
|
57484
|
+
children: "Charts draw for members of this organization."
|
|
57485
|
+
}
|
|
57486
|
+
)
|
|
57487
|
+
] });
|
|
57448
57488
|
}
|
|
57449
57489
|
function LayoutBlockView({ block, viewerUserId, extra }) {
|
|
57450
57490
|
const door = useInterfaceDoor();
|