@nivaro/react 0.3.66 → 0.3.68

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 (41) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +15 -1
  4. package/dist/index.js +836 -835
  5. package/dist/shared/components/ActivityEntry.js +28 -28
  6. package/dist/shared/components/CollectionBrowserView.js +584 -585
  7. package/dist/shared/components/ConformanceView.js +34 -34
  8. package/dist/shared/components/ItemEditForm.js +1758 -1758
  9. package/dist/shared/components/RecordCompare.js +149 -129
  10. package/dist/shared/components/ReportView.js +196 -196
  11. package/dist/shared/components/SlaRulesView.js +36 -36
  12. package/dist/shared/components/bulk/BulkCompareButton.js +16 -16
  13. package/dist/shared/components/chat/ChatPanel.js +484 -487
  14. package/dist/shared/components/chat/ChatViews.js +66 -66
  15. package/dist/shared/components/chat/RoomParts.js +159 -157
  16. package/dist/shared/components/help-videos/editor/StatsTab.js +48 -47
  17. package/dist/shared/components/help-videos/editor/VersionsTab.js +17 -16
  18. package/dist/shared/components/imports/CollectionImportPanel.js +72 -72
  19. package/dist/shared/components/integrations/IntegrationObligationsView.js +199 -187
  20. package/dist/shared/components/integrations/console/EventsView.js +22 -24
  21. package/dist/shared/components/integrations/console/SubmissionRow.js +6 -13
  22. package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +29 -28
  23. package/dist/shared/components/integrations/console/tone.js +22 -21
  24. package/dist/shared/components/item-edit/FieldRow.js +188 -188
  25. package/dist/shared/components/item-edit/FilePickerField.js +281 -297
  26. package/dist/shared/components/item-edit/GroupSection.js +209 -209
  27. package/dist/shared/components/item-edit/RecordInsights.js +101 -101
  28. package/dist/shared/components/item-edit/SummaryPanel.js +31 -31
  29. package/dist/shared/components/layout-editor/assist/ExplainDiff.js +12 -12
  30. package/dist/shared/components/panels/AddendumPanel.js +409 -411
  31. package/dist/shared/components/panels/BranchLanes.js +7 -7
  32. package/dist/shared/components/panels/CommentPanel.js +204 -197
  33. package/dist/shared/components/panels/PipelinePanel.js +264 -264
  34. package/dist/shared/components/panels/RecordIntegrityBanner.js +78 -78
  35. package/dist/shared/components/panels/RevisionsPanel.js +229 -229
  36. package/dist/shared/components/panels/TaskPanel.js +75 -75
  37. package/dist/shared/components/queue/QueueWorklist.js +591 -589
  38. package/dist/shared/lib/compare-value.js +73 -0
  39. package/dist/shared/lib/format-value.js +18 -17
  40. package/dist/shared/lib/utils.js +87 -80
  41. package/package.json +1 -1
@@ -1,38 +1,38 @@
1
1
  import { jsxs as u, jsx as n } from "react/jsx-runtime";
2
- import { useQueryClient as Ze, useQueries as kt, useQuery as le, useMutation as _t } from "@tanstack/react-query";
3
- import { Info as Nt, Loader2 as Ft, Sparkles as Ct, Lock as Rt, SlidersHorizontal as Lt, History as St, BellRing as $t, Bell as qt, Sigma as At } from "lucide-react";
4
- import { memo as Tt, useState as we, useRef as L, useId as Et, useEffect as ae, useCallback as ze } from "react";
2
+ import { useQueryClient as Ie, 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 Ge } from "react";
5
5
  import { toast as oe } from "sonner";
6
- import { useParentDraft as Pt, useNivaroClient as ie } from "../../context.js";
7
- import { showsAiButton as jt, AUTOFILL_CHECK_KEY as Bt, readAiFill as Dt } from "../../lib/ai-fill.js";
8
- import { get as H, del as Mt, post as ve } from "../../lib/commands.js";
9
- import { toastError as Ot } from "../../lib/error-toast.js";
10
- import { titleCase as U, cn as D } from "../../lib/utils.js";
11
- import { requiredByRules as Ge } from "../../lib/validation-rules.js";
12
- import { GlossaryLabel as Qe } from "../ai/GlossaryText.js";
13
- import { useFieldSource as Kt, FieldSourceInfo as Ut } from "../ConfigReadBack.js";
14
- import { Label as Ht } from "../ui/label.js";
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 Qe } from "../../lib/validation-rules.js";
12
+ import { GlossaryLabel as Ye } from "../ai/GlossaryText.js";
13
+ import { useFieldSource as Ht, FieldSourceInfo as Wt } from "../ConfigReadBack.js";
14
+ import { Label as Vt } 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 Wt } from "./AddendumFieldContext.js";
17
- import { AutoIdPreviewField as Vt } from "./AutoIdPreviewField.js";
18
- import { useCascadeClearNotifier as zt } from "./cascade-clear-notice.js";
19
- import { FOCUSABLE as Ye } from "./entry/entry-keys.js";
20
- import { useFieldAffordances as Gt, useFieldContextMenu as Qt, usePresenceSoftLock as Yt, LockReasonBadge as Jt, PresenceSoftLockStrip as Xt, RemoteChangeGhost as Zt } from "./FieldAffordances.js";
21
- import { FieldCommentButton as It } from "./FieldComments.js";
22
- import { FieldRenderer as en } from "./FieldRenderer.js";
23
- import { FormHelpVideoButton as tn } from "./FormHelpVideoButton.js";
24
- import { primaryControl as nn, applyFieldA11y as rn } from "./field-a11y.js";
25
- import { getCascadeFilters as ln, SYSTEM_FIELDS as an, parseJson as on, buildCascadeFilter as sn, CascadeEffectController as cn } from "./helpers.js";
26
- import { isDerivedForRecord as dn } from "./live-rollups.js";
27
- import { useM2MStaging as un } from "./M2MStagingContext.js";
28
- import { personalDefaultSlotFor as mn, PersonalDefaultSlot as pn } from "./PersonalDefaultControl.js";
29
- import { PersonalDefaultHint as hn } from "./PersonalDefaultPill.js";
30
- import { isDisplayFormulaRow as Je, usePlacementTextContext as fn, placementFieldText as xn, fieldCounterConfig as yn, fieldIsRecommended as bn, RecommendedMarker as gn, RepeatLastButton as vn, DisplayFormulaValue as wn, FieldCounter as kn } from "./placement-behaviour.js";
31
- import { keepIfEqual as _n, jsonEqual as Nn } from "./render-stability.js";
32
- import { softRuleWarning as Fn } from "./soft-rules.js";
33
- import { usePersonalDefaultsApi as Cn } from "./usePersonalDefaults.js";
34
- import { resolveOptionFilterTokens as Rn } from "../../lib/option-filter-tokens.js";
35
- const Xe = /* @__PURE__ */ new Set(["integer", "float", "decimal", "bigInteger", "number"]), Ln = /* @__PURE__ */ new Set(["string", "text", "richtext", "textarea", "markdown", "json", "csv"]), Sn = /* @__PURE__ */ new Set([
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 Je } 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 Xe, 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 Ze = /* @__PURE__ */ new Set(["integer", "float", "decimal", "bigInteger", "number"]), $n = /* @__PURE__ */ new Set(["string", "text", "richtext", "textarea", "markdown", "json", "csv"]), qn = /* @__PURE__ */ new Set([
36
36
  "input",
37
37
  "textarea",
38
38
  "wysiwyg",
@@ -40,7 +40,7 @@ const Xe = /* @__PURE__ */ new Set(["integer", "float", "decimal", "bigInteger",
40
40
  "input-rich-text-html",
41
41
  "rich_text",
42
42
  "extension-editorjs"
43
- ]), $n = /* @__PURE__ */ new Set([
43
+ ]), An = /* @__PURE__ */ new Set([
44
44
  "relation-m2o",
45
45
  "relation-m2m",
46
46
  "select-multiple-m2m",
@@ -51,15 +51,15 @@ const Xe = /* @__PURE__ */ new Set(["integer", "float", "decimal", "bigInteger",
51
51
  "file",
52
52
  "files",
53
53
  "image"
54
- ]), qn = /* @__PURE__ */ new Set(["file", "file-image", "files-m2m", "files", "image"]);
55
- function An(m) {
54
+ ]), Tn = /* @__PURE__ */ new Set(["file", "file-image", "files-m2m", "files", "image"]);
55
+ function En(m) {
56
56
  const e = m.interface ?? "";
57
- return $n.has(e) || e.startsWith("relation-") || e.endsWith("-m2o") || e.endsWith("-m2m") || Xe.has(m.type ?? "") ? !1 : !!(Ln.has(m.type ?? "") || Sn.has(e) || !e && m.type && !Xe.has(m.type));
57
+ return An.has(e) || e.startsWith("relation-") || e.endsWith("-m2o") || e.endsWith("-m2m") || Ze.has(m.type ?? "") ? !1 : !!($n.has(m.type ?? "") || qn.has(e) || !e && m.type && !Ze.has(m.type));
58
58
  }
59
- function Tn(m, e, i) {
59
+ function Pn(m, e, i) {
60
60
  return m.filter((h) => (i == null ? void 0 : i(h)) !== e);
61
61
  }
62
- function En(m, e, i, h) {
62
+ function jn(m, e, i, h) {
63
63
  const x = ie();
64
64
  return le({
65
65
  queryKey: ["field-lineage", m, e, i],
@@ -70,7 +70,7 @@ function En(m, e, i, h) {
70
70
  staleTime: 3e4
71
71
  });
72
72
  }
73
- function br(m, e = "rows") {
73
+ function vr(m, e = "rows") {
74
74
  var l, w, g;
75
75
  if (m && (m.kind === "write" || m.kind === "read") && m.formula) {
76
76
  const p = (b) => typeof b == "number" ? b.toLocaleString(void 0, { maximumFractionDigits: 2 }) : b == null || b === "" ? "0" : String(b);
@@ -91,12 +91,12 @@ function br(m, e = "rows") {
91
91
  `${h} excluded${x ? ` (${x.replace(/^does not match: /, "")})` : ""}`
92
92
  ), s.join(" · ");
93
93
  }
94
- function Pn({
94
+ function Bn({
95
95
  collection: m,
96
96
  itemId: e,
97
97
  field: i
98
98
  }) {
99
- const [h, x] = we(!1), s = L(null), { data: l, isLoading: w } = En(m, e, i, h);
99
+ const [h, x] = ke(!1), s = L(null), { data: l, isLoading: w } = jn(m, e, i, h);
100
100
  ae(() => {
101
101
  if (!h) return;
102
102
  const o = (b) => {
@@ -118,7 +118,7 @@ function Pn({
118
118
  h ? "text-nvr-cyan opacity-100" : "text-slate-400 hover:text-nvr-cyan dark:text-slate-300 dark:hover:text-nvr-cyan"
119
119
  ),
120
120
  "data-field-lineage": !0,
121
- children: /* @__PURE__ */ n(At, { className: "h-3 w-3" })
121
+ children: /* @__PURE__ */ n(Tt, { className: "h-3 w-3" })
122
122
  }
123
123
  ),
124
124
  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: [
@@ -159,7 +159,7 @@ function Pn({
159
159
  "span",
160
160
  {
161
161
  className: "w-[88px] shrink-0 truncate text-right text-[10px] text-slate-400",
162
- "data-tip": f.updated_at ? `${f.updated_by ?? "unknown"} · ${new Date(f.updated_at).toLocaleString()}` : void 0,
162
+ "data-tip": f.updated_at ? `${f.updated_by ?? "unknown"} · ${we(f.updated_at)}` : void 0,
163
163
  children: f.updated_by ?? ""
164
164
  }
165
165
  )
@@ -209,14 +209,14 @@ function Pn({
209
209
  ] })
210
210
  ] });
211
211
  }
212
- function jn({
212
+ function Dn({
213
213
  collection: m,
214
214
  itemId: e,
215
215
  field: i,
216
216
  formatValue: h,
217
217
  onRestore: x
218
218
  }) {
219
- const s = ie(), [l, w] = we(!1), g = L(null), { data: p, isLoading: o } = le({
219
+ const s = ie(), [l, w] = ke(!1), g = L(null), { data: p, isLoading: o } = le({
220
220
  queryKey: ["field-value-history", m, e, i],
221
221
  queryFn: () => s.request(H(`/field-history/${m}/${encodeURIComponent(e)}/${i}`)).then((a) => a.data ?? []),
222
222
  enabled: l,
@@ -230,7 +230,7 @@ function jn({
230
230
  };
231
231
  return window.addEventListener("mousedown", a), () => window.removeEventListener("mousedown", a);
232
232
  }, [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}T\d{2}:\d{2}/.test(a) ? new Date(a).toLocaleString() : typeof a == "object" ? JSON.stringify(a).slice(0, 60) : String(a).slice(0, 80));
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
234
  return /* @__PURE__ */ u("div", { ref: g, className: "relative inline-flex", children: [
235
235
  /* @__PURE__ */ n(
236
236
  "button",
@@ -243,7 +243,7 @@ function jn({
243
243
  l ? "text-nvr-cyan opacity-100" : "text-slate-400 hover:text-nvr-cyan dark:text-slate-300 dark:hover:text-nvr-cyan"
244
244
  ),
245
245
  "data-field-history": !0,
246
- children: /* @__PURE__ */ n(St, { className: "h-3 w-3" })
246
+ children: /* @__PURE__ */ n($t, { className: "h-3 w-3" })
247
247
  }
248
248
  ),
249
249
  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: [
@@ -269,7 +269,7 @@ function jn({
269
269
  ] }),
270
270
  /* @__PURE__ */ u("span", { className: "block text-[10.5px] text-slate-400", children: [
271
271
  a.action === "create" ? "initial value" : "changed",
272
- a.timestamp ? ` · ${new Date(a.timestamp).toLocaleString()}` : "",
272
+ a.timestamp ? ` · ${we(a.timestamp)}` : "",
273
273
  a.user_name ? ` · ${a.user_name}` : "",
274
274
  a.origin && a.origin.kind !== "user" && /* @__PURE__ */ n(
275
275
  "span",
@@ -291,12 +291,12 @@ function jn({
291
291
  ] })
292
292
  ] });
293
293
  }
294
- function Bn({
294
+ function Mn({
295
295
  collection: m,
296
296
  itemId: e,
297
297
  field: i
298
298
  }) {
299
- const h = ie(), x = Ze(), { data: s } = le({
299
+ const h = ie(), x = Ie(), { data: s } = le({
300
300
  queryKey: ["field-watch-config"],
301
301
  queryFn: () => h.request(H("/field-watches/config")).then((o) => o.data).catch(() => ({ enabled: !1 })),
302
302
  staleTime: 5 * 6e4
@@ -305,9 +305,9 @@ function Bn({
305
305
  queryFn: () => h.request(H("/field-watches/self", { collection: m, item_id: e })).then((o) => o.data ?? []).catch(() => []),
306
306
  enabled: !!(s != null && s.enabled),
307
307
  staleTime: 6e4
308
- }), g = w.includes(i), p = _t({
308
+ }), g = w.includes(i), p = Nt({
309
309
  mutationFn: () => g ? h.request(
310
- Mt(
310
+ Ot(
311
311
  `/field-watches/self?collection=${encodeURIComponent(m)}&field=${encodeURIComponent(i)}&item_id=${encodeURIComponent(e)}`
312
312
  )
313
313
  ) : h.request(ve("/field-watches/self", { collection: m, field: i, item_id: e })),
@@ -326,11 +326,11 @@ function Bn({
326
326
  title: g ? "Stop watching this field on this record" : "Watch this field on this record",
327
327
  "data-field-watch": i,
328
328
  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($t, { className: "h-3 w-3" }) : /* @__PURE__ */ n(qt, { className: "h-3 w-3" })
329
+ children: g ? /* @__PURE__ */ n(qt, { className: "h-3 w-3" }) : /* @__PURE__ */ n(At, { className: "h-3 w-3" })
330
330
  }
331
331
  ) : null;
332
332
  }
333
- const gr = Tt(function({
333
+ const wr = Et(function({
334
334
  field: e,
335
335
  draft: i,
336
336
  onChange: h,
@@ -345,65 +345,65 @@ const gr = Tt(function({
345
345
  onCountChange: a,
346
346
  swapButton: f,
347
347
  swapContent: W,
348
- forceVisible: Ie,
348
+ forceVisible: et,
349
349
  autoFillTick: se
350
350
  }) {
351
- var Ke, Ue, He, We;
352
- const V = qn.has(e.interface ?? ""), N = Pt(), y = un(), ke = Ze(), ce = ie(), [_e, z] = we(!1), c = Gt(), de = zt(), Ne = Kt(e.field), G = L(null), P = Et(), ue = L(null), Fe = L(!1), Ce = L({
351
+ var Ue, He, We, Ve;
352
+ const V = Tn.has(e.interface ?? ""), N = jt(), y = pn(), _e = Ie(), 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({
353
353
  required: !1,
354
354
  hasError: !1
355
355
  });
356
356
  ae(() => {
357
- const t = Fe.current ? nn(ue.current) : null;
358
- if (!t || (rn(t, { ...Ce.current, errorId: `${P}-error` }), t.hasAttribute("aria-label"))) return;
357
+ const t = Ce.current ? ln(ue.current) : null;
358
+ if (!t || (an(t, { ...Re.current, errorId: `${P}-error` }), t.hasAttribute("aria-label"))) return;
359
359
  t.id || (t.id = `${P}-control`);
360
360
  const r = t.tagName === "BUTTON" ? `${P} ${t.id}` : P;
361
361
  t.getAttribute("aria-labelledby") !== r && t.setAttribute("aria-labelledby", r);
362
362
  });
363
- const Re = p && !V, Le = L(null);
363
+ const Le = p && !V, Se = L(null);
364
364
  ae(() => {
365
- const t = Le.current;
365
+ const t = Se.current;
366
366
  if (!t) return;
367
- if (!Re) {
367
+ if (!Le) {
368
368
  t.removeAttribute("inert");
369
369
  return;
370
370
  }
371
371
  const r = typeof document < "u" ? document.activeElement : null;
372
372
  r instanceof HTMLElement && t.contains(r) && r.blur(), t.setAttribute("inert", "");
373
- }, [Re, se]);
374
- const Q = e.field, Se = ze(
373
+ }, [Le, se]);
374
+ const Q = e.field, $e = Ge(
375
375
  (t) => {
376
376
  p || h(Q, t);
377
377
  },
378
378
  [p, h, Q]
379
- ), et = ze(
379
+ ), tt = Ge(
380
380
  (t) => a == null ? void 0 : a(Q, t),
381
381
  [a, Q]
382
- ), tt = L(void 0), $e = L(void 0), qe = L(void 0), Ae = !p && !e.readonly && !e.computed_formula && !(e.hidden && !e.layout_assigned) && !Je(e), {
383
- onContextMenu: nt,
384
- onKeyDown: rt,
385
- menu: lt,
386
- confirmSaveFrom: at,
382
+ ), nt = L(void 0), qe = L(void 0), Ae = L(void 0), Te = !p && !e.readonly && !e.computed_formula && !(e.hidden && !e.layout_assigned) && !Xe(e), {
383
+ onContextMenu: rt,
384
+ onKeyDown: lt,
385
+ menu: at,
386
+ confirmSaveFrom: ot,
387
387
  openedBy: me
388
- } = Qt({
388
+ } = Jt({
389
389
  wrapperRef: G,
390
390
  field: e,
391
391
  value: i[e.field],
392
392
  relations: x,
393
393
  collection: s,
394
394
  itemId: l,
395
- openRelated: c == null ? void 0 : c.openRelated,
396
- editable: Ae
397
- }), j = Yt(G), ot = fn(), Te = c == null ? void 0 : c.remoteChanges[e.field], M = c == null ? void 0 : c.lockReasons[e.field], T = c == null ? void 0 : c.applyToLines[e.field], R = Cn(), it = (R == null ? void 0 : R.applied(e.field)) ?? !1, Ee = (R == null ? void 0 : R.hintFor(e.field)) ?? null, pe = mn(R, e.field, Ae), he = () => {
395
+ openRelated: d == null ? void 0 : d.openRelated,
396
+ editable: Te
397
+ }), j = Xt(G), it = 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(), st = (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
398
  var t, r;
399
- return ((t = ue.current) == null ? void 0 : t.querySelector(Ye)) ?? ((r = G.current) == null ? void 0 : r.querySelector(Ye));
400
- }, Y = jt(e._overrides, o, An(e)), fe = !!(c != null && c.fromAutofill) && !!e._overrides && e._overrides[Bt] === !0;
401
- async function st() {
399
+ return ((t = ue.current) == null ? void 0 : t.querySelector(Je)) ?? ((r = G.current) == null ? void 0 : r.querySelector(Je));
400
+ }, Y = Bt(e._overrides, o, En(e)), fe = !!(d != null && d.fromAutofill) && !!e._overrides && e._overrides[Dt] === !0;
401
+ async function dt() {
402
402
  var t;
403
403
  if (Y.perField) return ct();
404
404
  z(!0);
405
405
  try {
406
- const r = await ce.request(
406
+ const r = await de.request(
407
407
  ve("/ai/generate", {
408
408
  collection: s,
409
409
  item_id: l !== "new" ? l : void 0,
@@ -417,41 +417,41 @@ const gr = Tt(function({
417
417
  }
418
418
  }
419
419
  async function ct() {
420
- var r, d, k, S;
420
+ var r, c, k, S;
421
421
  const t = {};
422
- for (const _ of ((r = Dt(e._overrides)) == null ? void 0 : r.tokens) ?? []) _ in i && (t[_] = i[_]);
422
+ for (const _ of ((r = Mt(e._overrides)) == null ? void 0 : r.tokens) ?? []) _ in i && (t[_] = i[_]);
423
423
  z(!0);
424
424
  try {
425
- const _ = await ce.request(
425
+ const _ = await de.request(
426
426
  ve("/ai/field-fill", {
427
427
  collection: s,
428
- layout_id: (c == null ? void 0 : c.layoutId) ?? null,
428
+ layout_id: (d == null ? void 0 : d.layoutId) ?? null,
429
429
  field: e.field,
430
430
  item_id: l && l !== "new" ? l : null,
431
431
  values: t
432
432
  })
433
- ), F = (d = _.data) == null ? void 0 : d.value;
433
+ ), F = (c = _.data) == null ? void 0 : c.value;
434
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
435
  } catch (_) {
436
- Ot(_, "AI fill failed", { action: "Fill with AI" });
436
+ Kt(_, "AI fill failed", { action: "Fill with AI" });
437
437
  } finally {
438
438
  z(!1);
439
439
  }
440
440
  }
441
- const E = ln(e.dependency_config), Pe = E.flatMap((t) => {
441
+ const E = on(e.dependency_config), je = E.flatMap((t) => {
442
442
  const r = x.find(
443
443
  (k) => k.one_collection === s && k.one_field === t.parent_field
444
444
  );
445
445
  if (!r) return [];
446
446
  if (r.junction_field) return [{ rule: t, rel: r }];
447
- const d = x.find(
447
+ const c = x.find(
448
448
  (k) => k.many_collection === r.many_collection && k.id !== r.id
449
449
  );
450
- return d != null && d.many_field ? [{ rule: t, rel: { ...r, junction_field: d.many_field } }] : [];
451
- }), dt = kt({
452
- queries: Pe.map(({ rel: t }) => ({
450
+ return c != null && c.many_field ? [{ rule: t, rel: { ...r, junction_field: c.many_field } }] : [];
451
+ }), ut = _t({
452
+ queries: je.map(({ rel: t }) => ({
453
453
  queryKey: ["m2m-items", t.many_collection, t.many_field, l],
454
- queryFn: () => ce.request(
454
+ queryFn: () => de.request(
455
455
  H(`/items/${t.many_collection}`, {
456
456
  filter: JSON.stringify({ [t.many_field]: { _eq: l } }),
457
457
  limit: 200,
@@ -461,44 +461,44 @@ const gr = Tt(function({
461
461
  enabled: !!l && l !== "new",
462
462
  staleTime: 3e4
463
463
  }))
464
- }), ut = Object.fromEntries(
465
- Pe.map(({ rule: t, rel: r }, d) => {
464
+ }), mt = Object.fromEntries(
465
+ je.map(({ rule: t, rel: r }, c) => {
466
466
  var _;
467
467
  const k = r.one_field ?? `${r.many_collection}.${r.junction_field}`, S = (y == null ? void 0 : y.getStagedUnlinks(k)) ?? /* @__PURE__ */ new Set();
468
468
  return [
469
469
  t.parent_field,
470
- (((_ = dt[d]) == null ? void 0 : _.data) ?? []).filter((F) => !S.has(F.id)).map((F) => F[r.junction_field])
470
+ (((_ = ut[c]) == null ? void 0 : _.data) ?? []).filter((F) => !S.has(F.id)).map((F) => F[r.junction_field])
471
471
  ];
472
472
  })
473
- ), J = Wt()[e.field] ?? [];
474
- if (!Ie && (!g || !e.layout_assigned && (e.hidden || an.has(e.field))))
473
+ ), J = zt()[e.field] ?? [];
474
+ if (!et && (!g || !e.layout_assigned && (e.hidden || sn.has(e.field))))
475
475
  return null;
476
- const xe = i[e.field] ?? null, X = xn(e, ot), C = X.label ?? U(e.field);
477
- Fe.current = C !== "", Ce.current = {
478
- required: !!(e.required || Ge(e.validation_rules, i)),
476
+ const xe = i[e.field] ?? null, X = bn(e, it), C = X.label ?? U(e.field);
477
+ Ce.current = C !== "", Re.current = {
478
+ required: !!(e.required || Qe(e.validation_rules, i)),
479
479
  hasError: !!w
480
480
  };
481
- const q = Je(e), je = q ? null : yn(e), Be = q || !(l === "new" || !l || (Ke = N == null ? void 0 : N.dirtyFields) != null && Ke.has(e.field)) ? null : Fn(e, i), mt = !q && !p && !e.readonly && ((Ue = e._overrides) == null ? void 0 : Ue.repeat_last) === !0, pt = dn(e, i), ht = (We = (He = on(e.options)) == null ? void 0 : He.auto_id) == null ? void 0 : We.pattern, v = (() => {
481
+ const q = Xe(e), Be = q ? null : gn(e), De = q || !(l === "new" || !l || (Ue = N == null ? void 0 : N.dirtyFields) != null && Ue.has(e.field)) ? null : Rn(e, i), pt = !q && !p && !e.readonly && ((He = e._overrides) == null ? void 0 : He.repeat_last) === !0, ht = mn(e, i), ft = (Ve = (We = dn(e.options)) == null ? void 0 : We.auto_id) == null ? void 0 : Ve.pattern, v = (() => {
482
482
  const t = x.find(
483
- (d) => d.one_collection === s && d.one_field === e.field
483
+ (c) => c.one_collection === s && c.one_field === e.field
484
484
  );
485
485
  if (!t) return null;
486
486
  if (t.junction_field) return t;
487
487
  const r = x.find(
488
- (d) => d.many_collection === t.many_collection && d.id !== t.id
488
+ (c) => c.many_collection === t.many_collection && c.id !== t.id
489
489
  );
490
490
  return r ? { ...t, junction_field: r.many_field } : null;
491
491
  })(), ye = v ? null : x.find((t) => t.many_collection === s && t.many_field === e.field) ?? null, be = v ? x.find(
492
492
  (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, De = B ? (y == null ? void 0 : y.getStagedLinks(B)) ?? [] : [], ft = v ? (ke.getQueryData([
493
+ ) ?? null : null, B = v ? v.one_field ?? `${v.many_collection}.${v.junction_field}` : null, Me = B ? (y == null ? void 0 : y.getStagedLinks(B)) ?? [] : [], xt = v ? (_e.getQueryData([
494
494
  "m2m-items",
495
495
  v.many_collection,
496
496
  v.many_field,
497
497
  l
498
- ]) ?? []).map((t) => t[v.junction_field]) : [], Me = v ? De[0] ?? ft[0] ?? null : xe, xt = (be == null ? void 0 : be.one_collection) ?? (ye == null ? void 0 : ye.one_collection) ?? void 0, Z = (t) => {
498
+ ]) ?? []).map((t) => t[v.junction_field]) : [], Oe = v ? Me[0] ?? xt[0] ?? null : xe, yt = (be == null ? void 0 : be.one_collection) ?? (ye == null ? void 0 : ye.one_collection) ?? void 0, Z = (t) => {
499
499
  var r;
500
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 = sn({
501
+ }, A = cn({
502
502
  rules: E,
503
503
  // A parent whose value THIS field's own pick derived must not narrow this
504
504
  // field's options — otherwise picking a region locks the region picker
@@ -512,36 +512,36 @@ const gr = Tt(function({
512
512
  if (i[t] != null) return i[t];
513
513
  const r = x.find(($) => $.one_collection === s && $.one_field === t);
514
514
  if (!r) return null;
515
- let d = r;
516
- if (!d.junction_field) {
515
+ let c = r;
516
+ if (!c.junction_field) {
517
517
  const $ = x.find(
518
- (Ve) => Ve.many_collection === r.many_collection && Ve.id !== r.id
518
+ (ze) => ze.many_collection === r.many_collection && ze.id !== r.id
519
519
  );
520
- if ($ != null && $.many_field) d = { ...r, junction_field: $.many_field };
520
+ if ($ != null && $.many_field) c = { ...r, junction_field: $.many_field };
521
521
  else return null;
522
522
  }
523
- const k = d.one_field ?? `${d.many_collection}.${d.junction_field}`, S = (y == null ? void 0 : y.getStagedLinks(k)) ?? [], _ = ut[t] ?? [], F = [...new Set([...S, ..._].map(($) => String($)))];
523
+ const k = c.one_field ?? `${c.many_collection}.${c.junction_field}`, S = (y == null ? void 0 : y.getStagedLinks(k)) ?? [], _ = mt[t] ?? [], F = [...new Set([...S, ..._].map(($) => String($)))];
524
524
  return F.length === 0 ? null : F.length === 1 ? F[0] : F;
525
525
  },
526
526
  parentOptionFilter: (t) => {
527
- var d;
528
- const r = (N == null ? void 0 : N.collection) === s ? (d = N.fieldOptionFilters) == null ? void 0 : d[t] : void 0;
529
- return r ? Rn(r, i, l) : void 0;
527
+ 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;
530
530
  }
531
- }), O = A.filter ? _n(tt, A.filter, Nn) : A.filter, K = A.satisfiedParents.map(Z), I = A.satisfiedParents, yt = A.unsatisfiedParents.length ? Z(A.unsatisfiedParents[0]) : null, ge = A.missingRequiredParents, Oe = ge.length ? Z(ge[0]) : null;
532
- function bt() {
533
- const t = qe.current;
531
+ }), O = A.filter ? Fn(nt, 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, Ke = ge.length ? Z(ge[0]) : null;
532
+ function gt() {
533
+ const t = Ae.current;
534
534
  if (t && t.src === e) return t.value;
535
535
  const r = { ...e, readonly: !0 };
536
- return qe.current = { src: e, value: r }, r;
536
+ return Ae.current = { src: e, value: r }, r;
537
537
  }
538
- function gt() {
539
- const t = Tn(
538
+ function vt() {
539
+ const t = Pn(
540
540
  I,
541
541
  e.field,
542
542
  y == null ? void 0 : y.getDerivedOrigin
543
- ), r = JSON.stringify([K, I, t]), d = $e.current;
544
- if (d && d.sig === r && d.onChange === h) return d.value;
543
+ ), r = JSON.stringify([K, I, t]), c = qe.current;
544
+ if (c && c.sig === r && c.onChange === h) return c.value;
545
545
  const k = {
546
546
  labels: K,
547
547
  keys: I,
@@ -550,9 +550,9 @@ const gr = Tt(function({
550
550
  t.includes(S) && h(S, null);
551
551
  } : void 0
552
552
  };
553
- return $e.current = { sig: r, onChange: h, value: k }, k;
553
+ return qe.current = { sig: r, onChange: h, value: k }, k;
554
554
  }
555
- function vt() {
555
+ function wt() {
556
556
  for (const t of I) {
557
557
  const r = document.querySelector(`[data-field="${t}"]`);
558
558
  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,21 +562,21 @@ const gr = Tt(function({
562
562
  }, 900));
563
563
  }
564
564
  }
565
- const wt = () => {
566
- const t = v && B ? Me : i[e.field];
567
- if (t != null && t !== "" && !(Array.isArray(t) && !t.length) && (de == null || de({
565
+ const kt = () => {
566
+ const t = v && B ? Oe : i[e.field];
567
+ if (t != null && t !== "" && !(Array.isArray(t) && !t.length) && (ce == null || ce({
568
568
  field: e.field,
569
569
  label: C || U(e.field),
570
570
  parents: E.map((r) => r.parent_field).filter(Boolean)
571
571
  })), v && B) {
572
- for (const d of De) y == null || y.unstageLink(B, d);
573
- const r = ke.getQueryData([
572
+ for (const c of Me) y == null || y.unstageLink(B, c);
573
+ const r = _e.getQueryData([
574
574
  "m2m-items",
575
575
  v.many_collection,
576
576
  v.many_field,
577
577
  l
578
578
  ]) ?? [];
579
- for (const d of r) y == null || y.stageUnlink(B, d.id);
579
+ for (const c of r) y == null || y.stageUnlink(B, c.id);
580
580
  } else
581
581
  h(e.field, null);
582
582
  };
@@ -594,20 +594,20 @@ const gr = Tt(function({
594
594
  "group/fieldrow space-y-1.5",
595
595
  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
596
  ),
597
- onContextMenu: nt,
598
- onKeyDown: rt,
597
+ onContextMenu: rt,
598
+ onKeyDown: lt,
599
599
  onFocusCapture: j.onFocusCapture,
600
600
  children: [
601
- lt,
601
+ at,
602
602
  E.length > 0 && /* @__PURE__ */ n(
603
- cn,
603
+ un,
604
604
  {
605
605
  cascadeRules: E,
606
606
  cascadeFilter: O,
607
- currentValue: Me,
608
- relatedCollection: xt,
607
+ currentValue: Oe,
608
+ relatedCollection: yt,
609
609
  missingRequiredParents: ge,
610
- onClear: wt
610
+ onClear: kt
611
611
  }
612
612
  ),
613
613
  (C !== "" || J.length > 0) && /* @__PURE__ */ u(
@@ -616,18 +616,18 @@ const gr = Tt(function({
616
616
  className: "flex flex-wrap items-center gap-1.5 min-h-[1.5rem]",
617
617
  "data-pd-row": pe ? "" : void 0,
618
618
  children: [
619
- C !== "" && /* @__PURE__ */ u(Ht, { id: P, "data-field-label": !0, className: "text-sm font-medium", children: [
620
- /* @__PURE__ */ n(Qe, { text: C, collection: s }),
621
- (e.required || Ge(e.validation_rules, i)) && /* @__PURE__ */ n("span", { className: "ml-0.5 text-destructive", children: "*" }),
622
- bn(e) && /* @__PURE__ */ n(gn, {})
619
+ C !== "" && /* @__PURE__ */ u(Vt, { id: P, "data-field-label": !0, className: "text-sm font-medium", children: [
620
+ /* @__PURE__ */ n(Ye, { text: C, collection: s }),
621
+ (e.required || Qe(e.validation_rules, i)) && /* @__PURE__ */ n("span", { className: "ml-0.5 text-destructive", children: "*" }),
622
+ vn(e) && /* @__PURE__ */ n(wn, {})
623
623
  ] }),
624
624
  X.note && /* @__PURE__ */ n(ee, { delayDuration: 100, children: /* @__PURE__ */ u(te, { children: [
625
- /* @__PURE__ */ n(ne, { asChild: !0, children: /* @__PURE__ */ n(Nt, { 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: (c == null ? void 0 : c.glossaryHelp) === !1 ? X.note : /* @__PURE__ */ n(Qe, { text: X.note, collection: s }) })
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(Ye, { text: X.note, collection: s }) })
627
627
  ] }) }),
628
- Ne && /* @__PURE__ */ n(Ut, { source: Ne, label: C }),
628
+ Fe && /* @__PURE__ */ n(Wt, { source: Fe, label: C }),
629
629
  !q && l && l !== "new" && /* @__PURE__ */ n(
630
- jn,
630
+ Dn,
631
631
  {
632
632
  collection: s,
633
633
  itemId: l,
@@ -635,11 +635,11 @@ const gr = Tt(function({
635
635
  onRestore: e.readonly ? void 0 : (t) => h(e.field, t)
636
636
  }
637
637
  ),
638
- !q && l && l !== "new" && /* @__PURE__ */ n(Bn, { collection: s, itemId: l, field: e.field }),
639
- !q && l && l !== "new" && /* @__PURE__ */ n(It, { field: e.field, label: C || U(e.field) }),
640
- l && l !== "new" && pt && /* @__PURE__ */ n(Pn, { collection: s, itemId: l, field: e.field }),
641
- mt && /* @__PURE__ */ n(
642
- vn,
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" && ht && /* @__PURE__ */ n(Bn, { collection: s, itemId: l, field: e.field }),
641
+ pt && /* @__PURE__ */ n(
642
+ kn,
643
643
  {
644
644
  collection: s,
645
645
  itemId: l,
@@ -652,13 +652,13 @@ const gr = Tt(function({
652
652
  "button",
653
653
  {
654
654
  type: "button",
655
- onClick: st,
656
- disabled: _e,
655
+ onClick: dt,
656
+ disabled: Ne,
657
657
  "data-ai-fill": Y.perField ? e.field : void 0,
658
658
  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
659
  title: "Generate with AI",
660
660
  children: [
661
- _e ? /* @__PURE__ */ n(Ft, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ n(Ct, { className: "h-3 w-3" }),
661
+ Ne ? /* @__PURE__ */ n(Ct, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-3 w-3" }),
662
662
  "AI"
663
663
  ]
664
664
  }
@@ -710,7 +710,7 @@ const gr = Tt(function({
710
710
  ] })
711
711
  ] }) }),
712
712
  /* @__PURE__ */ n(
713
- tn,
713
+ rn,
714
714
  {
715
715
  collection: s,
716
716
  kind: "field",
@@ -718,13 +718,13 @@ const gr = Tt(function({
718
718
  label: C
719
719
  }
720
720
  ),
721
- (p || e.readonly) && M ? /* @__PURE__ */ n(Jt, { reason: M, onHover: c == null ? void 0 : c.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(Rt, { className: "h-3 w-3" }) }) }),
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" }) }) }),
723
723
  /* @__PURE__ */ n(re, { side: "top", className: "text-[12px]", children: "This field is locked" })
724
724
  ] }) }) : null,
725
725
  E.length > 0 && (() => {
726
726
  const t = !!O && Object.keys(O).length > 0 && K.length > 0, r = E.map(
727
- (d) => Z(String(d.parent_field))
727
+ (c) => Z(String(c.parent_field))
728
728
  );
729
729
  return /* @__PURE__ */ n(ee, { delayDuration: 100, children: /* @__PURE__ */ u(te, { children: [
730
730
  /* @__PURE__ */ n(ne, { asChild: !0, children: /* @__PURE__ */ n(
@@ -732,12 +732,12 @@ const gr = Tt(function({
732
732
  {
733
733
  type: "button",
734
734
  "aria-label": `Show the fields that narrow ${C || "this list"}`,
735
- onClick: vt,
735
+ onClick: wt,
736
736
  className: D(
737
737
  "inline-flex items-center transition-colors",
738
738
  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
739
  ),
740
- children: /* @__PURE__ */ n(Lt, { className: "h-3 w-3" })
740
+ children: /* @__PURE__ */ n(St, { className: "h-3 w-3" })
741
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` })
@@ -748,7 +748,7 @@ const gr = Tt(function({
748
748
  // Shift+F10 still open the field menu). The slot keeps one box whatever it shows,
749
749
  // so nothing to its left moves.
750
750
  /* @__PURE__ */ n("span", { className: "ml-auto inline-flex shrink-0 items-center gap-1", children: /* @__PURE__ */ n(
751
- pn,
751
+ fn,
752
752
  {
753
753
  field: e.field,
754
754
  label: C,
@@ -756,7 +756,7 @@ const gr = Tt(function({
756
756
  confirmOpen: me === "make" || me === "update" ? me : null,
757
757
  onConfirm: (t, r) => (
758
758
  // After a save the button becomes "Your default": focus goes to the field.
759
- at(t, he, r)
759
+ ot(t, he, r)
760
760
  ),
761
761
  onUndo: () => {
762
762
  R == null || R.undo(e.field), requestAnimationFrame(() => {
@@ -777,7 +777,7 @@ const gr = Tt(function({
777
777
  }
778
778
  ),
779
779
  j.editor && !p && /* @__PURE__ */ n(
780
- Xt,
780
+ It,
781
781
  {
782
782
  editor: j.editor,
783
783
  confirming: j.confirming,
@@ -791,11 +791,11 @@ const gr = Tt(function({
791
791
  ref: ue,
792
792
  className: D(p && !V && "cursor-not-allowed"),
793
793
  "data-tip": (p || e.readonly) && M ? M : void 0,
794
- onPointerEnter: (p || e.readonly) && M ? c == null ? void 0 : c.onLockHover : void 0,
794
+ onPointerEnter: (p || e.readonly) && M ? d == null ? void 0 : d.onLockHover : void 0,
795
795
  children: /* @__PURE__ */ n(
796
796
  "div",
797
797
  {
798
- ref: Le,
798
+ ref: Se,
799
799
  className: D(
800
800
  // A locked FILE field stays interactive: its chips keep the
801
801
  // download link and preview click (the component itself hides
@@ -808,8 +808,8 @@ const gr = Tt(function({
808
808
  w && "nvr-shake ring-1 ring-red-400 rounded-md",
809
809
  se && "nvr-autofill-glow"
810
810
  ),
811
- children: q ? /* @__PURE__ */ n(wn, { field: e, values: i }) : ht ? /* @__PURE__ */ n(
812
- Vt,
811
+ children: q ? /* @__PURE__ */ n(_n, { field: e, values: i }) : ft ? /* @__PURE__ */ n(
812
+ Gt,
813
813
  {
814
814
  collection: s,
815
815
  field: e,
@@ -819,27 +819,27 @@ const gr = Tt(function({
819
819
  ) : b ? b({
820
820
  field: e,
821
821
  value: xe,
822
- onChange: Se,
822
+ onChange: $e,
823
823
  disabled: p,
824
824
  collection: s,
825
825
  itemId: l,
826
826
  relations: x,
827
827
  cascadeFilter: O,
828
- unsatisfiedParentLabel: yt,
829
- requiredParentLabel: Oe
828
+ unsatisfiedParentLabel: bt,
829
+ requiredParentLabel: Ke
830
830
  }) : /* @__PURE__ */ n(
831
- en,
831
+ nn,
832
832
  {
833
- field: p && V ? bt() : e,
833
+ field: p && V ? gt() : e,
834
834
  value: xe,
835
- onChange: Se,
835
+ onChange: $e,
836
836
  relations: x,
837
837
  collection: s,
838
838
  itemId: l,
839
839
  cascadeFilter: O,
840
- requiredParentLabel: Oe,
841
- narrowedBy: K.length > 0 ? gt() : void 0,
842
- onCountChange: a ? et : void 0
840
+ requiredParentLabel: Ke,
841
+ narrowedBy: K.length > 0 ? vt() : void 0,
842
+ onCountChange: a ? tt : void 0
843
843
  }
844
844
  )
845
845
  },
@@ -847,7 +847,7 @@ const gr = Tt(function({
847
847
  )
848
848
  }
849
849
  ),
850
- je && /* @__PURE__ */ n(kn, { value: i[e.field], config: je }),
850
+ Be && /* @__PURE__ */ n(Nn, { value: i[e.field], config: Be }),
851
851
  w && // The message under the field: a red border alone never said WHY (Service End before
852
852
  // Start, b01-N5). The form's summary at the top lists it too — and is
853
853
  // the ONE live announcement (army11 f3: ten role=alert regions fired at
@@ -861,24 +861,24 @@ const gr = Tt(function({
861
861
  children: w
862
862
  }
863
863
  ),
864
- !w && Be && // A soft (warning-only) rule the value breaks: said here, never blocks the save.
864
+ !w && De && // A soft (warning-only) rule the value breaks: said here, never blocks the save.
865
865
  /* @__PURE__ */ n(
866
866
  "p",
867
867
  {
868
868
  "data-field-warning": e.field,
869
869
  className: "text-[11.5px] leading-snug text-amber-700 dark:text-amber-400",
870
- children: Be
870
+ children: De
871
871
  }
872
872
  ),
873
- Ee && !it && /* @__PURE__ */ n(hn, { field: e.field, text: Ee }),
874
- Te && /* @__PURE__ */ n(
875
- Zt,
873
+ Pe && !st && /* @__PURE__ */ n(xn, { field: e.field, text: Pe }),
874
+ Ee && /* @__PURE__ */ n(
875
+ en,
876
876
  {
877
- change: Te,
878
- onDismiss: () => c == null ? void 0 : c.dismissRemoteChange(e.field),
879
- onTakeTheirs: c != null && c.takeRemoteChange ? () => {
877
+ change: Ee,
878
+ onDismiss: () => d == null ? void 0 : d.dismissRemoteChange(e.field),
879
+ onTakeTheirs: d != null && d.takeRemoteChange ? () => {
880
880
  var t;
881
- return (t = c.takeRemoteChange) == null ? void 0 : t.call(c, e.field);
881
+ return (t = d.takeRemoteChange) == null ? void 0 : t.call(d, e.field);
882
882
  } : void 0
883
883
  }
884
884
  )
@@ -888,9 +888,9 @@ const gr = Tt(function({
888
888
  );
889
889
  });
890
890
  export {
891
- gr as FieldRow,
892
- Tn as clearableParents,
893
- An as isAiEligible,
894
- br as lineageSummary,
895
- En as useFieldLineage
891
+ wr as FieldRow,
892
+ Pn as clearableParents,
893
+ En as isAiEligible,
894
+ vr as lineageSummary,
895
+ jn as useFieldLineage
896
896
  };