@ai-matrx/records-ui 0.116.70 → 0.116.72

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## 0.116.72
4
+
5
+ - **The toolbar's Markdown file writes each row the way the grid shows it (CD-IO-04, 2026-10-21).** `gridCopyConfig().humanRow` (the per-row blocks of the toolbar's Download > Markdown and a row's Copy) now reads the one file writer's words (`displayRows(toRows(...))`): Tags "Alpha, Beta" and a date in her zone, never `["Alpha","Beta"]` or the ISO instant. Test: `every-export-button-writes-one-file.test.tsx` "humanRow carries the rail's words". Consumer action: none.
6
+ - **A link can keep the linked record as it was (lane CLOSE-LINK, CD-LINK-05, 2026-10-21).** `FieldEditor` gains "When a linked record changes" on an existing link column: "Show its changes" (live) or "Keep it as it was when linked" (snapshot, `binding`), sent only when it changed. An invoice's "Bill to" then keeps the March address after the client moves. Guard: two cases in `FieldEditor.test.tsx` (red before: no such control). Needs `@ai-matrx/records` with `FieldPatch.binding`. Consumer action: none.
7
+
3
8
  ## 0.116.70
4
9
 
5
10
  - **Agents can edit, per table; an agent's proposed column waits in the table's own Settings (lane CLOSE-AGENT, CD-AGENT-04/05, 2026-10-21).** `TableSettings` draws "Agents can edit" (new `TableAgentWrites.tsx`: `TableAgentWritesSwitch`, `agentsMayChangeTable`), on by default; off writes `agent_writable: false` on the Table document through `record_update`, and the store then refuses every agent change to that table in one sentence naming it (matrx-frontend migration `20261021170000_closeagent_a`). With no `proposals` handed in, the "Proposed" section now reads this table's own proposals from the one queue (`custom.work_inbox`, new `tableProposals.ts`: `useTableProposals`, `proposalsForTable`) and Accept / Reject decide them through `custom.work_approval_decide`, the Inbox's own door, which applies the column on yes. Guard: `TableSettings.agent-writes.test.tsx` (red before: no switch; no proposal listed). Consumer action: none.
@@ -7627,7 +7627,13 @@ function gridCopyConfig(args) {
7627
7627
  rowKind: "table-row",
7628
7628
  listKind: "table-view",
7629
7629
  listDescription: `${tableName2} \u2014 the records on this page, filtered and sorted as shown.`,
7630
- humanRow: (row) => Object.entries(shown2(row)).map(([name, value]) => `${name}: ${text(value)}`).join("\n"),
7630
+ // A ROW IN WORDS (the toolbar's Markdown blocks, a row's Copy): the words the grid SHOWS, written by the one file writer
7631
+ // (`fileExport.ts`): "Alpha, Beta", a date in her zone — never the stored JSON or ISO text (CD-IO-04).
7632
+ humanRow: (row) => {
7633
+ const document2 = row.document ?? {};
7634
+ const words = displayRows(toRows([...fields], [row], labels))[0] ?? {};
7635
+ return fields.filter((field2) => document2[field2.key] !== void 0).map((field2) => `${fieldName(field2)}: ${text(words[field2.key]?.value ?? null)}`).join("\n");
7636
+ },
7631
7637
  agentRow: (row) => shown2(row),
7632
7638
  rowReferences: (row) => [
7633
7639
  {
@@ -8554,6 +8560,8 @@ function FieldEditor(props) {
8554
8560
  const [dependency, setDependency] = useState27(dependencyStart);
8555
8561
  const limitViewStart = typeof start?.config?.["limit_to_view"] === "string" ? String(start.config["limit_to_view"]) : "";
8556
8562
  const [limitView, setLimitView] = useState27(limitViewStart);
8563
+ const bindingStart = start?.config?.["binding"] === "snapshot" ? "snapshot" : "live";
8564
+ const [binding, setBinding] = useState27(bindingStart);
8557
8565
  const [targetViews, setTargetViews] = useState27(null);
8558
8566
  const limitTarget = field2?.type === "relation" && field2.relation_target && !onEntity ? String(field2.relation_target) : null;
8559
8567
  useEffect19(() => {
@@ -8759,6 +8767,7 @@ function FieldEditor(props) {
8759
8767
  ...type === "button" && JSON.stringify(buttonSettings) !== JSON.stringify(buttonStart) ? { button: buttonSettings } : {},
8760
8768
  ...field2.type === "relation" && dependency !== dependencyStart ? { dependency } : {},
8761
8769
  ...field2.type === "relation" && limitView !== limitViewStart ? { limit_to_view: limitView === "" ? null : limitView } : {},
8770
+ ...field2.type === "relation" && binding !== bindingStart ? { binding } : {},
8762
8771
  ...type === "modified_time" ? watchedFieldsPatch(watchStart, watchFields) : {},
8763
8772
  ...type === "autonumber" && numberPrefix.trim() !== prefixStart ? { display_format: { id: "autonumber", options: numberPrefix.trim() === "" ? {} : { prefix: numberPrefix.trim() } } } : {},
8764
8773
  // THE CHOICES, ONE ROW EACH, IN ORDER (CHOICE-COLUMN-EDIT): `{id, words}` re-words a
@@ -9100,6 +9109,16 @@ function FieldEditor(props) {
9100
9109
  ] })
9101
9110
  ] })
9102
9111
  ] }) : null,
9112
+ editing && field2?.type === "relation" ? /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-1", "data-records-link-binding": "", children: [
9113
+ /* @__PURE__ */ jsx37(Label9, { className: "text-xs", children: "When a linked record changes" }),
9114
+ /* @__PURE__ */ jsxs33(Select5, { value: binding, onValueChange: (next) => setBinding(next === "snapshot" ? "snapshot" : "live"), children: [
9115
+ /* @__PURE__ */ jsx37(SelectTrigger5, { size: "sm", "aria-label": "When a linked record changes", children: /* @__PURE__ */ jsx37(SelectValue5, {}) }),
9116
+ /* @__PURE__ */ jsxs33(SelectContent5, { children: [
9117
+ /* @__PURE__ */ jsx37(SelectItem5, { value: "live", children: "Show its changes" }),
9118
+ /* @__PURE__ */ jsx37(SelectItem5, { value: "snapshot", children: "Keep it as it was when linked" })
9119
+ ] })
9120
+ ] })
9121
+ ] }) : null,
9103
9122
  personColumn ? /* @__PURE__ */ jsxs33("label", { className: "flex items-center gap-1.5 text-sm", title: "Each person added to this column gets a notice", children: [
9104
9123
  /* @__PURE__ */ jsx37(
9105
9124
  Checkbox4,
@@ -12556,4 +12575,4 @@ export {
12556
12575
  RecordNameText,
12557
12576
  HeldChangeDecision
12558
12577
  };
12559
- //# sourceMappingURL=chunk-D2QW36IF.js.map
12578
+ //# sourceMappingURL=chunk-3OD52U5S.js.map