@burdenoff/microfe-support 2026.527.2 → 2026.527.4
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/SupportAdminRoutes.js +49 -38
- package/dist/support/SupportAdminRoutes.js.map +1 -1
- package/dist/support/SupportUserRoutes.js +33 -22
- package/dist/support/SupportUserRoutes.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/RouteHelpers.js +1 -1
- package/dist/support/components/RouteHelpers.js.map +1 -1
- package/dist/support/components/analytics/TrendChart.js +5 -5
- package/dist/support/components/analytics/TrendChart.js.map +1 -1
- package/dist/support/components/kb/ArticleForm.js +97 -94
- package/dist/support/components/kb/ArticleForm.js.map +1 -1
- package/dist/support/components/settings/CannedResponsesSettings.js +14 -2
- package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js +19 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
- package/dist/support/components/settings/TicketCategoriesSettings.js +27 -6
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/tickets/AttachmentList.js +1 -1
- package/dist/support/components/tickets/AttachmentList.js.map +1 -1
- package/dist/support/components/tickets/MessageComposer.js +59 -56
- package/dist/support/components/tickets/MessageComposer.js.map +1 -1
- package/dist/support/components/tickets/TicketHeader.js +1 -0
- package/dist/support/components/tickets/TicketHeader.js.map +1 -1
- package/dist/support/components/tickets/TicketSidebar.js +4 -4
- package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
- package/dist/support/hooks/useAnalyticsOperations.js.map +1 -1
- package/dist/support/hooks/useSupportAttachments.js +20 -12
- package/dist/support/hooks/useSupportAttachments.js.map +1 -1
- package/dist/support/hooks/useTicketListOperations.js +1 -1
- package/dist/support/hooks/useTicketListOperations.js.map +1 -1
- package/dist/support/hooks/useTicketOperations.js +1 -1
- package/dist/support/hooks/useTicketOperations.js.map +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +5 -5
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +118 -108
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +21 -12
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateArticlePage.js +0 -1
- package/dist/support/pages/CreateArticlePage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.js +6 -3
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/EditArticlePage.js +0 -1
- package/dist/support/pages/EditArticlePage.js.map +1 -1
- package/dist/support/pages/JobApplicationDetailPage.js +26 -17
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +121 -113
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.js +3 -0
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +3 -0
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/SettingsPage.js +1 -0
- package/dist/support/pages/SettingsPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js +4 -0
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
- package/dist/support/pages/TicketDetailUserPage.js +5 -0
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.js +15 -2
- package/dist/support/pages/TicketListPage.js.map +1 -1
- package/dist/support/providers/SupportProvider.js +1 -1
- package/dist/support/providers/SupportProvider.js.map +1 -1
- package/dist/support/utils/supportFiles.js +14 -15
- package/dist/support/utils/supportFiles.js.map +1 -1
- package/dist/support/utils/uiTokens.js.map +1 -1
- package/package.json +1 -1
- package/dist/support/components/kb/index.js +0 -1
|
@@ -1,84 +1,95 @@
|
|
|
1
1
|
import { CatchAllRedirect as e, PageLoader as t } from "./components/RouteHelpers.js";
|
|
2
2
|
import { TicketListPage as n } from "./pages/TicketListPage.js";
|
|
3
3
|
import { Suspense as r, lazy as i } from "react";
|
|
4
|
-
import { Navigate as a, Route as o, Routes as s } from "react-router-dom";
|
|
5
|
-
import { jsx as
|
|
4
|
+
import { Navigate as a, Route as o, Routes as s, useLocation as c } from "react-router-dom";
|
|
5
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
6
|
//#region src/support/SupportAdminRoutes.tsx
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
var d = i(() => import("./pages/TicketDetailAdminPage.js").then((e) => ({ default: e.TicketDetailAdminPage }))), f = i(() => import("./pages/ContactInquiriesPage.js").then((e) => ({ default: e.ContactInquiriesPage }))), p = i(() => import("./pages/ContactInquiryDetailPage.js").then((e) => ({ default: e.ContactInquiryDetailPage }))), m = i(() => import("./pages/JobApplicationsPage.js").then((e) => ({ default: e.JobApplicationsPage }))), h = i(() => import("./pages/JobApplicationDetailPage.js").then((e) => ({ default: e.JobApplicationDetailPage }))), g = i(() => import("./pages/KnowledgeBaseAdminPage.js").then((e) => ({ default: e.KnowledgeBaseAdminPage }))), _ = i(() => import("./pages/ArticleDetailAdminPage.js").then((e) => ({ default: e.ArticleDetailAdminPage }))), v = i(() => import("./pages/CreateArticlePage.js").then((e) => ({ default: e.CreateArticlePage }))), y = i(() => import("./pages/EditArticlePage.js").then((e) => ({ default: e.EditArticlePage }))), b = i(() => import("./pages/AnalyticsPage.js").then((e) => ({ default: e.AnalyticsPage }))), x = i(() => import("./pages/SettingsPage.js").then((e) => ({ default: e.SettingsPage })));
|
|
8
|
+
function S() {
|
|
9
|
+
let e = c();
|
|
10
|
+
return /* @__PURE__ */ l(a, {
|
|
11
|
+
to: `${e.pathname.replace("/knowledge-base", "/kb")}${e.search}${e.hash}`,
|
|
12
|
+
replace: !0
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function C() {
|
|
16
|
+
return /* @__PURE__ */ l(r, {
|
|
17
|
+
fallback: /* @__PURE__ */ l(t, {}),
|
|
18
|
+
children: /* @__PURE__ */ u(s, { children: [
|
|
19
|
+
/* @__PURE__ */ l(o, {
|
|
13
20
|
index: !0,
|
|
14
|
-
element: /* @__PURE__ */
|
|
21
|
+
element: /* @__PURE__ */ l(a, {
|
|
15
22
|
to: "tickets",
|
|
16
23
|
replace: !0
|
|
17
24
|
})
|
|
18
25
|
}),
|
|
19
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ l(o, {
|
|
20
27
|
path: "tickets",
|
|
21
|
-
element: /* @__PURE__ */
|
|
28
|
+
element: /* @__PURE__ */ l(n, {})
|
|
22
29
|
}),
|
|
23
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ l(o, {
|
|
24
31
|
path: "tickets/new",
|
|
25
|
-
element: /* @__PURE__ */
|
|
32
|
+
element: /* @__PURE__ */ l(a, {
|
|
26
33
|
to: "../tickets",
|
|
27
34
|
replace: !0
|
|
28
35
|
})
|
|
29
36
|
}),
|
|
30
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ l(o, {
|
|
31
38
|
path: "tickets/:ticketId",
|
|
32
|
-
element: /* @__PURE__ */
|
|
39
|
+
element: /* @__PURE__ */ l(d, {})
|
|
33
40
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ l(o, {
|
|
35
42
|
path: "inquiries",
|
|
36
|
-
element: /* @__PURE__ */
|
|
43
|
+
element: /* @__PURE__ */ l(f, {})
|
|
37
44
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ l(o, {
|
|
39
46
|
path: "inquiries/:id",
|
|
40
|
-
element: /* @__PURE__ */
|
|
47
|
+
element: /* @__PURE__ */ l(p, {})
|
|
41
48
|
}),
|
|
42
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ l(o, {
|
|
43
50
|
path: "applications",
|
|
44
|
-
element: /* @__PURE__ */
|
|
51
|
+
element: /* @__PURE__ */ l(m, {})
|
|
45
52
|
}),
|
|
46
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ l(o, {
|
|
47
54
|
path: "applications/:id",
|
|
48
|
-
element: /* @__PURE__ */
|
|
55
|
+
element: /* @__PURE__ */ l(h, {})
|
|
49
56
|
}),
|
|
50
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ l(o, {
|
|
51
58
|
path: "kb",
|
|
52
|
-
element: /* @__PURE__ */
|
|
59
|
+
element: /* @__PURE__ */ l(g, {})
|
|
53
60
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ l(o, {
|
|
55
62
|
path: "kb/articles/new",
|
|
56
|
-
element: /* @__PURE__ */
|
|
63
|
+
element: /* @__PURE__ */ l(v, {})
|
|
57
64
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ l(o, {
|
|
59
66
|
path: "kb/articles/:slug",
|
|
60
|
-
element: /* @__PURE__ */
|
|
67
|
+
element: /* @__PURE__ */ l(_, {})
|
|
61
68
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ l(o, {
|
|
63
70
|
path: "kb/articles/:slug/edit",
|
|
64
|
-
element: /* @__PURE__ */
|
|
71
|
+
element: /* @__PURE__ */ l(y, {})
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ l(o, {
|
|
74
|
+
path: "knowledge-base/*",
|
|
75
|
+
element: /* @__PURE__ */ l(S, {})
|
|
65
76
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ l(o, {
|
|
67
78
|
path: "analytics",
|
|
68
|
-
element: /* @__PURE__ */
|
|
79
|
+
element: /* @__PURE__ */ l(b, {})
|
|
69
80
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ l(o, {
|
|
71
82
|
path: "settings",
|
|
72
|
-
element: /* @__PURE__ */
|
|
83
|
+
element: /* @__PURE__ */ l(x, {})
|
|
73
84
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ l(o, {
|
|
75
86
|
path: "*",
|
|
76
|
-
element: /* @__PURE__ */
|
|
87
|
+
element: /* @__PURE__ */ l(e, {})
|
|
77
88
|
})
|
|
78
89
|
] })
|
|
79
90
|
});
|
|
80
91
|
}
|
|
81
92
|
//#endregion
|
|
82
|
-
export {
|
|
93
|
+
export { C as SupportAdminRoutes };
|
|
83
94
|
|
|
84
95
|
//# sourceMappingURL=SupportAdminRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportAdminRoutes.js","names":[],"sources":["../../src/support/SupportAdminRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate } from 'react-router-dom';\nimport { PageLoader, CatchAllRedirect } from './components/RouteHelpers';\n\n// TicketListPage is eagerly imported — it's the default landing page after redirect,\n// so lazy-loading would cause a visible loading flash on every initial navigation.\nimport { TicketListPage } from './pages/TicketListPage';\n\n// Lazy loaded pages — admin-specific variants for mixed pages\nconst TicketDetailAdminPage = lazy(() =>\n import('./pages/TicketDetailAdminPage').then((m) => ({ default: m.TicketDetailAdminPage }))\n);\nconst ContactInquiriesPage = lazy(() =>\n import('./pages/ContactInquiriesPage').then((m) => ({ default: m.ContactInquiriesPage }))\n);\nconst ContactInquiryDetailPage = lazy(() =>\n import('./pages/ContactInquiryDetailPage').then((m) => ({\n default: m.ContactInquiryDetailPage,\n }))\n);\nconst JobApplicationsPage = lazy(() =>\n import('./pages/JobApplicationsPage').then((m) => ({ default: m.JobApplicationsPage }))\n);\nconst JobApplicationDetailPage = lazy(() =>\n import('./pages/JobApplicationDetailPage').then((m) => ({\n default: m.JobApplicationDetailPage,\n }))\n);\nconst KnowledgeBaseAdminPage = lazy(() =>\n import('./pages/KnowledgeBaseAdminPage').then((m) => ({ default: m.KnowledgeBaseAdminPage }))\n);\nconst ArticleDetailAdminPage = lazy(() =>\n import('./pages/ArticleDetailAdminPage').then((m) => ({ default: m.ArticleDetailAdminPage }))\n);\nconst CreateArticlePage = lazy(() =>\n import('./pages/CreateArticlePage').then((m) => ({ default: m.CreateArticlePage }))\n);\nconst EditArticlePage = lazy(() =>\n import('./pages/EditArticlePage').then((m) => ({ default: m.EditArticlePage }))\n);\nconst AnalyticsPage = lazy(() =>\n import('./pages/AnalyticsPage').then((m) => ({ default: m.AnalyticsPage }))\n);\nconst SettingsPage = lazy(() =>\n import('./pages/SettingsPage').then((m) => ({ default: m.SettingsPage }))\n);\n\n/**\n * Admin-facing routes for the Support microfrontend.\n *\n * Includes all support management routes:\n * - Ticket management (list and view with full admin controls)\n * - Contact inquiries management\n * - Knowledge base authoring (create, edit, publish)\n * - Support analytics and reporting\n * - Support settings (SLA policies, canned responses, categories)\n *\n * User-only ticket and knowledge-base routes are excluded — see SupportUserRoutes for those.\n */\nexport function SupportAdminRoutes() {\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Default redirect */}\n <Route index element={<Navigate to=\"tickets\" replace />} />\n\n {/* Tickets */}\n <Route path=\"tickets\" element={<TicketListPage />} />\n <Route path=\"tickets/new\" element={<Navigate to=\"../tickets\" replace />} />\n <Route path=\"tickets/:ticketId\" element={<TicketDetailAdminPage />} />\n\n {/* Contact Inquiries */}\n <Route path=\"inquiries\" element={<ContactInquiriesPage />} />\n <Route path=\"inquiries/:id\" element={<ContactInquiryDetailPage />} />\n\n {/* Job Applications (careers form submissions) */}\n <Route path=\"applications\" element={<JobApplicationsPage />} />\n <Route path=\"applications/:id\" element={<JobApplicationDetailPage />} />\n\n {/* Knowledge Base (full authoring) */}\n <Route path=\"kb\" element={<KnowledgeBaseAdminPage />} />\n <Route path=\"kb/articles/new\" element={<CreateArticlePage />} />\n <Route path=\"kb/articles/:slug\" element={<ArticleDetailAdminPage />} />\n <Route path=\"kb/articles/:slug/edit\" element={<EditArticlePage />} />\n\n {/* Analytics (admin/manager only) */}\n <Route path=\"analytics\" element={<AnalyticsPage />} />\n\n {/* Settings (admin only) */}\n <Route path=\"settings\" element={<SettingsPage />} />\n\n {/* Catch-all redirect */}\n <Route path=\"*\" element={<CatchAllRedirect />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;AASA,IAAM,IAAwB,QAC5B,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAC5F,EACK,IAAuB,QAC3B,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAC1F,EACK,IAA2B,QAC/B,OAAO,uCAAoC,MAAM,OAAO,EACtD,SAAS,EAAE,0BACZ,EAAE,CACJ,EACK,IAAsB,QAC1B,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,CACxF,EACK,IAA2B,QAC/B,OAAO,uCAAoC,MAAM,OAAO,EACtD,SAAS,EAAE,0BACZ,EAAE,CACJ,EACK,IAAyB,QAC7B,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAC9F,EACK,IAAyB,QAC7B,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAC9F,EACK,IAAoB,QACxB,OAAO,gCAA6B,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CACpF,EACK,IAAkB,QACtB,OAAO,8BAA2B,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAChF,EACK,IAAgB,QACpB,OAAO,4BAAyB,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAC5E,EACK,IAAe,QACnB,OAAO,2BAAwB,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAC1E;
|
|
1
|
+
{"version":3,"file":"SupportAdminRoutes.js","names":[],"sources":["../../src/support/SupportAdminRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { PageLoader, CatchAllRedirect } from './components/RouteHelpers';\n\n// TicketListPage is eagerly imported — it's the default landing page after redirect,\n// so lazy-loading would cause a visible loading flash on every initial navigation.\nimport { TicketListPage } from './pages/TicketListPage';\n\n// Lazy loaded pages — admin-specific variants for mixed pages\nconst TicketDetailAdminPage = lazy(() =>\n import('./pages/TicketDetailAdminPage').then((m) => ({ default: m.TicketDetailAdminPage }))\n);\nconst ContactInquiriesPage = lazy(() =>\n import('./pages/ContactInquiriesPage').then((m) => ({ default: m.ContactInquiriesPage }))\n);\nconst ContactInquiryDetailPage = lazy(() =>\n import('./pages/ContactInquiryDetailPage').then((m) => ({\n default: m.ContactInquiryDetailPage,\n }))\n);\nconst JobApplicationsPage = lazy(() =>\n import('./pages/JobApplicationsPage').then((m) => ({ default: m.JobApplicationsPage }))\n);\nconst JobApplicationDetailPage = lazy(() =>\n import('./pages/JobApplicationDetailPage').then((m) => ({\n default: m.JobApplicationDetailPage,\n }))\n);\nconst KnowledgeBaseAdminPage = lazy(() =>\n import('./pages/KnowledgeBaseAdminPage').then((m) => ({ default: m.KnowledgeBaseAdminPage }))\n);\nconst ArticleDetailAdminPage = lazy(() =>\n import('./pages/ArticleDetailAdminPage').then((m) => ({ default: m.ArticleDetailAdminPage }))\n);\nconst CreateArticlePage = lazy(() =>\n import('./pages/CreateArticlePage').then((m) => ({ default: m.CreateArticlePage }))\n);\nconst EditArticlePage = lazy(() =>\n import('./pages/EditArticlePage').then((m) => ({ default: m.EditArticlePage }))\n);\nconst AnalyticsPage = lazy(() =>\n import('./pages/AnalyticsPage').then((m) => ({ default: m.AnalyticsPage }))\n);\nconst SettingsPage = lazy(() =>\n import('./pages/SettingsPage').then((m) => ({ default: m.SettingsPage }))\n);\n\n// /knowledge-base/* deep links land here and immediately redirect to the canonical\n// /kb/* path so the URL stays consistent with the page-level navigation (which\n// hardcodes /kb paths). One wildcard route covers every sub-path so adding new\n// kb/* routes does not require maintaining a parallel knowledge-base/* mirror.\nfunction KnowledgeBaseAliasRedirect() {\n const location = useLocation();\n const targetPath = location.pathname.replace('/knowledge-base', '/kb');\n return <Navigate to={`${targetPath}${location.search}${location.hash}`} replace />;\n}\n\n/**\n * Admin-facing routes for the Support microfrontend.\n *\n * Includes all support management routes:\n * - Ticket management (list and view with full admin controls)\n * - Contact inquiries management\n * - Knowledge base authoring (create, edit, publish)\n * - Support analytics and reporting\n * - Support settings (SLA policies, canned responses, categories)\n *\n * User-only ticket and knowledge-base routes are excluded — see SupportUserRoutes for those.\n */\nexport function SupportAdminRoutes() {\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Default redirect */}\n <Route index element={<Navigate to=\"tickets\" replace />} />\n\n {/* Tickets */}\n <Route path=\"tickets\" element={<TicketListPage />} />\n <Route path=\"tickets/new\" element={<Navigate to=\"../tickets\" replace />} />\n <Route path=\"tickets/:ticketId\" element={<TicketDetailAdminPage />} />\n\n {/* Contact Inquiries */}\n <Route path=\"inquiries\" element={<ContactInquiriesPage />} />\n <Route path=\"inquiries/:id\" element={<ContactInquiryDetailPage />} />\n\n {/* Job Applications (careers form submissions) */}\n <Route path=\"applications\" element={<JobApplicationsPage />} />\n <Route path=\"applications/:id\" element={<JobApplicationDetailPage />} />\n\n {/* Knowledge Base (full authoring) — canonical /kb paths */}\n <Route path=\"kb\" element={<KnowledgeBaseAdminPage />} />\n <Route path=\"kb/articles/new\" element={<CreateArticlePage />} />\n <Route path=\"kb/articles/:slug\" element={<ArticleDetailAdminPage />} />\n <Route path=\"kb/articles/:slug/edit\" element={<EditArticlePage />} />\n\n {/* /knowledge-base/* alias — redirects to the canonical /kb/* path */}\n <Route path=\"knowledge-base/*\" element={<KnowledgeBaseAliasRedirect />} />\n\n {/* Analytics (admin/manager only) */}\n <Route path=\"analytics\" element={<AnalyticsPage />} />\n\n {/* Settings (admin only) */}\n <Route path=\"settings\" element={<SettingsPage />} />\n\n {/* Catch-all redirect */}\n <Route path=\"*\" element={<CatchAllRedirect />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":"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"}
|
|
@@ -1,49 +1,60 @@
|
|
|
1
1
|
import { CatchAllRedirect as e, PageLoader as t } from "./components/RouteHelpers.js";
|
|
2
2
|
import { TicketListPage as n } from "./pages/TicketListPage.js";
|
|
3
3
|
import { Suspense as r, lazy as i } from "react";
|
|
4
|
-
import { Navigate as a, Route as o, Routes as s } from "react-router-dom";
|
|
5
|
-
import { jsx as
|
|
4
|
+
import { Navigate as a, Route as o, Routes as s, useLocation as c } from "react-router-dom";
|
|
5
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
6
|
//#region src/support/SupportUserRoutes.tsx
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
var d = i(() => import("./pages/TicketDetailUserPage.js").then((e) => ({ default: e.TicketDetailUserPage }))), f = i(() => import("./pages/CreateTicketPage.js").then((e) => ({ default: e.CreateTicketPage }))), p = i(() => import("./pages/KnowledgeBaseUserPage.js").then((e) => ({ default: e.KnowledgeBaseUserPage }))), m = i(() => import("./pages/ArticleDetailUserPage.js").then((e) => ({ default: e.ArticleDetailUserPage })));
|
|
8
|
+
function h() {
|
|
9
|
+
let e = c();
|
|
10
|
+
return /* @__PURE__ */ l(a, {
|
|
11
|
+
to: `${e.pathname.replace("/knowledge-base", "/kb")}${e.search}${e.hash}`,
|
|
12
|
+
replace: !0
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function g() {
|
|
16
|
+
return /* @__PURE__ */ l(r, {
|
|
17
|
+
fallback: /* @__PURE__ */ l(t, {}),
|
|
18
|
+
children: /* @__PURE__ */ u(s, { children: [
|
|
19
|
+
/* @__PURE__ */ l(o, {
|
|
13
20
|
index: !0,
|
|
14
|
-
element: /* @__PURE__ */
|
|
21
|
+
element: /* @__PURE__ */ l(a, {
|
|
15
22
|
to: "tickets",
|
|
16
23
|
replace: !0
|
|
17
24
|
})
|
|
18
25
|
}),
|
|
19
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ l(o, {
|
|
20
27
|
path: "tickets",
|
|
21
|
-
element: /* @__PURE__ */
|
|
28
|
+
element: /* @__PURE__ */ l(n, {})
|
|
22
29
|
}),
|
|
23
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ l(o, {
|
|
24
31
|
path: "tickets/new",
|
|
25
|
-
element: /* @__PURE__ */
|
|
32
|
+
element: /* @__PURE__ */ l(f, {})
|
|
26
33
|
}),
|
|
27
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ l(o, {
|
|
28
35
|
path: "tickets/:ticketId",
|
|
29
|
-
element: /* @__PURE__ */
|
|
36
|
+
element: /* @__PURE__ */ l(d, {})
|
|
30
37
|
}),
|
|
31
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ l(o, {
|
|
32
39
|
path: "kb",
|
|
33
|
-
element: /* @__PURE__ */
|
|
40
|
+
element: /* @__PURE__ */ l(p, {})
|
|
34
41
|
}),
|
|
35
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ l(o, {
|
|
36
43
|
path: "kb/articles/:slug",
|
|
37
|
-
element: /* @__PURE__ */
|
|
44
|
+
element: /* @__PURE__ */ l(m, {})
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ l(o, {
|
|
47
|
+
path: "knowledge-base/*",
|
|
48
|
+
element: /* @__PURE__ */ l(h, {})
|
|
38
49
|
}),
|
|
39
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ l(o, {
|
|
40
51
|
path: "*",
|
|
41
|
-
element: /* @__PURE__ */
|
|
52
|
+
element: /* @__PURE__ */ l(e, {})
|
|
42
53
|
})
|
|
43
54
|
] })
|
|
44
55
|
});
|
|
45
56
|
}
|
|
46
57
|
//#endregion
|
|
47
|
-
export {
|
|
58
|
+
export { g as SupportUserRoutes };
|
|
48
59
|
|
|
49
60
|
//# sourceMappingURL=SupportUserRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportUserRoutes.js","names":[],"sources":["../../src/support/SupportUserRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate } from 'react-router-dom';\nimport { PageLoader, CatchAllRedirect } from './components/RouteHelpers';\n\n// TicketListPage is eagerly imported — it's the default landing page after redirect,\n// so lazy-loading would cause a visible loading flash on every initial navigation.\nimport { TicketListPage } from './pages/TicketListPage';\n\n// Lazy loaded pages — user-specific variants for mixed pages\nconst TicketDetailUserPage = lazy(() =>\n import('./pages/TicketDetailUserPage').then((m) => ({ default: m.TicketDetailUserPage }))\n);\nconst CreateTicketPage = lazy(() =>\n import('./pages/CreateTicketPage').then((m) => ({ default: m.CreateTicketPage }))\n);\nconst KnowledgeBaseUserPage = lazy(() =>\n import('./pages/KnowledgeBaseUserPage').then((m) => ({ default: m.KnowledgeBaseUserPage }))\n);\nconst ArticleDetailUserPage = lazy(() =>\n import('./pages/ArticleDetailUserPage').then((m) => ({ default: m.ArticleDetailUserPage }))\n);\n/**\n * User-facing routes for the Support microfrontend.\n *\n * Only includes routes relevant to end users:\n * - Ticket management (list, create, view)\n * - Knowledge base browsing (read-only, published articles)\n *\n * Admin-only features (inquiries, analytics, settings, KB authoring)\n * are excluded — see SupportAdminRoutes for those.\n */\nexport function SupportUserRoutes() {\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Default redirect */}\n <Route index element={<Navigate to=\"tickets\" replace />} />\n\n {/* Tickets */}\n <Route path=\"tickets\" element={<TicketListPage />} />\n <Route path=\"tickets/new\" element={<CreateTicketPage />} />\n <Route path=\"tickets/:ticketId\" element={<TicketDetailUserPage />} />\n\n {/* Knowledge Base
|
|
1
|
+
{"version":3,"file":"SupportUserRoutes.js","names":[],"sources":["../../src/support/SupportUserRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { PageLoader, CatchAllRedirect } from './components/RouteHelpers';\n\n// TicketListPage is eagerly imported — it's the default landing page after redirect,\n// so lazy-loading would cause a visible loading flash on every initial navigation.\nimport { TicketListPage } from './pages/TicketListPage';\n\n// Lazy loaded pages — user-specific variants for mixed pages\nconst TicketDetailUserPage = lazy(() =>\n import('./pages/TicketDetailUserPage').then((m) => ({ default: m.TicketDetailUserPage }))\n);\nconst CreateTicketPage = lazy(() =>\n import('./pages/CreateTicketPage').then((m) => ({ default: m.CreateTicketPage }))\n);\nconst KnowledgeBaseUserPage = lazy(() =>\n import('./pages/KnowledgeBaseUserPage').then((m) => ({ default: m.KnowledgeBaseUserPage }))\n);\nconst ArticleDetailUserPage = lazy(() =>\n import('./pages/ArticleDetailUserPage').then((m) => ({ default: m.ArticleDetailUserPage }))\n);\n\n// /knowledge-base/* deep links land here and immediately redirect to the canonical\n// /kb/* path so the URL stays consistent with the page-level navigation (which\n// hardcodes /kb paths). One wildcard route covers every sub-path so adding new\n// kb/* routes does not require maintaining a parallel knowledge-base/* mirror.\nfunction KnowledgeBaseAliasRedirect() {\n const location = useLocation();\n const targetPath = location.pathname.replace('/knowledge-base', '/kb');\n return <Navigate to={`${targetPath}${location.search}${location.hash}`} replace />;\n}\n\n/**\n * User-facing routes for the Support microfrontend.\n *\n * Only includes routes relevant to end users:\n * - Ticket management (list, create, view)\n * - Knowledge base browsing (read-only, published articles)\n *\n * Admin-only features (inquiries, analytics, settings, KB authoring)\n * are excluded — see SupportAdminRoutes for those.\n */\nexport function SupportUserRoutes() {\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Default redirect */}\n <Route index element={<Navigate to=\"tickets\" replace />} />\n\n {/* Tickets */}\n <Route path=\"tickets\" element={<TicketListPage />} />\n <Route path=\"tickets/new\" element={<CreateTicketPage />} />\n <Route path=\"tickets/:ticketId\" element={<TicketDetailUserPage />} />\n\n {/* Knowledge Base — canonical /kb paths */}\n <Route path=\"kb\" element={<KnowledgeBaseUserPage />} />\n <Route path=\"kb/articles/:slug\" element={<ArticleDetailUserPage />} />\n\n {/* /knowledge-base/* alias — redirects to the canonical /kb/* path */}\n <Route path=\"knowledge-base/*\" element={<KnowledgeBaseAliasRedirect />} />\n\n {/* Catch-all redirect */}\n <Route path=\"*\" element={<CatchAllRedirect />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;AASA,IAAM,IAAuB,QAC3B,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAC1F,EACK,IAAmB,QACvB,OAAO,+BAA4B,MAAM,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAClF,EACK,IAAwB,QAC5B,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAC5F,EACK,IAAwB,QAC5B,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAC5F;AAMD,SAAS,IAA6B;CACpC,IAAM,IAAW,GAAa;AAE9B,QAAO,kBAAC,GAAD;EAAU,IAAI,GADF,EAAS,SAAS,QAAQ,mBAAmB,MAAM,GACjC,EAAS,SAAS,EAAS;EAAQ,SAAA;EAAU,CAAA;;AAapF,SAAgB,IAAoB;AAClC,QACE,kBAAC,GAAD;EAAU,UAAU,kBAAC,GAAD,EAAc,CAAA;YAChC,kBAAC,GAAD,EAAA,UAAA;GAEE,kBAAC,GAAD;IAAO,OAAA;IAAM,SAAS,kBAAC,GAAD;KAAU,IAAG;KAAU,SAAA;KAAU,CAAA;IAAI,CAAA;GAG3D,kBAAC,GAAD;IAAO,MAAK;IAAU,SAAS,kBAAC,GAAD,EAAkB,CAAA;IAAI,CAAA;GACrD,kBAAC,GAAD;IAAO,MAAK;IAAc,SAAS,kBAAC,GAAD,EAAoB,CAAA;IAAI,CAAA;GAC3D,kBAAC,GAAD;IAAO,MAAK;IAAoB,SAAS,kBAAC,GAAD,EAAwB,CAAA;IAAI,CAAA;GAGrE,kBAAC,GAAD;IAAO,MAAK;IAAK,SAAS,kBAAC,GAAD,EAAyB,CAAA;IAAI,CAAA;GACvD,kBAAC,GAAD;IAAO,MAAK;IAAoB,SAAS,kBAAC,GAAD,EAAyB,CAAA;IAAI,CAAA;GAGtE,kBAAC,GAAD;IAAO,MAAK;IAAmB,SAAS,kBAAC,GAAD,EAA8B,CAAA;IAAI,CAAA;GAG1E,kBAAC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAC,GAAD,EAAoB,CAAA;IAAI,CAAA;GAC1C,EAAA,CAAA;EACA,CAAA"}
|
|
@@ -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-
|
|
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-500", 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", {
|
|
@@ -74,7 +74,7 @@ function o({ message: r = "Loading...", className: i }) {
|
|
|
74
74
|
className: e("flex flex-col items-center justify-center py-20", i),
|
|
75
75
|
children: [/* @__PURE__ */ n("div", {
|
|
76
76
|
className: "relative",
|
|
77
|
-
children: [/* @__PURE__ */ t("div", { className: "absolute inset-0 bg-primary/20 rounded-full blur-xl animate-pulse" }), /* @__PURE__ */ t("div", { className: "relative
|
|
77
|
+
children: [/* @__PURE__ */ t("div", { className: "absolute inset-0 bg-primary/20 rounded-full blur-xl animate-pulse" }), /* @__PURE__ */ t("div", { className: "relative size-12 border-4 border-primary/30 border-t-primary rounded-full animate-spin" })]
|
|
78
78
|
}), /* @__PURE__ */ t("span", {
|
|
79
79
|
className: "mt-6 text-sm font-medium text-muted-foreground",
|
|
80
80
|
children: r
|
|
@@ -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-
|
|
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-500',\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-primary/10 text-primary\">\n {icon}\n </div>\n )}\n {title && (\n <h1 className=\"text-2xl sm:text-3xl font-bold tracking-tight text-foreground\">\n {title}\n </h1>\n )}\n </div>\n )}\n {subtitle && (\n <p className=\"text-sm sm:text-base text-muted-foreground 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-300',\n className\n )}\n >\n {icon && <div className=\"mb-4 p-4 rounded-2xl bg-muted/50 text-muted-foreground\">{icon}</div>}\n <h3 className=\"text-lg font-semibold text-foreground mb-1\">{title}</h3>\n {description && <p className=\"text-sm text-muted-foreground 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-primary/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-muted-foreground\">{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;iBAAwD;OAAa,CAAA,CAEhF;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,KAAQ,kBAAC,OAAD;IAAK,WAAU;cAA0D;IAAW,CAAA;GAC7F,kBAAC,MAAD;IAAI,WAAU;cAA8C;IAAW,CAAA;GACtE,KAAe,kBAAC,KAAD;IAAG,WAAU;cAA+C;IAAgB,CAAA;GAC3F;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,qEAAsE,CAAA,EACrF,kBAAC,OAAD,EAAK,WAAU,0FAA2F,CAAA,CACtG;MACN,kBAAC,QAAD;GAAM,WAAU;aAAkD;GAAe,CAAA,CAC7E"}
|
|
@@ -7,7 +7,7 @@ import { jsx as i } from "react/jsx-runtime";
|
|
|
7
7
|
function a() {
|
|
8
8
|
return /* @__PURE__ */ i("div", {
|
|
9
9
|
className: "flex h-64 items-center justify-center",
|
|
10
|
-
children: /* @__PURE__ */ i("div", { className: "
|
|
10
|
+
children: /* @__PURE__ */ i("div", { className: "size-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
function o() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteHelpers.js","names":[],"sources":["../../../src/support/components/RouteHelpers.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useSupport } from '../providers/SupportProvider';\nimport { joinPath } from '../utils';\n\n/**\n * Shared loading fallback for lazy-loaded route pages.\n */\nexport function PageLoader() {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"
|
|
1
|
+
{"version":3,"file":"RouteHelpers.js","names":[],"sources":["../../../src/support/components/RouteHelpers.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useSupport } from '../providers/SupportProvider';\nimport { joinPath } from '../utils';\n\n/**\n * Shared loading fallback for lazy-loaded route pages.\n */\nexport function PageLoader() {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"size-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n </div>\n );\n}\n\n/**\n * Catch-all redirect that sends unknown paths to the tickets page.\n * Uses basePath from SupportProvider context and joinPath to avoid double-slashes.\n */\nexport function CatchAllRedirect() {\n const { basePath = '/' } = useSupport();\n const navigate = useNavigate();\n useEffect(() => {\n navigate(joinPath(basePath, 'tickets'), { replace: true });\n }, [basePath, navigate]);\n return null;\n}\n"],"mappings":";;;;;;AAQA,SAAgB,IAAa;AAC3B,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD,EAAK,WAAU,iFAAkF,CAAA;EAC7F,CAAA;;AAQV,SAAgB,IAAmB;CACjC,IAAM,EAAE,cAAW,QAAQ,GAAY,EACjC,IAAW,GAAa;AAI9B,QAHA,QAAgB;AACd,IAAS,EAAS,GAAU,UAAU,EAAE,EAAE,SAAS,IAAM,CAAC;IACzD,CAAC,GAAU,EAAS,CAAC,EACjB"}
|
|
@@ -17,13 +17,13 @@ function r({ trends: r, period: i }) {
|
|
|
17
17
|
})] })
|
|
18
18
|
}), /* @__PURE__ */ t("div", {
|
|
19
19
|
className: "space-y-2",
|
|
20
|
-
children: r.map((e
|
|
21
|
-
let
|
|
20
|
+
children: r.map((e) => {
|
|
21
|
+
let r = (e.value - o) / s * 100, i = new Date(e.timestamp);
|
|
22
22
|
return /* @__PURE__ */ n("div", {
|
|
23
23
|
className: "flex items-center gap-3 transition-colors duration-200 hover:bg-muted/50 p-1 rounded",
|
|
24
24
|
children: [/* @__PURE__ */ t("span", {
|
|
25
25
|
className: "text-xs w-20 text-right text-tertiary",
|
|
26
|
-
children: e.label ||
|
|
26
|
+
children: e.label || i.toLocaleDateString("en-US", {
|
|
27
27
|
month: "short",
|
|
28
28
|
day: "numeric"
|
|
29
29
|
})
|
|
@@ -31,13 +31,13 @@ function r({ trends: r, period: i }) {
|
|
|
31
31
|
className: "flex-1 flex items-center gap-2",
|
|
32
32
|
children: [/* @__PURE__ */ t("div", {
|
|
33
33
|
className: "h-8 rounded transition-all duration-300 bg-primary/80 hover:bg-primary",
|
|
34
|
-
style: { width: `${Math.max(
|
|
34
|
+
style: { width: `${Math.max(r, 2)}%` }
|
|
35
35
|
}), /* @__PURE__ */ t("span", {
|
|
36
36
|
className: "text-sm font-medium text-primary",
|
|
37
37
|
children: e.value
|
|
38
38
|
})]
|
|
39
39
|
})]
|
|
40
|
-
},
|
|
40
|
+
}, e.timestamp);
|
|
41
41
|
})
|
|
42
42
|
})]
|
|
43
43
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrendChart.js","names":[],"sources":["../../../../src/support/components/analytics/TrendChart.tsx"],"sourcesContent":["import { TrendingUp } from 'lucide-react';\n\ninterface TrendDataPoint {\n timestamp: string;\n value: number;\n label?: string | null;\n}\n\ninterface TrendChartProps {\n trends: TrendDataPoint[];\n period: {\n startDate: string;\n endDate: string;\n label: string;\n };\n}\n\nexport function TrendChart({ trends, period }: TrendChartProps) {\n if (!trends || trends.length === 0) {\n return null;\n }\n\n const maxValue = Math.max(...trends.map((t) => t.value));\n const minValue = Math.min(...trends.map((t) => t.value));\n const range = maxValue - minValue || 1;\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 <div className=\"flex items-center justify-between mb-6\">\n <div>\n <h2 className=\"text-xl font-semibold flex items-center gap-2 text-primary\">\n <TrendingUp size={20} />\n Ticket Volume Trends\n </h2>\n <p className=\"text-sm mt-1 text-secondary\">{period.label}</p>\n </div>\n </div>\n\n <div className=\"space-y-2\">\n {trends.map((point
|
|
1
|
+
{"version":3,"file":"TrendChart.js","names":[],"sources":["../../../../src/support/components/analytics/TrendChart.tsx"],"sourcesContent":["import { TrendingUp } from 'lucide-react';\n\ninterface TrendDataPoint {\n timestamp: string;\n value: number;\n label?: string | null;\n}\n\ninterface TrendChartProps {\n trends: TrendDataPoint[];\n period: {\n startDate: string;\n endDate: string;\n label: string;\n };\n}\n\nexport function TrendChart({ trends, period }: TrendChartProps) {\n if (!trends || trends.length === 0) {\n return null;\n }\n\n const maxValue = Math.max(...trends.map((t) => t.value));\n const minValue = Math.min(...trends.map((t) => t.value));\n const range = maxValue - minValue || 1;\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 <div className=\"flex items-center justify-between mb-6\">\n <div>\n <h2 className=\"text-xl font-semibold flex items-center gap-2 text-primary\">\n <TrendingUp size={20} />\n Ticket Volume Trends\n </h2>\n <p className=\"text-sm mt-1 text-secondary\">{period.label}</p>\n </div>\n </div>\n\n <div className=\"space-y-2\">\n {trends.map((point) => {\n const heightPercent = ((point.value - minValue) / range) * 100;\n const date = new Date(point.timestamp);\n const label =\n point.label || date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });\n\n return (\n <div\n key={point.timestamp}\n className=\"flex items-center gap-3 transition-colors duration-200 hover:bg-muted/50 p-1 rounded\"\n >\n <span className=\"text-xs w-20 text-right text-tertiary\">{label}</span>\n <div className=\"flex-1 flex items-center gap-2\">\n <div\n className=\"h-8 rounded transition-all duration-300 bg-primary/80 hover:bg-primary\"\n style={{\n width: `${Math.max(heightPercent, 2)}%`,\n }}\n />\n <span className=\"text-sm font-medium text-primary\">{point.value}</span>\n </div>\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n"],"mappings":";;;AAiBA,SAAgB,EAAW,EAAE,WAAQ,aAA2B;AAC9D,KAAI,CAAC,KAAU,EAAO,WAAW,EAC/B,QAAO;CAGT,IAAM,IAAW,KAAK,IAAI,GAAG,EAAO,KAAK,MAAM,EAAE,MAAM,CAAC,EAClD,IAAW,KAAK,IAAI,GAAG,EAAO,KAAK,MAAM,EAAE,MAAM,CAAC,EAClD,IAAQ,IAAW,KAAY;AAErC,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;cAAd,CACE,kBAAC,GAAD,EAAY,MAAM,IAAM,CAAA,EAAA,uBAErB;OACL,kBAAC,KAAD;IAAG,WAAU;cAA+B,EAAO;IAAU,CAAA,CACzD,EAAA,CAAA;GACF,CAAA,EAEN,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAO,KAAK,MAAU;IACrB,IAAM,KAAkB,EAAM,QAAQ,KAAY,IAAS,KACrD,IAAO,IAAI,KAAK,EAAM,UAAU;AAItC,WACE,kBAAC,OAAD;KAEE,WAAU;eAFZ,CAIE,kBAAC,QAAD;MAAM,WAAU;gBAPlB,EAAM,SAAS,EAAK,mBAAmB,SAAS;OAAE,OAAO;OAAS,KAAK;OAAW,CAAC;MAOX,CAAA,EACtE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,OAAD;OACE,WAAU;OACV,OAAO,EACL,OAAO,GAAG,KAAK,IAAI,GAAe,EAAE,CAAC,IACtC;OACD,CAAA,EACF,kBAAC,QAAD;OAAM,WAAU;iBAAoC,EAAM;OAAa,CAAA,CACnE;QACF;OAbC,EAAM,UAaP;KAER;GACE,CAAA,CACF"}
|