@nivaro/react 0.3.56 → 0.3.58

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 (55) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +9 -2
  4. package/dist/shared/components/CollectionBrowserView.js +2827 -2750
  5. package/dist/shared/components/DataTable.js +247 -236
  6. package/dist/shared/components/ItemEditForm.js +1693 -1668
  7. package/dist/shared/components/ProfileView.js +716 -715
  8. package/dist/shared/components/RecordReadView.js +367 -364
  9. package/dist/shared/components/ReportView.js +64 -39
  10. package/dist/shared/components/alerts/AlertManagerView.js +284 -271
  11. package/dist/shared/components/cbv/row-focus.js +19 -0
  12. package/dist/shared/components/help-videos/HelpVideoPlayer.js +152 -147
  13. package/dist/shared/components/integrations/console/SignalCard.js +59 -59
  14. package/dist/shared/components/integrations/console/tone.js +52 -30
  15. package/dist/shared/components/item-edit/CatalogPickerField.js +525 -505
  16. package/dist/shared/components/item-edit/FieldRow.js +175 -173
  17. package/dist/shared/components/item-edit/InlineTableField.js +407 -402
  18. package/dist/shared/components/item-edit/M2MCombobox.js +313 -291
  19. package/dist/shared/components/item-edit/MidairCollisionDialog.js +1 -1
  20. package/dist/shared/components/item-edit/PlanGrid.js +826 -803
  21. package/dist/shared/components/item-edit/QuickCreateButton.js +115 -79
  22. package/dist/shared/components/item-edit/RecordLiveSync.js +77 -75
  23. package/dist/shared/components/item-edit/RelationCombobox.js +412 -328
  24. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +147 -125
  25. package/dist/shared/components/item-edit/SummaryPanel.js +406 -392
  26. package/dist/shared/components/item-edit/option-disambiguate.js +44 -32
  27. package/dist/shared/components/item-edit/related-missing.js +45 -0
  28. package/dist/shared/components/item-edit/save-outcome.js +5 -5
  29. package/dist/shared/components/notifications/NotificationRulesEditor.js +130 -123
  30. package/dist/shared/components/panels/AccessDeniedPanel.js +52 -48
  31. package/dist/shared/components/panels/ItemLockBanner.js +2 -3
  32. package/dist/shared/components/panels/PipelinePanel.js +1027 -978
  33. package/dist/shared/components/panels/RevisionsPanel.js +4 -1
  34. package/dist/shared/components/panels/TaskPanel.js +265 -249
  35. package/dist/shared/components/panels/landing-state.js +27 -0
  36. package/dist/shared/components/pipeline/PipelineEditorView.js +86 -78
  37. package/dist/shared/components/profile/AiMemoryCard.js +12 -10
  38. package/dist/shared/components/queue/OwnerAvatars.js +80 -41
  39. package/dist/shared/components/queue/QueueItemSheet.js +111 -111
  40. package/dist/shared/components/queue/QueueQuickFilters.js +48 -48
  41. package/dist/shared/components/queue/QueueWorklist.js +975 -964
  42. package/dist/shared/components/queue/group-sums.js +27 -0
  43. package/dist/shared/components/queue/live-state-aspect.js +7 -3
  44. package/dist/shared/components/queue/path-label.js +14 -0
  45. package/dist/shared/components/widgets/ReviewListWidget.js +186 -168
  46. package/dist/shared/lib/back-closes.js +25 -0
  47. package/dist/shared/lib/cbv-page-warm.js +36 -0
  48. package/dist/shared/lib/form-usage-beacon.js +7 -7
  49. package/dist/shared/lib/list-page-memory.js +41 -0
  50. package/dist/shared/lib/live.js +44 -44
  51. package/dist/shared/lib/own-writes.js +76 -28
  52. package/dist/shared/lib/record-ref.js +78 -53
  53. package/dist/shared/lib/request-gate.js +110 -109
  54. package/dist/shared/lib/validation-rules.js +34 -19
  55. package/package.json +1 -1
@@ -1,8 +1,25 @@
1
- import { jsx as a, jsxs as l } from "react/jsx-runtime";
2
- import { UserAvatar as m } from "../UserAvatar.js";
3
- import { useState as x } from "react";
4
- import { cn as i } from "../../lib/utils.js";
5
- import { Popover as h, PopoverTrigger as u, PopoverContent as b } from "../ui/popover.js";
1
+ import { jsx as a, jsxs as i } from "react/jsx-runtime";
2
+ import { useState as u } from "react";
3
+ import { cn as l } from "../../lib/utils.js";
4
+ import { UserAvatar as h } from "../UserAvatar.js";
5
+ import { Popover as b, PopoverTrigger as v, PopoverContent as k } from "../ui/popover.js";
6
+ const g = {
7
+ suspended: "suspended",
8
+ former: "former user"
9
+ };
10
+ function N(e) {
11
+ return e.inactive ? `${e.name} (${g[e.inactive]})` : e.name;
12
+ }
13
+ function f({ owner: e }) {
14
+ return e.inactive ? /* @__PURE__ */ a(
15
+ "span",
16
+ {
17
+ "data-owner-inactive": e.inactive,
18
+ className: "ml-1 shrink-0 rounded bg-slate-100 px-1 py-px text-[10px] font-medium text-slate-600 dark:bg-muted dark:text-slate-300",
19
+ children: g[e.inactive]
20
+ }
21
+ ) : null;
22
+ }
6
23
  const o = [
7
24
  { bg: "#e0f2fe", fg: "#075985" },
8
25
  // sky
@@ -29,88 +46,110 @@ const o = [
29
46
  { bg: "#f3e8ff", fg: "#6b21a8" }
30
47
  // purple
31
48
  ];
32
- function k(e) {
33
- let t = 0;
34
- for (let r = 0; r < e.length; r++) t = t * 31 + e.charCodeAt(r) | 0;
35
- return o[Math.abs(t) % o.length];
49
+ function y(e) {
50
+ let n = 0;
51
+ for (let r = 0; r < e.length; r++) n = n * 31 + e.charCodeAt(r) | 0;
52
+ return o[Math.abs(n) % o.length];
36
53
  }
37
- function v(e) {
38
- const t = e.trim().split(/\s+/);
39
- return t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
54
+ function C(e) {
55
+ const n = e.trim().split(/\s+/);
56
+ return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
40
57
  }
41
- function f({ owner: e, className: t }) {
42
- const r = k(e.id);
58
+ function d({ owner: e, className: n }) {
59
+ const r = y(e.id);
43
60
  return /* @__PURE__ */ a(
44
- m,
61
+ h,
45
62
  {
46
63
  userId: e.id,
47
64
  alt: e.name,
48
- className: i("h-[22px] w-[22px] ring-2 ring-white dark:ring-card", t),
65
+ className: l("h-[22px] w-[22px] ring-2 ring-white dark:ring-card", n),
49
66
  fallback: /* @__PURE__ */ a(
50
67
  "span",
51
68
  {
52
69
  title: e.name,
53
- className: i(
70
+ className: l(
54
71
  "inline-flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-full text-[9px] font-semibold ring-2 ring-white dark:ring-card",
55
- t
72
+ n
56
73
  ),
57
74
  style: { backgroundColor: r.bg, color: r.fg },
58
- children: v(e.name)
75
+ children: C(e.name)
59
76
  }
60
77
  )
61
78
  }
62
79
  );
63
80
  }
64
- function O({
81
+ function T({
65
82
  owners: e,
66
- max: t = 4,
83
+ max: n = 4,
67
84
  emptyLabel: r = "No owners"
68
85
  }) {
69
- const [g, p] = x(!1);
86
+ const [p, m] = u(!1);
70
87
  if (e.length === 0)
71
88
  return /* @__PURE__ */ a("span", { className: "text-[12px] text-slate-300 dark:text-muted-foreground", children: r });
72
- const s = e.slice(0, t), c = e.length - s.length;
73
- return /* @__PURE__ */ l(h, { open: g, onOpenChange: p, children: [
74
- /* @__PURE__ */ a(u, { asChild: !0, children: /* @__PURE__ */ l(
89
+ const c = e.slice(0, n), s = e.length - c.length;
90
+ return /* @__PURE__ */ i(b, { open: p, onOpenChange: m, children: [
91
+ /* @__PURE__ */ a(v, { asChild: !0, children: /* @__PURE__ */ i(
75
92
  "button",
76
93
  {
77
94
  type: "button",
78
- onClick: (n) => n.stopPropagation(),
79
- "aria-label": `${e.length} owner${e.length === 1 ? "" : "s"}: ${e.map((n) => n.name).join(", ")}`,
95
+ onClick: (t) => t.stopPropagation(),
96
+ "aria-label": `${e.length} owner${e.length === 1 ? "" : "s"}: ${e.map(N).join(", ")}`,
80
97
  className: "group/owners flex items-center rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan",
81
98
  children: [
82
- /* @__PURE__ */ l("span", { className: "flex items-center transition-[gap]", children: [
83
- s.map((n, d) => /* @__PURE__ */ a(f, { owner: n, className: i(d > 0 && "-ml-1.5") }, n.id)),
84
- c > 0 && /* @__PURE__ */ l("span", { className: "-ml-1.5 inline-flex h-[22px] min-w-[22px] shrink-0 items-center justify-center rounded-full bg-slate-100 px-1 text-[9px] font-semibold text-slate-600 ring-2 ring-white dark:bg-muted dark:text-slate-300 dark:ring-card", children: [
99
+ /* @__PURE__ */ i("span", { className: "flex items-center transition-[gap]", children: [
100
+ c.map((t, x) => /* @__PURE__ */ a(
101
+ d,
102
+ {
103
+ owner: t,
104
+ className: l(x > 0 && "-ml-1.5", t.inactive && "opacity-50 grayscale")
105
+ },
106
+ t.id
107
+ )),
108
+ s > 0 && /* @__PURE__ */ i("span", { className: "-ml-1.5 inline-flex h-[22px] min-w-[22px] shrink-0 items-center justify-center rounded-full bg-slate-100 px-1 text-[9px] font-semibold text-slate-600 ring-2 ring-white dark:bg-muted dark:text-slate-300 dark:ring-card", children: [
85
109
  "+",
86
- c
110
+ s
87
111
  ] })
88
112
  ] }),
89
- e.length === 1 && /* @__PURE__ */ a("span", { className: "ml-1.5 truncate text-[12px] text-slate-600 group-hover/owners:text-slate-800 dark:text-slate-300", children: e[0].name })
113
+ e.length === 1 && /* @__PURE__ */ i("span", { className: "ml-1.5 flex min-w-0 items-center", children: [
114
+ /* @__PURE__ */ a(
115
+ "span",
116
+ {
117
+ className: l(
118
+ "truncate text-[12px] text-slate-600 group-hover/owners:text-slate-800 dark:text-slate-300",
119
+ e[0].inactive && "line-through decoration-slate-400"
120
+ ),
121
+ children: e[0].name
122
+ }
123
+ ),
124
+ /* @__PURE__ */ a(f, { owner: e[0] })
125
+ ] }),
126
+ e.length > 1 && e.some((t) => t.inactive) && /* @__PURE__ */ a("span", { className: "ml-1.5 text-[10px] text-slate-500 dark:text-slate-400", children: e.every((t) => t.inactive) ? "none can act" : `${e.filter((t) => t.inactive).length} can’t act` })
90
127
  ]
91
128
  }
92
129
  ) }),
93
- /* @__PURE__ */ l(
94
- b,
130
+ /* @__PURE__ */ i(
131
+ k,
95
132
  {
96
133
  className: "w-[240px] p-1.5",
97
134
  align: "start",
98
- onClick: (n) => n.stopPropagation(),
135
+ onClick: (t) => t.stopPropagation(),
99
136
  children: [
100
- /* @__PURE__ */ l("p", { className: "px-2 pb-1 pt-0.5 text-[10px] font-medium uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: [
137
+ /* @__PURE__ */ i("p", { className: "px-2 pb-1 pt-0.5 text-[10px] font-medium uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: [
101
138
  e.length,
102
139
  " owner",
103
140
  e.length === 1 ? "" : "s"
104
141
  ] }),
105
- /* @__PURE__ */ a("div", { className: "max-h-[260px] space-y-0.5 overflow-y-auto", children: e.map((n) => /* @__PURE__ */ l("div", { className: "flex items-center gap-2 rounded px-2 py-1", children: [
106
- /* @__PURE__ */ a(f, { owner: n }),
107
- /* @__PURE__ */ a("span", { className: "truncate text-[12px] text-slate-700 dark:text-slate-200", children: n.name })
108
- ] }, n.id)) })
142
+ /* @__PURE__ */ a("div", { className: "max-h-[260px] space-y-0.5 overflow-y-auto", children: e.map((t) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2 rounded px-2 py-1", children: [
143
+ /* @__PURE__ */ a(d, { owner: t }),
144
+ /* @__PURE__ */ a("span", { className: "truncate text-[12px] text-slate-700 dark:text-slate-200", children: t.name }),
145
+ /* @__PURE__ */ a(f, { owner: t })
146
+ ] }, t.id)) })
109
147
  ]
110
148
  }
111
149
  )
112
150
  ] });
113
151
  }
114
152
  export {
115
- O as OwnerAvatars
153
+ T as OwnerAvatars,
154
+ N as ownerText
116
155
  };
@@ -1,126 +1,126 @@
1
- import { jsxs as n, jsx as r, Fragment as ee } from "react/jsx-runtime";
2
- import { useQueryClient as te, useQuery as Q, useMutation as $ } from "@tanstack/react-query";
3
- import { ExternalLink as re, ArrowRight as O } from "lucide-react";
4
- import { useState as q, useEffect as ae } from "react";
1
+ import { jsxs as n, jsx as r, Fragment as te } from "react/jsx-runtime";
2
+ import { useQueryClient as re, useQuery as j, useMutation as $ } from "@tanstack/react-query";
3
+ import { ExternalLink as ae, ArrowRight as H } from "lucide-react";
4
+ import { useState as q, useEffect as ne } from "react";
5
5
  import { toast as C } from "sonner";
6
- import { useNivaroClient as ne, useItemNavigation as oe } from "../../context.js";
7
- import { get as B, post as D } from "../../lib/commands.js";
6
+ import { useNivaroClient as oe, useItemNavigation as se } from "../../context.js";
7
+ import { get as O, post as B } from "../../lib/commands.js";
8
8
  import { formatMultiValue as de } from "../../lib/format-value.js";
9
- import { useLiveRecord as se, batchTouches as F, LIVE_ASPECTS as H } from "../../lib/live.js";
10
- import { userErrorMessage as ie } from "../../lib/safe-error.js";
11
- import { cn as V, formatRelative as le, humanHours as ce } from "../../lib/utils.js";
12
- import { transitionRequirementsFromError as me } from "../panels/PipelinePanel.js";
13
- import { TransitionRequirementsDialog as ue } from "../panels/TransitionRequirementsDialog.js";
14
- import { Badge as pe } from "../ui/badge.js";
15
- import { Sheet as be, SheetContent as xe, SheetHeader as he, SheetTitle as fe } from "../ui/sheet.js";
16
- import { OwnerAvatars as ge } from "./OwnerAvatars.js";
17
- import { useTransitionNote as ye, needsTransitionNote as ve } from "./transition-note.js";
18
- function ke(t) {
19
- return (t ?? []).filter((l) => l.in_row_menu !== !1);
20
- }
21
- function Ne(t) {
22
- return ce(t);
23
- }
9
+ import { useLiveRecord as ie, batchTouches as D, LIVE_ASPECTS as F } from "../../lib/live.js";
10
+ import { userErrorMessage as le } from "../../lib/safe-error.js";
11
+ import { cn as V, formatRelative as ce, humanHours as me } from "../../lib/utils.js";
12
+ import { transitionRequirementsFromError as ue } from "../panels/PipelinePanel.js";
13
+ import { TransitionRequirementsDialog as pe } from "../panels/TransitionRequirementsDialog.js";
14
+ import { Badge as be } from "../ui/badge.js";
15
+ import { Sheet as xe, SheetContent as he, SheetHeader as fe, SheetTitle as ge } from "../ui/sheet.js";
16
+ import { OwnerAvatars as ye } from "./OwnerAvatars.js";
17
+ import { pathHeader as ve } from "./path-label.js";
18
+ import { useTransitionNote as ke, needsTransitionNote as Ne } from "./transition-note.js";
24
19
  function we(t) {
25
- return t.split(".").map((l) => l.replace(/_/g, " ").replace(/\b\w/g, (g) => g.toUpperCase())).join(" → ");
20
+ return (t ?? []).filter((b) => b.in_row_menu !== !1);
21
+ }
22
+ function _e(t) {
23
+ return me(t);
26
24
  }
27
- function b({ label: t, children: l }) {
25
+ const qe = ve;
26
+ function p({ label: t, children: b }) {
28
27
  return /* @__PURE__ */ n("div", { className: "bg-white px-3 py-2.5 dark:bg-card", children: [
29
28
  /* @__PURE__ */ r("p", { className: "mb-0.5 text-[10px] font-medium uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: t }),
30
- /* @__PURE__ */ r("div", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: l })
29
+ /* @__PURE__ */ r("div", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: b })
31
30
  ] });
32
31
  }
33
- function De({
32
+ function Ve({
34
33
  item: t,
35
- onOpenChange: l,
36
- onClaim: g,
37
- onRelease: L,
38
- workNextActive: U,
34
+ onOpenChange: b,
35
+ onClaim: W,
36
+ onRelease: z,
37
+ workNextActive: G,
39
38
  onNext: S,
40
39
  refetchItems: I,
41
- stateLabels: y,
40
+ stateLabels: g,
42
41
  collectionLabel: T,
43
- claimsEnabled: W = !0,
42
+ claimsEnabled: J = !0,
44
43
  columnFormats: x,
45
- width: z,
46
- itemLayout: G
44
+ fieldLabel: y,
45
+ width: U,
46
+ itemLayout: X
47
47
  }) {
48
- var j;
49
- const h = te(), f = ne(), { open: J } = oe(), [v, M] = q(""), [c, k] = q(null), [N, m] = q(null), P = ye(), o = t == null ? void 0 : t.collection, d = t == null ? void 0 : t.item_id;
50
- ae(() => m(null), [o, d]);
51
- const { data: u } = Q({
52
- queryKey: ["queue-sheet-instance", o, d],
53
- queryFn: () => f.request(B(`/pipelines/instance/${o}/${d}`)).then((e) => e.data),
54
- enabled: !!o && !!d
55
- }), { data: p } = Q({
56
- queryKey: ["queue-sheet-comments", o, d],
57
- queryFn: () => f.request(B("/comments", { collection: o, item: d })).then((e) => ({ data: (e.data ?? []).filter((a) => !a.deleted) })).catch(() => ({ data: [] })),
58
- enabled: !!o && !!d
59
- }), s = $({
48
+ var K;
49
+ const h = re(), f = oe(), { open: Y } = se(), [v, M] = q(""), [l, k] = q(null), [N, c] = q(null), P = ke(), o = t == null ? void 0 : t.collection, s = t == null ? void 0 : t.item_id;
50
+ ne(() => c(null), [o, s]);
51
+ const { data: m } = j({
52
+ queryKey: ["queue-sheet-instance", o, s],
53
+ queryFn: () => f.request(O(`/pipelines/instance/${o}/${s}`)).then((e) => e.data),
54
+ enabled: !!o && !!s
55
+ }), { data: u } = j({
56
+ queryKey: ["queue-sheet-comments", o, s],
57
+ queryFn: () => f.request(O("/comments", { collection: o, item: s })).then((e) => ({ data: (e.data ?? []).filter((a) => !a.deleted) })).catch(() => ({ data: [] })),
58
+ enabled: !!o && !!s
59
+ }), d = $({
60
60
  mutationFn: ({ transitionId: e, comment: a }) => f.request(
61
- D(`/pipelines/instance/${o}/${d}/transition`, {
61
+ B(`/pipelines/instance/${o}/${s}/transition`, {
62
62
  transition_id: e,
63
63
  ...a ? { comment: a } : {}
64
64
  })
65
65
  ),
66
66
  onSuccess: () => {
67
- k(null), m(null), h.invalidateQueries({ queryKey: ["queue-sheet-instance", o, d] }), I(), C.success("Transitioned");
67
+ k(null), c(null), h.invalidateQueries({ queryKey: ["queue-sheet-instance", o, s] }), I(), C.success("Transitioned");
68
68
  },
69
- onError: (e, { transitionId: a, comment: Z }) => {
70
- m(null);
71
- const K = me(e);
72
- if (K) {
69
+ onError: (e, { transitionId: a, comment: ee }) => {
70
+ c(null);
71
+ const Q = ue(e);
72
+ if (Q) {
73
73
  k((_) => ({
74
- payload: K,
74
+ payload: Q,
75
75
  transitionId: a,
76
- comment: Z,
76
+ comment: ee,
77
77
  revision: ((_ == null ? void 0 : _.revision) ?? 0) + 1
78
78
  }));
79
79
  return;
80
80
  }
81
- C.error(ie(e, "Transition failed"));
81
+ C.error(le(e, "Transition failed"));
82
82
  }
83
83
  }), R = $({
84
- mutationFn: (e) => f.request(D("/comments", { collection: o, item: d, text: e })),
84
+ mutationFn: (e) => f.request(B("/comments", { collection: o, item: s, text: e })),
85
85
  onSuccess: () => {
86
- M(""), h.invalidateQueries({ queryKey: ["queue-sheet-comments", o, d] });
86
+ M(""), h.invalidateQueries({ queryKey: ["queue-sheet-comments", o, s] });
87
87
  },
88
88
  onError: () => C.error("Failed to post comment")
89
89
  });
90
- se(o, d, (e) => {
91
- F(e, H.state) && (h.invalidateQueries({ queryKey: ["queue-sheet-instance", o, d] }), e.own || I()), F(e, H.comments) && h.invalidateQueries({ queryKey: ["queue-sheet-comments", o, d] });
90
+ ie(o, s, (e) => {
91
+ D(e, F.state) && (h.invalidateQueries({ queryKey: ["queue-sheet-instance", o, s] }), e.own || I()), D(e, F.comments) && h.invalidateQueries({ queryKey: ["queue-sheet-comments", o, s] });
92
92
  });
93
- const w = ke(u == null ? void 0 : u.available_transitions), i = N && w.some((e) => e.id === N.id) ? N : null, A = new Map(((u == null ? void 0 : u.states) ?? []).map((e) => [e.id, e])), E = (e) => {
93
+ const w = we(m == null ? void 0 : m.available_transitions), i = N && w.some((e) => e.id === N.id) ? N : null, A = new Map(((m == null ? void 0 : m.states) ?? []).map((e) => [e.id, e])), E = (e) => {
94
94
  const a = A.get(e.to_state);
95
95
  return e.label || (a == null ? void 0 : a.label) || (a == null ? void 0 : a.key) || "Move";
96
- }, X = (e) => {
96
+ }, Z = (e) => {
97
97
  const a = A.get(e.to_state);
98
98
  return (a == null ? void 0 : a.label) || (a == null ? void 0 : a.key) || e.label || "the next step";
99
- }, Y = async (e) => {
100
- if (!s.isPending) {
101
- if (ve(e)) {
102
- m(null);
99
+ }, L = async (e) => {
100
+ if (!d.isPending) {
101
+ if (Ne(e)) {
102
+ c(null);
103
103
  const a = await P.ask(E(e));
104
104
  if (!a) return;
105
- s.mutate({ transitionId: e.id, comment: a });
105
+ d.mutate({ transitionId: e.id, comment: a });
106
106
  return;
107
107
  }
108
- m(e);
108
+ c(e);
109
109
  }
110
110
  };
111
- return /* @__PURE__ */ n(be, { open: !!t, onOpenChange: l, children: [
111
+ return /* @__PURE__ */ n(xe, { open: !!t, onOpenChange: b, children: [
112
112
  /* @__PURE__ */ r(
113
- xe,
113
+ he,
114
114
  {
115
115
  side: "right",
116
116
  className: "flex max-w-full flex-col gap-0 p-0",
117
- style: { width: z ?? 480, maxWidth: "96vw" },
118
- children: t && /* @__PURE__ */ n(ee, { children: [
119
- /* @__PURE__ */ r(he, { className: "shrink-0 border-b border-slate-200 px-5 py-4 dark:border-border", children: /* @__PURE__ */ n("div", { className: "flex items-start justify-between gap-3 pr-6", children: [
117
+ style: { width: U ?? 480, maxWidth: "96vw" },
118
+ children: t && /* @__PURE__ */ n(te, { children: [
119
+ /* @__PURE__ */ r(fe, { className: "shrink-0 border-b border-slate-200 px-5 py-4 dark:border-border", children: /* @__PURE__ */ n("div", { className: "flex items-start justify-between gap-3 pr-6", children: [
120
120
  /* @__PURE__ */ n("div", { className: "min-w-0", children: [
121
- /* @__PURE__ */ r(fe, { className: "truncate text-[15px] font-semibold", children: t.label }),
121
+ /* @__PURE__ */ r(ge, { className: "truncate text-[15px] font-semibold", children: t.label }),
122
122
  /* @__PURE__ */ n("div", { className: "mt-1.5 flex items-center gap-2", children: [
123
- /* @__PURE__ */ r(pe, { variant: "outline", children: T ? T(t.collection) : t.collection }),
123
+ /* @__PURE__ */ r(be, { variant: "outline", children: T ? T(t.collection) : t.collection }),
124
124
  t.state && /* @__PURE__ */ r(
125
125
  "span",
126
126
  {
@@ -129,7 +129,7 @@ function De({
129
129
  backgroundColor: t.state_color ? `${t.state_color}1a` : void 0,
130
130
  color: t.state_color ?? void 0
131
131
  },
132
- children: (y == null ? void 0 : y[t.state]) ?? t.state
132
+ children: (g == null ? void 0 : g[t.state]) ?? t.state
133
133
  }
134
134
  )
135
135
  ] })
@@ -138,24 +138,24 @@ function De({
138
138
  "button",
139
139
  {
140
140
  type: "button",
141
- onClick: () => J({
141
+ onClick: () => Y({
142
142
  collection: t.collection,
143
143
  itemId: t.item_id,
144
- layoutSlug: G ?? null
144
+ layoutSlug: X ?? null
145
145
  }),
146
146
  className: "flex shrink-0 items-center gap-1 text-[12px] font-medium text-nvr-navy hover:underline dark:text-nvr-cyan",
147
147
  children: [
148
148
  "Open ",
149
- /* @__PURE__ */ r(re, { className: "h-3 w-3" })
149
+ /* @__PURE__ */ r(ae, { className: "h-3 w-3" })
150
150
  ]
151
151
  }
152
152
  )
153
153
  ] }) }),
154
154
  /* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
155
155
  /* @__PURE__ */ n("div", { className: "mb-4 grid grid-cols-2 gap-px overflow-hidden rounded-lg border border-slate-200 bg-slate-200 dark:border-border dark:bg-border", children: [
156
- /* @__PURE__ */ r(b, { label: "Owners", children: /* @__PURE__ */ r(ge, { owners: t.owners, max: 6 }) }),
157
- /* @__PURE__ */ r(b, { label: "Claimed by", children: ((j = t.claimed_by) == null ? void 0 : j.name) ?? "—" }),
158
- /* @__PURE__ */ r(b, { label: "SLA", children: t.sla_status ? /* @__PURE__ */ r(
156
+ /* @__PURE__ */ r(p, { label: "Owners", children: /* @__PURE__ */ r(ye, { owners: t.owners, max: 6 }) }),
157
+ /* @__PURE__ */ r(p, { label: "Claimed by", children: ((K = t.claimed_by) == null ? void 0 : K.name) ?? "—" }),
158
+ /* @__PURE__ */ r(p, { label: "SLA", children: t.sla_status ? /* @__PURE__ */ r(
159
159
  "span",
160
160
  {
161
161
  className: V(
@@ -165,9 +165,9 @@ function De({
165
165
  children: t.sla_status
166
166
  }
167
167
  ) : "—" }),
168
- /* @__PURE__ */ r(b, { label: "Aging", children: Ne(t.aging_hours) }),
169
- t.at_risk && /* @__PURE__ */ r(b, { label: "Risk", children: /* @__PURE__ */ r("span", { className: "text-red-500", children: "⚑ At risk" }) }),
170
- Object.entries(t.extra ?? {}).map(([e, a]) => /* @__PURE__ */ r(b, { label: we(e), children: a == null || a === "" ? "—" : x != null && x[e] ? de(String(a), x[e]) : String(a) }, e))
168
+ /* @__PURE__ */ r(p, { label: "Aging", children: _e(t.aging_hours) }),
169
+ t.at_risk && /* @__PURE__ */ r(p, { label: "Risk", children: /* @__PURE__ */ r("span", { className: "text-red-500", children: "⚑ At risk" }) }),
170
+ Object.entries(t.extra ?? {}).map(([e, a]) => /* @__PURE__ */ r(p, { label: (y == null ? void 0 : y(e)) || qe(e), children: a == null || a === "" ? "—" : x != null && x[e] ? de(String(a), x[e]) : String(a) }, e))
171
171
  ] }),
172
172
  w.length > 0 && /* @__PURE__ */ n("div", { className: "mb-4", children: [
173
173
  /* @__PURE__ */ r("p", { className: "mb-1.5 text-[11px] font-medium uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: "Transitions" }),
@@ -175,16 +175,16 @@ function De({
175
175
  "button",
176
176
  {
177
177
  type: "button",
178
- disabled: s.isPending,
178
+ disabled: d.isPending,
179
179
  "aria-pressed": (i == null ? void 0 : i.id) === e.id,
180
- onClick: () => void Y(e),
180
+ onClick: () => void L(e),
181
181
  className: V(
182
182
  "flex items-center gap-1 rounded-md border border-slate-200 bg-white px-2.5 py-1.5 text-[12px] font-medium text-slate-700 hover:border-nvr-cyan hover:text-nvr-navy disabled:opacity-50 dark:border-border dark:bg-card dark:text-slate-200 dark:hover:text-nvr-cyan",
183
183
  (i == null ? void 0 : i.id) === e.id && "border-nvr-cyan"
184
184
  ),
185
185
  children: [
186
186
  E(e),
187
- /* @__PURE__ */ r(O, { className: "h-3 w-3 text-slate-400" })
187
+ /* @__PURE__ */ r(H, { className: "h-3 w-3 text-slate-400" })
188
188
  ]
189
189
  },
190
190
  e.id
@@ -202,7 +202,7 @@ function De({
202
202
  /* @__PURE__ */ r("span", { className: "font-semibold", children: t.label }),
203
203
  " to",
204
204
  " ",
205
- /* @__PURE__ */ r("span", { className: "font-semibold", children: X(i) }),
205
+ /* @__PURE__ */ r("span", { className: "font-semibold", children: Z(i) }),
206
206
  "?"
207
207
  ] }),
208
208
  /* @__PURE__ */ n("div", { className: "mt-2 flex gap-2", children: [
@@ -210,18 +210,18 @@ function De({
210
210
  "button",
211
211
  {
212
212
  type: "button",
213
- disabled: s.isPending,
214
- onClick: () => s.mutate({ transitionId: i.id }),
213
+ disabled: d.isPending,
214
+ onClick: () => d.mutate({ transitionId: i.id }),
215
215
  className: "h-7 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white disabled:opacity-50",
216
- children: s.isPending ? "Moving…" : "Confirm"
216
+ children: d.isPending ? "Moving…" : "Confirm"
217
217
  }
218
218
  ),
219
219
  /* @__PURE__ */ r(
220
220
  "button",
221
221
  {
222
222
  type: "button",
223
- disabled: s.isPending,
224
- onClick: () => m(null),
223
+ disabled: d.isPending,
224
+ onClick: () => c(null),
225
225
  className: "h-7 rounded-md border border-slate-200 bg-white px-3 text-[12px] text-slate-600 hover:bg-muted disabled:opacity-50 dark:border-border dark:bg-card dark:text-slate-300",
226
226
  children: "Keep"
227
227
  }
@@ -231,11 +231,11 @@ function De({
231
231
  }
232
232
  )
233
233
  ] }),
234
- (W || t.claimed_by) && /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
234
+ (J || t.claimed_by) && /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
235
235
  "button",
236
236
  {
237
237
  type: "button",
238
- onClick: () => t.claimed_by ? L(t) : g(t),
238
+ onClick: () => t.claimed_by ? z(t) : W(t),
239
239
  className: "rounded-md bg-nvr-cyan px-3 py-1.5 text-[12px] font-medium text-white hover:bg-nvr-cyan/90",
240
240
  children: t.claimed_by ? "Release claim" : "Claim this item"
241
241
  }
@@ -243,14 +243,14 @@ function De({
243
243
  /* @__PURE__ */ n("div", { children: [
244
244
  /* @__PURE__ */ r("p", { className: "mb-1.5 text-[11px] font-medium uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: "Comments" }),
245
245
  /* @__PURE__ */ n("div", { className: "space-y-2.5", children: [
246
- ((p == null ? void 0 : p.data) ?? []).map((e) => /* @__PURE__ */ n("div", { className: "rounded-md bg-slate-50 px-3 py-2 dark:bg-muted/40", children: [
246
+ ((u == null ? void 0 : u.data) ?? []).map((e) => /* @__PURE__ */ n("div", { className: "rounded-md bg-slate-50 px-3 py-2 dark:bg-muted/40", children: [
247
247
  /* @__PURE__ */ n("p", { className: "text-[11px] font-medium text-slate-500 dark:text-muted-foreground", children: [
248
248
  [e.first_name, e.last_name].filter(Boolean).join(" ") || e.email || "—",
249
- /* @__PURE__ */ r("span", { className: "ml-1.5 font-normal text-slate-400", children: le(e.created_at) })
249
+ /* @__PURE__ */ r("span", { className: "ml-1.5 font-normal text-slate-400", children: ce(e.created_at) })
250
250
  ] }),
251
251
  /* @__PURE__ */ r("p", { className: "mt-0.5 whitespace-pre-wrap text-[12px] text-slate-700 dark:text-slate-200", children: e.text })
252
252
  ] }, e.id)),
253
- ((p == null ? void 0 : p.data) ?? []).length === 0 && /* @__PURE__ */ r("p", { className: "text-[12px] text-slate-400", children: "No comments yet." })
253
+ ((u == null ? void 0 : u.data) ?? []).length === 0 && /* @__PURE__ */ r("p", { className: "text-[12px] text-slate-400", children: "No comments yet." })
254
254
  ] }),
255
255
  /* @__PURE__ */ n("div", { className: "mt-2.5", children: [
256
256
  /* @__PURE__ */ r(
@@ -276,7 +276,7 @@ function De({
276
276
  ] })
277
277
  ] })
278
278
  ] }),
279
- U && S && /* @__PURE__ */ r("div", { className: "shrink-0 border-t border-slate-200 px-5 py-3 dark:border-border", children: /* @__PURE__ */ n(
279
+ G && S && /* @__PURE__ */ r("div", { className: "shrink-0 border-t border-slate-200 px-5 py-3 dark:border-border", children: /* @__PURE__ */ n(
280
280
  "button",
281
281
  {
282
282
  type: "button",
@@ -284,32 +284,32 @@ function De({
284
284
  className: "flex w-full items-center justify-center gap-1.5 rounded-md bg-nvr-cyan px-3 py-2 text-[13px] font-semibold text-white hover:bg-nvr-cyan/90",
285
285
  children: [
286
286
  "Next ",
287
- /* @__PURE__ */ r(O, { className: "h-3.5 w-3.5" })
287
+ /* @__PURE__ */ r(H, { className: "h-3.5 w-3.5" })
288
288
  ]
289
289
  }
290
290
  ) })
291
291
  ] })
292
292
  }
293
293
  ),
294
- c && /* @__PURE__ */ r(
295
- ue,
294
+ l && /* @__PURE__ */ r(
295
+ pe,
296
296
  {
297
- payload: c.payload,
298
- transitionId: c.transitionId,
299
- isRetry: c.revision > 1,
300
- onSubmitted: () => s.mutate({
301
- transitionId: c.transitionId,
302
- comment: c.comment
297
+ payload: l.payload,
298
+ transitionId: l.transitionId,
299
+ isRetry: l.revision > 1,
300
+ onSubmitted: () => d.mutate({
301
+ transitionId: l.transitionId,
302
+ comment: l.comment
303
303
  }),
304
- executing: s.isPending,
304
+ executing: d.isPending,
305
305
  onClose: () => k(null)
306
306
  },
307
- c.revision
307
+ l.revision
308
308
  ),
309
309
  P.dialog
310
310
  ] });
311
311
  }
312
312
  export {
313
- De as QueueItemSheet,
314
- ke as peekTransitions
313
+ Ve as QueueItemSheet,
314
+ we as peekTransitions
315
315
  };