@nivaro/react 0.3.110 → 0.3.112

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.
Files changed (77) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +170 -2
  4. package/dist/index.js +745 -728
  5. package/dist/shared/components/CollectionBrowserView.js +3097 -2972
  6. package/dist/shared/components/CollectionImportBanner.js +135 -0
  7. package/dist/shared/components/ItemEditForm.js +2235 -2218
  8. package/dist/shared/components/JobsTray.js +54 -47
  9. package/dist/shared/components/TipLayer.js +61 -54
  10. package/dist/shared/components/ViewAsPersonButton.js +109 -0
  11. package/dist/shared/components/bulk/BulkFieldUpdate.js +228 -150
  12. package/dist/shared/components/bulk/BulkFieldUpdateButton.js +35 -41
  13. package/dist/shared/components/bulk/BulkLinksValue.js +91 -0
  14. package/dist/shared/components/bulk/bulk-field-options.js +20 -19
  15. package/dist/shared/components/bulk/bulk-update-preview.js +39 -0
  16. package/dist/shared/components/cbv/ColumnHeaderMenu.js +113 -0
  17. package/dist/shared/components/cbv/column-totals.js +66 -0
  18. package/dist/shared/components/collections-directory/CollectionHoverCard.js +108 -81
  19. package/dist/shared/components/collections-directory/CollectionRow.js +164 -148
  20. package/dist/shared/components/collections-directory/CollectionsDirectory.js +167 -166
  21. package/dist/shared/components/collections-directory/directory-data.js +70 -58
  22. package/dist/shared/components/imports/CollectionImportPanel.js +120 -118
  23. package/dist/shared/components/imports/DefinitionsPanel.js +24 -24
  24. package/dist/shared/components/imports/ImportDuplicatesNotice.js +65 -0
  25. package/dist/shared/components/item-edit/CatalogPickerField.js +631 -639
  26. package/dist/shared/components/item-edit/DuplicateNotice.js +168 -0
  27. package/dist/shared/components/item-edit/FieldRow.js +248 -246
  28. package/dist/shared/components/item-edit/InlineGridField.js +34 -33
  29. package/dist/shared/components/item-edit/InlineTableField.js +3064 -2882
  30. package/dist/shared/components/item-edit/MembershipSetField.js +165 -169
  31. package/dist/shared/components/item-edit/NestedRelationEditor.js +184 -189
  32. package/dist/shared/components/item-edit/PlanGrid.js +2 -1
  33. package/dist/shared/components/item-edit/QuickPickerDialog.js +35 -34
  34. package/dist/shared/components/item-edit/RecordLiveSync.js +32 -30
  35. package/dist/shared/components/item-edit/RelationCombobox.js +101 -100
  36. package/dist/shared/components/item-edit/RowHistorySheet.js +28 -27
  37. package/dist/shared/components/item-edit/SummaryPanel.js +133 -135
  38. package/dist/shared/components/item-edit/ViewAsRole.js +129 -52
  39. package/dist/shared/components/item-edit/grid-search.js +345 -0
  40. package/dist/shared/components/item-edit/render-stability.js +61 -54
  41. package/dist/shared/components/notifications/NotificationRulesEditor.js +25 -20
  42. package/dist/shared/components/ops-report/DigestSections.js +163 -144
  43. package/dist/shared/components/ops-report/drill.js +97 -97
  44. package/dist/shared/components/panels/AddendumLinesDiff.js +52 -51
  45. package/dist/shared/components/panels/AddendumPanel.js +92 -91
  46. package/dist/shared/components/panels/AsyncUserPicker.js +108 -0
  47. package/dist/shared/components/panels/BlockedMove.js +73 -0
  48. package/dist/shared/components/panels/CommentPanel.js +265 -252
  49. package/dist/shared/components/panels/OwnersSlot.js +47 -35
  50. package/dist/shared/components/panels/PipelineInsight.js +186 -0
  51. package/dist/shared/components/panels/PipelinePanel.js +1573 -1475
  52. package/dist/shared/components/panels/RecordIntegrityBanner.js +39 -38
  53. package/dist/shared/components/panels/RevisionsPanel.js +261 -260
  54. package/dist/shared/components/pipeline/FieldPicker.js +41 -40
  55. package/dist/shared/components/pipeline/OwnerMatrix.js +829 -700
  56. package/dist/shared/components/pipeline/OwnerRecordTrial.js +362 -0
  57. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -467
  58. package/dist/shared/components/pipeline/PipelineStateOwners.js +65 -64
  59. package/dist/shared/components/pipeline/owner-matrix-draft.js +178 -0
  60. package/dist/shared/components/profile/MyDefaultsCard.js +36 -35
  61. package/dist/shared/components/profile/PersonHeader.js +29 -29
  62. package/dist/shared/components/profile/PersonProfile.js +30 -28
  63. package/dist/shared/components/profile/SlowScreensCard.js +286 -0
  64. package/dist/shared/components/queue/QueueWorklist.js +1090 -1071
  65. package/dist/shared/components/quick-filters/useQuickFilterEditing.js +45 -44
  66. package/dist/shared/components/support/TicketDetailSheet.js +25 -16
  67. package/dist/shared/components/support/TicketSlowScreens.js +32 -0
  68. package/dist/shared/lib/activity-sentence.js +224 -178
  69. package/dist/shared/lib/collection-import-banner.js +27 -0
  70. package/dist/shared/lib/crash-report.js +112 -0
  71. package/dist/shared/lib/export-runs.js +99 -0
  72. package/dist/shared/lib/jobs-tray.js +89 -67
  73. package/dist/shared/lib/list-link.js +76 -69
  74. package/dist/shared/lib/nav-trail.js +180 -76
  75. package/dist/shared/lib/query-keys.js +26 -0
  76. package/dist/shared/lib/view-as.js +16 -11
  77. package/package.json +1 -1
@@ -1,38 +1,39 @@
1
1
  import { jsxs as u, jsx as n } from "react/jsx-runtime";
2
- import { useQueryClient as et, useQueries as _t, useQuery as le, useMutation as Nt } from "@tanstack/react-query";
3
- import { Info as Ft, Loader2 as Ct, Sparkles as Rt, Lock as Lt, SlidersHorizontal as St, History as $t, BellRing as qt, Bell as At, Sigma as Tt } from "lucide-react";
4
- import { memo as Et, useState as ke, useRef as L, useId as Pt, useEffect as ae, useCallback as Qe } from "react";
5
- import { toast as oe } from "sonner";
6
- import { useParentDraft as jt, useNivaroClient as ie } from "../../context.js";
7
- import { showsAiButton as Bt, AUTOFILL_CHECK_KEY as Dt, readAiFill as Mt } from "../../lib/ai-fill.js";
8
- import { get as H, del as Ot, post as ve } from "../../lib/commands.js";
9
- import { toastError as Kt } from "../../lib/error-toast.js";
10
- import { titleCase as U, cn as D, formatDateTime as we, toLocalDateString as Ut } from "../../lib/utils.js";
11
- import { requiredByRules as Ye } from "../../lib/validation-rules.js";
12
- import { GlossaryLabel as Je } from "../ai/GlossaryText.js";
13
- import { useFieldSource as Ht, FieldSourceInfo as Wt } from "../ConfigReadBack.js";
14
- import { Label as Vt } from "../ui/label.js";
2
+ import { useQueryClient as nt, useQueries as Ft, useQuery as le, useMutation as Ct } from "@tanstack/react-query";
3
+ import { Info as Rt, Loader2 as Lt, Sparkles as St, Lock as $t, SlidersHorizontal as qt, History as At, BellRing as Tt, Bell as Et, Sigma as Pt } from "lucide-react";
4
+ import { memo as jt, useState as ke, useRef as L, useId as Bt, useEffect as oe, useCallback as Je } from "react";
5
+ import { toast as ae } from "sonner";
6
+ import { useParentDraft as Dt, useNivaroClient as ie } from "../../context.js";
7
+ import { showsAiButton as Mt, AUTOFILL_CHECK_KEY as Ot, readAiFill as Ht } from "../../lib/ai-fill.js";
8
+ import { get as U, del as Kt, post as ve } from "../../lib/commands.js";
9
+ import { toastError as Ut } from "../../lib/error-toast.js";
10
+ import { titleCase as K, cn as D, formatDateTime as we, toLocalDateString as Wt } from "../../lib/utils.js";
11
+ import { requiredByRules as Xe } from "../../lib/validation-rules.js";
12
+ import { GlossaryLabel as Ze } from "../ai/GlossaryText.js";
13
+ import { useFieldSource as Vt, FieldSourceInfo as zt } from "../ConfigReadBack.js";
14
+ import { Label as Gt } from "../ui/label.js";
15
15
  import { TooltipProvider as ee, Tooltip as te, TooltipTrigger as ne, TooltipContent as re } from "../ui/tooltip.js";
16
- import { useAddendumFields as zt } from "./AddendumFieldContext.js";
17
- import { AutoIdPreviewField as Gt } from "./AutoIdPreviewField.js";
18
- import { useCascadeClearNotifier as Qt } from "./cascade-clear-notice.js";
19
- import { FOCUSABLE as Xe } from "./entry/entry-keys.js";
20
- import { useFieldAffordances as Yt, useFieldContextMenu as Jt, usePresenceSoftLock as Xt, LockReasonBadge as Zt, PresenceSoftLockStrip as It, RemoteChangeGhost as en } from "./FieldAffordances.js";
21
- import { FieldCommentButton as tn } from "./FieldComments.js";
22
- import { FieldRenderer as nn } from "./FieldRenderer.js";
23
- import { FormHelpVideoButton as rn } from "./FormHelpVideoButton.js";
24
- import { primaryControl as ln, applyFieldA11y as an } from "./field-a11y.js";
25
- import { getCascadeFilters as on, SYSTEM_FIELDS as sn, parseJson as dn, buildCascadeFilter as cn, CascadeEffectController as un } from "./helpers.js";
26
- import { isDerivedForRecord as mn } from "./live-rollups.js";
27
- import { useM2MStaging as pn } from "./M2MStagingContext.js";
28
- import { personalDefaultSlotFor as hn, PersonalDefaultSlot as fn } from "./PersonalDefaultControl.js";
29
- import { PersonalDefaultHint as xn } from "./PersonalDefaultPill.js";
30
- import { isDisplayFormulaRow as Ze, usePlacementTextContext as yn, placementFieldText as bn, fieldCounterConfig as gn, fieldIsRecommended as vn, RecommendedMarker as wn, RepeatLastButton as kn, DisplayFormulaValue as _n, FieldCounter as Nn } from "./placement-behaviour.js";
31
- import { keepIfEqual as Fn, jsonEqual as Cn } from "./render-stability.js";
32
- import { softRuleWarning as Rn } from "./soft-rules.js";
33
- import { usePersonalDefaultsApi as Ln } from "./usePersonalDefaults.js";
34
- import { resolveOptionFilterTokens as Sn } from "../../lib/option-filter-tokens.js";
35
- const Ie = /* @__PURE__ */ new Set(["integer", "float", "decimal", "bigInteger", "number"]), $n = /* @__PURE__ */ new Set(["string", "text", "richtext", "textarea", "markdown", "json", "csv"]), qn = /* @__PURE__ */ new Set([
16
+ import { useAddendumFields as Qt } from "./AddendumFieldContext.js";
17
+ import { AutoIdPreviewField as Yt } from "./AutoIdPreviewField.js";
18
+ import { useCascadeClearNotifier as Jt } from "./cascade-clear-notice.js";
19
+ import { DuplicateNotice as Xt } from "./DuplicateNotice.js";
20
+ import { FOCUSABLE as Ie } from "./entry/entry-keys.js";
21
+ import { useFieldAffordances as Zt, useFieldContextMenu as It, usePresenceSoftLock as en, LockReasonBadge as tn, PresenceSoftLockStrip as nn, RemoteChangeGhost as rn } from "./FieldAffordances.js";
22
+ import { FieldCommentButton as ln } from "./FieldComments.js";
23
+ import { FieldRenderer as on } from "./FieldRenderer.js";
24
+ import { FormHelpVideoButton as an } from "./FormHelpVideoButton.js";
25
+ import { primaryControl as sn, applyFieldA11y as dn } from "./field-a11y.js";
26
+ import { getCascadeFilters as cn, SYSTEM_FIELDS as un, parseJson as mn, buildCascadeFilter as pn, CascadeEffectController as hn } from "./helpers.js";
27
+ import { isDerivedForRecord as fn } from "./live-rollups.js";
28
+ import { useM2MStaging as xn } from "./M2MStagingContext.js";
29
+ import { personalDefaultSlotFor as yn, PersonalDefaultSlot as bn } from "./PersonalDefaultControl.js";
30
+ import { PersonalDefaultHint as gn } from "./PersonalDefaultPill.js";
31
+ import { isDisplayFormulaRow as et, usePlacementTextContext as vn, placementFieldText as wn, fieldCounterConfig as kn, fieldIsRecommended as _n, RecommendedMarker as Nn, RepeatLastButton as Fn, DisplayFormulaValue as Cn, FieldCounter as Rn } from "./placement-behaviour.js";
32
+ import { keepIfEqual as Ln, jsonEqual as Sn } from "./render-stability.js";
33
+ import { softRuleWarning as $n } from "./soft-rules.js";
34
+ import { usePersonalDefaultsApi as qn } from "./usePersonalDefaults.js";
35
+ import { resolveOptionFilterTokens as An } from "../../lib/option-filter-tokens.js";
36
+ const tt = /* @__PURE__ */ new Set(["integer", "float", "decimal", "bigInteger", "number"]), Tn = /* @__PURE__ */ new Set(["string", "text", "richtext", "textarea", "markdown", "json", "csv"]), En = /* @__PURE__ */ new Set([
36
37
  "input",
37
38
  "textarea",
38
39
  "wysiwyg",
@@ -40,7 +41,7 @@ const Ie = /* @__PURE__ */ new Set(["integer", "float", "decimal", "bigInteger",
40
41
  "input-rich-text-html",
41
42
  "rich_text",
42
43
  "extension-editorjs"
43
- ]), An = /* @__PURE__ */ new Set([
44
+ ]), Pn = /* @__PURE__ */ new Set([
44
45
  "relation-m2o",
45
46
  "relation-m2m",
46
47
  "select-multiple-m2m",
@@ -51,74 +52,74 @@ const Ie = /* @__PURE__ */ new Set(["integer", "float", "decimal", "bigInteger",
51
52
  "file",
52
53
  "files",
53
54
  "image"
54
- ]), Tn = /* @__PURE__ */ new Set(["file", "file-image", "files-m2m", "files", "image"]);
55
- function En(m) {
55
+ ]), jn = /* @__PURE__ */ new Set(["file", "file-image", "files-m2m", "files", "image"]);
56
+ function Bn(m) {
56
57
  const e = m.interface ?? "";
57
- return An.has(e) || e.startsWith("relation-") || e.endsWith("-m2o") || e.endsWith("-m2m") || Ie.has(m.type ?? "") ? !1 : !!($n.has(m.type ?? "") || qn.has(e) || !e && m.type && !Ie.has(m.type));
58
+ return Pn.has(e) || e.startsWith("relation-") || e.endsWith("-m2o") || e.endsWith("-m2m") || tt.has(m.type ?? "") ? !1 : !!(Tn.has(m.type ?? "") || En.has(e) || !e && m.type && !tt.has(m.type));
58
59
  }
59
- function Pn(m, e, i) {
60
+ function Dn(m, e, i) {
60
61
  return m.filter((h) => (i == null ? void 0 : i(h)) !== e);
61
62
  }
62
- function jn(m, e, i, h) {
63
+ function Mn(m, e, i, h) {
63
64
  const x = ie();
64
65
  return le({
65
66
  queryKey: ["field-lineage", m, e, i],
66
67
  queryFn: () => x.request(
67
- H(`/lineage/${m}/${encodeURIComponent(e)}/${i}`)
68
- ).then((s) => s.data),
68
+ U(`/lineage/${m}/${encodeURIComponent(e)}/${i}`)
69
+ ).then((d) => d.data),
69
70
  enabled: h,
70
71
  staleTime: 3e4
71
72
  });
72
73
  }
73
- function vr(m, e = "rows") {
74
+ function Nr(m, e = "rows") {
74
75
  var l, w, g;
75
76
  if (m && (m.kind === "write" || m.kind === "read") && m.formula) {
76
77
  const p = (b) => typeof b == "number" ? b.toLocaleString(void 0, { maximumFractionDigits: 2 }) : b == null || b === "" ? "0" : String(b);
77
- return `= ${m.formula.replace(/item\.([A-Za-z_][A-Za-z0-9_]*)/g, (b, a) => {
78
+ return `= ${m.formula.replace(/item\.([A-Za-z_][A-Za-z0-9_]*)/g, (b, o) => {
78
79
  var f;
79
- return p((f = m.inputs) == null ? void 0 : f[a]);
80
+ return p((f = m.inputs) == null ? void 0 : f[o]);
80
81
  }).replace(/\s*-\s*/g, " − ").replace(/\s*\*\s*/g, " × ").replace(/\s*\/\s*/g, " ÷ ")}`;
81
82
  }
82
83
  if (!m || m.kind !== "rollup") return null;
83
- const i = (m.sources ?? []).reduce((p, o) => p + o.rows.length, 0), h = (m.sources ?? []).reduce((p, o) => {
84
+ const i = (m.sources ?? []).reduce((p, a) => p + a.rows.length, 0), h = (m.sources ?? []).reduce((p, a) => {
84
85
  var b;
85
- return p + (((b = o.excluded) == null ? void 0 : b.length) ?? 0);
86
+ return p + (((b = a.excluded) == null ? void 0 : b.length) ?? 0);
86
87
  }, 0), x = (g = (w = (l = (m.sources ?? []).find((p) => {
87
- var o;
88
- return (o = p.excluded) == null ? void 0 : o.length;
89
- })) == null ? void 0 : l.excluded) == null ? void 0 : w[0]) == null ? void 0 : g.reason, s = [`= ${i} ${i === 1 ? e.replace(/s$/, "") : e}`];
90
- return h && s.push(
88
+ var a;
89
+ return (a = p.excluded) == null ? void 0 : a.length;
90
+ })) == null ? void 0 : l.excluded) == null ? void 0 : w[0]) == null ? void 0 : g.reason, d = [`= ${i} ${i === 1 ? e.replace(/s$/, "") : e}`];
91
+ return h && d.push(
91
92
  `${h} excluded${x ? ` (${x.replace(/^does not match: /, "")})` : ""}`
92
- ), s.join(" · ");
93
+ ), d.join(" · ");
93
94
  }
94
- function Bn({
95
+ function On({
95
96
  collection: m,
96
97
  itemId: e,
97
98
  field: i
98
99
  }) {
99
- const [h, x] = ke(!1), s = L(null), { data: l, isLoading: w } = jn(m, e, i, h);
100
- ae(() => {
100
+ const [h, x] = ke(!1), d = L(null), { data: l, isLoading: w } = Mn(m, e, i, h);
101
+ oe(() => {
101
102
  if (!h) return;
102
- const o = (b) => {
103
- var a;
104
- (a = s.current) != null && a.contains(b.target) || x(!1);
103
+ const a = (b) => {
104
+ var o;
105
+ (o = d.current) != null && o.contains(b.target) || x(!1);
105
106
  };
106
- return window.addEventListener("mousedown", o), () => window.removeEventListener("mousedown", o);
107
+ return window.addEventListener("mousedown", a), () => window.removeEventListener("mousedown", a);
107
108
  }, [h]);
108
- const g = (o) => o == null ? "—" : Number(o).toLocaleString(void 0, { maximumFractionDigits: 2 }), p = (l == null ? void 0 : l.stored_value) != null ? Number(l.stored_value) : null;
109
- return /* @__PURE__ */ u("div", { ref: s, className: "relative inline-flex", children: [
109
+ const g = (a) => a == null ? "—" : Number(a).toLocaleString(void 0, { maximumFractionDigits: 2 }), p = (l == null ? void 0 : l.stored_value) != null ? Number(l.stored_value) : null;
110
+ return /* @__PURE__ */ u("div", { ref: d, className: "relative inline-flex", children: [
110
111
  /* @__PURE__ */ n(
111
112
  "button",
112
113
  {
113
114
  type: "button",
114
- onClick: () => x((o) => !o),
115
+ onClick: () => x((a) => !a),
115
116
  title: "Where does this number come from?",
116
117
  className: D(
117
118
  "inline-flex items-center rounded p-0.5 transition-opacity",
118
119
  h ? "text-nvr-cyan opacity-100" : "text-slate-400 hover:text-nvr-cyan dark:text-slate-300 dark:hover:text-nvr-cyan"
119
120
  ),
120
121
  "data-field-lineage": !0,
121
- children: /* @__PURE__ */ n(Tt, { className: "h-3 w-3" })
122
+ children: /* @__PURE__ */ n(Pt, { className: "h-3 w-3" })
122
123
  }
123
124
  ),
124
125
  h && /* @__PURE__ */ u("div", { className: "absolute left-0 top-full z-40 mt-1 max-h-[340px] w-[360px] overflow-y-auto rounded-lg border border-slate-200 bg-white p-2 shadow-lg dark:border-border dark:bg-card", children: [
@@ -126,29 +127,29 @@ function Bn({
126
127
  w && /* @__PURE__ */ n("p", { className: "px-1 py-2 text-[11.5px] text-slate-400", children: "Loading…" }),
127
128
  (l == null ? void 0 : l.kind) === "write" && /* @__PURE__ */ u("div", { className: "space-y-1 px-1 py-1", children: [
128
129
  /* @__PURE__ */ n("p", { className: "font-mono text-[11px] text-slate-600 dark:text-slate-300", children: l.formula }),
129
- Object.entries(l.inputs ?? {}).map(([o, b]) => /* @__PURE__ */ u("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
130
- /* @__PURE__ */ n("span", { className: "font-mono", children: o }),
130
+ Object.entries(l.inputs ?? {}).map(([a, b]) => /* @__PURE__ */ u("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
131
+ /* @__PURE__ */ n("span", { className: "font-mono", children: a }),
131
132
  " = ",
132
133
  g(b)
133
- ] }, o)),
134
+ ] }, a)),
134
135
  /* @__PURE__ */ u("p", { className: "pt-1 text-[11.5px] font-medium text-slate-700 dark:text-slate-200", children: [
135
136
  "= ",
136
137
  g(l.stored_value)
137
138
  ] })
138
139
  ] }),
139
- (l == null ? void 0 : l.kind) === "rollup" && (l.sources ?? []).map((o, b) => {
140
- var a;
140
+ (l == null ? void 0 : l.kind) === "rollup" && (l.sources ?? []).map((a, b) => {
141
+ var o;
141
142
  return /* @__PURE__ */ u("div", { className: "mb-1.5", children: [
142
143
  /* @__PURE__ */ u("p", { className: "px-1 text-[10.5px] text-slate-400", children: [
143
- (o.aggregate ?? "sum").toUpperCase(),
144
- o.value_field ? ` of ${o.value_field}` : "",
144
+ (a.aggregate ?? "sum").toUpperCase(),
145
+ a.value_field ? ` of ${a.value_field}` : "",
145
146
  " across ",
146
- o.collection,
147
- o.filtered ? " (filtered)" : ""
147
+ a.collection,
148
+ a.filtered ? " (filtered)" : ""
148
149
  ] }),
149
- o.error && /* @__PURE__ */ n("p", { className: "px-1 py-1 text-[11.5px] text-amber-600 dark:text-amber-400", children: o.error }),
150
- o.note && /* @__PURE__ */ n("p", { className: "px-1 py-1 text-[11.5px] text-slate-400", children: o.note }),
151
- o.rows.length > 0 && /* @__PURE__ */ n("div", { className: "mt-0.5 space-y-px", children: o.rows.map((f) => /* @__PURE__ */ u(
150
+ a.error && /* @__PURE__ */ n("p", { className: "px-1 py-1 text-[11.5px] text-amber-600 dark:text-amber-400", children: a.error }),
151
+ a.note && /* @__PURE__ */ n("p", { className: "px-1 py-1 text-[11.5px] text-slate-400", children: a.note }),
152
+ a.rows.length > 0 && /* @__PURE__ */ n("div", { className: "mt-0.5 space-y-px", children: a.rows.map((f) => /* @__PURE__ */ u(
152
153
  "div",
153
154
  {
154
155
  className: "flex items-baseline gap-2 rounded px-1 py-0.5 text-[11.5px] hover:bg-slate-50 dark:hover:bg-muted",
@@ -167,19 +168,19 @@ function Bn({
167
168
  },
168
169
  f.id
169
170
  )) }),
170
- o.truncated && /* @__PURE__ */ n("p", { className: "px-1 pt-0.5 text-[10.5px] text-amber-600 dark:text-amber-400", children: "Showing the first 200 rows — the subtotal covers only these." }),
171
- o.subtotal != null && /* @__PURE__ */ u("p", { className: "border-t border-slate-100 px-1 pt-1 text-right text-[11.5px] font-medium text-slate-700 dark:border-border dark:text-slate-200", children: [
171
+ a.truncated && /* @__PURE__ */ n("p", { className: "px-1 pt-0.5 text-[10.5px] text-amber-600 dark:text-amber-400", children: "Showing the first 200 rows — the subtotal covers only these." }),
172
+ a.subtotal != null && /* @__PURE__ */ u("p", { className: "border-t border-slate-100 px-1 pt-1 text-right text-[11.5px] font-medium text-slate-700 dark:border-border dark:text-slate-200", children: [
172
173
  "subtotal ",
173
- g(o.subtotal)
174
+ g(a.subtotal)
174
175
  ] }),
175
- (((a = o.excluded) == null ? void 0 : a.length) ?? 0) > 0 && /* @__PURE__ */ u("div", { className: "mt-1 rounded bg-slate-50 px-1 py-1 dark:bg-muted/40", children: [
176
+ (((o = a.excluded) == null ? void 0 : o.length) ?? 0) > 0 && /* @__PURE__ */ u("div", { className: "mt-1 rounded bg-slate-50 px-1 py-1 dark:bg-muted/40", children: [
176
177
  /* @__PURE__ */ u("p", { className: "text-[10.5px] text-slate-500 dark:text-muted-foreground", children: [
177
- o.excluded.length,
178
+ a.excluded.length,
178
179
  " excluded —",
179
180
  " ",
180
- o.excluded[0].reason.replace(/^does not match: /, "")
181
+ a.excluded[0].reason.replace(/^does not match: /, "")
181
182
  ] }),
182
- o.excluded.slice(0, 8).map((f) => /* @__PURE__ */ u(
183
+ a.excluded.slice(0, 8).map((f) => /* @__PURE__ */ u(
183
184
  "div",
184
185
  {
185
186
  className: "flex items-baseline gap-2 px-0.5 text-[11px] text-slate-400",
@@ -190,9 +191,9 @@ function Bn({
190
191
  },
191
192
  f.id
192
193
  )),
193
- o.excluded.length > 8 && /* @__PURE__ */ u("p", { className: "px-0.5 text-[10.5px] text-slate-400", children: [
194
+ a.excluded.length > 8 && /* @__PURE__ */ u("p", { className: "px-0.5 text-[10.5px] text-slate-400", children: [
194
195
  "+",
195
- o.excluded.length - 8,
196
+ a.excluded.length - 8,
196
197
  " more"
197
198
  ] })
198
199
  ] })
@@ -202,65 +203,65 @@ function Bn({
202
203
  "stored ",
203
204
  g(p),
204
205
  (() => {
205
- const o = (l.sources ?? []).reduce((a, f) => a + (f.subtotal ?? 0), 0);
206
- return (l.sources ?? []).some((a) => a.truncated) ? null : Math.abs(o - p) < 0.01 ? /* @__PURE__ */ n("span", { className: "ml-1 text-emerald-600 dark:text-emerald-400", children: "✓ matches" }) : /* @__PURE__ */ n("span", { className: "ml-1 text-amber-600 dark:text-amber-400", children: "✕ differs from contributions" });
206
+ const a = (l.sources ?? []).reduce((o, f) => o + (f.subtotal ?? 0), 0);
207
+ return (l.sources ?? []).some((o) => o.truncated) ? null : Math.abs(a - p) < 0.01 ? /* @__PURE__ */ n("span", { className: "ml-1 text-emerald-600 dark:text-emerald-400", children: "✓ matches" }) : /* @__PURE__ */ n("span", { className: "ml-1 text-amber-600 dark:text-amber-400", children: "✕ differs from contributions" });
207
208
  })()
208
209
  ] })
209
210
  ] })
210
211
  ] });
211
212
  }
212
- function Dn({
213
+ function Hn({
213
214
  collection: m,
214
215
  itemId: e,
215
216
  field: i,
216
217
  formatValue: h,
217
218
  onRestore: x
218
219
  }) {
219
- const s = ie(), [l, w] = ke(!1), g = L(null), { data: p, isLoading: o } = le({
220
+ const d = ie(), [l, w] = ke(!1), g = L(null), { data: p, isLoading: a } = le({
220
221
  queryKey: ["field-value-history", m, e, i],
221
- queryFn: () => s.request(H(`/field-history/${m}/${encodeURIComponent(e)}/${i}`)).then((a) => a.data ?? []),
222
+ queryFn: () => d.request(U(`/field-history/${m}/${encodeURIComponent(e)}/${i}`)).then((o) => o.data ?? []),
222
223
  enabled: l,
223
224
  staleTime: 6e4
224
225
  });
225
- ae(() => {
226
+ oe(() => {
226
227
  if (!l) return;
227
- const a = (f) => {
228
+ const o = (f) => {
228
229
  var W;
229
230
  (W = g.current) != null && W.contains(f.target) || w(!1);
230
231
  };
231
- return window.addEventListener("mousedown", a), () => window.removeEventListener("mousedown", a);
232
+ return window.addEventListener("mousedown", o), () => window.removeEventListener("mousedown", o);
232
233
  }, [l]);
233
- const b = (a, f) => f || (a == null || a === "" ? "—" : h ? h(a) : typeof a == "boolean" || a === "true" || a === "false" ? a === !0 || a === "true" ? "Yes" : "No" : typeof a == "string" && /^\d{4}-\d{2}-\d{2}$/.test(a) ? Ut(a) : typeof a == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(a) ? we(a) : typeof a == "object" ? JSON.stringify(a).slice(0, 60) : String(a).slice(0, 80));
234
+ const b = (o, f) => f || (o == null || o === "" ? "—" : h ? h(o) : typeof o == "boolean" || o === "true" || o === "false" ? o === !0 || o === "true" ? "Yes" : "No" : typeof o == "string" && /^\d{4}-\d{2}-\d{2}$/.test(o) ? Wt(o) : typeof o == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(o) ? we(o) : typeof o == "object" ? JSON.stringify(o).slice(0, 60) : String(o).slice(0, 80));
234
235
  return /* @__PURE__ */ u("div", { ref: g, className: "relative inline-flex", children: [
235
236
  /* @__PURE__ */ n(
236
237
  "button",
237
238
  {
238
239
  type: "button",
239
- onClick: () => w((a) => !a),
240
+ onClick: () => w((o) => !o),
240
241
  title: "Value history",
241
242
  className: D(
242
243
  "inline-flex items-center rounded p-0.5 transition-opacity",
243
244
  l ? "text-nvr-cyan opacity-100" : "text-slate-400 hover:text-nvr-cyan dark:text-slate-300 dark:hover:text-nvr-cyan"
244
245
  ),
245
246
  "data-field-history": !0,
246
- children: /* @__PURE__ */ n($t, { className: "h-3 w-3" })
247
+ children: /* @__PURE__ */ n(At, { className: "h-3 w-3" })
247
248
  }
248
249
  ),
249
250
  l && /* @__PURE__ */ u("div", { className: "absolute left-0 top-full z-40 mt-1 max-h-64 w-[300px] overflow-y-auto rounded-lg border border-slate-200 bg-white p-2 shadow-lg dark:border-border dark:bg-card", children: [
250
251
  /* @__PURE__ */ n("p", { className: "mb-1 px-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Value history" }),
251
- o ? /* @__PURE__ */ n("p", { className: "px-1 py-2 text-[11.5px] text-slate-400", children: "Loading…" }) : (p ?? []).length === 0 ? /* @__PURE__ */ n("p", { className: "px-1 py-2 text-[11.5px] text-slate-400", children: "No recorded changes for this field." }) : /* @__PURE__ */ n("div", { className: "space-y-1", children: (p ?? []).map((a, f) => /* @__PURE__ */ u(
252
+ a ? /* @__PURE__ */ n("p", { className: "px-1 py-2 text-[11.5px] text-slate-400", children: "Loading…" }) : (p ?? []).length === 0 ? /* @__PURE__ */ n("p", { className: "px-1 py-2 text-[11.5px] text-slate-400", children: "No recorded changes for this field." }) : /* @__PURE__ */ n("div", { className: "space-y-1", children: (p ?? []).map((o, f) => /* @__PURE__ */ u(
252
253
  "div",
253
254
  {
254
255
  className: "rounded px-1 py-1 text-[11.5px] leading-snug hover:bg-slate-50 dark:hover:bg-muted",
255
256
  children: [
256
257
  /* @__PURE__ */ u("span", { className: "flex items-baseline justify-between gap-2", children: [
257
- /* @__PURE__ */ n("span", { className: "font-medium text-slate-700 dark:text-slate-200", children: b(a.value, a.display) }),
258
+ /* @__PURE__ */ n("span", { className: "font-medium text-slate-700 dark:text-slate-200", children: b(o.value, o.display) }),
258
259
  x && f > 0 && /* @__PURE__ */ n(
259
260
  "button",
260
261
  {
261
262
  type: "button",
262
263
  onClick: () => {
263
- x(a.value ?? null), w(!1);
264
+ x(o.value ?? null), w(!1);
264
265
  },
265
266
  className: "shrink-0 rounded border border-slate-200 px-1.5 py-px text-[10px] text-slate-500 hover:border-nvr-cyan/60 hover:text-nvr-navy dark:border-border dark:hover:text-nvr-cyan",
266
267
  children: "Restore"
@@ -268,20 +269,20 @@ function Dn({
268
269
  )
269
270
  ] }),
270
271
  /* @__PURE__ */ u("span", { className: "block text-[10.5px] text-slate-400", children: [
271
- a.action === "create" ? "initial value" : "changed",
272
- a.timestamp ? ` · ${we(a.timestamp)}` : "",
273
- a.user_name ? ` · ${a.user_name}` : "",
274
- a.origin && a.origin.kind !== "user" && /* @__PURE__ */ n(
272
+ o.action === "create" ? "initial value" : "changed",
273
+ o.timestamp ? ` · ${we(o.timestamp)}` : "",
274
+ o.user_name ? ` · ${o.user_name}` : "",
275
+ o.origin && o.origin.kind !== "user" && /* @__PURE__ */ n(
275
276
  "span",
276
277
  {
277
- className: a.origin.kind === "integration" ? "ml-1 rounded bg-purple-500/10 px-1 py-px text-[9.5px] font-medium text-purple-700 dark:text-purple-400" : a.origin.kind === "import" ? "ml-1 rounded bg-sky-500/10 px-1 py-px text-[9.5px] font-medium text-sky-700 dark:text-sky-400" : "ml-1 rounded bg-amber-500/10 px-1 py-px text-[9.5px] font-medium text-amber-700 dark:text-amber-400",
278
- children: a.origin.label ?? a.origin.kind
278
+ className: o.origin.kind === "integration" ? "ml-1 rounded bg-purple-500/10 px-1 py-px text-[9.5px] font-medium text-purple-700 dark:text-purple-400" : o.origin.kind === "import" ? "ml-1 rounded bg-sky-500/10 px-1 py-px text-[9.5px] font-medium text-sky-700 dark:text-sky-400" : "ml-1 rounded bg-amber-500/10 px-1 py-px text-[9.5px] font-medium text-amber-700 dark:text-amber-400",
279
+ children: o.origin.label ?? o.origin.kind
279
280
  }
280
281
  )
281
282
  ] }),
282
- a.note && /* @__PURE__ */ u("span", { className: "block text-[10.5px] italic text-slate-500 dark:text-slate-400", children: [
283
+ o.note && /* @__PURE__ */ u("span", { className: "block text-[10.5px] italic text-slate-500 dark:text-slate-400", children: [
283
284
  "“",
284
- a.note,
285
+ o.note,
285
286
  "”"
286
287
  ] })
287
288
  ]
@@ -291,34 +292,34 @@ function Dn({
291
292
  ] })
292
293
  ] });
293
294
  }
294
- function Mn({
295
+ function Kn({
295
296
  collection: m,
296
297
  itemId: e,
297
298
  field: i
298
299
  }) {
299
- const h = ie(), x = et(), { data: s } = le({
300
+ const h = ie(), x = nt(), { data: d } = le({
300
301
  queryKey: ["field-watch-config"],
301
- queryFn: () => h.request(H("/field-watches/config")).then((o) => o.data).catch(() => ({ enabled: !1 })),
302
+ queryFn: () => h.request(U("/field-watches/config")).then((a) => a.data).catch(() => ({ enabled: !1 })),
302
303
  staleTime: 5 * 6e4
303
304
  }), l = ["field-watch-self", m, e], { data: w = [] } = le({
304
305
  queryKey: l,
305
- queryFn: () => h.request(H("/field-watches/self", { collection: m, item_id: e })).then((o) => o.data ?? []).catch(() => []),
306
- enabled: !!(s != null && s.enabled),
306
+ queryFn: () => h.request(U("/field-watches/self", { collection: m, item_id: e })).then((a) => a.data ?? []).catch(() => []),
307
+ enabled: !!(d != null && d.enabled),
307
308
  staleTime: 6e4
308
- }), g = w.includes(i), p = Nt({
309
+ }), g = w.includes(i), p = Ct({
309
310
  mutationFn: () => g ? h.request(
310
- Ot(
311
+ Kt(
311
312
  `/field-watches/self?collection=${encodeURIComponent(m)}&field=${encodeURIComponent(i)}&item_id=${encodeURIComponent(e)}`
312
313
  )
313
314
  ) : h.request(ve("/field-watches/self", { collection: m, field: i, item_id: e })),
314
315
  onSuccess: () => {
315
- x.invalidateQueries({ queryKey: l }), oe.success(
316
+ x.invalidateQueries({ queryKey: l }), ae.success(
316
317
  g ? "No longer watching this field" : "Watching — you will be notified when it changes"
317
318
  );
318
319
  },
319
- onError: () => oe.error("Could not update the watch")
320
+ onError: () => ae.error("Could not update the watch")
320
321
  });
321
- return s != null && s.enabled ? /* @__PURE__ */ n(
322
+ return d != null && d.enabled ? /* @__PURE__ */ n(
322
323
  "button",
323
324
  {
324
325
  type: "button",
@@ -326,42 +327,42 @@ function Mn({
326
327
  title: g ? "Stop watching this field on this record" : "Watch this field on this record",
327
328
  "data-field-watch": i,
328
329
  className: `rounded p-0.5 transition-colors ${g ? "text-nvr-navy dark:text-nvr-cyan" : "text-slate-300 hover:text-slate-500"}`,
329
- children: g ? /* @__PURE__ */ n(qt, { className: "h-3 w-3" }) : /* @__PURE__ */ n(At, { className: "h-3 w-3" })
330
+ children: g ? /* @__PURE__ */ n(Tt, { className: "h-3 w-3" }) : /* @__PURE__ */ n(Et, { className: "h-3 w-3" })
330
331
  }
331
332
  ) : null;
332
333
  }
333
- const wr = Et(function({
334
+ const Fr = jt(function({
334
335
  field: e,
335
336
  draft: i,
336
337
  onChange: h,
337
338
  relations: x,
338
- collection: s,
339
+ collection: d,
339
340
  itemId: l,
340
341
  error: w,
341
342
  visible: g,
342
343
  locked: p,
343
- layoutAiEnabled: o,
344
+ layoutAiEnabled: a,
344
345
  renderField: b,
345
- onCountChange: a,
346
+ onCountChange: o,
346
347
  swapButton: f,
347
348
  swapContent: W,
348
- forceVisible: tt,
349
+ forceVisible: rt,
349
350
  autoFillTick: se
350
351
  }) {
351
- var He, We, Ve, ze;
352
- const V = Tn.has(e.interface ?? ""), N = jt(), y = pn(), _e = et(), de = ie(), [Ne, z] = ke(!1), d = Yt(), ce = Qt(), Fe = Ht(e.field), G = L(null), P = Pt(), ue = L(null), Ce = L(!1), Re = L({
352
+ var We, Ve, ze, Ge, Qe;
353
+ const V = jn.has(e.interface ?? ""), N = Dt(), y = xn(), _e = nt(), de = ie(), [Ne, z] = ke(!1), s = Zt(), ce = Jt(), Fe = Vt(e.field), G = L(null), P = Bt(), ue = L(null), Ce = L(!1), Re = L({
353
354
  required: !1,
354
355
  hasError: !1
355
356
  });
356
- ae(() => {
357
- const t = Ce.current ? ln(ue.current) : null;
358
- if (!t || (an(t, { ...Re.current, errorId: `${P}-error` }), t.hasAttribute("aria-label"))) return;
357
+ oe(() => {
358
+ const t = Ce.current ? sn(ue.current) : null;
359
+ if (!t || (dn(t, { ...Re.current, errorId: `${P}-error` }), t.hasAttribute("aria-label"))) return;
359
360
  t.id || (t.id = `${P}-control`);
360
361
  const r = t.tagName === "BUTTON" ? `${P} ${t.id}` : P;
361
362
  t.getAttribute("aria-labelledby") !== r && t.setAttribute("aria-labelledby", r);
362
363
  });
363
364
  const Le = p && !V, Se = L(null);
364
- ae(() => {
365
+ oe(() => {
365
366
  const t = Se.current;
366
367
  if (!t) return;
367
368
  if (!Le) {
@@ -371,41 +372,41 @@ const wr = Et(function({
371
372
  const r = typeof document < "u" ? document.activeElement : null;
372
373
  r instanceof HTMLElement && t.contains(r) && r.blur(), t.setAttribute("inert", "");
373
374
  }, [Le, se]);
374
- const Q = e.field, $e = Qe(
375
+ const Q = e.field, $e = Je(
375
376
  (t) => {
376
377
  p || h(Q, t);
377
378
  },
378
379
  [p, h, Q]
379
- ), nt = Qe(
380
- (t) => a == null ? void 0 : a(Q, t),
381
- [a, Q]
382
- ), rt = L(void 0), qe = L(void 0), Ae = L(void 0), Te = !p && !e.readonly && !e.computed_formula && !(e.hidden && !e.layout_assigned) && !Ze(e), {
383
- onContextMenu: lt,
384
- onKeyDown: at,
385
- menu: ot,
386
- confirmSaveFrom: it,
380
+ ), lt = Je(
381
+ (t) => o == null ? void 0 : o(Q, t),
382
+ [o, Q]
383
+ ), ot = L(void 0), qe = L(void 0), Ae = L(void 0), Te = !p && !e.readonly && !e.computed_formula && !(e.hidden && !e.layout_assigned) && !et(e), {
384
+ onContextMenu: at,
385
+ onKeyDown: it,
386
+ menu: st,
387
+ confirmSaveFrom: dt,
387
388
  openedBy: me
388
- } = Jt({
389
+ } = It({
389
390
  wrapperRef: G,
390
391
  field: e,
391
392
  value: i[e.field],
392
393
  relations: x,
393
- collection: s,
394
+ collection: d,
394
395
  itemId: l,
395
- openRelated: d == null ? void 0 : d.openRelated,
396
+ openRelated: s == null ? void 0 : s.openRelated,
396
397
  editable: Te
397
- }), j = Xt(G), st = yn(), Ee = d == null ? void 0 : d.remoteChanges[e.field], M = d == null ? void 0 : d.lockReasons[e.field], T = d == null ? void 0 : d.applyToLines[e.field], R = Ln(), dt = (R == null ? void 0 : R.applied(e.field)) ?? !1, Pe = (R == null ? void 0 : R.hintFor(e.field)) ?? null, pe = hn(R, e.field, Te), he = () => {
398
+ }), j = en(G), ct = vn(), Ee = s == null ? void 0 : s.remoteChanges[e.field], M = s == null ? void 0 : s.lockReasons[e.field], T = s == null ? void 0 : s.applyToLines[e.field], Pe = (We = s == null ? void 0 : s.duplicates) == null ? void 0 : We[e.field], R = qn(), ut = (R == null ? void 0 : R.applied(e.field)) ?? !1, je = (R == null ? void 0 : R.hintFor(e.field)) ?? null, pe = yn(R, e.field, Te), he = () => {
398
399
  var t, r;
399
- return ((t = ue.current) == null ? void 0 : t.querySelector(Xe)) ?? ((r = G.current) == null ? void 0 : r.querySelector(Xe));
400
- }, Y = Bt(e._overrides, o, En(e)), fe = !!(d != null && d.fromAutofill) && !!e._overrides && e._overrides[Dt] === !0;
401
- async function ct() {
400
+ return ((t = ue.current) == null ? void 0 : t.querySelector(Ie)) ?? ((r = G.current) == null ? void 0 : r.querySelector(Ie));
401
+ }, Y = Mt(e._overrides, a, Bn(e)), fe = !!(s != null && s.fromAutofill) && !!e._overrides && e._overrides[Ot] === !0;
402
+ async function mt() {
402
403
  var t;
403
- if (Y.perField) return ut();
404
+ if (Y.perField) return pt();
404
405
  z(!0);
405
406
  try {
406
407
  const r = await de.request(
407
408
  ve("/ai/generate", {
408
- collection: s,
409
+ collection: d,
409
410
  item_id: l !== "new" ? l : void 0,
410
411
  field: e.field
411
412
  })
@@ -416,31 +417,31 @@ const wr = Et(function({
416
417
  z(!1);
417
418
  }
418
419
  }
419
- async function ut() {
420
+ async function pt() {
420
421
  var r, c, k, S;
421
422
  const t = {};
422
- for (const _ of ((r = Mt(e._overrides)) == null ? void 0 : r.tokens) ?? []) _ in i && (t[_] = i[_]);
423
+ for (const _ of ((r = Ht(e._overrides)) == null ? void 0 : r.tokens) ?? []) _ in i && (t[_] = i[_]);
423
424
  z(!0);
424
425
  try {
425
426
  const _ = await de.request(
426
427
  ve("/ai/field-fill", {
427
- collection: s,
428
- layout_id: (d == null ? void 0 : d.layoutId) ?? null,
428
+ collection: d,
429
+ layout_id: (s == null ? void 0 : s.layoutId) ?? null,
429
430
  field: e.field,
430
431
  item_id: l && l !== "new" ? l : null,
431
432
  values: t
432
433
  })
433
434
  ), F = (c = _.data) == null ? void 0 : c.value;
434
- typeof F == "string" && F !== "" ? h(e.field, F) : oe.info("The AI had nothing to write here"), (S = (k = _.data) == null ? void 0 : k.missing) != null && S.length && oe.info(`Filled without ${_.data.missing.join(", ")} (empty or not visible to you)`);
435
+ typeof F == "string" && F !== "" ? h(e.field, F) : ae.info("The AI had nothing to write here"), (S = (k = _.data) == null ? void 0 : k.missing) != null && S.length && ae.info(`Filled without ${_.data.missing.join(", ")} (empty or not visible to you)`);
435
436
  } catch (_) {
436
- Kt(_, "AI fill failed", { action: "Fill with AI" });
437
+ Ut(_, "AI fill failed", { action: "Fill with AI" });
437
438
  } finally {
438
439
  z(!1);
439
440
  }
440
441
  }
441
- const E = on(e.dependency_config), je = E.flatMap((t) => {
442
+ const E = cn(e.dependency_config), Be = E.flatMap((t) => {
442
443
  const r = x.find(
443
- (k) => k.one_collection === s && k.one_field === t.parent_field
444
+ (k) => k.one_collection === d && k.one_field === t.parent_field
444
445
  );
445
446
  if (!r) return [];
446
447
  if (r.junction_field) return [{ rule: t, rel: r }];
@@ -448,11 +449,11 @@ const wr = Et(function({
448
449
  (k) => k.many_collection === r.many_collection && k.id !== r.id
449
450
  );
450
451
  return c != null && c.many_field ? [{ rule: t, rel: { ...r, junction_field: c.many_field } }] : [];
451
- }), mt = _t({
452
- queries: je.map(({ rel: t }) => ({
452
+ }), ht = Ft({
453
+ queries: Be.map(({ rel: t }) => ({
453
454
  queryKey: ["m2m-items", t.many_collection, t.many_field, l],
454
455
  queryFn: () => de.request(
455
- H(`/items/${t.many_collection}`, {
456
+ U(`/items/${t.many_collection}`, {
456
457
  filter: JSON.stringify({ [t.many_field]: { _eq: l } }),
457
458
  limit: 200,
458
459
  fields: `id,${t.junction_field}`
@@ -461,26 +462,26 @@ const wr = Et(function({
461
462
  enabled: !!l && l !== "new",
462
463
  staleTime: 3e4
463
464
  }))
464
- }), pt = Object.fromEntries(
465
- je.map(({ rule: t, rel: r }, c) => {
465
+ }), ft = Object.fromEntries(
466
+ Be.map(({ rule: t, rel: r }, c) => {
466
467
  var _;
467
468
  const k = r.one_field ?? `${r.many_collection}.${r.junction_field}`, S = (y == null ? void 0 : y.getStagedUnlinks(k)) ?? /* @__PURE__ */ new Set();
468
469
  return [
469
470
  t.parent_field,
470
- (((_ = mt[c]) == null ? void 0 : _.data) ?? []).filter((F) => !S.has(F.id)).map((F) => F[r.junction_field])
471
+ (((_ = ht[c]) == null ? void 0 : _.data) ?? []).filter((F) => !S.has(F.id)).map((F) => F[r.junction_field])
471
472
  ];
472
473
  })
473
- ), J = zt()[e.field] ?? [];
474
- if (!tt && (!g || !e.layout_assigned && (e.hidden || sn.has(e.field))))
474
+ ), J = Qt()[e.field] ?? [];
475
+ if (!rt && (!g || !e.layout_assigned && (e.hidden || un.has(e.field))))
475
476
  return null;
476
- const xe = i[e.field] ?? null, X = bn(e, st), C = X.label ?? U(e.field);
477
+ const xe = i[e.field] ?? null, X = wn(e, ct), C = X.label ?? K(e.field);
477
478
  Ce.current = C !== "", Re.current = {
478
- required: !!(e.required || Ye(e.validation_rules, i)),
479
+ required: !!(e.required || Xe(e.validation_rules, i)),
479
480
  hasError: !!w
480
481
  };
481
- const q = Ze(e), Be = q ? null : gn(e), De = q || !(l === "new" || !l || (He = N == null ? void 0 : N.dirtyFields) != null && He.has(e.field)) ? null : Rn(e, i), ht = !q && !p && !e.readonly && ((We = e._overrides) == null ? void 0 : We.repeat_last) === !0, ft = mn(e, i), xt = (ze = (Ve = dn(e.options)) == null ? void 0 : Ve.auto_id) == null ? void 0 : ze.pattern, v = (() => {
482
+ const q = et(e), De = q ? null : kn(e), Me = q || !(l === "new" || !l || (Ve = N == null ? void 0 : N.dirtyFields) != null && Ve.has(e.field)) ? null : $n(e, i), xt = !q && !p && !e.readonly && ((ze = e._overrides) == null ? void 0 : ze.repeat_last) === !0, yt = fn(e, i), bt = (Qe = (Ge = mn(e.options)) == null ? void 0 : Ge.auto_id) == null ? void 0 : Qe.pattern, v = (() => {
482
483
  const t = x.find(
483
- (c) => c.one_collection === s && c.one_field === e.field
484
+ (c) => c.one_collection === d && c.one_field === e.field
484
485
  );
485
486
  if (!t) return null;
486
487
  if (t.junction_field) return t;
@@ -488,17 +489,17 @@ const wr = Et(function({
488
489
  (c) => c.many_collection === t.many_collection && c.id !== t.id
489
490
  );
490
491
  return r ? { ...t, junction_field: r.many_field } : null;
491
- })(), ye = v ? null : x.find((t) => t.many_collection === s && t.many_field === e.field) ?? null, be = v ? x.find(
492
+ })(), ye = v ? null : x.find((t) => t.many_collection === d && t.many_field === e.field) ?? null, be = v ? x.find(
492
493
  (t) => t.many_collection === v.many_collection && t.many_field === v.junction_field && t.id !== v.id
493
- ) ?? null : null, B = v ? v.one_field ?? `${v.many_collection}.${v.junction_field}` : null, Me = B ? (y == null ? void 0 : y.getStagedLinks(B)) ?? [] : [], yt = v ? (_e.getQueryData([
494
+ ) ?? null : null, B = v ? v.one_field ?? `${v.many_collection}.${v.junction_field}` : null, Oe = B ? (y == null ? void 0 : y.getStagedLinks(B)) ?? [] : [], gt = v ? (_e.getQueryData([
494
495
  "m2m-items",
495
496
  v.many_collection,
496
497
  v.many_field,
497
498
  l
498
- ]) ?? []).map((t) => t[v.junction_field]) : [], Oe = v ? Me[0] ?? yt[0] ?? null : xe, Ke = (be == null ? void 0 : be.one_collection) ?? (ye == null ? void 0 : ye.one_collection) ?? void 0, Z = (t) => {
499
+ ]) ?? []).map((t) => t[v.junction_field]) : [], He = v ? Oe[0] ?? gt[0] ?? null : xe, Ke = (be == null ? void 0 : be.one_collection) ?? (ye == null ? void 0 : ye.one_collection) ?? void 0, Z = (t) => {
499
500
  var r;
500
- return ((N == null ? void 0 : N.collection) === s ? (r = N == null ? void 0 : N.fieldLabels) == null ? void 0 : r[t] : void 0) ?? U(String(t));
501
- }, A = cn({
501
+ return ((N == null ? void 0 : N.collection) === d ? (r = N == null ? void 0 : N.fieldLabels) == null ? void 0 : r[t] : void 0) ?? K(String(t));
502
+ }, A = pn({
502
503
  rules: E,
503
504
  // A parent whose value THIS field's own pick derived must not narrow this
504
505
  // field's options — otherwise picking a region locks the region picker
@@ -510,40 +511,40 @@ const wr = Et(function({
510
511
  },
511
512
  parentValue: (t) => {
512
513
  if (i[t] != null) return i[t];
513
- const r = x.find(($) => $.one_collection === s && $.one_field === t);
514
+ const r = x.find(($) => $.one_collection === d && $.one_field === t);
514
515
  if (!r) return null;
515
516
  let c = r;
516
517
  if (!c.junction_field) {
517
518
  const $ = x.find(
518
- (Ge) => Ge.many_collection === r.many_collection && Ge.id !== r.id
519
+ (Ye) => Ye.many_collection === r.many_collection && Ye.id !== r.id
519
520
  );
520
521
  if ($ != null && $.many_field) c = { ...r, junction_field: $.many_field };
521
522
  else return null;
522
523
  }
523
- const k = c.one_field ?? `${c.many_collection}.${c.junction_field}`, S = (y == null ? void 0 : y.getStagedLinks(k)) ?? [], _ = pt[t] ?? [], F = [...new Set([...S, ..._].map(($) => String($)))];
524
+ const k = c.one_field ?? `${c.many_collection}.${c.junction_field}`, S = (y == null ? void 0 : y.getStagedLinks(k)) ?? [], _ = ft[t] ?? [], F = [...new Set([...S, ..._].map(($) => String($)))];
524
525
  return F.length === 0 ? null : F.length === 1 ? F[0] : F;
525
526
  },
526
527
  parentOptionFilter: (t) => {
527
528
  var c;
528
- const r = (N == null ? void 0 : N.collection) === s ? (c = N.fieldOptionFilters) == null ? void 0 : c[t] : void 0;
529
- return r ? Sn(r, i, l) : void 0;
529
+ const r = (N == null ? void 0 : N.collection) === d ? (c = N.fieldOptionFilters) == null ? void 0 : c[t] : void 0;
530
+ return r ? An(r, i, l) : void 0;
530
531
  }
531
- }), O = A.filter ? Fn(rt, A.filter, Cn) : A.filter, K = A.satisfiedParents.map(Z), I = A.satisfiedParents, bt = A.unsatisfiedParents.length ? Z(A.unsatisfiedParents[0]) : null, ge = A.missingRequiredParents, Ue = ge.length ? Z(ge[0]) : null;
532
- function gt() {
532
+ }), O = A.filter ? Ln(ot, A.filter, Sn) : A.filter, H = A.satisfiedParents.map(Z), I = A.satisfiedParents, vt = A.unsatisfiedParents.length ? Z(A.unsatisfiedParents[0]) : null, ge = A.missingRequiredParents, Ue = ge.length ? Z(ge[0]) : null;
533
+ function wt() {
533
534
  const t = Ae.current;
534
535
  if (t && t.src === e) return t.value;
535
536
  const r = { ...e, readonly: !0 };
536
537
  return Ae.current = { src: e, value: r }, r;
537
538
  }
538
- function vt() {
539
- const t = Pn(
539
+ function kt() {
540
+ const t = Dn(
540
541
  I,
541
542
  e.field,
542
543
  y == null ? void 0 : y.getDerivedOrigin
543
- ), r = JSON.stringify([K, I, t]), c = qe.current;
544
+ ), r = JSON.stringify([H, I, t]), c = qe.current;
544
545
  if (c && c.sig === r && c.onChange === h) return c.value;
545
546
  const k = {
546
- labels: K,
547
+ labels: H,
547
548
  keys: I,
548
549
  clearable: t,
549
550
  onClear: t.length > 0 ? (S) => {
@@ -552,7 +553,7 @@ const wr = Et(function({
552
553
  };
553
554
  return qe.current = { sig: r, onChange: h, value: k }, k;
554
555
  }
555
- function wt() {
556
+ function _t() {
556
557
  for (const t of I) {
557
558
  const r = document.querySelector(`[data-field="${t}"]`);
558
559
  r && (r.scrollIntoView({ behavior: "smooth", block: "center" }), r.style.transition = "box-shadow 0.15s ease", r.style.boxShadow = "0 0 0 2px rgb(var(--nvr-cyan-rgb, 0 206 255)), 0 0 0 5px rgb(var(--nvr-cyan-rgb, 0 206 255) / 0.25)", r.style.borderRadius = "12px", setTimeout(() => {
@@ -562,14 +563,14 @@ const wr = Et(function({
562
563
  }, 900));
563
564
  }
564
565
  }
565
- const kt = () => {
566
- const t = v && B ? Oe : i[e.field];
566
+ const Nt = () => {
567
+ const t = v && B ? He : i[e.field];
567
568
  if (t != null && t !== "" && !(Array.isArray(t) && !t.length) && (ce == null || ce({
568
569
  field: e.field,
569
- label: C || U(e.field),
570
+ label: C || K(e.field),
570
571
  parents: E.map((r) => r.parent_field).filter(Boolean)
571
572
  })), v && B) {
572
- for (const c of Me) y == null || y.unstageLink(B, c);
573
+ for (const c of Oe) y == null || y.unstageLink(B, c);
573
574
  const r = _e.getQueryData([
574
575
  "m2m-items",
575
576
  v.many_collection,
@@ -587,27 +588,27 @@ const wr = Et(function({
587
588
  {
588
589
  ref: G,
589
590
  "data-field": e.field,
590
- "data-field-collection": s,
591
+ "data-field-collection": d,
591
592
  "data-field-interface": e.interface ?? void 0,
592
593
  "data-autofill-check": fe ? "" : void 0,
593
594
  className: D(
594
595
  "group/fieldrow space-y-1.5",
595
596
  fe && "rounded-md bg-amber-50/60 p-1.5 ring-1 ring-amber-300 dark:bg-amber-500/10 dark:ring-amber-500/40"
596
597
  ),
597
- onContextMenu: lt,
598
- onKeyDown: at,
598
+ onContextMenu: at,
599
+ onKeyDown: it,
599
600
  onFocusCapture: j.onFocusCapture,
600
601
  children: [
601
- ot,
602
+ st,
602
603
  E.length > 0 && /* @__PURE__ */ n(
603
- un,
604
+ hn,
604
605
  {
605
606
  cascadeRules: E,
606
607
  cascadeFilter: O,
607
- currentValue: Oe,
608
+ currentValue: He,
608
609
  relatedCollection: Ke,
609
610
  missingRequiredParents: ge,
610
- onClear: kt
611
+ onClear: Nt
611
612
  }
612
613
  ),
613
614
  (C !== "" || J.length > 0) && /* @__PURE__ */ u(
@@ -616,35 +617,35 @@ const wr = Et(function({
616
617
  className: "flex flex-wrap items-center gap-1.5 min-h-[1.5rem]",
617
618
  "data-pd-row": pe ? "" : void 0,
618
619
  children: [
619
- C !== "" && /* @__PURE__ */ u(Vt, { id: P, "data-field-label": !0, className: "text-sm font-medium", children: [
620
- /* @__PURE__ */ n(Je, { text: C, collection: s }),
621
- (e.required || Ye(e.validation_rules, i)) && /* @__PURE__ */ n("span", { className: "ml-0.5 text-destructive", children: "*" }),
622
- vn(e) && /* @__PURE__ */ n(wn, {})
620
+ C !== "" && /* @__PURE__ */ u(Gt, { id: P, "data-field-label": !0, className: "text-sm font-medium", children: [
621
+ /* @__PURE__ */ n(Ze, { text: C, collection: d }),
622
+ (e.required || Xe(e.validation_rules, i)) && /* @__PURE__ */ n("span", { className: "ml-0.5 text-destructive", children: "*" }),
623
+ _n(e) && /* @__PURE__ */ n(Nn, {})
623
624
  ] }),
624
625
  X.note && /* @__PURE__ */ n(ee, { delayDuration: 100, children: /* @__PURE__ */ u(te, { children: [
625
- /* @__PURE__ */ n(ne, { asChild: !0, children: /* @__PURE__ */ n(Ft, { className: "h-3.5 w-3.5 shrink-0 cursor-help text-slate-400 hover:text-slate-600" }) }),
626
- /* @__PURE__ */ n(re, { side: "top", className: "max-w-[240px] text-[12px]", children: (d == null ? void 0 : d.glossaryHelp) === !1 ? X.note : /* @__PURE__ */ n(Je, { text: X.note, collection: s }) })
626
+ /* @__PURE__ */ n(ne, { asChild: !0, children: /* @__PURE__ */ n(Rt, { className: "h-3.5 w-3.5 shrink-0 cursor-help text-slate-400 hover:text-slate-600" }) }),
627
+ /* @__PURE__ */ n(re, { side: "top", className: "max-w-[240px] text-[12px]", children: (s == null ? void 0 : s.glossaryHelp) === !1 ? X.note : /* @__PURE__ */ n(Ze, { text: X.note, collection: d }) })
627
628
  ] }) }),
628
- Fe && /* @__PURE__ */ n(Wt, { source: Fe, label: C }),
629
+ Fe && /* @__PURE__ */ n(zt, { source: Fe, label: C }),
629
630
  !q && l && l !== "new" && /* @__PURE__ */ n(
630
- Dn,
631
+ Hn,
631
632
  {
632
- collection: s,
633
+ collection: d,
633
634
  itemId: l,
634
635
  field: e.field,
635
636
  onRestore: e.readonly ? void 0 : (t) => h(e.field, t)
636
637
  }
637
638
  ),
638
- !q && l && l !== "new" && /* @__PURE__ */ n(Mn, { collection: s, itemId: l, field: e.field }),
639
- !q && l && l !== "new" && /* @__PURE__ */ n(tn, { field: e.field, label: C || U(e.field) }),
640
- l && l !== "new" && ft && /* @__PURE__ */ n(Bn, { collection: s, itemId: l, field: e.field }),
641
- ht && /* @__PURE__ */ n(
642
- kn,
639
+ !q && l && l !== "new" && /* @__PURE__ */ n(Kn, { collection: d, itemId: l, field: e.field }),
640
+ !q && l && l !== "new" && /* @__PURE__ */ n(ln, { field: e.field, label: C || K(e.field) }),
641
+ l && l !== "new" && yt && /* @__PURE__ */ n(On, { collection: d, itemId: l, field: e.field }),
642
+ xt && /* @__PURE__ */ n(
643
+ Fn,
643
644
  {
644
- collection: s,
645
+ collection: d,
645
646
  itemId: l,
646
647
  field: e.field,
647
- label: C || U(e.field),
648
+ label: C || K(e.field),
648
649
  onFill: (t) => h(e.field, t)
649
650
  }
650
651
  ),
@@ -652,13 +653,13 @@ const wr = Et(function({
652
653
  "button",
653
654
  {
654
655
  type: "button",
655
- onClick: ct,
656
+ onClick: mt,
656
657
  disabled: Ne,
657
658
  "data-ai-fill": Y.perField ? e.field : void 0,
658
659
  className: "inline-flex items-center gap-0.5 rounded px-1 py-0.5 text-[10px] font-medium text-nvr-cyan hover:bg-nvr-cyan/10 disabled:opacity-50 transition-colors",
659
660
  title: "Generate with AI",
660
661
  children: [
661
- Ne ? /* @__PURE__ */ n(Ct, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-3 w-3" }),
662
+ Ne ? /* @__PURE__ */ n(Lt, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ n(St, { className: "h-3 w-3" }),
662
663
  "AI"
663
664
  ]
664
665
  }
@@ -710,20 +711,20 @@ const wr = Et(function({
710
711
  ] })
711
712
  ] }) }),
712
713
  /* @__PURE__ */ n(
713
- rn,
714
+ an,
714
715
  {
715
- collection: s,
716
+ collection: d,
716
717
  kind: "field",
717
718
  name: e.field,
718
719
  label: C
719
720
  }
720
721
  ),
721
- (p || e.readonly) && M ? /* @__PURE__ */ n(Zt, { reason: M, onHover: d == null ? void 0 : d.onLockHover }) : p ? /* @__PURE__ */ n(ee, { delayDuration: 200, children: /* @__PURE__ */ u(te, { children: [
722
- /* @__PURE__ */ n(ne, { asChild: !0, children: /* @__PURE__ */ n("span", { className: "inline-flex items-center text-amber-400 dark:text-amber-500", children: /* @__PURE__ */ n(Lt, { className: "h-3 w-3" }) }) }),
722
+ (p || e.readonly) && M ? /* @__PURE__ */ n(tn, { reason: M, onHover: s == null ? void 0 : s.onLockHover }) : p ? /* @__PURE__ */ n(ee, { delayDuration: 200, children: /* @__PURE__ */ u(te, { children: [
723
+ /* @__PURE__ */ n(ne, { asChild: !0, children: /* @__PURE__ */ n("span", { className: "inline-flex items-center text-amber-400 dark:text-amber-500", children: /* @__PURE__ */ n($t, { className: "h-3 w-3" }) }) }),
723
724
  /* @__PURE__ */ n(re, { side: "top", className: "text-[12px]", children: "This field is locked" })
724
725
  ] }) }) : null,
725
726
  E.length > 0 && (() => {
726
- const t = !!O && Object.keys(O).length > 0 && K.length > 0, r = E.map(
727
+ const t = !!O && Object.keys(O).length > 0 && H.length > 0, r = E.map(
727
728
  (c) => Z(String(c.parent_field))
728
729
  );
729
730
  return /* @__PURE__ */ n(ee, { delayDuration: 100, children: /* @__PURE__ */ u(te, { children: [
@@ -732,15 +733,15 @@ const wr = Et(function({
732
733
  {
733
734
  type: "button",
734
735
  "aria-label": `Show the fields that narrow ${C || "this list"}`,
735
- onClick: wt,
736
+ onClick: _t,
736
737
  className: D(
737
738
  "inline-flex items-center transition-colors",
738
739
  t ? "text-nvr-cyan hover:text-nvr-cyan" : "text-slate-300 hover:text-nvr-cyan dark:text-slate-600 dark:hover:text-nvr-cyan"
739
740
  ),
740
- children: /* @__PURE__ */ n(St, { className: "h-3 w-3" })
741
+ children: /* @__PURE__ */ n(qt, { className: "h-3 w-3" })
741
742
  }
742
743
  ) }),
743
- /* @__PURE__ */ n(re, { side: "top", className: "text-[12px]", children: t ? `Filtered by ${K.join(", ")} — click to highlight` : `Options filter by ${r.join(", ")} once set` })
744
+ /* @__PURE__ */ n(re, { side: "top", className: "text-[12px]", children: t ? `Filtered by ${H.join(", ")} — click to highlight` : `Options filter by ${r.join(", ")} once set` })
744
745
  ] }) });
745
746
  })(),
746
747
  pe && // Right-anchored: the personal-default control flush with the field's right edge
@@ -748,7 +749,7 @@ const wr = Et(function({
748
749
  // Shift+F10 still open the field menu). The slot keeps one box whatever it shows,
749
750
  // so nothing to its left moves.
750
751
  /* @__PURE__ */ n("span", { className: "ml-auto inline-flex shrink-0 items-center gap-1", children: /* @__PURE__ */ n(
751
- fn,
752
+ bn,
752
753
  {
753
754
  field: e.field,
754
755
  label: C,
@@ -756,7 +757,7 @@ const wr = Et(function({
756
757
  confirmOpen: me === "make" || me === "update" ? me : null,
757
758
  onConfirm: (t, r) => (
758
759
  // After a save the button becomes "Your default": focus goes to the field.
759
- it(t, he, r)
760
+ dt(t, he, r)
760
761
  ),
761
762
  onUndo: () => {
762
763
  R == null || R.undo(e.field), requestAnimationFrame(() => {
@@ -777,7 +778,7 @@ const wr = Et(function({
777
778
  }
778
779
  ),
779
780
  j.editor && !p && /* @__PURE__ */ n(
780
- It,
781
+ nn,
781
782
  {
782
783
  editor: j.editor,
783
784
  confirming: j.confirming,
@@ -791,7 +792,7 @@ const wr = Et(function({
791
792
  ref: ue,
792
793
  className: D(p && !V && "cursor-not-allowed"),
793
794
  "data-tip": (p || e.readonly) && M ? M : void 0,
794
- onPointerEnter: (p || e.readonly) && M ? d == null ? void 0 : d.onLockHover : void 0,
795
+ onPointerEnter: (p || e.readonly) && M ? s == null ? void 0 : s.onLockHover : void 0,
795
796
  children: /* @__PURE__ */ n(
796
797
  "div",
797
798
  {
@@ -808,10 +809,10 @@ const wr = Et(function({
808
809
  w && "nvr-shake ring-1 ring-red-400 rounded-md",
809
810
  se && "nvr-autofill-glow"
810
811
  ),
811
- children: q ? /* @__PURE__ */ n(_n, { field: e, values: i }) : xt ? /* @__PURE__ */ n(
812
- Gt,
812
+ children: q ? /* @__PURE__ */ n(Cn, { field: e, values: i }) : bt ? /* @__PURE__ */ n(
813
+ Yt,
813
814
  {
814
- collection: s,
815
+ collection: d,
815
816
  field: e,
816
817
  draft: i,
817
818
  itemId: l
@@ -821,25 +822,25 @@ const wr = Et(function({
821
822
  value: xe,
822
823
  onChange: $e,
823
824
  disabled: p,
824
- collection: s,
825
+ collection: d,
825
826
  itemId: l,
826
827
  relations: x,
827
828
  cascadeFilter: O,
828
- unsatisfiedParentLabel: bt,
829
+ unsatisfiedParentLabel: vt,
829
830
  requiredParentLabel: Ue
830
831
  }) : /* @__PURE__ */ n(
831
- nn,
832
+ on,
832
833
  {
833
- field: p && V ? gt() : e,
834
+ field: p && V ? wt() : e,
834
835
  value: xe,
835
836
  onChange: $e,
836
837
  relations: x,
837
- collection: s,
838
+ collection: d,
838
839
  itemId: l,
839
840
  cascadeFilter: O,
840
841
  requiredParentLabel: Ue,
841
- narrowedBy: K.length > 0 ? vt() : void 0,
842
- onCountChange: a ? nt : void 0
842
+ narrowedBy: H.length > 0 ? kt() : void 0,
843
+ onCountChange: o ? lt : void 0
843
844
  }
844
845
  )
845
846
  },
@@ -847,7 +848,7 @@ const wr = Et(function({
847
848
  )
848
849
  }
849
850
  ),
850
- Be && /* @__PURE__ */ n(Nn, { value: i[e.field], config: Be }),
851
+ De && /* @__PURE__ */ n(Rn, { value: i[e.field], config: De }),
851
852
  w && // The message under the field: a red border alone never said WHY (Service End before
852
853
  // Start, b01-N5). The form's summary at the top lists it too — and is
853
854
  // the ONE live announcement (army11 f3: ten role=alert regions fired at
@@ -861,25 +862,26 @@ const wr = Et(function({
861
862
  children: w
862
863
  }
863
864
  ),
864
- !w && De && // A soft (warning-only) rule the value breaks: said here, never blocks the save.
865
+ !w && Me && // A soft (warning-only) rule the value breaks: said here, never blocks the save.
865
866
  /* @__PURE__ */ n(
866
867
  "p",
867
868
  {
868
869
  "data-field-warning": e.field,
869
870
  className: "text-[11.5px] leading-snug text-amber-700 dark:text-amber-400",
870
- children: De
871
+ children: Me
871
872
  }
872
873
  ),
873
- Pe && !dt && /* @__PURE__ */ n(xn, { field: e.field, text: Pe }),
874
+ je && !ut && /* @__PURE__ */ n(gn, { field: e.field, text: je }),
875
+ Pe && /* @__PURE__ */ n(Xt, { field: e.field, hint: Pe }),
874
876
  Ee && /* @__PURE__ */ n(
875
- en,
877
+ rn,
876
878
  {
877
879
  change: Ee,
878
880
  relatedCollection: Ke ?? null,
879
- onDismiss: () => d == null ? void 0 : d.dismissRemoteChange(e.field),
880
- onTakeTheirs: d != null && d.takeRemoteChange ? () => {
881
+ onDismiss: () => s == null ? void 0 : s.dismissRemoteChange(e.field),
882
+ onTakeTheirs: s != null && s.takeRemoteChange ? () => {
881
883
  var t;
882
- return (t = d.takeRemoteChange) == null ? void 0 : t.call(d, e.field);
884
+ return (t = s.takeRemoteChange) == null ? void 0 : t.call(s, e.field);
883
885
  } : void 0
884
886
  }
885
887
  )
@@ -889,9 +891,9 @@ const wr = Et(function({
889
891
  );
890
892
  });
891
893
  export {
892
- wr as FieldRow,
893
- Pn as clearableParents,
894
- En as isAiEligible,
895
- vr as lineageSummary,
896
- jn as useFieldLineage
894
+ Fr as FieldRow,
895
+ Dn as clearableParents,
896
+ Bn as isAiEligible,
897
+ Nr as lineageSummary,
898
+ Mn as useFieldLineage
897
899
  };