@nivaro/react 0.3.40 → 0.3.42

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 (99) hide show
  1. package/dist/components/LayoutForm.js +100 -98
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +645 -16
  5. package/dist/index.js +814 -775
  6. package/dist/shared/components/ActivityEntry.js +154 -0
  7. package/dist/shared/components/AudienceConfirmPanel.js +98 -0
  8. package/dist/shared/components/BackgroundRunOffer.js +43 -31
  9. package/dist/shared/components/BroadcastView.js +225 -204
  10. package/dist/shared/components/CollectionBrowserView.js +3924 -3584
  11. package/dist/shared/components/ConfigHistory.js +153 -0
  12. package/dist/shared/components/ConfigReadBack.js +65 -0
  13. package/dist/shared/components/DataTable.js +379 -346
  14. package/dist/shared/components/ForceReloadBanner.js +47 -40
  15. package/dist/shared/components/IdleReloadWatcher.js +69 -0
  16. package/dist/shared/components/ItemEditForm.js +4041 -3853
  17. package/dist/shared/components/MyWorkView.js +278 -213
  18. package/dist/shared/components/NotificationBell.js +130 -121
  19. package/dist/shared/components/PickerExcludedRows.js +3 -3
  20. package/dist/shared/components/ProfileView.js +776 -1003
  21. package/dist/shared/components/RecentRecordsRail.js +34 -16
  22. package/dist/shared/components/RecordReadView.js +500 -477
  23. package/dist/shared/components/Skeletons.js +199 -0
  24. package/dist/shared/components/SlowNotice.js +63 -0
  25. package/dist/shared/components/Term.js +23 -0
  26. package/dist/shared/components/WidgetSlot.js +350 -353
  27. package/dist/shared/components/access/PermissionSummary.js +106 -0
  28. package/dist/shared/components/bulk/BulkActionButtons.js +76 -73
  29. package/dist/shared/components/chat/ChatPanel.js +902 -886
  30. package/dist/shared/components/chat/MemberPaging.js +70 -0
  31. package/dist/shared/components/chat/RoomParts.js +147 -117
  32. package/dist/shared/components/chat/ScreenClip.js +73 -69
  33. package/dist/shared/components/chat/chat-core.js +449 -396
  34. package/dist/shared/components/chat/huddle/huddle-store.js +48 -43
  35. package/dist/shared/components/help-videos/api.js +2 -5
  36. package/dist/shared/components/help-videos/viewer/HelpVideoMatchChip.js +79 -0
  37. package/dist/shared/components/help-videos/viewer/matchChip.js +50 -0
  38. package/dist/shared/components/imports/CollectionImportPanel.js +139 -133
  39. package/dist/shared/components/imports/RunDetailSheet.js +222 -227
  40. package/dist/shared/components/integrations/console/ErrorExplanation.js +121 -0
  41. package/dist/shared/components/integrations/console/PartnerDetail.js +175 -174
  42. package/dist/shared/components/integrations/console/SubmissionRow.js +36 -34
  43. package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +50 -48
  44. package/dist/shared/components/item-edit/FieldComments.js +212 -0
  45. package/dist/shared/components/item-edit/FieldRow.js +340 -336
  46. package/dist/shared/components/item-edit/RecordGrantTools.js +28 -28
  47. package/dist/shared/components/item-edit/RecordHeaderActions.js +23 -22
  48. package/dist/shared/components/item-edit/RelationCombobox.js +231 -222
  49. package/dist/shared/components/item-edit/RuleHiddenNotes.js +55 -0
  50. package/dist/shared/components/item-edit/field-comments-context.js +6 -0
  51. package/dist/shared/components/item-edit/field-sources.js +33 -0
  52. package/dist/shared/components/item-edit/rule-hidden.js +30 -0
  53. package/dist/shared/components/layout-editor/HistoryPanel.js +113 -96
  54. package/dist/shared/components/layout-editor/editors/cascade-filters.js +170 -145
  55. package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +22 -18
  56. package/dist/shared/components/layout-editor/inspector/GroupInspector.js +177 -159
  57. package/dist/shared/components/layout-editor/inspector/PickerTab.js +35 -34
  58. package/dist/shared/components/layout-editor/inspector/RulesTab.js +124 -111
  59. package/dist/shared/components/layout-editor/inspector/kit.js +292 -277
  60. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  61. package/dist/shared/components/layout-editor/settings/settings-registry.js +1 -1
  62. package/dist/shared/components/list/CopyListLinkButton.js +41 -0
  63. package/dist/shared/components/list/InlineEdit.js +363 -0
  64. package/dist/shared/components/notifications/NotificationCenterView.js +213 -181
  65. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -82
  66. package/dist/shared/components/notifications/NotificationRulesEditor.js +515 -0
  67. package/dist/shared/components/notifications/TestMyRules.js +137 -0
  68. package/dist/shared/components/notifications/changes-lines.js +24 -0
  69. package/dist/shared/components/notifications/why-lines.js +64 -0
  70. package/dist/shared/components/panels/CommentPanel.js +316 -281
  71. package/dist/shared/components/panels/LegalHoldBanner.js +38 -0
  72. package/dist/shared/components/panels/PipelinePanel.js +201 -196
  73. package/dist/shared/components/panels/RevisionsPanel.js +496 -479
  74. package/dist/shared/components/pipeline/PipelineEditorView.js +1587 -1560
  75. package/dist/shared/components/pipeline/PipelineStateOwners.js +116 -103
  76. package/dist/shared/components/profile/PersonDidPanel.js +188 -0
  77. package/dist/shared/components/profile/PersonProfile.js +57 -52
  78. package/dist/shared/components/queue/QueueWorklist.js +1526 -1365
  79. package/dist/shared/hooks/useSlowReason.js +39 -0
  80. package/dist/shared/lib/activity-sentence.js +670 -0
  81. package/dist/shared/lib/config-sentences.js +418 -0
  82. package/dist/shared/lib/core-glossary.js +229 -0
  83. package/dist/shared/lib/error-hints.js +159 -0
  84. package/dist/shared/lib/error-message.js +105 -0
  85. package/dist/shared/lib/error-toast.js +22 -0
  86. package/dist/shared/lib/field-comments.js +25 -0
  87. package/dist/shared/lib/filter-sentence.js +261 -0
  88. package/dist/shared/lib/glossary.js +55 -48
  89. package/dist/shared/lib/idle-reload.js +138 -0
  90. package/dist/shared/lib/layout-resolve.js +42 -29
  91. package/dist/shared/lib/list-inline-edit.js +190 -0
  92. package/dist/shared/lib/list-link.js +147 -0
  93. package/dist/shared/lib/prefetch.js +259 -106
  94. package/dist/shared/lib/record-ref.js +72 -0
  95. package/dist/shared/lib/reload-holds.js +25 -0
  96. package/dist/shared/lib/safe-error.js +52 -24
  97. package/dist/shared/lib/skeleton-shapes.js +72 -0
  98. package/dist/shared/lib/slow-reason.js +63 -0
  99. package/package.json +1 -1
@@ -1,32 +1,32 @@
1
- import { jsxs as c, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as u, jsx as n } from "react/jsx-runtime";
2
2
  import { useQuery as S } from "@tanstack/react-query";
3
- import { ChevronDown as Se, Loader2 as Q, AlertTriangle as Ue, Search as Ae, X as Me, Check as qe } from "lucide-react";
4
- import { useState as $, useRef as Z, useEffect as O, useLayoutEffect as De, useMemo as I } from "react";
5
- import { createPortal as _e } from "react-dom";
6
- import { useNivaroClient as ie, useItemEditAuth as Je, useStaleFieldReporter as ze } from "../../context.js";
7
- import { get as j, post as He } from "../../lib/commands.js";
8
- import { compareByMatch as Ye } from "../../lib/picker-rank.js";
9
- import { useRecordReader as $e } from "../../lib/record-loader.js";
10
- import { useOnlineUsers as We } from "../../lib/use-online-users.js";
11
- import { SearchHighlight as Xe } from "../SearchHighlight.js";
12
- import { UserAvatar as Ge } from "../UserAvatar.js";
13
- import { userOptionFilter as Ve, cn as D } from "../../lib/utils.js";
3
+ import { ChevronDown as $e, Loader2 as B, AlertTriangle as Je, Search as ze, X as He, Check as Ce } from "lucide-react";
4
+ import { useState as $, useRef as I, useEffect as j, useLayoutEffect as Ye, useMemo as K } from "react";
5
+ import { createPortal as Le } from "react-dom";
6
+ import { useNivaroClient as ae, useItemEditAuth as We, useStaleFieldReporter as Xe } from "../../context.js";
7
+ import { get as R, post as Ge } from "../../lib/commands.js";
8
+ import { compareByMatch as Ve } from "../../lib/picker-rank.js";
9
+ import { useRecordReader as je } from "../../lib/record-loader.js";
10
+ import { useOnlineUsers as Ze } from "../../lib/use-online-users.js";
11
+ import { SearchHighlight as Qe } from "../SearchHighlight.js";
12
+ import { UserAvatar as Be } from "../UserAvatar.js";
13
+ import { userOptionFilter as et, cn as J } from "../../lib/utils.js";
14
14
  import { applyDisplayTemplate as k } from "./helpers.js";
15
- import { collidingIds as Ze, disambiguators as Qe } from "./option-disambiguate.js";
16
- import { usePickerMissReport as Be } from "./picker-miss.js";
17
- import { useLatestSearch as et, narrowLocally as tt } from "./picker-search.js";
18
- function rt(s) {
15
+ import { collidingIds as tt, disambiguators as rt } from "./option-disambiguate.js";
16
+ import { usePickerMissReport as nt } from "./picker-miss.js";
17
+ import { useLatestSearch as st, narrowLocally as ot } from "./picker-search.js";
18
+ function it(s) {
19
19
  return s.replace(/\(.*$/, "").trim().split(/\s+/).map((r) => r[0]).filter(Boolean).slice(0, 2).join("").toUpperCase() || "?";
20
20
  }
21
- function nt(s) {
22
- const [r, d] = $(null), x = {
23
- onMouseEnter: (h) => {
21
+ function at(s) {
22
+ const [r, d] = $(null), y = {
23
+ onMouseEnter: (g) => {
24
24
  if (!s) return;
25
- const m = h.currentTarget.getBoundingClientRect(), u = window.innerHeight - m.bottom < 80;
26
- d({ x: m.left, y: u ? m.top - 58 : m.bottom + 4 });
25
+ const p = g.currentTarget.getBoundingClientRect(), m = window.innerHeight - p.bottom < 80;
26
+ d({ x: p.left, y: m ? p.top - 58 : p.bottom + 4 });
27
27
  },
28
28
  onMouseLeave: () => d(null)
29
- }, q = s && r ? _e(
29
+ }, q = s && r ? Le(
30
30
  /* @__PURE__ */ n(
31
31
  "div",
32
32
  {
@@ -37,75 +37,84 @@ function nt(s) {
37
37
  ),
38
38
  document.body
39
39
  ) : null;
40
- return { bind: x, tip: q };
40
+ return { bind: y, tip: q };
41
41
  }
42
- function st({
42
+ function lt({
43
43
  collection: s,
44
44
  value: r,
45
45
  onChange: d,
46
- disabled: x,
46
+ disabled: y,
47
47
  placeholder: q,
48
- extraFilter: h,
49
- autoSelectSingle: m,
50
- optionSort: u,
51
- requiredParent: R,
48
+ extraFilter: g,
49
+ autoSelectSingle: p,
50
+ optionSort: m,
51
+ requiredParent: F,
52
52
  facets: i,
53
53
  fieldKey: C,
54
54
  narrowedBy: l,
55
- pinned: p,
56
- missPlacement: _
55
+ pinned: f,
56
+ missPlacement: _,
57
+ defaultOpen: Re,
58
+ onClose: le
57
59
  }) {
58
- const F = ie(), ae = $e(), [y, K] = $(!1), [v, le] = $(""), [Ce, Le] = $(!1), L = et(v, Ce), de = Z(null), J = Z(null);
59
- O(() => {
60
- y ? setTimeout(() => {
60
+ const T = ae(), de = je(), [c, P] = $(Re ?? !1), [v, ce] = $(""), z = I(le);
61
+ z.current = le;
62
+ const ue = I(c);
63
+ j(() => {
64
+ var e;
65
+ ue.current && !c && ((e = z.current) == null || e.call(z)), ue.current = c;
66
+ }, [c]);
67
+ const [Fe, Te] = $(!1), L = st(v, Fe), me = I(null), H = I(null);
68
+ j(() => {
69
+ c ? setTimeout(() => {
61
70
  var e;
62
- return (e = de.current) == null ? void 0 : e.focus();
63
- }, 30) : le("");
64
- }, [y]), O(() => {
65
- if (!y) return;
71
+ return (e = me.current) == null ? void 0 : e.focus();
72
+ }, 30) : ce("");
73
+ }, [c]), j(() => {
74
+ if (!c) return;
66
75
  const e = (o) => {
67
76
  var a;
68
77
  const t = o.target;
69
- (a = t == null ? void 0 : t.closest) != null && a.call(t, "[data-nvr-combobox-panel]") || J.current && !J.current.contains(o.target) && K(!1);
78
+ (a = t == null ? void 0 : t.closest) != null && a.call(t, "[data-nvr-combobox-panel]") || H.current && !H.current.contains(o.target) && P(!1);
70
79
  };
71
80
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
72
- }, [y]);
73
- const [ce, B] = $(null), [ue, je] = $(null);
74
- De(() => {
75
- if (!y) {
76
- B(null);
81
+ }, [c]);
82
+ const [pe, ee] = $(null), [fe, Ee] = $(null);
83
+ Ye(() => {
84
+ if (!c) {
85
+ ee(null);
77
86
  return;
78
87
  }
79
88
  const e = () => {
80
- const o = J.current;
89
+ const o = H.current;
81
90
  if (!o) return;
82
91
  const t = o.getBoundingClientRect(), a = o.closest('[role="dialog"]') ?? document.body;
83
- je(a);
84
- const ye = window.innerHeight - t.bottom < 340 && t.top > window.innerHeight - t.bottom, we = t.left, ve = ye ? t.top - 4 : t.bottom + 4, Ne = {
92
+ Ee(a);
93
+ const Ne = window.innerHeight - t.bottom < 340 && t.top > window.innerHeight - t.bottom, ke = t.left, Se = Ne ? t.top - 4 : t.bottom + 4, qe = {
85
94
  minWidth: t.width,
86
95
  zIndex: 120,
87
- ...ye ? { transform: "translateY(-100%)" } : {}
96
+ ...Ne ? { transform: "translateY(-100%)" } : {}
88
97
  };
89
98
  if (a === document.body)
90
- B({ position: "fixed", left: we, top: ve, ...Ne });
99
+ ee({ position: "fixed", left: ke, top: Se, ...qe });
91
100
  else {
92
- const ke = a.getBoundingClientRect();
93
- B({ position: "absolute", left: we - ke.left, top: ve - ke.top, ...Ne });
101
+ const _e = a.getBoundingClientRect();
102
+ ee({ position: "absolute", left: ke - _e.left, top: Se - _e.top, ...qe });
94
103
  }
95
104
  };
96
105
  return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
97
106
  window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
98
107
  };
99
- }, [y]);
100
- const { data: ee, isPending: Re } = S({
108
+ }, [c]);
109
+ const { data: te, isPending: Oe } = S({
101
110
  queryKey: ["col-meta", s],
102
- queryFn: () => F.request(j(`/collections/${s}`)).then((e) => e.data),
111
+ queryFn: () => T.request(R(`/collections/${s}`)).then((e) => e.data),
103
112
  staleTime: 3e5,
104
113
  retry: !1
105
- }), [te, Fe] = $({}), { data: me = [] } = S({
114
+ }), [re, Ie] = $({}), { data: he = [] } = S({
106
115
  queryKey: ["collection-meta", s],
107
- queryFn: () => F.request(
108
- j(`/collections/${s}`)
116
+ queryFn: () => T.request(
117
+ R(`/collections/${s}`)
109
118
  ).then(
110
119
  (e) => {
111
120
  var o;
@@ -114,53 +123,53 @@ function st({
114
123
  ),
115
124
  enabled: !!(i != null && i.length),
116
125
  staleTime: 10 * 6e4
117
- }), Te = I(() => {
126
+ }), Ke = K(() => {
118
127
  const e = {};
119
128
  for (const o of i ?? []) {
120
- const t = me.find(
129
+ const t = he.find(
121
130
  (a) => a.many_collection === s && a.many_field === o.field && !a.junction_field
122
131
  );
123
132
  t != null && t.one_collection && (e[o.field] = t.one_collection);
124
133
  }
125
134
  return e;
126
- }, [i, me, s]), T = s === "nivaro_users", Ee = We(T), pe = Je().isAdmin, re = I(() => {
135
+ }, [i, he, s]), E = s === "nivaro_users", Pe = Ze(E), ge = We().isAdmin, ne = K(() => {
127
136
  const e = [];
128
- T && e.push(Ve(pe)), h && e.push(h);
129
- for (const [o, t] of Object.entries(te))
137
+ E && e.push(et(ge)), g && e.push(g);
138
+ for (const [o, t] of Object.entries(re))
130
139
  t != null && t !== "" && e.push({ [o]: { _eq: t } });
131
140
  if (e.length !== 0)
132
141
  return e.length === 1 ? e[0] : { _and: e };
133
- }, [h, te, pe]), z = (ee == null ? void 0 : ee.display_template) ?? (T ? "{{first_name}} {{last_name}} ({{email}})" : null), g = I(() => {
134
- if (!z) return;
135
- const e = [...z.matchAll(/\{\{([\w.]+)\}\}/g)].map((o) => o[1]);
142
+ }, [g, re, ge]), Y = (te == null ? void 0 : te.display_template) ?? (E ? "{{first_name}} {{last_name}} ({{email}})" : null), b = K(() => {
143
+ if (!Y) return;
144
+ const e = [...Y.matchAll(/\{\{([\w.]+)\}\}/g)].map((o) => o[1]);
136
145
  if (e.length)
137
146
  return ["id", ...e].join(",");
138
- }, [z]), N = re ? JSON.stringify(re) : void 0, P = u && !/^-?label$/.test(u) ? u : void 0, {
139
- data: f,
140
- isFetching: E,
141
- isPlaceholderData: fe
147
+ }, [Y]), N = ne ? JSON.stringify(ne) : void 0, U = m && !/^-?label$/.test(m) ? m : void 0, {
148
+ data: h,
149
+ isFetching: O,
150
+ isPlaceholderData: be
142
151
  } = S({
143
152
  queryKey: [
144
153
  "relation-opts",
145
154
  s,
146
155
  L,
147
156
  N,
148
- g,
149
- P ?? ""
157
+ b,
158
+ U ?? ""
150
159
  ],
151
- queryFn: () => F.request(
152
- j(`/items/${s}`, {
160
+ queryFn: () => T.request(
161
+ R(`/items/${s}`, {
153
162
  limit: 200,
154
163
  picker: "1",
155
164
  ...L ? { search: L } : {},
156
165
  ...N ? { filter: N } : {},
157
- ...g ? { fields: g } : {},
158
- ...P ? { sort: P } : {}
166
+ ...b ? { fields: b } : {},
167
+ ...U ? { sort: U } : {}
159
168
  })
160
169
  ).then((e) => e.data ?? []),
161
170
  // Wait for the display template: it decides `fields`, and starting before
162
171
  // it lands sent the whole first page twice.
163
- enabled: y && !Re,
172
+ enabled: c && !Oe,
164
173
  staleTime: N ? 0 : 3e4,
165
174
  // A new SEARCH keeps the previous answer on screen (narrowed locally below)
166
175
  // instead of blanking the list behind a spinner. A changed filter, sort or
@@ -168,33 +177,33 @@ function st({
168
177
  placeholderData: (e, o) => {
169
178
  const t = o == null ? void 0 : o.queryKey;
170
179
  if (!(!e || !t))
171
- return t[1] === s && t[3] === N && t[4] === g && t[5] === (P ?? "") ? e : void 0;
180
+ return t[1] === s && t[3] === N && t[4] === b && t[5] === (U ?? "") ? e : void 0;
172
181
  }
173
182
  });
174
- O(() => Le(E), [E]), Be({
183
+ j(() => Te(O), [O]), nt({
175
184
  placement: _,
176
- open: y,
185
+ open: c,
177
186
  search: L,
178
- settled: !E && !fe && f !== void 0,
179
- count: (f == null ? void 0 : f.length) ?? 0
187
+ settled: !O && !be && h !== void 0,
188
+ count: (h == null ? void 0 : h.length) ?? 0
180
189
  });
181
- const { data: H, isLoading: Oe } = S({
182
- queryKey: ["relation-single", s, String(r), g],
183
- queryFn: () => ae(s, r, g),
190
+ const { data: W, isLoading: Ue } = S({
191
+ queryKey: ["relation-single", s, String(r), b],
192
+ queryFn: () => de(s, r, b),
184
193
  enabled: !!r,
185
194
  staleTime: 6e4
186
- }), b = (p == null ? void 0 : p.id) != null && p.id !== "" ? String(p.id) : null, { data: U } = S({
187
- queryKey: ["relation-single", s, b ?? "", g],
188
- queryFn: () => ae(s, b, g).catch(
195
+ }), x = (f == null ? void 0 : f.id) != null && f.id !== "" ? String(f.id) : null, { data: A } = S({
196
+ queryKey: ["relation-single", s, x ?? "", b],
197
+ queryFn: () => de(s, x, b).catch(
189
198
  () => null
190
199
  ),
191
- enabled: !!b && y,
200
+ enabled: !!x && c,
192
201
  staleTime: 6e4
193
- }), Ie = JSON.stringify(h ? { _and: [{ id: { _eq: r } }, h] } : { id: { _eq: r } }), { data: Y } = S({
202
+ }), Ae = JSON.stringify(g ? { _and: [{ id: { _eq: r } }, g] } : { id: { _eq: r } }), { data: X } = S({
194
203
  queryKey: ["relation-avail", s, String(r), N],
195
- queryFn: () => F.request(
196
- j(`/items/${s}`, {
197
- filter: Ie,
204
+ queryFn: () => T.request(
205
+ R(`/items/${s}`, {
206
+ filter: Ae,
198
207
  picker: "1",
199
208
  limit: 1,
200
209
  fields: "id"
@@ -203,18 +212,18 @@ function st({
203
212
  // The pinned option is offered OUTSIDE the option filter (a type's generic
204
213
  // item is excluded from the general list on purpose), so a value that IS
205
214
  // the pin is available by construction — never probe it, never flag it.
206
- enabled: !!r && !!H && String(r) !== b,
215
+ enabled: !!r && !!W && String(r) !== x,
207
216
  staleTime: 3e4
208
- }), A = !!r && String(r) !== b && Y !== void 0 && Y.length === 0, W = Z(null), ne = Z(!1), he = `${s}|${N ?? ""}`, Ke = () => {
209
- ne.current = !0, W.current = he, d(null);
210
- }, X = r == null || r === "";
211
- O(() => {
212
- X || (ne.current = !1);
213
- }, [X]), O(() => {
214
- if (!m || x || !X || ne.current) return;
215
- const e = he;
216
- W.current !== e && (W.current = e, F.request(
217
- j(`/items/${s}`, {
217
+ }), M = !!r && String(r) !== x && X !== void 0 && X.length === 0, G = I(null), se = I(!1), xe = `${s}|${N ?? ""}`, Me = () => {
218
+ se.current = !0, G.current = xe, d(null);
219
+ }, V = r == null || r === "";
220
+ j(() => {
221
+ V || (se.current = !1);
222
+ }, [V]), j(() => {
223
+ if (!p || y || !V || se.current) return;
224
+ const e = xe;
225
+ G.current !== e && (G.current = e, T.request(
226
+ R(`/items/${s}`, {
218
227
  limit: 2,
219
228
  picker: "1",
220
229
  fields: "id",
@@ -225,120 +234,120 @@ function st({
225
234
  const t = o.data ?? [];
226
235
  t.length === 1 && ((a = t[0]) == null ? void 0 : a.id) != null && d(t[0].id);
227
236
  }).catch(() => {
228
- W.current = null;
237
+ G.current = null;
229
238
  }));
230
- }, [m, x, X, s, N]);
231
- const w = z, ge = r && H ? k(w, H) : null, se = !fe && v === L, G = I(
232
- () => tt(
233
- f ?? [],
239
+ }, [p, y, V, s, N]);
240
+ const w = Y, ye = r && W ? k(w, W) : null, oe = !be && v === L, Z = K(
241
+ () => ot(
242
+ h ?? [],
234
243
  (e) => k(w, e) || `#${e.id}`,
235
244
  v,
236
- se
245
+ oe
237
246
  ),
238
- [f, w, v, se]
239
- ), V = I(
240
- () => Ze(f ?? [], (e) => k(w, e) || `#${e.id}`),
241
- [f, w]
242
- ), { data: M } = S({
243
- queryKey: ["relation-opts-dups", s, V.join(",")],
244
- queryFn: () => F.request(
245
- j(`/items/${s}`, {
246
- limit: V.length,
247
+ [h, w, v, oe]
248
+ ), Q = K(
249
+ () => tt(h ?? [], (e) => k(w, e) || `#${e.id}`),
250
+ [h, w]
251
+ ), { data: D } = S({
252
+ queryKey: ["relation-opts-dups", s, Q.join(",")],
253
+ queryFn: () => T.request(
254
+ R(`/items/${s}`, {
255
+ limit: Q.length,
247
256
  picker: "1",
248
- filter: JSON.stringify({ id: { _in: V } }),
257
+ filter: JSON.stringify({ id: { _in: Q } }),
249
258
  fields: "*"
250
259
  })
251
260
  ).then((e) => e.data ?? []),
252
- enabled: y && V.length > 0 && !T,
261
+ enabled: c && Q.length > 0 && !E,
253
262
  staleTime: 6e4
254
- }), be = I(() => {
255
- if (!(M != null && M.length)) return /* @__PURE__ */ new Map();
263
+ }), we = K(() => {
264
+ if (!(D != null && D.length)) return /* @__PURE__ */ new Map();
256
265
  const e = new Map(
257
- (f ?? []).map((t) => [
266
+ (h ?? []).map((t) => [
258
267
  String(t.id),
259
268
  (k(w, t) || `#${t.id}`).trim().toLowerCase()
260
269
  ])
261
270
  ), o = /* @__PURE__ */ new Map();
262
- for (const t of M) {
271
+ for (const t of D) {
263
272
  const a = e.get(String(t.id));
264
273
  a !== void 0 && o.set(a, [...o.get(a) ?? [], t]);
265
274
  }
266
- return Qe(
275
+ return rt(
267
276
  [...o.values()],
268
- ((g == null ? void 0 : g.split(",")) ?? []).map((t) => t.split(".")[0])
277
+ ((b == null ? void 0 : b.split(",")) ?? []).map((t) => t.split(".")[0])
269
278
  );
270
- }, [M, f, w, g]), Pe = !!r && Oe && !H, xe = nt(A), oe = ze();
271
- return O(() => {
272
- !oe || !C || Y === void 0 || oe(C, A);
273
- }, [oe, C, A, Y]), R ? /* @__PURE__ */ c(
279
+ }, [D, h, w, b]), De = !!r && Ue && !W, ve = at(M), ie = Xe();
280
+ return j(() => {
281
+ !ie || !C || X === void 0 || ie(C, M);
282
+ }, [ie, C, M, X]), F ? /* @__PURE__ */ u(
274
283
  "button",
275
284
  {
276
285
  type: "button",
277
286
  disabled: !0,
278
287
  className: "flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 text-sm text-left opacity-50 cursor-not-allowed",
279
288
  children: [
280
- /* @__PURE__ */ c("span", { className: "truncate text-muted-foreground", children: [
289
+ /* @__PURE__ */ u("span", { className: "truncate text-muted-foreground", children: [
281
290
  "Select ",
282
- R,
291
+ F,
283
292
  " first"
284
293
  ] }),
285
- /* @__PURE__ */ n(Se, { className: "h-4 w-4 shrink-0 opacity-50" })
294
+ /* @__PURE__ */ n($e, { className: "h-4 w-4 shrink-0 opacity-50" })
286
295
  ]
287
296
  }
288
297
  ) : (
289
298
  // Stale tooltip binds on the WRAPPER: a disabled trigger button swallows
290
299
  // mouse events, so a locked-but-stale field would never show the hint.
291
- /* @__PURE__ */ c("div", { ref: J, className: "relative", ...xe.bind, children: [
292
- /* @__PURE__ */ c(
300
+ /* @__PURE__ */ u("div", { ref: H, className: "relative", ...ve.bind, children: [
301
+ /* @__PURE__ */ u(
293
302
  "button",
294
303
  {
295
304
  type: "button",
296
- disabled: x,
297
- onClick: () => K((e) => !e),
298
- className: D(
305
+ disabled: y,
306
+ onClick: () => P((e) => !e),
307
+ className: J(
299
308
  "flex h-9 w-full items-center justify-between gap-2 rounded-md border bg-background px-3 text-sm text-left hover:bg-muted disabled:pointer-events-none disabled:opacity-50",
300
- A ? "border-amber-300 dark:border-amber-600" : "border-input"
309
+ M ? "border-amber-300 dark:border-amber-600" : "border-input"
301
310
  ),
302
311
  children: [
303
- Pe ? /* @__PURE__ */ n(Q, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }) : /* @__PURE__ */ c(
312
+ De ? /* @__PURE__ */ n(B, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }) : /* @__PURE__ */ u(
304
313
  "span",
305
314
  {
306
- className: D(
315
+ className: J(
307
316
  "flex items-center gap-1.5 truncate min-w-0",
308
- !ge && "text-muted-foreground"
317
+ !ye && "text-muted-foreground"
309
318
  ),
310
319
  children: [
311
- A && /* @__PURE__ */ n(Ue, { className: "h-3.5 w-3.5 shrink-0 text-amber-500" }),
312
- /* @__PURE__ */ n("span", { className: "truncate", children: ge ?? q ?? "Select…" })
320
+ M && /* @__PURE__ */ n(Je, { className: "h-3.5 w-3.5 shrink-0 text-amber-500" }),
321
+ /* @__PURE__ */ n("span", { className: "truncate", children: ye ?? q ?? "Select…" })
313
322
  ]
314
323
  }
315
324
  ),
316
- /* @__PURE__ */ n(Se, { className: "h-4 w-4 shrink-0 opacity-50" })
325
+ /* @__PURE__ */ n($e, { className: "h-4 w-4 shrink-0 opacity-50" })
317
326
  ]
318
327
  }
319
328
  ),
320
- xe.tip,
321
- y && ce && ue && _e(
322
- /* @__PURE__ */ c(
329
+ ve.tip,
330
+ c && pe && fe && Le(
331
+ /* @__PURE__ */ u(
323
332
  "div",
324
333
  {
325
334
  "data-nvr-combobox-panel": "",
326
- style: ce,
327
- className: D(
335
+ style: pe,
336
+ className: J(
328
337
  "nvr-pop-in rounded-md border border-border bg-popover shadow-md",
329
338
  i != null && i.length ? "w-[560px] max-w-[92vw]" : "min-w-[240px] w-max max-w-[360px]"
330
339
  ),
331
340
  children: [
332
341
  !!(i != null && i.length) && /* @__PURE__ */ n("div", { className: "grid grid-cols-2 gap-2 border-b border-border bg-slate-50/60 p-2 dark:bg-muted/40", children: i.map((e) => {
333
- const o = Te[e.field];
334
- return o ? /* @__PURE__ */ c("div", { children: [
342
+ const o = Ke[e.field];
343
+ return o ? /* @__PURE__ */ u("div", { children: [
335
344
  /* @__PURE__ */ n("p", { className: "mb-0.5 text-[10px] font-medium uppercase tracking-wide text-slate-400", children: e.label ?? e.field }),
336
345
  /* @__PURE__ */ n(
337
- st,
346
+ lt,
338
347
  {
339
348
  collection: o,
340
- value: te[e.field] ?? null,
341
- onChange: (t) => Fe((a) => ({ ...a, [e.field]: t })),
349
+ value: re[e.field] ?? null,
350
+ onChange: (t) => Ie((a) => ({ ...a, [e.field]: t })),
342
351
  placeholder: "Any",
343
352
  optionSort: e.sort,
344
353
  extraFilter: e.filter
@@ -346,74 +355,74 @@ function st({
346
355
  )
347
356
  ] }, e.field) : null;
348
357
  }) }),
349
- /* @__PURE__ */ c("div", { className: "flex items-center border-b px-3", children: [
350
- /* @__PURE__ */ n(Ae, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
358
+ /* @__PURE__ */ u("div", { className: "flex items-center border-b px-3", children: [
359
+ /* @__PURE__ */ n(ze, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
351
360
  /* @__PURE__ */ n(
352
361
  "input",
353
362
  {
354
- ref: de,
363
+ ref: me,
355
364
  value: v,
356
- onChange: (e) => le(e.target.value),
365
+ onChange: (e) => ce(e.target.value),
357
366
  placeholder: "Search…",
358
367
  className: "flex h-9 w-full bg-transparent py-3 text-[13px] outline-none placeholder:text-muted-foreground"
359
368
  }
360
369
  ),
361
- E && f !== void 0 && /* @__PURE__ */ n(
362
- Q,
370
+ O && h !== void 0 && /* @__PURE__ */ n(
371
+ B,
363
372
  {
364
373
  "data-picker-searching": !0,
365
374
  className: "ml-2 h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground"
366
375
  }
367
376
  )
368
377
  ] }),
369
- /* @__PURE__ */ c("div", { className: "max-h-52 overflow-y-auto py-1", children: [
370
- !!r && !x && /* @__PURE__ */ c(
378
+ /* @__PURE__ */ u("div", { className: "max-h-52 overflow-y-auto py-1", children: [
379
+ !!r && !y && /* @__PURE__ */ u(
371
380
  "button",
372
381
  {
373
382
  type: "button",
374
383
  onClick: () => {
375
- Ke(), K(!1);
384
+ Me(), P(!1);
376
385
  },
377
386
  className: "flex w-full items-center gap-2 px-3 py-1.5 text-[13px] text-slate-500 hover:bg-muted border-b border-slate-100 dark:text-slate-400 dark:border-border",
378
387
  children: [
379
- /* @__PURE__ */ n(Me, { className: "h-3.5 w-3.5 text-slate-400" }),
388
+ /* @__PURE__ */ n(He, { className: "h-3.5 w-3.5 text-slate-400" }),
380
389
  "Clear selection"
381
390
  ]
382
391
  }
383
392
  ),
384
- b && /* @__PURE__ */ c(
393
+ x && /* @__PURE__ */ u(
385
394
  "button",
386
395
  {
387
396
  type: "button",
388
397
  "data-nvr-pinned-option": !0,
389
398
  onClick: () => {
390
- d((U == null ? void 0 : U.id) ?? (p == null ? void 0 : p.id)), K(!1);
399
+ d((A == null ? void 0 : A.id) ?? (f == null ? void 0 : f.id)), P(!1);
391
400
  },
392
401
  className: "flex w-full items-center gap-2 border-b border-slate-100 bg-nvr-cyan/5 px-3 py-1.5 text-left text-[13px] hover:bg-nvr-cyan/10 dark:border-border",
393
402
  children: [
394
403
  /* @__PURE__ */ n(
395
404
  "div",
396
405
  {
397
- className: D(
406
+ className: J(
398
407
  "flex h-4 w-4 shrink-0 items-center justify-center rounded-full border transition-colors",
399
- String(r) === b ? "border-nvr-cyan bg-nvr-cyan" : "border-slate-300"
408
+ String(r) === x ? "border-nvr-cyan bg-nvr-cyan" : "border-slate-300"
400
409
  ),
401
- children: String(r) === b && /* @__PURE__ */ n(qe, { className: "h-2.5 w-2.5 text-white" })
410
+ children: String(r) === x && /* @__PURE__ */ n(Ce, { className: "h-2.5 w-2.5 text-white" })
402
411
  }
403
412
  ),
404
- /* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate", children: U ? k(w, U) || `#${b}` : `#${b}` }),
405
- /* @__PURE__ */ n("span", { className: "shrink-0 rounded bg-nvr-cyan/15 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-slate-700 dark:text-foreground", children: (p == null ? void 0 : p.tag) ?? "Default" })
413
+ /* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate", children: A ? k(w, A) || `#${x}` : `#${x}` }),
414
+ /* @__PURE__ */ n("span", { className: "shrink-0 rounded bg-nvr-cyan/15 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-slate-700 dark:text-foreground", children: (f == null ? void 0 : f.tag) ?? "Default" })
406
415
  ]
407
416
  }
408
417
  ),
409
- f === void 0 && E ? /* @__PURE__ */ n("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ n(Q, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : G.length === 0 && !se ? /* @__PURE__ */ n("p", { className: "px-3 py-2 text-[13px] text-muted-foreground", children: "Searching…" }) : G.length === 0 ? l && l.labels.length > 0 && !v.trim() ? /* @__PURE__ */ c("div", { className: "px-3 py-2 text-[12px] leading-5 text-muted-foreground", children: [
410
- /* @__PURE__ */ c("p", { children: [
418
+ h === void 0 && O ? /* @__PURE__ */ n("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ n(B, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : Z.length === 0 && !oe ? /* @__PURE__ */ n("p", { className: "px-3 py-2 text-[13px] text-muted-foreground", children: "Searching…" }) : Z.length === 0 ? l && l.labels.length > 0 && !v.trim() ? /* @__PURE__ */ u("div", { className: "px-3 py-2 text-[12px] leading-5 text-muted-foreground", children: [
419
+ /* @__PURE__ */ u("p", { children: [
411
420
  "No options for",
412
421
  " ",
413
422
  /* @__PURE__ */ n("span", { className: "font-medium text-foreground", children: l.labels.join(" · ") }),
414
423
  l.onClear ? " — clear one to widen the list:" : "."
415
424
  ] }),
416
- l.onClear && /* @__PURE__ */ n("div", { className: "mt-1.5 flex flex-wrap gap-1.5", children: l.keys.map((e, o) => /* @__PURE__ */ c(
425
+ l.onClear && /* @__PURE__ */ n("div", { className: "mt-1.5 flex flex-wrap gap-1.5", children: l.keys.map((e, o) => /* @__PURE__ */ u(
417
426
  "button",
418
427
  {
419
428
  type: "button",
@@ -429,56 +438,56 @@ function st({
429
438
  },
430
439
  e
431
440
  )) })
432
- ] }) : /* @__PURE__ */ n("p", { className: "px-3 py-2 text-[13px] text-muted-foreground", children: v.trim() ? `No results for “${v.trim()}”` : "No results" }) : (P ? [...G] : [...G].sort(
433
- (e, o) => Ye(
441
+ ] }) : /* @__PURE__ */ n("p", { className: "px-3 py-2 text-[13px] text-muted-foreground", children: v.trim() ? `No results for “${v.trim()}”` : "No results" }) : (U ? [...Z] : [...Z].sort(
442
+ (e, o) => Ve(
434
443
  k(w, e),
435
444
  k(w, o),
436
445
  v,
437
- u === "-label"
446
+ m === "-label"
438
447
  )
439
- )).filter((e) => !b || String(e.id) !== b).map((e) => {
448
+ )).filter((e) => !x || String(e.id) !== x).map((e) => {
440
449
  const o = k(w, e) || `#${e.id}`, t = String(e.id) === String(r);
441
- return /* @__PURE__ */ c(
450
+ return /* @__PURE__ */ u(
442
451
  "button",
443
452
  {
444
453
  type: "button",
445
454
  onClick: () => {
446
- d(e.id), K(!1);
455
+ d(e.id), P(!1);
447
456
  },
448
457
  className: "flex w-full items-center gap-2 px-3 py-1.5 text-[13px] text-left hover:bg-muted",
449
458
  children: [
450
459
  /* @__PURE__ */ n(
451
460
  "div",
452
461
  {
453
- className: D(
462
+ className: J(
454
463
  "flex h-4 w-4 shrink-0 items-center justify-center rounded-full border transition-colors",
455
464
  t ? "border-nvr-cyan bg-nvr-cyan" : "border-slate-300"
456
465
  ),
457
- children: t && /* @__PURE__ */ n(qe, { className: "h-2.5 w-2.5 text-white" })
466
+ children: t && /* @__PURE__ */ n(Ce, { className: "h-2.5 w-2.5 text-white" })
458
467
  }
459
468
  ),
460
- T && /* @__PURE__ */ n(
461
- Ge,
469
+ E && /* @__PURE__ */ n(
470
+ Be,
462
471
  {
463
472
  userId: e.id,
464
473
  className: "h-4 w-4",
465
- fallback: /* @__PURE__ */ n("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/20 text-[8px] font-bold text-nvr-navy dark:text-nvr-cyan", children: rt(o) })
474
+ fallback: /* @__PURE__ */ n("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/20 text-[8px] font-bold text-nvr-navy dark:text-nvr-cyan", children: it(o) })
466
475
  }
467
476
  ),
468
- T && Ee.has(String(e.id).toUpperCase()) && /* @__PURE__ */ n(
477
+ E && Pe.has(String(e.id).toUpperCase()) && /* @__PURE__ */ n(
469
478
  "span",
470
479
  {
471
480
  className: "h-1.5 w-1.5 shrink-0 rounded-full bg-emerald-500",
472
481
  "data-tip": "Online now"
473
482
  }
474
483
  ),
475
- /* @__PURE__ */ n(Xe, { text: o, query: v }),
476
- be.has(String(e.id)) && /* @__PURE__ */ n(
484
+ /* @__PURE__ */ n(Qe, { text: o, query: v }),
485
+ we.has(String(e.id)) && /* @__PURE__ */ n(
477
486
  "span",
478
487
  {
479
488
  className: "ml-auto max-w-[45%] shrink-0 truncate pl-2 text-[11.5px] text-muted-foreground",
480
489
  "data-option-detail": !0,
481
- children: be.get(String(e.id))
490
+ children: we.get(String(e.id))
482
491
  }
483
492
  )
484
493
  ]
@@ -487,47 +496,47 @@ function st({
487
496
  );
488
497
  })
489
498
  ] }),
490
- !E && /* @__PURE__ */ n(
491
- ot,
499
+ !O && /* @__PURE__ */ n(
500
+ dt,
492
501
  {
493
502
  collection: s,
494
503
  search: L,
495
- filter: re,
504
+ filter: ne,
496
505
  narrowedLabels: (l == null ? void 0 : l.labels) ?? [],
497
- auto: (f ?? []).length === 0 && !!L
506
+ auto: (h ?? []).length === 0 && !!L
498
507
  }
499
508
  )
500
509
  ]
501
510
  }
502
511
  ),
503
- ue
512
+ fe
504
513
  )
505
514
  ] })
506
515
  );
507
516
  }
508
- function ot({
517
+ function dt({
509
518
  collection: s,
510
519
  search: r,
511
520
  filter: d,
512
- narrowedLabels: x,
521
+ narrowedLabels: y,
513
522
  auto: q
514
523
  }) {
515
- const h = ie(), [m, u] = $(!1), R = d ? JSON.stringify(d) : "", { data: i, isFetching: C } = S({
516
- queryKey: ["picker-narrowing", s, r, R],
517
- queryFn: () => h.request(
518
- He("/picker-narrowing", { collection: s, search: r, filter: d ?? null })
524
+ const g = ae(), [p, m] = $(!1), F = d ? JSON.stringify(d) : "", { data: i, isFetching: C } = S({
525
+ queryKey: ["picker-narrowing", s, r, F],
526
+ queryFn: () => g.request(
527
+ Ge("/picker-narrowing", { collection: s, search: r, filter: d ?? null })
519
528
  ).then((_) => _.data),
520
- enabled: m || q,
529
+ enabled: p || q,
521
530
  staleTime: 3e4,
522
531
  retry: !1
523
532
  });
524
- if (!m && !q)
533
+ if (!p && !q)
525
534
  return /* @__PURE__ */ n(
526
535
  "button",
527
536
  {
528
537
  type: "button",
529
538
  onClick: (_) => {
530
- _.stopPropagation(), u(!0);
539
+ _.stopPropagation(), m(!0);
531
540
  },
532
541
  className: "w-full border-t border-border px-3 py-1.5 text-left text-[11px] text-muted-foreground hover:text-foreground",
533
542
  "data-picker-narrowing-ask": !0,
@@ -537,9 +546,9 @@ function ot({
537
546
  if (C && !i)
538
547
  return /* @__PURE__ */ n("p", { className: "border-t border-border px-3 py-1.5 text-[11px] text-muted-foreground", children: "Checking what narrows this list…" });
539
548
  if (!i) return null;
540
- const l = [], p = r ? `match “${r}”` : "exist";
549
+ const l = [], f = r ? `match “${r}”` : "exist";
541
550
  return i.by_field_filter > 0 && l.push(
542
- `${i.by_field_filter.toLocaleString()} more ${p} but this field only offers ${x.length ? `records that fit ${x.join(" · ")}` : "records its filter allows"}.`
551
+ `${i.by_field_filter.toLocaleString()} more ${f} but this field only offers ${y.length ? `records that fit ${y.join(" · ")}` : "records its filter allows"}.`
543
552
  ), i.by_exclusions > 0 && l.push(
544
553
  `${i.by_exclusions.toLocaleString()} ${i.by_exclusions === 1 ? "is" : "are"} hidden from pickers by an admin.`
545
554
  ), i.scopes.length > 0 && l.push(`Your ${i.scopes.join(", ")} access narrows what you can pick here.`), i.row_filter && l.push("Your role only sees some of these records."), l.length === 0 && l.push(
@@ -555,38 +564,38 @@ function ot({
555
564
  }
556
565
  );
557
566
  }
558
- function kt({
567
+ function $t({
559
568
  collection: s,
560
569
  id: r,
561
570
  displayTemplate: d
562
571
  }) {
563
- const x = ie(), q = $e(), h = s === "nivaro_files" || s === "directus_files", m = (() => {
572
+ const y = ae(), q = je(), g = s === "nivaro_files" || s === "directus_files", p = (() => {
564
573
  if (!d || !d.includes(".")) return null;
565
574
  const i = [...d.matchAll(/\{\{([^}]+)\}\}/g)].map((C) => C[1].trim());
566
575
  return i.length > 0 ? ["id", ...i].join(",") : null;
567
- })(), { data: u, isLoading: R } = S({
568
- queryKey: ["relation-single", s, String(r), m ?? ""],
569
- queryFn: () => h ? (
576
+ })(), { data: m, isLoading: F } = S({
577
+ queryKey: ["relation-single", s, String(r), p ?? ""],
578
+ queryFn: () => g ? (
570
579
  // The file's row, not its bytes: GET /files/:id downloads the whole
571
580
  // file (twice with the retry, 404 when storage lost it) only to read
572
581
  // its name, and a missing object left the raw id as the label.
573
- x.request(
574
- j(`/files/${encodeURIComponent(String(r))}/meta`)
582
+ y.request(
583
+ R(`/files/${encodeURIComponent(String(r))}/meta`)
575
584
  ).then((i) => i.data)
576
- ) : q(s, r, m),
585
+ ) : q(s, r, p),
577
586
  enabled: !!r && !!s,
578
587
  staleTime: 6e4
579
588
  });
580
- if (R) return /* @__PURE__ */ n(Q, { className: "h-3 w-3 animate-spin text-slate-400" });
581
- if (!u) return /* @__PURE__ */ n("span", { children: String(r ?? "") });
582
- if (h) {
583
- const i = u.title || u.filename_download || u.filename_disk || String(r);
589
+ if (F) return /* @__PURE__ */ n(B, { className: "h-3 w-3 animate-spin text-slate-400" });
590
+ if (!m) return /* @__PURE__ */ n("span", { children: String(r ?? "") });
591
+ if (g) {
592
+ const i = m.title || m.filename_download || m.filename_disk || String(r);
584
593
  return /* @__PURE__ */ n("span", { children: i });
585
594
  }
586
- return /* @__PURE__ */ n("span", { children: k(d, u) });
595
+ return /* @__PURE__ */ n("span", { children: k(d, m) });
587
596
  }
588
597
  export {
589
- kt as RelatedItemLabel,
590
- st as RelationCombobox,
591
- nt as useStaleTip
598
+ $t as RelatedItemLabel,
599
+ lt as RelationCombobox,
600
+ at as useStaleTip
592
601
  };