@nivaro/react 0.3.64 → 0.3.66

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 (74) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +62 -8
  4. package/dist/shared/components/CollectionBrowserView.js +3127 -3204
  5. package/dist/shared/components/ConformanceView.js +235 -221
  6. package/dist/shared/components/DataTable.js +478 -459
  7. package/dist/shared/components/ItemEditForm.js +4842 -4500
  8. package/dist/shared/components/MyWorkView.js +124 -113
  9. package/dist/shared/components/PageRenderer.js +146 -138
  10. package/dist/shared/components/ProfileView.js +483 -472
  11. package/dist/shared/components/RecordDrilldownSheet.js +73 -65
  12. package/dist/shared/components/ReportView.js +1100 -1094
  13. package/dist/shared/components/bulk/BulkActionButtons.js +72 -72
  14. package/dist/shared/components/bulk/BulkCompareButton.js +62 -0
  15. package/dist/shared/components/bulk/BulkFieldUpdate.js +114 -103
  16. package/dist/shared/components/bulk/BulkFieldUpdateButton.js +73 -0
  17. package/dist/shared/components/bulk/MessageStakeholders.js +235 -0
  18. package/dist/shared/components/bulk/bulk-field-options.js +29 -23
  19. package/dist/shared/components/integrations/IntegrationObligationsView.js +191 -173
  20. package/dist/shared/components/integrations/IntegrationStatusLines.js +101 -85
  21. package/dist/shared/components/integrations/RecordIntegrationPreview.js +11 -9
  22. package/dist/shared/components/integrations/SendCurrentData.js +126 -0
  23. package/dist/shared/components/item-edit/CatalogPickerField.js +1535 -1440
  24. package/dist/shared/components/item-edit/FieldRenderer.js +49 -45
  25. package/dist/shared/components/item-edit/FieldRow.js +413 -403
  26. package/dist/shared/components/item-edit/GroupSection.js +555 -538
  27. package/dist/shared/components/item-edit/InlineTableField.js +2903 -2816
  28. package/dist/shared/components/item-edit/M2MCombobox.js +407 -338
  29. package/dist/shared/components/item-edit/MidairCollisionDialog.js +367 -116
  30. package/dist/shared/components/item-edit/NestedRelationEditor.js +171 -163
  31. package/dist/shared/components/item-edit/PlanGrid.js +783 -724
  32. package/dist/shared/components/item-edit/QuickCreateButton.js +291 -224
  33. package/dist/shared/components/item-edit/RecordInsights.js +113 -111
  34. package/dist/shared/components/item-edit/RecordLiveSync.js +4 -1
  35. package/dist/shared/components/item-edit/RelationCombobox.js +398 -364
  36. package/dist/shared/components/item-edit/SummaryPanel.js +146 -144
  37. package/dist/shared/components/item-edit/UserChip.js +264 -229
  38. package/dist/shared/components/item-edit/cascade-clear-notice.js +56 -0
  39. package/dist/shared/components/item-edit/collision-format.js +37 -0
  40. package/dist/shared/components/item-edit/field-a11y.js +25 -0
  41. package/dist/shared/components/item-edit/header-path-preview.js +52 -0
  42. package/dist/shared/components/item-edit/line-merge.js +84 -0
  43. package/dist/shared/components/item-edit/line-midair.js +94 -87
  44. package/dist/shared/components/item-edit/move-guard.js +17 -0
  45. package/dist/shared/components/item-edit/picker-search.js +27 -16
  46. package/dist/shared/components/item-edit/rail-width.js +8 -0
  47. package/dist/shared/components/monitoring/InactiveUserLinksView.js +126 -124
  48. package/dist/shared/components/panels/AccessDeniedPanel.js +96 -55
  49. package/dist/shared/components/panels/CommentPanel.js +142 -136
  50. package/dist/shared/components/panels/ItemLockBanner.js +246 -240
  51. package/dist/shared/components/panels/PipelinePanel.js +1366 -1194
  52. package/dist/shared/components/panels/RevisionsPanel.js +106 -102
  53. package/dist/shared/components/panels/SlaBreachBanner.js +16 -20
  54. package/dist/shared/components/panels/SlaClock.js +90 -68
  55. package/dist/shared/components/queue/QueueItemSheet.js +94 -87
  56. package/dist/shared/components/queue/QueueWorklist.js +1522 -1347
  57. package/dist/shared/components/queue/worklist-csv.js +75 -0
  58. package/dist/shared/components/queue/worklist-helpers.js +20 -0
  59. package/dist/shared/components/widgets/ReviewListWidget.js +226 -207
  60. package/dist/shared/lib/bulk-copy.js +17 -0
  61. package/dist/shared/lib/cbv-export.js +122 -0
  62. package/dist/shared/lib/delete-offer.js +13 -0
  63. package/dist/shared/lib/error-hints.js +1 -0
  64. package/dist/shared/lib/leave-guard.js +41 -26
  65. package/dist/shared/lib/list-link.js +72 -56
  66. package/dist/shared/lib/live-queries.js +32 -30
  67. package/dist/shared/lib/moved-notice.js +25 -0
  68. package/dist/shared/lib/notification-target.js +56 -54
  69. package/dist/shared/lib/obligation-banner.js +11 -8
  70. package/dist/shared/lib/obligation-reason-text.js +6 -6
  71. package/dist/shared/lib/quick-filter-cascade.js +29 -19
  72. package/dist/shared/lib/sort-cycle.js +6 -0
  73. package/dist/shared/lib/summary-mode.js +59 -41
  74. package/package.json +1 -1
@@ -2,24 +2,21 @@ import { jsxs as r, jsx as a, Fragment as v } from "react/jsx-runtime";
2
2
  import { useQueryClient as w, useMutation as N } from "@tanstack/react-query";
3
3
  import { useState as m } from "react";
4
4
  import { useNivaroClient as y } from "../../context.js";
5
- import { post as _ } from "../../lib/commands.js";
6
- import { humanHours as p } from "../../lib/utils.js";
7
- import { useSlaStatus as S, slaStatusKey as A, overrideSentence as x, AdjustClockPopover as b } from "./SlaClock.js";
5
+ import { post as S } from "../../lib/commands.js";
6
+ import { useSlaStatus as _, slaStatusKey as A, slaClockText as p, overrideSentence as x, AdjustClockPopover as b, stepAgeText as C } from "./SlaClock.js";
8
7
  function F({ collection: t, itemId: d }) {
9
8
  var c, u;
10
- const k = y(), h = w(), [l, g] = m(""), [n, i] = m(!1), { data: e } = S(t, d), s = N({
9
+ const k = y(), g = w(), [o, f] = m(""), [n, l] = m(!1), { data: e } = _(t, d), s = N({
11
10
  mutationFn: () => k.request(
12
- _("/sla/ack", { collection: t, item: d, note: l.trim() || void 0 })
11
+ S("/sla/ack", { collection: t, item: d, note: o.trim() || void 0 })
13
12
  ),
14
13
  onSuccess: () => {
15
- i(!1), h.invalidateQueries({ queryKey: A(t, d) });
14
+ l(!1), g.invalidateQueries({ queryKey: A(t, d) });
16
15
  }
17
16
  });
18
17
  if (!e) return null;
19
- if (e.status !== "breached") {
20
- if (!e.override || !e.status || e.status === "none") return null;
21
- const o = (e.total_hours ?? 0) - (e.elapsed_hours ?? 0);
22
- return /* @__PURE__ */ r(
18
+ if (e.status !== "breached")
19
+ return !e.override || !e.status || e.status === "none" ? null : /* @__PURE__ */ r(
23
20
  "div",
24
21
  {
25
22
  "data-sla-override-banner": !0,
@@ -29,8 +26,8 @@ function F({ collection: t, itemId: d }) {
29
26
  /* @__PURE__ */ a("span", { className: "font-semibold", children: "SLA" }),
30
27
  ((c = e.sla_rule) == null ? void 0 : c.name) && ` — ${e.sla_rule.name}`,
31
28
  " · ",
32
- p(o),
33
- " left ·",
29
+ p(e),
30
+ " ·",
34
31
  " ",
35
32
  x(e.override),
36
33
  /* @__PURE__ */ r("span", { className: "block truncate text-[11.5px] text-slate-500 dark:text-slate-400", children: [
@@ -43,15 +40,14 @@ function F({ collection: t, itemId: d }) {
43
40
  ]
44
41
  }
45
42
  );
46
- }
47
- const f = Math.max(0, (e.elapsed_hours ?? 0) - (e.total_hours ?? 0));
43
+ const i = C(e.entered_at);
48
44
  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
45
  /* @__PURE__ */ r("p", { className: "min-w-[min(16rem,100%)] flex-1 text-[12.5px] text-red-800 dark:text-red-300", children: [
50
46
  /* @__PURE__ */ a("span", { className: "font-semibold", children: "SLA breached" }),
51
47
  ((u = e.sla_rule) == null ? void 0 : u.name) && ` — ${e.sla_rule.name}`,
52
48
  " · ",
53
- p(f),
54
- " past the limit",
49
+ p(e),
50
+ i && ` · ${i}`,
55
51
  e.acknowledged ? ` · acknowledged by ${e.acknowledged.by || "someone"}` : e.has_ladder ? " · escalating until acknowledged" : "",
56
52
  e.override && /* @__PURE__ */ r("span", { className: "block text-[11.5px] text-red-700/80 dark:text-red-300/80", children: [
57
53
  x(e.override),
@@ -61,12 +57,12 @@ function F({ collection: t, itemId: d }) {
61
57
  ] })
62
58
  ] }),
63
59
  e.can_adjust && /* @__PURE__ */ a(b, { collection: t, itemId: d, data: e, tone: "danger" }),
64
- !e.acknowledged && /* @__PURE__ */ r(v, { children: [
60
+ !e.acknowledged && e.can_ack !== !1 && /* @__PURE__ */ r(v, { children: [
65
61
  n && /* @__PURE__ */ a(
66
62
  "input",
67
63
  {
68
- value: l,
69
- onChange: (o) => g(o.target.value),
64
+ value: o,
65
+ onChange: (h) => f(h.target.value),
70
66
  placeholder: "Optional note…",
71
67
  className: "h-7 w-[200px] rounded-md border border-red-200 bg-white px-2 text-[12px] dark:border-red-500/40 dark:bg-card"
72
68
  }
@@ -77,7 +73,7 @@ function F({ collection: t, itemId: d }) {
77
73
  type: "button",
78
74
  disabled: s.isPending,
79
75
  onClick: () => {
80
- n ? s.mutate() : i(!0);
76
+ n ? s.mutate() : l(!0);
81
77
  },
82
78
  className: "shrink-0 rounded-md border border-red-300 px-2.5 py-1 text-[12px] font-medium text-red-700 hover:bg-red-100 disabled:opacity-50 dark:border-red-500/40 dark:bg-transparent dark:text-red-300 dark:hover:bg-red-500/15",
83
79
  children: s.isPending ? "Acknowledging…" : n ? "Confirm acknowledge" : "Acknowledge"
@@ -1,14 +1,14 @@
1
- import { jsxs as n, jsx as a } from "react/jsx-runtime";
2
- import { useQuery as F, useQueryClient as E, useMutation as j } from "@tanstack/react-query";
3
- import { Clock3 as L } from "lucide-react";
1
+ import { jsxs as o, jsx as s } from "react/jsx-runtime";
2
+ import { useQuery as F, useQueryClient as R, useMutation as S } from "@tanstack/react-query";
3
+ import { Clock3 as E } from "lucide-react";
4
4
  import { useState as h } from "react";
5
5
  import { useNivaroClient as P } from "../../context.js";
6
- import { get as T, post as H, del as K } from "../../lib/commands.js";
6
+ import { get as H, post as L, del as K } from "../../lib/commands.js";
7
7
  import { userErrorMessage as Q } from "../../lib/safe-error.js";
8
8
  import { humanHours as l, formatRelative as B } from "../../lib/utils.js";
9
- import { invalidateRecordNotes as M } from "../item-edit/RecordInsights.js";
9
+ import { invalidateRecordNotes as D } from "../item-edit/RecordInsights.js";
10
10
  import { Popover as O, PopoverTrigger as z, PopoverContent as U } from "../ui/popover.js";
11
- function S(t) {
11
+ function M(t) {
12
12
  return t ? Q(t, "Could not load the deadline") : null;
13
13
  }
14
14
  function q(t, r) {
@@ -18,96 +18,116 @@ function W(t, r) {
18
18
  const e = P();
19
19
  return F({
20
20
  queryKey: q(t, String(r ?? "")),
21
- queryFn: () => e.request(T(`/sla/status/${t}/${r}`)).then((o) => o).catch(() => null),
21
+ queryFn: () => e.request(H(`/sla/status/${t}/${r}`)).then((a) => a).catch(() => null),
22
22
  enabled: !!r,
23
23
  staleTime: 6e4
24
24
  });
25
25
  }
26
- function D(t) {
26
+ function y(t, r) {
27
+ if (!r) return l(t);
28
+ if (t == null || Number.isNaN(t)) return "—";
29
+ const e = Math.max(0, t);
30
+ if (e < 1) return `${Math.max(1, Math.round(e * 60))} working min`;
31
+ const a = Math.round(e);
32
+ return `${a} working hour${a === 1 ? "" : "s"}`;
33
+ }
34
+ function G(t) {
35
+ var i;
36
+ const r = !!((i = t.sla_rule) != null && i.business_hours_only), e = t.total_hours ?? 0, a = e - (t.elapsed_hours ?? 0), d = r ? `${Math.round(e)} working-hour limit` : `${l(e)} limit`;
37
+ return a >= 0 ? `${y(a, r)} left of ${y(e, r)}` : `${y(-a, r)} past the ${d}`;
38
+ }
39
+ function oe(t, r = Date.now()) {
40
+ if (!t) return null;
41
+ const e = new Date(t).getTime();
42
+ if (!Number.isFinite(e)) return null;
43
+ const a = Math.floor((r - e) / 864e5);
44
+ return a < 1 ? null : `${a} day${a === 1 ? "" : "s"} in this step`;
45
+ }
46
+ function J(t) {
27
47
  const r = t.set_by_name ? ` by ${t.set_by_name}` : "";
28
48
  return `Clock adjusted to ${l(t.duration_hours)} (rule: ${l(t.rule_duration_hours)})${r}, ${B(t.set_at)}`;
29
49
  }
30
- function G({
50
+ function V({
31
51
  collection: t,
32
52
  itemId: r,
33
53
  data: e,
34
- tone: o = "neutral"
54
+ tone: a = "neutral"
35
55
  }) {
36
- var w;
37
- const m = P(), u = E(), [A, x] = h(!1), [b, y] = h(""), [i, f] = h(""), [N, c] = h(null), k = ((w = e.sla_rule) == null ? void 0 : w.duration_hours) ?? null, _ = e.elapsed_hours ?? 0, $ = () => {
38
- u.invalidateQueries({ queryKey: q(t, r) }), M(u, t, r);
39
- }, g = j({
40
- mutationFn: () => m.request(
41
- H(`/sla/override/${t}/${r}`, {
56
+ var C;
57
+ const d = P(), i = R(), [A, x] = h(!1), [b, N] = h(""), [c, f] = h(""), [$, m] = h(null), k = ((C = e.sla_rule) == null ? void 0 : C.duration_hours) ?? null, w = e.elapsed_hours ?? 0, _ = () => {
58
+ i.invalidateQueries({ queryKey: q(t, r) }), D(i, t, r);
59
+ }, g = S({
60
+ mutationFn: () => d.request(
61
+ L(`/sla/override/${t}/${r}`, {
42
62
  duration_hours: Number(b),
43
- reason: i.trim()
63
+ reason: c.trim()
44
64
  })
45
65
  ),
46
66
  onSuccess: () => {
47
- x(!1), f(""), c(null), $();
67
+ x(!1), f(""), m(null), _();
48
68
  },
49
- onError: (s) => c(S(s) ?? "Could not adjust the clock")
50
- }), v = j({
51
- mutationFn: () => m.request(
69
+ onError: (n) => m(M(n) ?? "Could not adjust the clock")
70
+ }), v = S({
71
+ mutationFn: () => d.request(
52
72
  K(
53
- `/sla/override/${t}/${r}${i.trim() ? `?reason=${encodeURIComponent(i.trim())}` : ""}`
73
+ `/sla/override/${t}/${r}${c.trim() ? `?reason=${encodeURIComponent(c.trim())}` : ""}`
54
74
  )
55
75
  ),
56
76
  onSuccess: () => {
57
- x(!1), f(""), c(null), $();
77
+ x(!1), f(""), m(null), _();
58
78
  },
59
- onError: (s) => c(S(s) ?? "Could not reset the clock")
60
- }), d = Number(b), R = Number.isFinite(d) && d > 0 && d <= 8760 && i.trim().length > 0, p = Number.isFinite(d) && d > 0 ? d - _ : null;
61
- return /* @__PURE__ */ n(
79
+ onError: (n) => m(M(n) ?? "Could not reset the clock")
80
+ }), u = Number(b), T = Number.isFinite(u) && u > 0 && u <= 8760 && c.trim().length > 0, p = Number.isFinite(u) && u > 0 ? u - w : null;
81
+ return /* @__PURE__ */ o(
62
82
  O,
63
83
  {
64
84
  open: A,
65
- onOpenChange: (s) => {
66
- var C;
67
- x(s), s && (y(String(((C = e.override) == null ? void 0 : C.duration_hours) ?? e.total_hours ?? k ?? "")), c(null));
85
+ onOpenChange: (n) => {
86
+ var j;
87
+ x(n), n && (N(String(((j = e.override) == null ? void 0 : j.duration_hours) ?? e.total_hours ?? k ?? "")), m(null));
68
88
  },
69
89
  children: [
70
- /* @__PURE__ */ a(z, { asChild: !0, children: /* @__PURE__ */ a(
90
+ /* @__PURE__ */ s(z, { asChild: !0, children: /* @__PURE__ */ s(
71
91
  "button",
72
92
  {
73
93
  type: "button",
74
94
  "data-sla-adjust": !0,
75
- className: o === "danger" ? "shrink-0 rounded-md border border-red-300 px-2.5 py-1 text-[12px] font-medium text-red-700 hover:bg-red-100 dark:border-red-500/40 dark:text-red-300 dark:hover:bg-red-500/15" : "shrink-0 rounded-md border border-slate-200 px-2.5 py-1 text-[12px] font-medium text-slate-700 hover:bg-muted dark:border-border dark:text-slate-200",
95
+ className: a === "danger" ? "shrink-0 rounded-md border border-red-300 px-2.5 py-1 text-[12px] font-medium text-red-700 hover:bg-red-100 dark:border-red-500/40 dark:text-red-300 dark:hover:bg-red-500/15" : "shrink-0 rounded-md border border-slate-200 px-2.5 py-1 text-[12px] font-medium text-slate-700 hover:bg-muted dark:border-border dark:text-slate-200",
76
96
  children: "Adjust clock"
77
97
  }
78
98
  ) }),
79
- /* @__PURE__ */ n(U, { align: "end", className: "w-[320px] space-y-3 p-3", "data-sla-adjust-panel": !0, children: [
80
- /* @__PURE__ */ n("div", { children: [
81
- /* @__PURE__ */ a("p", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: "Adjust this record's SLA clock" }),
82
- /* @__PURE__ */ n("p", { className: "mt-0.5 text-[11.5px] text-slate-500 dark:text-slate-400", children: [
99
+ /* @__PURE__ */ o(U, { align: "end", className: "w-[320px] space-y-3 p-3", "data-sla-adjust-panel": !0, children: [
100
+ /* @__PURE__ */ o("div", { children: [
101
+ /* @__PURE__ */ s("p", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: "Adjust this record's SLA clock" }),
102
+ /* @__PURE__ */ o("p", { className: "mt-0.5 text-[11.5px] text-slate-500 dark:text-slate-400", children: [
83
103
  k != null ? `The rule allows ${l(k)}. ` : "",
84
- l(_),
104
+ l(w),
85
105
  " used so far. Applies only while the record stays in this step."
86
106
  ] })
87
107
  ] }),
88
- /* @__PURE__ */ n("label", { className: "block space-y-1", children: [
89
- /* @__PURE__ */ a("span", { className: "text-[11px] font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Allowed hours" }),
90
- /* @__PURE__ */ a(
108
+ /* @__PURE__ */ o("label", { className: "block space-y-1", children: [
109
+ /* @__PURE__ */ s("span", { className: "text-[11px] font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Allowed hours" }),
110
+ /* @__PURE__ */ s(
91
111
  "input",
92
112
  {
93
113
  type: "number",
94
114
  min: 0.5,
95
115
  step: 0.5,
96
116
  value: b,
97
- onChange: (s) => y(s.target.value),
117
+ onChange: (n) => N(n.target.value),
98
118
  "data-sla-adjust-hours": !0,
99
119
  className: "h-8 w-full rounded-md border border-slate-200 bg-white px-2 text-[12.5px] text-slate-800 dark:border-border dark:bg-card dark:text-slate-100"
100
120
  }
101
121
  ),
102
- p != null && /* @__PURE__ */ a("span", { className: "block text-[11px] text-slate-500 dark:text-slate-400", children: p >= 0 ? `${l(p)} left after the change` : `Breached by ${l(-p)} after the change` })
122
+ p != null && /* @__PURE__ */ s("span", { className: "block text-[11px] text-slate-500 dark:text-slate-400", children: p >= 0 ? `${l(p)} left after the change` : `Breached by ${l(-p)} after the change` })
103
123
  ] }),
104
- /* @__PURE__ */ n("label", { className: "block space-y-1", children: [
105
- /* @__PURE__ */ a("span", { className: "text-[11px] font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Reason" }),
106
- /* @__PURE__ */ a(
124
+ /* @__PURE__ */ o("label", { className: "block space-y-1", children: [
125
+ /* @__PURE__ */ s("span", { className: "text-[11px] font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Reason" }),
126
+ /* @__PURE__ */ s(
107
127
  "textarea",
108
128
  {
109
- value: i,
110
- onChange: (s) => f(s.target.value),
129
+ value: c,
130
+ onChange: (n) => f(n.target.value),
111
131
  rows: 3,
112
132
  maxLength: 1e3,
113
133
  placeholder: "Why this record needs a different clock",
@@ -116,9 +136,9 @@ function G({
116
136
  }
117
137
  )
118
138
  ] }),
119
- N && /* @__PURE__ */ a("p", { className: "text-[11.5px] text-red-600 dark:text-red-400", children: N }),
120
- /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
121
- e.override && /* @__PURE__ */ a(
139
+ $ && /* @__PURE__ */ s("p", { className: "text-[11.5px] text-red-600 dark:text-red-400", children: $ }),
140
+ /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
141
+ e.override && /* @__PURE__ */ s(
122
142
  "button",
123
143
  {
124
144
  type: "button",
@@ -129,11 +149,11 @@ function G({
129
149
  children: v.isPending ? "Resetting…" : "Back to the rule"
130
150
  }
131
151
  ),
132
- /* @__PURE__ */ a(
152
+ /* @__PURE__ */ s(
133
153
  "button",
134
154
  {
135
155
  type: "button",
136
- disabled: !R || g.isPending,
156
+ disabled: !T || g.isPending,
137
157
  onClick: () => g.mutate(),
138
158
  "data-sla-adjust-save": !0,
139
159
  className: "ml-auto rounded-md bg-nvr-cyan px-3 py-1 text-[12px] font-medium text-white disabled:opacity-50",
@@ -146,20 +166,19 @@ function G({
146
166
  }
147
167
  );
148
168
  }
149
- function se({ collection: t, itemId: r }) {
150
- var u;
169
+ function le({ collection: t, itemId: r }) {
170
+ var d;
151
171
  const { data: e } = W(t, r);
152
172
  if (!(e != null && e.status) || e.status === "none" || e.total_hours == null) return null;
153
- const o = e.total_hours - (e.elapsed_hours ?? 0), m = e.status === "breached" ? "text-red-700 dark:text-red-300" : e.status === "warning" ? "text-amber-700 dark:text-amber-300" : "text-slate-600 dark:text-slate-300";
154
- return /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2", "data-sla-clock-line": e.status, children: [
155
- /* @__PURE__ */ a(L, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
156
- /* @__PURE__ */ n("p", { className: `min-w-0 flex-1 text-[12px] ${m}`, children: [
157
- /* @__PURE__ */ a("span", { className: "font-medium", children: "SLA" }),
158
- (u = e.sla_rule) != null && u.name ? ` · ${e.sla_rule.name}` : "",
159
- " ·",
160
- " ",
161
- o >= 0 ? `${l(o)} left of ${l(e.total_hours)}` : `${l(-o)} past the ${l(e.total_hours)} limit`,
162
- e.override && /* @__PURE__ */ n(
173
+ const a = e.status === "breached" ? "text-red-700 dark:text-red-300" : e.status === "warning" ? "text-amber-700 dark:text-amber-300" : "text-slate-600 dark:text-slate-300";
174
+ return /* @__PURE__ */ o("div", { className: "flex flex-wrap items-center gap-2", "data-sla-clock-line": e.status, children: [
175
+ /* @__PURE__ */ s(E, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
176
+ /* @__PURE__ */ o("p", { className: `min-w-0 flex-1 text-[12px] ${a}`, children: [
177
+ /* @__PURE__ */ s("span", { className: "font-medium", children: "SLA" }),
178
+ (d = e.sla_rule) != null && d.name ? ` · ${e.sla_rule.name}` : "",
179
+ " · ",
180
+ G(e),
181
+ e.override && /* @__PURE__ */ o(
163
182
  "span",
164
183
  {
165
184
  className: "ml-1 text-slate-500 dark:text-slate-400",
@@ -167,18 +186,21 @@ function se({ collection: t, itemId: r }) {
167
186
  "data-sla-override": !0,
168
187
  children: [
169
188
  "· ",
170
- D(e.override)
189
+ J(e.override)
171
190
  ]
172
191
  }
173
192
  )
174
193
  ] }),
175
- e.can_adjust && /* @__PURE__ */ a(G, { collection: t, itemId: r, data: e })
194
+ e.can_adjust && /* @__PURE__ */ s(V, { collection: t, itemId: r, data: e })
176
195
  ] });
177
196
  }
178
197
  export {
179
- G as AdjustClockPopover,
180
- se as SlaClockLine,
181
- D as overrideSentence,
198
+ V as AdjustClockPopover,
199
+ le as SlaClockLine,
200
+ J as overrideSentence,
201
+ G as slaClockText,
202
+ y as slaHours,
182
203
  q as slaStatusKey,
204
+ oe as stepAgeText,
183
205
  W as useSlaStatus
184
206
  };