@burdenoff/microfe-support 2026.624.1 → 2026.625.1
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/support/components/NotificationToast.js +1 -1
- package/dist/support/components/NotificationToast.js.map +1 -1
- package/dist/support/components/PageLayout.js +2 -2
- package/dist/support/components/PageLayout.js.map +1 -1
- package/dist/support/components/analytics/CategoryBreakdown.js +28 -26
- package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
- package/dist/support/components/analytics/MetricCard.js +21 -16
- package/dist/support/components/analytics/MetricCard.js.map +1 -1
- package/dist/support/components/analytics/PriorityBreakdown.js +30 -28
- package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
- package/dist/support/components/analytics/SLAReport.js +44 -42
- package/dist/support/components/analytics/SLAReport.js.map +1 -1
- package/dist/support/components/analytics/SatisfactionDistribution.js +59 -57
- package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
- package/dist/support/components/analytics/TopAgents.js +31 -29
- package/dist/support/components/analytics/TopAgents.js.map +1 -1
- package/dist/support/components/analytics/TrendChart.js +24 -22
- package/dist/support/components/analytics/TrendChart.js.map +1 -1
- package/dist/support/components/kb/ArticleForm.js +1 -1
- package/dist/support/components/kb/ArticleForm.js.map +1 -1
- package/dist/support/components/settings/CannedResponsesSettings.js +3 -3
- package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js +3 -3
- package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
- package/dist/support/components/settings/TicketCategoriesSettings.js +154 -153
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/ui.js +2 -2
- package/dist/support/pages/AnalyticsPage.js +129 -126
- package/dist/support/pages/AnalyticsPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +191 -206
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +2 -2
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +8 -8
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateArticlePage.js +1 -1
- package/dist/support/pages/CreateArticlePage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.js +1 -1
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/EditArticlePage.js +1 -1
- package/dist/support/pages/EditArticlePage.js.map +1 -1
- package/dist/support/pages/JobApplicationDetailPage.js +10 -10
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +2 -2
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.js +3 -3
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +3 -3
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
- package/dist/support/pages/TicketDetailUserPage.js +49 -49
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.js +4 -4
- package/dist/support/pages/TicketListPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ function o({ notification: o }) {
|
|
|
9
9
|
role: s ? "alert" : "status",
|
|
10
10
|
"aria-live": s ? "assertive" : "polite",
|
|
11
11
|
"aria-atomic": "true",
|
|
12
|
-
className: `fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-
|
|
12
|
+
className: `fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200 ${c ? "bg-success/10 text-success border-success/30" : s ? "bg-error/10 text-error border-error/30" : "bg-info/10 text-info border-info/30"}`,
|
|
13
13
|
children: [c ? /* @__PURE__ */ r(t, {
|
|
14
14
|
size: a,
|
|
15
15
|
className: "text-success",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationToast.js","names":[],"sources":["../../../src/support/components/NotificationToast.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { AlertCircle, CheckCircle, Info } from 'lucide-react';\n\nimport type { NotificationState } from '../hooks/useNotification';\n\ninterface NotificationToastProps {\n notification: NotificationState | null;\n}\n\nconst ICON_SIZE = 20;\n\n/**\n * Shared fixed-corner toast for CreateTicketPage + TicketDetail* pages.\n *\n * ARIA: `alert` + `assertive` for errors so a screen reader interrupts; `status`\n * + `polite` for success/info so it's announced without cutting off other\n * speech. `aria-atomic` so the full message reads as one unit.\n *\n * Icon choice: `Info` for the `'info'` variant — `AlertCircle` incorrectly\n * implies failure/warning in sighted UX.\n */\nexport function NotificationToast({ notification }: NotificationToastProps): ReactElement | null {\n if (!notification) return null;\n\n const isError = notification.type === 'error';\n const isSuccess = notification.type === 'success';\n\n return (\n <div\n role={isError ? 'alert' : 'status'}\n aria-live={isError ? 'assertive' : 'polite'}\n aria-atomic=\"true\"\n className={`fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-
|
|
1
|
+
{"version":3,"file":"NotificationToast.js","names":[],"sources":["../../../src/support/components/NotificationToast.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { AlertCircle, CheckCircle, Info } from 'lucide-react';\n\nimport type { NotificationState } from '../hooks/useNotification';\n\ninterface NotificationToastProps {\n notification: NotificationState | null;\n}\n\nconst ICON_SIZE = 20;\n\n/**\n * Shared fixed-corner toast for CreateTicketPage + TicketDetail* pages.\n *\n * ARIA: `alert` + `assertive` for errors so a screen reader interrupts; `status`\n * + `polite` for success/info so it's announced without cutting off other\n * speech. `aria-atomic` so the full message reads as one unit.\n *\n * Icon choice: `Info` for the `'info'` variant — `AlertCircle` incorrectly\n * implies failure/warning in sighted UX.\n */\nexport function NotificationToast({ notification }: NotificationToastProps): ReactElement | null {\n if (!notification) return null;\n\n const isError = notification.type === 'error';\n const isSuccess = notification.type === 'success';\n\n return (\n <div\n role={isError ? 'alert' : 'status'}\n aria-live={isError ? 'assertive' : 'polite'}\n aria-atomic=\"true\"\n className={`fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200 ${\n isSuccess\n ? 'bg-success/10 text-success border-success/30'\n : isError\n ? 'bg-error/10 text-error border-error/30'\n : 'bg-info/10 text-info border-info/30'\n }`}\n >\n {isSuccess ? (\n <CheckCircle size={ICON_SIZE} className=\"text-success\" aria-hidden=\"true\" />\n ) : isError ? (\n <AlertCircle size={ICON_SIZE} className=\"text-error\" aria-hidden=\"true\" />\n ) : (\n <Info size={ICON_SIZE} className=\"text-info\" aria-hidden=\"true\" />\n )}\n <span className=\"font-medium\">{notification.message}</span>\n </div>\n );\n}\n"],"mappings":";;;AASA,IAAM,IAAY;AAYlB,SAAgB,EAAkB,EAAE,mBAA6D;AAC/F,KAAI,CAAC,EAAc,QAAO;CAE1B,IAAM,IAAU,EAAa,SAAS,SAChC,IAAY,EAAa,SAAS;AAExC,QACE,kBAAC,OAAD;EACE,MAAM,IAAU,UAAU;EAC1B,aAAW,IAAU,cAAc;EACnC,eAAY;EACZ,WAAW,iLACT,IACI,iDACA,IACE,2CACA;YATV,CAYG,IACC,kBAAC,GAAD;GAAa,MAAM;GAAW,WAAU;GAAe,eAAY;GAAS,CAAA,GAC1E,IACF,kBAAC,GAAD;GAAa,MAAM;GAAW,WAAU;GAAa,eAAY;GAAS,CAAA,GAE1E,kBAAC,GAAD;GAAM,MAAM;GAAW,WAAU;GAAY,eAAY;GAAS,CAAA,EAEpE,kBAAC,QAAD;GAAM,WAAU;aAAe,EAAa;GAAe,CAAA,CACvD"}
|
|
@@ -12,7 +12,7 @@ var r = {
|
|
|
12
12
|
};
|
|
13
13
|
function i({ children: i, title: a, subtitle: o, icon: s, headerActions: c, headerContent: l, maxWidth: u = "xl", showHeader: d = !0, className: f, contentClassName: p }) {
|
|
14
14
|
return /* @__PURE__ */ t("div", {
|
|
15
|
-
className: e("min-size-full", "px-4 sm:px-6 lg:px-8 xl:px-12", "py-6 sm:py-8 lg:py-10", "animate-in fade-in-0 slide-in-from-bottom-4 duration-
|
|
15
|
+
className: e("min-size-full", "px-4 sm:px-6 lg:px-8 xl:px-12", "py-6 sm:py-8 lg:py-10", "animate-in fade-in-0 slide-in-from-bottom-4 duration-200", f),
|
|
16
16
|
children: /* @__PURE__ */ n("div", {
|
|
17
17
|
className: e("mx-auto w-full", r[u], p),
|
|
18
18
|
children: [d && (a || c) && /* @__PURE__ */ n("header", {
|
|
@@ -51,7 +51,7 @@ function i({ children: i, title: a, subtitle: o, icon: s, headerActions: c, head
|
|
|
51
51
|
}
|
|
52
52
|
function a({ icon: r, title: i, description: a, action: o, className: s }) {
|
|
53
53
|
return /* @__PURE__ */ n("div", {
|
|
54
|
-
className: e("flex flex-col items-center justify-center", "py-12 sm:py-16 px-4", "text-center", "animate-in fade-in-0 zoom-in-95 duration-
|
|
54
|
+
className: e("flex flex-col items-center justify-center", "py-12 sm:py-16 px-4", "text-center", "animate-in fade-in-0 zoom-in-95 duration-200", s),
|
|
55
55
|
children: [
|
|
56
56
|
r && /* @__PURE__ */ t("div", {
|
|
57
57
|
className: "mb-4 p-4 rounded-2xl bg-bg-sunken/50 text-text-secondary",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/support/components/PageLayout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface PageLayoutProps {\n children: ReactNode;\n /** Page title */\n title?: string;\n /** Page subtitle/description */\n subtitle?: string;\n /** Icon component to display next to title */\n icon?: ReactNode;\n /** Actions to display in header (buttons, etc.) */\n headerActions?: ReactNode;\n /** Additional header content below title */\n headerContent?: ReactNode;\n /** Maximum width of content: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' */\n maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';\n /** Whether to show the header section */\n showHeader?: boolean;\n /** Additional CSS classes for the container */\n className?: string;\n /** Additional CSS classes for the content area */\n contentClassName?: string;\n}\n\nconst maxWidthClasses = {\n sm: 'max-w-screen-sm', // 640px\n md: 'max-w-screen-md', // 768px\n lg: 'max-w-screen-lg', // 1024px\n xl: 'max-w-screen-xl', // 1280px\n '2xl': 'max-w-screen-2xl', // 1536px\n '3xl': 'max-w-[1600px]',\n full: 'max-w-full',\n};\n\n/**\n * PageLayout - A consistent page wrapper with responsive design for Support module\n *\n * Features:\n * - Proper max-width constraints\n * - Responsive padding\n * - Animated entrance\n * - Consistent header styling\n */\nexport function PageLayout({\n children,\n title,\n subtitle,\n icon,\n headerActions,\n headerContent,\n maxWidth = 'xl',\n showHeader = true,\n className,\n contentClassName,\n}: PageLayoutProps) {\n return (\n <div\n className={cn(\n // Base styles - full width container with padding\n 'min-size-full',\n // Responsive horizontal padding\n 'px-4 sm:px-6 lg:px-8 xl:px-12',\n // Responsive vertical padding\n 'py-6 sm:py-8 lg:py-10',\n // Entrance animation\n 'animate-in fade-in-0 slide-in-from-bottom-4 duration-
|
|
1
|
+
{"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/support/components/PageLayout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface PageLayoutProps {\n children: ReactNode;\n /** Page title */\n title?: string;\n /** Page subtitle/description */\n subtitle?: string;\n /** Icon component to display next to title */\n icon?: ReactNode;\n /** Actions to display in header (buttons, etc.) */\n headerActions?: ReactNode;\n /** Additional header content below title */\n headerContent?: ReactNode;\n /** Maximum width of content: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' */\n maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';\n /** Whether to show the header section */\n showHeader?: boolean;\n /** Additional CSS classes for the container */\n className?: string;\n /** Additional CSS classes for the content area */\n contentClassName?: string;\n}\n\nconst maxWidthClasses = {\n sm: 'max-w-screen-sm', // 640px\n md: 'max-w-screen-md', // 768px\n lg: 'max-w-screen-lg', // 1024px\n xl: 'max-w-screen-xl', // 1280px\n '2xl': 'max-w-screen-2xl', // 1536px\n '3xl': 'max-w-[1600px]',\n full: 'max-w-full',\n};\n\n/**\n * PageLayout - A consistent page wrapper with responsive design for Support module\n *\n * Features:\n * - Proper max-width constraints\n * - Responsive padding\n * - Animated entrance\n * - Consistent header styling\n */\nexport function PageLayout({\n children,\n title,\n subtitle,\n icon,\n headerActions,\n headerContent,\n maxWidth = 'xl',\n showHeader = true,\n className,\n contentClassName,\n}: PageLayoutProps) {\n return (\n <div\n className={cn(\n // Base styles - full width container with padding\n 'min-size-full',\n // Responsive horizontal padding\n 'px-4 sm:px-6 lg:px-8 xl:px-12',\n // Responsive vertical padding\n 'py-6 sm:py-8 lg:py-10',\n // Entrance animation\n 'animate-in fade-in-0 slide-in-from-bottom-4 duration-200',\n className\n )}\n >\n {/* Max-width constrained content container */}\n <div className={cn('mx-auto w-full', maxWidthClasses[maxWidth], contentClassName)}>\n {/* Page Header */}\n {showHeader && (title || headerActions) && (\n <header className=\"mb-6 sm:mb-8\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n {/* Title Section */}\n <div className=\"space-y-1\">\n {(title || icon) && (\n <div className=\"flex items-center gap-3\">\n {icon && (\n <div className=\"flex-shrink-0 p-2.5 rounded-xl bg-action-primary-bg/10 text-primary\">\n {icon}\n </div>\n )}\n {title && (\n <h1 className=\"text-2xl sm:text-3xl font-bold tracking-tight text-text-primary\">\n {title}\n </h1>\n )}\n </div>\n )}\n {subtitle && (\n <p className=\"text-sm sm:text-base text-text-secondary max-w-2xl\">{subtitle}</p>\n )}\n </div>\n\n {/* Header Actions */}\n {headerActions && (\n <div className=\"flex items-center gap-2 flex-shrink-0\">{headerActions}</div>\n )}\n </div>\n\n {/* Additional Header Content */}\n {headerContent && <div className=\"mt-4\">{headerContent}</div>}\n </header>\n )}\n\n {/* Page content — must not use a <main> landmark here because the\n host shell (AppShellLayout) already renders one; nesting <main>\n elements is invalid HTML and an a11y violation. */}\n <div className=\"space-y-6\">{children}</div>\n </div>\n </div>\n );\n}\n\n/**\n * EmptyState - A consistent empty state component\n */\nexport function EmptyState({\n icon,\n title,\n description,\n action,\n className,\n}: {\n icon?: ReactNode;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}) {\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center',\n 'py-12 sm:py-16 px-4',\n 'text-center',\n 'animate-in fade-in-0 zoom-in-95 duration-200',\n className\n )}\n >\n {icon && (\n <div className=\"mb-4 p-4 rounded-2xl bg-bg-sunken/50 text-text-secondary\">{icon}</div>\n )}\n <h3 className=\"text-lg font-semibold text-text-primary mb-1\">{title}</h3>\n {description && <p className=\"text-sm text-text-secondary max-w-sm mb-4\">{description}</p>}\n {action}\n </div>\n );\n}\n\n/**\n * LoadingState - A consistent loading state component\n */\nexport function LoadingState({\n message = 'Loading...',\n className,\n}: {\n message?: string;\n className?: string;\n}) {\n return (\n <div className={cn('flex flex-col items-center justify-center py-20', className)}>\n <div className=\"relative\">\n <div className=\"absolute inset-0 bg-action-primary-bg/20 rounded-full blur-xl animate-pulse\" />\n <div className=\"relative size-12 border-4 border-primary/30 border-t-primary rounded-full animate-spin\" />\n </div>\n <span className=\"mt-6 text-sm font-medium text-text-secondary\">{message}</span>\n </div>\n );\n}\n"],"mappings":";;;AAyBA,IAAM,IAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;CACP;AAWD,SAAgB,EAAW,EACzB,aACA,UACA,aACA,SACA,kBACA,kBACA,cAAW,MACX,gBAAa,IACb,cACA,uBACkB;AAClB,QACE,kBAAC,OAAD;EACE,WAAW,EAET,iBAEA,iCAEA,yBAEA,4DACA,EACD;YAGD,kBAAC,OAAD;GAAK,WAAW,EAAG,kBAAkB,EAAgB,IAAW,EAAiB;aAAjF,CAEG,MAAe,KAAS,MACvB,kBAAC,UAAD;IAAQ,WAAU;cAAlB,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CAEE,kBAAC,OAAD;MAAK,WAAU;gBAAf,EACI,KAAS,MACT,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACG,KACC,kBAAC,OAAD;QAAK,WAAU;kBACZ;QACG,CAAA,EAEP,KACC,kBAAC,MAAD;QAAI,WAAU;kBACX;QACE,CAAA,CAEH;UAEP,KACC,kBAAC,KAAD;OAAG,WAAU;iBAAsD;OAAa,CAAA,CAE9E;SAGL,KACC,kBAAC,OAAD;MAAK,WAAU;gBAAyC;MAAoB,CAAA,CAE1E;QAGL,KAAiB,kBAAC,OAAD;KAAK,WAAU;eAAQ;KAAoB,CAAA,CACtD;OAMX,kBAAC,OAAD;IAAK,WAAU;IAAa;IAAe,CAAA,CACvC;;EACF,CAAA;;AAOV,SAAgB,EAAW,EACzB,SACA,UACA,gBACA,WACA,gBAOC;AACD,QACE,kBAAC,OAAD;EACE,WAAW,EACT,6CACA,uBACA,eACA,gDACA,EACD;YAPH;GASG,KACC,kBAAC,OAAD;IAAK,WAAU;cAA4D;IAAW,CAAA;GAExF,kBAAC,MAAD;IAAI,WAAU;cAAgD;IAAW,CAAA;GACxE,KAAe,kBAAC,KAAD;IAAG,WAAU;cAA6C;IAAgB,CAAA;GACzF;GACG;;;AAOV,SAAgB,EAAa,EAC3B,aAAU,cACV,gBAIC;AACD,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,mDAAmD,EAAU;YAAhF,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD,EAAK,WAAU,+EAAgF,CAAA,EAC/F,kBAAC,OAAD,EAAK,WAAU,0FAA2F,CAAA,CACtG;MACN,kBAAC,QAAD;GAAM,WAAU;aAAgD;GAAe,CAAA,CAC3E"}
|
|
@@ -1,48 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { GlassCard as e } from "../ui.js";
|
|
2
|
+
import { analyticsSeriesClasses as t } from "../../utils/uiTokens.js";
|
|
3
|
+
import { FolderOpen as n } from "lucide-react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
5
|
//#region src/support/components/analytics/CategoryBreakdown.tsx
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
function a({ data: a }) {
|
|
7
|
+
let o = a.reduce((e, t) => e + t.count, 0), s = a.slice(0, 8);
|
|
8
|
+
return /* @__PURE__ */ i(e, {
|
|
9
|
+
treatment: "insight",
|
|
10
|
+
className: "p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2",
|
|
11
|
+
children: [/* @__PURE__ */ i("h2", {
|
|
10
12
|
className: "text-xl font-semibold mb-4 flex items-center gap-2 text-primary",
|
|
11
|
-
children: [/* @__PURE__ */ n
|
|
12
|
-
}), /* @__PURE__ */
|
|
13
|
+
children: [/* @__PURE__ */ r(n, { size: 20 }), "Top Categories"]
|
|
14
|
+
}), /* @__PURE__ */ r("div", {
|
|
13
15
|
className: "space-y-3",
|
|
14
|
-
children:
|
|
15
|
-
let
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
children: s.map((e, n) => {
|
|
17
|
+
let a = o > 0 ? e.count / o * 100 : 0, s = t[n % t.length];
|
|
18
|
+
return /* @__PURE__ */ i("div", {
|
|
17
19
|
className: "flex items-center justify-between transition-colors duration-200 hover:bg-bg-sunken/50 p-1 rounded",
|
|
18
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ i("div", {
|
|
19
21
|
className: "flex items-center gap-2 flex-1",
|
|
20
|
-
children: [/* @__PURE__ */
|
|
22
|
+
children: [/* @__PURE__ */ r("div", { className: `w-3 h-3 rounded-full flex-shrink-0 ${s}` }), /* @__PURE__ */ r("span", {
|
|
21
23
|
className: "text-sm truncate text-primary",
|
|
22
|
-
children:
|
|
24
|
+
children: e.category
|
|
23
25
|
})]
|
|
24
|
-
}), /* @__PURE__ */
|
|
26
|
+
}), /* @__PURE__ */ i("div", {
|
|
25
27
|
className: "flex items-center gap-3 ml-4",
|
|
26
|
-
children: [/* @__PURE__ */
|
|
28
|
+
children: [/* @__PURE__ */ r("div", {
|
|
27
29
|
className: "w-20",
|
|
28
|
-
children: /* @__PURE__ */
|
|
30
|
+
children: /* @__PURE__ */ r("div", {
|
|
29
31
|
className: "h-2 rounded-full bg-bg-sunken",
|
|
30
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ r("div", {
|
|
31
33
|
className: `h-full rounded-full transition-all duration-300 ${s}`,
|
|
32
|
-
style: { width: `${
|
|
34
|
+
style: { width: `${a}%` }
|
|
33
35
|
})
|
|
34
36
|
})
|
|
35
|
-
}), /* @__PURE__ */
|
|
36
|
-
className: "text-sm font-semibold w-12 text-right text-primary",
|
|
37
|
-
children:
|
|
37
|
+
}), /* @__PURE__ */ r("span", {
|
|
38
|
+
className: "text-sm font-semibold w-12 text-right text-primary tabular-nums",
|
|
39
|
+
children: e.count
|
|
38
40
|
})]
|
|
39
41
|
})]
|
|
40
|
-
},
|
|
42
|
+
}, e.category);
|
|
41
43
|
})
|
|
42
44
|
})]
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
//#endregion
|
|
46
|
-
export {
|
|
48
|
+
export { a as CategoryBreakdown };
|
|
47
49
|
|
|
48
50
|
//# sourceMappingURL=CategoryBreakdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryBreakdown.js","names":[],"sources":["../../../../src/support/components/analytics/CategoryBreakdown.tsx"],"sourcesContent":["import { FolderOpen } from 'lucide-react';\nimport { analyticsSeriesClasses } from '../../utils/uiTokens';\n\ninterface CategoryCount {\n category: string;\n count: number;\n}\n\ninterface CategoryBreakdownProps {\n data: CategoryCount[];\n}\n\nexport function CategoryBreakdown({ data }: CategoryBreakdownProps) {\n const total = data.reduce((sum, item) => sum + item.count, 0);\n const topCategories = data.slice(0, 8);\n\n return (\n <
|
|
1
|
+
{"version":3,"file":"CategoryBreakdown.js","names":[],"sources":["../../../../src/support/components/analytics/CategoryBreakdown.tsx"],"sourcesContent":["import { FolderOpen } from 'lucide-react';\nimport { analyticsSeriesClasses } from '../../utils/uiTokens';\nimport { GlassCard } from '../ui';\n\ninterface CategoryCount {\n category: string;\n count: number;\n}\n\ninterface CategoryBreakdownProps {\n data: CategoryCount[];\n}\n\nexport function CategoryBreakdown({ data }: CategoryBreakdownProps) {\n const total = data.reduce((sum, item) => sum + item.count, 0);\n const topCategories = data.slice(0, 8);\n\n return (\n <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <h2 className=\"text-xl font-semibold mb-4 flex items-center gap-2 text-primary\">\n <FolderOpen size={20} />\n Top Categories\n </h2>\n\n <div className=\"space-y-3\">\n {topCategories.map((item, index) => {\n const percentage = total > 0 ? (item.count / total) * 100 : 0;\n const colorClass = analyticsSeriesClasses[index % analyticsSeriesClasses.length];\n\n return (\n <div\n key={item.category}\n className=\"flex items-center justify-between transition-colors duration-200 hover:bg-bg-sunken/50 p-1 rounded\"\n >\n <div className=\"flex items-center gap-2 flex-1\">\n <div className={`w-3 h-3 rounded-full flex-shrink-0 ${colorClass}`} />\n <span className=\"text-sm truncate text-primary\">{item.category}</span>\n </div>\n <div className=\"flex items-center gap-3 ml-4\">\n <div className=\"w-20\">\n <div className=\"h-2 rounded-full bg-bg-sunken\">\n <div\n className={`h-full rounded-full transition-all duration-300 ${colorClass}`}\n style={{\n width: `${percentage}%`,\n }}\n />\n </div>\n </div>\n <span className=\"text-sm font-semibold w-12 text-right text-primary tabular-nums\">\n {item.count}\n </span>\n </div>\n </div>\n );\n })}\n </div>\n </GlassCard>\n );\n}\n"],"mappings":";;;;;AAaA,SAAgB,EAAkB,EAAE,WAAgC;CAClE,IAAM,IAAQ,EAAK,QAAQ,GAAK,MAAS,IAAM,EAAK,OAAO,EAAE,EACvD,IAAgB,EAAK,MAAM,GAAG,EAAE;AAEtC,QACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAU;YAFZ,CAIE,kBAAC,MAAD;GAAI,WAAU;aAAd,CACE,kBAAC,GAAD,EAAY,MAAM,IAAM,CAAA,EAAA,iBAErB;MAEL,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAc,KAAK,GAAM,MAAU;IAClC,IAAM,IAAa,IAAQ,IAAK,EAAK,QAAQ,IAAS,MAAM,GACtD,IAAa,EAAuB,IAAQ,EAAuB;AAEzE,WACE,kBAAC,OAAD;KAEE,WAAU;eAFZ,CAIE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,OAAD,EAAK,WAAW,sCAAsC,KAAgB,CAAA,EACtE,kBAAC,QAAD;OAAM,WAAU;iBAAiC,EAAK;OAAgB,CAAA,CAClE;SACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,OAAD;OAAK,WAAU;iBACb,kBAAC,OAAD;QAAK,WAAU;kBACb,kBAAC,OAAD;SACE,WAAW,mDAAmD;SAC9D,OAAO,EACL,OAAO,GAAG,EAAW,IACtB;SACD,CAAA;QACE,CAAA;OACF,CAAA,EACN,kBAAC,QAAD;OAAM,WAAU;iBACb,EAAK;OACD,CAAA,CACH;QACF;OAtBC,EAAK,SAsBN;KAER;GACE,CAAA,CACI"}
|
|
@@ -1,31 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GlassCard as e } from "../ui.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
3
|
//#region src/support/components/analytics/MetricCard.tsx
|
|
3
|
-
function
|
|
4
|
-
return /* @__PURE__ */
|
|
5
|
-
|
|
4
|
+
function r({ title: r, value: i, icon: a, iconColor: o, subtitle: s }) {
|
|
5
|
+
return /* @__PURE__ */ n(e, {
|
|
6
|
+
treatment: "metric",
|
|
7
|
+
className: "p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2",
|
|
6
8
|
children: [
|
|
7
|
-
/* @__PURE__ */
|
|
9
|
+
/* @__PURE__ */ n("div", {
|
|
8
10
|
className: "flex items-center justify-between mb-3",
|
|
9
|
-
children: [/* @__PURE__ */
|
|
11
|
+
children: [/* @__PURE__ */ t("span", {
|
|
10
12
|
className: "text-sm font-medium text-secondary",
|
|
11
|
-
children:
|
|
12
|
-
}), /* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
children: r
|
|
14
|
+
}), /* @__PURE__ */ t("span", {
|
|
15
|
+
className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-accent-soft",
|
|
16
|
+
children: /* @__PURE__ */ t(a, {
|
|
17
|
+
size: 20,
|
|
18
|
+
className: o
|
|
19
|
+
})
|
|
15
20
|
})]
|
|
16
21
|
}),
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
className: "text-3xl font-bold mb-1 text-primary",
|
|
19
|
-
children:
|
|
22
|
+
/* @__PURE__ */ t("p", {
|
|
23
|
+
className: "text-3xl font-bold mb-1 text-primary tabular-nums",
|
|
24
|
+
children: i
|
|
20
25
|
}),
|
|
21
|
-
|
|
26
|
+
s && /* @__PURE__ */ t("p", {
|
|
22
27
|
className: "text-xs text-tertiary",
|
|
23
|
-
children:
|
|
28
|
+
children: s
|
|
24
29
|
})
|
|
25
30
|
]
|
|
26
31
|
});
|
|
27
32
|
}
|
|
28
33
|
//#endregion
|
|
29
|
-
export {
|
|
34
|
+
export { r as MetricCard };
|
|
30
35
|
|
|
31
36
|
//# sourceMappingURL=MetricCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricCard.js","names":[],"sources":["../../../../src/support/components/analytics/MetricCard.tsx"],"sourcesContent":["import { LucideIcon } from 'lucide-react';\n\ninterface MetricCardProps {\n title: string;\n value: string;\n icon: LucideIcon;\n iconColor: string;\n subtitle?: string;\n}\n\nexport function MetricCard({ title, value, icon: Icon, iconColor, subtitle }: MetricCardProps) {\n return (\n <
|
|
1
|
+
{"version":3,"file":"MetricCard.js","names":[],"sources":["../../../../src/support/components/analytics/MetricCard.tsx"],"sourcesContent":["import { LucideIcon } from 'lucide-react';\nimport { GlassCard } from '../ui';\n\ninterface MetricCardProps {\n title: string;\n value: string;\n icon: LucideIcon;\n iconColor: string;\n subtitle?: string;\n}\n\nexport function MetricCard({ title, value, icon: Icon, iconColor, subtitle }: MetricCardProps) {\n return (\n <GlassCard\n treatment=\"metric\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <div className=\"flex items-center justify-between mb-3\">\n <span className=\"text-sm font-medium text-secondary\">{title}</span>\n <span className=\"flex size-9 shrink-0 items-center justify-center rounded-lg bg-accent-soft\">\n <Icon size={20} className={iconColor} />\n </span>\n </div>\n <p className=\"text-3xl font-bold mb-1 text-primary tabular-nums\">{value}</p>\n {subtitle && <p className=\"text-xs text-tertiary\">{subtitle}</p>}\n </GlassCard>\n );\n}\n"],"mappings":";;;AAWA,SAAgB,EAAW,EAAE,UAAO,UAAO,MAAM,GAAM,cAAW,eAA6B;AAC7F,QACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAU;YAFZ;GAIE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,QAAD;KAAM,WAAU;eAAsC;KAAa,CAAA,EACnE,kBAAC,QAAD;KAAM,WAAU;eACd,kBAAC,GAAD;MAAM,MAAM;MAAI,WAAW;MAAa,CAAA;KACnC,CAAA,CACH;;GACN,kBAAC,KAAD;IAAG,WAAU;cAAqD;IAAU,CAAA;GAC3E,KAAY,kBAAC,KAAD;IAAG,WAAU;cAAyB;IAAa,CAAA;GACtD"}
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { GlassCard as e } from "../ui.js";
|
|
2
|
+
import { ticketPriorityDotClasses as t } from "../../utils/uiTokens.js";
|
|
3
|
+
import { AlertCircle as n } from "lucide-react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
5
|
//#region src/support/components/analytics/PriorityBreakdown.tsx
|
|
5
|
-
var
|
|
6
|
-
...
|
|
7
|
-
URGENT:
|
|
8
|
-
MEDIUM:
|
|
6
|
+
var a = {
|
|
7
|
+
...t,
|
|
8
|
+
URGENT: t.CRITICAL,
|
|
9
|
+
MEDIUM: t.NORMAL
|
|
9
10
|
};
|
|
10
|
-
function
|
|
11
|
-
let
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
function o({ data: t }) {
|
|
12
|
+
let o = t.reduce((e, t) => e + t.count, 0);
|
|
13
|
+
return /* @__PURE__ */ i(e, {
|
|
14
|
+
treatment: "insight",
|
|
15
|
+
className: "p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2",
|
|
16
|
+
children: [/* @__PURE__ */ i("h2", {
|
|
15
17
|
className: "text-xl font-semibold mb-4 flex items-center gap-2 text-primary",
|
|
16
|
-
children: [/* @__PURE__ */ n
|
|
17
|
-
}), /* @__PURE__ */
|
|
18
|
+
children: [/* @__PURE__ */ r(n, { size: 20 }), "Tickets by Priority"]
|
|
19
|
+
}), /* @__PURE__ */ r("div", {
|
|
18
20
|
className: "space-y-4",
|
|
19
|
-
children:
|
|
20
|
-
let t =
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
children: t.map((e) => {
|
|
22
|
+
let t = o > 0 ? e.count / o * 100 : 0, n = a[e.priority] || "bg-muted-foreground";
|
|
23
|
+
return /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ i("div", {
|
|
22
24
|
className: "flex items-center justify-between mb-2",
|
|
23
|
-
children: [/* @__PURE__ */
|
|
25
|
+
children: [/* @__PURE__ */ i("div", {
|
|
24
26
|
className: "flex items-center gap-2",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ r("div", { className: `w-3 h-3 rounded-full ${n}` }), /* @__PURE__ */ r("span", {
|
|
26
28
|
className: "font-medium text-primary",
|
|
27
29
|
children: e.priority
|
|
28
30
|
})]
|
|
29
|
-
}), /* @__PURE__ */
|
|
31
|
+
}), /* @__PURE__ */ i("div", {
|
|
30
32
|
className: "flex items-center gap-2",
|
|
31
|
-
children: [/* @__PURE__ */
|
|
32
|
-
className: "text-sm text-tertiary",
|
|
33
|
+
children: [/* @__PURE__ */ i("span", {
|
|
34
|
+
className: "text-sm text-tertiary tabular-nums",
|
|
33
35
|
children: [t.toFixed(0), "%"]
|
|
34
|
-
}), /* @__PURE__ */
|
|
35
|
-
className: "font-semibold text-primary",
|
|
36
|
+
}), /* @__PURE__ */ r("span", {
|
|
37
|
+
className: "font-semibold text-primary tabular-nums",
|
|
36
38
|
children: e.count
|
|
37
39
|
})]
|
|
38
40
|
})]
|
|
39
|
-
}), /* @__PURE__ */
|
|
41
|
+
}), /* @__PURE__ */ r("div", {
|
|
40
42
|
className: "h-2 rounded-full bg-bg-sunken",
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
-
className: `h-full rounded-full transition-all duration-300 ${
|
|
43
|
+
children: /* @__PURE__ */ r("div", {
|
|
44
|
+
className: `h-full rounded-full transition-all duration-300 ${n}`,
|
|
43
45
|
style: { width: `${t}%` },
|
|
44
46
|
"data-priority": e.priority
|
|
45
47
|
})
|
|
@@ -49,6 +51,6 @@ function a({ data: e }) {
|
|
|
49
51
|
});
|
|
50
52
|
}
|
|
51
53
|
//#endregion
|
|
52
|
-
export {
|
|
54
|
+
export { o as PriorityBreakdown };
|
|
53
55
|
|
|
54
56
|
//# sourceMappingURL=PriorityBreakdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PriorityBreakdown.js","names":[],"sources":["../../../../src/support/components/analytics/PriorityBreakdown.tsx"],"sourcesContent":["import { AlertCircle } from 'lucide-react';\nimport { ticketPriorityDotClasses } from '../../utils/uiTokens';\n\ninterface PriorityCount {\n priority: string;\n count: number;\n}\n\ninterface PriorityBreakdownProps {\n data: PriorityCount[];\n}\n\nconst priorityColors: Record<string, string> = {\n ...ticketPriorityDotClasses,\n URGENT: ticketPriorityDotClasses.CRITICAL,\n MEDIUM: ticketPriorityDotClasses.NORMAL,\n};\n\nexport function PriorityBreakdown({ data }: PriorityBreakdownProps) {\n const total = data.reduce((sum, item) => sum + item.count, 0);\n\n return (\n <
|
|
1
|
+
{"version":3,"file":"PriorityBreakdown.js","names":[],"sources":["../../../../src/support/components/analytics/PriorityBreakdown.tsx"],"sourcesContent":["import { AlertCircle } from 'lucide-react';\nimport { ticketPriorityDotClasses } from '../../utils/uiTokens';\nimport { GlassCard } from '../ui';\n\ninterface PriorityCount {\n priority: string;\n count: number;\n}\n\ninterface PriorityBreakdownProps {\n data: PriorityCount[];\n}\n\nconst priorityColors: Record<string, string> = {\n ...ticketPriorityDotClasses,\n URGENT: ticketPriorityDotClasses.CRITICAL,\n MEDIUM: ticketPriorityDotClasses.NORMAL,\n};\n\nexport function PriorityBreakdown({ data }: PriorityBreakdownProps) {\n const total = data.reduce((sum, item) => sum + item.count, 0);\n\n return (\n <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <h2 className=\"text-xl font-semibold mb-4 flex items-center gap-2 text-primary\">\n <AlertCircle size={20} />\n Tickets by Priority\n </h2>\n\n <div className=\"space-y-4\">\n {data.map((item) => {\n const percentage = total > 0 ? (item.count / total) * 100 : 0;\n const colorClass = priorityColors[item.priority] || 'bg-muted-foreground';\n\n return (\n <div key={item.priority}>\n <div className=\"flex items-center justify-between mb-2\">\n <div className=\"flex items-center gap-2\">\n <div className={`w-3 h-3 rounded-full ${colorClass}`} />\n <span className=\"font-medium text-primary\">{item.priority}</span>\n </div>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm text-tertiary tabular-nums\">\n {percentage.toFixed(0)}%\n </span>\n <span className=\"font-semibold text-primary tabular-nums\">{item.count}</span>\n </div>\n </div>\n <div className=\"h-2 rounded-full bg-bg-sunken\">\n <div\n className={`h-full rounded-full transition-all duration-300 ${colorClass}`}\n style={{\n width: `${percentage}%`,\n }}\n data-priority={item.priority}\n />\n </div>\n </div>\n );\n })}\n </div>\n </GlassCard>\n );\n}\n"],"mappings":";;;;;AAaA,IAAM,IAAyC;CAC7C,GAAG;CACH,QAAQ,EAAyB;CACjC,QAAQ,EAAyB;CAClC;AAED,SAAgB,EAAkB,EAAE,WAAgC;CAClE,IAAM,IAAQ,EAAK,QAAQ,GAAK,MAAS,IAAM,EAAK,OAAO,EAAE;AAE7D,QACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAU;YAFZ,CAIE,kBAAC,MAAD;GAAI,WAAU;aAAd,CACE,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA,EAAA,sBAEtB;MAEL,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAK,KAAK,MAAS;IAClB,IAAM,IAAa,IAAQ,IAAK,EAAK,QAAQ,IAAS,MAAM,GACtD,IAAa,EAAe,EAAK,aAAa;AAEpD,WACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,OAAD,EAAK,WAAW,wBAAwB,KAAgB,CAAA,EACxD,kBAAC,QAAD;OAAM,WAAU;iBAA4B,EAAK;OAAgB,CAAA,CAC7D;SACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,QAAD;OAAM,WAAU;iBAAhB,CACG,EAAW,QAAQ,EAAE,EAAC,IAClB;UACP,kBAAC,QAAD;OAAM,WAAU;iBAA2C,EAAK;OAAa,CAAA,CACzE;QACF;QACN,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,OAAD;MACE,WAAW,mDAAmD;MAC9D,OAAO,EACL,OAAO,GAAG,EAAW,IACtB;MACD,iBAAe,EAAK;MACpB,CAAA;KACE,CAAA,CACF,EAAA,EAtBI,EAAK,SAsBT;KAER;GACE,CAAA,CACI"}
|
|
@@ -1,101 +1,103 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { GlassCard as e } from "../ui.js";
|
|
2
|
+
import { AlertTriangle as t, Shield as n } from "lucide-react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
3
4
|
//#region src/support/components/analytics/SLAReport.tsx
|
|
4
|
-
function
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
-
|
|
5
|
+
function a({ report: a }) {
|
|
6
|
+
return /* @__PURE__ */ i(e, {
|
|
7
|
+
treatment: "insight",
|
|
8
|
+
className: "p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2",
|
|
7
9
|
children: [
|
|
8
|
-
/* @__PURE__ */
|
|
10
|
+
/* @__PURE__ */ i("h2", {
|
|
9
11
|
className: "text-xl font-semibold mb-4 flex items-center gap-2 text-primary",
|
|
10
|
-
children: [/* @__PURE__ */ n
|
|
12
|
+
children: [/* @__PURE__ */ r(n, { size: 20 }), "SLA Compliance Report"]
|
|
11
13
|
}),
|
|
12
|
-
/* @__PURE__ */
|
|
14
|
+
/* @__PURE__ */ i("div", {
|
|
13
15
|
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",
|
|
14
16
|
children: [
|
|
15
|
-
/* @__PURE__ */
|
|
17
|
+
/* @__PURE__ */ i("div", {
|
|
16
18
|
className: "p-4 rounded-lg bg-bg-sunken transition-colors duration-200",
|
|
17
19
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ r("p", {
|
|
19
21
|
className: "text-xs font-medium mb-1 text-tertiary",
|
|
20
22
|
children: "First Response"
|
|
21
23
|
}),
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
className: `text-2xl font-bold ${
|
|
24
|
-
children: [
|
|
24
|
+
/* @__PURE__ */ i("p", {
|
|
25
|
+
className: `text-2xl font-bold tabular-nums ${a.firstResponseCompliance >= 90 ? "text-success" : "text-warning"}`,
|
|
26
|
+
children: [a.firstResponseCompliance.toFixed(1), "%"]
|
|
25
27
|
}),
|
|
26
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ i("p", {
|
|
27
29
|
className: "text-xs mt-1 text-tertiary",
|
|
28
30
|
children: [
|
|
29
31
|
"Avg: ",
|
|
30
|
-
(
|
|
32
|
+
(a.avgFirstResponseTime / 60).toFixed(1),
|
|
31
33
|
"h"
|
|
32
34
|
]
|
|
33
35
|
})
|
|
34
36
|
]
|
|
35
37
|
}),
|
|
36
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ i("div", {
|
|
37
39
|
className: "p-4 rounded-lg bg-bg-sunken transition-colors duration-200",
|
|
38
40
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ r("p", {
|
|
40
42
|
className: "text-xs font-medium mb-1 text-tertiary",
|
|
41
43
|
children: "Resolution"
|
|
42
44
|
}),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
className: `text-2xl font-bold ${
|
|
45
|
-
children: [
|
|
45
|
+
/* @__PURE__ */ i("p", {
|
|
46
|
+
className: `text-2xl font-bold tabular-nums ${a.resolutionCompliance >= 90 ? "text-success" : "text-warning"}`,
|
|
47
|
+
children: [a.resolutionCompliance.toFixed(1), "%"]
|
|
46
48
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ i("p", {
|
|
48
50
|
className: "text-xs mt-1 text-tertiary",
|
|
49
51
|
children: [
|
|
50
52
|
"Avg: ",
|
|
51
|
-
(
|
|
53
|
+
(a.avgResolutionTime / 60).toFixed(1),
|
|
52
54
|
"h"
|
|
53
55
|
]
|
|
54
56
|
})
|
|
55
57
|
]
|
|
56
58
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ i("div", {
|
|
58
60
|
className: "p-4 rounded-lg bg-bg-sunken transition-colors duration-200",
|
|
59
|
-
children: [/* @__PURE__ */
|
|
61
|
+
children: [/* @__PURE__ */ r("p", {
|
|
60
62
|
className: "text-xs font-medium mb-1 text-tertiary",
|
|
61
63
|
children: "Total Tickets"
|
|
62
|
-
}), /* @__PURE__ */
|
|
64
|
+
}), /* @__PURE__ */ r("p", {
|
|
63
65
|
className: "text-2xl font-bold text-primary",
|
|
64
|
-
children:
|
|
66
|
+
children: a.totalTickets
|
|
65
67
|
})]
|
|
66
68
|
}),
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
className: `p-4 rounded-lg flex items-center gap-2 transition-colors duration-200 ${
|
|
69
|
-
children: [/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ i("div", {
|
|
70
|
+
className: `p-4 rounded-lg flex items-center gap-2 transition-colors duration-200 ${a.breachedTickets > 0 ? "bg-error/10" : "bg-bg-sunken"}`,
|
|
71
|
+
children: [/* @__PURE__ */ r(t, {
|
|
70
72
|
size: 20,
|
|
71
|
-
className:
|
|
72
|
-
}), /* @__PURE__ */
|
|
73
|
+
className: a.breachedTickets > 0 ? "text-error" : "text-tertiary"
|
|
74
|
+
}), /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("p", {
|
|
73
75
|
className: "text-xs font-medium text-tertiary",
|
|
74
76
|
children: "Breached"
|
|
75
|
-
}), /* @__PURE__ */
|
|
76
|
-
className: `text-2xl font-bold ${
|
|
77
|
-
children:
|
|
77
|
+
}), /* @__PURE__ */ r("p", {
|
|
78
|
+
className: `text-2xl font-bold ${a.breachedTickets > 0 ? "text-error" : "text-primary"}`,
|
|
79
|
+
children: a.breachedTickets
|
|
78
80
|
})] })]
|
|
79
81
|
})
|
|
80
82
|
]
|
|
81
83
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("h3", {
|
|
83
85
|
className: "text-sm font-semibold mb-3 text-secondary",
|
|
84
86
|
children: "Compliance by Priority"
|
|
85
|
-
}), /* @__PURE__ */
|
|
87
|
+
}), /* @__PURE__ */ r("div", {
|
|
86
88
|
className: "space-y-2",
|
|
87
|
-
children:
|
|
89
|
+
children: a.byPriority.map((e) => /* @__PURE__ */ i("div", {
|
|
88
90
|
className: "flex items-center justify-between py-2 px-3 rounded bg-bg-sunken transition-colors duration-200 hover:bg-bg-sunken/80",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ i("div", {
|
|
90
92
|
className: "flex items-center gap-3",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
93
|
+
children: [/* @__PURE__ */ r("span", {
|
|
92
94
|
className: "text-sm font-medium text-primary",
|
|
93
95
|
children: e.priority
|
|
94
|
-
}), /* @__PURE__ */
|
|
96
|
+
}), /* @__PURE__ */ i("span", {
|
|
95
97
|
className: "text-xs text-tertiary",
|
|
96
98
|
children: [e.tickets, " tickets"]
|
|
97
99
|
})]
|
|
98
|
-
}), /* @__PURE__ */
|
|
100
|
+
}), /* @__PURE__ */ i("span", {
|
|
99
101
|
className: `text-sm font-semibold ${e.compliance >= 90 ? "text-success" : e.compliance >= 70 ? "text-warning" : "text-error"}`,
|
|
100
102
|
children: [e.compliance.toFixed(1), "%"]
|
|
101
103
|
})]
|
|
@@ -105,6 +107,6 @@ function i({ report: i }) {
|
|
|
105
107
|
});
|
|
106
108
|
}
|
|
107
109
|
//#endregion
|
|
108
|
-
export {
|
|
110
|
+
export { a as SLAReport };
|
|
109
111
|
|
|
110
112
|
//# sourceMappingURL=SLAReport.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SLAReport.js","names":[],"sources":["../../../../src/support/components/analytics/SLAReport.tsx"],"sourcesContent":["import { Shield, AlertTriangle } from 'lucide-react';\n\ninterface SLAComplianceByPriority {\n priority: string;\n tickets: number;\n compliance: number;\n}\n\ninterface SLAReportProps {\n report: {\n period: {\n startDate: string;\n endDate: string;\n label: string;\n };\n totalTickets: number;\n firstResponseCompliance: number;\n resolutionCompliance: number;\n avgFirstResponseTime: number;\n avgResolutionTime: number;\n breachedTickets: number;\n byPriority: SLAComplianceByPriority[];\n };\n}\n\nexport function SLAReport({ report }: SLAReportProps) {\n return (\n <
|
|
1
|
+
{"version":3,"file":"SLAReport.js","names":[],"sources":["../../../../src/support/components/analytics/SLAReport.tsx"],"sourcesContent":["import { Shield, AlertTriangle } from 'lucide-react';\nimport { GlassCard } from '../ui';\n\ninterface SLAComplianceByPriority {\n priority: string;\n tickets: number;\n compliance: number;\n}\n\ninterface SLAReportProps {\n report: {\n period: {\n startDate: string;\n endDate: string;\n label: string;\n };\n totalTickets: number;\n firstResponseCompliance: number;\n resolutionCompliance: number;\n avgFirstResponseTime: number;\n avgResolutionTime: number;\n breachedTickets: number;\n byPriority: SLAComplianceByPriority[];\n };\n}\n\nexport function SLAReport({ report }: SLAReportProps) {\n return (\n <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <h2 className=\"text-xl font-semibold mb-4 flex items-center gap-2 text-primary\">\n <Shield size={20} />\n SLA Compliance Report\n </h2>\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6\">\n <div className=\"p-4 rounded-lg bg-bg-sunken transition-colors duration-200\">\n <p className=\"text-xs font-medium mb-1 text-tertiary\">First Response</p>\n <p\n className={`text-2xl font-bold tabular-nums ${\n report.firstResponseCompliance >= 90 ? 'text-success' : 'text-warning'\n }`}\n >\n {report.firstResponseCompliance.toFixed(1)}%\n </p>\n <p className=\"text-xs mt-1 text-tertiary\">\n Avg: {(report.avgFirstResponseTime / 60).toFixed(1)}h\n </p>\n </div>\n\n <div className=\"p-4 rounded-lg bg-bg-sunken transition-colors duration-200\">\n <p className=\"text-xs font-medium mb-1 text-tertiary\">Resolution</p>\n <p\n className={`text-2xl font-bold tabular-nums ${\n report.resolutionCompliance >= 90 ? 'text-success' : 'text-warning'\n }`}\n >\n {report.resolutionCompliance.toFixed(1)}%\n </p>\n <p className=\"text-xs mt-1 text-tertiary\">\n Avg: {(report.avgResolutionTime / 60).toFixed(1)}h\n </p>\n </div>\n\n <div className=\"p-4 rounded-lg bg-bg-sunken transition-colors duration-200\">\n <p className=\"text-xs font-medium mb-1 text-tertiary\">Total Tickets</p>\n <p className=\"text-2xl font-bold text-primary\">{report.totalTickets}</p>\n </div>\n\n <div\n className={`p-4 rounded-lg flex items-center gap-2 transition-colors duration-200 ${\n report.breachedTickets > 0 ? 'bg-error/10' : 'bg-bg-sunken'\n }`}\n >\n <AlertTriangle\n size={20}\n className={report.breachedTickets > 0 ? 'text-error' : 'text-tertiary'}\n />\n <div>\n <p className=\"text-xs font-medium text-tertiary\">Breached</p>\n <p\n className={`text-2xl font-bold ${\n report.breachedTickets > 0 ? 'text-error' : 'text-primary'\n }`}\n >\n {report.breachedTickets}\n </p>\n </div>\n </div>\n </div>\n\n <div>\n <h3 className=\"text-sm font-semibold mb-3 text-secondary\">Compliance by Priority</h3>\n <div className=\"space-y-2\">\n {report.byPriority.map((item) => (\n <div\n key={item.priority}\n className=\"flex items-center justify-between py-2 px-3 rounded bg-bg-sunken transition-colors duration-200 hover:bg-bg-sunken/80\"\n >\n <div className=\"flex items-center gap-3\">\n <span className=\"text-sm font-medium text-primary\">{item.priority}</span>\n <span className=\"text-xs text-tertiary\">{item.tickets} tickets</span>\n </div>\n <span\n className={`text-sm font-semibold ${\n item.compliance >= 90\n ? 'text-success'\n : item.compliance >= 70\n ? 'text-warning'\n : 'text-error'\n }`}\n >\n {item.compliance.toFixed(1)}%\n </span>\n </div>\n ))}\n </div>\n </div>\n </GlassCard>\n );\n}\n"],"mappings":";;;;AA0BA,SAAgB,EAAU,EAAE,aAA0B;AACpD,QACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAU;YAFZ;GAIE,kBAAC,MAAD;IAAI,WAAU;cAAd,CACE,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA,EAAA,wBAEjB;;GAEL,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,OAAD;MAAK,WAAU;gBAAf;OACE,kBAAC,KAAD;QAAG,WAAU;kBAAyC;QAAkB,CAAA;OACxE,kBAAC,KAAD;QACE,WAAW,mCACT,EAAO,2BAA2B,KAAK,iBAAiB;kBAF5D,CAKG,EAAO,wBAAwB,QAAQ,EAAE,EAAC,IACzC;;OACJ,kBAAC,KAAD;QAAG,WAAU;kBAAb;SAA0C;UACjC,EAAO,uBAAuB,IAAI,QAAQ,EAAE;SAAC;SAClD;;OACA;;KAEN,kBAAC,OAAD;MAAK,WAAU;gBAAf;OACE,kBAAC,KAAD;QAAG,WAAU;kBAAyC;QAAc,CAAA;OACpE,kBAAC,KAAD;QACE,WAAW,mCACT,EAAO,wBAAwB,KAAK,iBAAiB;kBAFzD,CAKG,EAAO,qBAAqB,QAAQ,EAAE,EAAC,IACtC;;OACJ,kBAAC,KAAD;QAAG,WAAU;kBAAb;SAA0C;UACjC,EAAO,oBAAoB,IAAI,QAAQ,EAAE;SAAC;SAC/C;;OACA;;KAEN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,KAAD;OAAG,WAAU;iBAAyC;OAAiB,CAAA,EACvE,kBAAC,KAAD;OAAG,WAAU;iBAAmC,EAAO;OAAiB,CAAA,CACpE;;KAEN,kBAAC,OAAD;MACE,WAAW,yEACT,EAAO,kBAAkB,IAAI,gBAAgB;gBAFjD,CAKE,kBAAC,GAAD;OACE,MAAM;OACN,WAAW,EAAO,kBAAkB,IAAI,eAAe;OACvD,CAAA,EACF,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;OAAG,WAAU;iBAAoC;OAAY,CAAA,EAC7D,kBAAC,KAAD;OACE,WAAW,sBACT,EAAO,kBAAkB,IAAI,eAAe;iBAG7C,EAAO;OACN,CAAA,CACA,EAAA,CAAA,CACF;;KACF;;GAEN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;cAA4C;IAA2B,CAAA,EACrF,kBAAC,OAAD;IAAK,WAAU;cACZ,EAAO,WAAW,KAAK,MACtB,kBAAC,OAAD;KAEE,WAAU;eAFZ,CAIE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,QAAD;OAAM,WAAU;iBAAoC,EAAK;OAAgB,CAAA,EACzE,kBAAC,QAAD;OAAM,WAAU;iBAAhB,CAAyC,EAAK,SAAQ,WAAe;SACjE;SACN,kBAAC,QAAD;MACE,WAAW,yBACT,EAAK,cAAc,KACf,iBACA,EAAK,cAAc,KACjB,iBACA;gBANV,CASG,EAAK,WAAW,QAAQ,EAAE,EAAC,IACvB;QACH;OAlBC,EAAK,SAkBN,CACN;IACE,CAAA,CACF,EAAA,CAAA;GACI"}
|