@ai-matrx/records-ui 0.116.70 → 0.116.71

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,9 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## 0.116.71
4
+
5
+ - **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.
6
+
3
7
  ## 0.116.70
4
8
 
5
9
  - **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.
@@ -8554,6 +8554,8 @@ function FieldEditor(props) {
8554
8554
  const [dependency, setDependency] = useState27(dependencyStart);
8555
8555
  const limitViewStart = typeof start?.config?.["limit_to_view"] === "string" ? String(start.config["limit_to_view"]) : "";
8556
8556
  const [limitView, setLimitView] = useState27(limitViewStart);
8557
+ const bindingStart = start?.config?.["binding"] === "snapshot" ? "snapshot" : "live";
8558
+ const [binding, setBinding] = useState27(bindingStart);
8557
8559
  const [targetViews, setTargetViews] = useState27(null);
8558
8560
  const limitTarget = field2?.type === "relation" && field2.relation_target && !onEntity ? String(field2.relation_target) : null;
8559
8561
  useEffect19(() => {
@@ -8759,6 +8761,7 @@ function FieldEditor(props) {
8759
8761
  ...type === "button" && JSON.stringify(buttonSettings) !== JSON.stringify(buttonStart) ? { button: buttonSettings } : {},
8760
8762
  ...field2.type === "relation" && dependency !== dependencyStart ? { dependency } : {},
8761
8763
  ...field2.type === "relation" && limitView !== limitViewStart ? { limit_to_view: limitView === "" ? null : limitView } : {},
8764
+ ...field2.type === "relation" && binding !== bindingStart ? { binding } : {},
8762
8765
  ...type === "modified_time" ? watchedFieldsPatch(watchStart, watchFields) : {},
8763
8766
  ...type === "autonumber" && numberPrefix.trim() !== prefixStart ? { display_format: { id: "autonumber", options: numberPrefix.trim() === "" ? {} : { prefix: numberPrefix.trim() } } } : {},
8764
8767
  // THE CHOICES, ONE ROW EACH, IN ORDER (CHOICE-COLUMN-EDIT): `{id, words}` re-words a
@@ -9100,6 +9103,16 @@ function FieldEditor(props) {
9100
9103
  ] })
9101
9104
  ] })
9102
9105
  ] }) : null,
9106
+ editing && field2?.type === "relation" ? /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-1", "data-records-link-binding": "", children: [
9107
+ /* @__PURE__ */ jsx37(Label9, { className: "text-xs", children: "When a linked record changes" }),
9108
+ /* @__PURE__ */ jsxs33(Select5, { value: binding, onValueChange: (next) => setBinding(next === "snapshot" ? "snapshot" : "live"), children: [
9109
+ /* @__PURE__ */ jsx37(SelectTrigger5, { size: "sm", "aria-label": "When a linked record changes", children: /* @__PURE__ */ jsx37(SelectValue5, {}) }),
9110
+ /* @__PURE__ */ jsxs33(SelectContent5, { children: [
9111
+ /* @__PURE__ */ jsx37(SelectItem5, { value: "live", children: "Show its changes" }),
9112
+ /* @__PURE__ */ jsx37(SelectItem5, { value: "snapshot", children: "Keep it as it was when linked" })
9113
+ ] })
9114
+ ] })
9115
+ ] }) : null,
9103
9116
  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
9117
  /* @__PURE__ */ jsx37(
9105
9118
  Checkbox4,
@@ -12556,4 +12569,4 @@ export {
12556
12569
  RecordNameText,
12557
12570
  HeldChangeDecision
12558
12571
  };
12559
- //# sourceMappingURL=chunk-D2QW36IF.js.map
12572
+ //# sourceMappingURL=chunk-YXPUXD5H.js.map