@mdxui/tremor 6.0.0
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/README.md +255 -0
- package/dist/dashboard/components/index.d.ts +355 -0
- package/dist/dashboard/components/index.js +549 -0
- package/dist/dashboard/components/index.js.map +1 -0
- package/dist/dashboard/index.d.ts +275 -0
- package/dist/dashboard/index.js +1062 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/database/index.d.ts +334 -0
- package/dist/database/index.js +474 -0
- package/dist/database/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1089 -0
- package/dist/index.js.map +1 -0
- package/dist/insights/components/index.d.ts +362 -0
- package/dist/insights/components/index.js +1397 -0
- package/dist/insights/components/index.js.map +1 -0
- package/dist/insights/index.d.ts +360 -0
- package/dist/insights/index.js +1815 -0
- package/dist/insights/index.js.map +1 -0
- package/dist/overview/components/index.d.ts +86 -0
- package/dist/overview/components/index.js +775 -0
- package/dist/overview/components/index.js.map +1 -0
- package/dist/overview/index.d.ts +301 -0
- package/dist/overview/index.js +1077 -0
- package/dist/overview/index.js.map +1 -0
- package/dist/shared/index.d.ts +296 -0
- package/dist/shared/index.js +395 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/solar/components/index.d.ts +341 -0
- package/dist/solar/components/index.js +831 -0
- package/dist/solar/components/index.js.map +1 -0
- package/dist/solar/index.d.ts +301 -0
- package/dist/solar/index.js +1130 -0
- package/dist/solar/index.js.map +1 -0
- package/package.json +135 -0
|
@@ -0,0 +1,1077 @@
|
|
|
1
|
+
// src/overview/components/sections/AgentsSection.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
function ProgressCircle({
|
|
6
|
+
value,
|
|
7
|
+
radius = 14,
|
|
8
|
+
strokeWidth = 3,
|
|
9
|
+
variant = "default",
|
|
10
|
+
children
|
|
11
|
+
}) {
|
|
12
|
+
const normalizedRadius = radius - strokeWidth / 2;
|
|
13
|
+
const circumference = 2 * Math.PI * normalizedRadius;
|
|
14
|
+
const strokeDashoffset = circumference - value / 100 * circumference;
|
|
15
|
+
const variantColors = {
|
|
16
|
+
default: "stroke-blue-500",
|
|
17
|
+
warning: "stroke-amber-500",
|
|
18
|
+
error: "stroke-red-500",
|
|
19
|
+
success: "stroke-emerald-500"
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative inline-flex items-center justify-center", children: [
|
|
22
|
+
/* @__PURE__ */ jsxs("svg", { height: radius * 2, width: radius * 2, className: "rotate-[-90deg]", "aria-hidden": "true", children: [
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
"circle",
|
|
25
|
+
{
|
|
26
|
+
className: "stroke-gray-200 dark:stroke-gray-800",
|
|
27
|
+
fill: "transparent",
|
|
28
|
+
strokeWidth,
|
|
29
|
+
r: normalizedRadius,
|
|
30
|
+
cx: radius,
|
|
31
|
+
cy: radius
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
"circle",
|
|
36
|
+
{
|
|
37
|
+
className: variantColors[variant],
|
|
38
|
+
fill: "transparent",
|
|
39
|
+
strokeWidth,
|
|
40
|
+
strokeDasharray: circumference,
|
|
41
|
+
strokeDashoffset,
|
|
42
|
+
strokeLinecap: "round",
|
|
43
|
+
r: normalizedRadius,
|
|
44
|
+
cx: radius,
|
|
45
|
+
cy: radius
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
] }),
|
|
49
|
+
children && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children })
|
|
50
|
+
] });
|
|
51
|
+
}
|
|
52
|
+
function Badge({
|
|
53
|
+
children,
|
|
54
|
+
variant = "default",
|
|
55
|
+
className = ""
|
|
56
|
+
}) {
|
|
57
|
+
const variantClasses = {
|
|
58
|
+
default: "bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300",
|
|
59
|
+
success: "bg-emerald-50 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400",
|
|
60
|
+
warning: "bg-amber-50 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400",
|
|
61
|
+
error: "bg-red-50 text-red-700 dark:bg-red-900/30 dark:text-red-400"
|
|
62
|
+
};
|
|
63
|
+
return /* @__PURE__ */ jsx("span", { className: twMerge("inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium", variantClasses[variant], className), children });
|
|
64
|
+
}
|
|
65
|
+
function ShieldCheckIcon({ className }) {
|
|
66
|
+
return /* @__PURE__ */ jsx("svg", { className, fill: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M12 2L4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm-1.06 13.54L7.4 12l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41-5.64 5.66z" }) });
|
|
67
|
+
}
|
|
68
|
+
function TicketGenerationButton({ initialState }) {
|
|
69
|
+
const [enabled, setEnabled] = React.useState(initialState);
|
|
70
|
+
return /* @__PURE__ */ jsx(
|
|
71
|
+
"button",
|
|
72
|
+
{
|
|
73
|
+
type: "button",
|
|
74
|
+
role: "switch",
|
|
75
|
+
"aria-checked": enabled,
|
|
76
|
+
className: twMerge(
|
|
77
|
+
"relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
|
|
78
|
+
enabled ? "bg-blue-600" : "bg-gray-200 dark:bg-gray-700"
|
|
79
|
+
),
|
|
80
|
+
onClick: () => setEnabled(!enabled),
|
|
81
|
+
children: /* @__PURE__ */ jsx(
|
|
82
|
+
"span",
|
|
83
|
+
{
|
|
84
|
+
className: twMerge(
|
|
85
|
+
"pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",
|
|
86
|
+
enabled ? "translate-x-4" : "translate-x-0"
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
function Divider() {
|
|
94
|
+
return /* @__PURE__ */ jsx("div", { className: "my-6 h-px w-full bg-gray-200 dark:bg-gray-800" });
|
|
95
|
+
}
|
|
96
|
+
function FilterBar({
|
|
97
|
+
globalFilter,
|
|
98
|
+
setGlobalFilter,
|
|
99
|
+
registeredOnly,
|
|
100
|
+
setRegisteredOnly
|
|
101
|
+
}) {
|
|
102
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center justify-between gap-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
103
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
104
|
+
/* @__PURE__ */ jsx(
|
|
105
|
+
"svg",
|
|
106
|
+
{
|
|
107
|
+
className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400",
|
|
108
|
+
fill: "none",
|
|
109
|
+
stroke: "currentColor",
|
|
110
|
+
viewBox: "0 0 24 24",
|
|
111
|
+
"aria-hidden": "true",
|
|
112
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" })
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
/* @__PURE__ */ jsx(
|
|
116
|
+
"input",
|
|
117
|
+
{
|
|
118
|
+
type: "text",
|
|
119
|
+
placeholder: "Search agents...",
|
|
120
|
+
value: globalFilter,
|
|
121
|
+
onChange: (e) => setGlobalFilter(e.target.value),
|
|
122
|
+
className: "w-64 rounded-md border border-gray-300 bg-white py-2 pl-10 pr-4 text-sm placeholder-gray-400 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100"
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
] }),
|
|
126
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400", children: [
|
|
127
|
+
/* @__PURE__ */ jsx(
|
|
128
|
+
"input",
|
|
129
|
+
{
|
|
130
|
+
type: "checkbox",
|
|
131
|
+
checked: registeredOnly,
|
|
132
|
+
onChange: (e) => setRegisteredOnly(e.target.checked),
|
|
133
|
+
className: "h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
"Registered only"
|
|
137
|
+
] })
|
|
138
|
+
] }) });
|
|
139
|
+
}
|
|
140
|
+
function Pagination({
|
|
141
|
+
pageIndex,
|
|
142
|
+
pageSize,
|
|
143
|
+
totalRows,
|
|
144
|
+
onPageChange
|
|
145
|
+
}) {
|
|
146
|
+
const totalPages = Math.ceil(totalRows / pageSize);
|
|
147
|
+
const startRow = pageIndex * pageSize + 1;
|
|
148
|
+
const endRow = Math.min((pageIndex + 1) * pageSize, totalRows);
|
|
149
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-sm text-gray-600 dark:text-gray-400", children: [
|
|
150
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
151
|
+
"Showing ",
|
|
152
|
+
startRow,
|
|
153
|
+
" to ",
|
|
154
|
+
endRow,
|
|
155
|
+
" of ",
|
|
156
|
+
totalRows,
|
|
157
|
+
" agents"
|
|
158
|
+
] }),
|
|
159
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
160
|
+
/* @__PURE__ */ jsx(
|
|
161
|
+
"button",
|
|
162
|
+
{
|
|
163
|
+
type: "button",
|
|
164
|
+
onClick: () => onPageChange(pageIndex - 1),
|
|
165
|
+
disabled: pageIndex === 0,
|
|
166
|
+
className: "rounded-md border border-gray-300 px-3 py-1 disabled:opacity-50 dark:border-gray-700",
|
|
167
|
+
children: "Previous"
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
171
|
+
"Page ",
|
|
172
|
+
pageIndex + 1,
|
|
173
|
+
" of ",
|
|
174
|
+
totalPages
|
|
175
|
+
] }),
|
|
176
|
+
/* @__PURE__ */ jsx(
|
|
177
|
+
"button",
|
|
178
|
+
{
|
|
179
|
+
type: "button",
|
|
180
|
+
onClick: () => onPageChange(pageIndex + 1),
|
|
181
|
+
disabled: pageIndex >= totalPages - 1,
|
|
182
|
+
className: "rounded-md border border-gray-300 px-3 py-1 disabled:opacity-50 dark:border-gray-700",
|
|
183
|
+
children: "Next"
|
|
184
|
+
}
|
|
185
|
+
)
|
|
186
|
+
] })
|
|
187
|
+
] });
|
|
188
|
+
}
|
|
189
|
+
function formatPhoneNumber(number) {
|
|
190
|
+
return number.replace(/(\+41)(\d{2})(\d{3})(\d{2})(\d{2})/, "$1 $2 $3 $4 $5");
|
|
191
|
+
}
|
|
192
|
+
function formatDate(dateString) {
|
|
193
|
+
return new Date(dateString).toLocaleDateString("en-GB", {
|
|
194
|
+
day: "2-digit",
|
|
195
|
+
month: "2-digit",
|
|
196
|
+
year: "numeric"
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
function getCapacityVariant(value) {
|
|
200
|
+
const fixedValue = parseFloat(value.toFixed(0));
|
|
201
|
+
if (fixedValue >= 85) return "error";
|
|
202
|
+
if (fixedValue > 60) return "warning";
|
|
203
|
+
return "default";
|
|
204
|
+
}
|
|
205
|
+
function MetricCard({ label, value }) {
|
|
206
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800", children: [
|
|
207
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: label }),
|
|
208
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-2xl font-semibold text-gray-900 dark:text-white", children: value })
|
|
209
|
+
] });
|
|
210
|
+
}
|
|
211
|
+
function AgentsSection(props) {
|
|
212
|
+
const isTremorVariant = "agents" in props || !("totalAgents" in props) && !("activeAgents" in props);
|
|
213
|
+
if (isTremorVariant) {
|
|
214
|
+
return /* @__PURE__ */ jsx(AgentsSectionTremor, { ...props });
|
|
215
|
+
}
|
|
216
|
+
const mdxuiProps = props;
|
|
217
|
+
return /* @__PURE__ */ jsx(
|
|
218
|
+
AgentsSectionMdxui,
|
|
219
|
+
{
|
|
220
|
+
totalAgents: mdxuiProps.totalAgents ?? 0,
|
|
221
|
+
activeAgents: mdxuiProps.activeAgents ?? 0,
|
|
222
|
+
runsToday: mdxuiProps.runsToday ?? 0,
|
|
223
|
+
successRate: mdxuiProps.successRate ?? 0,
|
|
224
|
+
loading: mdxuiProps.loading ?? false,
|
|
225
|
+
topAgents: mdxuiProps.topAgents,
|
|
226
|
+
performanceData: mdxuiProps.performanceData,
|
|
227
|
+
className: mdxuiProps.className
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
function AgentsSectionTremor({
|
|
232
|
+
agents = [],
|
|
233
|
+
title = "Agents",
|
|
234
|
+
description = "Monitor agent performance and manage ticket generation",
|
|
235
|
+
className = ""
|
|
236
|
+
}) {
|
|
237
|
+
const [globalFilter, setGlobalFilter] = React.useState("");
|
|
238
|
+
const [registeredOnly, setRegisteredOnly] = React.useState(false);
|
|
239
|
+
const [pageIndex, setPageIndex] = React.useState(0);
|
|
240
|
+
const pageSize = 16;
|
|
241
|
+
const filteredAgents = React.useMemo(() => {
|
|
242
|
+
let result = agents;
|
|
243
|
+
if (globalFilter) {
|
|
244
|
+
const lowerFilter = globalFilter.toLowerCase();
|
|
245
|
+
result = result.filter(
|
|
246
|
+
(agent) => agent.full_name.toLowerCase().includes(lowerFilter) || agent.agent_id.toLowerCase().includes(lowerFilter) || agent.email.toLowerCase().includes(lowerFilter) || agent.account.toLowerCase().includes(lowerFilter)
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
if (registeredOnly) {
|
|
250
|
+
result = result.filter((agent) => agent.registered);
|
|
251
|
+
}
|
|
252
|
+
return result;
|
|
253
|
+
}, [agents, globalFilter, registeredOnly]);
|
|
254
|
+
const paginatedAgents = React.useMemo(() => {
|
|
255
|
+
const start = pageIndex * pageSize;
|
|
256
|
+
return filteredAgents.slice(start, start + pageSize);
|
|
257
|
+
}, [filteredAgents, pageIndex]);
|
|
258
|
+
React.useEffect(() => {
|
|
259
|
+
setPageIndex(0);
|
|
260
|
+
}, []);
|
|
261
|
+
return /* @__PURE__ */ jsxs("main", { className: twMerge("", className), "data-testid": "agents-section", children: [
|
|
262
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", children: /* @__PURE__ */ jsxs("div", { children: [
|
|
263
|
+
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold text-gray-900 dark:text-gray-50", children: title }),
|
|
264
|
+
/* @__PURE__ */ jsx("p", { className: "text-gray-500 sm:text-sm/6 dark:text-gray-500", children: description })
|
|
265
|
+
] }) }),
|
|
266
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
267
|
+
/* @__PURE__ */ jsx("section", { className: "mt-8", children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
268
|
+
/* @__PURE__ */ jsx(
|
|
269
|
+
FilterBar,
|
|
270
|
+
{
|
|
271
|
+
globalFilter,
|
|
272
|
+
setGlobalFilter,
|
|
273
|
+
registeredOnly,
|
|
274
|
+
setRegisteredOnly
|
|
275
|
+
}
|
|
276
|
+
),
|
|
277
|
+
/* @__PURE__ */ jsx("div", { className: "relative overflow-hidden overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full text-left", children: [
|
|
278
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: "border-b border-gray-200 dark:border-gray-800", children: [
|
|
279
|
+
/* @__PURE__ */ jsx("th", { className: "whitespace-nowrap py-1 text-sm font-medium text-gray-900 dark:text-gray-50 sm:text-xs", children: "Agent" }),
|
|
280
|
+
/* @__PURE__ */ jsx("th", { className: "whitespace-nowrap py-1 text-sm font-medium text-gray-900 dark:text-gray-50 sm:text-xs", children: "Contact Information" }),
|
|
281
|
+
/* @__PURE__ */ jsx("th", { className: "whitespace-nowrap py-1 text-sm font-medium text-gray-900 dark:text-gray-50 sm:text-xs", children: "Contract Dates" }),
|
|
282
|
+
/* @__PURE__ */ jsx("th", { className: "whitespace-nowrap py-1 text-sm font-medium text-gray-900 dark:text-gray-50 sm:text-xs", children: "Account" }),
|
|
283
|
+
/* @__PURE__ */ jsx("th", { className: "whitespace-nowrap py-1 text-sm font-medium text-gray-900 dark:text-gray-50 sm:text-xs", children: "Capacity (mins)" }),
|
|
284
|
+
/* @__PURE__ */ jsx("th", { className: "whitespace-nowrap py-1 text-sm font-medium text-gray-900 dark:text-gray-50 sm:text-xs", children: "Ticket Generation" })
|
|
285
|
+
] }) }),
|
|
286
|
+
/* @__PURE__ */ jsx("tbody", { children: paginatedAgents.length > 0 ? paginatedAgents.map((agent) => {
|
|
287
|
+
const capacity = agent.minutes_booked > 0 ? agent.minutes_called / agent.minutes_booked * 100 : 0;
|
|
288
|
+
return /* @__PURE__ */ jsxs(
|
|
289
|
+
"tr",
|
|
290
|
+
{
|
|
291
|
+
className: "group select-none border-b border-gray-100 hover:bg-[#FBFBFC] dark:border-gray-800 hover:dark:bg-gray-900",
|
|
292
|
+
children: [
|
|
293
|
+
/* @__PURE__ */ jsx("td", { className: "relative whitespace-nowrap py-2.5 text-gray-600 dark:text-gray-400", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
294
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900 dark:text-gray-50", children: agent.full_name }),
|
|
295
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs", children: [
|
|
296
|
+
/* @__PURE__ */ jsx("span", { className: "text-gray-500 dark:text-gray-500", children: "AgID " }),
|
|
297
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono font-medium uppercase tabular-nums text-gray-900 dark:text-gray-50", children: agent.agent_id }),
|
|
298
|
+
/* @__PURE__ */ jsx(
|
|
299
|
+
ShieldCheckIcon,
|
|
300
|
+
{
|
|
301
|
+
className: twMerge(
|
|
302
|
+
"size-3 shrink-0",
|
|
303
|
+
agent.registered ? "text-emerald-600 dark:text-emerald-400" : "text-gray-400 dark:text-gray-600"
|
|
304
|
+
)
|
|
305
|
+
}
|
|
306
|
+
)
|
|
307
|
+
] })
|
|
308
|
+
] }) }),
|
|
309
|
+
/* @__PURE__ */ jsx("td", { className: "relative whitespace-nowrap py-2.5 text-gray-600 dark:text-gray-400", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
310
|
+
/* @__PURE__ */ jsx("span", { className: "text-gray-900 dark:text-gray-50", children: formatPhoneNumber(agent.number) }),
|
|
311
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-gray-500 dark:text-gray-500", children: agent.email })
|
|
312
|
+
] }) }),
|
|
313
|
+
/* @__PURE__ */ jsx("td", { className: "relative whitespace-nowrap py-2.5 text-gray-600 dark:text-gray-400", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
314
|
+
/* @__PURE__ */ jsx("span", { className: "tabular-nums text-gray-900 dark:text-gray-50", children: agent.end_date ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
315
|
+
"End: ",
|
|
316
|
+
formatDate(agent.end_date)
|
|
317
|
+
] }) : /* @__PURE__ */ jsx(Badge, { className: "px-1.5 py-0.5", variant: "success", children: "Active" }) }),
|
|
318
|
+
/* @__PURE__ */ jsxs("span", { className: "text-xs tabular-nums text-gray-500 dark:text-gray-500", children: [
|
|
319
|
+
"Start: ",
|
|
320
|
+
formatDate(agent.start_date)
|
|
321
|
+
] })
|
|
322
|
+
] }) }),
|
|
323
|
+
/* @__PURE__ */ jsx("td", { className: "relative whitespace-nowrap py-2.5 text-gray-600 dark:text-gray-400", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
324
|
+
/* @__PURE__ */ jsx("span", { className: "text-gray-900 dark:text-gray-50", children: agent.account }),
|
|
325
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-gray-500 dark:text-gray-500", children: "Main division" })
|
|
326
|
+
] }) }),
|
|
327
|
+
/* @__PURE__ */ jsx("td", { className: "relative whitespace-nowrap py-2.5 text-gray-600 dark:text-gray-400", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
328
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-x-2.5", children: /* @__PURE__ */ jsx(ProgressCircle, { value: capacity, radius: 14, strokeWidth: 3, variant: getCapacityVariant(capacity), children: /* @__PURE__ */ jsx("span", { className: "text-[11px] font-semibold text-gray-900 dark:text-gray-50", children: capacity.toFixed(0) }) }) }),
|
|
329
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0", children: [
|
|
330
|
+
/* @__PURE__ */ jsxs("span", { className: "text-gray-900 dark:text-gray-50", children: [
|
|
331
|
+
/* @__PURE__ */ jsx("span", { className: "text-gray-500 dark:text-gray-500", children: "Called " }),
|
|
332
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: new Intl.NumberFormat().format(agent.minutes_called) })
|
|
333
|
+
] }),
|
|
334
|
+
/* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-500 dark:text-gray-500", children: [
|
|
335
|
+
"Booked ",
|
|
336
|
+
new Intl.NumberFormat().format(agent.minutes_booked)
|
|
337
|
+
] })
|
|
338
|
+
] })
|
|
339
|
+
] }) }),
|
|
340
|
+
/* @__PURE__ */ jsx("td", { className: "relative whitespace-nowrap py-2.5 text-gray-600 dark:text-gray-400", children: /* @__PURE__ */ jsx(TicketGenerationButton, { initialState: agent.ticket_generation }) })
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
agent.agent_id
|
|
344
|
+
);
|
|
345
|
+
}) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 6, className: "h-24 text-center text-gray-500 dark:text-gray-400", children: "No results." }) }) })
|
|
346
|
+
] }) }),
|
|
347
|
+
/* @__PURE__ */ jsx(Pagination, { pageIndex, pageSize, totalRows: filteredAgents.length, onPageChange: setPageIndex })
|
|
348
|
+
] }) })
|
|
349
|
+
] });
|
|
350
|
+
}
|
|
351
|
+
function AgentsSectionMdxui({
|
|
352
|
+
totalAgents,
|
|
353
|
+
activeAgents,
|
|
354
|
+
runsToday,
|
|
355
|
+
successRate,
|
|
356
|
+
topAgents,
|
|
357
|
+
loading = false,
|
|
358
|
+
className
|
|
359
|
+
}) {
|
|
360
|
+
if (loading) {
|
|
361
|
+
return /* @__PURE__ */ jsxs("div", { "data-testid": "agents-section-loading", className: twMerge("animate-pulse space-y-4", className), children: [
|
|
362
|
+
/* @__PURE__ */ jsx("div", { className: "h-8 w-48 rounded bg-gray-200 dark:bg-gray-700" }),
|
|
363
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-4", children: [...Array(4)].map((_, i) => /* @__PURE__ */ jsx("div", { className: "h-24 rounded-lg bg-gray-200 dark:bg-gray-700" }, i.toString())) })
|
|
364
|
+
] });
|
|
365
|
+
}
|
|
366
|
+
return /* @__PURE__ */ jsxs("section", { className: twMerge("space-y-6", className), children: [
|
|
367
|
+
/* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: "Agents Overview" }),
|
|
368
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-4", children: [
|
|
369
|
+
/* @__PURE__ */ jsx(MetricCard, { label: "Total Agents", value: totalAgents }),
|
|
370
|
+
/* @__PURE__ */ jsx(MetricCard, { label: "Active Agents", value: activeAgents }),
|
|
371
|
+
/* @__PURE__ */ jsx(MetricCard, { label: "Runs Today", value: runsToday }),
|
|
372
|
+
/* @__PURE__ */ jsx(MetricCard, { label: "Success Rate", value: `${successRate}%` })
|
|
373
|
+
] }),
|
|
374
|
+
topAgents && topAgents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mt-6", children: [
|
|
375
|
+
/* @__PURE__ */ jsx("h3", { className: "mb-4 text-sm font-medium text-gray-700 dark:text-gray-300", children: "Top Performing Agents" }),
|
|
376
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-3", children: topAgents.map((agent) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between rounded-lg border border-gray-200 p-3 dark:border-gray-700", children: [
|
|
377
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
378
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-300", children: agent.name.charAt(0) }),
|
|
379
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900 dark:text-white", children: agent.name })
|
|
380
|
+
] }),
|
|
381
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 text-sm text-gray-500 dark:text-gray-400", children: [
|
|
382
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
383
|
+
agent.runs,
|
|
384
|
+
" runs"
|
|
385
|
+
] }),
|
|
386
|
+
/* @__PURE__ */ jsxs("span", { className: "text-green-600 dark:text-green-400", children: [
|
|
387
|
+
agent.successRate,
|
|
388
|
+
"%"
|
|
389
|
+
] })
|
|
390
|
+
] })
|
|
391
|
+
] }, agent.id)) })
|
|
392
|
+
] })
|
|
393
|
+
] });
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// src/overview/components/sections/RetentionSection.tsx
|
|
397
|
+
import { twMerge as twMerge2 } from "tailwind-merge";
|
|
398
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
399
|
+
function RetentionSection({
|
|
400
|
+
cohorts,
|
|
401
|
+
periods,
|
|
402
|
+
currentRetention,
|
|
403
|
+
trend,
|
|
404
|
+
loading = false,
|
|
405
|
+
className
|
|
406
|
+
}) {
|
|
407
|
+
if (loading) {
|
|
408
|
+
return /* @__PURE__ */ jsxs2(
|
|
409
|
+
"div",
|
|
410
|
+
{
|
|
411
|
+
"data-testid": "retention-section-loading",
|
|
412
|
+
className: twMerge2("animate-pulse space-y-4", className),
|
|
413
|
+
children: [
|
|
414
|
+
/* @__PURE__ */ jsx2("div", { className: "h-8 w-48 rounded bg-gray-200 dark:bg-gray-700" }),
|
|
415
|
+
/* @__PURE__ */ jsx2("div", { className: "h-32 rounded-lg bg-gray-200 dark:bg-gray-700" }),
|
|
416
|
+
/* @__PURE__ */ jsx2("div", { className: "h-64 rounded-lg bg-gray-200 dark:bg-gray-700" })
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
}
|
|
421
|
+
return /* @__PURE__ */ jsxs2("section", { className: twMerge2("space-y-6", className), children: [
|
|
422
|
+
/* @__PURE__ */ jsx2("h2", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: "Retention Analytics" }),
|
|
423
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-4 rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800", children: [
|
|
424
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
425
|
+
/* @__PURE__ */ jsx2("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Current Retention" }),
|
|
426
|
+
/* @__PURE__ */ jsxs2("p", { className: "mt-1 text-3xl font-semibold text-gray-900 dark:text-white", children: [
|
|
427
|
+
currentRetention,
|
|
428
|
+
"%"
|
|
429
|
+
] })
|
|
430
|
+
] }),
|
|
431
|
+
/* @__PURE__ */ jsx2(TrendIndicator, { trend })
|
|
432
|
+
] }),
|
|
433
|
+
/* @__PURE__ */ jsx2("div", { className: "overflow-x-auto rounded-lg border border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxs2("table", { className: "min-w-full divide-y divide-gray-200 dark:divide-gray-700", children: [
|
|
434
|
+
/* @__PURE__ */ jsx2("thead", { className: "bg-gray-50 dark:bg-gray-800", children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
435
|
+
/* @__PURE__ */ jsx2("th", { className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400", children: "Cohort" }),
|
|
436
|
+
/* @__PURE__ */ jsx2("th", { className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400", children: "Size" }),
|
|
437
|
+
periods.map((period) => /* @__PURE__ */ jsx2(
|
|
438
|
+
"th",
|
|
439
|
+
{
|
|
440
|
+
className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400",
|
|
441
|
+
children: period
|
|
442
|
+
},
|
|
443
|
+
period
|
|
444
|
+
))
|
|
445
|
+
] }) }),
|
|
446
|
+
/* @__PURE__ */ jsx2("tbody", { className: "divide-y divide-gray-200 bg-white dark:divide-gray-700 dark:bg-gray-900", children: cohorts.map((cohort) => /* @__PURE__ */ jsxs2("tr", { children: [
|
|
447
|
+
/* @__PURE__ */ jsx2("td", { className: "whitespace-nowrap px-4 py-3 text-sm font-medium text-gray-900 dark:text-white", children: cohort.cohort }),
|
|
448
|
+
/* @__PURE__ */ jsx2("td", { className: "whitespace-nowrap px-4 py-3 text-sm text-gray-500 dark:text-gray-400", children: cohort.size }),
|
|
449
|
+
cohort.retention.map((rate, idx) => /* @__PURE__ */ jsx2(
|
|
450
|
+
"td",
|
|
451
|
+
{
|
|
452
|
+
className: "whitespace-nowrap px-4 py-3 text-sm",
|
|
453
|
+
style: {
|
|
454
|
+
backgroundColor: getRetentionColor(rate)
|
|
455
|
+
},
|
|
456
|
+
children: /* @__PURE__ */ jsxs2("span", { className: "font-medium text-gray-900 dark:text-white", children: [
|
|
457
|
+
rate,
|
|
458
|
+
"%"
|
|
459
|
+
] })
|
|
460
|
+
},
|
|
461
|
+
idx.toString()
|
|
462
|
+
))
|
|
463
|
+
] }, cohort.cohort)) })
|
|
464
|
+
] }) })
|
|
465
|
+
] });
|
|
466
|
+
}
|
|
467
|
+
function TrendIndicator({ trend }) {
|
|
468
|
+
const colors = {
|
|
469
|
+
up: "text-green-600 dark:text-green-400",
|
|
470
|
+
down: "text-red-600 dark:text-red-400",
|
|
471
|
+
flat: "text-gray-500 dark:text-gray-400"
|
|
472
|
+
};
|
|
473
|
+
const arrows = {
|
|
474
|
+
up: /* @__PURE__ */ jsx2(
|
|
475
|
+
"svg",
|
|
476
|
+
{
|
|
477
|
+
className: "h-5 w-5",
|
|
478
|
+
fill: "none",
|
|
479
|
+
viewBox: "0 0 24 24",
|
|
480
|
+
stroke: "currentColor",
|
|
481
|
+
"aria-hidden": "true",
|
|
482
|
+
children: /* @__PURE__ */ jsx2(
|
|
483
|
+
"path",
|
|
484
|
+
{
|
|
485
|
+
strokeLinecap: "round",
|
|
486
|
+
strokeLinejoin: "round",
|
|
487
|
+
strokeWidth: 2,
|
|
488
|
+
d: "M5 10l7-7m0 0l7 7m-7-7v18"
|
|
489
|
+
}
|
|
490
|
+
)
|
|
491
|
+
}
|
|
492
|
+
),
|
|
493
|
+
down: /* @__PURE__ */ jsx2(
|
|
494
|
+
"svg",
|
|
495
|
+
{
|
|
496
|
+
className: "h-5 w-5",
|
|
497
|
+
fill: "none",
|
|
498
|
+
viewBox: "0 0 24 24",
|
|
499
|
+
stroke: "currentColor",
|
|
500
|
+
"aria-hidden": "true",
|
|
501
|
+
children: /* @__PURE__ */ jsx2(
|
|
502
|
+
"path",
|
|
503
|
+
{
|
|
504
|
+
strokeLinecap: "round",
|
|
505
|
+
strokeLinejoin: "round",
|
|
506
|
+
strokeWidth: 2,
|
|
507
|
+
d: "M19 14l-7 7m0 0l-7-7m7 7V3"
|
|
508
|
+
}
|
|
509
|
+
)
|
|
510
|
+
}
|
|
511
|
+
),
|
|
512
|
+
flat: /* @__PURE__ */ jsx2(
|
|
513
|
+
"svg",
|
|
514
|
+
{
|
|
515
|
+
className: "h-5 w-5",
|
|
516
|
+
fill: "none",
|
|
517
|
+
viewBox: "0 0 24 24",
|
|
518
|
+
stroke: "currentColor",
|
|
519
|
+
"aria-hidden": "true",
|
|
520
|
+
children: /* @__PURE__ */ jsx2(
|
|
521
|
+
"path",
|
|
522
|
+
{
|
|
523
|
+
strokeLinecap: "round",
|
|
524
|
+
strokeLinejoin: "round",
|
|
525
|
+
strokeWidth: 2,
|
|
526
|
+
d: "M5 12h14"
|
|
527
|
+
}
|
|
528
|
+
)
|
|
529
|
+
}
|
|
530
|
+
)
|
|
531
|
+
};
|
|
532
|
+
return /* @__PURE__ */ jsxs2(
|
|
533
|
+
"div",
|
|
534
|
+
{
|
|
535
|
+
"data-trend": trend,
|
|
536
|
+
className: twMerge2("flex items-center gap-1", colors[trend]),
|
|
537
|
+
children: [
|
|
538
|
+
arrows[trend],
|
|
539
|
+
/* @__PURE__ */ jsx2("span", { className: "text-sm font-medium capitalize", children: trend })
|
|
540
|
+
]
|
|
541
|
+
}
|
|
542
|
+
);
|
|
543
|
+
}
|
|
544
|
+
function getRetentionColor(rate) {
|
|
545
|
+
if (rate >= 80) return "rgba(34, 197, 94, 0.2)";
|
|
546
|
+
if (rate >= 60) return "rgba(234, 179, 8, 0.2)";
|
|
547
|
+
if (rate >= 40) return "rgba(249, 115, 22, 0.2)";
|
|
548
|
+
return "rgba(239, 68, 68, 0.2)";
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
// src/overview/components/sections/SupportSection.tsx
|
|
552
|
+
import { twMerge as twMerge3 } from "tailwind-merge";
|
|
553
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
554
|
+
function SupportSection({
|
|
555
|
+
openTickets,
|
|
556
|
+
avgResponseTime,
|
|
557
|
+
resolutionRate,
|
|
558
|
+
csat,
|
|
559
|
+
ticketsByStatus,
|
|
560
|
+
ticketsByPriority,
|
|
561
|
+
volumeTrend: _volumeTrend,
|
|
562
|
+
loading = false,
|
|
563
|
+
className
|
|
564
|
+
}) {
|
|
565
|
+
if (loading) {
|
|
566
|
+
return /* @__PURE__ */ jsxs3(
|
|
567
|
+
"div",
|
|
568
|
+
{
|
|
569
|
+
"data-testid": "support-section-loading",
|
|
570
|
+
className: twMerge3("animate-pulse space-y-4", className),
|
|
571
|
+
children: [
|
|
572
|
+
/* @__PURE__ */ jsx3("div", { className: "h-8 w-48 rounded bg-gray-200 dark:bg-gray-700" }),
|
|
573
|
+
/* @__PURE__ */ jsx3("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-4", children: [...Array(4)].map((_, i) => /* @__PURE__ */ jsx3(
|
|
574
|
+
"div",
|
|
575
|
+
{
|
|
576
|
+
className: "h-24 rounded-lg bg-gray-200 dark:bg-gray-700"
|
|
577
|
+
},
|
|
578
|
+
i.toString()
|
|
579
|
+
)) })
|
|
580
|
+
]
|
|
581
|
+
}
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
return /* @__PURE__ */ jsxs3("section", { className: twMerge3("space-y-6", className), children: [
|
|
585
|
+
/* @__PURE__ */ jsx3("h2", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: "Support Overview" }),
|
|
586
|
+
/* @__PURE__ */ jsxs3("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-4", children: [
|
|
587
|
+
/* @__PURE__ */ jsx3(MetricCard2, { label: "Open Tickets", value: openTickets }),
|
|
588
|
+
/* @__PURE__ */ jsx3(MetricCard2, { label: "Avg Response", value: `${avgResponseTime}m` }),
|
|
589
|
+
/* @__PURE__ */ jsx3(MetricCard2, { label: "Resolution Rate", value: `${resolutionRate}%` }),
|
|
590
|
+
/* @__PURE__ */ jsx3(MetricCard2, { label: "CSAT", value: csat })
|
|
591
|
+
] }),
|
|
592
|
+
ticketsByStatus && ticketsByStatus.length > 0 && /* @__PURE__ */ jsxs3("div", { className: "mt-6", children: [
|
|
593
|
+
/* @__PURE__ */ jsx3("h3", { className: "mb-4 text-sm font-medium text-gray-700 dark:text-gray-300", children: "Tickets by Status" }),
|
|
594
|
+
/* @__PURE__ */ jsx3("div", { className: "flex flex-wrap gap-3", children: ticketsByStatus.map((item) => /* @__PURE__ */ jsxs3(
|
|
595
|
+
"div",
|
|
596
|
+
{
|
|
597
|
+
className: "flex items-center gap-2 rounded-full border border-gray-200 px-3 py-1 dark:border-gray-700",
|
|
598
|
+
children: [
|
|
599
|
+
/* @__PURE__ */ jsx3(StatusDot, { status: item.status }),
|
|
600
|
+
/* @__PURE__ */ jsx3("span", { className: "text-sm font-medium text-gray-900 dark:text-white", children: item.status }),
|
|
601
|
+
/* @__PURE__ */ jsx3("span", { className: "text-sm text-gray-500 dark:text-gray-400", children: item.count })
|
|
602
|
+
]
|
|
603
|
+
},
|
|
604
|
+
item.status
|
|
605
|
+
)) })
|
|
606
|
+
] }),
|
|
607
|
+
ticketsByPriority && ticketsByPriority.length > 0 && /* @__PURE__ */ jsxs3("div", { className: "mt-6", children: [
|
|
608
|
+
/* @__PURE__ */ jsx3("h3", { className: "mb-4 text-sm font-medium text-gray-700 dark:text-gray-300", children: "Tickets by Priority" }),
|
|
609
|
+
/* @__PURE__ */ jsx3("div", { className: "space-y-2", children: ticketsByPriority.map((item) => /* @__PURE__ */ jsxs3(
|
|
610
|
+
"div",
|
|
611
|
+
{
|
|
612
|
+
className: "flex items-center justify-between rounded-lg border border-gray-200 p-3 dark:border-gray-700",
|
|
613
|
+
children: [
|
|
614
|
+
/* @__PURE__ */ jsx3("span", { className: "text-sm font-medium text-gray-900 dark:text-white", children: item.priority }),
|
|
615
|
+
/* @__PURE__ */ jsxs3("span", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
|
|
616
|
+
item.count,
|
|
617
|
+
" tickets"
|
|
618
|
+
] })
|
|
619
|
+
]
|
|
620
|
+
},
|
|
621
|
+
item.priority
|
|
622
|
+
)) })
|
|
623
|
+
] })
|
|
624
|
+
] });
|
|
625
|
+
}
|
|
626
|
+
function MetricCard2({
|
|
627
|
+
label,
|
|
628
|
+
value
|
|
629
|
+
}) {
|
|
630
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800", children: [
|
|
631
|
+
/* @__PURE__ */ jsx3("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: label }),
|
|
632
|
+
/* @__PURE__ */ jsx3("p", { className: "mt-1 text-2xl font-semibold text-gray-900 dark:text-white", children: value })
|
|
633
|
+
] });
|
|
634
|
+
}
|
|
635
|
+
function StatusDot({ status }) {
|
|
636
|
+
const colors = {
|
|
637
|
+
Open: "bg-blue-500",
|
|
638
|
+
Pending: "bg-yellow-500",
|
|
639
|
+
Resolved: "bg-green-500",
|
|
640
|
+
Closed: "bg-gray-500"
|
|
641
|
+
};
|
|
642
|
+
return /* @__PURE__ */ jsx3(
|
|
643
|
+
"span",
|
|
644
|
+
{
|
|
645
|
+
className: twMerge3(
|
|
646
|
+
"h-2 w-2 rounded-full",
|
|
647
|
+
colors[status] || "bg-gray-400"
|
|
648
|
+
)
|
|
649
|
+
}
|
|
650
|
+
);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
// src/overview/components/sections/WorkflowSection.tsx
|
|
654
|
+
import { twMerge as twMerge4 } from "tailwind-merge";
|
|
655
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
656
|
+
function WorkflowSection({
|
|
657
|
+
totalWorkflows,
|
|
658
|
+
activeWorkflows,
|
|
659
|
+
runsToday,
|
|
660
|
+
successRate,
|
|
661
|
+
timeSaved,
|
|
662
|
+
runsByWorkflow,
|
|
663
|
+
runHistory: _runHistory,
|
|
664
|
+
loading = false,
|
|
665
|
+
className
|
|
666
|
+
}) {
|
|
667
|
+
if (loading) {
|
|
668
|
+
return /* @__PURE__ */ jsxs4(
|
|
669
|
+
"div",
|
|
670
|
+
{
|
|
671
|
+
"data-testid": "workflow-section-loading",
|
|
672
|
+
className: twMerge4("animate-pulse space-y-4", className),
|
|
673
|
+
children: [
|
|
674
|
+
/* @__PURE__ */ jsx4("div", { className: "h-8 w-48 rounded bg-gray-200 dark:bg-gray-700" }),
|
|
675
|
+
/* @__PURE__ */ jsx4("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-4", children: [...Array(4)].map((_, i) => /* @__PURE__ */ jsx4(
|
|
676
|
+
"div",
|
|
677
|
+
{
|
|
678
|
+
className: "h-24 rounded-lg bg-gray-200 dark:bg-gray-700"
|
|
679
|
+
},
|
|
680
|
+
i.toString()
|
|
681
|
+
)) })
|
|
682
|
+
]
|
|
683
|
+
}
|
|
684
|
+
);
|
|
685
|
+
}
|
|
686
|
+
const metrics = [
|
|
687
|
+
{ label: "Total Workflows", value: totalWorkflows },
|
|
688
|
+
{ label: "Active Workflows", value: activeWorkflows },
|
|
689
|
+
{ label: "Runs Today", value: runsToday },
|
|
690
|
+
{ label: "Success Rate", value: `${successRate}%` }
|
|
691
|
+
];
|
|
692
|
+
if (timeSaved !== void 0) {
|
|
693
|
+
metrics.push({ label: "Time Saved", value: `${timeSaved}h` });
|
|
694
|
+
}
|
|
695
|
+
return /* @__PURE__ */ jsxs4("section", { className: twMerge4("space-y-6", className), children: [
|
|
696
|
+
/* @__PURE__ */ jsx4("h2", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: "Workflow Automation" }),
|
|
697
|
+
/* @__PURE__ */ jsx4("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-4 lg:grid-cols-5", children: metrics.map((metric) => /* @__PURE__ */ jsx4(
|
|
698
|
+
MetricCard3,
|
|
699
|
+
{
|
|
700
|
+
label: metric.label,
|
|
701
|
+
value: metric.value
|
|
702
|
+
},
|
|
703
|
+
metric.label
|
|
704
|
+
)) }),
|
|
705
|
+
runsByWorkflow && runsByWorkflow.length > 0 && /* @__PURE__ */ jsxs4("div", { className: "mt-6", children: [
|
|
706
|
+
/* @__PURE__ */ jsx4("h3", { className: "mb-4 text-sm font-medium text-gray-700 dark:text-gray-300", children: "Workflows Overview" }),
|
|
707
|
+
/* @__PURE__ */ jsx4("div", { className: "space-y-3", children: runsByWorkflow.map((workflow) => /* @__PURE__ */ jsxs4(
|
|
708
|
+
"div",
|
|
709
|
+
{
|
|
710
|
+
className: "flex items-center justify-between rounded-lg border border-gray-200 p-3 dark:border-gray-700",
|
|
711
|
+
children: [
|
|
712
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3", children: [
|
|
713
|
+
/* @__PURE__ */ jsx4("div", { className: "flex h-8 w-8 items-center justify-center rounded-lg bg-purple-100 text-purple-600 dark:bg-purple-900 dark:text-purple-300", children: /* @__PURE__ */ jsx4(WorkflowIcon, {}) }),
|
|
714
|
+
/* @__PURE__ */ jsx4("span", { className: "font-medium text-gray-900 dark:text-white", children: workflow.name })
|
|
715
|
+
] }),
|
|
716
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-4 text-sm text-gray-500 dark:text-gray-400", children: [
|
|
717
|
+
/* @__PURE__ */ jsxs4("span", { children: [
|
|
718
|
+
workflow.runs,
|
|
719
|
+
" runs"
|
|
720
|
+
] }),
|
|
721
|
+
/* @__PURE__ */ jsxs4(
|
|
722
|
+
"span",
|
|
723
|
+
{
|
|
724
|
+
className: workflow.successRate >= 90 ? "text-green-600 dark:text-green-400" : workflow.successRate >= 70 ? "text-yellow-600 dark:text-yellow-400" : "text-red-600 dark:text-red-400",
|
|
725
|
+
children: [
|
|
726
|
+
workflow.successRate,
|
|
727
|
+
"%"
|
|
728
|
+
]
|
|
729
|
+
}
|
|
730
|
+
)
|
|
731
|
+
] })
|
|
732
|
+
]
|
|
733
|
+
},
|
|
734
|
+
workflow.id
|
|
735
|
+
)) })
|
|
736
|
+
] })
|
|
737
|
+
] });
|
|
738
|
+
}
|
|
739
|
+
function MetricCard3({
|
|
740
|
+
label,
|
|
741
|
+
value
|
|
742
|
+
}) {
|
|
743
|
+
return /* @__PURE__ */ jsxs4("div", { className: "rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800", children: [
|
|
744
|
+
/* @__PURE__ */ jsx4("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: label }),
|
|
745
|
+
/* @__PURE__ */ jsx4("p", { className: "mt-1 text-2xl font-semibold text-gray-900 dark:text-white", children: value })
|
|
746
|
+
] });
|
|
747
|
+
}
|
|
748
|
+
function WorkflowIcon() {
|
|
749
|
+
return /* @__PURE__ */ jsx4(
|
|
750
|
+
"svg",
|
|
751
|
+
{
|
|
752
|
+
className: "h-4 w-4",
|
|
753
|
+
fill: "none",
|
|
754
|
+
viewBox: "0 0 24 24",
|
|
755
|
+
stroke: "currentColor",
|
|
756
|
+
"aria-hidden": "true",
|
|
757
|
+
children: /* @__PURE__ */ jsx4(
|
|
758
|
+
"path",
|
|
759
|
+
{
|
|
760
|
+
strokeLinecap: "round",
|
|
761
|
+
strokeLinejoin: "round",
|
|
762
|
+
strokeWidth: 2,
|
|
763
|
+
d: "M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"
|
|
764
|
+
}
|
|
765
|
+
)
|
|
766
|
+
}
|
|
767
|
+
);
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
// src/overview/layouts/app.tsx
|
|
771
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
772
|
+
function OverviewApp({ name, children }) {
|
|
773
|
+
return /* @__PURE__ */ jsx5(
|
|
774
|
+
"div",
|
|
775
|
+
{
|
|
776
|
+
"data-app-name": name,
|
|
777
|
+
className: "min-h-screen bg-white dark:bg-gray-950",
|
|
778
|
+
children
|
|
779
|
+
}
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
// src/overview/layouts/header.tsx
|
|
784
|
+
import { twMerge as twMerge5 } from "tailwind-merge";
|
|
785
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
786
|
+
function OverviewHeader({
|
|
787
|
+
user,
|
|
788
|
+
showSearch = true,
|
|
789
|
+
showNotifications = true,
|
|
790
|
+
breadcrumbs,
|
|
791
|
+
logo,
|
|
792
|
+
notifications,
|
|
793
|
+
userProfile,
|
|
794
|
+
className
|
|
795
|
+
}) {
|
|
796
|
+
return /* @__PURE__ */ jsxs5(
|
|
797
|
+
"header",
|
|
798
|
+
{
|
|
799
|
+
className: twMerge5(
|
|
800
|
+
"flex h-16 items-center justify-between border-b border-gray-200 bg-white px-4 dark:border-gray-800 dark:bg-gray-950 sm:px-6",
|
|
801
|
+
className
|
|
802
|
+
),
|
|
803
|
+
children: [
|
|
804
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-4", children: [
|
|
805
|
+
logo ?? /* @__PURE__ */ jsx6("div", { className: "h-6 w-20 rounded bg-gray-200 dark:bg-gray-800" }),
|
|
806
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx6("nav", { "aria-label": "Breadcrumb", className: "hidden sm:block", children: /* @__PURE__ */ jsx6("ol", { className: "flex items-center gap-2", children: breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxs5("li", { className: "flex items-center gap-2", children: [
|
|
807
|
+
index > 0 && /* @__PURE__ */ jsx6("span", { className: "text-gray-400 dark:text-gray-600", children: "/" }),
|
|
808
|
+
crumb.href ? /* @__PURE__ */ jsx6(
|
|
809
|
+
"a",
|
|
810
|
+
{
|
|
811
|
+
href: crumb.href,
|
|
812
|
+
className: "text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300",
|
|
813
|
+
children: crumb.label
|
|
814
|
+
}
|
|
815
|
+
) : /* @__PURE__ */ jsx6("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: crumb.label })
|
|
816
|
+
] }, index.toString())) }) })
|
|
817
|
+
] }),
|
|
818
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-3", children: [
|
|
819
|
+
showSearch && /* @__PURE__ */ jsx6(
|
|
820
|
+
"button",
|
|
821
|
+
{
|
|
822
|
+
type: "button",
|
|
823
|
+
className: "rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300",
|
|
824
|
+
"aria-label": "Search",
|
|
825
|
+
children: /* @__PURE__ */ jsx6(
|
|
826
|
+
"svg",
|
|
827
|
+
{
|
|
828
|
+
className: "h-5 w-5",
|
|
829
|
+
fill: "none",
|
|
830
|
+
viewBox: "0 0 24 24",
|
|
831
|
+
stroke: "currentColor",
|
|
832
|
+
"aria-hidden": "true",
|
|
833
|
+
children: /* @__PURE__ */ jsx6(
|
|
834
|
+
"path",
|
|
835
|
+
{
|
|
836
|
+
strokeLinecap: "round",
|
|
837
|
+
strokeLinejoin: "round",
|
|
838
|
+
strokeWidth: 2,
|
|
839
|
+
d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
|
|
840
|
+
}
|
|
841
|
+
)
|
|
842
|
+
}
|
|
843
|
+
)
|
|
844
|
+
}
|
|
845
|
+
),
|
|
846
|
+
showNotifications && (notifications ?? /* @__PURE__ */ jsx6(
|
|
847
|
+
"button",
|
|
848
|
+
{
|
|
849
|
+
type: "button",
|
|
850
|
+
className: "rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300",
|
|
851
|
+
"aria-label": "Notifications",
|
|
852
|
+
children: /* @__PURE__ */ jsx6(
|
|
853
|
+
"svg",
|
|
854
|
+
{
|
|
855
|
+
className: "h-5 w-5",
|
|
856
|
+
fill: "none",
|
|
857
|
+
viewBox: "0 0 24 24",
|
|
858
|
+
stroke: "currentColor",
|
|
859
|
+
"aria-hidden": "true",
|
|
860
|
+
children: /* @__PURE__ */ jsx6(
|
|
861
|
+
"path",
|
|
862
|
+
{
|
|
863
|
+
strokeLinecap: "round",
|
|
864
|
+
strokeLinejoin: "round",
|
|
865
|
+
strokeWidth: 2,
|
|
866
|
+
d: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"
|
|
867
|
+
}
|
|
868
|
+
)
|
|
869
|
+
}
|
|
870
|
+
)
|
|
871
|
+
}
|
|
872
|
+
)),
|
|
873
|
+
userProfile ?? (user && /* @__PURE__ */ jsx6("div", { className: "flex items-center gap-2", children: user.avatar ? /* @__PURE__ */ jsx6(
|
|
874
|
+
"img",
|
|
875
|
+
{
|
|
876
|
+
src: user.avatar,
|
|
877
|
+
alt: user.name,
|
|
878
|
+
className: "h-8 w-8 rounded-full"
|
|
879
|
+
}
|
|
880
|
+
) : /* @__PURE__ */ jsx6("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-gray-200 text-sm font-medium text-gray-600 dark:bg-gray-700 dark:text-gray-300", children: user.name.charAt(0) }) }))
|
|
881
|
+
] })
|
|
882
|
+
]
|
|
883
|
+
}
|
|
884
|
+
);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
// src/overview/layouts/overview-dashboard.tsx
|
|
888
|
+
import { twMerge as twMerge6 } from "tailwind-merge";
|
|
889
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
890
|
+
function OverviewDashboard({
|
|
891
|
+
title,
|
|
892
|
+
description,
|
|
893
|
+
actions,
|
|
894
|
+
children,
|
|
895
|
+
className
|
|
896
|
+
}) {
|
|
897
|
+
return /* @__PURE__ */ jsxs6("main", { className: twMerge6("", className), children: [
|
|
898
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
899
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
900
|
+
/* @__PURE__ */ jsx7("h1", { className: "text-2xl font-semibold text-gray-900 dark:text-gray-50", children: title }),
|
|
901
|
+
description && /* @__PURE__ */ jsx7("p", { className: "text-gray-500 sm:text-sm/6 dark:text-gray-500", children: description })
|
|
902
|
+
] }),
|
|
903
|
+
actions && /* @__PURE__ */ jsx7("div", { className: "flex items-center gap-2", children: actions })
|
|
904
|
+
] }),
|
|
905
|
+
/* @__PURE__ */ jsx7("div", { className: "my-6 border-t border-gray-200 dark:border-gray-800" }),
|
|
906
|
+
children
|
|
907
|
+
] });
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
// src/overview/layouts/overview-shell.tsx
|
|
911
|
+
import { twMerge as twMerge7 } from "tailwind-merge";
|
|
912
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
913
|
+
var defaultNav = [
|
|
914
|
+
{ label: "Support", href: "/support" },
|
|
915
|
+
{ label: "Retention", href: "/retention" },
|
|
916
|
+
{ label: "Workflow", href: "/workflow" },
|
|
917
|
+
{ label: "Agents", href: "/agents" }
|
|
918
|
+
];
|
|
919
|
+
function OverviewShell({ nav = defaultNav, logo, userProfile, notifications, children, className }) {
|
|
920
|
+
return /* @__PURE__ */ jsxs7("div", { children: [
|
|
921
|
+
/* @__PURE__ */ jsxs7("div", { className: "sticky top-0 z-20 bg-white shadow-sm dark:bg-gray-950", children: [
|
|
922
|
+
/* @__PURE__ */ jsxs7("div", { className: "mx-auto flex max-w-7xl items-center justify-between px-4 pt-3 sm:px-6", children: [
|
|
923
|
+
/* @__PURE__ */ jsxs7("div", { children: [
|
|
924
|
+
/* @__PURE__ */ jsx8("span", { className: "sr-only", children: "Your Company" }),
|
|
925
|
+
logo ?? /* @__PURE__ */ jsx8("div", { className: "h-6 w-20 rounded bg-gray-200 dark:bg-gray-800" })
|
|
926
|
+
] }),
|
|
927
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex h-[42px] flex-nowrap gap-1", children: [
|
|
928
|
+
notifications,
|
|
929
|
+
userProfile
|
|
930
|
+
] })
|
|
931
|
+
] }),
|
|
932
|
+
/* @__PURE__ */ jsx8("nav", { className: "mt-5 border-b border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ jsx8("div", { className: "mx-auto flex max-w-7xl items-center px-4 sm:px-6", children: nav.map((item) => /* @__PURE__ */ jsx8(
|
|
933
|
+
"a",
|
|
934
|
+
{
|
|
935
|
+
href: item.href,
|
|
936
|
+
className: twMerge7(
|
|
937
|
+
"inline-flex items-center gap-2 border-b-2 px-4 py-2 text-sm font-medium transition-colors",
|
|
938
|
+
item.active ? "border-blue-500 text-blue-600 dark:border-blue-400 dark:text-blue-400" : "border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:border-gray-600 dark:hover:text-gray-300"
|
|
939
|
+
),
|
|
940
|
+
children: item.label
|
|
941
|
+
},
|
|
942
|
+
item.href
|
|
943
|
+
)) }) })
|
|
944
|
+
] }),
|
|
945
|
+
/* @__PURE__ */ jsx8("main", { className: twMerge7("mx-auto max-w-7xl px-4 py-10 sm:px-6", className), children })
|
|
946
|
+
] });
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
// src/overview/layouts/settings.tsx
|
|
950
|
+
import { twMerge as twMerge8 } from "tailwind-merge";
|
|
951
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
952
|
+
var sectionLabels = {
|
|
953
|
+
profile: "Profile",
|
|
954
|
+
security: "Security",
|
|
955
|
+
notifications: "Notifications",
|
|
956
|
+
billing: "Billing",
|
|
957
|
+
team: "Team",
|
|
958
|
+
api: "API",
|
|
959
|
+
integrations: "Integrations"
|
|
960
|
+
};
|
|
961
|
+
function OverviewSettings({
|
|
962
|
+
sections = ["profile", "security", "notifications"],
|
|
963
|
+
activeSection = "profile",
|
|
964
|
+
children,
|
|
965
|
+
className
|
|
966
|
+
}) {
|
|
967
|
+
return /* @__PURE__ */ jsxs8("div", { className: twMerge8("flex gap-8", className), children: [
|
|
968
|
+
/* @__PURE__ */ jsx9("nav", { className: "w-48 flex-shrink-0", children: /* @__PURE__ */ jsx9("ul", { className: "space-y-1", children: sections.map((section) => /* @__PURE__ */ jsx9("li", { children: /* @__PURE__ */ jsx9(
|
|
969
|
+
"a",
|
|
970
|
+
{
|
|
971
|
+
href: `/settings/${section}`,
|
|
972
|
+
className: twMerge8(
|
|
973
|
+
"block rounded-lg px-3 py-2 text-sm font-medium transition-colors",
|
|
974
|
+
section === activeSection ? "bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-gray-100" : "text-gray-600 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:text-gray-300"
|
|
975
|
+
),
|
|
976
|
+
children: sectionLabels[section]
|
|
977
|
+
}
|
|
978
|
+
) }, section)) }) }),
|
|
979
|
+
/* @__PURE__ */ jsx9("div", { className: "flex-1", children: children ?? /* @__PURE__ */ jsxs8("div", { className: "rounded-lg border border-gray-200 bg-white p-6 dark:border-gray-800 dark:bg-gray-900", children: [
|
|
980
|
+
/* @__PURE__ */ jsx9("h2", { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", children: sectionLabels[activeSection] }),
|
|
981
|
+
/* @__PURE__ */ jsxs8("p", { className: "mt-2 text-sm text-gray-500 dark:text-gray-400", children: [
|
|
982
|
+
"Configure your ",
|
|
983
|
+
sectionLabels[activeSection].toLowerCase(),
|
|
984
|
+
" ",
|
|
985
|
+
"settings."
|
|
986
|
+
] })
|
|
987
|
+
] }) })
|
|
988
|
+
] });
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
// src/overview/layouts/sidebar.tsx
|
|
992
|
+
import { twMerge as twMerge9 } from "tailwind-merge";
|
|
993
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
994
|
+
function OverviewSidebar({
|
|
995
|
+
nav = [],
|
|
996
|
+
user,
|
|
997
|
+
logo,
|
|
998
|
+
collapsed = false,
|
|
999
|
+
className
|
|
1000
|
+
}) {
|
|
1001
|
+
return /* @__PURE__ */ jsxs9(
|
|
1002
|
+
"aside",
|
|
1003
|
+
{
|
|
1004
|
+
className: twMerge9(
|
|
1005
|
+
"flex h-screen flex-col border-r border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-950",
|
|
1006
|
+
collapsed ? "w-16" : "w-64",
|
|
1007
|
+
className
|
|
1008
|
+
),
|
|
1009
|
+
children: [
|
|
1010
|
+
logo && /* @__PURE__ */ jsx10("div", { className: "flex h-16 items-center justify-center border-b border-gray-200 px-4 dark:border-gray-800", children: logo }),
|
|
1011
|
+
/* @__PURE__ */ jsx10("nav", { className: "flex-1 overflow-y-auto p-4", children: /* @__PURE__ */ jsx10("ul", { className: "space-y-2", children: nav.map((item) => /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsxs9(
|
|
1012
|
+
"a",
|
|
1013
|
+
{
|
|
1014
|
+
href: item.href,
|
|
1015
|
+
className: "flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-800",
|
|
1016
|
+
children: [
|
|
1017
|
+
item.icon,
|
|
1018
|
+
!collapsed && /* @__PURE__ */ jsx10("span", { children: item.label })
|
|
1019
|
+
]
|
|
1020
|
+
}
|
|
1021
|
+
) }, item.href)) }) }),
|
|
1022
|
+
user && !collapsed && /* @__PURE__ */ jsx10("div", { className: "border-t border-gray-200 p-4 dark:border-gray-800", children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-3", children: [
|
|
1023
|
+
user.avatar ? /* @__PURE__ */ jsx10(
|
|
1024
|
+
"img",
|
|
1025
|
+
{
|
|
1026
|
+
src: user.avatar,
|
|
1027
|
+
alt: user.name,
|
|
1028
|
+
className: "h-8 w-8 rounded-full"
|
|
1029
|
+
}
|
|
1030
|
+
) : /* @__PURE__ */ jsx10("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-gray-200 text-sm font-medium text-gray-600 dark:bg-gray-700 dark:text-gray-300", children: user.name.charAt(0) }),
|
|
1031
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex-1 overflow-hidden", children: [
|
|
1032
|
+
/* @__PURE__ */ jsx10("p", { className: "truncate text-sm font-medium text-gray-900 dark:text-gray-100", children: user.name }),
|
|
1033
|
+
/* @__PURE__ */ jsx10("p", { className: "truncate text-xs text-gray-500 dark:text-gray-400", children: user.email })
|
|
1034
|
+
] })
|
|
1035
|
+
] }) })
|
|
1036
|
+
]
|
|
1037
|
+
}
|
|
1038
|
+
);
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
// src/overview/index.ts
|
|
1042
|
+
var AppComponents = {
|
|
1043
|
+
/** Root application wrapper */
|
|
1044
|
+
App: OverviewApp,
|
|
1045
|
+
/** Top navigation shell layout */
|
|
1046
|
+
Shell: OverviewShell,
|
|
1047
|
+
/** Navigation sidebar (secondary) */
|
|
1048
|
+
Sidebar: OverviewSidebar,
|
|
1049
|
+
/** Header bar component */
|
|
1050
|
+
Header: OverviewHeader,
|
|
1051
|
+
/** Dashboard page layout */
|
|
1052
|
+
Dashboard: OverviewDashboard,
|
|
1053
|
+
/** Settings page layout */
|
|
1054
|
+
Settings: OverviewSettings,
|
|
1055
|
+
/** Agents dashboard section */
|
|
1056
|
+
AgentsSection,
|
|
1057
|
+
/** Retention analytics section */
|
|
1058
|
+
RetentionSection,
|
|
1059
|
+
/** Support metrics section */
|
|
1060
|
+
SupportSection,
|
|
1061
|
+
/** Workflow automation section */
|
|
1062
|
+
WorkflowSection
|
|
1063
|
+
};
|
|
1064
|
+
export {
|
|
1065
|
+
AgentsSection,
|
|
1066
|
+
AppComponents,
|
|
1067
|
+
OverviewApp,
|
|
1068
|
+
OverviewDashboard,
|
|
1069
|
+
OverviewHeader,
|
|
1070
|
+
OverviewSettings,
|
|
1071
|
+
OverviewShell,
|
|
1072
|
+
OverviewSidebar,
|
|
1073
|
+
RetentionSection,
|
|
1074
|
+
SupportSection,
|
|
1075
|
+
WorkflowSection
|
|
1076
|
+
};
|
|
1077
|
+
//# sourceMappingURL=index.js.map
|