@ai-matrx/records-ui 0.116.72 → 0.116.74

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
@@ -11883,6 +11883,12 @@ function FieldEditor(props) {
11883
11883
  const [limitView, setLimitView] = (0, import_react67.useState)(limitViewStart);
11884
11884
  const bindingStart = start?.config?.["binding"] === "snapshot" ? "snapshot" : "live";
11885
11885
  const [binding, setBinding] = (0, import_react67.useState)(bindingStart);
11886
+ const carriesStart = start?.config?.["carries"] === true;
11887
+ const [carries, setCarries] = (0, import_react67.useState)(carriesStart);
11888
+ const carriesMaxStart = start?.config?.["carries_max"] === "editor" ? "editor" : "viewer";
11889
+ const [carriesMax, setCarriesMax] = (0, import_react67.useState)(carriesMaxStart);
11890
+ const loopsStart = start?.config?.["loops"] === true;
11891
+ const [loops, setLoops] = (0, import_react67.useState)(loopsStart);
11886
11892
  const [targetViews, setTargetViews] = (0, import_react67.useState)(null);
11887
11893
  const limitTarget = field?.type === "relation" && field.relation_target && !onEntity ? String(field.relation_target) : null;
11888
11894
  (0, import_react67.useEffect)(() => {
@@ -12089,6 +12095,9 @@ function FieldEditor(props) {
12089
12095
  ...field.type === "relation" && dependency !== dependencyStart ? { dependency } : {},
12090
12096
  ...field.type === "relation" && limitView !== limitViewStart ? { limit_to_view: limitView === "" ? null : limitView } : {},
12091
12097
  ...field.type === "relation" && binding !== bindingStart ? { binding } : {},
12098
+ ...field.type === "relation" && carries !== carriesStart ? { carries } : {},
12099
+ ...field.type === "relation" && carries && carriesMax !== carriesMaxStart ? { carries_max: carriesMax } : {},
12100
+ ...field.type === "relation" && loops !== loopsStart ? { loops } : {},
12092
12101
  ...type === "modified_time" ? watchedFieldsPatch(watchStart, watchFields) : {},
12093
12102
  ...type === "autonumber" && numberPrefix.trim() !== prefixStart ? { display_format: { id: "autonumber", options: numberPrefix.trim() === "" ? {} : { prefix: numberPrefix.trim() } } } : {},
12094
12103
  // THE CHOICES, ONE ROW EACH, IN ORDER (CHOICE-COLUMN-EDIT): `{id, words}` re-words a
@@ -12440,6 +12449,28 @@ function FieldEditor(props) {
12440
12449
  ] })
12441
12450
  ] })
12442
12451
  ] }) : null,
12452
+ editing && field?.type === "relation" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col gap-1.5", "data-records-link-carries": "", children: [
12453
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { className: "flex items-center gap-1.5 text-sm", title: "Whoever can see a linked record can also see this one", children: [
12454
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_design_system41.Checkbox, { checked: carries, "aria-label": "Carries access", onCheckedChange: (v) => setCarries(v === true) }),
12455
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: "Whoever sees a linked record sees this one" })
12456
+ ] }),
12457
+ carries ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_design_system41.Select, { value: carriesMax, onValueChange: (next) => setCarriesMax(next === "editor" ? "editor" : "viewer"), children: [
12458
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_design_system41.SelectTrigger, { size: "sm", "aria-label": "Carried access level", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_design_system41.SelectValue, {}) }),
12459
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_design_system41.SelectContent, { children: [
12460
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_design_system41.SelectItem, { value: "viewer", children: "Up to view" }),
12461
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_design_system41.SelectItem, { value: "editor", children: "Up to edit" })
12462
+ ] })
12463
+ ] }) : null,
12464
+ field.relation_target && field.relation_target === field.entity_definition_id ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { className: "flex items-center gap-1.5 text-sm", title: "Two records may point at each other along this link", children: [
12465
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_design_system41.Checkbox, { checked: loops, "aria-label": "Two records can link each other", onCheckedChange: (v) => setLoops(v === true) }),
12466
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: "Two records can link each other" })
12467
+ ] }) : null,
12468
+ carries && loops ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("p", { className: "text-xs text-muted-foreground", "data-records-loop-consequence": "", children: [
12469
+ "Sharing one record shares the records it links to, and back again, ",
12470
+ carriesMax === "editor" ? "up to edit" : "view only",
12471
+ "."
12472
+ ] }) : null
12473
+ ] }) : null,
12443
12474
  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: [
12444
12475
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12445
12476
  import_design_system41.Checkbox,