@ai-matrx/records-ui 0.116.110 → 0.116.111

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.
@@ -27,7 +27,7 @@ import {
27
27
  useRecordsUi,
28
28
  useTableRights,
29
29
  writeOnTheWinningVersion_exports
30
- } from "./chunk-TABDUUEC.js";
30
+ } from "./chunk-266JKBAS.js";
31
31
  import {
32
32
  guessColumn,
33
33
  readTableShapes,
@@ -41,7 +41,7 @@ import {
41
41
  fieldTypeLabel,
42
42
  hasTimePart,
43
43
  isDateField
44
- } from "./chunk-K7OX6RG6.js";
44
+ } from "./chunk-JTEIYLII.js";
45
45
  import {
46
46
  fieldTypeChoice
47
47
  } from "./chunk-WCQSJPLS.js";
@@ -5205,4 +5205,4 @@ export {
5205
5205
  shapesOfSource,
5206
5206
  SaveToTable
5207
5207
  };
5208
- //# sourceMappingURL=chunk-T7SXM6ZL.js.map
5208
+ //# sourceMappingURL=chunk-FD4GYJX6.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  EMBEDDED_PLAIN_FOOTER_CLASS,
4
4
  EMBEDDED_TABLE_CLASS
5
- } from "./chunk-D7LNXDKV.js";
5
+ } from "./chunk-Z3EUU2NM.js";
6
6
 
7
7
  // src/skeletonLayout.ts
8
8
  var RECORDS_SKELETON_LAYOUTS = [
@@ -304,4 +304,4 @@ export {
304
304
  RecordsSkeleton,
305
305
  TablePageSkeleton
306
306
  };
307
- //# sourceMappingURL=chunk-NS2VEKMS.js.map
307
+ //# sourceMappingURL=chunk-FZVW6XVB.js.map
@@ -5,7 +5,7 @@ import {
5
5
  isYearValue,
6
6
  shownAsOf,
7
7
  useEmbeddedLook
8
- } from "./chunk-D7LNXDKV.js";
8
+ } from "./chunk-Z3EUU2NM.js";
9
9
  import {
10
10
  HtmlSampleFrame,
11
11
  HtmlSampleTokensProvider
@@ -64,7 +64,7 @@ import {
64
64
  useTableRights,
65
65
  withoutInternalCodes,
66
66
  writeOnTheWinningVersion_exports
67
- } from "./chunk-TABDUUEC.js";
67
+ } from "./chunk-266JKBAS.js";
68
68
  import {
69
69
  kindItemWords,
70
70
  kindLabel,
@@ -90,7 +90,7 @@ import {
90
90
  storedChoiceColor,
91
91
  subscribePersonTimeZone,
92
92
  systemStampOf
93
- } from "./chunk-K7OX6RG6.js";
93
+ } from "./chunk-JTEIYLII.js";
94
94
  import {
95
95
  ADD_FIELD_SAVE_LABEL,
96
96
  EDIT_FIELD_SAVE_LABEL,
@@ -4646,7 +4646,7 @@ import { OutboundLink as OutboundLink5 } from "@ai-matrx/kit/outbound-react";
4646
4646
  import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
4647
4647
  import { momentZoneOptions } from "@ai-matrx/design-system/field-formats";
4648
4648
  import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
4649
- var SaveToTable = lazy(() => import("./SaveToTable-WZ4BELUI.js").then((m) => ({ default: m.SaveToTable })));
4649
+ var SaveToTable = lazy(() => import("./SaveToTable-PDRY5OXB.js").then((m) => ({ default: m.SaveToTable })));
4650
4650
  var LONGEST_READ = 5e5;
4651
4651
  var FENCE = /^```(?:json)?[ \t]*\r?\n([\s\S]*?)\r?\n?```$/;
4652
4652
  function isPlainObject(v) {
@@ -10234,6 +10234,8 @@ function FieldEditor(props) {
10234
10234
  const [limitView, setLimitView] = useState31(limitViewStart);
10235
10235
  const bindingStart = start?.config?.["binding"] === "snapshot" ? "snapshot" : "live";
10236
10236
  const [binding, setBinding] = useState31(bindingStart);
10237
+ const onDeleteStart = start?.on_target_delete === "cascade" || start?.on_target_delete === "restrict" ? start.on_target_delete : "set_null";
10238
+ const [onDelete, setOnDelete] = useState31(onDeleteStart);
10237
10239
  const carriesStart = start?.config?.["carries"] === true;
10238
10240
  const [carries, setCarries] = useState31(carriesStart);
10239
10241
  const carriesMaxStart = start?.config?.["carries_max"] === "editor" ? "editor" : "viewer";
@@ -10458,6 +10460,7 @@ function FieldEditor(props) {
10458
10460
  ...field2.type === "relation" && dependency !== dependencyStart ? { dependency } : {},
10459
10461
  ...field2.type === "relation" && limitView !== limitViewStart ? { limit_to_view: limitView === "" ? null : limitView } : {},
10460
10462
  ...field2.type === "relation" && binding !== bindingStart ? { binding } : {},
10463
+ ...field2.type === "relation" && onDelete !== onDeleteStart ? { on_target_delete: onDelete } : {},
10461
10464
  ...field2.type === "relation" && carries !== carriesStart ? { carries } : {},
10462
10465
  ...field2.type === "relation" && carries && carriesMax !== carriesMaxStart ? { carries_max: carriesMax } : {},
10463
10466
  ...field2.type === "relation" && loops !== loopsStart ? { loops } : {},
@@ -10827,6 +10830,24 @@ function FieldEditor(props) {
10827
10830
  ] })
10828
10831
  ] })
10829
10832
  ] }) : null,
10833
+ editing && field2?.type === "relation" ? /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-1", "data-records-link-on-archive": "", children: [
10834
+ /* @__PURE__ */ jsx43(Label11, { className: "text-xs", children: "When a linked record is archived" }),
10835
+ /* @__PURE__ */ jsxs38(
10836
+ Select6,
10837
+ {
10838
+ value: onDelete,
10839
+ onValueChange: (next) => setOnDelete(next === "cascade" || next === "restrict" ? next : "set_null"),
10840
+ children: [
10841
+ /* @__PURE__ */ jsx43(SelectTrigger6, { size: "sm", "aria-label": "When a linked record is archived", children: /* @__PURE__ */ jsx43(SelectValue6, {}) }),
10842
+ /* @__PURE__ */ jsxs38(SelectContent6, { children: [
10843
+ /* @__PURE__ */ jsx43(SelectItem6, { value: "set_null", children: "Keep the link, shown as archived" }),
10844
+ /* @__PURE__ */ jsx43(SelectItem6, { value: "cascade", children: "Archive this record too" }),
10845
+ /* @__PURE__ */ jsx43(SelectItem6, { value: "restrict", children: "Refuse while it is linked" })
10846
+ ] })
10847
+ ]
10848
+ }
10849
+ )
10850
+ ] }) : null,
10830
10851
  editing && field2?.type === "relation" ? /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-1.5", "data-records-link-carries": "", children: [
10831
10852
  /* @__PURE__ */ jsxs38("label", { className: "flex items-center gap-1.5 text-sm", title: "Whoever can see a linked record can also see this one", children: [
10832
10853
  /* @__PURE__ */ jsx43(Checkbox6, { checked: carries, "aria-label": "Carries access", onCheckedChange: (v) => setCarries(v === true) }),
@@ -14319,4 +14340,4 @@ export {
14319
14340
  RecordNameText,
14320
14341
  HeldChangeDecision
14321
14342
  };
14322
- //# sourceMappingURL=chunk-TZ2KUSHH.js.map
14343
+ //# sourceMappingURL=chunk-HTZPVHDG.js.map