@burdenoff/microfe-support 2026.625.1 → 2026.626.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/PageLayout.js +64 -51
- package/dist/support/components/PageLayout.js.map +1 -1
- package/dist/support/components/ui.js +2 -2
- package/dist/support/pages/AnalyticsPage.js +145 -114
- package/dist/support/pages/AnalyticsPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +180 -143
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailUserPage.js +56 -49
- package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +51 -61
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +225 -205
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateArticlePage.js +50 -46
- package/dist/support/pages/CreateArticlePage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.js +122 -116
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/EditArticlePage.js +76 -80
- package/dist/support/pages/EditArticlePage.js.map +1 -1
- package/dist/support/pages/JobApplicationDetailPage.js +292 -269
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +53 -63
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.js +84 -81
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +79 -76
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/SettingsPage.js +215 -182
- package/dist/support/pages/SettingsPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js +159 -129
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
- package/dist/support/pages/TicketDetailUserPage.js +175 -142
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.js +173 -169
- package/dist/support/pages/TicketListPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { cn as e } from "../utils/cn.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
import { AuroraBackground as i, GradientText as a, IllustratedEmptyState as o } from "@burdenoff/fe-libs/ui";
|
|
3
4
|
//#region src/support/components/PageLayout.tsx
|
|
4
|
-
var
|
|
5
|
+
var s = {
|
|
5
6
|
sm: "max-w-screen-sm",
|
|
6
7
|
md: "max-w-screen-md",
|
|
7
8
|
lg: "max-w-screen-lg",
|
|
@@ -10,78 +11,90 @@ var r = {
|
|
|
10
11
|
"3xl": "max-w-[1600px]",
|
|
11
12
|
full: "max-w-full"
|
|
12
13
|
};
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
function c({ children: o, title: c, subtitle: l, icon: u, headerActions: d, headerContent: f, maxWidth: p = "xl", showHeader: m = !0, className: h, contentClassName: g, aurora: _ = !1, titleAccent: v }) {
|
|
15
|
+
let y = v && c && c.endsWith(v) ? c.slice(0, c.length - v.length) : null;
|
|
16
|
+
return /* @__PURE__ */ n("div", {
|
|
17
|
+
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", h),
|
|
18
|
+
children: /* @__PURE__ */ r("div", {
|
|
19
|
+
className: e("mx-auto w-full", s[p], g),
|
|
20
|
+
children: [m && (c || d) && /* @__PURE__ */ r("header", {
|
|
21
|
+
className: e("mb-6 sm:mb-8", _ && "relative overflow-hidden rounded-2xl border border-border-seam bg-bg-surface/40 p-4 sm:p-6 backdrop-blur-[var(--blur-glass)]"),
|
|
22
|
+
children: [
|
|
23
|
+
_ && /* @__PURE__ */ n(i, { intensity: "subtle" }),
|
|
24
|
+
/* @__PURE__ */ r("div", {
|
|
25
|
+
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
26
|
+
children: [/* @__PURE__ */ r("div", {
|
|
27
|
+
className: "space-y-1",
|
|
28
|
+
children: [(c || u) && /* @__PURE__ */ r("div", {
|
|
29
|
+
className: "flex items-center gap-3",
|
|
30
|
+
children: [u && /* @__PURE__ */ n("div", {
|
|
31
|
+
className: "flex-shrink-0 p-2.5 rounded-xl bg-action-primary-bg/10 text-primary",
|
|
32
|
+
children: u
|
|
33
|
+
}), c && /* @__PURE__ */ n("h1", {
|
|
34
|
+
className: "text-2xl sm:text-3xl font-bold tracking-tight text-text-primary",
|
|
35
|
+
children: y === null ? c : /* @__PURE__ */ r(t, { children: [y, /* @__PURE__ */ n(a, { children: v })] })
|
|
36
|
+
})]
|
|
37
|
+
}), l && /* @__PURE__ */ n("p", {
|
|
38
|
+
className: "text-sm sm:text-base text-text-secondary max-w-2xl",
|
|
39
|
+
children: l
|
|
32
40
|
})]
|
|
33
|
-
}),
|
|
34
|
-
className: "
|
|
35
|
-
children:
|
|
41
|
+
}), d && /* @__PURE__ */ n("div", {
|
|
42
|
+
className: "flex items-center gap-2 flex-shrink-0",
|
|
43
|
+
children: d
|
|
36
44
|
})]
|
|
37
|
-
}),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
})]
|
|
45
|
-
}), /* @__PURE__ */ t("div", {
|
|
45
|
+
}),
|
|
46
|
+
f && /* @__PURE__ */ n("div", {
|
|
47
|
+
className: "mt-4",
|
|
48
|
+
children: f
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
}), /* @__PURE__ */ n("div", {
|
|
46
52
|
className: "space-y-6",
|
|
47
|
-
children:
|
|
53
|
+
children: o
|
|
48
54
|
})]
|
|
49
55
|
})
|
|
50
56
|
});
|
|
51
57
|
}
|
|
52
|
-
function
|
|
53
|
-
return /* @__PURE__ */ n(
|
|
54
|
-
|
|
58
|
+
function l({ icon: t, illustration: i, illustrationAlt: a, title: s, description: c, action: l, className: u }) {
|
|
59
|
+
return i ? /* @__PURE__ */ n(o, {
|
|
60
|
+
illustration: i,
|
|
61
|
+
alt: a,
|
|
62
|
+
title: s,
|
|
63
|
+
description: c,
|
|
64
|
+
action: l,
|
|
65
|
+
className: e("animate-in fade-in-0 zoom-in-95 duration-200", u)
|
|
66
|
+
}) : /* @__PURE__ */ r("div", {
|
|
67
|
+
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", u),
|
|
55
68
|
children: [
|
|
56
|
-
|
|
69
|
+
t && /* @__PURE__ */ n("div", {
|
|
57
70
|
className: "mb-4 p-4 rounded-2xl bg-bg-sunken/50 text-text-secondary",
|
|
58
|
-
children:
|
|
71
|
+
children: t
|
|
59
72
|
}),
|
|
60
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ n("h3", {
|
|
61
74
|
className: "text-lg font-semibold text-text-primary mb-1",
|
|
62
|
-
children:
|
|
75
|
+
children: s
|
|
63
76
|
}),
|
|
64
|
-
|
|
77
|
+
c && /* @__PURE__ */ n("p", {
|
|
65
78
|
className: "text-sm text-text-secondary max-w-sm mb-4",
|
|
66
|
-
children:
|
|
79
|
+
children: c
|
|
67
80
|
}),
|
|
68
|
-
|
|
81
|
+
l
|
|
69
82
|
]
|
|
70
83
|
});
|
|
71
84
|
}
|
|
72
|
-
function
|
|
73
|
-
return /* @__PURE__ */
|
|
85
|
+
function u({ message: t = "Loading...", className: i }) {
|
|
86
|
+
return /* @__PURE__ */ r("div", {
|
|
74
87
|
className: e("flex flex-col items-center justify-center py-20", i),
|
|
75
|
-
children: [/* @__PURE__ */
|
|
88
|
+
children: [/* @__PURE__ */ r("div", {
|
|
76
89
|
className: "relative",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
78
|
-
}), /* @__PURE__ */
|
|
90
|
+
children: [/* @__PURE__ */ n("div", { className: "absolute inset-0 bg-action-primary-bg/20 rounded-full blur-xl animate-pulse" }), /* @__PURE__ */ n("div", { className: "relative size-12 border-4 border-primary/30 border-t-primary rounded-full animate-spin" })]
|
|
91
|
+
}), /* @__PURE__ */ n("span", {
|
|
79
92
|
className: "mt-6 text-sm font-medium text-text-secondary",
|
|
80
|
-
children:
|
|
93
|
+
children: t
|
|
81
94
|
})]
|
|
82
95
|
});
|
|
83
96
|
}
|
|
84
97
|
//#endregion
|
|
85
|
-
export {
|
|
98
|
+
export { l as EmptyState, u as LoadingState, c as PageLayout };
|
|
86
99
|
|
|
87
100
|
//# sourceMappingURL=PageLayout.js.map
|
|
@@ -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-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
|
|
1
|
+
{"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/support/components/PageLayout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { AuroraBackground, GradientText, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\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 * Boff UI 2.0 living-glass hero backdrop. When true, the header zone is wrapped\n * in a `relative overflow-hidden` container with a subtle drifting AuroraBackground\n * behind it (sits at -z-10, never moves content, reduced-motion safe). Reserve for\n * the MFE's primary landing page — ONE aurora per MFE.\n */\n aurora?: boolean;\n /**\n * When provided, the title is split so this trailing noun is rendered with a\n * brand GradientText fill (one hero heading accent per page). The remaining\n * leading text stays in the plain title colour.\n */\n titleAccent?: 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 aurora = false,\n titleAccent,\n}: PageLayoutProps) {\n // Split the title so the trailing accent noun can be gradient-filled while the\n // leading portion stays plain. Falls back to the full title when no accent or\n // when the accent isn't a trailing substring of the title.\n const accentLead =\n titleAccent && title && title.endsWith(titleAccent)\n ? title.slice(0, title.length - titleAccent.length)\n : null;\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\n className={cn(\n 'mb-6 sm:mb-8',\n // Living-glass hero backdrop: contain the aurora and give it room to breathe.\n aurora &&\n 'relative overflow-hidden rounded-2xl border border-border-seam bg-bg-surface/40 p-4 sm:p-6 backdrop-blur-[var(--blur-glass)]'\n )}\n >\n {aurora && <AuroraBackground intensity=\"subtle\" />}\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 {accentLead !== null ? (\n <>\n {accentLead}\n <GradientText>{titleAccent}</GradientText>\n </>\n ) : (\n title\n )}\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 illustration,\n illustrationAlt,\n title,\n description,\n action,\n className,\n}: {\n icon?: ReactNode;\n /**\n * Boff UI 2.0 on-brand illustration name (served by the host shell at\n * /illustrations/<name>.webp). When provided, the empty state renders the\n * richer IllustratedEmptyState instead of the plain icon variant. Reserve for\n * genuine zero/no-results states — keep gate/permission states on the icon.\n */\n illustration?: string;\n illustrationAlt?: string;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}) {\n if (illustration) {\n return (\n <IllustratedEmptyState\n illustration={illustration}\n alt={illustrationAlt}\n title={title}\n description={description}\n action={action}\n className={cn('animate-in fade-in-0 zoom-in-95 duration-200', className)}\n />\n );\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":";;;;AAuCA,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,qBACA,YAAS,IACT,kBACkB;CAIlB,IAAM,IACJ,KAAe,KAAS,EAAM,SAAS,EAAY,GAC/C,EAAM,MAAM,GAAG,EAAM,SAAS,EAAY,OAAO,GACjD;AACN,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;IACE,WAAW,EACT,gBAEA,KACE,+HACH;cANH;KAQG,KAAU,kBAAC,GAAD,EAAkB,WAAU,UAAW,CAAA;KAClD,kBAAC,OAAD;MAAK,WAAU;gBAAf,CAEE,kBAAC,OAAD;OAAK,WAAU;iBAAf,EACI,KAAS,MACT,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACG,KACC,kBAAC,OAAD;SAAK,WAAU;mBACZ;SACG,CAAA,EAEP,KACC,kBAAC,MAAD;SAAI,WAAU;mBACX,MAAe,OAMd,IALA,kBAAA,GAAA,EAAA,UAAA,CACG,GACD,kBAAC,GAAD,EAAA,UAAe,GAA2B,CAAA,CACzC,EAAA,CAAA;SAIF,CAAA,CAEH;WAEP,KACC,kBAAC,KAAD;QAAG,WAAU;kBAAsD;QAAa,CAAA,CAE9E;UAGL,KACC,kBAAC,OAAD;OAAK,WAAU;iBAAyC;OAAoB,CAAA,CAE1E;;KAGL,KAAiB,kBAAC,OAAD;MAAK,WAAU;gBAAQ;MAAoB,CAAA;KACtD;OAMX,kBAAC,OAAD;IAAK,WAAU;IAAa;IAAe,CAAA,CACvC;;EACF,CAAA;;AAOV,SAAgB,EAAW,EACzB,SACA,iBACA,oBACA,UACA,gBACA,WACA,gBAeC;AAaD,QAZI,IAEA,kBAAC,GAAD;EACgB;EACd,KAAK;EACE;EACM;EACL;EACR,WAAW,EAAG,gDAAgD,EAAU;EACxE,CAAA,GAIJ,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,2 +1,2 @@
|
|
|
1
|
-
import { Badge as e, Button as t, CTAOverflowMenu as n, EmphasisPanel as r, GlassCard as i, Input as a } from "@burdenoff/fe-libs/ui";
|
|
2
|
-
export { e as Badge, t as Button, n as CTAOverflowMenu, r as EmphasisPanel, i as GlassCard, a as Input };
|
|
1
|
+
import { Badge as e, Button as t, CTAOverflowMenu as n, EmphasisPanel as r, GlassCard as i, Input as a, NextSteps as o, PagePurpose as s } from "@burdenoff/fe-libs/ui";
|
|
2
|
+
export { e as Badge, t as Button, n as CTAOverflowMenu, r as EmphasisPanel, i as GlassCard, a as Input, o as NextSteps, s as PagePurpose };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { Button as e, EmphasisPanel as t } from "../components/ui.js";
|
|
2
|
-
import { EmptyState as
|
|
3
|
-
import { tWithFallback as
|
|
4
|
-
import { useAnalyticsOperations as
|
|
5
|
-
import { MetricCard as
|
|
6
|
-
import { TrendChart as
|
|
7
|
-
import { PriorityBreakdown as
|
|
8
|
-
import { CategoryBreakdown as
|
|
9
|
-
import { SLAReport as
|
|
10
|
-
import { TopAgents as
|
|
11
|
-
import { SatisfactionDistribution as
|
|
12
|
-
import { BarChart3 as
|
|
13
|
-
import { jsx as
|
|
14
|
-
import { useI18n as
|
|
1
|
+
import { Button as e, EmphasisPanel as t, NextSteps as n, PagePurpose as r } from "../components/ui.js";
|
|
2
|
+
import { EmptyState as i, LoadingState as a, PageLayout as o } from "../components/PageLayout.js";
|
|
3
|
+
import { tWithFallback as s } from "../utils/i18n.js";
|
|
4
|
+
import { useAnalyticsOperations as c } from "../hooks/useAnalyticsOperations.js";
|
|
5
|
+
import { MetricCard as l } from "../components/analytics/MetricCard.js";
|
|
6
|
+
import { TrendChart as u } from "../components/analytics/TrendChart.js";
|
|
7
|
+
import { PriorityBreakdown as d } from "../components/analytics/PriorityBreakdown.js";
|
|
8
|
+
import { CategoryBreakdown as f } from "../components/analytics/CategoryBreakdown.js";
|
|
9
|
+
import { SLAReport as p } from "../components/analytics/SLAReport.js";
|
|
10
|
+
import { TopAgents as m } from "../components/analytics/TopAgents.js";
|
|
11
|
+
import { SatisfactionDistribution as h } from "../components/analytics/SatisfactionDistribution.js";
|
|
12
|
+
import { BarChart3 as g, Calendar as _, CheckCircle as v, Clock as y, Download as b, ShieldAlert as x, ThumbsUp as S, TrendingUp as C } from "lucide-react";
|
|
13
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
14
|
+
import { useI18n as E } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
15
15
|
//#region src/support/pages/AnalyticsPage.tsx
|
|
16
|
-
function
|
|
16
|
+
function D(e) {
|
|
17
17
|
if (!e) return !1;
|
|
18
18
|
let t = String(e).toLowerCase();
|
|
19
19
|
return t.includes("forbidden") || t.includes("not authorized") || t.includes("permission denied") || t.includes("admin");
|
|
20
20
|
}
|
|
21
|
-
var
|
|
21
|
+
var O = [
|
|
22
22
|
{
|
|
23
23
|
value: "LAST_7_DAYS",
|
|
24
24
|
label: "Last 7 Days"
|
|
@@ -36,72 +36,72 @@ var E = [
|
|
|
36
36
|
label: "Last Year"
|
|
37
37
|
}
|
|
38
38
|
];
|
|
39
|
-
function
|
|
40
|
-
let { t:
|
|
41
|
-
if (
|
|
42
|
-
title:
|
|
43
|
-
subtitle:
|
|
44
|
-
icon: /* @__PURE__ */
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
icon: /* @__PURE__ */
|
|
47
|
-
title:
|
|
48
|
-
description:
|
|
39
|
+
function k() {
|
|
40
|
+
let { t: k } = E(), A = (e, t) => s(k, e, t), { analytics: j, trends: M, slaReport: N, satisfaction: P, agentLeaderboard: F, period: I, analyticsLoading: L, trendsLoading: R, updatePeriod: z, exportReport: B, analyticsError: V, slaReportError: H, satisfactionError: U } = c();
|
|
41
|
+
if (D(V) || D(H) || D(U)) return /* @__PURE__ */ w(o, {
|
|
42
|
+
title: A("support.analytics.title", "Support Analytics"),
|
|
43
|
+
subtitle: A("support.analytics.subtitle", "View support performance metrics"),
|
|
44
|
+
icon: /* @__PURE__ */ w(g, { size: 24 }),
|
|
45
|
+
children: /* @__PURE__ */ w(i, {
|
|
46
|
+
icon: /* @__PURE__ */ w(x, { size: 48 }),
|
|
47
|
+
title: A("support.analytics.adminRequired.title", "Admin Access Required"),
|
|
48
|
+
description: A("support.analytics.adminRequired.description", "You need administrator privileges to view support analytics. Please contact your workspace admin for access.")
|
|
49
49
|
})
|
|
50
50
|
});
|
|
51
|
-
if (
|
|
52
|
-
title:
|
|
53
|
-
subtitle:
|
|
54
|
-
icon: /* @__PURE__ */
|
|
55
|
-
children: /* @__PURE__ */
|
|
51
|
+
if (L || R) return /* @__PURE__ */ w(o, {
|
|
52
|
+
title: A("support.analytics.title", "Support Analytics"),
|
|
53
|
+
subtitle: A("support.analytics.loadingSubtitle", "Loading analytics data..."),
|
|
54
|
+
icon: /* @__PURE__ */ w(g, { size: 24 }),
|
|
55
|
+
children: /* @__PURE__ */ w(a, { message: A("support.analytics.loading", "Loading analytics...") })
|
|
56
56
|
});
|
|
57
|
-
if (!
|
|
58
|
-
title:
|
|
59
|
-
subtitle:
|
|
60
|
-
icon: /* @__PURE__ */
|
|
61
|
-
children: /* @__PURE__ */
|
|
62
|
-
|
|
63
|
-
title:
|
|
64
|
-
description:
|
|
57
|
+
if (!j || j.stats.totalTickets === 0) return /* @__PURE__ */ w(o, {
|
|
58
|
+
title: A("support.analytics.title", "Support Analytics"),
|
|
59
|
+
subtitle: A("support.analytics.subtitle", "View support performance metrics"),
|
|
60
|
+
icon: /* @__PURE__ */ w(g, { size: 24 }),
|
|
61
|
+
children: /* @__PURE__ */ w(i, {
|
|
62
|
+
illustration: "empty-data",
|
|
63
|
+
title: A("support.analytics.noData.title", "No analytics data available"),
|
|
64
|
+
description: A("support.analytics.noData.description", "Analytics data will appear once there's ticket activity to report.")
|
|
65
65
|
})
|
|
66
66
|
});
|
|
67
|
-
let
|
|
68
|
-
startDate:
|
|
69
|
-
endDate:
|
|
70
|
-
label:
|
|
71
|
-
},
|
|
72
|
-
total:
|
|
73
|
-
open:
|
|
74
|
-
resolved:
|
|
75
|
-
avgResponseTimeHours:
|
|
76
|
-
avgResolutionTimeHours:
|
|
77
|
-
byPriority:
|
|
78
|
-
},
|
|
79
|
-
period:
|
|
80
|
-
totalTickets:
|
|
81
|
-
firstResponseCompliance:
|
|
82
|
-
resolutionCompliance:
|
|
83
|
-
avgFirstResponseTime:
|
|
84
|
-
avgResolutionTime:
|
|
85
|
-
breachedTickets:
|
|
86
|
-
byPriority: (
|
|
67
|
+
let W = O.find((e) => e.value === I)?.label || "Custom", G = {
|
|
68
|
+
startDate: N?.startDate ?? P?.startDate ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
69
|
+
endDate: N?.endDate ?? P?.endDate ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
70
|
+
label: W
|
|
71
|
+
}, K = {
|
|
72
|
+
total: j.stats.totalTickets,
|
|
73
|
+
open: j.stats.openTickets,
|
|
74
|
+
resolved: j.stats.resolvedTickets,
|
|
75
|
+
avgResponseTimeHours: j.stats.averageFirstResponseTimeHours || 0,
|
|
76
|
+
avgResolutionTimeHours: j.stats.averageResolutionTimeHours || 0,
|
|
77
|
+
byPriority: j.priorityBreakdown
|
|
78
|
+
}, q = {
|
|
79
|
+
period: G,
|
|
80
|
+
totalTickets: N?.totalTickets ?? j.stats.totalTickets,
|
|
81
|
+
firstResponseCompliance: N?.firstResponseCompliance ?? j.stats.slaComplianceRate ?? 0,
|
|
82
|
+
resolutionCompliance: N?.resolutionCompliance ?? j.stats.slaComplianceRate ?? 0,
|
|
83
|
+
avgFirstResponseTime: N?.averageFirstResponseMinutes || 0,
|
|
84
|
+
avgResolutionTime: N?.averageResolutionMinutes || 0,
|
|
85
|
+
breachedTickets: N?.totalBreaches ?? 0,
|
|
86
|
+
byPriority: (N?.byPriority ?? []).map((e) => ({
|
|
87
87
|
priority: e.priority,
|
|
88
88
|
tickets: e.totalTickets,
|
|
89
89
|
compliance: e.resolutionCompliance
|
|
90
90
|
}))
|
|
91
|
-
},
|
|
92
|
-
period:
|
|
93
|
-
totalResponses:
|
|
94
|
-
averageRating:
|
|
95
|
-
csat:
|
|
96
|
-
nps:
|
|
91
|
+
}, J = P?.ratingDistribution ?? [], Y = {
|
|
92
|
+
period: G,
|
|
93
|
+
totalResponses: P?.totalResponses ?? 0,
|
|
94
|
+
averageRating: P?.averageRating || 0,
|
|
95
|
+
csat: P?.csatScore || 0,
|
|
96
|
+
nps: P?.npsScore || 0,
|
|
97
97
|
ratings: {
|
|
98
|
-
rating1:
|
|
99
|
-
rating2:
|
|
100
|
-
rating3:
|
|
101
|
-
rating4:
|
|
102
|
-
rating5:
|
|
98
|
+
rating1: J.find((e) => e.rating === 1)?.count || 0,
|
|
99
|
+
rating2: J.find((e) => e.rating === 2)?.count || 0,
|
|
100
|
+
rating3: J.find((e) => e.rating === 3)?.count || 0,
|
|
101
|
+
rating4: J.find((e) => e.rating === 4)?.count || 0,
|
|
102
|
+
rating5: J.find((e) => e.rating === 5)?.count || 0
|
|
103
103
|
}
|
|
104
|
-
},
|
|
104
|
+
}, X = (F?.agents ?? []).map((e) => ({
|
|
105
105
|
rank: e.rank,
|
|
106
106
|
ticketsResolved: e.ticketsResolved,
|
|
107
107
|
avgRating: e.averageRating || 0,
|
|
@@ -113,93 +113,124 @@ function D() {
|
|
|
113
113
|
email: e.agent.userId
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
})),
|
|
116
|
+
})), Z = (M.length > 0 ? M : j.ticketTrends).map((e) => ({
|
|
117
117
|
timestamp: e.date,
|
|
118
118
|
value: e.count,
|
|
119
119
|
label: e.groupBy
|
|
120
120
|
}));
|
|
121
|
-
return /* @__PURE__ */
|
|
121
|
+
return /* @__PURE__ */ w(o, {
|
|
122
122
|
title: "Support Analytics",
|
|
123
|
-
subtitle:
|
|
124
|
-
icon: /* @__PURE__ */
|
|
125
|
-
headerActions: /* @__PURE__ */
|
|
123
|
+
subtitle: W,
|
|
124
|
+
icon: /* @__PURE__ */ w(g, { size: 24 }),
|
|
125
|
+
headerActions: /* @__PURE__ */ T("div", {
|
|
126
126
|
className: "flex items-center gap-3",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ T("div", {
|
|
128
128
|
className: "flex items-center gap-2",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ w(_, {
|
|
130
130
|
size: 20,
|
|
131
131
|
className: "text-text-secondary"
|
|
132
|
-
}), /* @__PURE__ */
|
|
133
|
-
value:
|
|
134
|
-
onChange: (e) =>
|
|
132
|
+
}), /* @__PURE__ */ w("select", {
|
|
133
|
+
value: I,
|
|
134
|
+
onChange: (e) => z(e.target.value),
|
|
135
135
|
className: "px-3 py-2 rounded-lg border border-border-subtle bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
|
|
136
|
-
children:
|
|
136
|
+
children: O.map((e) => /* @__PURE__ */ w("option", {
|
|
137
137
|
value: e.value,
|
|
138
138
|
children: e.label
|
|
139
139
|
}, e.value))
|
|
140
140
|
})]
|
|
141
|
-
}), /* @__PURE__ */
|
|
142
|
-
onClick: () =>
|
|
143
|
-
children: [/* @__PURE__ */
|
|
141
|
+
}), /* @__PURE__ */ T(e, {
|
|
142
|
+
onClick: () => B("PDF"),
|
|
143
|
+
children: [/* @__PURE__ */ w(b, { size: 18 }), A("support.analytics.export", "Export")]
|
|
144
144
|
})]
|
|
145
145
|
}),
|
|
146
|
-
children: /* @__PURE__ */
|
|
146
|
+
children: /* @__PURE__ */ T("div", {
|
|
147
147
|
className: "space-y-6",
|
|
148
148
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ w(r, { children: "Measure how your support operation is performing. Track ticket volume, first-response and resolution times, SLA compliance and customer satisfaction so you can spot bottlenecks, balance agent workload, and prove the impact of your team. Adjust the period to compare trends over time." }),
|
|
150
|
+
/* @__PURE__ */ w(n, {
|
|
151
|
+
storageKey: "support-analytics",
|
|
152
|
+
title: "Make the most of your data",
|
|
153
|
+
steps: [
|
|
154
|
+
{
|
|
155
|
+
id: "period",
|
|
156
|
+
label: "Switch the reporting period",
|
|
157
|
+
description: "Compare the last 7, 30, 90 days or a full year to spot trends.",
|
|
158
|
+
onClick: () => z("LAST_90_DAYS")
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: "export",
|
|
162
|
+
label: "Export a PDF report",
|
|
163
|
+
description: "Share performance with stakeholders in one click.",
|
|
164
|
+
onClick: () => B("PDF")
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: "sla",
|
|
168
|
+
label: "Review SLA compliance",
|
|
169
|
+
description: "Scroll to the SLA report to see where commitments slipped.",
|
|
170
|
+
onClick: () => document.querySelector("[data-tour=\"support-analytics-sla\"]")?.scrollIntoView({
|
|
171
|
+
behavior: "smooth",
|
|
172
|
+
block: "start"
|
|
173
|
+
})
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ w(t, {
|
|
150
178
|
className: "p-4 sm:p-5",
|
|
151
|
-
children: /* @__PURE__ */
|
|
179
|
+
children: /* @__PURE__ */ T("div", {
|
|
152
180
|
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",
|
|
153
181
|
children: [
|
|
154
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ w(l, {
|
|
155
183
|
title: "Total Tickets",
|
|
156
|
-
value:
|
|
157
|
-
icon:
|
|
184
|
+
value: K.total.toString(),
|
|
185
|
+
icon: C,
|
|
158
186
|
iconColor: "text-primary",
|
|
159
|
-
subtitle: `${
|
|
187
|
+
subtitle: `${K.open} open, ${K.resolved} resolved`
|
|
160
188
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ w(l, {
|
|
162
190
|
title: "Avg Response Time",
|
|
163
|
-
value: `${
|
|
164
|
-
icon:
|
|
191
|
+
value: `${K.avgResponseTimeHours.toFixed(1)}h`,
|
|
192
|
+
icon: y,
|
|
165
193
|
iconColor: "text-accent",
|
|
166
|
-
subtitle: `Resolution: ${
|
|
194
|
+
subtitle: `Resolution: ${K.avgResolutionTimeHours.toFixed(1)}h`
|
|
167
195
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ w(l, {
|
|
169
197
|
title: "SLA Compliance",
|
|
170
|
-
value: `${
|
|
171
|
-
icon:
|
|
172
|
-
iconColor:
|
|
173
|
-
subtitle: `${
|
|
198
|
+
value: `${q.firstResponseCompliance.toFixed(1)}%`,
|
|
199
|
+
icon: v,
|
|
200
|
+
iconColor: q.firstResponseCompliance >= 90 ? "text-success" : "text-warning",
|
|
201
|
+
subtitle: `${q.breachedTickets} breached`
|
|
174
202
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ w(l, {
|
|
176
204
|
title: "Satisfaction",
|
|
177
|
-
value:
|
|
178
|
-
icon:
|
|
205
|
+
value: Y.averageRating.toFixed(1),
|
|
206
|
+
icon: S,
|
|
179
207
|
iconColor: "text-success",
|
|
180
|
-
subtitle: `CSAT: ${
|
|
208
|
+
subtitle: `CSAT: ${Y.csat.toFixed(0)}%, NPS: ${Y.nps.toFixed(0)}`
|
|
181
209
|
})
|
|
182
210
|
]
|
|
183
211
|
})
|
|
184
212
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
trends:
|
|
187
|
-
period:
|
|
213
|
+
/* @__PURE__ */ w(u, {
|
|
214
|
+
trends: Z,
|
|
215
|
+
period: Y.period
|
|
188
216
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ T("div", {
|
|
190
218
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
191
|
-
children: [/* @__PURE__ */
|
|
219
|
+
children: [/* @__PURE__ */ w(d, { data: K.byPriority }), /* @__PURE__ */ w(f, { data: j.categoryBreakdown })]
|
|
220
|
+
}),
|
|
221
|
+
/* @__PURE__ */ w("div", {
|
|
222
|
+
"data-tour": "support-analytics-sla",
|
|
223
|
+
children: /* @__PURE__ */ w(p, { report: q })
|
|
192
224
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */ C("div", {
|
|
225
|
+
/* @__PURE__ */ T("div", {
|
|
195
226
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ w(h, { metrics: Y }), /* @__PURE__ */ w(m, { agents: X })]
|
|
197
228
|
})
|
|
198
229
|
]
|
|
199
230
|
})
|
|
200
231
|
});
|
|
201
232
|
}
|
|
202
233
|
//#endregion
|
|
203
|
-
export {
|
|
234
|
+
export { k as AnalyticsPage };
|
|
204
235
|
|
|
205
236
|
//# sourceMappingURL=AnalyticsPage.js.map
|