@nivaro/react 0.3.47 → 0.3.49

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 (27) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/shared/components/CellCopyLayer.js +81 -44
  4. package/dist/shared/components/CollectionBrowserView.js +306 -297
  5. package/dist/shared/components/DataTable.js +3 -3
  6. package/dist/shared/components/FulfilmentPill.js +98 -78
  7. package/dist/shared/components/ItemEditForm.js +2830 -2815
  8. package/dist/shared/components/NotificationSourcesCard.js +151 -147
  9. package/dist/shared/components/ProfileView.js +72 -70
  10. package/dist/shared/components/QueryTable.js +3 -3
  11. package/dist/shared/components/imports/ImportConsole.js +4 -4
  12. package/dist/shared/components/integrations/console/IntegrationsConsole.js +58 -50
  13. package/dist/shared/components/item-edit/HeaderTools.js +118 -113
  14. package/dist/shared/components/item-edit/InlineTableField.js +874 -868
  15. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +65 -65
  16. package/dist/shared/components/layout-editor/settings/settings-registry.js +4 -4
  17. package/dist/shared/components/notifications/DeliveryChips.js +9 -9
  18. package/dist/shared/components/panels/PipelinePanel.js +73 -71
  19. package/dist/shared/components/panels/SlaBreachBanner.js +2 -2
  20. package/dist/shared/components/panels/TransitionRequirementsDialog.js +384 -380
  21. package/dist/shared/components/profile/PersonProfile.js +23 -21
  22. package/dist/shared/components/profile/SignedInDevices.js +126 -0
  23. package/dist/shared/components/queue/QueueItemSheet.js +38 -37
  24. package/dist/shared/components/support/SupportView.js +1 -1
  25. package/dist/shared/lib/edit-lock-fields.js +7 -0
  26. package/dist/shared/lib/reimport-visibility.js +10 -0
  27. package/package.json +1 -1
@@ -222,8 +222,8 @@ function Ht({
222
222
  }, [i]);
223
223
  const P = new Set(q.map((l) => l.to_state)), j = r.find((l) => l.is_initial);
224
224
  j && j.id !== i && P.add(j.id);
225
- const x = (S = q[0]) == null ? void 0 : S.from_state;
226
- x && x !== i && P.add(x);
225
+ const h = (S = q[0]) == null ? void 0 : S.from_state;
226
+ h && h !== i && P.add(h);
227
227
  const R = (() => {
228
228
  if (p)
229
229
  return r.filter((m) => p.has(m.id) || P.has(m.id) || m.id === i).filter((m) => {
@@ -333,7 +333,7 @@ function Ht({
333
333
  ) }),
334
334
  /* @__PURE__ */ n(Be, { className: "max-w-[260px]", children: [
335
335
  /* @__PURE__ */ e("p", { className: "text-[11px] font-medium", children: "Skipped for this record" }),
336
- m.length > 0 ? /* @__PURE__ */ e("ul", { className: "mt-1 space-y-0.5 text-[11px] opacity-90", children: m.map((h) => /* @__PURE__ */ e("li", { children: h }, h)) }) : /* @__PURE__ */ e("p", { className: "mt-1 text-[11px] opacity-90", children: "Its skip conditions are met." })
336
+ m.length > 0 ? /* @__PURE__ */ e("ul", { className: "mt-1 space-y-0.5 text-[11px] opacity-90", children: m.map((x) => /* @__PURE__ */ e("li", { children: x }, x)) }) : /* @__PURE__ */ e("p", { className: "mt-1 text-[11px] opacity-90", children: "Its skip conditions are met." })
337
337
  ] })
338
338
  ] }) : /* @__PURE__ */ e(
339
339
  "span",
@@ -351,13 +351,13 @@ function Ht({
351
351
  ] }),
352
352
  !c && /* @__PURE__ */ n("div", { className: "mt-[13px] flex w-10 shrink-0 flex-col items-center gap-1.5", children: [
353
353
  (() => {
354
- const h = k ? `${d}55` : "#e8ecf0";
354
+ const x = k ? `${d}55` : "#e8ecf0";
355
355
  return /* @__PURE__ */ n("div", { className: "flex w-full shrink-0 items-center", children: [
356
356
  /* @__PURE__ */ e(
357
357
  "div",
358
358
  {
359
359
  className: "h-0.5 flex-1 rounded-l-sm",
360
- style: { backgroundColor: h }
360
+ style: { backgroundColor: x }
361
361
  }
362
362
  ),
363
363
  /* @__PURE__ */ e(
@@ -368,16 +368,16 @@ function Ht({
368
368
  height: 0,
369
369
  borderTop: "3px solid transparent",
370
370
  borderBottom: "3px solid transparent",
371
- borderLeft: `5px solid ${h}`
371
+ borderLeft: `5px solid ${x}`
372
372
  }
373
373
  }
374
374
  )
375
375
  ] });
376
376
  })(),
377
- _.map((h) => {
378
- const $ = h.from_state !== l.id, Q = Math.abs(
379
- (C.get(h.to_state) ?? 0) - (C.get(h.from_state ?? "") ?? 0)
380
- ) > 1 ? E.get(h.to_state) ?? "" : null;
377
+ _.map((x) => {
378
+ const $ = x.from_state !== l.id, Q = Math.abs(
379
+ (C.get(x.to_state) ?? 0) - (C.get(x.from_state ?? "") ?? 0)
380
+ ) > 1 ? E.get(x.to_state) ?? "" : null;
381
381
  return /* @__PURE__ */ n(De, { children: [
382
382
  /* @__PURE__ */ e(je, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex w-full cursor-default flex-col items-center gap-0.5", children: [
383
383
  /* @__PURE__ */ n(
@@ -387,31 +387,31 @@ function Ht({
387
387
  style: { color: $ ? "#d97706" : "#475569" },
388
388
  children: [
389
389
  $ && "↩ ",
390
- M(h)
390
+ M(x)
391
391
  ]
392
392
  }
393
393
  ),
394
- /* @__PURE__ */ e("span", { className: "text-[8.5px] leading-none text-slate-400", children: ut(h.timestamp) })
394
+ /* @__PURE__ */ e("span", { className: "text-[8.5px] leading-none text-slate-400", children: ut(x.timestamp) })
395
395
  ] }) }),
396
396
  /* @__PURE__ */ n(Be, { side: "top", className: "space-y-0.5 text-[12px]", children: [
397
- ve(h) ? /* @__PURE__ */ n(de, { children: [
397
+ ve(x) ? /* @__PURE__ */ n(de, { children: [
398
398
  /* @__PURE__ */ n("p", { className: "font-medium", children: [
399
399
  $ ? "↩ Sent back · " : "",
400
- Me(h)
400
+ Me(x)
401
401
  ] }),
402
- Oe(h) && /* @__PURE__ */ e("p", { className: "max-w-[280px] text-muted-foreground", children: Oe(h) })
402
+ Oe(x) && /* @__PURE__ */ e("p", { className: "max-w-[280px] text-muted-foreground", children: Oe(x) })
403
403
  ] }) : /* @__PURE__ */ n("p", { className: "font-medium", children: [
404
404
  $ ? "↩ Sent back by" : "Approved by",
405
405
  " ",
406
- B(h)
406
+ B(x)
407
407
  ] }),
408
408
  Q && /* @__PURE__ */ n("p", { className: "text-muted-foreground", children: [
409
409
  "→ straight to ",
410
410
  Q
411
411
  ] }),
412
- /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: new Date(h.timestamp).toLocaleString() })
412
+ /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: new Date(x.timestamp).toLocaleString() })
413
413
  ] })
414
- ] }, h.id);
414
+ ] }, x.id);
415
415
  })
416
416
  ] })
417
417
  ] }, l.id);
@@ -452,14 +452,14 @@ function Vt({ history: r }) {
452
452
  }) });
453
453
  }
454
454
  function Gt({ value: r, onChange: t }) {
455
- const u = fe(), [i, q] = K(!1), [p, f] = K(""), [N, P] = K(""), j = ne(null), x = ne(null);
455
+ const u = fe(), [i, q] = K(!1), [p, f] = K(""), [N, P] = K(""), j = ne(null), h = ne(null);
456
456
  ue(() => {
457
457
  i ? setTimeout(() => {
458
458
  var b;
459
459
  return (b = j.current) == null ? void 0 : b.focus();
460
460
  }, 50) : f("");
461
- }, [i]), ue(() => (x.current && clearTimeout(x.current), x.current = setTimeout(() => P(p), 250), () => {
462
- x.current && clearTimeout(x.current);
461
+ }, [i]), ue(() => (h.current && clearTimeout(h.current), h.current = setTimeout(() => P(p), 250), () => {
462
+ h.current && clearTimeout(h.current);
463
463
  }), [p]);
464
464
  const { data: R, isLoading: C } = te({
465
465
  queryKey: ["users", "async-search", N],
@@ -583,7 +583,7 @@ function Xt({
583
583
  returned: q = !1
584
584
  }) {
585
585
  var L, re, F;
586
- const p = fe(), f = Le(), { isAdmin: N } = Tt(), [P, j] = K(!1), [x, R] = K(""), [C, E] = K(""), [O, M] = K(!1), B = ["pipeline-instance-owners", r, t], U = ["pipeline-owners-can-add", r, t], b = () => p.request(
586
+ const p = fe(), f = Le(), { isAdmin: N } = Tt(), [P, j] = K(!1), [h, R] = K(""), [C, E] = K(""), [O, M] = K(!1), B = ["pipeline-instance-owners", r, t], U = ["pipeline-owners-can-add", r, t], b = () => p.request(
587
587
  ie(`/pipelines/instance/${r}/${t}/owners`)
588
588
  ).then((a) => {
589
589
  var D;
@@ -615,10 +615,10 @@ function Xt({
615
615
  staleTime: 6e4
616
616
  }), g = y && m === 0 && (c != null && c.name) ? c : null, _ = () => {
617
617
  f.invalidateQueries({ queryKey: B }), f.invalidateQueries({ queryKey: ["pipeline-instance", r, t] });
618
- }, h = xe({
618
+ }, x = xe({
619
619
  mutationFn: () => p.request(
620
620
  be(`/pipelines/instance/${r}/${t}/owners`, {
621
- user: x,
621
+ user: h,
622
622
  state: C || void 0
623
623
  })
624
624
  ),
@@ -752,7 +752,7 @@ function Xt({
752
752
  ] }),
753
753
  P && /* @__PURE__ */ n("div", { className: "mt-3 space-y-2 rounded-lg border border-slate-200 bg-slate-50 dark:bg-slate-900/30 dark:border-border p-3", children: [
754
754
  /* @__PURE__ */ e("p", { className: "text-[11px] font-semibold text-slate-500", children: "Add owner" }),
755
- /* @__PURE__ */ e(Gt, { value: x, onChange: R }),
755
+ /* @__PURE__ */ e(Gt, { value: h, onChange: R }),
756
756
  N ? /* @__PURE__ */ n(Ie, { open: O, onOpenChange: M, children: [
757
757
  /* @__PURE__ */ e(Ee, { asChild: !0, children: /* @__PURE__ */ n(
758
758
  "button",
@@ -805,9 +805,9 @@ function Xt({
805
805
  type: "button",
806
806
  size: "sm",
807
807
  className: "h-7 text-[12px]",
808
- disabled: !x || h.isPending,
809
- onClick: () => h.mutate(),
810
- children: h.isPending ? /* @__PURE__ */ e(se, { className: "h-3.5 w-3.5 animate-spin" }) : "Add"
808
+ disabled: !h || x.isPending,
809
+ onClick: () => x.mutate(),
810
+ children: x.isPending ? /* @__PURE__ */ e(se, { className: "h-3.5 w-3.5 animate-spin" }) : "Add"
811
811
  }
812
812
  )
813
813
  ] })
@@ -829,13 +829,13 @@ function Jt({
829
829
  queryKey: ["pipeline-all-owners", r, t],
830
830
  queryFn: () => q.request(
831
831
  ie(`/pipelines/instance/${r}/${t}/owners/all`)
832
- ).then((x) => x.data ?? null),
832
+ ).then((h) => h.data ?? null),
833
833
  enabled: p,
834
834
  staleTime: 3e4
835
- }), j = [...u].filter((x) => {
835
+ }), j = [...u].filter((h) => {
836
836
  var R;
837
- return !N || ((R = N[x.id]) == null ? void 0 : R.on_path) !== !1;
838
- }).sort((x, R) => x.sort - R.sort);
837
+ return !N || ((R = N[h.id]) == null ? void 0 : R.on_path) !== !1;
838
+ }).sort((h, R) => h.sort - R.sort);
839
839
  return /* @__PURE__ */ n(Ie, { open: p, onOpenChange: f, children: [
840
840
  /* @__PURE__ */ e(Ee, { asChild: !0, children: /* @__PURE__ */ e(
841
841
  "button",
@@ -843,7 +843,7 @@ function Jt({
843
843
  type: "button",
844
844
  title: "View approval chain",
845
845
  className: "flex h-6 w-6 items-center justify-center rounded text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600 dark:hover:bg-muted dark:hover:text-slate-300",
846
- onClick: (x) => x.stopPropagation(),
846
+ onClick: (h) => h.stopPropagation(),
847
847
  children: /* @__PURE__ */ e(it, { className: "h-3.5 w-3.5" })
848
848
  }
849
849
  ) }),
@@ -852,12 +852,12 @@ function Jt({
852
852
  /* @__PURE__ */ e("p", { className: "text-[12px] font-semibold text-slate-700", children: "Approval Chain" }),
853
853
  /* @__PURE__ */ e("p", { className: "text-[11px] text-slate-400 mt-0.5", children: "Owners per pipeline state" })
854
854
  ] }),
855
- /* @__PURE__ */ e("div", { className: "max-h-[504px] overflow-y-auto", children: P ? /* @__PURE__ */ e("div", { className: "space-y-px p-3", children: [1, 2, 3].map((x) => /* @__PURE__ */ e(le, { className: "h-10 w-full" }, x)) }) : N ? /* @__PURE__ */ e("div", { className: "divide-y divide-slate-100 dark:divide-border/60", children: j.map((x) => {
855
+ /* @__PURE__ */ e("div", { className: "max-h-[504px] overflow-y-auto", children: P ? /* @__PURE__ */ e("div", { className: "space-y-px p-3", children: [1, 2, 3].map((h) => /* @__PURE__ */ e(le, { className: "h-10 w-full" }, h)) }) : N ? /* @__PURE__ */ e("div", { className: "divide-y divide-slate-100 dark:divide-border/60", children: j.map((h) => {
856
856
  var U, b, S, l, w;
857
- const R = (((U = N[x.id]) == null ? void 0 : U.owners) ?? []).map((s) => ({
857
+ const R = (((U = N[h.id]) == null ? void 0 : U.owners) ?? []).map((s) => ({
858
858
  id: s.id,
859
859
  name: [s.first_name, s.last_name].filter(Boolean).join(" ") || s.email
860
- })), C = x.id === i, E = ((b = N[x.id]) == null ? void 0 : b.skipped) === !0 && !C, O = (((S = N[x.id]) == null ? void 0 : S.skip_reasons) ?? []).filter(Boolean), M = ((l = N[x.id]) == null ? void 0 : l.unavailable) ?? [], B = ((w = N[x.id]) == null ? void 0 : w.blocked) === !0 && !E;
860
+ })), C = h.id === i, E = ((b = N[h.id]) == null ? void 0 : b.skipped) === !0 && !C, O = (((S = N[h.id]) == null ? void 0 : S.skip_reasons) ?? []).filter(Boolean), M = ((l = N[h.id]) == null ? void 0 : l.unavailable) ?? [], B = ((w = N[h.id]) == null ? void 0 : w.blocked) === !0 && !E;
861
861
  return /* @__PURE__ */ n(
862
862
  "div",
863
863
  {
@@ -873,7 +873,7 @@ function Jt({
873
873
  ),
874
874
  "data-chain-blocked": B ? "" : void 0,
875
875
  children: [
876
- /* @__PURE__ */ e(oe, { label: x.label, color: x.color, small: !0 }),
876
+ /* @__PURE__ */ e(oe, { label: h.label, color: h.color, small: !0 }),
877
877
  /* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-x-2 gap-y-0.5", children: E ? (
878
878
  // Radix tooltip with zero delay — native `title` waits on
879
879
  // the OS hover timer, and a truncated reason needs its
@@ -935,7 +935,7 @@ function Jt({
935
935
  ] }) })
936
936
  ]
937
937
  },
938
- x.id
938
+ h.id
939
939
  );
940
940
  }) }) : /* @__PURE__ */ e("p", { className: "px-4 py-3 text-[12px] text-slate-400", children: "No pipeline configured." }) })
941
941
  ] })
@@ -952,7 +952,7 @@ function qn({
952
952
  onBeforeTransition: N,
953
953
  addendumPending: P,
954
954
  addendumView: j,
955
- asRole: x
955
+ asRole: h
956
956
  }) {
957
957
  return t === "new" ? null : /* @__PURE__ */ e(
958
958
  Zt,
@@ -967,7 +967,7 @@ function qn({
967
967
  onBeforeTransition: N,
968
968
  addendumPending: P,
969
969
  addendumView: j,
970
- asRole: x
970
+ asRole: h
971
971
  },
972
972
  `${r}:${t}`
973
973
  );
@@ -1072,7 +1072,7 @@ function Zt({
1072
1072
  onBeforeTransition: N,
1073
1073
  addendumPending: P,
1074
1074
  addendumView: j,
1075
- asRole: x
1075
+ asRole: h
1076
1076
  }) {
1077
1077
  var We, He, Ve;
1078
1078
  const R = fe(), C = Le(), [E, O] = K(""), [M, B] = K(null), [U, b] = K(!1), [S, l] = K(!1), [w, s] = K(null);
@@ -1109,11 +1109,11 @@ function Zt({
1109
1109
  return;
1110
1110
  }
1111
1111
  B(o);
1112
- }, y = x ? ["pipeline-instance", r, t, x] : ["pipeline-instance", r, t], { data: d, isLoading: c } = te({
1112
+ }, y = h ? ["pipeline-instance", r, t, h] : ["pipeline-instance", r, t], { data: d, isLoading: c } = te({
1113
1113
  queryKey: y,
1114
1114
  queryFn: () => R.request(
1115
1115
  ie(
1116
- `/pipelines/instance/${r}/${t}${x ? `?as_role=${encodeURIComponent(x)}` : ""}`
1116
+ `/pipelines/instance/${r}/${t}${h ? `?as_role=${encodeURIComponent(h)}` : ""}`
1117
1117
  )
1118
1118
  ).then(
1119
1119
  (o) => o.data ?? {
@@ -1142,7 +1142,7 @@ function Zt({
1142
1142
  ).then((o) => o.data ?? null),
1143
1143
  enabled: S && !!(d != null && d.instance),
1144
1144
  staleTime: 3e4
1145
- }), h = et(() => {
1145
+ }), x = et(() => {
1146
1146
  if (!g) return null;
1147
1147
  const o = Object.entries(g);
1148
1148
  return o.length === 0 || o.every(([, T]) => T.on_path === void 0) ? null : new Set(o.filter(([, T]) => T.on_path !== !1).map(([T]) => T));
@@ -1464,7 +1464,7 @@ function Zt({
1464
1464
  availableTransitions: a ?? [],
1465
1465
  currentStateId: F.current_state,
1466
1466
  history: D ?? [],
1467
- onPathIds: h,
1467
+ onPathIds: x,
1468
1468
  skippedStates: $
1469
1469
  }
1470
1470
  ),
@@ -1553,6 +1553,7 @@ function Zt({
1553
1553
  bt,
1554
1554
  {
1555
1555
  payload: w.payload,
1556
+ transitionId: w.transitionId,
1556
1557
  isRetry: w.revision > 1,
1557
1558
  onSubmitted: () => (
1558
1559
  // mutateAsync so the dialog can stay busy until the transition
@@ -1593,8 +1594,8 @@ function Yt({
1593
1594
  onBeforeTransition: u,
1594
1595
  wrap: i = !0
1595
1596
  }) {
1596
- const q = fe(), p = Le(), [f, N] = K(""), [P, j] = K(null), [x, R] = K(null);
1597
- mt(r, t, "transition", !!P || !!x);
1597
+ const q = fe(), p = Le(), [f, N] = K(""), [P, j] = K(null), [h, R] = K(null);
1598
+ mt(r, t, "transition", !!P || !!h);
1598
1599
  const C = ne(null), E = Mt(C, !i), O = ne(!1), M = (c) => {
1599
1600
  O.current || (O.current = !0, S.mutate(c, {
1600
1601
  onSettled: () => {
@@ -1609,15 +1610,15 @@ function Yt({
1609
1610
  }
1610
1611
  if (u) {
1611
1612
  O.current = !0;
1612
- let h = !1;
1613
+ let x = !1;
1613
1614
  try {
1614
- h = await u();
1615
+ x = await u();
1615
1616
  } finally {
1616
1617
  O.current = !1;
1617
1618
  }
1618
- if (!h) return;
1619
+ if (!x) return;
1619
1620
  }
1620
- const g = (s ?? []).find((h) => h.id === c), _ = String((g == null ? void 0 : g.comment_mode) ?? "none");
1621
+ const g = (s ?? []).find((x) => x.id === c), _ = String((g == null ? void 0 : g.comment_mode) ?? "none");
1621
1622
  if (_ !== "optional" && _ !== "required") {
1622
1623
  M({ transition_id: c });
1623
1624
  return;
@@ -1668,7 +1669,7 @@ function Yt({
1668
1669
  }));
1669
1670
  return;
1670
1671
  }
1671
- const h = c == null ? void 0 : c.response;
1672
+ const x = c == null ? void 0 : c.response;
1672
1673
  ee.error(he(c, "Failed to execute transition"), {
1673
1674
  duration: 12e3,
1674
1675
  // What to do next + Copy details (lib/error-toast.ts); "Why?" below wins the action slot.
@@ -1683,7 +1684,7 @@ function Yt({
1683
1684
  transitionId: g.transition_id
1684
1685
  })
1685
1686
  } : {}
1686
- }), R(null), j(null), ke(p, r, String(t)), _e(p, r, String(t)), (h == null ? void 0 : h.status) === 409 && p.invalidateQueries({ queryKey: U });
1687
+ }), R(null), j(null), ke(p, r, String(t)), _e(p, r, String(t)), (x == null ? void 0 : x.status) === 409 && p.invalidateQueries({ queryKey: U });
1687
1688
  }
1688
1689
  }), l = ne(B);
1689
1690
  l.current = B;
@@ -1693,7 +1694,7 @@ function Yt({
1693
1694
  const _ = g.detail;
1694
1695
  if (!_ || _.claimed || _.collection !== r || String(_.item) !== String(t)) return;
1695
1696
  _.claimed = !0;
1696
- const h = String(_.transition_id).toUpperCase(), $ = w.current.find((Q) => String(Q.id).toUpperCase() === h);
1697
+ const x = String(_.transition_id).toUpperCase(), $ = w.current.find((Q) => String(Q.id).toUpperCase() === x);
1697
1698
  if (!$) {
1698
1699
  ee.error("That step is not available from where the record is now");
1699
1700
  return;
@@ -1713,14 +1714,14 @@ function Yt({
1713
1714
  }
1714
1715
  const y = (c) => [...c].sort(
1715
1716
  (g, _) => {
1716
- var h, $;
1717
- return (((h = v.get(g.to_state)) == null ? void 0 : h.sort) ?? 999) - ((($ = v.get(_.to_state)) == null ? void 0 : $.sort) ?? 999);
1717
+ var x, $;
1718
+ return (((x = v.get(g.to_state)) == null ? void 0 : x.sort) ?? 999) - ((($ = v.get(_.to_state)) == null ? void 0 : $.sort) ?? 999);
1718
1719
  }
1719
1720
  ), d = (() => {
1720
- var _, h, $;
1721
+ var _, x, $;
1721
1722
  const c = (_ = C.current) == null ? void 0 : _.getBoundingClientRect();
1722
1723
  if (!c) return 600;
1723
- const g = ($ = (h = C.current) == null ? void 0 : h.closest('[role="dialog"]')) == null ? void 0 : $.getBoundingClientRect();
1724
+ const g = ($ = (x = C.current) == null ? void 0 : x.closest('[role="dialog"]')) == null ? void 0 : $.getBoundingClientRect();
1724
1725
  return Math.max(260, Math.min(600, c.right - ((g == null ? void 0 : g.left) ?? 0) - 12));
1725
1726
  })();
1726
1727
  return /* @__PURE__ */ n("div", { ref: C, className: "relative", children: [
@@ -1741,8 +1742,8 @@ function Yt({
1741
1742
  }
1742
1743
  ) }),
1743
1744
  /* @__PURE__ */ e(Re, { align: "end", className: "min-w-[200px]", children: Array.from(m.entries()).map(
1744
- ([c, g], _, h) => g.length === 1 ? /* @__PURE__ */ n(tt, { children: [
1745
- _ > 0 && h[_ - 1][1].length > 1 && /* @__PURE__ */ e(nt, {}),
1745
+ ([c, g], _, x) => g.length === 1 ? /* @__PURE__ */ n(tt, { children: [
1746
+ _ > 0 && x[_ - 1][1].length > 1 && /* @__PURE__ */ e(nt, {}),
1746
1747
  /* @__PURE__ */ n(we, { onSelect: () => B(g[0].id), children: [
1747
1748
  g[0].color && /* @__PURE__ */ e(
1748
1749
  "span",
@@ -1777,15 +1778,15 @@ function Yt({
1777
1778
  className: i ? "flex flex-wrap justify-end gap-2" : "flex shrink-0 items-center justify-end gap-2",
1778
1779
  children: Array.from(m.entries()).map(([c, g]) => {
1779
1780
  var Q, J;
1780
- const _ = ((Q = g[0]) == null ? void 0 : Q.color) ?? null, h = g.some((L) => L.id === P), $ = (L) => _ ? L ? { backgroundColor: _, borderColor: _ } : { borderColor: _, color: _ } : void 0;
1781
+ const _ = ((Q = g[0]) == null ? void 0 : Q.color) ?? null, x = g.some((L) => L.id === P), $ = (L) => _ ? L ? { backgroundColor: _, borderColor: _ } : { borderColor: _, color: _ } : void 0;
1781
1782
  if (g.length === 1) {
1782
1783
  const L = g[0], re = S.isPending && ((J = S.variables) == null ? void 0 : J.transition_id) === L.id, F = /* @__PURE__ */ n(
1783
1784
  Y,
1784
1785
  {
1785
1786
  size: "sm",
1786
- variant: h ? "default" : "outline",
1787
+ variant: x ? "default" : "outline",
1787
1788
  className: "gap-1.5 text-[12px]",
1788
- style: $(h),
1789
+ style: $(x),
1789
1790
  disabled: S.isPending,
1790
1791
  onClick: () => B(L.id),
1791
1792
  children: [
@@ -1814,9 +1815,9 @@ function Yt({
1814
1815
  Y,
1815
1816
  {
1816
1817
  size: "sm",
1817
- variant: h ? "default" : "outline",
1818
+ variant: x ? "default" : "outline",
1818
1819
  className: "gap-1.5 text-[12px]",
1819
- style: $(h),
1820
+ style: $(x),
1820
1821
  disabled: S.isPending,
1821
1822
  children: [
1822
1823
  c,
@@ -1900,17 +1901,18 @@ function Yt({
1900
1901
  ]
1901
1902
  }
1902
1903
  ),
1903
- x && /* @__PURE__ */ e(dt, { fallback: null, children: /* @__PURE__ */ e(
1904
+ h && /* @__PURE__ */ e(dt, { fallback: null, children: /* @__PURE__ */ e(
1904
1905
  bt,
1905
1906
  {
1906
- payload: x.payload,
1907
- isRetry: x.revision > 1,
1907
+ payload: h.payload,
1908
+ transitionId: h.transitionId,
1909
+ isRetry: h.revision > 1,
1908
1910
  onSubmitted: () => (
1909
1911
  // mutateAsync so the dialog can stay busy until the transition
1910
1912
  // settles; the mutation's own onError/onSuccess handle the outcome.
1911
1913
  S.mutateAsync({
1912
- transition_id: x.transitionId,
1913
- comment: x.comment,
1914
+ transition_id: h.transitionId,
1915
+ comment: h.comment,
1914
1916
  reviewed: !0
1915
1917
  }).catch(() => {
1916
1918
  })
@@ -1918,7 +1920,7 @@ function Yt({
1918
1920
  executing: S.isPending,
1919
1921
  onClose: () => R(null)
1920
1922
  },
1921
- x.revision
1923
+ h.revision
1922
1924
  ) })
1923
1925
  ] });
1924
1926
  }
@@ -25,7 +25,7 @@ function F({ collection: t, itemId: d }) {
25
25
  "data-sla-override-banner": !0,
26
26
  className: "nvr-expand-in flex flex-wrap items-center gap-2 rounded-md border border-slate-200 bg-slate-50 px-3 py-2 dark:border-border dark:bg-muted/40",
27
27
  children: [
28
- /* @__PURE__ */ r("p", { className: "min-w-0 flex-1 text-[12.5px] text-slate-700 dark:text-slate-200", children: [
28
+ /* @__PURE__ */ r("p", { className: "min-w-[min(16rem,100%)] flex-1 text-[12.5px] text-slate-700 dark:text-slate-200", children: [
29
29
  /* @__PURE__ */ a("span", { className: "font-semibold", children: "SLA" }),
30
30
  ((c = e.sla_rule) == null ? void 0 : c.name) && ` — ${e.sla_rule.name}`,
31
31
  " · ",
@@ -46,7 +46,7 @@ function F({ collection: t, itemId: d }) {
46
46
  }
47
47
  const f = Math.max(0, (e.elapsed_hours ?? 0) - (e.total_hours ?? 0));
48
48
  return /* @__PURE__ */ r("div", { className: "nvr-expand-in flex flex-wrap items-center gap-2 rounded-md border border-red-200 bg-red-50 px-3 py-2 dark:border-red-500/30 dark:bg-red-500/10", children: [
49
- /* @__PURE__ */ r("p", { className: "min-w-0 flex-1 text-[12.5px] text-red-800 dark:text-red-300", children: [
49
+ /* @__PURE__ */ r("p", { className: "min-w-[min(16rem,100%)] flex-1 text-[12.5px] text-red-800 dark:text-red-300", children: [
50
50
  /* @__PURE__ */ a("span", { className: "font-semibold", children: "SLA breached" }),
51
51
  ((u = e.sla_rule) == null ? void 0 : u.name) && ` — ${e.sla_rule.name}`,
52
52
  " · ",