@burdenoff/microfe-support 2026.519.1 → 2026.521.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/generated/global-operations.js +18 -48
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/dist/index.js +8 -7
- package/dist/node_modules/marked/lib/marked.esm.js +1 -1
- package/dist/support/SupportAdminRoot.js +35 -26
- package/dist/support/SupportAdminRoot.js.map +1 -1
- package/dist/support/SupportUserRoot.js +29 -20
- package/dist/support/SupportUserRoot.js.map +1 -1
- package/dist/support/components/NotificationToast.js +1 -1
- package/dist/support/components/NotificationToast.js.map +1 -1
- package/dist/support/components/analytics/CategoryBreakdown.js +22 -37
- package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
- package/dist/support/components/analytics/PriorityBreakdown.js +28 -33
- package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
- package/dist/support/components/analytics/TopAgents.js +35 -42
- package/dist/support/components/analytics/TopAgents.js.map +1 -1
- package/dist/support/components/kb/ArticleForm.js +26 -13
- package/dist/support/components/kb/ArticleForm.js.map +1 -1
- package/dist/support/components/settings/CannedResponsesSettings.js +9 -7
- package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js +10 -8
- package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
- package/dist/support/components/settings/TicketCategoriesSettings.js +169 -168
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/tickets/MessageComposer.js +4 -3
- package/dist/support/components/tickets/MessageComposer.js.map +1 -1
- package/dist/support/components/tickets/MessageThread.js +1 -1
- package/dist/support/components/tickets/MessageThread.js.map +1 -1
- package/dist/support/components/tickets/TicketDetailHeader.js +41 -52
- package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
- package/dist/support/components/tickets/TicketHeader.js +70 -80
- package/dist/support/components/tickets/TicketHeader.js.map +1 -1
- package/dist/support/components/tickets/TicketSidebar.js +77 -82
- package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
- package/dist/support/events/rybbit.js +35 -0
- package/dist/support/events/rybbit.js.map +1 -0
- package/dist/support/hooks/useAnalyticsOperations.js +41 -41
- package/dist/support/hooks/useAnalyticsOperations.js.map +1 -1
- package/dist/support/hooks/useKnowledgeBaseOperations.js +50 -52
- package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
- package/dist/support/hooks/useTicketListOperations.js +51 -0
- package/dist/support/hooks/useTicketListOperations.js.map +1 -0
- package/dist/support/hooks/useTicketOperations.js +74 -109
- package/dist/support/hooks/useTicketOperations.js.map +1 -1
- package/dist/support/index.js +2 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +148 -151
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailUserPage.js +67 -72
- package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +128 -123
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +154 -96
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateArticlePage.js +42 -42
- package/dist/support/pages/CreateArticlePage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.js +20 -11
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/EditArticlePage.js +66 -64
- package/dist/support/pages/EditArticlePage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.js +80 -85
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +73 -78
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/SettingsPage.js +3 -3
- package/dist/support/pages/SettingsPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js +28 -21
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
- package/dist/support/pages/TicketDetailUserPage.js +121 -111
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.js +170 -196
- package/dist/support/pages/TicketListPage.js.map +1 -1
- package/dist/support/store/supportStore.js +43 -34
- package/dist/support/store/supportStore.js.map +1 -1
- package/dist/support/utils/categoryColors.js +64 -0
- package/dist/support/utils/categoryColors.js.map +1 -0
- package/dist/support/utils/index.js +38 -26
- package/dist/support/utils/index.js.map +1 -1
- package/dist/support/utils/ticketFilters.js +43 -0
- package/dist/support/utils/ticketFilters.js.map +1 -0
- package/dist/support/utils/uiTokens.js +44 -0
- package/dist/support/utils/uiTokens.js.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { useSupport as e } from "./support/providers/SupportProvider.js";
|
|
2
2
|
import { calculateSLAStatus as t, formatDuration as n, formatFileSize as r, formatTicketStatus as i, formatTimeAgo as a, getInitials as o, getPriorityColor as s, getPriorityIcon as c, isValidEmail as l, stringToColor as u, truncateText as d } from "./support/utils/index.js";
|
|
3
3
|
import { useSupportStore as f } from "./support/store/supportStore.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { SupportUserRoot as p } from "./support/SupportUserRoot.js";
|
|
5
|
+
import { SupportAdminRoot as m } from "./support/SupportAdminRoot.js";
|
|
6
|
+
import { SUPPORT_RYBBIT_EVENT_ALLOWLIST as h } from "./support/events/rybbit.js";
|
|
7
|
+
import { useTicketOperations as g } from "./support/hooks/useTicketOperations.js";
|
|
8
|
+
import { useChatOperations as _ } from "./support/hooks/useChatOperations.js";
|
|
9
|
+
import { useKnowledgeBaseOperations as v } from "./support/hooks/useKnowledgeBaseOperations.js";
|
|
10
|
+
import { useAnalyticsOperations as y } from "./support/hooks/useAnalyticsOperations.js";
|
|
10
11
|
import "./support/index.js";
|
|
11
|
-
export { h as
|
|
12
|
+
export { h as SUPPORT_RYBBIT_EVENT_ALLOWLIST, m as SupportAdminRoot, p as SupportUserRoot, t as calculateSLAStatus, n as formatDuration, r as formatFileSize, i as formatTicketStatus, a as formatTimeAgo, o as getInitials, s as getPriorityColor, c as getPriorityIcon, l as isValidEmail, u as stringToColor, d as truncateText, y as useAnalyticsOperations, _ as useChatOperations, v as useKnowledgeBaseOperations, e as useSupport, f as useSupportStore, g as useTicketOperations };
|
|
@@ -1425,6 +1425,6 @@ $.options = $.setOptions = function(e) {
|
|
|
1425
1425
|
return Q.walkTokens(e, t);
|
|
1426
1426
|
}, $.parseInline = Q.parseInline, $.Parser = Y, $.parser = Y.parse, $.Renderer = q, $.TextRenderer = J, $.Lexer = K, $.lexer = K.lex, $.Tokenizer = G, $.Hooks = X, $.parse = $, $.options, $.setOptions, $.use, $.walkTokens, $.parseInline, Y.parse, K.lex;
|
|
1427
1427
|
//#endregion
|
|
1428
|
-
export { Z as D,
|
|
1428
|
+
export { Z as D, q as y };
|
|
1429
1429
|
|
|
1430
1430
|
//# sourceMappingURL=marked.esm.js.map
|
|
@@ -1,69 +1,78 @@
|
|
|
1
1
|
import { SupportProvider as e } from "./providers/SupportProvider.js";
|
|
2
2
|
import { joinPath as t } from "./utils/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { useSupportStore as n } from "./store/supportStore.js";
|
|
4
|
+
import { useRegisterFooter as r } from "./hooks/useRegisterFooter.js";
|
|
5
|
+
import { SupportAdminRoutes as i } from "./SupportAdminRoutes.js";
|
|
6
|
+
import { useEffect as a } from "react";
|
|
7
|
+
import { ErrorBoundary as o } from "@burdenoff/fe-libs/shared/components";
|
|
8
|
+
import { BarChart3 as s, BookOpen as c, Mail as l, Settings as u, Ticket as d } from "lucide-react";
|
|
9
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
9
10
|
//#region src/support/SupportAdminRoot.tsx
|
|
10
|
-
var
|
|
11
|
-
let { registerNavItems:
|
|
12
|
-
return
|
|
13
|
-
|
|
11
|
+
var p = (p) => {
|
|
12
|
+
let { registerNavItems: m, registerFooterItems: h, basePath: g = "/", currentUser: _, workspaceId: v, organizationId: y, productId: b } = p, x = n((e) => e.resetForContextChange);
|
|
13
|
+
return a(() => {
|
|
14
|
+
x();
|
|
15
|
+
}, [
|
|
16
|
+
x,
|
|
17
|
+
_?.id,
|
|
18
|
+
v,
|
|
19
|
+
y,
|
|
20
|
+
b
|
|
21
|
+
]), a(() => {
|
|
22
|
+
if (m) return m([
|
|
14
23
|
{
|
|
15
24
|
id: "support-tickets",
|
|
16
25
|
label: "Tickets",
|
|
17
|
-
path: t(
|
|
18
|
-
icon: /* @__PURE__ */ d
|
|
26
|
+
path: t(g, "tickets"),
|
|
27
|
+
icon: /* @__PURE__ */ f(d, { size: 20 }),
|
|
19
28
|
order: 10,
|
|
20
29
|
group: "support"
|
|
21
30
|
},
|
|
22
31
|
{
|
|
23
32
|
id: "support-inquiries",
|
|
24
33
|
label: "Contact Inquiries",
|
|
25
|
-
path: t(
|
|
26
|
-
icon: /* @__PURE__ */
|
|
34
|
+
path: t(g, "inquiries"),
|
|
35
|
+
icon: /* @__PURE__ */ f(l, { size: 20 }),
|
|
27
36
|
order: 15,
|
|
28
37
|
group: "support"
|
|
29
38
|
},
|
|
30
39
|
{
|
|
31
40
|
id: "support-kb",
|
|
32
41
|
label: "Knowledge Base",
|
|
33
|
-
path: t(
|
|
34
|
-
icon: /* @__PURE__ */
|
|
42
|
+
path: t(g, "kb"),
|
|
43
|
+
icon: /* @__PURE__ */ f(c, { size: 20 }),
|
|
35
44
|
order: 20,
|
|
36
45
|
group: "support"
|
|
37
46
|
},
|
|
38
47
|
{
|
|
39
48
|
id: "support-analytics",
|
|
40
49
|
label: "Analytics",
|
|
41
|
-
path: t(
|
|
42
|
-
icon: /* @__PURE__ */
|
|
50
|
+
path: t(g, "analytics"),
|
|
51
|
+
icon: /* @__PURE__ */ f(s, { size: 20 }),
|
|
43
52
|
order: 40,
|
|
44
53
|
group: "support"
|
|
45
54
|
},
|
|
46
55
|
{
|
|
47
56
|
id: "support-settings",
|
|
48
57
|
label: "Settings",
|
|
49
|
-
path: t(
|
|
50
|
-
icon: /* @__PURE__ */
|
|
58
|
+
path: t(g, "settings"),
|
|
59
|
+
icon: /* @__PURE__ */ f(u, { size: 20 }),
|
|
51
60
|
order: 50,
|
|
52
61
|
group: "support"
|
|
53
62
|
}
|
|
54
63
|
]);
|
|
55
|
-
}, [
|
|
56
|
-
fallback: /* @__PURE__ */
|
|
64
|
+
}, [m, g]), r(h), /* @__PURE__ */ f(o, {
|
|
65
|
+
fallback: /* @__PURE__ */ f("div", {
|
|
57
66
|
className: "p-6 text-center text-text-secondary",
|
|
58
67
|
children: "Something went wrong loading this module. Please refresh the page."
|
|
59
68
|
}),
|
|
60
|
-
children: /* @__PURE__ */
|
|
61
|
-
...
|
|
62
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ f(e, {
|
|
70
|
+
...p,
|
|
71
|
+
children: /* @__PURE__ */ f(i, {})
|
|
63
72
|
})
|
|
64
73
|
});
|
|
65
74
|
};
|
|
66
75
|
//#endregion
|
|
67
|
-
export {
|
|
76
|
+
export { p as SupportAdminRoot };
|
|
68
77
|
|
|
69
78
|
//# sourceMappingURL=SupportAdminRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportAdminRoot.js","names":[],"sources":["../../src/support/SupportAdminRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { Ticket, BookOpen, BarChart3, Settings, Mail } from 'lucide-react';\nimport { SupportProvider } from './providers/SupportProvider';\nimport type { NavItem, SupportRootProps } from './types';\nimport { SupportAdminRoutes } from './SupportAdminRoutes';\nimport { joinPath } from './utils';\nimport { useRegisterFooter } from './hooks/useRegisterFooter';\n\n/**\n * Admin-facing root component for the Support microfrontend.\n *\n * Renders admin support management routes (tickets with full controls,\n * contact inquiries, KB authoring, analytics, settings).\n *\n * Use this in admin-app where platform administrators manage support operations.\n *\n * Navigation registration is optional — admin-app uses shell-owned nav\n * (NavRegistration.tsx with contentMfeProps), so registerNavItems won't be provided.\n * Other shells that pass registerNavItems will get admin nav items registered.\n *\n * For user-facing support features, use SupportUserRoot instead.\n *\n * Note: This is a UI-layer route split, not a security boundary.\n * Access control is enforced at the API/server level.\n */\nexport const SupportAdminRoot: FC<SupportRootProps> = (props) => {\n const {
|
|
1
|
+
{"version":3,"file":"SupportAdminRoot.js","names":[],"sources":["../../src/support/SupportAdminRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { Ticket, BookOpen, BarChart3, Settings, Mail } from 'lucide-react';\nimport { SupportProvider } from './providers/SupportProvider';\nimport type { NavItem, SupportRootProps } from './types';\nimport { SupportAdminRoutes } from './SupportAdminRoutes';\nimport { joinPath } from './utils';\nimport { useRegisterFooter } from './hooks/useRegisterFooter';\nimport { useSupportStore } from './store/supportStore';\n\n/**\n * Admin-facing root component for the Support microfrontend.\n *\n * Renders admin support management routes (tickets with full controls,\n * contact inquiries, KB authoring, analytics, settings).\n *\n * Use this in admin-app where platform administrators manage support operations.\n *\n * Navigation registration is optional — admin-app uses shell-owned nav\n * (NavRegistration.tsx with contentMfeProps), so registerNavItems won't be provided.\n * Other shells that pass registerNavItems will get admin nav items registered.\n *\n * For user-facing support features, use SupportUserRoot instead.\n *\n * Note: This is a UI-layer route split, not a security boundary.\n * Access control is enforced at the API/server level.\n */\nexport const SupportAdminRoot: FC<SupportRootProps> = (props) => {\n const {\n registerNavItems,\n registerFooterItems,\n basePath = '/',\n currentUser,\n workspaceId,\n organizationId,\n productId,\n } = props;\n const resetForContextChange = useSupportStore((state) => state.resetForContextChange);\n\n useEffect(() => {\n resetForContextChange();\n }, [resetForContextChange, currentUser?.id, workspaceId, organizationId, productId]);\n\n // Register admin navigation items only if the shell provides registerNavItems.\n // admin-app uses contentMfeProps (no registerNavItems) so the shell's\n // NavRegistration.tsx owns the nav — this avoids duplicate entries.\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'support-tickets',\n label: 'Tickets',\n path: joinPath(basePath, 'tickets'),\n icon: <Ticket size={20} />,\n order: 10,\n group: 'support',\n },\n {\n id: 'support-inquiries',\n label: 'Contact Inquiries',\n path: joinPath(basePath, 'inquiries'),\n icon: <Mail size={20} />,\n order: 15,\n group: 'support',\n },\n {\n id: 'support-kb',\n label: 'Knowledge Base',\n path: joinPath(basePath, 'kb'),\n icon: <BookOpen size={20} />,\n order: 20,\n group: 'support',\n },\n {\n id: 'support-analytics',\n label: 'Analytics',\n path: joinPath(basePath, 'analytics'),\n icon: <BarChart3 size={20} />,\n order: 40,\n group: 'support',\n },\n {\n id: 'support-settings',\n label: 'Settings',\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={20} />,\n order: 50,\n group: 'support',\n },\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath]);\n\n useRegisterFooter(registerFooterItems);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n Something went wrong loading this module. Please refresh the page.\n </div>\n }\n >\n <SupportProvider {...props}>\n <SupportAdminRoutes />\n </SupportProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;AA4BA,IAAa,KAA0C,MAAU;CAC/D,IAAM,EACJ,qBACA,wBACA,cAAW,KACX,gBACA,gBACA,mBACA,iBACE,GACE,IAAwB,GAAiB,MAAU,EAAM,sBAAsB;AA6DrF,QA3DA,QAAgB;AACd,KAAuB;IACtB;EAAC;EAAuB,GAAa;EAAI;EAAa;EAAgB;EAAU,CAAC,EAKpF,QAAgB;AACT,QA8CL,QADgB,EA3CY;GAC1B;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,UAAU;IACnC,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;IAC1B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;IACxB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,KAAK;IAC9B,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC5B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;IAC7B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO;IACP,MAAM,EAAS,GAAU,WAAW;IACpC,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC5B,OAAO;IACP,OAAO;IACR;GACF,CAEyC;IAEzC,CAAC,GAAkB,EAAS,CAAC,EAEhC,EAAkB,EAAoB,EAGpC,kBAAC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;aAAsC;GAE/C,CAAA;YAGR,kBAAC,GAAD;GAAiB,GAAI;aACnB,kBAAC,GAAD,EAAsB,CAAA;GACN,CAAA;EACJ,CAAA"}
|
|
@@ -1,42 +1,51 @@
|
|
|
1
1
|
import { SupportProvider as e } from "./providers/SupportProvider.js";
|
|
2
2
|
import { joinPath as t } from "./utils/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { useSupportStore as n } from "./store/supportStore.js";
|
|
4
|
+
import { SupportUserRoutes as r } from "./SupportUserRoutes.js";
|
|
5
|
+
import { useRegisterFooter as i } from "./hooks/useRegisterFooter.js";
|
|
6
|
+
import { useEffect as a } from "react";
|
|
7
|
+
import { ErrorBoundary as o } from "@burdenoff/fe-libs/shared/components";
|
|
8
|
+
import { BookOpen as s, Ticket as c } from "lucide-react";
|
|
9
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
9
10
|
//#region src/support/SupportUserRoot.tsx
|
|
10
|
-
var
|
|
11
|
-
let { registerNavItems:
|
|
12
|
-
return
|
|
13
|
-
|
|
11
|
+
var u = (u) => {
|
|
12
|
+
let { registerNavItems: d, registerFooterItems: f, basePath: p = "/", currentUser: m, workspaceId: h, organizationId: g, productId: _ } = u, v = n((e) => e.resetForContextChange);
|
|
13
|
+
return a(() => {
|
|
14
|
+
v();
|
|
15
|
+
}, [
|
|
16
|
+
v,
|
|
17
|
+
m?.id,
|
|
18
|
+
h,
|
|
19
|
+
g,
|
|
20
|
+
_
|
|
21
|
+
]), a(() => {
|
|
22
|
+
if (d) return d([{
|
|
14
23
|
id: "support-tickets",
|
|
15
24
|
label: "Tickets",
|
|
16
|
-
path: t(
|
|
17
|
-
icon: /* @__PURE__ */ c
|
|
25
|
+
path: t(p, "tickets"),
|
|
26
|
+
icon: /* @__PURE__ */ l(c, { size: 20 }),
|
|
18
27
|
order: 10,
|
|
19
28
|
group: "support"
|
|
20
29
|
}, {
|
|
21
30
|
id: "support-kb",
|
|
22
31
|
label: "Knowledge Base",
|
|
23
|
-
path: t(
|
|
24
|
-
icon: /* @__PURE__ */
|
|
32
|
+
path: t(p, "kb"),
|
|
33
|
+
icon: /* @__PURE__ */ l(s, { size: 20 }),
|
|
25
34
|
order: 20,
|
|
26
35
|
group: "support"
|
|
27
36
|
}]);
|
|
28
|
-
}, [
|
|
29
|
-
fallback: /* @__PURE__ */
|
|
37
|
+
}, [d, p]), i(f), /* @__PURE__ */ l(o, {
|
|
38
|
+
fallback: /* @__PURE__ */ l("div", {
|
|
30
39
|
className: "p-6 text-center text-text-secondary",
|
|
31
40
|
children: "Something went wrong loading this module. Please refresh the page."
|
|
32
41
|
}),
|
|
33
|
-
children: /* @__PURE__ */
|
|
34
|
-
...
|
|
35
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ l(e, {
|
|
43
|
+
...u,
|
|
44
|
+
children: /* @__PURE__ */ l(r, {})
|
|
36
45
|
})
|
|
37
46
|
});
|
|
38
47
|
};
|
|
39
48
|
//#endregion
|
|
40
|
-
export {
|
|
49
|
+
export { u as SupportUserRoot };
|
|
41
50
|
|
|
42
51
|
//# sourceMappingURL=SupportUserRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportUserRoot.js","names":[],"sources":["../../src/support/SupportUserRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { Ticket, BookOpen } from 'lucide-react';\nimport { SupportProvider } from './providers/SupportProvider';\nimport type { NavItem, SupportRootProps } from './types';\nimport { SupportUserRoutes } from './SupportUserRoutes';\nimport { joinPath } from './utils';\nimport { useRegisterFooter } from './hooks/useRegisterFooter';\n\n/**\n * User-facing root component for the Support microfrontend.\n *\n * Renders only user-relevant routes (tickets and KB browsing)\n * and registers user-only navigation items with the shell.\n *\n * Use this in product app shells (vibecontrols-app, bigconsole, etc.)\n * where end users interact with the support module.\n *\n * For admin-facing support features, use SupportAdminRoot instead.\n *\n * Note: This is a UI-layer route split, not a security boundary.\n * Access control is enforced at the API/server level.\n */\nexport const SupportUserRoot: FC<SupportRootProps> = (props) => {\n const {
|
|
1
|
+
{"version":3,"file":"SupportUserRoot.js","names":[],"sources":["../../src/support/SupportUserRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { Ticket, BookOpen } from 'lucide-react';\nimport { SupportProvider } from './providers/SupportProvider';\nimport type { NavItem, SupportRootProps } from './types';\nimport { SupportUserRoutes } from './SupportUserRoutes';\nimport { joinPath } from './utils';\nimport { useRegisterFooter } from './hooks/useRegisterFooter';\nimport { useSupportStore } from './store/supportStore';\n\n/**\n * User-facing root component for the Support microfrontend.\n *\n * Renders only user-relevant routes (tickets and KB browsing)\n * and registers user-only navigation items with the shell.\n *\n * Use this in product app shells (vibecontrols-app, bigconsole, etc.)\n * where end users interact with the support module.\n *\n * For admin-facing support features, use SupportAdminRoot instead.\n *\n * Note: This is a UI-layer route split, not a security boundary.\n * Access control is enforced at the API/server level.\n */\nexport const SupportUserRoot: FC<SupportRootProps> = (props) => {\n const {\n registerNavItems,\n registerFooterItems,\n basePath = '/',\n currentUser,\n workspaceId,\n organizationId,\n productId,\n } = props;\n const resetForContextChange = useSupportStore((state) => state.resetForContextChange);\n\n useEffect(() => {\n resetForContextChange();\n }, [resetForContextChange, currentUser?.id, workspaceId, organizationId, productId]);\n\n // Register user-only navigation items\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'support-tickets',\n label: 'Tickets',\n path: joinPath(basePath, 'tickets'),\n icon: <Ticket size={20} />,\n order: 10,\n group: 'support',\n },\n {\n id: 'support-kb',\n label: 'Knowledge Base',\n path: joinPath(basePath, 'kb'),\n icon: <BookOpen size={20} />,\n order: 20,\n group: 'support',\n },\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath]);\n\n useRegisterFooter(registerFooterItems);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n Something went wrong loading this module. Please refresh the page.\n </div>\n }\n >\n <SupportProvider {...props}>\n <SupportUserRoutes />\n </SupportProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;AAyBA,IAAa,KAAyC,MAAU;CAC9D,IAAM,EACJ,qBACA,wBACA,cAAW,KACX,gBACA,gBACA,mBACA,iBACE,GACE,IAAwB,GAAiB,MAAU,EAAM,sBAAsB;AAmCrF,QAjCA,QAAgB;AACd,KAAuB;IACtB;EAAC;EAAuB,GAAa;EAAI;EAAa;EAAgB;EAAU,CAAC,EAGpF,QAAgB;AACT,QAsBL,QADgB,EAnBY,CAC1B;GACE,IAAI;GACJ,OAAO;GACP,MAAM,EAAS,GAAU,UAAU;GACnC,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;GAC1B,OAAO;GACP,OAAO;GACR,EACD;GACE,IAAI;GACJ,OAAO;GACP,MAAM,EAAS,GAAU,KAAK;GAC9B,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;GAC5B,OAAO;GACP,OAAO;GACR,CACF,CAEyC;IAEzC,CAAC,GAAkB,EAAS,CAAC,EAEhC,EAAkB,EAAoB,EAGpC,kBAAC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;aAAsC;GAE/C,CAAA;YAGR,kBAAC,GAAD;GAAiB,GAAI;aACnB,kBAAC,GAAD,EAAqB,CAAA;GACL,CAAA;EACJ,CAAA"}
|
|
@@ -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
|
|
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-300 ${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
|
|
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-300 ${\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"}
|
|
@@ -1,58 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { analyticsSeriesClasses as e } from "../../utils/uiTokens.js";
|
|
2
|
+
import { FolderOpen as t } from "lucide-react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
4
|
//#region src/support/components/analytics/CategoryBreakdown.tsx
|
|
4
|
-
var r = [
|
|
5
|
-
"#3b82f6",
|
|
6
|
-
"#8b5cf6",
|
|
7
|
-
"#ec4899",
|
|
8
|
-
"#f97316",
|
|
9
|
-
"#eab308",
|
|
10
|
-
"#84cc16",
|
|
11
|
-
"#10b981",
|
|
12
|
-
"#06b6d4"
|
|
13
|
-
];
|
|
14
5
|
function i({ data: i }) {
|
|
15
6
|
let a = i.reduce((e, t) => e + t.count, 0), o = i.slice(0, 8);
|
|
16
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ r("div", {
|
|
17
8
|
className: "p-6 rounded-lg border border-default bg-surface transition-all duration-200 hover:shadow-sm animate-in fade-in-0 slide-in-from-bottom-2",
|
|
18
|
-
children: [/* @__PURE__ */
|
|
9
|
+
children: [/* @__PURE__ */ r("h2", {
|
|
19
10
|
className: "text-xl font-semibold mb-4 flex items-center gap-2 text-primary",
|
|
20
|
-
children: [/* @__PURE__ */ t
|
|
21
|
-
}), /* @__PURE__ */
|
|
11
|
+
children: [/* @__PURE__ */ n(t, { size: 20 }), "Top Categories"]
|
|
12
|
+
}), /* @__PURE__ */ n("div", {
|
|
22
13
|
className: "space-y-3",
|
|
23
|
-
children: o.map((
|
|
24
|
-
let o = a > 0 ?
|
|
25
|
-
return /* @__PURE__ */
|
|
14
|
+
children: o.map((t, i) => {
|
|
15
|
+
let o = a > 0 ? t.count / a * 100 : 0, s = e[i % e.length];
|
|
16
|
+
return /* @__PURE__ */ r("div", {
|
|
26
17
|
className: "flex items-center justify-between transition-colors duration-200 hover:bg-muted/50 p-1 rounded",
|
|
27
|
-
children: [/* @__PURE__ */
|
|
18
|
+
children: [/* @__PURE__ */ r("div", {
|
|
28
19
|
className: "flex items-center gap-2 flex-1",
|
|
29
|
-
children: [/* @__PURE__ */
|
|
30
|
-
className: "w-3 h-3 rounded-full flex-shrink-0",
|
|
31
|
-
style: { backgroundColor: s }
|
|
32
|
-
}), /* @__PURE__ */ t("span", {
|
|
20
|
+
children: [/* @__PURE__ */ n("div", { className: `w-3 h-3 rounded-full flex-shrink-0 ${s}` }), /* @__PURE__ */ n("span", {
|
|
33
21
|
className: "text-sm truncate text-primary",
|
|
34
|
-
children:
|
|
22
|
+
children: t.category
|
|
35
23
|
})]
|
|
36
|
-
}), /* @__PURE__ */
|
|
24
|
+
}), /* @__PURE__ */ r("div", {
|
|
37
25
|
className: "flex items-center gap-3 ml-4",
|
|
38
|
-
children: [/* @__PURE__ */
|
|
26
|
+
children: [/* @__PURE__ */ n("div", {
|
|
39
27
|
className: "w-20",
|
|
40
|
-
children: /* @__PURE__ */
|
|
28
|
+
children: /* @__PURE__ */ n("div", {
|
|
41
29
|
className: "h-2 rounded-full bg-muted",
|
|
42
|
-
children: /* @__PURE__ */
|
|
43
|
-
className:
|
|
44
|
-
style: {
|
|
45
|
-
width: `${o}%`,
|
|
46
|
-
backgroundColor: s
|
|
47
|
-
}
|
|
30
|
+
children: /* @__PURE__ */ n("div", {
|
|
31
|
+
className: `h-full rounded-full transition-all duration-300 ${s}`,
|
|
32
|
+
style: { width: `${o}%` }
|
|
48
33
|
})
|
|
49
34
|
})
|
|
50
|
-
}), /* @__PURE__ */
|
|
35
|
+
}), /* @__PURE__ */ n("span", {
|
|
51
36
|
className: "text-sm font-semibold w-12 text-right text-primary",
|
|
52
|
-
children:
|
|
37
|
+
children: t.count
|
|
53
38
|
})]
|
|
54
39
|
})]
|
|
55
|
-
},
|
|
40
|
+
}, t.category);
|
|
56
41
|
})
|
|
57
42
|
})]
|
|
58
43
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryBreakdown.js","names":[],"sources":["../../../../src/support/components/analytics/CategoryBreakdown.tsx"],"sourcesContent":["import { FolderOpen } from 'lucide-react';\n\ninterface CategoryCount {\n category: string;\n count: number;\n}\n\ninterface CategoryBreakdownProps {\n data: CategoryCount[];\n}\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';\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 <div className=\"p-6 rounded-lg border border-default bg-surface transition-all duration-200 hover:shadow-sm animate-in fade-in-0 slide-in-from-bottom-2\">\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-muted/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-muted\">\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\">\n {item.count}\n </span>\n </div>\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;AAYA,SAAgB,EAAkB,EAAE,WAAgC;CAClE,IAAM,IAAQ,EAAK,QAAQ,GAAK,MAAS,IAAM,EAAK,OAAO,EAAE,EACvD,IAAgB,EAAK,MAAM,GAAG,EAAE;AAEtC,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,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,CACF"}
|
|
@@ -1,52 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ticketPriorityDotClasses as e } from "../../utils/uiTokens.js";
|
|
2
|
+
import { AlertCircle as t } from "lucide-react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
4
|
//#region src/support/components/analytics/PriorityBreakdown.tsx
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
MEDIUM:
|
|
8
|
-
LOW: "#84cc16"
|
|
5
|
+
var i = {
|
|
6
|
+
...e,
|
|
7
|
+
URGENT: e.CRITICAL,
|
|
8
|
+
MEDIUM: e.NORMAL
|
|
9
9
|
};
|
|
10
|
-
function
|
|
11
|
-
let a =
|
|
12
|
-
return /* @__PURE__ */
|
|
10
|
+
function a({ data: e }) {
|
|
11
|
+
let a = e.reduce((e, t) => e + t.count, 0);
|
|
12
|
+
return /* @__PURE__ */ r("div", {
|
|
13
13
|
className: "p-6 rounded-lg border border-default bg-surface transition-all duration-200 hover:shadow-sm animate-in fade-in-0 slide-in-from-bottom-2",
|
|
14
|
-
children: [/* @__PURE__ */
|
|
14
|
+
children: [/* @__PURE__ */ r("h2", {
|
|
15
15
|
className: "text-xl font-semibold mb-4 flex items-center gap-2 text-primary",
|
|
16
|
-
children: [/* @__PURE__ */ t
|
|
17
|
-
}), /* @__PURE__ */
|
|
16
|
+
children: [/* @__PURE__ */ n(t, { size: 20 }), "Tickets by Priority"]
|
|
17
|
+
}), /* @__PURE__ */ n("div", {
|
|
18
18
|
className: "space-y-4",
|
|
19
|
-
children:
|
|
20
|
-
let
|
|
21
|
-
return /* @__PURE__ */
|
|
19
|
+
children: e.map((e) => {
|
|
20
|
+
let t = a > 0 ? e.count / a * 100 : 0, o = i[e.priority] || "bg-muted-foreground";
|
|
21
|
+
return /* @__PURE__ */ r("div", { children: [/* @__PURE__ */ r("div", {
|
|
22
22
|
className: "flex items-center justify-between mb-2",
|
|
23
|
-
children: [/* @__PURE__ */
|
|
23
|
+
children: [/* @__PURE__ */ r("div", {
|
|
24
24
|
className: "flex items-center gap-2",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
26
|
-
className: "w-3 h-3 rounded-full",
|
|
27
|
-
style: { backgroundColor: o }
|
|
28
|
-
}), /* @__PURE__ */ t("span", {
|
|
25
|
+
children: [/* @__PURE__ */ n("div", { className: `w-3 h-3 rounded-full ${o}` }), /* @__PURE__ */ n("span", {
|
|
29
26
|
className: "font-medium text-primary",
|
|
30
27
|
children: e.priority
|
|
31
28
|
})]
|
|
32
|
-
}), /* @__PURE__ */
|
|
29
|
+
}), /* @__PURE__ */ r("div", {
|
|
33
30
|
className: "flex items-center gap-2",
|
|
34
|
-
children: [/* @__PURE__ */
|
|
31
|
+
children: [/* @__PURE__ */ r("span", {
|
|
35
32
|
className: "text-sm text-tertiary",
|
|
36
|
-
children: [
|
|
37
|
-
}), /* @__PURE__ */
|
|
33
|
+
children: [t.toFixed(0), "%"]
|
|
34
|
+
}), /* @__PURE__ */ n("span", {
|
|
38
35
|
className: "font-semibold text-primary",
|
|
39
36
|
children: e.count
|
|
40
37
|
})]
|
|
41
38
|
})]
|
|
42
|
-
}), /* @__PURE__ */
|
|
39
|
+
}), /* @__PURE__ */ n("div", {
|
|
43
40
|
className: "h-2 rounded-full bg-muted",
|
|
44
|
-
children: /* @__PURE__ */
|
|
45
|
-
className:
|
|
46
|
-
style: {
|
|
47
|
-
|
|
48
|
-
backgroundColor: o
|
|
49
|
-
}
|
|
41
|
+
children: /* @__PURE__ */ n("div", {
|
|
42
|
+
className: `h-full rounded-full transition-all duration-300 ${o}`,
|
|
43
|
+
style: { width: `${t}%` },
|
|
44
|
+
"data-priority": e.priority
|
|
50
45
|
})
|
|
51
46
|
})] }, e.priority);
|
|
52
47
|
})
|
|
@@ -54,6 +49,6 @@ function i({ data: i }) {
|
|
|
54
49
|
});
|
|
55
50
|
}
|
|
56
51
|
//#endregion
|
|
57
|
-
export {
|
|
52
|
+
export { a as PriorityBreakdown };
|
|
58
53
|
|
|
59
54
|
//# 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';\n\ninterface PriorityCount {\n priority: string;\n count: number;\n}\n\ninterface PriorityBreakdownProps {\n data: PriorityCount[];\n}\n\nconst priorityColors: Record<string, string> = {\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';\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 <div className=\"p-6 rounded-lg border border-default bg-surface transition-all duration-200 hover:shadow-sm animate-in fade-in-0 slide-in-from-bottom-2\">\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\">{percentage.toFixed(0)}%</span>\n <span className=\"font-semibold text-primary\">{item.count}</span>\n </div>\n </div>\n <div className=\"h-2 rounded-full bg-muted\">\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 </div>\n );\n}\n"],"mappings":";;;;AAYA,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,OAAD;EAAK,WAAU;YAAf,CACE,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,CAAyC,EAAW,QAAQ,EAAE,EAAC,IAAQ;UACvE,kBAAC,QAAD;OAAM,WAAU;iBAA8B,EAAK;OAAa,CAAA,CAC5D;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,EApBI,EAAK,SAoBT;KAER;GACE,CAAA,CACF"}
|
|
@@ -2,7 +2,11 @@ import { Award as e, Star as t } from "lucide-react";
|
|
|
2
2
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
3
|
//#region src/support/components/analytics/TopAgents.tsx
|
|
4
4
|
function i({ agents: i }) {
|
|
5
|
-
let a = i.slice(0, 5)
|
|
5
|
+
let a = i.slice(0, 5), o = {
|
|
6
|
+
1: "bg-warning/10 text-warning",
|
|
7
|
+
2: "bg-muted text-muted-foreground",
|
|
8
|
+
3: "bg-accent/10 text-accent"
|
|
9
|
+
};
|
|
6
10
|
return /* @__PURE__ */ r("div", {
|
|
7
11
|
className: "p-6 rounded-lg border border-default bg-surface transition-all duration-200 hover:shadow-sm animate-in fade-in-0 slide-in-from-bottom-2",
|
|
8
12
|
children: [/* @__PURE__ */ r("h2", {
|
|
@@ -10,51 +14,40 @@ function i({ agents: i }) {
|
|
|
10
14
|
children: [/* @__PURE__ */ n(e, { size: 20 }), "Top Performing Agents"]
|
|
11
15
|
}), /* @__PURE__ */ r("div", {
|
|
12
16
|
className: "space-y-4",
|
|
13
|
-
children: [a.map((
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
3:
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
color: i || void 0
|
|
26
|
-
},
|
|
27
|
-
children: e.rank <= 3 ? "🏆" : e.rank
|
|
28
|
-
}), /* @__PURE__ */ r("div", {
|
|
29
|
-
className: "flex-1 min-w-0",
|
|
30
|
-
children: [/* @__PURE__ */ r("div", {
|
|
31
|
-
className: "flex items-center justify-between mb-1",
|
|
32
|
-
children: [/* @__PURE__ */ n("p", {
|
|
33
|
-
className: "font-semibold truncate text-primary",
|
|
34
|
-
children: e.agent.user.name
|
|
35
|
-
}), /* @__PURE__ */ r("div", {
|
|
36
|
-
className: "flex items-center gap-1",
|
|
37
|
-
children: [/* @__PURE__ */ n(t, {
|
|
38
|
-
size: 14,
|
|
39
|
-
className: "text-warning fill-warning"
|
|
40
|
-
}), /* @__PURE__ */ n("span", {
|
|
41
|
-
className: "text-sm font-medium text-primary",
|
|
42
|
-
children: e.avgRating.toFixed(1)
|
|
43
|
-
})]
|
|
44
|
-
})]
|
|
17
|
+
children: [a.map((i) => /* @__PURE__ */ r("div", {
|
|
18
|
+
className: "flex items-center gap-4 p-3 rounded-lg bg-muted transition-colors duration-200 hover:bg-muted/80",
|
|
19
|
+
children: [/* @__PURE__ */ n("div", {
|
|
20
|
+
className: `w-10 h-10 rounded-full flex items-center justify-center font-bold text-lg flex-shrink-0 transition-transform duration-200 hover:scale-105 ${o[i.rank] || "bg-muted text-muted-foreground"}`,
|
|
21
|
+
children: i.rank <= 3 ? /* @__PURE__ */ n(e, { size: 18 }) : i.rank
|
|
22
|
+
}), /* @__PURE__ */ r("div", {
|
|
23
|
+
className: "flex-1 min-w-0",
|
|
24
|
+
children: [/* @__PURE__ */ r("div", {
|
|
25
|
+
className: "flex items-center justify-between mb-1",
|
|
26
|
+
children: [/* @__PURE__ */ n("p", {
|
|
27
|
+
className: "font-semibold truncate text-primary",
|
|
28
|
+
children: i.agent.user.name
|
|
45
29
|
}), /* @__PURE__ */ r("div", {
|
|
46
|
-
className: "flex items-center
|
|
47
|
-
children: [/* @__PURE__ */ n(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}), /* @__PURE__ */
|
|
51
|
-
className: "text-
|
|
52
|
-
children:
|
|
30
|
+
className: "flex items-center gap-1",
|
|
31
|
+
children: [/* @__PURE__ */ n(t, {
|
|
32
|
+
size: 14,
|
|
33
|
+
className: "text-warning fill-warning"
|
|
34
|
+
}), /* @__PURE__ */ n("span", {
|
|
35
|
+
className: "text-sm font-medium text-primary",
|
|
36
|
+
children: i.avgRating.toFixed(1)
|
|
53
37
|
})]
|
|
54
38
|
})]
|
|
39
|
+
}), /* @__PURE__ */ r("div", {
|
|
40
|
+
className: "flex items-center justify-between",
|
|
41
|
+
children: [/* @__PURE__ */ n("p", {
|
|
42
|
+
className: "text-xs truncate text-tertiary",
|
|
43
|
+
children: i.agent.user.email
|
|
44
|
+
}), /* @__PURE__ */ r("p", {
|
|
45
|
+
className: "text-xs font-medium text-secondary",
|
|
46
|
+
children: [i.ticketsResolved, " resolved"]
|
|
47
|
+
})]
|
|
55
48
|
})]
|
|
56
|
-
}
|
|
57
|
-
}), a.length === 0 && /* @__PURE__ */ n("div", {
|
|
49
|
+
})]
|
|
50
|
+
}, i.agent.id)), a.length === 0 && /* @__PURE__ */ n("div", {
|
|
58
51
|
className: "text-center py-8",
|
|
59
52
|
children: /* @__PURE__ */ n("p", {
|
|
60
53
|
className: "text-tertiary",
|