@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/index.cjs CHANGED
@@ -18718,6 +18718,8 @@ function FieldEditor(props) {
18718
18718
  const [dependency, setDependency] = (0, import_react88.useState)(dependencyStart);
18719
18719
  const limitViewStart = typeof start?.config?.["limit_to_view"] === "string" ? String(start.config["limit_to_view"]) : "";
18720
18720
  const [limitView, setLimitView] = (0, import_react88.useState)(limitViewStart);
18721
+ const bindingStart = start?.config?.["binding"] === "snapshot" ? "snapshot" : "live";
18722
+ const [binding, setBinding] = (0, import_react88.useState)(bindingStart);
18721
18723
  const [targetViews, setTargetViews] = (0, import_react88.useState)(null);
18722
18724
  const limitTarget = field2?.type === "relation" && field2.relation_target && !onEntity ? String(field2.relation_target) : null;
18723
18725
  (0, import_react88.useEffect)(() => {
@@ -18923,6 +18925,7 @@ function FieldEditor(props) {
18923
18925
  ...type === "button" && JSON.stringify(buttonSettings) !== JSON.stringify(buttonStart) ? { button: buttonSettings } : {},
18924
18926
  ...field2.type === "relation" && dependency !== dependencyStart ? { dependency } : {},
18925
18927
  ...field2.type === "relation" && limitView !== limitViewStart ? { limit_to_view: limitView === "" ? null : limitView } : {},
18928
+ ...field2.type === "relation" && binding !== bindingStart ? { binding } : {},
18926
18929
  ...type === "modified_time" ? watchedFieldsPatch(watchStart, watchFields) : {},
18927
18930
  ...type === "autonumber" && numberPrefix.trim() !== prefixStart ? { display_format: { id: "autonumber", options: numberPrefix.trim() === "" ? {} : { prefix: numberPrefix.trim() } } } : {},
18928
18931
  // THE CHOICES, ONE ROW EACH, IN ORDER (CHOICE-COLUMN-EDIT): `{id, words}` re-words a
@@ -19264,6 +19267,16 @@ function FieldEditor(props) {
19264
19267
  ] })
19265
19268
  ] })
19266
19269
  ] }) : null,
19270
+ editing && field2?.type === "relation" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-col gap-1", "data-records-link-binding": "", children: [
19271
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_design_system54.Label, { className: "text-xs", children: "When a linked record changes" }),
19272
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_design_system54.Select, { value: binding, onValueChange: (next) => setBinding(next === "snapshot" ? "snapshot" : "live"), children: [
19273
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_design_system54.SelectTrigger, { size: "sm", "aria-label": "When a linked record changes", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_design_system54.SelectValue, {}) }),
19274
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_design_system54.SelectContent, { children: [
19275
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_design_system54.SelectItem, { value: "live", children: "Show its changes" }),
19276
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_design_system54.SelectItem, { value: "snapshot", children: "Keep it as it was when linked" })
19277
+ ] })
19278
+ ] })
19279
+ ] }) : null,
19267
19280
  personColumn ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("label", { className: "flex items-center gap-1.5 text-sm", title: "Each person added to this column gets a notice", children: [
19268
19281
  /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
19269
19282
  import_design_system54.Checkbox,
@@ -23925,7 +23938,19 @@ function EnrichPanel({ tableId, fieldId, className }) {
23925
23938
  }))
23926
23939
  }
23927
23940
  ),
23928
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("p", { className: "text-[11px] text-muted-foreground", children: d.every ? `${d.every} days` : NEVER2 })
23941
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("p", { className: "text-[11px] text-muted-foreground", children: d.every ? `${d.every} days` : NEVER2 }),
23942
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("label", { className: "flex items-center gap-2 text-xs", "data-enrich-auto-refill": "", children: [
23943
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
23944
+ import_design_system61.Switch,
23945
+ {
23946
+ size: "sm",
23947
+ checked: row.enrichment?.auto_refill === true,
23948
+ disabled: !rights.admin || !row.review_interval_days || busy === row.field_id,
23949
+ onCheckedChange: (on) => void save(row, { auto_refill: on })
23950
+ }
23951
+ ),
23952
+ "Refill on its own"
23953
+ ] })
23929
23954
  ] })
23930
23955
  ] }),
23931
23956
  /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("p", { className: "text-xs text-muted-foreground", children: [