@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/dist/pickers.cjs CHANGED
@@ -11881,6 +11881,8 @@ function FieldEditor(props) {
11881
11881
  const [dependency, setDependency] = (0, import_react67.useState)(dependencyStart);
11882
11882
  const limitViewStart = typeof start?.config?.["limit_to_view"] === "string" ? String(start.config["limit_to_view"]) : "";
11883
11883
  const [limitView, setLimitView] = (0, import_react67.useState)(limitViewStart);
11884
+ const bindingStart = start?.config?.["binding"] === "snapshot" ? "snapshot" : "live";
11885
+ const [binding, setBinding] = (0, import_react67.useState)(bindingStart);
11884
11886
  const [targetViews, setTargetViews] = (0, import_react67.useState)(null);
11885
11887
  const limitTarget = field?.type === "relation" && field.relation_target && !onEntity ? String(field.relation_target) : null;
11886
11888
  (0, import_react67.useEffect)(() => {
@@ -12086,6 +12088,7 @@ function FieldEditor(props) {
12086
12088
  ...type === "button" && JSON.stringify(buttonSettings) !== JSON.stringify(buttonStart) ? { button: buttonSettings } : {},
12087
12089
  ...field.type === "relation" && dependency !== dependencyStart ? { dependency } : {},
12088
12090
  ...field.type === "relation" && limitView !== limitViewStart ? { limit_to_view: limitView === "" ? null : limitView } : {},
12091
+ ...field.type === "relation" && binding !== bindingStart ? { binding } : {},
12089
12092
  ...type === "modified_time" ? watchedFieldsPatch(watchStart, watchFields) : {},
12090
12093
  ...type === "autonumber" && numberPrefix.trim() !== prefixStart ? { display_format: { id: "autonumber", options: numberPrefix.trim() === "" ? {} : { prefix: numberPrefix.trim() } } } : {},
12091
12094
  // THE CHOICES, ONE ROW EACH, IN ORDER (CHOICE-COLUMN-EDIT): `{id, words}` re-words a
@@ -12427,6 +12430,16 @@ function FieldEditor(props) {
12427
12430
  ] })
12428
12431
  ] })
12429
12432
  ] }) : null,
12433
+ editing && field?.type === "relation" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col gap-1", "data-records-link-binding": "", children: [
12434
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_design_system41.Label, { className: "text-xs", children: "When a linked record changes" }),
12435
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_design_system41.Select, { value: binding, onValueChange: (next) => setBinding(next === "snapshot" ? "snapshot" : "live"), children: [
12436
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_design_system41.SelectTrigger, { size: "sm", "aria-label": "When a linked record changes", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_design_system41.SelectValue, {}) }),
12437
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_design_system41.SelectContent, { children: [
12438
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_design_system41.SelectItem, { value: "live", children: "Show its changes" }),
12439
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_design_system41.SelectItem, { value: "snapshot", children: "Keep it as it was when linked" })
12440
+ ] })
12441
+ ] })
12442
+ ] }) : null,
12430
12443
  personColumn ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { className: "flex items-center gap-1.5 text-sm", title: "Each person added to this column gets a notice", children: [
12431
12444
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12432
12445
  import_design_system41.Checkbox,