@nivaro/react 0.3.139 → 0.3.141
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +39 -2
- package/dist/shared/components/AudienceConfirmPanel.js +19 -19
- package/dist/shared/components/BroadcastView.js +213 -211
- package/dist/shared/components/CollectionBrowserView.js +2702 -2671
- 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 +3475 -3458
- 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/RowPresence.js +83 -76
- package/dist/shared/components/SlaRulesView.js +73 -74
- package/dist/shared/components/UnseenDot.js +183 -22
- 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/delivery-analytics/drill.js +32 -32
- 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 +1390 -1376
- package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
- package/dist/shared/components/item-edit/RecordRecapChanges.js +116 -74
- package/dist/shared/components/item-edit/RecordRecapStrip.js +148 -160
- package/dist/shared/components/item-edit/summary-layout-request.js +15 -0
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +226 -157
- package/dist/shared/components/layout-editor/settings/WhoSection.js +53 -52
- package/dist/shared/components/layout-editor/settings/controls.js +98 -90
- package/dist/shared/components/layout-editor/settings/settings-registry.js +8 -0
- 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 +884 -872
- package/dist/shared/components/queue/worklist-helpers.js +36 -21
- package/dist/shared/components/support/RequestList.js +123 -123
- 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/layout-resolve.js +64 -48
- 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,29 +1,29 @@
|
|
|
1
|
-
import { jsxs as a, jsx as e, Fragment as
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { Plus as
|
|
4
|
-
import { useState as b, useEffect as
|
|
1
|
+
import { jsxs as a, jsx as e, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { useQueryClient as B, useQuery as $, useMutation as w } from "@tanstack/react-query";
|
|
3
|
+
import { Plus as X, Sparkles as Y, Users2 as G, X as J, Loader2 as Z } from "lucide-react";
|
|
4
|
+
import { useState as b, useEffect as ee } from "react";
|
|
5
5
|
import { toast as C } from "sonner";
|
|
6
|
-
import { useNivaroClient as
|
|
7
|
-
import { get as F, post as
|
|
8
|
-
import { useLiveOps as
|
|
9
|
-
import { cn as _, formatRelative as
|
|
6
|
+
import { useNivaroClient as P, useItemNavigation as te } from "../../context.js";
|
|
7
|
+
import { get as F, post as R, patch as ae, del as W } from "../../lib/commands.js";
|
|
8
|
+
import { useLiveOps as se } from "../../lib/live-ops.js";
|
|
9
|
+
import { cn as _, formatNumber as T, formatRelative as U } from "../../lib/utils.js";
|
|
10
|
+
import { QueryErrorState as re } from "../QueryErrorState.js";
|
|
10
11
|
import { Button as N } from "../ui/button.js";
|
|
11
12
|
import { Input as j } from "../ui/input.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
function W(t) {
|
|
13
|
+
import { Textarea as H } from "../ui/textarea.js";
|
|
14
|
+
import { MemberPickerCombobox as le } from "./OwnerMatrix.js";
|
|
15
|
+
import { TeamScopeEditor as ne } from "./TeamScopeEditor.js";
|
|
16
|
+
import { TeamSuggestionsPanel as ie } from "./TeamSuggestions.js";
|
|
17
|
+
function M(t) {
|
|
18
18
|
return [t.first_name, t.last_name].filter(Boolean).join(" ") || t.email;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function de({
|
|
21
21
|
onCreated: t,
|
|
22
22
|
onCancel: n
|
|
23
23
|
}) {
|
|
24
|
-
const r =
|
|
24
|
+
const r = P(), [l, c] = b(""), [d, m] = b(""), [v, p] = b(""), f = w({
|
|
25
25
|
mutationFn: () => r.request(
|
|
26
|
-
|
|
26
|
+
R("/user-groups", {
|
|
27
27
|
name: l.trim(),
|
|
28
28
|
...d.trim() ? { slug: d.trim() } : {},
|
|
29
29
|
...v.trim() ? { description: v.trim() } : {}
|
|
@@ -41,7 +41,14 @@ function ie({
|
|
|
41
41
|
/* @__PURE__ */ e("h2", { className: "text-[14px] font-semibold text-slate-900 dark:text-foreground", children: "New team" }),
|
|
42
42
|
/* @__PURE__ */ a("div", { className: "mt-3 space-y-3", children: [
|
|
43
43
|
/* @__PURE__ */ a("div", { children: [
|
|
44
|
-
/* @__PURE__ */ e(
|
|
44
|
+
/* @__PURE__ */ e(
|
|
45
|
+
"label",
|
|
46
|
+
{
|
|
47
|
+
className: "mb-1 block text-[11.5px] font-medium text-slate-500",
|
|
48
|
+
htmlFor: "tv-name",
|
|
49
|
+
children: "Name"
|
|
50
|
+
}
|
|
51
|
+
),
|
|
45
52
|
/* @__PURE__ */ e(
|
|
46
53
|
j,
|
|
47
54
|
{
|
|
@@ -54,11 +61,18 @@ function ie({
|
|
|
54
61
|
)
|
|
55
62
|
] }),
|
|
56
63
|
/* @__PURE__ */ a("div", { children: [
|
|
57
|
-
/* @__PURE__ */ a(
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
/* @__PURE__ */ a(
|
|
65
|
+
"label",
|
|
66
|
+
{
|
|
67
|
+
className: "mb-1 block text-[11.5px] font-medium text-slate-500",
|
|
68
|
+
htmlFor: "tv-slug",
|
|
69
|
+
children: [
|
|
70
|
+
"Slug",
|
|
71
|
+
" ",
|
|
72
|
+
/* @__PURE__ */ e("span", { className: "font-normal text-slate-400", children: "(mention handle — blank derives from the name)" })
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
),
|
|
62
76
|
/* @__PURE__ */ e(
|
|
63
77
|
j,
|
|
64
78
|
{
|
|
@@ -71,9 +85,16 @@ function ie({
|
|
|
71
85
|
)
|
|
72
86
|
] }),
|
|
73
87
|
/* @__PURE__ */ a("div", { children: [
|
|
74
|
-
/* @__PURE__ */ e("label", { className: "mb-1 block text-[11.5px] font-medium text-slate-500", htmlFor: "tv-desc", children: "Description" }),
|
|
75
88
|
/* @__PURE__ */ e(
|
|
76
|
-
|
|
89
|
+
"label",
|
|
90
|
+
{
|
|
91
|
+
className: "mb-1 block text-[11.5px] font-medium text-slate-500",
|
|
92
|
+
htmlFor: "tv-desc",
|
|
93
|
+
children: "Description"
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ e(
|
|
97
|
+
H,
|
|
77
98
|
{
|
|
78
99
|
id: "tv-desc",
|
|
79
100
|
value: v,
|
|
@@ -102,7 +123,11 @@ function ie({
|
|
|
102
123
|
function D({ children: t }) {
|
|
103
124
|
return /* @__PURE__ */ e("p", { className: "text-[10px] font-semibold uppercase tracking-[0.08em] text-slate-400 dark:text-slate-500", children: t });
|
|
104
125
|
}
|
|
105
|
-
function y({
|
|
126
|
+
function y({
|
|
127
|
+
label: t,
|
|
128
|
+
value: n,
|
|
129
|
+
tone: r
|
|
130
|
+
}) {
|
|
106
131
|
return /* @__PURE__ */ a("div", { className: "bg-white px-4 py-3 dark:bg-card", children: [
|
|
107
132
|
/* @__PURE__ */ e("p", { className: "text-[10px] font-semibold uppercase tracking-[0.08em] text-slate-400 dark:text-slate-500", children: t }),
|
|
108
133
|
/* @__PURE__ */ e(
|
|
@@ -117,13 +142,22 @@ function y({ label: t, value: n, tone: r }) {
|
|
|
117
142
|
)
|
|
118
143
|
] });
|
|
119
144
|
}
|
|
120
|
-
function
|
|
145
|
+
function ce({ weekly: t }) {
|
|
121
146
|
if (t.length < 2) return null;
|
|
122
147
|
const n = 220, r = 36, l = Math.max(...t.map((d) => d.count), 1), c = t.map(
|
|
123
148
|
(d, m) => `${(m / (t.length - 1) * (n - 4) + 2).toFixed(1)},${(r - 4 - d.count / l * (r - 8)).toFixed(1)}`
|
|
124
149
|
).join(" ");
|
|
125
150
|
return /* @__PURE__ */ a("svg", { width: n, height: r, viewBox: `0 0 ${n} ${r}`, className: "shrink-0", "aria-hidden": !0, children: [
|
|
126
|
-
/* @__PURE__ */ e(
|
|
151
|
+
/* @__PURE__ */ e(
|
|
152
|
+
"polyline",
|
|
153
|
+
{
|
|
154
|
+
points: c,
|
|
155
|
+
fill: "none",
|
|
156
|
+
stroke: "#8b5cf6",
|
|
157
|
+
strokeWidth: "1.5",
|
|
158
|
+
strokeLinejoin: "round"
|
|
159
|
+
}
|
|
160
|
+
),
|
|
127
161
|
t.length > 0 && /* @__PURE__ */ e(
|
|
128
162
|
"circle",
|
|
129
163
|
{
|
|
@@ -135,10 +169,10 @@ function de({ weekly: t }) {
|
|
|
135
169
|
)
|
|
136
170
|
] });
|
|
137
171
|
}
|
|
138
|
-
function
|
|
172
|
+
function oe(t) {
|
|
139
173
|
return t === "breached" ? /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-red-500", title: "SLA breached" }) : t === "warning" ? /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-amber-500", title: "SLA warning" }) : null;
|
|
140
174
|
}
|
|
141
|
-
function
|
|
175
|
+
function me({ overview: t }) {
|
|
142
176
|
const n = t.cells.states;
|
|
143
177
|
return n.length === 0 ? /* @__PURE__ */ a("div", { className: "rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: [
|
|
144
178
|
/* @__PURE__ */ e(D, { children: "Owns" }),
|
|
@@ -147,73 +181,90 @@ function oe({ overview: t }) {
|
|
|
147
181
|
/* @__PURE__ */ a("div", { className: "flex items-baseline justify-between", children: [
|
|
148
182
|
/* @__PURE__ */ e(D, { children: "Owns" }),
|
|
149
183
|
/* @__PURE__ */ a("span", { className: "text-[11px] tabular-nums text-slate-400", children: [
|
|
150
|
-
t.cells.total,
|
|
184
|
+
T(t.cells.total),
|
|
151
185
|
" matrix cell",
|
|
152
186
|
t.cells.total === 1 ? "" : "s"
|
|
153
187
|
] })
|
|
154
188
|
] }),
|
|
155
|
-
/* @__PURE__ */ e("div", { className: "mt-2 divide-y divide-slate-100 dark:divide-border/60", children: n.map((r) => /* @__PURE__ */ a(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
{
|
|
171
|
-
className: "
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
189
|
+
/* @__PURE__ */ e("div", { className: "mt-2 divide-y divide-slate-100 dark:divide-border/60", children: n.map((r) => /* @__PURE__ */ a(
|
|
190
|
+
"div",
|
|
191
|
+
{
|
|
192
|
+
className: "py-2.5 first:pt-1 last:pb-0",
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ a("div", { className: "flex items-baseline gap-2", children: [
|
|
195
|
+
/* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 translate-y-[-1px] rounded-full bg-violet-500" }),
|
|
196
|
+
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800 dark:text-foreground", children: r.state_label }),
|
|
197
|
+
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: r.template_name }),
|
|
198
|
+
/* @__PURE__ */ a("span", { className: "ml-auto text-[11px] tabular-nums text-slate-400", children: [
|
|
199
|
+
T(r.count),
|
|
200
|
+
" cell",
|
|
201
|
+
r.count === 1 ? "" : "s"
|
|
202
|
+
] })
|
|
203
|
+
] }),
|
|
204
|
+
/* @__PURE__ */ e("div", { className: "mt-1.5 space-y-1 pl-3.5", children: Object.entries(r.dims).map(([l, c]) => /* @__PURE__ */ a("div", { className: "flex flex-wrap items-baseline gap-1", children: [
|
|
205
|
+
/* @__PURE__ */ e("span", { className: "mr-0.5 text-[10.5px] font-medium text-slate-400", children: l }),
|
|
206
|
+
c.slice(0, 8).map((d) => /* @__PURE__ */ e(
|
|
207
|
+
"span",
|
|
208
|
+
{
|
|
209
|
+
className: "rounded bg-slate-100 px-1.5 py-px text-[10.5px] text-slate-600 dark:bg-muted dark:text-slate-300",
|
|
210
|
+
children: d
|
|
211
|
+
},
|
|
212
|
+
d
|
|
213
|
+
)),
|
|
214
|
+
c.length > 8 && /* @__PURE__ */ a("span", { className: "text-[10.5px] text-slate-400", children: [
|
|
215
|
+
"+",
|
|
216
|
+
c.length - 8,
|
|
217
|
+
" more"
|
|
218
|
+
] })
|
|
219
|
+
] }, l)) })
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
`${r.template_name}:${r.state_label}`
|
|
223
|
+
)) })
|
|
183
224
|
] });
|
|
184
225
|
}
|
|
185
|
-
function
|
|
186
|
-
|
|
226
|
+
function ue({
|
|
227
|
+
workload: t,
|
|
228
|
+
loading: n
|
|
229
|
+
}) {
|
|
230
|
+
const r = te();
|
|
187
231
|
return /* @__PURE__ */ a("div", { className: "rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: [
|
|
188
232
|
/* @__PURE__ */ a("div", { className: "flex items-baseline justify-between", children: [
|
|
189
233
|
/* @__PURE__ */ e(D, { children: "Waiting on this team" }),
|
|
190
234
|
n ? /* @__PURE__ */ a("span", { className: "flex items-center gap-1.5 text-[11px] text-slate-400", children: [
|
|
191
|
-
/* @__PURE__ */ e(
|
|
235
|
+
/* @__PURE__ */ e(Z, { className: "h-3 w-3 animate-spin" }),
|
|
192
236
|
" resolving live…"
|
|
193
237
|
] }) : /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "live — resolved just now" })
|
|
194
238
|
] }),
|
|
195
239
|
n ? /* @__PURE__ */ a("div", { className: "mt-3 space-y-2", children: [
|
|
196
240
|
/* @__PURE__ */ e("div", { className: "h-4 w-2/3 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
197
241
|
/* @__PURE__ */ e("div", { className: "h-4 w-1/2 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
|
|
198
|
-
] }) : !t || t.total === 0 ? /* @__PURE__ */ e("p", { className: "mt-2 text-[12.5px] italic text-slate-400", children: "Nothing is waiting on this team right now." }) : /* @__PURE__ */ a(
|
|
242
|
+
] }) : !t || t.total === 0 ? /* @__PURE__ */ e("p", { className: "mt-2 text-[12.5px] italic text-slate-400", children: "Nothing is waiting on this team right now." }) : /* @__PURE__ */ a(V, { children: [
|
|
199
243
|
t.truncated && /* @__PURE__ */ e("p", { className: "mt-1.5 text-[11px] text-amber-600 dark:text-amber-400", children: "Large backlog — counts cover the newest 4,000 open records." }),
|
|
200
|
-
/* @__PURE__ */ e("div", { className: "mt-2 divide-y divide-slate-100 dark:divide-border/60", children: t.by_state.map((l) => /* @__PURE__ */ a(
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
/* @__PURE__ */ e("span", { className: "
|
|
206
|
-
" ",
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
244
|
+
/* @__PURE__ */ e("div", { className: "mt-2 divide-y divide-slate-100 dark:divide-border/60", children: t.by_state.map((l) => /* @__PURE__ */ a(
|
|
245
|
+
"div",
|
|
246
|
+
{
|
|
247
|
+
className: "flex items-baseline gap-2 py-1.5",
|
|
248
|
+
children: [
|
|
249
|
+
/* @__PURE__ */ e("span", { className: "text-[12.5px] text-slate-700 dark:text-slate-200", children: l.state_label }),
|
|
250
|
+
/* @__PURE__ */ e("span", { className: "text-[10.5px] text-slate-400", children: l.template_name }),
|
|
251
|
+
/* @__PURE__ */ a("span", { className: "ml-auto flex items-center gap-2 tabular-nums", children: [
|
|
252
|
+
l.sla_breached > 0 && /* @__PURE__ */ a("span", { className: "flex items-center gap-1 text-[11px] text-red-600 dark:text-red-400", children: [
|
|
253
|
+
/* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 rounded-full bg-red-500" }),
|
|
254
|
+
" ",
|
|
255
|
+
l.sla_breached
|
|
256
|
+
] }),
|
|
257
|
+
l.sla_warning > 0 && /* @__PURE__ */ a("span", { className: "flex items-center gap-1 text-[11px] text-amber-600 dark:text-amber-400", children: [
|
|
258
|
+
/* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 rounded-full bg-amber-500" }),
|
|
259
|
+
" ",
|
|
260
|
+
l.sla_warning
|
|
261
|
+
] }),
|
|
262
|
+
/* @__PURE__ */ e("span", { className: "text-[12.5px] font-medium text-slate-800 dark:text-foreground", children: T(l.count) })
|
|
263
|
+
] })
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
`${l.template_name}:${l.state_label}`
|
|
267
|
+
)) }),
|
|
217
268
|
t.records.length > 0 && /* @__PURE__ */ a("div", { className: "mt-3", children: [
|
|
218
269
|
/* @__PURE__ */ e("p", { className: "text-[10.5px] font-medium text-slate-400", children: "Waiting longest" }),
|
|
219
270
|
/* @__PURE__ */ e("div", { className: "mt-1 divide-y divide-slate-100 dark:divide-border/60", children: t.records.slice(0, 8).map((l) => /* @__PURE__ */ a(
|
|
@@ -223,10 +274,10 @@ function me({ workload: t, loading: n }) {
|
|
|
223
274
|
onClick: () => r.open({ collection: l.collection, itemId: l.item_id }),
|
|
224
275
|
className: "flex w-full items-baseline gap-2 py-1.5 text-left hover:bg-muted",
|
|
225
276
|
children: [
|
|
226
|
-
|
|
277
|
+
oe(l.sla_status),
|
|
227
278
|
/* @__PURE__ */ e("span", { className: "truncate text-[12.5px] font-medium text-nvr-navy underline decoration-nvr-cyan/50 decoration-[1.5px] underline-offset-2 dark:text-nvr-cyan", children: l.label }),
|
|
228
279
|
/* @__PURE__ */ e("span", { className: "truncate text-[11px] text-slate-400", children: l.state_label }),
|
|
229
|
-
l.started_at && /* @__PURE__ */ e("span", { className: "ml-auto shrink-0 text-[11px] tabular-nums text-slate-400", children:
|
|
280
|
+
l.started_at && /* @__PURE__ */ e("span", { className: "ml-auto shrink-0 text-[11px] tabular-nums text-slate-400", children: U(l.started_at) })
|
|
230
281
|
]
|
|
231
282
|
},
|
|
232
283
|
`${l.collection}:${l.item_id}`
|
|
@@ -235,7 +286,7 @@ function me({ workload: t, loading: n }) {
|
|
|
235
286
|
] })
|
|
236
287
|
] });
|
|
237
288
|
}
|
|
238
|
-
function
|
|
289
|
+
function pe({ overview: t }) {
|
|
239
290
|
const n = t.throughput;
|
|
240
291
|
return /* @__PURE__ */ a("div", { className: "rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: [
|
|
241
292
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3", children: [
|
|
@@ -248,7 +299,8 @@ function ue({ overview: t }) {
|
|
|
248
299
|
n.total_30d === 1 ? "" : "s",
|
|
249
300
|
" in 30 days",
|
|
250
301
|
n.sendbacks_30d > 0 && /* @__PURE__ */ a("span", { className: "text-slate-400", children: [
|
|
251
|
-
"
|
|
302
|
+
" ",
|
|
303
|
+
"· ",
|
|
252
304
|
n.sendbacks_30d,
|
|
253
305
|
" send-back",
|
|
254
306
|
n.sendbacks_30d === 1 ? "" : "s"
|
|
@@ -260,7 +312,7 @@ function ue({ overview: t }) {
|
|
|
260
312
|
] })
|
|
261
313
|
] })
|
|
262
314
|
] }),
|
|
263
|
-
/* @__PURE__ */ e(
|
|
315
|
+
/* @__PURE__ */ e(ce, { weekly: n.weekly })
|
|
264
316
|
] }),
|
|
265
317
|
/* @__PURE__ */ e("div", { className: "mt-3 divide-y divide-slate-100 dark:divide-border/60", children: [...t.roster].sort((r, l) => l.actions_30d - r.actions_30d).map((r) => /* @__PURE__ */ a("div", { className: "flex items-baseline gap-2 py-1.5", children: [
|
|
266
318
|
/* @__PURE__ */ e("span", { className: "text-[12.5px] text-slate-700 dark:text-slate-200", children: [r.first_name, r.last_name].filter(Boolean).join(" ") || r.email }),
|
|
@@ -270,18 +322,18 @@ function ue({ overview: t }) {
|
|
|
270
322
|
" action",
|
|
271
323
|
r.actions_30d === 1 ? "" : "s"
|
|
272
324
|
] }),
|
|
273
|
-
/* @__PURE__ */ e("span", { className: "w-24 shrink-0 text-right text-[11px] text-slate-400", children: r.last_action_at ?
|
|
325
|
+
/* @__PURE__ */ e("span", { className: "w-24 shrink-0 text-right text-[11px] text-slate-400", children: r.last_action_at ? U(r.last_action_at) : "no actions" })
|
|
274
326
|
] }, r.id)) })
|
|
275
327
|
] });
|
|
276
328
|
}
|
|
277
|
-
function
|
|
329
|
+
function xe({
|
|
278
330
|
team: t,
|
|
279
331
|
canManage: n,
|
|
280
332
|
onChanged: r,
|
|
281
333
|
onDeleted: l
|
|
282
334
|
}) {
|
|
283
|
-
const c =
|
|
284
|
-
|
|
335
|
+
const c = P(), d = B(), [m, v] = b(t.name), [p, f] = b(t.slug), [i, h] = b(t.description ?? ""), [L, q] = b(!1);
|
|
336
|
+
ee(() => {
|
|
285
337
|
v(t.name), f(t.slug), h(t.description ?? "");
|
|
286
338
|
}, [t.name, t.slug, t.description]);
|
|
287
339
|
const { data: u } = $({
|
|
@@ -293,7 +345,7 @@ function pe({
|
|
|
293
345
|
queryFn: () => c.request(F(`/user-groups/${t.id}/workload`)).then((s) => s.data),
|
|
294
346
|
staleTime: 6e4
|
|
295
347
|
});
|
|
296
|
-
|
|
348
|
+
se(
|
|
297
349
|
"team",
|
|
298
350
|
() => {
|
|
299
351
|
d.invalidateQueries({ queryKey: ["team-overview", t.id] }), d.invalidateQueries({ queryKey: ["team-workload", t.id] }), d.invalidateQueries({ queryKey: ["team-members", t.id] });
|
|
@@ -304,11 +356,11 @@ function pe({
|
|
|
304
356
|
queryKey: ["team-members", t.id],
|
|
305
357
|
queryFn: () => c.request(F(`/user-groups/${t.id}/members`)).then((s) => s.data)
|
|
306
358
|
}), o = m.trim() !== t.name || p.trim() !== t.slug || i.trim() !== (t.description ?? ""), S = (s, K) => {
|
|
307
|
-
var
|
|
308
|
-
return C.error(((
|
|
309
|
-
},
|
|
359
|
+
var O;
|
|
360
|
+
return C.error(((O = s == null ? void 0 : s.response) == null ? void 0 : O.error) ?? K);
|
|
361
|
+
}, Q = w({
|
|
310
362
|
mutationFn: () => c.request(
|
|
311
|
-
|
|
363
|
+
ae(`/user-groups/${t.id}`, {
|
|
312
364
|
name: m.trim(),
|
|
313
365
|
slug: p.trim(),
|
|
314
366
|
description: i.trim() || null
|
|
@@ -318,21 +370,21 @@ function pe({
|
|
|
318
370
|
C.success("Team updated"), r();
|
|
319
371
|
},
|
|
320
372
|
onError: (s) => S(s, "Update failed")
|
|
321
|
-
}),
|
|
322
|
-
mutationFn: () => c.request(
|
|
373
|
+
}), E = w({
|
|
374
|
+
mutationFn: () => c.request(W(`/user-groups/${t.id}`)),
|
|
323
375
|
onSuccess: () => {
|
|
324
376
|
C.success(`Deleted ${t.name}`), l();
|
|
325
377
|
},
|
|
326
378
|
onError: (s) => S(s, "Delete failed")
|
|
327
|
-
}),
|
|
379
|
+
}), z = () => {
|
|
328
380
|
d.invalidateQueries({ queryKey: ["team-members", t.id] }), d.invalidateQueries({ queryKey: ["team-candidates"] }), r();
|
|
329
|
-
},
|
|
330
|
-
mutationFn: (s) => c.request(
|
|
331
|
-
onSuccess:
|
|
381
|
+
}, I = w({
|
|
382
|
+
mutationFn: (s) => c.request(R(`/user-groups/${t.id}/members`, { user_ids: [s] })),
|
|
383
|
+
onSuccess: z,
|
|
332
384
|
onError: (s) => S(s, "Could not add member")
|
|
333
|
-
}),
|
|
334
|
-
mutationFn: (s) => c.request(
|
|
335
|
-
onSuccess:
|
|
385
|
+
}), A = w({
|
|
386
|
+
mutationFn: (s) => c.request(W(`/user-groups/${t.id}/members/${s}`)),
|
|
387
|
+
onSuccess: z,
|
|
336
388
|
onError: (s) => S(s, "Could not remove member")
|
|
337
389
|
});
|
|
338
390
|
return /* @__PURE__ */ a("div", { className: "space-y-4 p-5", children: [
|
|
@@ -403,7 +455,7 @@ function pe({
|
|
|
403
455
|
}
|
|
404
456
|
),
|
|
405
457
|
/* @__PURE__ */ e(
|
|
406
|
-
|
|
458
|
+
H,
|
|
407
459
|
{
|
|
408
460
|
id: "tvd-desc",
|
|
409
461
|
value: i,
|
|
@@ -420,8 +472,8 @@ function pe({
|
|
|
420
472
|
{
|
|
421
473
|
size: "sm",
|
|
422
474
|
className: "text-[12px]",
|
|
423
|
-
disabled: !m.trim() || !p.trim() ||
|
|
424
|
-
onClick: () =>
|
|
475
|
+
disabled: !m.trim() || !p.trim() || Q.isPending,
|
|
476
|
+
onClick: () => Q.mutate(),
|
|
425
477
|
children: "Save changes"
|
|
426
478
|
}
|
|
427
479
|
),
|
|
@@ -441,8 +493,8 @@ function pe({
|
|
|
441
493
|
size: "sm",
|
|
442
494
|
variant: "destructive",
|
|
443
495
|
className: "h-6 text-[11px]",
|
|
444
|
-
disabled:
|
|
445
|
-
onClick: () =>
|
|
496
|
+
disabled: E.isPending,
|
|
497
|
+
onClick: () => E.mutate(),
|
|
446
498
|
children: "Yes, delete"
|
|
447
499
|
}
|
|
448
500
|
),
|
|
@@ -478,12 +530,19 @@ function pe({
|
|
|
478
530
|
] }),
|
|
479
531
|
t.description && /* @__PURE__ */ e("p", { className: "mt-2 text-[12.5px] text-slate-600 dark:text-slate-300", children: t.description })
|
|
480
532
|
] }) }),
|
|
481
|
-
u && /* @__PURE__ */ e(
|
|
482
|
-
/* @__PURE__ */ e(
|
|
533
|
+
u && /* @__PURE__ */ e(me, { overview: u }),
|
|
534
|
+
/* @__PURE__ */ e(ue, { workload: x, loading: k })
|
|
483
535
|
] }),
|
|
484
536
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
485
|
-
u && u.roster.length > 0 && /* @__PURE__ */ e(
|
|
486
|
-
n && /* @__PURE__ */ e("div", { className: "rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: /* @__PURE__ */ e(
|
|
537
|
+
u && u.roster.length > 0 && /* @__PURE__ */ e(pe, { overview: u }),
|
|
538
|
+
n && /* @__PURE__ */ e("div", { className: "rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: /* @__PURE__ */ e(
|
|
539
|
+
ne,
|
|
540
|
+
{
|
|
541
|
+
teamId: t.id,
|
|
542
|
+
scopes: t.scopes ?? {},
|
|
543
|
+
onSaved: () => r()
|
|
544
|
+
}
|
|
545
|
+
) }),
|
|
487
546
|
/* @__PURE__ */ a("div", { className: "rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: [
|
|
488
547
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3", children: [
|
|
489
548
|
/* @__PURE__ */ a("h3", { className: "text-[13px] font-semibold text-slate-800 dark:text-foreground", children: [
|
|
@@ -496,12 +555,12 @@ function pe({
|
|
|
496
555
|
] })
|
|
497
556
|
] }),
|
|
498
557
|
n && /* @__PURE__ */ e("div", { className: "w-56", children: /* @__PURE__ */ e(
|
|
499
|
-
|
|
558
|
+
le,
|
|
500
559
|
{
|
|
501
560
|
teamId: t.id,
|
|
502
561
|
excludeIds: g.map((s) => s.id),
|
|
503
|
-
isPending:
|
|
504
|
-
onPick: (s) =>
|
|
562
|
+
isPending: I.isPending,
|
|
563
|
+
onPick: (s) => I.mutate(s)
|
|
505
564
|
}
|
|
506
565
|
) })
|
|
507
566
|
] }),
|
|
@@ -511,18 +570,18 @@ function pe({
|
|
|
511
570
|
className: "flex items-center gap-3 border-b border-slate-100 py-2 last:border-0 dark:border-border/60",
|
|
512
571
|
children: [
|
|
513
572
|
/* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
|
|
514
|
-
/* @__PURE__ */ e("p", { className: "truncate text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children:
|
|
573
|
+
/* @__PURE__ */ e("p", { className: "truncate text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children: M(s) }),
|
|
515
574
|
/* @__PURE__ */ e("p", { className: "truncate text-[11px] text-slate-400", children: s.email })
|
|
516
575
|
] }),
|
|
517
576
|
n && /* @__PURE__ */ e(
|
|
518
577
|
"button",
|
|
519
578
|
{
|
|
520
579
|
type: "button",
|
|
521
|
-
disabled:
|
|
522
|
-
onClick: () =>
|
|
580
|
+
disabled: A.isPending,
|
|
581
|
+
onClick: () => A.mutate(s.id),
|
|
523
582
|
className: "rounded p-1 text-slate-400 transition-colors hover:bg-red-50 hover:text-red-500 dark:hover:bg-red-950/30",
|
|
524
|
-
"aria-label": `Remove ${
|
|
525
|
-
children: /* @__PURE__ */ e(
|
|
583
|
+
"aria-label": `Remove ${M(s)}`,
|
|
584
|
+
children: /* @__PURE__ */ e(J, { className: "h-3.5 w-3.5" })
|
|
526
585
|
}
|
|
527
586
|
)
|
|
528
587
|
]
|
|
@@ -534,12 +593,12 @@ function pe({
|
|
|
534
593
|
] })
|
|
535
594
|
] });
|
|
536
595
|
}
|
|
537
|
-
function
|
|
596
|
+
function De({
|
|
538
597
|
canManage: t = !0,
|
|
539
598
|
compact: n = !1,
|
|
540
599
|
initialTeamId: r = null
|
|
541
600
|
}) {
|
|
542
|
-
const l =
|
|
601
|
+
const l = P(), c = B(), [d, m] = b(r), [v, p] = b(!1), [f, i] = b(!1), {
|
|
543
602
|
data: h = [],
|
|
544
603
|
isLoading: L,
|
|
545
604
|
isError: q,
|
|
@@ -571,7 +630,7 @@ function je({
|
|
|
571
630
|
p(!0), i(!1), m(null);
|
|
572
631
|
},
|
|
573
632
|
children: [
|
|
574
|
-
/* @__PURE__ */ e(
|
|
633
|
+
/* @__PURE__ */ e(X, { className: "h-3.5 w-3.5" }),
|
|
575
634
|
" New team"
|
|
576
635
|
]
|
|
577
636
|
}
|
|
@@ -590,14 +649,14 @@ function je({
|
|
|
590
649
|
},
|
|
591
650
|
"data-team-suggestions-open": !0,
|
|
592
651
|
children: [
|
|
593
|
-
/* @__PURE__ */ e(
|
|
652
|
+
/* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5" }),
|
|
594
653
|
" Suggested teams"
|
|
595
654
|
]
|
|
596
655
|
}
|
|
597
656
|
)
|
|
598
657
|
] }),
|
|
599
658
|
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1 overflow-y-auto", children: L ? /* @__PURE__ */ e("p", { className: "p-4 text-[12.5px] text-slate-400", children: "Loading…" }) : q && h.length === 0 ? /* @__PURE__ */ e(
|
|
600
|
-
|
|
659
|
+
re,
|
|
601
660
|
{
|
|
602
661
|
error: u,
|
|
603
662
|
what: "teams",
|
|
@@ -642,14 +701,14 @@ function je({
|
|
|
642
701
|
}
|
|
643
702
|
),
|
|
644
703
|
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1 overflow-y-auto bg-slate-50 dark:bg-background", children: f && t ? /* @__PURE__ */ e(
|
|
645
|
-
|
|
704
|
+
ie,
|
|
646
705
|
{
|
|
647
706
|
onApplied: (o) => {
|
|
648
707
|
i(!1), m(o), g();
|
|
649
708
|
}
|
|
650
709
|
}
|
|
651
710
|
) : v && t ? /* @__PURE__ */ e(
|
|
652
|
-
|
|
711
|
+
de,
|
|
653
712
|
{
|
|
654
713
|
onCreated: (o) => {
|
|
655
714
|
p(!1), m(o), g();
|
|
@@ -657,7 +716,7 @@ function je({
|
|
|
657
716
|
onCancel: () => p(!1)
|
|
658
717
|
}
|
|
659
718
|
) : k ? /* @__PURE__ */ e(
|
|
660
|
-
|
|
719
|
+
xe,
|
|
661
720
|
{
|
|
662
721
|
team: k,
|
|
663
722
|
canManage: t,
|
|
@@ -668,11 +727,11 @@ function je({
|
|
|
668
727
|
},
|
|
669
728
|
k.id
|
|
670
729
|
) : /* @__PURE__ */ a("div", { className: "pt-24 text-center text-slate-400", children: [
|
|
671
|
-
/* @__PURE__ */ e(
|
|
730
|
+
/* @__PURE__ */ e(G, { className: "mx-auto h-8 w-8 opacity-40" }),
|
|
672
731
|
/* @__PURE__ */ e("p", { className: "mt-3 text-[13px]", children: h.length === 0 ? t ? "Create your first team to get started." : "No teams have been created yet." : "Select a team to view its members and scope." })
|
|
673
732
|
] }) })
|
|
674
733
|
] });
|
|
675
734
|
}
|
|
676
735
|
export {
|
|
677
|
-
|
|
736
|
+
De as TeamsView
|
|
678
737
|
};
|
|
@@ -358,19 +358,19 @@ function Se({
|
|
|
358
358
|
o.activity_id
|
|
359
359
|
)) }),
|
|
360
360
|
/* @__PURE__ */ a("p", { className: "mt-1 text-[11.5px] text-slate-500 dark:text-slate-400", children: [
|
|
361
|
-
e.api_calls,
|
|
361
|
+
g(e.api_calls),
|
|
362
362
|
" request",
|
|
363
363
|
e.api_calls === 1 ? "" : "s",
|
|
364
|
-
" into Nivaro ·
|
|
365
|
-
|
|
366
|
-
|
|
364
|
+
" into Nivaro ·",
|
|
365
|
+
" ",
|
|
366
|
+
e.ms >= 1e3 ? `${(e.ms / 1e3).toFixed(1)} s` : `${e.ms} ms`
|
|
367
367
|
] })
|
|
368
368
|
] })
|
|
369
369
|
] })
|
|
370
370
|
] });
|
|
371
371
|
}
|
|
372
372
|
function Oe({ className: e }) {
|
|
373
|
-
var P, L, R,
|
|
373
|
+
var P, $, L, R, F, I;
|
|
374
374
|
const r = le(), s = G(), [l, d] = v(""), c = re(null), [u, x] = v(null), p = H({
|
|
375
375
|
queryKey: K("mine"),
|
|
376
376
|
queryFn: () => r.request(q("/mcp-connections/mine")).then((n) => n.data)
|
|
@@ -402,7 +402,7 @@ function Oe({ className: e }) {
|
|
|
402
402
|
}), b = ((P = p.data) == null ? void 0 : P.connections) ?? [], f = D(() => {
|
|
403
403
|
var n;
|
|
404
404
|
return ((n = i.data) == null ? void 0 : n.pages.flatMap((m) => m.calls)) ?? [];
|
|
405
|
-
}, [i.data]), V = ((
|
|
405
|
+
}, [i.data]), V = (($ = p.data) == null ? void 0 : $.logged) !== !1 && ((R = (L = i.data) == null ? void 0 : L.pages[0]) == null ? void 0 : R.logged) !== !1, S = D(
|
|
406
406
|
() => [
|
|
407
407
|
{ value: "", label: "Every app" },
|
|
408
408
|
...b.filter((n) => {
|