@nivaro/react 0.3.101 → 0.3.103

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.
@@ -10,7 +10,7 @@ import { noteReplayEvent as Fe, createReplayCheckoutState as Me } from "../share
10
10
  import { emitReplayTap as Ne, setReplayRecorderMode as O, registerReplayCapture as Oe, clipEndOffset as Ue, withClipKind as We } from "../shared/lib/replay-capture.js";
11
11
  import { instrumentConsole as He, instrumentRequests as Ke, redactSecrets as $e } from "../shared/lib/replay-context.js";
12
12
  import { instrumentSocket as Be } from "../shared/lib/replay-socket.js";
13
- const ze = "nivaro-react@0.3.101", Q = 1e4, Ye = 150, xe = 3e3, je = 600, Ge = (o) => `nvr_replay_resume${o ? `:${o}` : ""}`, V = () => typeof navigator > "u" || navigator.onLine !== !1;
13
+ const ze = "nivaro-react@0.3.103", Q = 1e4, Ye = 150, xe = 3e3, je = 600, Ge = (o) => `nvr_replay_resume${o ? `:${o}` : ""}`, V = () => typeof navigator > "u" || navigator.onLine !== !1;
14
14
  function Je(o) {
15
15
  return typeof o.url != "string" || typeof fetch != "function" ? null : (f, u) => {
16
16
  const l = typeof o.getToken == "function" ? o.getToken() : void 0, d = { "Content-Type": "application/json" };
@@ -42,59 +42,61 @@ import { logSearch as Vd, logSearchOpen as Hd } from "../lib/search-log.js";
42
42
  import { shapeForField as Yd } from "../lib/skeleton-shapes.js";
43
43
  import { knownTotalFrom as Jd } from "../lib/slow-reason.js";
44
44
  import { nextSortValue as Gd } from "../lib/sort-cycle.js";
45
- import { useMyScopes as Xd, matchScopeDimension as Tl, effectiveScopeSeedIds as Zd, translateScopeValues as ec } from "../lib/use-my-scopes.js";
46
- import { useNewItemLayouts as tc } from "../lib/use-new-item-layouts.js";
47
- import { loadUserCard as nc, userCardQuery as ac } from "../lib/user-cards.js";
48
- import { cn as Xt, humanHours as rc, formatDateTime as sc } from "../lib/utils.js";
49
- import { usePublishAskContext as lc, useAskRecordDrag as oc } from "./ai/ask-context.js";
50
- import { useAvailableBulkActions as ic, bulkActionEnabled as dc, mergeBulkActions as cc, guardMatches as uc, useBuiltinGate as pc, BulkActionButtons as mc } from "./bulk/BulkActionButtons.js";
51
- import { BulkCompareButton as fc } from "./bulk/BulkCompareButton.js";
52
- import { BulkFieldUpdate as bc } from "./bulk/BulkFieldUpdate.js";
53
- import { BulkRowMark as hc } from "./bulk/BulkRowMark.js";
54
- import { MessageStakeholdersForm as gc } from "./bulk/MessageStakeholders.js";
55
- import { useRowPushActions as xc, runRowPush as vc } from "./bulk/RowPushActions.js";
56
- import { CellCopyLayer as kc } from "./CellCopyLayer.js";
57
- import { CopyAsButton as yc } from "./CopyAsButton.js";
58
- import { useTreeConfig as wc, CollectionTree as _c } from "./cbv/CollectionTree.js";
59
- import { readExportRows as Nc, stableSort as Sc, m2oLabelPaths as Cc, resolveAllPaths as $c, userLabel as qc, m2oLabel as Tc, localYmd as Lc } from "./cbv/export-rows.js";
60
- import { FormulaColumnAdder as Fc } from "./cbv/FormulaColumnAdder.js";
61
- import { FoundElsewhere as Rc } from "./cbv/FoundElsewhere.js";
62
- import { useHierarchyScope as Ec, HierarchyScopePicker as Dc } from "./cbv/HierarchyScope.js";
63
- import { tabStopRowKey as Pc, rowFocusTarget as Mc } from "./cbv/row-focus.js";
64
- import { splitRiskFilter as Ll, riskFilterEntry as Oc } from "./cbv/saved-view-risk.js";
65
- import { isFilterRefusal as Ac, unknownFieldsOf as Fl, dropUnknownField as Ic } from "./cbv/unknown-fields.js";
66
- import { ViewDefaultMenu as Kc } from "./cbv/ViewDefaultMenu.js";
67
- import { exactCountParams as jc, lastPageFromCount as Bc } from "./cbv-pager.js";
68
- import { relationFilterRequests as Uc, mergeFilterOptions as zc } from "./cbv-relation-filter.js";
69
- import { useRecordRoomTypes as Qc, canOpenChatRoom as Wc, discussRecord as Vc } from "./chat/chat-core.js";
70
- import { FilterControl as Hc } from "./DataTable.js";
71
- import { FocusModeToggle as Yc } from "./FocusModeToggle.js";
72
- import { FULFILMENT_FILTER_OPTIONS as Rl, FulfilmentPill as Jc, fulfilmentFigures as Gc } from "./FulfilmentPill.js";
73
- import { HScrollProxy as Xc } from "./HScrollProxy.js";
74
- import { useDocumentAutofillConfig as Zc, startDocumentExtraction as eu } from "./import/DocumentAutofillButton.js";
75
- import { INTEGRATIONS_FILTER_OPTIONS as El, IntegrationDots as tu } from "./integrations/IntegrationDots.js";
76
- import { useQuickPickerSteps as nu, QuickPickerDialog as au } from "./item-edit/QuickPickerDialog.js";
77
- import { usePickerExclusion as ru } from "./item-edit/RecordGrantTools.js";
45
+ import { isFileCollection as Xd } from "../lib/system-collections.js";
46
+ import { useMyScopes as Zd, matchScopeDimension as Tl, effectiveScopeSeedIds as ec, translateScopeValues as tc } from "../lib/use-my-scopes.js";
47
+ import { useNewItemLayouts as nc } from "../lib/use-new-item-layouts.js";
48
+ import { loadUserCard as ac, userCardQuery as rc } from "../lib/user-cards.js";
49
+ import { cn as Xt, humanHours as sc, formatDateTime as lc } from "../lib/utils.js";
50
+ import { usePublishAskContext as oc, useAskRecordDrag as ic } from "./ai/ask-context.js";
51
+ import { useAvailableBulkActions as dc, bulkActionEnabled as cc, mergeBulkActions as uc, guardMatches as pc, useBuiltinGate as mc, BulkActionButtons as fc } from "./bulk/BulkActionButtons.js";
52
+ import { BulkCompareButton as bc } from "./bulk/BulkCompareButton.js";
53
+ import { BulkFieldUpdate as hc } from "./bulk/BulkFieldUpdate.js";
54
+ import { BulkRowMark as gc } from "./bulk/BulkRowMark.js";
55
+ import { MessageStakeholdersForm as xc } from "./bulk/MessageStakeholders.js";
56
+ import { useRowPushActions as vc, runRowPush as kc } from "./bulk/RowPushActions.js";
57
+ import { CellCopyLayer as yc } from "./CellCopyLayer.js";
58
+ import { CopyAsButton as wc } from "./CopyAsButton.js";
59
+ import { useTreeConfig as _c, CollectionTree as Nc } from "./cbv/CollectionTree.js";
60
+ import { readExportRows as Sc, stableSort as Cc, m2oLabelPaths as $c, resolveAllPaths as qc, userLabel as Tc, m2oLabel as Lc, localYmd as Fc } from "./cbv/export-rows.js";
61
+ import { FormulaColumnAdder as Rc } from "./cbv/FormulaColumnAdder.js";
62
+ import { FoundElsewhere as Ec } from "./cbv/FoundElsewhere.js";
63
+ import { useHierarchyScope as Dc, HierarchyScopePicker as Pc } from "./cbv/HierarchyScope.js";
64
+ import { tabStopRowKey as Mc, rowFocusTarget as Oc } from "./cbv/row-focus.js";
65
+ import { splitRiskFilter as Ll, riskFilterEntry as Ac } from "./cbv/saved-view-risk.js";
66
+ import { isFilterRefusal as Ic, unknownFieldsOf as Fl, dropUnknownField as Kc } from "./cbv/unknown-fields.js";
67
+ import { ViewDefaultMenu as jc } from "./cbv/ViewDefaultMenu.js";
68
+ import { CbvFileLabel as Bc } from "./cbv-file-label.js";
69
+ import { exactCountParams as Uc, lastPageFromCount as zc } from "./cbv-pager.js";
70
+ import { relationFilterRequests as Qc, mergeFilterOptions as Wc } from "./cbv-relation-filter.js";
71
+ import { useRecordRoomTypes as Vc, canOpenChatRoom as Hc, discussRecord as Yc } from "./chat/chat-core.js";
72
+ import { FilterControl as Jc } from "./DataTable.js";
73
+ import { FocusModeToggle as Gc } from "./FocusModeToggle.js";
74
+ import { FULFILMENT_FILTER_OPTIONS as Rl, FulfilmentPill as Xc, fulfilmentFigures as Zc } from "./FulfilmentPill.js";
75
+ import { HScrollProxy as eu } from "./HScrollProxy.js";
76
+ import { useDocumentAutofillConfig as tu, startDocumentExtraction as nu } from "./import/DocumentAutofillButton.js";
77
+ import { INTEGRATIONS_FILTER_OPTIONS as El, IntegrationDots as au } from "./integrations/IntegrationDots.js";
78
+ import { useQuickPickerSteps as ru, QuickPickerDialog as su } from "./item-edit/QuickPickerDialog.js";
79
+ import { usePickerExclusion as lu } from "./item-edit/RecordGrantTools.js";
78
80
  import { invalidateRecordQueries as Dl } from "./item-edit/RecordLiveSync.js";
79
- import { relatedMissing as su } from "./item-edit/related-missing.js";
81
+ import { relatedMissing as ou } from "./item-edit/related-missing.js";
80
82
  import { UserRosterCluster as Pl, UserChip as Ml } from "./item-edit/UserChip.js";
81
- import { LiveRowMark as lu } from "./LiveRowMark.js";
82
- import { CopyListLinkButton as ou } from "./list/CopyListLinkButton.js";
83
- import { useInlineEdit as iu, InlineEditCell as du } from "./list/InlineEdit.js";
84
- import { MapView as cu } from "./MapView.js";
85
- import { usePickerExcludedRows as uu, PICKER_EXCLUDED_ROW_CLASS as pu, PICKER_EXCLUDED_TITLE as mu } from "./PickerExcludedRows.js";
83
+ import { LiveRowMark as iu } from "./LiveRowMark.js";
84
+ import { CopyListLinkButton as du } from "./list/CopyListLinkButton.js";
85
+ import { useInlineEdit as cu, InlineEditCell as uu } from "./list/InlineEdit.js";
86
+ import { MapView as pu } from "./MapView.js";
87
+ import { usePickerExcludedRows as mu, PICKER_EXCLUDED_ROW_CLASS as fu, PICKER_EXCLUDED_TITLE as bu } from "./PickerExcludedRows.js";
86
88
  import { ConfirmButton as Fr } from "./profile/primitives.js";
87
- import { RealtimeStaleMark as fu } from "./RealtimeStatusBanner.js";
88
- import { RecordDrilldownSheet as bu } from "./RecordDrilldownSheet.js";
89
- import { RowHighlightLegend as hu } from "./RowHighlightLegend.js";
90
- import { RowPresence as gu } from "./RowPresence.js";
91
- import { TableSkeletonRows as xu } from "./Skeletons.js";
92
- import { SlowNoticeView as vu } from "./SlowNotice.js";
93
- import { TipLayer as ku } from "./TipLayer.js";
89
+ import { RealtimeStaleMark as hu } from "./RealtimeStatusBanner.js";
90
+ import { RecordDrilldownSheet as gu } from "./RecordDrilldownSheet.js";
91
+ import { RowHighlightLegend as xu } from "./RowHighlightLegend.js";
92
+ import { RowPresence as vu } from "./RowPresence.js";
93
+ import { TableSkeletonRows as ku } from "./Skeletons.js";
94
+ import { SlowNoticeView as yu } from "./SlowNotice.js";
95
+ import { TipLayer as wu } from "./TipLayer.js";
94
96
  import { UnseenDot as Ol } from "./UnseenDot.js";
95
97
  import { SimpleSelectXs as Nn, SimpleSelect as Al } from "./ui/SimpleSelect.js";
96
- import { RevisionsPanel as yu } from "./panels/RevisionsPanel.js";
97
- import { itemActionChoiceStep as wu, ItemActionChoiceList as _u } from "./panels/ItemActionChoices.js";
98
+ import { RevisionsPanel as _u } from "./panels/RevisionsPanel.js";
99
+ import { itemActionChoiceStep as Nu, ItemActionChoiceList as Su } from "./panels/ItemActionChoices.js";
98
100
  function Sn(n, o, h) {
99
101
  const d = n.find((w) => w.one_collection === o && w.one_field === h);
100
102
  if (d != null && d.many_collection)
@@ -150,7 +152,7 @@ function wa(n, o) {
150
152
  }
151
153
  return null;
152
154
  }
153
- const Nu = [
155
+ const Cu = [
154
156
  { label: "None", cfg: null },
155
157
  { label: "Currency", cfg: { type: "number", decimals: 2, thousands: !0, prefix: "$" } },
156
158
  { label: "Number", cfg: { type: "number", thousands: !0 } },
@@ -186,7 +188,7 @@ function Er(n, o, h) {
186
188
  !d.junction_field && !!d.one_collection
187
189
  );
188
190
  }
189
- function Su(n) {
191
+ function $u(n) {
190
192
  const o = new Date(String(n));
191
193
  if (Number.isNaN(o.getTime())) return String(n);
192
194
  const h = Date.now() - o.getTime(), d = Math.floor(h / 6e4);
@@ -228,17 +230,17 @@ function Jl(n, o, h) {
228
230
  }, 0);
229
231
  })), w.promise.then((S) => S.get(h) ?? null);
230
232
  }
231
- const Cu = {
233
+ const qu = {
232
234
  draft: "draft",
233
235
  submitted: "submitted",
234
236
  review: "in review",
235
237
  approved: "approved",
236
238
  rejected: "rejected"
237
239
  };
238
- function $u({ summary: n }) {
240
+ function Tu({ summary: n }) {
239
241
  var N;
240
242
  if (!n || n.total === 0) return /* @__PURE__ */ a("span", { className: "text-[12px] text-slate-300", children: "—" });
241
- const o = n.latest, h = n.active > 0, d = !!(o != null && o.workflow_state) && !["approved", "rejected", "reverted"].includes(o.status), w = o ? d ? ((N = o.workflow_state) == null ? void 0 : N.label) ?? "" : Cu[o.status] ?? o.status : "", S = o == null ? void 0 : o.cost_impact, $ = S != null && S !== 0 ? `${S > 0 ? "+" : "−"}$${Math.abs(S).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null, q = o ? `${o.title ?? "Addendum"} — ${w}${n.total > 1 ? ` (${n.total} total)` : ""}` : void 0;
243
+ const o = n.latest, h = n.active > 0, d = !!(o != null && o.workflow_state) && !["approved", "rejected", "reverted"].includes(o.status), w = o ? d ? ((N = o.workflow_state) == null ? void 0 : N.label) ?? "" : qu[o.status] ?? o.status : "", S = o == null ? void 0 : o.cost_impact, $ = S != null && S !== 0 ? `${S > 0 ? "+" : "−"}$${Math.abs(S).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null, q = o ? `${o.title ?? "Addendum"} — ${w}${n.total > 1 ? ` (${n.total} total)` : ""}` : void 0;
242
244
  return /* @__PURE__ */ c(
243
245
  "span",
244
246
  {
@@ -262,6 +264,12 @@ function $u({ summary: n }) {
262
264
  );
263
265
  }
264
266
  function Dr({ relatedCollection: n, id: o }) {
267
+ return Xd(n) ? /* @__PURE__ */ a(Bc, { id: o }) : /* @__PURE__ */ a(Lu, { relatedCollection: n, id: o });
268
+ }
269
+ function Lu({
270
+ relatedCollection: n,
271
+ id: o
272
+ }) {
265
273
  const h = St(), d = Yl.has(n), w = o != null && o !== "", { data: S } = ne({
266
274
  queryKey: ["cbv-collection-meta", n],
267
275
  queryFn: () => h.request(G(`/collections/${n}`)).then((L) => L.data),
@@ -279,7 +287,7 @@ function Dr({ relatedCollection: n, id: o }) {
279
287
  if (q)
280
288
  return /* @__PURE__ */ a("span", { className: "inline-block h-3.5 w-24 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" });
281
289
  if (!$) {
282
- const L = su(null);
290
+ const L = ou(null);
283
291
  return /* @__PURE__ */ a(
284
292
  "span",
285
293
  {
@@ -316,17 +324,17 @@ function Ca(n, o) {
316
324
  ])
317
325
  n.invalidateQueries({ queryKey: [h, o] });
318
326
  }
319
- function qu(n, o) {
327
+ function Fu(n, o) {
320
328
  return n ? n.is_admin ? !0 : (n.collections ?? []).some(
321
329
  (h) => (h.collection === o || h.collection === "*") && (h.actions.includes("update") || h.actions.includes("*"))
322
330
  ) : !1;
323
331
  }
324
- function Tu(n, o) {
332
+ function Ru(n, o) {
325
333
  return n ? n.is_admin ? !0 : (n.collections ?? []).some(
326
334
  (h) => (h.collection === o || h.collection === "*") && (h.actions.includes("delete") || h.actions.includes("*"))
327
335
  ) : !1;
328
336
  }
329
- function Lu({
337
+ function Eu({
330
338
  collection: n,
331
339
  id: o,
332
340
  hasPipeline: h,
@@ -357,10 +365,10 @@ function Lu({
357
365
  queryFn: () => u.request(G("/security/my/permissions")).then((g) => g.data),
358
366
  enabled: m && !Q,
359
367
  staleTime: 5 * 6e4
360
- }), we = ru(n, String(o), {
368
+ }), we = lu(n, String(o), {
361
369
  enabled: m && Q,
362
370
  onDone: () => E(!1)
363
- }), [Ae, Y] = _(!1), Be = Qc(m), Se = Wc() && !!(Be != null && Be.some((g) => g.collection === n));
371
+ }), [Ae, Y] = _(!1), Be = Vc(m), Se = Hc() && !!(Be != null && Be.some((g) => g.collection === n));
364
372
  pe(() => {
365
373
  if (!m) return;
366
374
  const g = (Z) => {
@@ -382,14 +390,14 @@ function Lu({
382
390
  }), $e = be(
383
391
  () => ((X == null ? void 0 : X.available_transitions) ?? []).filter((g) => g.in_row_menu !== !1),
384
392
  [X]
385
- ), { data: it } = ic(m ? [n] : []), at = Gi({
393
+ ), { data: it } = dc(m ? [n] : []), at = Gi({
386
394
  isAdmin: Q,
387
- roleMayDelete: Tu(me, n),
388
- builtinOpen: it ? (it[n] ?? []).some((g) => g.source === "builtin" && g.key === "delete") && dc(K, n, "delete") : void 0,
395
+ roleMayDelete: Ru(me, n),
396
+ builtinOpen: it ? (it[n] ?? []).some((g) => g.source === "builtin" && g.key === "delete") && cc(K, n, "delete") : void 0,
389
397
  hasPipeline: h,
390
398
  run: h ? X === void 0 ? void 0 : X : null
391
399
  }), Ie = be(
392
- () => m ? cc(it, [n], K).filter(
400
+ () => m ? uc(it, [n], K).filter(
393
401
  // Transition-kind registry actions (Cancel / Uncancel) are the pipeline
394
402
  // transitions already listed above — never the same move twice.
395
403
  (g) => g.kind !== "builtin" && g.kind !== "transition"
@@ -416,8 +424,8 @@ function Lu({
416
424
  return !((Z = R.guard) != null && Z.length);
417
425
  });
418
426
  const g = { ...We ?? {}, ...L ?? {} };
419
- return Ie.filter((R) => uc(R.guard, g) !== !1);
420
- }, [Ie, Me, We, L]), { pushActions: le, failedPartners: ee } = xc({
427
+ return Ie.filter((R) => pc(R.guard, g) !== !1);
428
+ }, [Ie, Me, We, L]), { pushActions: le, failedPartners: ee } = vc({
421
429
  collection: n,
422
430
  id: o,
423
431
  open: m,
@@ -465,7 +473,7 @@ function Lu({
465
473
  staleTime: 0
466
474
  }), [gt, It] = _(null), Cn = (re == null ? void 0 : re.id) ?? null;
467
475
  pe(() => It(null), [Cn]);
468
- const st = qe.data ? wu(qe.data) : null, xt = st && !st.ask ? st.value : gt, Kt = !!re && (!st || st.ask && gt == null);
476
+ const st = qe.data ? Nu(qe.data) : null, xt = st && !st.ask ? st.value : gt, Kt = !!re && (!st || st.ask && gt == null);
469
477
  Ti.useLayoutEffect(() => {
470
478
  var Ke;
471
479
  if (!m) return;
@@ -520,7 +528,7 @@ function Lu({
520
528
  ge.error((R == null ? void 0 : R.error) ?? Zt(g, "Action failed"), Sa(g));
521
529
  }
522
530
  }), Rt = Nt({
523
- mutationFn: ({ op: g, note: R, pick: Z }) => vc(u, n, o, g, R, Z).then((ue) => ({ op: g, outcome: ue })),
531
+ mutationFn: ({ op: g, note: R, pick: Z }) => kc(u, n, o, g, R, Z).then((ue) => ({ op: g, outcome: ue })),
524
532
  onSuccess: ({ op: g, outcome: R }) => {
525
533
  E(!1);
526
534
  const Z = g.kind === "push" ? g.action.label : "Retry";
@@ -607,7 +615,7 @@ function Lu({
607
615
  }
608
616
  ),
609
617
  (re == null ? void 0 : re.choose) && (qe.isError ? /* @__PURE__ */ a("p", { className: "mb-1.5 px-1 text-[11.5px] text-red-600 dark:text-red-400", children: "Could not load the options." }) : qe.isLoading ? /* @__PURE__ */ a("p", { className: "mb-1.5 px-1 text-[11.5px] text-slate-500 dark:text-slate-400", children: "Loading…" }) : st != null && st.ask ? /* @__PURE__ */ a("div", { className: "mb-1.5 -mt-3 px-1", children: /* @__PURE__ */ a(
610
- _u,
618
+ Su,
611
619
  {
612
620
  choose: re.choose,
613
621
  options: qe.data ?? [],
@@ -691,7 +699,7 @@ function Lu({
691
699
  E(!1), w();
692
700
  }),
693
701
  Se && Je("Discuss in chat", () => {
694
- E(!1), Vc(u, n, String(o)).then((g) => {
702
+ E(!1), Yc(u, n, String(o)).then((g) => {
695
703
  g || ge.error("This record has no chat room you can open");
696
704
  }).catch(() => ge.error("Could not open the chat room"));
697
705
  }),
@@ -898,7 +906,7 @@ function jl({
898
906
  );
899
907
  return /* @__PURE__ */ a("span", { className: "text-[12px] tabular-nums text-slate-400", children: q });
900
908
  }
901
- return /* @__PURE__ */ a("span", { className: "text-[12px] tabular-nums text-slate-400", children: Su(d) });
909
+ return /* @__PURE__ */ a("span", { className: "text-[12px] tabular-nums text-slate-400", children: $u(d) });
902
910
  }
903
911
  return typeof d == "string" ? /* @__PURE__ */ a(
904
912
  "span",
@@ -1028,7 +1036,7 @@ function Ra({
1028
1036
  ] })
1029
1037
  ] });
1030
1038
  }
1031
- function Fu({
1039
+ function Du({
1032
1040
  target: n,
1033
1041
  label: o,
1034
1042
  selected: h,
@@ -1046,7 +1054,7 @@ function Fu({
1046
1054
  // page-only list; a new name keeps an old cached entry from answering.
1047
1055
  queryKey: ["cbv-filter-options-all", n, u, y ?? "", L, V],
1048
1056
  queryFn: async () => {
1049
- const T = Uc({
1057
+ const T = Qc({
1050
1058
  search: L,
1051
1059
  preferIds: w,
1052
1060
  labelField: u,
@@ -1059,7 +1067,7 @@ function Fu({
1059
1067
  (we) => S.request(G(`/items/${n}`, we)).then((Ae) => de(Ae.data ?? []))
1060
1068
  )
1061
1069
  );
1062
- return zc(me);
1070
+ return Wc(me);
1063
1071
  },
1064
1072
  staleTime: 10 * 6e4,
1065
1073
  enabled: N && !!I,
@@ -1104,7 +1112,7 @@ function Fu({
1104
1112
  }
1105
1113
  );
1106
1114
  }
1107
- function Ru({
1115
+ function Pu({
1108
1116
  collection: n,
1109
1117
  field: o,
1110
1118
  selected: h,
@@ -1132,7 +1140,7 @@ function Ru({
1132
1140
  }
1133
1141
  );
1134
1142
  }
1135
- function Eu({
1143
+ function Mu({
1136
1144
  value: n,
1137
1145
  onChange: o
1138
1146
  }) {
@@ -1257,7 +1265,7 @@ function Eu({
1257
1265
  ] })
1258
1266
  ] });
1259
1267
  }
1260
- function Du({
1268
+ function Ou({
1261
1269
  def: n,
1262
1270
  selected: o,
1263
1271
  onChange: h,
@@ -1341,7 +1349,7 @@ const Xl = [
1341
1349
  { value: "30d", label: "30 days" },
1342
1350
  { value: "90d", label: "90 days" },
1343
1351
  { value: "year", label: "This year" }
1344
- ], Pu = {
1352
+ ], Au = {
1345
1353
  _eq: "_neq",
1346
1354
  _neq: "_eq",
1347
1355
  _in: "_nin",
@@ -1394,7 +1402,7 @@ function Bl(n) {
1394
1402
  continue;
1395
1403
  }
1396
1404
  let S = d.op.includes(":") ? d.op.split(":")[0] : d.op, $ = d.op.includes(":") ? d.op.split(":")[1] : d.value || null;
1397
- d.fieldType === "boolean" && ($ === "true" || $ === "false") && ($ = $ === "true"), d.not && (S = Pu[S] ?? S), o.push({ path: d.path, op: S, value: $ });
1405
+ d.fieldType === "boolean" && ($ === "true" || $ === "false") && ($ = $ === "true"), d.not && (S = Au[S] ?? S), o.push({ path: d.path, op: S, value: $ });
1398
1406
  }
1399
1407
  return o;
1400
1408
  }
@@ -1422,7 +1430,7 @@ const Ul = [
1422
1430
  { label: "After", value: "_gt" },
1423
1431
  { label: "Is empty", value: "_null" },
1424
1432
  { label: "Is not empty", value: "_nnull" }
1425
- ], Mu = {
1433
+ ], Iu = {
1426
1434
  string: Ul,
1427
1435
  text: Ul,
1428
1436
  integer: qr,
@@ -1443,8 +1451,8 @@ const Ul = [
1443
1451
  { label: "Is not empty", value: "_nnull" }
1444
1452
  ]
1445
1453
  };
1446
- function Ou(n) {
1447
- for (const o of Object.values(Mu)) {
1454
+ function Ku(n) {
1455
+ for (const o of Object.values(Iu)) {
1448
1456
  const h = o.find((d) => d.value === n);
1449
1457
  if (h) return h.label;
1450
1458
  }
@@ -1566,7 +1574,7 @@ function zl(n, o, h) {
1566
1574
  const d = n.type ?? "string";
1567
1575
  return d === "integer" || d === "decimal" || d === "float" ? "number" : d === "datetime" || d === "timestamp" ? "date" : d;
1568
1576
  }
1569
- function Au({
1577
+ function ju({
1570
1578
  collection: n,
1571
1579
  path: o,
1572
1580
  pathLabels: h,
@@ -1716,7 +1724,7 @@ function Au({
1716
1724
  m.key
1717
1725
  )) });
1718
1726
  }
1719
- function Iu({
1727
+ function Bu({
1720
1728
  target: n,
1721
1729
  selected: o,
1722
1730
  labels: h,
@@ -1787,7 +1795,7 @@ function Iu({
1787
1795
  ] })
1788
1796
  ] });
1789
1797
  }
1790
- function Ku(n) {
1798
+ function Uu(n) {
1791
1799
  var h, d;
1792
1800
  const o = n.pathLabels.join(" › ");
1793
1801
  if (Array.isArray(n.value)) {
@@ -1806,9 +1814,9 @@ function Ku(n) {
1806
1814
  const w = ((h = La.find((S) => S.value === n.value)) == null ? void 0 : h.label) ?? String(n.value);
1807
1815
  return { field: o, op: "in the", value: `${w} (rolling)` };
1808
1816
  }
1809
- return (d = n.path[0]) != null && d.startsWith("$has_") || n.path[0] === "$missing_required" ? { field: o, op: "", value: "" } : { field: o, op: Ou(n.op).toLowerCase(), value: String(n.value ?? "") };
1817
+ return (d = n.path[0]) != null && d.startsWith("$has_") || n.path[0] === "$missing_required" ? { field: o, op: "", value: "" } : { field: o, op: Ku(n.op).toLowerCase(), value: String(n.value ?? "") };
1810
1818
  }
1811
- function ju({
1819
+ function zu({
1812
1820
  collection: n,
1813
1821
  meta: o,
1814
1822
  search: h,
@@ -1982,7 +1990,7 @@ function ju({
1982
1990
  k
1983
1991
  )) }),
1984
1992
  /* @__PURE__ */ a(
1985
- Au,
1993
+ ju,
1986
1994
  {
1987
1995
  collection: K.collection,
1988
1996
  path: K.path,
@@ -2017,7 +2025,7 @@ function ju({
2017
2025
  ),
2018
2026
  Ie === "relation" && I.relTarget ? /* @__PURE__ */ c("div", { className: "pt-2", children: [
2019
2027
  /* @__PURE__ */ a(
2020
- Iu,
2028
+ Bu,
2021
2029
  {
2022
2030
  target: I.relTarget,
2023
2031
  selected: M,
@@ -2186,7 +2194,7 @@ function ju({
2186
2194
  ] })
2187
2195
  ] }),
2188
2196
  w.map((k) => {
2189
- const le = Ku(k);
2197
+ const le = Uu(k);
2190
2198
  return /* @__PURE__ */ c(
2191
2199
  "span",
2192
2200
  {
@@ -2233,7 +2241,7 @@ function ju({
2233
2241
  ] })
2234
2242
  );
2235
2243
  }
2236
- function Bu({
2244
+ function Qu({
2237
2245
  collection: n,
2238
2246
  meta: o,
2239
2247
  onPick: h
@@ -2287,7 +2295,7 @@ function Bu({
2287
2295
  ] }, $.field);
2288
2296
  }) });
2289
2297
  }
2290
- function Uu({
2298
+ function Wu({
2291
2299
  collection: n,
2292
2300
  ids: o,
2293
2301
  onDone: h,
@@ -2367,7 +2375,7 @@ function Uu({
2367
2375
  )
2368
2376
  ] });
2369
2377
  }
2370
- function zu({
2378
+ function Vu({
2371
2379
  collection: n,
2372
2380
  selectedIds: o,
2373
2381
  transitions: h,
@@ -2378,7 +2386,7 @@ function zu({
2378
2386
  onClear: q,
2379
2387
  onSuccess: N
2380
2388
  }) {
2381
- const L = $a(), K = St(), V = Fa(), I = Vl(), [u, y] = _("actions"), Q = pc([n], $), { data: F = [] } = ne({
2389
+ const L = $a(), K = St(), V = Fa(), I = Vl(), [u, y] = _("actions"), Q = mc([n], $), { data: F = [] } = ne({
2382
2390
  queryKey: ["bulk-recipes", n],
2383
2391
  queryFn: () => K.request(G("/bulk-recipes", { collection: n })).then((f) => f.data ?? []).catch(() => []),
2384
2392
  staleTime: 6e4
@@ -2563,12 +2571,12 @@ function zu({
2563
2571
  }
2564
2572
  ),
2565
2573
  Q("compare") && /* @__PURE__ */ a(
2566
- fc,
2574
+ bc,
2567
2575
  {
2568
2576
  targets: o.map((f) => ({ collection: n, id: f })),
2569
2577
  fields: w,
2570
2578
  relations: S,
2571
- renderValue: (f, H, te, oe) => Wu(n, f, H, te, oe),
2579
+ renderValue: (f, H, te, oe) => Yu(n, f, H, te, oe),
2572
2580
  className: "h-8 rounded-md border border-white/20 dark:border-border px-3 text-[12.5px] font-medium hover:bg-white/10 dark:hover:bg-muted"
2573
2581
  }
2574
2582
  ),
@@ -2583,7 +2591,7 @@ function zu({
2583
2591
  }
2584
2592
  ),
2585
2593
  /* @__PURE__ */ a(
2586
- mc,
2594
+ fc,
2587
2595
  {
2588
2596
  targets: o.map((f) => ({ collection: n, id: f })),
2589
2597
  enabledKeys: $,
@@ -2595,7 +2603,7 @@ function zu({
2595
2603
  }
2596
2604
  ),
2597
2605
  Q("update-field") && /* @__PURE__ */ a(
2598
- bc,
2606
+ hc,
2599
2607
  {
2600
2608
  collection: n,
2601
2609
  selectedIds: o,
@@ -2636,7 +2644,7 @@ function zu({
2636
2644
  )
2637
2645
  ] }),
2638
2646
  u === "merge" && /* @__PURE__ */ a(
2639
- Uu,
2647
+ Wu,
2640
2648
  {
2641
2649
  collection: n,
2642
2650
  ids: o.slice(0, 2),
@@ -2647,7 +2655,7 @@ function zu({
2647
2655
  }
2648
2656
  ),
2649
2657
  u === "message" && /* @__PURE__ */ a(
2650
- gc,
2658
+ xc,
2651
2659
  {
2652
2660
  collection: n,
2653
2661
  selectedIds: o,
@@ -2852,7 +2860,7 @@ function zu({
2852
2860
  }
2853
2861
  );
2854
2862
  }
2855
- const Qu = {
2863
+ const Hu = {
2856
2864
  state: "badge",
2857
2865
  entered: "date",
2858
2866
  aging: "short",
@@ -2864,7 +2872,7 @@ const Qu = {
2864
2872
  tasks: "short",
2865
2873
  addendums: "short"
2866
2874
  };
2867
- function M0({
2875
+ function j0({
2868
2876
  collection: n,
2869
2877
  quickFilters: o = [],
2870
2878
  initialColumns: h,
@@ -2903,7 +2911,7 @@ function M0({
2903
2911
  () => (m == null ? void 0 : m.qf) ?? {}
2904
2912
  ), [Ft, dn] = _(
2905
2913
  m ? m.lc ?? [] : q ?? []
2906
- ), { scopes: Rt, ready: $n } = Xd(), [Je, jt] = _(!1), [qn, Xn] = _(/* @__PURE__ */ new Set()), [Ve, Qt] = _(
2914
+ ), { scopes: Rt, ready: $n } = Zd(), [Je, jt] = _(!1), [qn, Xn] = _(/* @__PURE__ */ new Set()), [Ve, Qt] = _(
2907
2915
  () => (m == null ? void 0 : m.cf) ?? {}
2908
2916
  ), vt = Fi("drill.browser"), lt = vt.value, [Tn, cn] = _(null), [un, en] = _(!1), [tn, Zn] = _(() => {
2909
2917
  try {
@@ -3000,12 +3008,12 @@ function M0({
3000
3008
  }, [A]);
3001
3009
  const Dt = Pe.checkbox_selection !== !1, Wr = Pe.show_actions !== !1, [kt, ro] = _(!1), so = () => {
3002
3010
  kt && rn([]), ro(!kt);
3003
- }, na = V && Pe.allow_create !== !1, Vr = typeof Pe.create_label == "string" && Pe.create_label.trim().slice(0, 40) || "New item", aa = tc(na && !(A != null && A.singleton) ? n : null), [Aa, Pn] = _(!1), [Ia, ra] = _(null), { steps: Ka } = nu(
3011
+ }, na = V && Pe.allow_create !== !1, Vr = typeof Pe.create_label == "string" && Pe.create_label.trim().slice(0, 40) || "New item", aa = nc(na && !(A != null && A.singleton) ? n : null), [Aa, Pn] = _(!1), [Ia, ra] = _(null), { steps: Ka } = ru(
3004
3012
  na && !(A != null && A.singleton) ? n : null,
3005
3013
  null
3006
3014
  ), Hr = (e) => {
3007
3015
  e ? Q({ collection: n, itemId: "new", layoutSlug: e }) : on("new");
3008
- }, Mn = Zc(na && !(A != null && A.singleton) ? n : null), lo = Ri(), Yr = fe(null), [oo, io] = _(null), [Jr, Gr] = _(!1), Xr = (e) => {
3016
+ }, Mn = tu(na && !(A != null && A.singleton) ? n : null), lo = Ri(), Yr = fe(null), [oo, io] = _(null), [Jr, Gr] = _(!1), Xr = (e) => {
3009
3017
  var t;
3010
3018
  io(e), (t = Yr.current) == null || t.click();
3011
3019
  }, co = async (e) => {
@@ -3013,7 +3021,7 @@ function M0({
3013
3021
  if (e.target.value = "", !!t.length) {
3014
3022
  Gr(!0);
3015
3023
  try {
3016
- const r = await eu(lo, t, n);
3024
+ const r = await nu(lo, t, n);
3017
3025
  Q({ collection: n, itemId: "new", layoutSlug: oo, query: { autofill: r } });
3018
3026
  } catch (r) {
3019
3027
  _l(r, "The document could not be read", { action: "New from document" });
@@ -3043,9 +3051,9 @@ function M0({
3043
3051
  for (const s of Pt) {
3044
3052
  const l = Tl(e, { key: s.key, collection: s.collection });
3045
3053
  if (!l) continue;
3046
- const i = Zd(e, l.name);
3054
+ const i = ec(e, l.name);
3047
3055
  if (i.length === 0) continue;
3048
- const b = await ec(u, l, i, s.value_field).catch(
3056
+ const b = await tc(u, l, i, s.value_field).catch(
3049
3057
  () => []
3050
3058
  );
3051
3059
  b.length > 0 && (r[s.key] = b);
@@ -3071,10 +3079,10 @@ function M0({
3071
3079
  queryFn: () => u.request(G("/security/my/permissions")).then((e) => e.data),
3072
3080
  enabled: ts.enabled && !Ct,
3073
3081
  staleTime: 5 * 6e4
3074
- }), mo = Ct || qu(po, n), ns = be(
3082
+ }), mo = Ct || Fu(po, n), ns = be(
3075
3083
  () => new Map(((A == null ? void 0 : A.fields) ?? []).map((e) => [e.field, e])),
3076
3084
  [A]
3077
- ), as = iu(), rs = (e) => (
3085
+ ), as = cu(), rs = (e) => (
3078
3086
  // Ask-the-table answers are a one-off overlay, not the list's own rows.
3079
3087
  ae ? null : md({
3080
3088
  config: ts,
@@ -3119,7 +3127,7 @@ function M0({
3119
3127
  if (!l) return s;
3120
3128
  const i = ns.get(t);
3121
3129
  return /* @__PURE__ */ a(
3122
- du,
3130
+ uu,
3123
3131
  {
3124
3132
  controller: as,
3125
3133
  cellKey: `${String(e.id)}|${t}`,
@@ -3228,7 +3236,7 @@ function M0({
3228
3236
  l != null && l.one_collection && (e[t.field] = { kind: "m2m", target: l.one_collection });
3229
3237
  }
3230
3238
  return e;
3231
- }, [Yt, ln]), Qa = wl(Ve, 350), [bn, vo] = _((m == null ? void 0 : m.a) === !0), [cs, ko] = _(null), An = Ec(n, cs), [qt, us] = _(null), { data: In } = wc(n), [Mt, la] = _(() => (E == null ? void 0 : E.riskIds) ?? []), _e = be(() => {
3239
+ }, [Yt, ln]), Qa = wl(Ve, 350), [bn, vo] = _((m == null ? void 0 : m.a) === !0), [cs, ko] = _(null), An = Dc(n, cs), [qt, us] = _(null), { data: In } = _c(n), [Mt, la] = _(() => (E == null ? void 0 : E.riskIds) ?? []), _e = be(() => {
3232
3240
  var t;
3233
3241
  const e = Bl(Be);
3234
3242
  for (const r of Pt) {
@@ -3392,9 +3400,9 @@ function M0({
3392
3400
  const e = await u.request(
3393
3401
  G(
3394
3402
  `/items/${n}`,
3395
- jc({ search: Y, conditions: _e })
3403
+ Uc({ search: Y, conditions: _e })
3396
3404
  )
3397
- ), t = Bc(e, He);
3405
+ ), t = zc(e, He);
3398
3406
  if (t == null) {
3399
3407
  ge("This list is too big to count right now", {
3400
3408
  description: "Use Next to keep going, or narrow the list with a filter."
@@ -3464,7 +3472,7 @@ function M0({
3464
3472
  duration_ms: Date.now() - ys.current
3465
3473
  })
3466
3474
  });
3467
- }, [u, n, Y, ke, ft, ae]), lc(
3475
+ }, [u, n, Y, ke, ft, ae]), oc(
3468
3476
  n ? {
3469
3477
  list: {
3470
3478
  collection: n,
@@ -3481,7 +3489,7 @@ function M0({
3481
3489
  }
3482
3490
  } : null
3483
3491
  );
3484
- const No = oc(), ws = Ei(ft), Ga = Di({
3492
+ const No = ic(), ws = Ei(ft), Ga = Di({
3485
3493
  pending: ft,
3486
3494
  request: n ? { method: "GET", url: `/items/${n}` } : null,
3487
3495
  noun: ((A == null ? void 0 : A.display_name) ?? n ?? "").replace(/_/g, " ").toLowerCase() || null,
@@ -3669,7 +3677,7 @@ function M0({
3669
3677
  }), Ue = Ce.map((e) => String(e.id)).join(","), Fo = be(
3670
3678
  () => Ce.map((e) => ({ collection: n, id: e.id })),
3671
3679
  [Ce, n]
3672
- ), Ro = uu(Fo, Ct), ar = !!(A != null && A.addendums_enabled), { data: rr } = ne({
3680
+ ), Ro = mu(Fo, Ct), ar = !!(A != null && A.addendums_enabled), { data: rr } = ne({
3673
3681
  queryKey: ["cbv-addendum-summary", n, Ue],
3674
3682
  queryFn: () => u.request(
3675
3683
  he("/addendums/summary", { collection: n, ids: Ue.split(",") })
@@ -3790,7 +3798,7 @@ function M0({
3790
3798
  isResolvedCol: Ut,
3791
3799
  fetchResolved: Rs,
3792
3800
  fetchRelation: (t, r) => Jl(u, t, r),
3793
- userCardQuery: (t) => ac(u, t)
3801
+ userCardQuery: (t) => rc(u, t)
3794
3802
  });
3795
3803
  const gn = (e) => {
3796
3804
  if (e.includes(".")) return { kind: "text", path: e.split(".") };
@@ -3884,7 +3892,7 @@ function M0({
3884
3892
  b.add(U);
3885
3893
  else v[e] != null && v[e] !== "" && typeof v[e] != "object" && b.add(v[e]);
3886
3894
  return /* @__PURE__ */ a(
3887
- Fu,
3895
+ Du,
3888
3896
  {
3889
3897
  target: t.target,
3890
3898
  selected: (r == null ? void 0 : r.kind) === "in" ? r.value : [],
@@ -3895,7 +3903,7 @@ function M0({
3895
3903
  }
3896
3904
  if (t.kind === "enum")
3897
3905
  return /* @__PURE__ */ a(
3898
- Ru,
3906
+ Pu,
3899
3907
  {
3900
3908
  collection: n,
3901
3909
  field: e,
@@ -3955,7 +3963,7 @@ function M0({
3955
3963
  className: "w-full"
3956
3964
  }
3957
3965
  ) : t.kind === "date" ? /* @__PURE__ */ a(
3958
- Eu,
3966
+ Mu,
3959
3967
  {
3960
3968
  value: (r == null ? void 0 : r.kind) === "date" ? r.value : "",
3961
3969
  onChange: (b) => ze(e, b ? { kind: "date", value: b } : null)
@@ -4042,7 +4050,7 @@ function M0({
4042
4050
  Dn(null), Se([]), la([]), $e(d ?? ""), at(h ?? null), Me({}), k({}), rt({}), mt({}), sa(null), T(1);
4043
4051
  }, Wn = () => ({
4044
4052
  // The pressed highlight pills ride along as one `$at_risk` filter entry.
4045
- filters: [...Be, ...[Oc(Mt, ua)].filter((e) => e !== null)],
4053
+ filters: [...Be, ...[Ac(Mt, ua)].filter((e) => e !== null)],
4046
4054
  sort: X,
4047
4055
  columns: [
4048
4056
  ...ve.map((e, t) => {
@@ -4200,13 +4208,13 @@ function M0({
4200
4208
  if (!Pa) {
4201
4209
  Ar(!0);
4202
4210
  try {
4203
- const { rows: r, truncated: s } = await Nc(
4211
+ const { rows: r, truncated: s } = await Sc(
4204
4212
  (C, B) => u.request(
4205
4213
  G(`/items/${n}`, {
4206
4214
  limit: B,
4207
4215
  offset: C,
4208
4216
  ...Y ? { search: Y } : {},
4209
- sort: Sc(X),
4217
+ sort: Cc(X),
4210
4218
  ..._e ? { conditions: _e } : {}
4211
4219
  })
4212
4220
  )
@@ -4232,7 +4240,7 @@ function M0({
4232
4240
  labelField: Jn(Ne)
4233
4241
  });
4234
4242
  }
4235
- const x = [.../* @__PURE__ */ new Set([...Qn, ...i.flatMap(Cc)])], v = await $c(
4243
+ const x = [.../* @__PURE__ */ new Set([...Qn, ...i.flatMap($c)])], v = await qc(
4236
4244
  r.map((C) => String(C.id)),
4237
4245
  x,
4238
4246
  (C, B) => u.request(
@@ -4251,7 +4259,7 @@ function M0({
4251
4259
  ].map(String), j = /* @__PURE__ */ new Map();
4252
4260
  await Promise.all(
4253
4261
  U.map(
4254
- (C) => nc(u, C).then((B) => j.set(C.toUpperCase(), qc(B, C))).catch(() => j.set(C.toUpperCase(), C))
4262
+ (C) => ac(u, C).then((B) => j.set(C.toUpperCase(), Tc(B, C))).catch(() => j.set(C.toUpperCase(), C))
4255
4263
  )
4256
4264
  );
4257
4265
  const Le = new Map(i.map((C) => [C.column, C])), D = new Set(b), z = (C) => {
@@ -4273,7 +4281,7 @@ function M0({
4273
4281
  return Ne && wn ? Sl(wn, Ne) : wn;
4274
4282
  }
4275
4283
  const De = C[B], ml = Le.get(B);
4276
- return ml && De != null && De !== "" ? Tc(ml, v[String(C.id)]) || De : D.has(B) && De != null && De !== "" ? j.get(String(De).toUpperCase()) ?? De : De != null && De !== "" && ((Ne == null ? void 0 : Ne.type) === "number" || dr(B)) ? Ki(De) : De != null && De !== "" && ((Ne == null ? void 0 : Ne.type) === "datetime" || jo(B)) ? ji(De) : B === "id" ? Sr(A, C) ?? De : Ne && De != null ? Yn(String(De), Ne) : De;
4284
+ return ml && De != null && De !== "" ? Lc(ml, v[String(C.id)]) || De : D.has(B) && De != null && De !== "" ? j.get(String(De).toUpperCase()) ?? De : De != null && De !== "" && ((Ne == null ? void 0 : Ne.type) === "number" || dr(B)) ? Ki(De) : De != null && De !== "" && ((Ne == null ? void 0 : Ne.type) === "datetime" || jo(B)) ? ji(De) : B === "id" ? Sr(A, C) ?? De : Ne && De != null ? Yn(String(De), Ne) : De;
4277
4285
  }, p = Jt.filter((C) => C.kind !== "actions"), bt = new Set(
4278
4286
  p.filter((C) => C.kind !== "data" && C.kind !== "formula").map((C) => C.kind)
4279
4287
  ), tt = r.map((C) => String(C.id)), At = await Bi(tt, bt, {
@@ -4328,7 +4336,7 @@ function M0({
4328
4336
  `)], { type: "text/csv;charset=utf-8" }), nt = URL.createObjectURL(O), W = document.createElement("a");
4329
4337
  W.href = nt;
4330
4338
  const ye = Pe.export_filename, se = ((t = dt.find((C) => C.id === Ht)) == null ? void 0 : t.name) ?? "all";
4331
- W.download = ye ? `${ye.replace(/\{\{\s*collection\s*\}\}/g, n).replace(/\{\{\s*view\s*\}\}/g, se).replace(/\{\{\s*date\s*\}\}/g, Lc()).replace(/[^A-Za-z0-9 ._-]/g, "")}.csv` : `${n}.csv`, W.click(), setTimeout(() => URL.revokeObjectURL(nt), 1e4), s && ge.warning(`Exported the first ${r.length.toLocaleString()} rows`, {
4339
+ W.download = ye ? `${ye.replace(/\{\{\s*collection\s*\}\}/g, n).replace(/\{\{\s*view\s*\}\}/g, se).replace(/\{\{\s*date\s*\}\}/g, Fc()).replace(/[^A-Za-z0-9 ._-]/g, "")}.csv` : `${n}.csv`, W.click(), setTimeout(() => URL.revokeObjectURL(nt), 1e4), s && ge.warning(`Exported the first ${r.length.toLocaleString()} rows`, {
4332
4340
  description: `${Re.toLocaleString()} match — narrow the filter to export the rest.`
4333
4341
  });
4334
4342
  } catch (r) {
@@ -4372,7 +4380,7 @@ function M0({
4372
4380
  ...((b = r.currentTarget.parentElement) == null ? void 0 : b.querySelectorAll(
4373
4381
  ":scope > [data-row-open]"
4374
4382
  )) ?? []
4375
- ], l = Mc(s.length, s.indexOf(r.currentTarget), r.key), i = l === null ? null : s[l];
4383
+ ], l = Oc(s.length, s.indexOf(r.currentTarget), r.key), i = l === null ? null : s[l];
4376
4384
  i && (i.focus(), (x = i.scrollIntoView) == null || x.call(i, { block: "nearest" }));
4377
4385
  }
4378
4386
  };
@@ -4446,7 +4454,7 @@ function M0({
4446
4454
  const t = yt.get(e.key.split(".")[0]);
4447
4455
  return { key: e.key, shape: Yd(t == null ? void 0 : t.type, t == null ? void 0 : t.interface) };
4448
4456
  }
4449
- return { key: e.key, shape: Qu[e.kind] ?? "short" };
4457
+ return { key: e.key, shape: Hu[e.kind] ?? "short" };
4450
4458
  }), Hs = [
4451
4459
  ...Vn ? [{ key: "__state__", label: "State" }] : [],
4452
4460
  ...ve.filter((e) => Ut(e) || !ot(Ge, n, e)).map((e) => ({ key: e, label: Ze(e) }))
@@ -4474,7 +4482,7 @@ function M0({
4474
4482
  if (r.push({ kind: "header", gkey: s, label: s, count: l.length }), !Fn.has(s)) for (const i of l) r.push({ kind: "row", row: i });
4475
4483
  }
4476
4484
  return r;
4477
- })(), [ii, di] = _(null), ci = Pc(Ys, ii), fr = Jt.filter((e) => $t(e.key) === "left").map((e) => e.key), Js = Jt.filter((e) => $t(e.key) === "right").map((e) => e.key), br = fe(/* @__PURE__ */ new Map()), [Hn, ui] = _({});
4485
+ })(), [ii, di] = _(null), ci = Mc(Ys, ii), fr = Jt.filter((e) => $t(e.key) === "left").map((e) => e.key), Js = Jt.filter((e) => $t(e.key) === "right").map((e) => e.key), br = fe(/* @__PURE__ */ new Map()), [Hn, ui] = _({});
4478
4486
  Li(() => {
4479
4487
  const e = {};
4480
4488
  for (const [r, s] of br.current)
@@ -4774,8 +4782,8 @@ function M0({
4774
4782
  [data-cbv] .cbv-overlay { animation: none; opacity: 1; }
4775
4783
  }
4776
4784
  ` }),
4777
- /* @__PURE__ */ a(ku, {}),
4778
- /* @__PURE__ */ a(kc, {}),
4785
+ /* @__PURE__ */ a(wu, {}),
4786
+ /* @__PURE__ */ a(yc, {}),
4779
4787
  ie && Wl(
4780
4788
  /* @__PURE__ */ c(
4781
4789
  "div",
@@ -4911,7 +4919,7 @@ function M0({
4911
4919
  ),
4912
4920
  /* @__PURE__ */ c("div", { className: "flex shrink-0 flex-wrap items-center gap-2 border-b border-slate-200 bg-white px-4 py-2.5 dark:border-slate-700 dark:bg-slate-900", children: [
4913
4921
  /* @__PURE__ */ a(
4914
- ju,
4922
+ zu,
4915
4923
  {
4916
4924
  collection: n,
4917
4925
  meta: A,
@@ -4965,8 +4973,8 @@ function M0({
4965
4973
  e.id
4966
4974
  );
4967
4975
  }),
4968
- /* @__PURE__ */ a(fu, { className: "h-8" }),
4969
- /* @__PURE__ */ a(Yc, {}),
4976
+ /* @__PURE__ */ a(hu, { className: "h-8" }),
4977
+ /* @__PURE__ */ a(Gc, {}),
4970
4978
  tr > 0 && /* @__PURE__ */ c(
4971
4979
  "button",
4972
4980
  {
@@ -4996,9 +5004,9 @@ function M0({
4996
5004
  children: /* @__PURE__ */ a(yr, { className: `h-4 w-4 ${ft ? "animate-spin" : ""}` })
4997
5005
  }
4998
5006
  ),
4999
- /* @__PURE__ */ a(ou, { listKey: `cbv:${n}`, getState: Wo }),
5007
+ /* @__PURE__ */ a(du, { listKey: `cbv:${n}`, getState: Wo }),
5000
5008
  Ct && Pe.copy_as !== !1 && /* @__PURE__ */ a(
5001
- yc,
5009
+ wc,
5002
5010
  {
5003
5011
  collection: n,
5004
5012
  list: {
@@ -5012,7 +5020,7 @@ function M0({
5012
5020
  }
5013
5021
  ),
5014
5022
  An.parent && /* @__PURE__ */ a(
5015
- Dc,
5023
+ Pc,
5016
5024
  {
5017
5025
  parent: An.parent,
5018
5026
  value: cs,
@@ -5312,7 +5320,7 @@ function M0({
5312
5320
  }
5313
5321
  ),
5314
5322
  oe === e && /* @__PURE__ */ c("div", { className: "mb-1 ml-5 mr-1 rounded-md border border-slate-100 bg-slate-50 p-1.5 dark:border-slate-800 dark:bg-slate-800/60", children: [
5315
- /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1", children: Nu.map((s) => {
5323
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1", children: Cu.map((s) => {
5316
5324
  const l = JSON.stringify(xe[e] ?? null) === JSON.stringify(s.cfg);
5317
5325
  return /* @__PURE__ */ a(
5318
5326
  "button",
@@ -5463,7 +5471,7 @@ function M0({
5463
5471
  A && /* @__PURE__ */ c("div", { className: "mt-1 border-t border-slate-100 pt-1.5 dark:border-slate-800", children: [
5464
5472
  /* @__PURE__ */ a("p", { className: "px-1.5 pb-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "+ Related column" }),
5465
5473
  /* @__PURE__ */ a(
5466
- Bu,
5474
+ Qu,
5467
5475
  {
5468
5476
  collection: n,
5469
5477
  meta: A,
@@ -5477,7 +5485,7 @@ function M0({
5477
5485
  /* @__PURE__ */ c("div", { className: "mt-1 border-t border-slate-100 pt-1.5 dark:border-slate-800", children: [
5478
5486
  /* @__PURE__ */ a("p", { className: "px-1.5 pb-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "+ Formula column" }),
5479
5487
  /* @__PURE__ */ a(
5480
- Fc,
5488
+ Rc,
5481
5489
  {
5482
5490
  fields: Et.map((e) => e.field),
5483
5491
  onAdd: (e, t) => {
@@ -5804,7 +5812,7 @@ ${r}`).then(() => {
5804
5812
  )
5805
5813
  ] }),
5806
5814
  Ia && /* @__PURE__ */ a(
5807
- au,
5815
+ su,
5808
5816
  {
5809
5817
  collection: n,
5810
5818
  layoutSlug: Ia.slug,
@@ -5841,7 +5849,7 @@ ${r}`).then(() => {
5841
5849
  ] }),
5842
5850
  Pt.length > 0 && /* @__PURE__ */ c("div", { className: "flex shrink-0 flex-wrap items-center gap-1.5 border-b border-slate-100 bg-white px-4 py-1.5 dark:border-slate-800 dark:bg-slate-900", children: [
5843
5851
  Pt.map((e) => /* @__PURE__ */ a(
5844
- Du,
5852
+ Ou,
5845
5853
  {
5846
5854
  def: e,
5847
5855
  allowedIds: es(e),
@@ -5977,7 +5985,7 @@ ${r}`).then(() => {
5977
5985
  }
5978
5986
  ),
5979
5987
  Ct && /* @__PURE__ */ a(
5980
- Kc,
5988
+ jc,
5981
5989
  {
5982
5990
  name: e.name,
5983
5991
  isDefault: !!e.is_default,
@@ -5994,7 +6002,7 @@ ${r}`).then(() => {
5994
6002
  confirmTitle: e.is_default || e.default_for_role ? `Delete "${e.name}"? Everyone who uses it as their default loses it` : `Delete the view "${e.name}"?`,
5995
6003
  onConfirm: () => Yo.mutate(e.id),
5996
6004
  className: "hover:text-red-500",
5997
- armedClassName: "rounded bg-red-600 px-1.5 text-[11px] font-semibold text-white dark:text-white",
6005
+ armedClassName: "rounded bg-red-50 px-1.5 text-[11px] font-semibold text-red-700 ring-1 ring-inset ring-red-200 hover:bg-red-100 hover:text-red-800 dark:bg-red-500/15 dark:text-red-300 dark:ring-red-500/30 dark:hover:bg-red-500/25 dark:hover:text-red-200",
5998
6006
  children: "✕"
5999
6007
  }
6000
6008
  )
@@ -6054,7 +6062,7 @@ ${r}`).then(() => {
6054
6062
  ] }),
6055
6063
  et != null && /* @__PURE__ */ c("div", { className: "mx-4 mt-3 flex flex-wrap items-center gap-3 rounded-md border border-red-200 bg-red-50 px-4 py-2.5 text-[13px] text-red-700 dark:border-red-900/40 dark:bg-red-900/10 dark:text-red-400", children: [
6056
6064
  /* @__PURE__ */ a("span", { className: "min-w-0 flex-1", children: Td(et) === 503 ? Ld(et) : Zt(et, "Failed to load records") }),
6057
- (et == null ? void 0 : et.status) === 403 && !Ac(et) && /* @__PURE__ */ a(
6065
+ (et == null ? void 0 : et.status) === 403 && !Ic(et) && /* @__PURE__ */ a(
6058
6066
  "button",
6059
6067
  {
6060
6068
  type: "button",
@@ -6071,7 +6079,7 @@ ${r}`).then(() => {
6071
6079
  {
6072
6080
  type: "button",
6073
6081
  onClick: () => {
6074
- const t = Ic(e, { filters: Be, sort: X, colFilters: Ve });
6082
+ const t = Kc(e, { filters: Be, sort: X, colFilters: Ve });
6075
6083
  Se(t.filters), $e(t.sort), Qt(t.colFilters), T(1);
6076
6084
  },
6077
6085
  title: `Remove the filter or sort on "${e}" — this list cannot filter on it`,
@@ -6096,7 +6104,7 @@ ${r}`).then(() => {
6096
6104
  )
6097
6105
  ] }),
6098
6106
  qt === "tree" && In ? /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", children: /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900", children: /* @__PURE__ */ a(
6099
- _c,
6107
+ Nc,
6100
6108
  {
6101
6109
  collection: n,
6102
6110
  config: In,
@@ -6109,7 +6117,7 @@ ${r}`).then(() => {
6109
6117
  }
6110
6118
  ) }) }) : qt && (K != null && K.some((e) => e.key === qt)) ? /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", "data-cbv-extra-view": qt, children: (pl = K.find((e) => e.key === qt)) == null ? void 0 : pl.render() }) : null,
6111
6119
  oa && hn ? /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", children: /* @__PURE__ */ a(
6112
- cu,
6120
+ pu,
6113
6121
  {
6114
6122
  collection: n,
6115
6123
  latField: hn.latField,
@@ -6146,7 +6154,7 @@ ${r}`).then(() => {
6146
6154
  /* @__PURE__ */ a(yr, { "aria-hidden": !0, className: "h-3.5 w-3.5 animate-spin text-[#00a5cc]" }),
6147
6155
  ws != null ? `${Ga.text ?? "Still working"} — ${ws}s` : "Loading…"
6148
6156
  ] }) }) }),
6149
- ia && Ga.slow && /* @__PURE__ */ a("div", { className: "pointer-events-none absolute inset-x-0 top-12 z-[6] flex justify-center px-4", children: /* @__PURE__ */ a(vu, { reason: Ga, variant: "pill" }) }),
6157
+ ia && Ga.slow && /* @__PURE__ */ a("div", { className: "pointer-events-none absolute inset-x-0 top-12 z-[6] flex justify-center px-4", children: /* @__PURE__ */ a(yu, { reason: Ga, variant: "pill" }) }),
6150
6158
  /* @__PURE__ */ a(
6151
6159
  "div",
6152
6160
  {
@@ -6312,7 +6320,7 @@ ${r}`).then(() => {
6312
6320
  className: s,
6313
6321
  "data-aging-filter": !0,
6314
6322
  children: /* @__PURE__ */ a(
6315
- Hc,
6323
+ Jc,
6316
6324
  {
6317
6325
  layout: "cell",
6318
6326
  def: {
@@ -6409,7 +6417,7 @@ ${r}`).then(() => {
6409
6417
  // #3229 — one placeholder per real column, real row height (h-8, or the
6410
6418
  // table's comfortable h-11), real pins/widths: nothing moves on arrival.
6411
6419
  /* @__PURE__ */ a(
6412
- xu,
6420
+ ku,
6413
6421
  {
6414
6422
  columns: li,
6415
6423
  rows: Math.min(He, 20),
@@ -6483,7 +6491,7 @@ ${r}`).then(() => {
6483
6491
  }
6484
6492
  ),
6485
6493
  /* @__PURE__ */ a(
6486
- Rc,
6494
+ Ec,
6487
6495
  {
6488
6496
  term: Y,
6489
6497
  collection: n,
@@ -6546,10 +6554,10 @@ ${r}`).then(() => {
6546
6554
  ...No({ collection: n, id: String(l) }),
6547
6555
  ...ei(l),
6548
6556
  "data-row-key": String(l),
6549
- title: Ot.titleFor(String(l)) ?? (U && !U.is_mine ? Nd(U) : void 0) ?? (x ? `At risk — ${x.rule}` : void 0) ?? (j ? mu : void 0),
6557
+ title: Ot.titleFor(String(l)) ?? (U && !U.is_mine ? Nd(U) : void 0) ?? (x ? `At risk — ${x.rule}` : void 0) ?? (j ? bu : void 0),
6550
6558
  "data-picker-excluded": j ? "" : void 0,
6551
6559
  style: r,
6552
- className: `nvr-row-enter group h-8 cursor-pointer border-b border-slate-100 transition-colors duration-150 hover:bg-nvr-cyan/[0.04] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan dark:border-slate-800 dark:hover:bg-nvr-cyan/[0.08] ${i ? "bg-nvr-cyan/[0.08]" : Le ?? ""} ${j ? pu : ""}`,
6560
+ className: `nvr-row-enter group h-8 cursor-pointer border-b border-slate-100 transition-colors duration-150 hover:bg-nvr-cyan/[0.04] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan dark:border-slate-800 dark:hover:bg-nvr-cyan/[0.08] ${i ? "bg-nvr-cyan/[0.08]" : Le ?? ""} ${j ? fu : ""}`,
6553
6561
  children: [
6554
6562
  Dt && /* @__PURE__ */ a(
6555
6563
  "td",
@@ -6558,20 +6566,20 @@ ${r}`).then(() => {
6558
6566
  onClick: (J) => J.stopPropagation(),
6559
6567
  children: /* @__PURE__ */ c("span", { className: "flex items-center gap-1", children: [
6560
6568
  U || Ot.isNew(String(l)) ? /* @__PURE__ */ a(
6561
- lu,
6569
+ iu,
6562
6570
  {
6563
6571
  lock: U,
6564
6572
  isNew: Ot.isNew(String(l)),
6565
6573
  dataAttr: "data-cbv-live-mark"
6566
6574
  }
6567
6575
  ) : Ns[ql(n, String(l))] ? /* @__PURE__ */ a(
6568
- gu,
6576
+ vu,
6569
6577
  {
6570
6578
  viewers: Ns[ql(n, String(l))],
6571
6579
  dataAttr: "data-cbv-presence"
6572
6580
  }
6573
6581
  ) : /* @__PURE__ */ a(Ol, { change: v, dataAttr: "data-cbv-unseen" }),
6574
- /* @__PURE__ */ a(hc, { rowId: l }),
6582
+ /* @__PURE__ */ a(gc, { rowId: l }),
6575
6583
  kt && /* @__PURE__ */ a(
6576
6584
  "input",
6577
6585
  {
@@ -6654,9 +6662,9 @@ ${r}`).then(() => {
6654
6662
  "td",
6655
6663
  {
6656
6664
  style: Oe(p),
6657
- "data-tip": W != null && (O != null && O.entered_at) ? `In ${O.state_label ?? "this state"} since ${sc(O.entered_at)}` : void 0,
6665
+ "data-tip": W != null && (O != null && O.entered_at) ? `In ${O.state_label ?? "this state"} since ${lc(O.entered_at)}` : void 0,
6658
6666
  className: `whitespace-nowrap px-3 py-1.5 text-[12px] tabular-nums text-slate-600 dark:text-slate-300 ${ct(p, "z-[1]", D)}`,
6659
- children: W == null ? /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : rc(W)
6667
+ children: W == null ? /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : sc(W)
6660
6668
  },
6661
6669
  p
6662
6670
  );
@@ -6685,7 +6693,7 @@ ${r}`).then(() => {
6685
6693
  {
6686
6694
  style: Oe(p),
6687
6695
  className: `whitespace-nowrap px-3 py-1.5 ${ct(p, "z-[1]", D)}`,
6688
- children: /* @__PURE__ */ a($u, { summary: O })
6696
+ children: /* @__PURE__ */ a(Tu, { summary: O })
6689
6697
  },
6690
6698
  p
6691
6699
  );
@@ -6698,11 +6706,11 @@ ${r}`).then(() => {
6698
6706
  className: `whitespace-nowrap px-3 py-1.5 ${ct(p, "z-[1]", D)}`,
6699
6707
  onClick: (O) => O.stopPropagation(),
6700
6708
  children: /* @__PURE__ */ a(
6701
- Jc,
6709
+ Xc,
6702
6710
  {
6703
6711
  collection: n,
6704
6712
  itemId: String(l),
6705
- figures: Gc(
6713
+ figures: Zc(
6706
6714
  s[Fe.shipped_field],
6707
6715
  s[Fe.requested_field]
6708
6716
  ),
@@ -6718,7 +6726,7 @@ ${r}`).then(() => {
6718
6726
  {
6719
6727
  style: Oe(p),
6720
6728
  className: `whitespace-nowrap px-3 py-1.5 ${ct(p, "z-[1]", D)}`,
6721
- children: /* @__PURE__ */ a(tu, { rows: or == null ? void 0 : or[String(l)] })
6729
+ children: /* @__PURE__ */ a(au, { rows: or == null ? void 0 : or[String(l)] })
6722
6730
  },
6723
6731
  p
6724
6732
  );
@@ -6767,7 +6775,7 @@ ${r}`).then(() => {
6767
6775
  className: `w-20 whitespace-nowrap px-2 py-1 text-right ${ct(p, "z-[1]", D)}`,
6768
6776
  onClick: (O) => O.stopPropagation(),
6769
6777
  children: /* @__PURE__ */ a(
6770
- Lu,
6778
+ Eu,
6771
6779
  {
6772
6780
  collection: n,
6773
6781
  id: l,
@@ -6945,9 +6953,9 @@ ${r}`).then(() => {
6945
6953
  )
6946
6954
  }
6947
6955
  ),
6948
- /* @__PURE__ */ a(Xc, { scrollerRef: Br }),
6956
+ /* @__PURE__ */ a(eu, { scrollerRef: Br }),
6949
6957
  /* @__PURE__ */ a(
6950
- hu,
6958
+ xu,
6951
6959
  {
6952
6960
  collections: n ? [n] : [],
6953
6961
  selectedIds: Mt,
@@ -7064,7 +7072,7 @@ ${r}`).then(() => {
7064
7072
  }
7065
7073
  ),
7066
7074
  lt != null && lt.length ? /* @__PURE__ */ a(
7067
- bu,
7075
+ gu,
7068
7076
  {
7069
7077
  collection: lt[0].collection,
7070
7078
  itemId: lt[0].itemId,
@@ -7076,7 +7084,7 @@ ${r}`).then(() => {
7076
7084
  }
7077
7085
  ) : null,
7078
7086
  Tn && /* @__PURE__ */ a(
7079
- yu,
7087
+ _u,
7080
7088
  {
7081
7089
  collection: n,
7082
7090
  item: Tn,
@@ -7105,7 +7113,7 @@ ${r}`).then(() => {
7105
7113
  )
7106
7114
  ] }),
7107
7115
  Dt && kt && an.length > 0 && /* @__PURE__ */ a(
7108
- zu,
7116
+ Vu,
7109
7117
  {
7110
7118
  collection: n,
7111
7119
  selectedIds: an,
@@ -7122,18 +7130,18 @@ ${r}`).then(() => {
7122
7130
  }
7123
7131
  );
7124
7132
  }
7125
- function Wu(n, o, h, d, w) {
7133
+ function Yu(n, o, h, d, w) {
7126
7134
  const S = Er(o, n, h);
7127
7135
  return S != null && S.one_collection ? /* @__PURE__ */ a(Dr, { relatedCollection: S.one_collection, id: d }) : Wi(d, w);
7128
7136
  }
7129
7137
  export {
7130
- M0 as CollectionBrowserView,
7138
+ j0 as CollectionBrowserView,
7131
7139
  Ra as MultiPick,
7132
- Lu as RowActionsMenu,
7140
+ Eu as RowActionsMenu,
7133
7141
  Kl as TINT_TEXT,
7134
- Wu as compareCell,
7142
+ Yu as compareCell,
7135
7143
  Ca as invalidateCbvRowQueries,
7136
- Tu as roleMayDelete,
7137
- qu as roleMayUpdate,
7144
+ Ru as roleMayDelete,
7145
+ Fu as roleMayUpdate,
7138
7146
  wa as tintFor
7139
7147
  };
@@ -0,0 +1,46 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useQuery as c } from "@tanstack/react-query";
3
+ import { useNivaroClient as d, useApiFetchConfig as p } from "../context.js";
4
+ import { get as u } from "../lib/commands.js";
5
+ import { relatedMissing as m } from "./item-edit/related-missing.js";
6
+ function k({ id: n }) {
7
+ const l = d(), { apiBase: i } = p(), a = n != null && n !== "", { data: e, isPending: s } = c({
8
+ queryKey: ["cbv-file-meta", String(n)],
9
+ queryFn: () => l.request(
10
+ u(`/files/${encodeURIComponent(String(n))}/meta`)
11
+ ).then((t) => t.data ?? null).catch(() => null),
12
+ enabled: a,
13
+ staleTime: 5 * 6e4,
14
+ retry: !1
15
+ });
16
+ if (!a) return /* @__PURE__ */ r("span", { className: "text-[12px] text-slate-300", children: "—" });
17
+ if (s)
18
+ return /* @__PURE__ */ r("span", { className: "inline-block h-3.5 w-24 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" });
19
+ const o = (e == null ? void 0 : e.title) || (e == null ? void 0 : e.filename_download);
20
+ if (!o) {
21
+ const t = m(null);
22
+ return /* @__PURE__ */ r(
23
+ "span",
24
+ {
25
+ "data-relation-missing": !0,
26
+ "data-tip": t.tip,
27
+ className: "text-[12px] italic text-slate-500 dark:text-slate-400",
28
+ children: t.text
29
+ }
30
+ );
31
+ }
32
+ return /* @__PURE__ */ r(
33
+ "a",
34
+ {
35
+ href: `${i}/files/${encodeURIComponent(String(n))}`,
36
+ target: "_blank",
37
+ rel: "noreferrer",
38
+ onClick: (t) => t.stopPropagation(),
39
+ className: "text-[12px] text-slate-700 underline decoration-slate-300 underline-offset-2 transition-colors hover:text-[#007a99] hover:decoration-[#007a99] dark:text-slate-200 dark:decoration-slate-600 dark:hover:text-nvr-cyan dark:hover:decoration-nvr-cyan",
40
+ children: o
41
+ }
42
+ );
43
+ }
44
+ export {
45
+ k as CbvFileLabel
46
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nivaro/react",
3
- "version": "0.3.101",
3
+ "version": "0.3.103",
4
4
  "description": "React hooks and components for Nivaro CMS forms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",