@nivaro/react 0.3.139 → 0.3.140
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.
- package/dist/components/InlineGridField.js +95 -92
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +36 -2
- package/dist/shared/components/AudienceConfirmPanel.js +19 -19
- package/dist/shared/components/BroadcastView.js +213 -211
- package/dist/shared/components/CollectionBrowserView.js +2677 -2658
- package/dist/shared/components/ConfigHistory.js +45 -45
- package/dist/shared/components/ConformanceView.js +110 -110
- package/dist/shared/components/DataTable.js +51 -51
- package/dist/shared/components/FilePreviewLightbox.js +26 -25
- package/dist/shared/components/ItemEditForm.js +3038 -3027
- package/dist/shared/components/LiveCount.js +27 -23
- package/dist/shared/components/LiveTraceView.js +62 -61
- package/dist/shared/components/PageRenderer.js +422 -410
- package/dist/shared/components/ProfileView.js +199 -199
- package/dist/shared/components/QualityRulesView.js +70 -70
- package/dist/shared/components/QueryTable.js +131 -130
- package/dist/shared/components/RecordGraph.js +98 -98
- package/dist/shared/components/RecordReadView.js +287 -288
- package/dist/shared/components/ReportView.js +1279 -1259
- package/dist/shared/components/SlaRulesView.js +73 -74
- package/dist/shared/components/WidgetSlot.js +73 -73
- package/dist/shared/components/ai/AiChart.js +36 -32
- package/dist/shared/components/ai/AiMarkdown.js +136 -129
- package/dist/shared/components/ai/TaskDo.js +87 -87
- package/dist/shared/components/ai/answer-formats.js +37 -30
- package/dist/shared/components/ai/call-log/format.js +17 -16
- package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
- package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
- package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
- package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
- package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
- package/dist/shared/components/bulk/bulk-field-options.js +10 -10
- package/dist/shared/components/cbv/column-totals.js +53 -51
- package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
- package/dist/shared/components/command-center/announce.js +7 -6
- package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
- package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
- package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
- package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
- package/dist/shared/components/imports/RunDetailSheet.js +1 -1
- package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
- package/dist/shared/components/integrations/console/EventsView.js +35 -35
- package/dist/shared/components/integrations/console/FirefightView.js +15 -14
- package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
- package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
- package/dist/shared/components/integrations/console/SignalCard.js +67 -67
- package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
- package/dist/shared/components/item-edit/ChangesTray.js +88 -74
- package/dist/shared/components/item-edit/FilePickerField.js +123 -123
- package/dist/shared/components/item-edit/GroupSection.js +301 -292
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
- package/dist/shared/components/item-edit/InlineGridField.js +45 -36
- package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
- package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
- package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
- package/dist/shared/components/ops-report/format.js +37 -36
- package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
- package/dist/shared/components/panels/RevisionsPanel.js +306 -305
- package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
- package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
- package/dist/shared/components/pipeline/TeamsView.js +189 -130
- package/dist/shared/components/profile/AgentsPanel.js +6 -6
- package/dist/shared/components/profile/DelegationCard.js +13 -12
- package/dist/shared/components/profile/PersonActivity.js +48 -48
- package/dist/shared/components/profile/PersonExtras.js +107 -107
- package/dist/shared/components/profile/PersonWeek.js +9 -9
- package/dist/shared/components/queue/QueueBulkBar.js +19 -18
- package/dist/shared/components/queue/QueueBulkMove.js +21 -20
- package/dist/shared/components/queue/QueueItemSheet.js +136 -131
- package/dist/shared/components/queue/QueueWorklist.js +671 -670
- package/dist/shared/components/queue/worklist-helpers.js +36 -21
- package/dist/shared/components/support/RequestList.js +121 -121
- package/dist/shared/components/support/SupportAnalytics.js +29 -29
- package/dist/shared/lib/activity-sentence.js +251 -229
- package/dist/shared/lib/format-value.js +5 -4
- package/dist/shared/lib/number-format.js +87 -0
- package/dist/shared/lib/number-kind.js +133 -0
- package/dist/shared/lib/utils.js +24 -20
- package/dist/shared/lib/watch-list.js +1 -1
- package/dist/shared/lib/widget-value-format.js +26 -12
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsxs as n, Fragment as
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { UserRound as
|
|
4
|
-
import { useState as v, useEffect as
|
|
5
|
-
import { useNivaroClient as
|
|
6
|
-
import { get as D, post as
|
|
7
|
-
import { toastError as
|
|
8
|
-
import { useSettledRows as
|
|
9
|
-
import { useBackgroundArm as
|
|
10
|
-
import { useBelowMd as
|
|
11
|
-
import { cn as g } from "../../lib/utils.js";
|
|
12
|
-
import { ErrorNotice as
|
|
13
|
-
import { ConfirmButton as
|
|
14
|
-
import { DropdownMenu as
|
|
1
|
+
import { jsxs as n, Fragment as qe, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useQueryClient as _e, useQuery as O, useMutation as Pe } from "@tanstack/react-query";
|
|
3
|
+
import { UserRound as $e, Search as Le, X as pe, SlidersHorizontal as Re, LifeBuoy as Te, ArrowUp as Ae, ArrowDown as Fe, AlertTriangle as Ee } from "lucide-react";
|
|
4
|
+
import { useState as v, useEffect as Me, useMemo as se, useCallback as Ue } from "react";
|
|
5
|
+
import { useNivaroClient as Be } from "../../context.js";
|
|
6
|
+
import { get as D, post as Ie } from "../../lib/commands.js";
|
|
7
|
+
import { toastError as ze } from "../../lib/error-toast.js";
|
|
8
|
+
import { useSettledRows as Oe, useLiveFade as De } from "../../lib/live-screen.js";
|
|
9
|
+
import { useBackgroundArm as Ge } from "../../lib/live-views.js";
|
|
10
|
+
import { useBelowMd as Ke } from "../../lib/use-below-md.js";
|
|
11
|
+
import { cn as g, formatNumber as G } from "../../lib/utils.js";
|
|
12
|
+
import { ErrorNotice as je } from "../ErrorNotice.js";
|
|
13
|
+
import { ConfirmButton as ne } from "../profile/primitives.js";
|
|
14
|
+
import { DropdownMenu as le, DropdownMenuTrigger as ie, DropdownMenuContent as oe, DropdownMenuItem as de } from "../ui/dropdown-menu.js";
|
|
15
15
|
import { SimpleSelect as R } from "../ui/SimpleSelect.js";
|
|
16
|
-
import { PersonPick as
|
|
17
|
-
import { readFilters as
|
|
18
|
-
import { StatusPill as
|
|
19
|
-
const _ = 50,
|
|
20
|
-
function
|
|
16
|
+
import { PersonPick as me, PersonDisc as j, PickCaret as F, PICK_TRIGGER as ce } from "./PersonPick.js";
|
|
17
|
+
import { readFilters as We, listParams as Qe, bulkResultLine as Ye, activeFilterCount as He, STATUS_FILTERS as Je, PRIORITY_FILTERS as Xe, SORTS as Ve, writeFilters as Ze, defaultFilters as et, shortAgo as ge, exactTime as K } from "./support-list.js";
|
|
18
|
+
import { StatusPill as he } from "./TicketDetailSheet.js";
|
|
19
|
+
const _ = 50, tt = /* @__PURE__ */ new Set(["done", "cancelled"]);
|
|
20
|
+
function ue() {
|
|
21
21
|
try {
|
|
22
22
|
return typeof window > "u" ? null : window.localStorage;
|
|
23
23
|
} catch {
|
|
@@ -25,40 +25,40 @@ function ce() {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
const T = "h-8 w-auto max-w-[12rem] gap-1.5 rounded-md border-slate-200 bg-white px-2.5 text-[12.5px] text-slate-700 dark:border-border dark:bg-background dark:text-slate-200";
|
|
28
|
-
function
|
|
28
|
+
function St({
|
|
29
29
|
tab: a,
|
|
30
30
|
openId: s,
|
|
31
31
|
onOpen: c
|
|
32
32
|
}) {
|
|
33
|
-
var
|
|
34
|
-
const l =
|
|
33
|
+
var ae, re;
|
|
34
|
+
const l = Be(), u = _e(), o = Ke(), i = a === "desk", [r, b] = v(() => We(a, ue())), [f, E] = v(""), [C, P] = v(1), [W, ye] = v(!1), [h, S] = v(() => /* @__PURE__ */ new Set()), [Q, Y] = v(null), y = (t) => {
|
|
35
35
|
b((d) => {
|
|
36
36
|
const p = { ...d, ...t };
|
|
37
|
-
return
|
|
37
|
+
return Ze(a, p, ue()), p;
|
|
38
38
|
}), P(1);
|
|
39
|
-
}, M = { ...
|
|
39
|
+
}, M = { ...Qe(a, r, f), page: String(C), limit: String(_) }, U = JSON.stringify(M), k = O({
|
|
40
40
|
queryKey: ["support-tickets", M],
|
|
41
41
|
queryFn: () => l.request(D("/support/tickets", M))
|
|
42
42
|
}), { data: m } = O({
|
|
43
43
|
queryKey: ["support-workload"],
|
|
44
44
|
queryFn: () => l.request(D("/support/workload")).then((t) => t.data),
|
|
45
45
|
enabled: i
|
|
46
|
-
}), { data:
|
|
46
|
+
}), { data: Ne = [] } = O({
|
|
47
47
|
queryKey: ["support-categories", "any"],
|
|
48
48
|
queryFn: () => l.request(D("/support/categories", { any: "1" })).then((t) => t.data ?? [])
|
|
49
49
|
});
|
|
50
|
-
|
|
51
|
-
S(/* @__PURE__ */ new Set()),
|
|
50
|
+
Me(() => {
|
|
51
|
+
S(/* @__PURE__ */ new Set()), Y(null);
|
|
52
52
|
}, [U]);
|
|
53
|
-
const
|
|
53
|
+
const we = se(() => [...h].map(String), [h]), $ = Oe((ae = k.data) == null ? void 0 : ae.data, (t) => String(t.id), {
|
|
54
54
|
resetKey: U,
|
|
55
|
-
held:
|
|
56
|
-
}),
|
|
55
|
+
held: we
|
|
56
|
+
}), H = De(Ge(k.dataUpdatedAt, U)), ve = Ue(
|
|
57
57
|
(t) => {
|
|
58
|
-
$.containerRef(t),
|
|
58
|
+
$.containerRef(t), H(t);
|
|
59
59
|
},
|
|
60
|
-
[$.containerRef,
|
|
61
|
-
),
|
|
60
|
+
[$.containerRef, H]
|
|
61
|
+
), J = se(() => {
|
|
62
62
|
const t = new Map(((m == null ? void 0 : m.assignees) ?? []).map((d) => [d.id, d.open]));
|
|
63
63
|
return ((m == null ? void 0 : m.workers) ?? []).map((d) => ({
|
|
64
64
|
value: d.id,
|
|
@@ -66,16 +66,16 @@ function Ct({
|
|
|
66
66
|
person: !0,
|
|
67
67
|
hint: t.get(d.id) ? `${t.get(d.id)} open` : void 0
|
|
68
68
|
}));
|
|
69
|
-
}, [m]),
|
|
69
|
+
}, [m]), X = (t) => {
|
|
70
70
|
var d, p;
|
|
71
71
|
return t === "me" ? "Me" : t === "unassigned" ? "Unassigned" : ((d = m == null ? void 0 : m.workers.find((x) => x.id === t)) == null ? void 0 : d.name) ?? ((p = m == null ? void 0 : m.assignees.find((x) => x.id === t)) == null ? void 0 : p.name) ?? "Someone";
|
|
72
|
-
},
|
|
72
|
+
}, V = Pe({
|
|
73
73
|
mutationFn: ({
|
|
74
74
|
ids: t,
|
|
75
75
|
body: d
|
|
76
|
-
}) => l.request(
|
|
76
|
+
}) => l.request(Ie("/support/tickets/bulk", { ids: t, ...d })).then((p) => p.data),
|
|
77
77
|
onSuccess: (t, d) => {
|
|
78
|
-
|
|
78
|
+
Y(Ye(d.action, t));
|
|
79
79
|
const p = t.results.filter((x) => x.outcome !== "refused").map((x) => String(x.id));
|
|
80
80
|
$.release(p), S(/* @__PURE__ */ new Set());
|
|
81
81
|
for (const x of [
|
|
@@ -86,37 +86,37 @@ function Ct({
|
|
|
86
86
|
])
|
|
87
87
|
u.invalidateQueries({ queryKey: [x] });
|
|
88
88
|
},
|
|
89
|
-
onError: (t) =>
|
|
90
|
-
}),
|
|
89
|
+
onError: (t) => ze(t, "Could not change those requests")
|
|
90
|
+
}), Ce = (t) => {
|
|
91
91
|
const d = [...h];
|
|
92
92
|
if (!d.length) return;
|
|
93
93
|
const p = t.kind === "status" ? { status: t.status } : t.kind === "assign" ? { assignee: t.assignee } : { priority: t.priority };
|
|
94
|
-
|
|
95
|
-
}, L = $.rows, B = L.filter((t) => t.state !== "departed").map((t) => t.row.id), I = B.length > 0 && B.every((t) => h.has(t)),
|
|
94
|
+
V.mutate({ ids: d, body: p, action: t });
|
|
95
|
+
}, L = $.rows, B = L.filter((t) => t.state !== "departed").map((t) => t.row.id), I = B.length > 0 && B.every((t) => h.has(t)), Z = (t) => S((d) => {
|
|
96
96
|
const p = new Set(d);
|
|
97
97
|
return p.has(t) ? p.delete(t) : p.add(t), p;
|
|
98
|
-
}),
|
|
99
|
-
const t =
|
|
98
|
+
}), Se = () => S(I ? /* @__PURE__ */ new Set() : new Set(B)), w = He(a, r), z = () => {
|
|
99
|
+
const t = et(a);
|
|
100
100
|
y({
|
|
101
101
|
status: t.status,
|
|
102
102
|
assignee: t.assignee,
|
|
103
103
|
category: t.category,
|
|
104
104
|
priority: t.priority
|
|
105
105
|
}), E("");
|
|
106
|
-
}, q = (t) => y({ sort: t }), N = ((
|
|
106
|
+
}, q = (t) => y({ sort: t }), N = ((re = k.data) == null ? void 0 : re.total) ?? 0, ee = Math.max(1, Math.ceil(N / _)), te = /* @__PURE__ */ n(qe, { children: [
|
|
107
107
|
/* @__PURE__ */ e(
|
|
108
108
|
R,
|
|
109
109
|
{
|
|
110
110
|
value: r.status,
|
|
111
111
|
onChange: (t) => y({ status: t }),
|
|
112
|
-
options:
|
|
112
|
+
options: Je,
|
|
113
113
|
ariaLabel: "Status",
|
|
114
114
|
className: g(T, o && "w-full max-w-none"),
|
|
115
115
|
triggerProps: { "data-support-filter": "status" }
|
|
116
116
|
}
|
|
117
117
|
),
|
|
118
118
|
i && /* @__PURE__ */ e(
|
|
119
|
-
|
|
119
|
+
me,
|
|
120
120
|
{
|
|
121
121
|
value: r.assignee,
|
|
122
122
|
ariaLabel: "Assignee",
|
|
@@ -125,24 +125,24 @@ function Ct({
|
|
|
125
125
|
{ value: "me", label: "Me" },
|
|
126
126
|
{ value: "unassigned", label: "Unassigned" }
|
|
127
127
|
],
|
|
128
|
-
people:
|
|
128
|
+
people: J,
|
|
129
129
|
onPick: (t) => y({ assignee: t }),
|
|
130
130
|
trigger: /* @__PURE__ */ n(
|
|
131
131
|
"button",
|
|
132
132
|
{
|
|
133
133
|
type: "button",
|
|
134
134
|
"data-support-filter": "assignee",
|
|
135
|
-
className: g(
|
|
135
|
+
className: g(ce, o && "w-full max-w-none"),
|
|
136
136
|
children: [
|
|
137
137
|
r.assignee && r.assignee !== "unassigned" && r.assignee !== "me" ? /* @__PURE__ */ e(
|
|
138
|
-
|
|
138
|
+
j,
|
|
139
139
|
{
|
|
140
140
|
id: r.assignee,
|
|
141
|
-
name:
|
|
141
|
+
name: X(r.assignee),
|
|
142
142
|
size: 16
|
|
143
143
|
}
|
|
144
|
-
) : /* @__PURE__ */ e(
|
|
145
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: r.assignee ?
|
|
144
|
+
) : /* @__PURE__ */ e($e, { className: "h-3.5 w-3.5 shrink-0 opacity-60" }),
|
|
145
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: r.assignee ? X(r.assignee) : "Anyone" }),
|
|
146
146
|
/* @__PURE__ */ e(F, {})
|
|
147
147
|
]
|
|
148
148
|
}
|
|
@@ -156,7 +156,7 @@ function Ct({
|
|
|
156
156
|
onChange: (t) => y({ category: t }),
|
|
157
157
|
options: [
|
|
158
158
|
{ value: "", label: "Any type" },
|
|
159
|
-
...
|
|
159
|
+
...Ne.map((t) => ({ value: String(t.id), label: t.name }))
|
|
160
160
|
],
|
|
161
161
|
ariaLabel: "Type",
|
|
162
162
|
className: g(T, o && "w-full max-w-none"),
|
|
@@ -168,7 +168,7 @@ function Ct({
|
|
|
168
168
|
{
|
|
169
169
|
value: r.priority,
|
|
170
170
|
onChange: (t) => y({ priority: t }),
|
|
171
|
-
options:
|
|
171
|
+
options: Xe,
|
|
172
172
|
ariaLabel: "Priority",
|
|
173
173
|
className: g(T, o && "w-full max-w-none"),
|
|
174
174
|
triggerProps: { "data-support-filter": "priority" }
|
|
@@ -185,7 +185,7 @@ function Ct({
|
|
|
185
185
|
o && "basis-full"
|
|
186
186
|
),
|
|
187
187
|
children: [
|
|
188
|
-
/* @__PURE__ */ e(
|
|
188
|
+
/* @__PURE__ */ e(Le, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
189
189
|
/* @__PURE__ */ e(
|
|
190
190
|
"input",
|
|
191
191
|
{
|
|
@@ -205,7 +205,7 @@ function Ct({
|
|
|
205
205
|
onClick: () => E(""),
|
|
206
206
|
"aria-label": "Clear search",
|
|
207
207
|
className: "rounded p-0.5 text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",
|
|
208
|
-
children: /* @__PURE__ */ e(
|
|
208
|
+
children: /* @__PURE__ */ e(pe, { className: "h-3 w-3" })
|
|
209
209
|
}
|
|
210
210
|
)
|
|
211
211
|
]
|
|
@@ -216,19 +216,19 @@ function Ct({
|
|
|
216
216
|
{
|
|
217
217
|
type: "button",
|
|
218
218
|
"data-support-filters-toggle": !0,
|
|
219
|
-
"aria-expanded":
|
|
220
|
-
onClick: () =>
|
|
219
|
+
"aria-expanded": W,
|
|
220
|
+
onClick: () => ye((t) => !t),
|
|
221
221
|
className: g(
|
|
222
|
-
|
|
222
|
+
ce,
|
|
223
223
|
w > 0 && "border-nvr-cyan/60 text-nvr-navy dark:text-nvr-cyan"
|
|
224
224
|
),
|
|
225
225
|
children: [
|
|
226
|
-
/* @__PURE__ */ e(
|
|
226
|
+
/* @__PURE__ */ e(Re, { className: "h-3.5 w-3.5" }),
|
|
227
227
|
"Filters",
|
|
228
228
|
w > 0 && /* @__PURE__ */ e("span", { className: "rounded-full bg-nvr-cyan/15 px-1.5 text-[10.5px] font-semibold tabular-nums", children: w })
|
|
229
229
|
]
|
|
230
230
|
}
|
|
231
|
-
) :
|
|
231
|
+
) : te,
|
|
232
232
|
!o && w + (f ? 1 : 0) > 0 && /* @__PURE__ */ e(
|
|
233
233
|
"button",
|
|
234
234
|
{
|
|
@@ -246,7 +246,7 @@ function Ct({
|
|
|
246
246
|
{
|
|
247
247
|
value: r.sort,
|
|
248
248
|
onChange: (t) => q(t),
|
|
249
|
-
options:
|
|
249
|
+
options: Ve,
|
|
250
250
|
ariaLabel: "Sort",
|
|
251
251
|
className: T,
|
|
252
252
|
triggerProps: { "data-support-sort": r.sort }
|
|
@@ -254,13 +254,13 @@ function Ct({
|
|
|
254
254
|
)
|
|
255
255
|
] })
|
|
256
256
|
] }),
|
|
257
|
-
o &&
|
|
257
|
+
o && W && /* @__PURE__ */ n(
|
|
258
258
|
"div",
|
|
259
259
|
{
|
|
260
260
|
className: "mt-2 grid grid-cols-1 gap-2 rounded-lg border border-slate-200 bg-white p-3 dark:border-border dark:bg-card",
|
|
261
261
|
"data-support-filters-panel": !0,
|
|
262
262
|
children: [
|
|
263
|
-
|
|
263
|
+
te,
|
|
264
264
|
w > 0 && /* @__PURE__ */ e(
|
|
265
265
|
"button",
|
|
266
266
|
{
|
|
@@ -274,7 +274,7 @@ function Ct({
|
|
|
274
274
|
}
|
|
275
275
|
),
|
|
276
276
|
i && m && /* @__PURE__ */ e(
|
|
277
|
-
|
|
277
|
+
st,
|
|
278
278
|
{
|
|
279
279
|
workload: m,
|
|
280
280
|
active: r.assignee,
|
|
@@ -284,24 +284,24 @@ function Ct({
|
|
|
284
284
|
/* @__PURE__ */ e(
|
|
285
285
|
"div",
|
|
286
286
|
{
|
|
287
|
-
ref:
|
|
287
|
+
ref: ve,
|
|
288
288
|
className: "mt-3 overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card",
|
|
289
289
|
children: k.isLoading ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", "aria-busy": !0, children: [0, 1, 2, 3].map((t) => /* @__PURE__ */ e("div", { className: "h-9 animate-pulse rounded bg-[hsl(var(--nvr-skeleton))]" }, t)) }) : k.isError && !k.data ? /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e(
|
|
290
|
-
|
|
290
|
+
je,
|
|
291
291
|
{
|
|
292
292
|
error: k.error,
|
|
293
293
|
what: "the requests",
|
|
294
294
|
onRetry: () => void k.refetch()
|
|
295
295
|
}
|
|
296
296
|
) }) : L.length ? o ? /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", "data-support-list": !0, children: L.map(({ row: t, state: d }) => /* @__PURE__ */ e(
|
|
297
|
-
|
|
297
|
+
rt,
|
|
298
298
|
{
|
|
299
299
|
t,
|
|
300
300
|
desk: i,
|
|
301
301
|
departed: d === "departed",
|
|
302
302
|
open: s === t.id,
|
|
303
303
|
selected: h.has(t.id),
|
|
304
|
-
onToggle: () =>
|
|
304
|
+
onToggle: () => Z(t.id),
|
|
305
305
|
onOpen: () => c(t.id)
|
|
306
306
|
},
|
|
307
307
|
t.id
|
|
@@ -312,7 +312,7 @@ function Ct({
|
|
|
312
312
|
{
|
|
313
313
|
type: "checkbox",
|
|
314
314
|
checked: I,
|
|
315
|
-
onChange:
|
|
315
|
+
onChange: Se,
|
|
316
316
|
"aria-label": I ? "Clear selection" : "Select every request on this page",
|
|
317
317
|
className: "h-3.5 w-3.5 cursor-pointer align-middle accent-nvr-navy dark:accent-nvr-cyan"
|
|
318
318
|
}
|
|
@@ -368,20 +368,20 @@ function Ct({
|
|
|
368
368
|
)
|
|
369
369
|
] }) }),
|
|
370
370
|
/* @__PURE__ */ e("tbody", { className: "divide-y divide-slate-100 dark:divide-border/60", children: L.map(({ row: t, state: d }) => /* @__PURE__ */ e(
|
|
371
|
-
|
|
371
|
+
at,
|
|
372
372
|
{
|
|
373
373
|
t,
|
|
374
374
|
desk: i,
|
|
375
375
|
departed: d === "departed",
|
|
376
376
|
open: s === t.id,
|
|
377
377
|
selected: h.has(t.id),
|
|
378
|
-
onToggle: () =>
|
|
378
|
+
onToggle: () => Z(t.id),
|
|
379
379
|
onOpen: () => c(t.id)
|
|
380
380
|
},
|
|
381
381
|
t.id
|
|
382
382
|
)) })
|
|
383
383
|
] }) : /* @__PURE__ */ e(
|
|
384
|
-
|
|
384
|
+
lt,
|
|
385
385
|
{
|
|
386
386
|
tab: a,
|
|
387
387
|
filtered: w > 0 || !!f.trim(),
|
|
@@ -393,8 +393,8 @@ function Ct({
|
|
|
393
393
|
}
|
|
394
394
|
),
|
|
395
395
|
N > 0 && /* @__PURE__ */ n("div", { className: "mt-2 flex items-center gap-3 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
|
|
396
|
-
/* @__PURE__ */ e("span", { className: "tabular-nums", children: N <= _ ? `${N} request${N === 1 ? "" : "s"}` : `${(C - 1) * _ + 1}–${Math.min(C * _, N)} of ${N}` }),
|
|
397
|
-
|
|
396
|
+
/* @__PURE__ */ e("span", { className: "tabular-nums", children: N <= _ ? `${N} request${N === 1 ? "" : "s"}` : `${G((C - 1) * _ + 1)}–${G(Math.min(C * _, N))} of ${G(N)}` }),
|
|
397
|
+
ee > 1 && /* @__PURE__ */ n("span", { className: "flex items-center gap-1", children: [
|
|
398
398
|
/* @__PURE__ */ e(
|
|
399
399
|
"button",
|
|
400
400
|
{
|
|
@@ -409,30 +409,30 @@ function Ct({
|
|
|
409
409
|
"button",
|
|
410
410
|
{
|
|
411
411
|
type: "button",
|
|
412
|
-
disabled: C >=
|
|
412
|
+
disabled: C >= ee,
|
|
413
413
|
onClick: () => P((t) => t + 1),
|
|
414
414
|
className: "rounded px-1.5 py-0.5 hover:bg-slate-100 disabled:opacity-40 dark:hover:bg-white/5",
|
|
415
415
|
children: "Next"
|
|
416
416
|
}
|
|
417
417
|
)
|
|
418
418
|
] }),
|
|
419
|
-
|
|
419
|
+
Q && !h.size && /* @__PURE__ */ e(
|
|
420
420
|
"span",
|
|
421
421
|
{
|
|
422
422
|
className: "text-slate-700 dark:text-slate-200",
|
|
423
423
|
"data-support-bulk-result": !0,
|
|
424
424
|
role: "status",
|
|
425
|
-
children:
|
|
425
|
+
children: Q
|
|
426
426
|
}
|
|
427
427
|
)
|
|
428
428
|
] }),
|
|
429
429
|
i && h.size > 0 && /* @__PURE__ */ e(
|
|
430
|
-
|
|
430
|
+
nt,
|
|
431
431
|
{
|
|
432
432
|
count: h.size,
|
|
433
|
-
busy:
|
|
434
|
-
people:
|
|
435
|
-
onRun:
|
|
433
|
+
busy: V.isPending,
|
|
434
|
+
people: J,
|
|
435
|
+
onRun: Ce,
|
|
436
436
|
onClear: () => S(/* @__PURE__ */ new Set())
|
|
437
437
|
}
|
|
438
438
|
)
|
|
@@ -447,7 +447,7 @@ function A({
|
|
|
447
447
|
className: o,
|
|
448
448
|
right: i
|
|
449
449
|
}) {
|
|
450
|
-
const r = c === "asc" ?
|
|
450
|
+
const r = c === "asc" ? Ae : Fe;
|
|
451
451
|
return /* @__PURE__ */ e(
|
|
452
452
|
"th",
|
|
453
453
|
{
|
|
@@ -473,8 +473,8 @@ function A({
|
|
|
473
473
|
}
|
|
474
474
|
);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
477
|
-
const c =
|
|
476
|
+
function xe({ t: a, desk: s }) {
|
|
477
|
+
const c = tt.has(a.status), l = c ? a.completed_at ?? a.updated_at ?? a.created_at : s ? a.waiting_since ?? a.created_at : a.updated_at ?? a.created_at, u = c ? `Closed ${K(l)}` : s ? `Waiting since ${K(l)}` : `Updated ${K(l)}`;
|
|
478
478
|
return /* @__PURE__ */ n(
|
|
479
479
|
"time",
|
|
480
480
|
{
|
|
@@ -482,7 +482,7 @@ function he({ t: a, desk: s }) {
|
|
|
482
482
|
"data-tip": u,
|
|
483
483
|
className: "relative tabular-nums text-slate-500 dark:text-muted-foreground",
|
|
484
484
|
children: [
|
|
485
|
-
|
|
485
|
+
ge(l),
|
|
486
486
|
/* @__PURE__ */ n("span", { className: "sr-only", children: [
|
|
487
487
|
" (",
|
|
488
488
|
u,
|
|
@@ -492,19 +492,19 @@ function he({ t: a, desk: s }) {
|
|
|
492
492
|
}
|
|
493
493
|
);
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function be({ p: a }) {
|
|
496
496
|
return a === "urgent" ? /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 font-medium text-red-600 dark:text-red-400", children: [
|
|
497
|
-
/* @__PURE__ */ e(
|
|
497
|
+
/* @__PURE__ */ e(Ee, { className: "h-3 w-3" }),
|
|
498
498
|
" Urgent"
|
|
499
499
|
] }) : /* @__PURE__ */ e("span", { className: "text-slate-500 capitalize dark:text-muted-foreground", children: a });
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function fe({ t: a }) {
|
|
502
502
|
return a.assignee ? /* @__PURE__ */ n("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
503
|
-
/* @__PURE__ */ e(
|
|
503
|
+
/* @__PURE__ */ e(j, { id: a.assignee, name: a.assignee_name }),
|
|
504
504
|
/* @__PURE__ */ e("span", { className: "truncate text-slate-700 dark:text-slate-200", children: a.assignee_name ?? "Someone" })
|
|
505
505
|
] }) : /* @__PURE__ */ e("span", { className: "inline-flex items-center rounded-full border border-dashed border-slate-300 px-2 py-px text-[11.5px] text-slate-500 dark:border-slate-600 dark:text-muted-foreground", children: "Unassigned" });
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function ke(a, s) {
|
|
508
508
|
return [
|
|
509
509
|
a.record_label ?? "General Support",
|
|
510
510
|
a.category_name,
|
|
@@ -512,7 +512,7 @@ function fe(a, s) {
|
|
|
512
512
|
a.replies ? `${a.replies} repl${a.replies === 1 ? "y" : "ies"}` : null
|
|
513
513
|
].filter(Boolean).join(" · ");
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function at({ t: a, desk: s, departed: c, open: l, selected: u, onToggle: o, onOpen: i }) {
|
|
516
516
|
return /* @__PURE__ */ n(
|
|
517
517
|
"tr",
|
|
518
518
|
{
|
|
@@ -548,20 +548,20 @@ function tt({ t: a, desk: s, departed: c, open: l, selected: u, onToggle: o, onO
|
|
|
548
548
|
className: "block w-full min-w-0 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan rounded",
|
|
549
549
|
children: [
|
|
550
550
|
/* @__PURE__ */ e("span", { className: "block truncate text-[13px] font-medium text-slate-900 dark:text-slate-100", children: a.title }),
|
|
551
|
-
/* @__PURE__ */ e("span", { className: "mt-0.5 block truncate text-[11.5px] text-slate-500 dark:text-muted-foreground", children:
|
|
551
|
+
/* @__PURE__ */ e("span", { className: "mt-0.5 block truncate text-[11.5px] text-slate-500 dark:text-muted-foreground", children: ke(a, !1) })
|
|
552
552
|
]
|
|
553
553
|
}
|
|
554
554
|
) }),
|
|
555
555
|
s && /* @__PURE__ */ e("td", { className: "hidden truncate px-3 py-2 text-slate-700 lg:table-cell dark:text-slate-200", children: a.requester_name ?? "—" }),
|
|
556
|
-
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(
|
|
557
|
-
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(
|
|
558
|
-
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(
|
|
559
|
-
/* @__PURE__ */ e("td", { className: "py-2 pl-3 pr-4 text-right", children: /* @__PURE__ */ e(
|
|
556
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(fe, { t: a }) }),
|
|
557
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(he, { status: a.status, label: a.status_label }) }),
|
|
558
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(be, { p: a.priority }) }),
|
|
559
|
+
/* @__PURE__ */ e("td", { className: "py-2 pl-3 pr-4 text-right", children: /* @__PURE__ */ e(xe, { t: a, desk: s }) })
|
|
560
560
|
]
|
|
561
561
|
}
|
|
562
562
|
);
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function rt({ t: a, desk: s, departed: c, open: l, selected: u, onToggle: o, onOpen: i }) {
|
|
565
565
|
return /* @__PURE__ */ n(
|
|
566
566
|
"li",
|
|
567
567
|
{
|
|
@@ -590,21 +590,21 @@ function at({ t: a, desk: s, departed: c, open: l, selected: u, onToggle: o, onO
|
|
|
590
590
|
"#",
|
|
591
591
|
a.id
|
|
592
592
|
] }),
|
|
593
|
-
a.priority === "urgent" && /* @__PURE__ */ e(
|
|
593
|
+
a.priority === "urgent" && /* @__PURE__ */ e(be, { p: "urgent" }),
|
|
594
594
|
/* @__PURE__ */ n("span", { className: "ml-auto flex items-center gap-2", children: [
|
|
595
|
-
/* @__PURE__ */ e(
|
|
596
|
-
/* @__PURE__ */ e(
|
|
595
|
+
/* @__PURE__ */ e(xe, { t: a, desk: s }),
|
|
596
|
+
/* @__PURE__ */ e(he, { status: a.status, label: a.status_label })
|
|
597
597
|
] })
|
|
598
598
|
] }),
|
|
599
599
|
/* @__PURE__ */ e("span", { className: "mt-1 line-clamp-2 block text-[13.5px] font-medium text-slate-900 dark:text-slate-100", children: a.title }),
|
|
600
|
-
/* @__PURE__ */ e("span", { className: "mt-0.5 block truncate text-[12px] text-slate-500 dark:text-muted-foreground", children:
|
|
601
|
-
/* @__PURE__ */ e("span", { className: "mt-1.5 block text-[12px]", children: /* @__PURE__ */ e(
|
|
600
|
+
/* @__PURE__ */ e("span", { className: "mt-0.5 block truncate text-[12px] text-slate-500 dark:text-muted-foreground", children: ke(a, s) }),
|
|
601
|
+
/* @__PURE__ */ e("span", { className: "mt-1.5 block text-[12px]", children: /* @__PURE__ */ e(fe, { t: a }) })
|
|
602
602
|
] })
|
|
603
603
|
]
|
|
604
604
|
}
|
|
605
605
|
);
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function st({
|
|
608
608
|
workload: a,
|
|
609
609
|
active: s,
|
|
610
610
|
onPick: c
|
|
@@ -615,7 +615,7 @@ function rt({
|
|
|
615
615
|
), u = (r) => /* @__PURE__ */ e("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-slate-100", children: r }), o = (r, b, f) => [
|
|
616
616
|
`${r} open`,
|
|
617
617
|
b ? `${b} urgent` : null,
|
|
618
|
-
f ? `longest waiting ${
|
|
618
|
+
f ? `longest waiting ${ge(f)}` : null
|
|
619
619
|
].filter(Boolean).join(" · "), i = a.unassigned;
|
|
620
620
|
return !i.open && !a.assignees.length ? null : /* @__PURE__ */ n(
|
|
621
621
|
"div",
|
|
@@ -650,7 +650,7 @@ function rt({
|
|
|
650
650
|
onClick: () => c(r.id),
|
|
651
651
|
className: g(l(s === r.id), !r.active && "opacity-70"),
|
|
652
652
|
children: [
|
|
653
|
-
/* @__PURE__ */ e(
|
|
653
|
+
/* @__PURE__ */ e(j, { id: r.id, name: r.name, size: 20 }),
|
|
654
654
|
/* @__PURE__ */ e("span", { className: "max-w-[9rem] truncate", children: r.name }),
|
|
655
655
|
u(r.open),
|
|
656
656
|
r.urgent > 0 && /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 rounded-full bg-red-500", "aria-hidden": !0 })
|
|
@@ -662,7 +662,7 @@ function rt({
|
|
|
662
662
|
}
|
|
663
663
|
);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function nt({
|
|
666
666
|
count: a,
|
|
667
667
|
busy: s,
|
|
668
668
|
people: c,
|
|
@@ -690,13 +690,13 @@ function st({
|
|
|
690
690
|
"data-tip": "Clear selection",
|
|
691
691
|
"aria-label": "Clear selection",
|
|
692
692
|
className: "ml-1 inline-flex h-6 w-6 items-center justify-center rounded text-slate-500 hover:bg-slate-100 hover:text-slate-800 dark:text-muted-foreground dark:hover:bg-white/10 dark:hover:text-slate-100",
|
|
693
|
-
children: /* @__PURE__ */ e(
|
|
693
|
+
children: /* @__PURE__ */ e(pe, { className: "h-3.5 w-3.5" })
|
|
694
694
|
}
|
|
695
695
|
)
|
|
696
696
|
] }),
|
|
697
697
|
/* @__PURE__ */ e("span", { className: "mx-1 h-5 w-px bg-slate-200 dark:bg-border", "aria-hidden": !0 }),
|
|
698
698
|
/* @__PURE__ */ e(
|
|
699
|
-
|
|
699
|
+
ne,
|
|
700
700
|
{
|
|
701
701
|
onConfirm: () => l({ kind: "status", status: "done" }),
|
|
702
702
|
disabled: s,
|
|
@@ -708,7 +708,7 @@ function st({
|
|
|
708
708
|
}
|
|
709
709
|
),
|
|
710
710
|
/* @__PURE__ */ e(
|
|
711
|
-
|
|
711
|
+
ne,
|
|
712
712
|
{
|
|
713
713
|
onConfirm: () => l({ kind: "status", status: "cancelled" }),
|
|
714
714
|
disabled: s,
|
|
@@ -720,7 +720,7 @@ function st({
|
|
|
720
720
|
}
|
|
721
721
|
),
|
|
722
722
|
/* @__PURE__ */ e(
|
|
723
|
-
|
|
723
|
+
me,
|
|
724
724
|
{
|
|
725
725
|
value: "",
|
|
726
726
|
ariaLabel: "Assign to",
|
|
@@ -739,31 +739,31 @@ function st({
|
|
|
739
739
|
] })
|
|
740
740
|
}
|
|
741
741
|
),
|
|
742
|
-
/* @__PURE__ */ n(
|
|
743
|
-
/* @__PURE__ */ e(
|
|
742
|
+
/* @__PURE__ */ n(le, { children: [
|
|
743
|
+
/* @__PURE__ */ e(ie, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", disabled: s, className: o, children: [
|
|
744
744
|
"Status ",
|
|
745
745
|
/* @__PURE__ */ e(F, {})
|
|
746
746
|
] }) }),
|
|
747
|
-
/* @__PURE__ */ e(
|
|
747
|
+
/* @__PURE__ */ e(oe, { align: "start", className: "text-[12.5px]", children: [
|
|
748
748
|
["open", "Open"],
|
|
749
749
|
["in_progress", "In progress"],
|
|
750
750
|
["done", "Done"],
|
|
751
751
|
["cancelled", "Cancelled"]
|
|
752
|
-
].map(([r, b]) => /* @__PURE__ */ e(
|
|
752
|
+
].map(([r, b]) => /* @__PURE__ */ e(de, { onSelect: () => l({ kind: "status", status: r }), children: b }, r)) })
|
|
753
753
|
] }),
|
|
754
|
-
/* @__PURE__ */ n(
|
|
755
|
-
/* @__PURE__ */ e(
|
|
754
|
+
/* @__PURE__ */ n(le, { children: [
|
|
755
|
+
/* @__PURE__ */ e(ie, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", disabled: s, className: o, children: [
|
|
756
756
|
"Priority ",
|
|
757
757
|
/* @__PURE__ */ e(F, {})
|
|
758
758
|
] }) }),
|
|
759
|
-
/* @__PURE__ */ e(
|
|
759
|
+
/* @__PURE__ */ e(oe, { align: "start", className: "text-[12.5px]", children: ["urgent", "normal", "low"].map((r) => /* @__PURE__ */ e(de, { onSelect: () => l({ kind: "priority", priority: r }), children: /* @__PURE__ */ e("span", { className: "capitalize", children: r }) }, r)) })
|
|
760
760
|
] })
|
|
761
761
|
]
|
|
762
762
|
}
|
|
763
763
|
) })
|
|
764
764
|
);
|
|
765
765
|
}
|
|
766
|
-
function
|
|
766
|
+
function lt({
|
|
767
767
|
tab: a,
|
|
768
768
|
filtered: s,
|
|
769
769
|
unassignedOnly: c,
|
|
@@ -771,7 +771,7 @@ function nt({
|
|
|
771
771
|
onClear: u
|
|
772
772
|
}) {
|
|
773
773
|
return /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-2 px-6 py-12 text-center", "data-support-empty": !0, children: [
|
|
774
|
-
/* @__PURE__ */ e(
|
|
774
|
+
/* @__PURE__ */ e(Te, { className: "h-6 w-6 text-slate-300 dark:text-slate-600" }),
|
|
775
775
|
/* @__PURE__ */ e("p", { className: "text-[13px] font-medium text-slate-700 dark:text-slate-200", children: a === "desk" ? c ? "Every request has been picked up." : s ? "No requests match these filters." : l ? "Nothing closed yet." : "No open requests. The desk is clear." : s ? "None of your requests match." : l ? "No closed requests yet." : "You have no open requests." }),
|
|
776
776
|
a === "mine" && !s && /* @__PURE__ */ e("p", { className: "max-w-sm text-[12px] text-slate-500 dark:text-muted-foreground", children: "Use Get help for anything general, or Request help on a record (beside Save) to ask for a change to that record." }),
|
|
777
777
|
s && /* @__PURE__ */ e(
|
|
@@ -786,5 +786,5 @@ function nt({
|
|
|
786
786
|
] });
|
|
787
787
|
}
|
|
788
788
|
export {
|
|
789
|
-
|
|
789
|
+
St as RequestList
|
|
790
790
|
};
|