@burdenoff/microfe-support 2026.830.1 → 2026.830.2
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/index.js +2 -1
- package/dist/support/SupportAdminRoot.js +31 -34
- package/dist/support/SupportAdminRoot.js.map +1 -1
- package/dist/support/SupportUserRoot.js +19 -22
- package/dist/support/SupportUserRoot.js.map +1 -1
- package/dist/support/components/PageLayout.d.ts +1 -1
- package/dist/support/components/PageLayout.js +46 -44
- package/dist/support/components/PageLayout.js.map +1 -1
- package/dist/support/components/analytics/CategoryBreakdown.js +24 -23
- package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
- package/dist/support/components/analytics/PriorityBreakdown.js +27 -26
- package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
- package/dist/support/components/analytics/SLAReport.js +48 -54
- package/dist/support/components/analytics/SLAReport.js.map +1 -1
- package/dist/support/components/analytics/SatisfactionDistribution.js +56 -59
- package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
- package/dist/support/components/analytics/TopAgents.js +27 -26
- package/dist/support/components/analytics/TopAgents.js.map +1 -1
- package/dist/support/components/analytics/TrendChart.js +23 -21
- package/dist/support/components/analytics/TrendChart.js.map +1 -1
- package/dist/support/components/kb/ArticleForm.js +145 -132
- package/dist/support/components/kb/ArticleForm.js.map +1 -1
- package/dist/support/components/settings/CannedResponsesSettings.js +104 -103
- package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js +120 -123
- package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
- package/dist/support/components/settings/TicketCategoriesSettings.js +175 -180
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/tickets/AttachmentList.js +21 -20
- package/dist/support/components/tickets/AttachmentList.js.map +1 -1
- package/dist/support/components/tickets/MessageComposer.js +35 -35
- package/dist/support/components/tickets/MessageThread.js +55 -54
- package/dist/support/components/tickets/MessageThread.js.map +1 -1
- package/dist/support/components/tickets/TicketDetailHeader.js +62 -57
- package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
- package/dist/support/components/tickets/TicketHeader.js +47 -47
- package/dist/support/components/tickets/TicketSidebar.js +122 -121
- package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
- package/dist/support/hooks/index.d.ts +1 -0
- package/dist/support/hooks/index.js +1 -0
- package/dist/support/hooks/useTr.d.ts +16 -0
- package/dist/support/hooks/useTr.js +12 -0
- package/dist/support/hooks/useTr.js.map +1 -0
- package/dist/support/index.d.ts +1 -0
- package/dist/support/index.js +2 -1
- package/dist/support/pages/AnalyticsPage.js +151 -145
- package/dist/support/pages/AnalyticsPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +134 -147
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailUserPage.js +70 -79
- package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +140 -139
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +259 -232
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateArticlePage.js +57 -56
- package/dist/support/pages/CreateArticlePage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.js +151 -146
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/EditArticlePage.js +80 -79
- package/dist/support/pages/EditArticlePage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.js +92 -99
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +85 -92
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/SettingsPage.js +88 -87
- package/dist/support/pages/SettingsPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js +91 -90
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
- package/dist/support/pages/TicketDetailUserPage.js +120 -118
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.js +139 -139
- package/dist/support/translations/en.d.ts +814 -0
- package/dist/support/translations/en.js +779 -0
- package/dist/support/translations/en.js.map +1 -0
- package/dist/support/translations/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,65 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useTr as e } from "../../hooks/useTr.js";
|
|
2
|
+
import { GlassCard as t } from "../ui.js";
|
|
3
|
+
import { Award as n, Star as r } from "lucide-react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
5
|
//#region src/support/components/analytics/TopAgents.tsx
|
|
5
|
-
function
|
|
6
|
-
let
|
|
6
|
+
function o({ agents: o }) {
|
|
7
|
+
let s = e(), c = o.slice(0, 5), l = {
|
|
7
8
|
1: "bg-warning/10 text-warning",
|
|
8
9
|
2: "bg-bg-sunken text-text-secondary",
|
|
9
10
|
3: "bg-accent/10 text-accent"
|
|
10
11
|
};
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ a(t, {
|
|
12
13
|
treatment: "insight",
|
|
13
14
|
className: "p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2",
|
|
14
|
-
children: [/* @__PURE__ */
|
|
15
|
+
children: [/* @__PURE__ */ a("h2", {
|
|
15
16
|
className: "text-xl font-semibold mb-4 flex items-center gap-2 text-primary",
|
|
16
|
-
children: [/* @__PURE__ */
|
|
17
|
-
}), /* @__PURE__ */
|
|
17
|
+
children: [/* @__PURE__ */ i(n, { size: 20 }), s("support.analytics.topAgents.title", "Top Performing Agents")]
|
|
18
|
+
}), /* @__PURE__ */ a("div", {
|
|
18
19
|
className: "space-y-4",
|
|
19
|
-
children: [
|
|
20
|
+
children: [c.map((e) => /* @__PURE__ */ a("div", {
|
|
20
21
|
className: "flex items-center gap-4 p-3 rounded-lg bg-bg-sunken transition-colors duration-200 hover:bg-bg-sunken/80",
|
|
21
|
-
children: [/* @__PURE__ */
|
|
22
|
-
className: `w-10 h-10 rounded-full flex items-center justify-center font-bold text-lg flex-shrink-0 ${
|
|
23
|
-
children: e.rank <= 3 ? /* @__PURE__ */
|
|
24
|
-
}), /* @__PURE__ */
|
|
22
|
+
children: [/* @__PURE__ */ i("div", {
|
|
23
|
+
className: `w-10 h-10 rounded-full flex items-center justify-center font-bold text-lg flex-shrink-0 ${l[e.rank] || "bg-bg-sunken text-text-secondary"}`,
|
|
24
|
+
children: e.rank <= 3 ? /* @__PURE__ */ i(n, { size: 18 }) : e.rank
|
|
25
|
+
}), /* @__PURE__ */ a("div", {
|
|
25
26
|
className: "flex-1 min-w-0",
|
|
26
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ a("div", {
|
|
27
28
|
className: "flex items-center justify-between mb-1",
|
|
28
|
-
children: [/* @__PURE__ */
|
|
29
|
+
children: [/* @__PURE__ */ i("p", {
|
|
29
30
|
className: "font-semibold truncate text-primary",
|
|
30
31
|
children: e.agent.user.name
|
|
31
|
-
}), /* @__PURE__ */
|
|
32
|
+
}), /* @__PURE__ */ a("div", {
|
|
32
33
|
className: "flex items-center gap-1",
|
|
33
|
-
children: [/* @__PURE__ */ r
|
|
34
|
+
children: [/* @__PURE__ */ i(r, {
|
|
34
35
|
size: 14,
|
|
35
36
|
className: "text-warning fill-warning"
|
|
36
|
-
}), /* @__PURE__ */
|
|
37
|
+
}), /* @__PURE__ */ i("span", {
|
|
37
38
|
className: "text-sm font-medium text-primary",
|
|
38
39
|
children: e.avgRating.toFixed(1)
|
|
39
40
|
})]
|
|
40
41
|
})]
|
|
41
|
-
}), /* @__PURE__ */
|
|
42
|
+
}), /* @__PURE__ */ a("div", {
|
|
42
43
|
className: "flex items-center justify-between",
|
|
43
|
-
children: [/* @__PURE__ */
|
|
44
|
+
children: [/* @__PURE__ */ i("p", {
|
|
44
45
|
className: "text-xs truncate text-tertiary",
|
|
45
46
|
children: e.agent.user.email
|
|
46
47
|
}), /* @__PURE__ */ i("p", {
|
|
47
48
|
className: "text-xs font-medium text-secondary",
|
|
48
|
-
children:
|
|
49
|
+
children: s("support.analytics.topAgents.resolved", "{{count}} resolved", { count: e.ticketsResolved })
|
|
49
50
|
})]
|
|
50
51
|
})]
|
|
51
52
|
})]
|
|
52
|
-
}, e.agent.id)),
|
|
53
|
+
}, e.agent.id)), c.length === 0 && /* @__PURE__ */ i("div", {
|
|
53
54
|
className: "text-center py-8",
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ i("p", {
|
|
55
56
|
className: "text-tertiary",
|
|
56
|
-
children: "No agent data available"
|
|
57
|
+
children: s("support.analytics.topAgents.empty", "No agent data available")
|
|
57
58
|
})
|
|
58
59
|
})]
|
|
59
60
|
})]
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
63
|
//#endregion
|
|
63
|
-
export {
|
|
64
|
+
export { o as TopAgents };
|
|
64
65
|
|
|
65
66
|
//# sourceMappingURL=TopAgents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopAgents.js","names":[],"sources":["../../../../src/support/components/analytics/TopAgents.tsx"],"sourcesContent":["import { Award, Star } from 'lucide-react';\nimport { GlassCard } from '../ui';\n\ninterface TopAgent {\n agent: {\n id: string;\n user: {\n id: string;\n name: string;\n email: string;\n avatarUrl?: string | null;\n };\n };\n ticketsResolved: number;\n avgRating: number;\n rank: number;\n}\n\ninterface TopAgentsProps {\n agents: TopAgent[];\n}\n\nexport function TopAgents({ agents }: TopAgentsProps) {\n const topAgents = agents.slice(0, 5);\n const rankClasses: Record<number, string> = {\n 1: 'bg-warning/10 text-warning',\n 2: 'bg-bg-sunken text-text-secondary',\n 3: 'bg-accent/10 text-accent',\n };\n\n return (\n <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <h2 className=\"text-xl font-semibold mb-4 flex items-center gap-2 text-primary\">\n <Award size={20} />\n Top Performing Agents\n </h2>\n\n <div className=\"space-y-4\">\n {topAgents.map((agent) => {\n return (\n <div\n key={agent.agent.id}\n className=\"flex items-center gap-4 p-3 rounded-lg bg-bg-sunken transition-colors duration-200 hover:bg-bg-sunken/80\"\n >\n <div\n className={`w-10 h-10 rounded-full flex items-center justify-center font-bold text-lg flex-shrink-0 ${rankClasses[agent.rank] || 'bg-bg-sunken text-text-secondary'}`}\n >\n {agent.rank <= 3 ? <Award size={18} /> : agent.rank}\n </div>\n\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center justify-between mb-1\">\n <p className=\"font-semibold truncate text-primary\">{agent.agent.user.name}</p>\n <div className=\"flex items-center gap-1\">\n <Star size={14} className=\"text-warning fill-warning\" />\n <span className=\"text-sm font-medium text-primary\">\n {agent.avgRating.toFixed(1)}\n </span>\n </div>\n </div>\n <div className=\"flex items-center justify-between\">\n <p className=\"text-xs truncate text-tertiary\">{agent.agent.user.email}</p>\n <p className=\"text-xs font-medium text-secondary\">\n {
|
|
1
|
+
{"version":3,"file":"TopAgents.js","names":[],"sources":["../../../../src/support/components/analytics/TopAgents.tsx"],"sourcesContent":["import { Award, Star } from 'lucide-react';\nimport { GlassCard } from '../ui';\nimport { useTr } from '../../hooks/useTr';\n\ninterface TopAgent {\n agent: {\n id: string;\n user: {\n id: string;\n name: string;\n email: string;\n avatarUrl?: string | null;\n };\n };\n ticketsResolved: number;\n avgRating: number;\n rank: number;\n}\n\ninterface TopAgentsProps {\n agents: TopAgent[];\n}\n\nexport function TopAgents({ agents }: TopAgentsProps) {\n const tr = useTr();\n const topAgents = agents.slice(0, 5);\n const rankClasses: Record<number, string> = {\n 1: 'bg-warning/10 text-warning',\n 2: 'bg-bg-sunken text-text-secondary',\n 3: 'bg-accent/10 text-accent',\n };\n\n return (\n <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <h2 className=\"text-xl font-semibold mb-4 flex items-center gap-2 text-primary\">\n <Award size={20} />\n {tr('support.analytics.topAgents.title', 'Top Performing Agents')}\n </h2>\n\n <div className=\"space-y-4\">\n {topAgents.map((agent) => {\n return (\n <div\n key={agent.agent.id}\n className=\"flex items-center gap-4 p-3 rounded-lg bg-bg-sunken transition-colors duration-200 hover:bg-bg-sunken/80\"\n >\n <div\n className={`w-10 h-10 rounded-full flex items-center justify-center font-bold text-lg flex-shrink-0 ${rankClasses[agent.rank] || 'bg-bg-sunken text-text-secondary'}`}\n >\n {agent.rank <= 3 ? <Award size={18} /> : agent.rank}\n </div>\n\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center justify-between mb-1\">\n <p className=\"font-semibold truncate text-primary\">{agent.agent.user.name}</p>\n <div className=\"flex items-center gap-1\">\n <Star size={14} className=\"text-warning fill-warning\" />\n <span className=\"text-sm font-medium text-primary\">\n {agent.avgRating.toFixed(1)}\n </span>\n </div>\n </div>\n <div className=\"flex items-center justify-between\">\n <p className=\"text-xs truncate text-tertiary\">{agent.agent.user.email}</p>\n <p className=\"text-xs font-medium text-secondary\">\n {tr('support.analytics.topAgents.resolved', '{{count}} resolved', {\n count: agent.ticketsResolved,\n })}\n </p>\n </div>\n </div>\n </div>\n );\n })}\n\n {topAgents.length === 0 && (\n <div className=\"text-center py-8\">\n <p className=\"text-tertiary\">\n {tr('support.analytics.topAgents.empty', 'No agent data available')}\n </p>\n </div>\n )}\n </div>\n </GlassCard>\n );\n}\n"],"mappings":";;;;;AAuBA,SAAgB,EAAU,EAAE,aAA0B;CACpD,IAAM,IAAK,EAAM,GACX,IAAY,EAAO,MAAM,GAAG,CAAC,GAC7B,IAAsC;EAC1C,GAAG;EACH,GAAG;EACH,GAAG;CACL;CAEA,OACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAU;EAFZ,UAAA,CAIE,kBAAC,MAAD;GAAI,WAAU;GAAd,UAAA,CACE,kBAAC,GAAD,EAAO,MAAM,GAAK,CAAA,GACjB,EAAG,qCAAqC,uBAAuB,CAC9D;EAEJ,CAAA,GAAA,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,EAAU,KAAK,MAEZ,kBAAC,OAAD;IAEE,WAAU;IAFZ,UAAA,CAIE,kBAAC,OAAD;KACE,WAAW,2FAA2F,EAAY,EAAM,SAAS;KAEhI,UAAA,EAAM,QAAQ,IAAI,kBAAC,GAAD,EAAO,MAAM,GAAK,CAAA,IAAI,EAAM;IAC5C,CAAA,GAEL,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,KAAD;OAAG,WAAU;OAAuC,UAAA,EAAM,MAAM,KAAK;MAAQ,CAAA,GAC7E,kBAAC,OAAD;OAAK,WAAU;OAAf,UAAA,CACE,kBAAC,GAAD;QAAM,MAAM;QAAI,WAAU;OAA6B,CAAA,GACvD,kBAAC,QAAD;QAAM,WAAU;QACb,UAAA,EAAM,UAAU,QAAQ,CAAC;OACtB,CAAA,CACH;MACF,CAAA,CAAA;KACL,CAAA,GAAA,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,KAAD;OAAG,WAAU;OAAkC,UAAA,EAAM,MAAM,KAAK;MAAS,CAAA,GACzE,kBAAC,KAAD;OAAG,WAAU;OACV,UAAA,EAAG,wCAAwC,sBAAsB,EAChE,OAAO,EAAM,gBACf,CAAC;MACA,CAAA,CACA;KACF,CAAA,CAAA;IACF,CAAA,CAAA;GA5BE,GAAA,EAAM,MAAM,EA4Bd,CAER,GAEA,EAAU,WAAW,KACpB,kBAAC,OAAD;IAAK,WAAU;IACb,UAAA,kBAAC,KAAD;KAAG,WAAU;KACV,UAAA,EAAG,qCAAqC,yBAAyB;IACjE,CAAA;GACA,CAAA,CAEJ;EACI,CAAA,CAAA;;AAEf"}
|
|
@@ -1,40 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useTr as e } from "../../hooks/useTr.js";
|
|
2
|
+
import { GlassCard as t } from "../ui.js";
|
|
3
|
+
import { TrendingUp as n } from "lucide-react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
5
|
//#region src/support/components/analytics/TrendChart.tsx
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
function a({ trends: a, period: o }) {
|
|
7
|
+
let s = e();
|
|
8
|
+
if (!a || a.length === 0) return null;
|
|
9
|
+
let c = Math.max(...a.map((e) => e.value)), l = Math.min(...a.map((e) => e.value)), u = c - l || 1;
|
|
10
|
+
return /* @__PURE__ */ i(t, {
|
|
9
11
|
treatment: "insight",
|
|
10
12
|
className: "p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2",
|
|
11
|
-
children: [/* @__PURE__ */
|
|
13
|
+
children: [/* @__PURE__ */ r("div", {
|
|
12
14
|
className: "flex items-center justify-between mb-6",
|
|
13
|
-
children: /* @__PURE__ */
|
|
15
|
+
children: /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ i("h2", {
|
|
14
16
|
className: "text-xl font-semibold flex items-center gap-2 text-primary",
|
|
15
|
-
children: [/* @__PURE__ */ n
|
|
16
|
-
}), /* @__PURE__ */
|
|
17
|
+
children: [/* @__PURE__ */ r(n, { size: 20 }), s("support.analytics.trendChart.title", "Ticket Volume Trends")]
|
|
18
|
+
}), /* @__PURE__ */ r("p", {
|
|
17
19
|
className: "text-sm mt-1 text-secondary",
|
|
18
|
-
children:
|
|
20
|
+
children: o.label
|
|
19
21
|
})] })
|
|
20
|
-
}), /* @__PURE__ */
|
|
22
|
+
}), /* @__PURE__ */ r("div", {
|
|
21
23
|
className: "space-y-2",
|
|
22
|
-
children:
|
|
23
|
-
let t = (e.value -
|
|
24
|
+
children: a.map((e) => {
|
|
25
|
+
let t = (e.value - l) / u * 100, n = new Date(e.timestamp), a = e.label || n.toLocaleDateString("en-US", {
|
|
24
26
|
month: "short",
|
|
25
27
|
day: "numeric"
|
|
26
28
|
});
|
|
27
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ i("div", {
|
|
28
30
|
className: "flex items-center gap-3 transition-colors duration-200 hover:bg-bg-sunken/50 p-1 rounded",
|
|
29
|
-
children: [/* @__PURE__ */
|
|
31
|
+
children: [/* @__PURE__ */ r("span", {
|
|
30
32
|
className: "text-xs w-20 text-right text-tertiary",
|
|
31
33
|
children: a
|
|
32
|
-
}), /* @__PURE__ */
|
|
34
|
+
}), /* @__PURE__ */ i("div", {
|
|
33
35
|
className: "flex-1 flex items-center gap-2",
|
|
34
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ r("div", {
|
|
35
37
|
className: "h-8 rounded transition-all duration-300 bg-action-primary-bg/80 hover:bg-action-primary-bg",
|
|
36
38
|
style: { width: `${Math.max(t, 2)}%` }
|
|
37
|
-
}), /* @__PURE__ */
|
|
39
|
+
}), /* @__PURE__ */ r("span", {
|
|
38
40
|
className: "text-sm font-medium text-primary",
|
|
39
41
|
children: e.value
|
|
40
42
|
})]
|
|
@@ -45,6 +47,6 @@ function i({ trends: i, period: a }) {
|
|
|
45
47
|
});
|
|
46
48
|
}
|
|
47
49
|
//#endregion
|
|
48
|
-
export {
|
|
50
|
+
export { a as TrendChart };
|
|
49
51
|
|
|
50
52
|
//# sourceMappingURL=TrendChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrendChart.js","names":[],"sources":["../../../../src/support/components/analytics/TrendChart.tsx"],"sourcesContent":["import { TrendingUp } from 'lucide-react';\nimport { GlassCard } from '../ui';\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 <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <div className=\"flex items-center justify-between mb-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-bg-sunken/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-action-primary-bg/80 hover:bg-action-primary-bg\"\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 </GlassCard>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TrendChart.js","names":[],"sources":["../../../../src/support/components/analytics/TrendChart.tsx"],"sourcesContent":["import { TrendingUp } from 'lucide-react';\nimport { GlassCard } from '../ui';\nimport { useTr } from '../../hooks/useTr';\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 const tr = useTr();\n\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 <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <div className=\"flex items-center justify-between mb-6\">\n <div>\n <h2 className=\"text-xl font-semibold flex items-center gap-2 text-primary\">\n <TrendingUp size={20} />\n {tr('support.analytics.trendChart.title', '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-bg-sunken/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-action-primary-bg/80 hover:bg-action-primary-bg\"\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 </GlassCard>\n );\n}\n"],"mappings":";;;;;AAmBA,SAAgB,EAAW,EAAE,WAAQ,aAA2B;CAC9D,IAAM,IAAK,EAAM;CAEjB,IAAI,CAAC,KAAU,EAAO,WAAW,GAC/B,OAAO;CAGT,IAAM,IAAW,KAAK,IAAI,GAAG,EAAO,KAAK,MAAM,EAAE,KAAK,CAAC,GACjD,IAAW,KAAK,IAAI,GAAG,EAAO,KAAK,MAAM,EAAE,KAAK,CAAC,GACjD,IAAQ,IAAW,KAAY;CAErC,OACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAU;EAFZ,UAAA,CAIE,kBAAC,OAAD;GAAK,WAAU;GACb,UAAA,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;IAAd,UAAA,CACE,kBAAC,GAAD,EAAY,MAAM,GAAK,CAAA,GACtB,EAAG,sCAAsC,sBAAsB,CAC9D;GACJ,CAAA,GAAA,kBAAC,KAAD;IAAG,WAAU;IAA+B,UAAA,EAAO;GAAS,CAAA,CACzD,EAAA,CAAA;EACF,CAAA,GAEL,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAA,EAAO,KAAK,MAAU;IACrB,IAAM,KAAkB,EAAM,QAAQ,KAAY,IAAS,KACrD,IAAO,IAAI,KAAK,EAAM,SAAS,GAC/B,IACJ,EAAM,SAAS,EAAK,mBAAmB,SAAS;KAAE,OAAO;KAAS,KAAK;IAAU,CAAC;IAEpF,OACE,kBAAC,OAAD;KAEE,WAAU;KAFZ,UAAA,CAIE,kBAAC,QAAD;MAAM,WAAU;MAAyC,UAAA;KAAY,CAAA,GACrE,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,OAAD;OACE,WAAU;OACV,OAAO,EACL,OAAO,GAAG,KAAK,IAAI,GAAe,CAAC,EAAE,GACvC;MACD,CAAA,GACD,kBAAC,QAAD;OAAM,WAAU;OAAoC,UAAA,EAAM;MAAY,CAAA,CACnE;KACF,CAAA,CAAA;IAbE,GAAA,EAAM,SAaR;GAET,CAAC;EACE,CAAA,CACI;;AAEf"}
|
|
@@ -1,260 +1,273 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { useTr as e } from "../../hooks/useTr.js";
|
|
2
|
+
import { Button as t, Input as n } from "../ui.js";
|
|
3
|
+
import { renderSupportMarkdown as r } from "../../utils/markdown.js";
|
|
4
|
+
import { useMemo as i, useRef as a, useState as o } from "react";
|
|
5
|
+
import { Edit as s, Eye as c, Loader2 as l, Save as u, X as d } from "lucide-react";
|
|
6
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
6
7
|
//#region src/support/components/kb/ArticleForm.tsx
|
|
7
|
-
function
|
|
8
|
+
function h(e) {
|
|
8
9
|
return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").substring(0, 100);
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
-
let [
|
|
12
|
-
title:
|
|
13
|
-
slug:
|
|
14
|
-
content:
|
|
15
|
-
excerpt:
|
|
16
|
-
categoryId:
|
|
17
|
-
tags:
|
|
18
|
-
metaDescription:
|
|
19
|
-
status:
|
|
20
|
-
}), [
|
|
21
|
-
if (!
|
|
11
|
+
function g({ initialData: g, categories: _, onSubmit: v, onCancel: y, isSubmitting: b, submitLabel: x = "Save Article" }) {
|
|
12
|
+
let S = e(), [C, w] = o({
|
|
13
|
+
title: g?.title || "",
|
|
14
|
+
slug: g?.slug || "",
|
|
15
|
+
content: g?.content || "",
|
|
16
|
+
excerpt: g?.excerpt || "",
|
|
17
|
+
categoryId: g?.categoryId || "",
|
|
18
|
+
tags: g?.tags || [],
|
|
19
|
+
metaDescription: g?.metaDescription || "",
|
|
20
|
+
status: g?.status || "DRAFT"
|
|
21
|
+
}), [T, E] = o(g?.tags?.join(", ") || ""), D = a(!1), [O, k] = o(!1), A = i(() => {
|
|
22
|
+
if (!C.content) return "";
|
|
22
23
|
try {
|
|
23
|
-
return
|
|
24
|
+
return r(C.content);
|
|
24
25
|
} catch {
|
|
25
|
-
return
|
|
26
|
+
return C.content;
|
|
26
27
|
}
|
|
27
|
-
}, [
|
|
28
|
-
|
|
28
|
+
}, [C.content]), j = (e) => {
|
|
29
|
+
D.current ? w((t) => ({
|
|
29
30
|
...t,
|
|
30
31
|
title: e
|
|
31
|
-
})) :
|
|
32
|
+
})) : w((t) => ({
|
|
32
33
|
...t,
|
|
33
34
|
title: e,
|
|
34
|
-
slug:
|
|
35
|
+
slug: h(e)
|
|
35
36
|
}));
|
|
36
|
-
},
|
|
37
|
-
|
|
37
|
+
}, M = (e) => {
|
|
38
|
+
E(e);
|
|
38
39
|
let t = e.split(",").map((e) => e.trim()).filter((e) => e.length > 0);
|
|
39
|
-
|
|
40
|
+
w((e) => ({
|
|
40
41
|
...e,
|
|
41
42
|
tags: t
|
|
42
43
|
}));
|
|
43
|
-
},
|
|
44
|
-
|
|
44
|
+
}, N = (e) => {
|
|
45
|
+
D.current = !0, w((t) => ({
|
|
45
46
|
...t,
|
|
46
47
|
slug: e
|
|
47
48
|
}));
|
|
48
|
-
},
|
|
49
|
-
e.preventDefault(), await
|
|
50
|
-
},
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
onSubmit:
|
|
49
|
+
}, P = async (e) => {
|
|
50
|
+
e.preventDefault(), await v(C);
|
|
51
|
+
}, F = C.title.trim() && C.slug.trim() && C.content.trim();
|
|
52
|
+
return /* @__PURE__ */ m("form", {
|
|
53
|
+
onSubmit: P,
|
|
53
54
|
className: "space-y-6",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ m("div", {
|
|
55
56
|
className: "p-6 rounded-xl border border-border-seam bg-bg-surface space-y-6",
|
|
56
57
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
|
|
58
59
|
htmlFor: "support-article-title",
|
|
59
60
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
60
|
-
children: [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
children: [
|
|
62
|
+
S("support.articleForm.labels.title", "Title"),
|
|
63
|
+
" ",
|
|
64
|
+
/* @__PURE__ */ p("span", {
|
|
65
|
+
className: "text-status-error-text",
|
|
66
|
+
children: "*"
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
}), /* @__PURE__ */ p(n, {
|
|
65
70
|
id: "support-article-title",
|
|
66
71
|
type: "text",
|
|
67
72
|
required: !0,
|
|
68
|
-
value:
|
|
69
|
-
onChange: (e) =>
|
|
70
|
-
placeholder: "Article title"
|
|
73
|
+
value: C.title,
|
|
74
|
+
onChange: (e) => j(e.target.value),
|
|
75
|
+
placeholder: S("support.articleForm.placeholders.title", "Article title")
|
|
71
76
|
})] }),
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ m("div", { children: [
|
|
78
|
+
/* @__PURE__ */ m("label", {
|
|
74
79
|
htmlFor: "support-article-slug",
|
|
75
80
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
76
|
-
children: [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
children: [
|
|
82
|
+
S("support.articleForm.labels.slug", "URL Slug"),
|
|
83
|
+
" ",
|
|
84
|
+
/* @__PURE__ */ p("span", {
|
|
85
|
+
className: "text-status-error-text",
|
|
86
|
+
children: "*"
|
|
87
|
+
})
|
|
88
|
+
]
|
|
80
89
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ m("div", {
|
|
82
91
|
className: "flex flex-col gap-2 sm:flex-row sm:items-center",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ p("span", {
|
|
84
93
|
className: "text-sm text-text-secondary",
|
|
85
94
|
children: "/kb/articles/"
|
|
86
|
-
}), /* @__PURE__ */
|
|
95
|
+
}), /* @__PURE__ */ p(n, {
|
|
87
96
|
id: "support-article-slug",
|
|
88
97
|
type: "text",
|
|
89
98
|
required: !0,
|
|
90
|
-
value:
|
|
91
|
-
onChange: (e) =>
|
|
92
|
-
placeholder: "article-url-slug",
|
|
99
|
+
value: C.slug,
|
|
100
|
+
onChange: (e) => N(e.target.value),
|
|
101
|
+
placeholder: S("support.articleForm.placeholders.slug", "article-url-slug"),
|
|
93
102
|
className: "flex-1"
|
|
94
103
|
})]
|
|
95
104
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ p("p", {
|
|
97
106
|
className: "text-xs text-text-secondary mt-1",
|
|
98
|
-
children: "Auto-generated from title. Edit to customize."
|
|
107
|
+
children: S("support.articleForm.slugHint", "Auto-generated from title. Edit to customize.")
|
|
99
108
|
})
|
|
100
109
|
] }),
|
|
101
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
102
111
|
htmlFor: "support-article-excerpt",
|
|
103
112
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
104
|
-
children: "Excerpt"
|
|
105
|
-
}), /* @__PURE__ */
|
|
113
|
+
children: S("support.articleForm.labels.excerpt", "Excerpt")
|
|
114
|
+
}), /* @__PURE__ */ p("textarea", {
|
|
106
115
|
id: "support-article-excerpt",
|
|
107
|
-
"aria-label": "Excerpt",
|
|
116
|
+
"aria-label": S("support.articleForm.labels.excerpt", "Excerpt"),
|
|
108
117
|
rows: 3,
|
|
109
|
-
value:
|
|
110
|
-
onChange: (e) =>
|
|
111
|
-
...
|
|
118
|
+
value: C.excerpt,
|
|
119
|
+
onChange: (e) => w({
|
|
120
|
+
...C,
|
|
112
121
|
excerpt: e.target.value
|
|
113
122
|
}),
|
|
114
123
|
className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors",
|
|
115
|
-
placeholder: "Brief summary of the article (displayed in search results)"
|
|
124
|
+
placeholder: S("support.articleForm.placeholders.excerpt", "Brief summary of the article (displayed in search results)")
|
|
116
125
|
})] }),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ m("div", { children: [
|
|
127
|
+
/* @__PURE__ */ m("div", {
|
|
119
128
|
className: "flex items-center justify-between mb-2",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ m("label", {
|
|
121
130
|
htmlFor: "support-article-content",
|
|
122
131
|
className: "text-sm font-medium text-text-primary",
|
|
123
|
-
children: [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
132
|
+
children: [
|
|
133
|
+
S("support.articleForm.labels.content", "Content"),
|
|
134
|
+
" ",
|
|
135
|
+
/* @__PURE__ */ p("span", {
|
|
136
|
+
className: "text-status-error-text",
|
|
137
|
+
children: "*"
|
|
138
|
+
})
|
|
139
|
+
]
|
|
140
|
+
}), /* @__PURE__ */ p(t, {
|
|
128
141
|
type: "button",
|
|
129
142
|
variant: "ghost",
|
|
130
143
|
size: "sm",
|
|
131
|
-
onClick: () =>
|
|
144
|
+
onClick: () => k(!O),
|
|
132
145
|
className: "text-xs",
|
|
133
|
-
children:
|
|
146
|
+
children: O ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(s, { size: 14 }), S("support.articleForm.actions.edit", "Edit")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(c, { size: 14 }), S("support.articleForm.actions.preview", "Preview")] })
|
|
134
147
|
})]
|
|
135
148
|
}),
|
|
136
|
-
|
|
149
|
+
O ? /* @__PURE__ */ p("div", {
|
|
137
150
|
className: "w-full min-h-[400px] px-4 py-3 rounded-lg border bg-bg-surface overflow-auto",
|
|
138
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ p("div", {
|
|
139
152
|
className: "prose prose-sm max-w-none dark:prose-invert",
|
|
140
|
-
dangerouslySetInnerHTML: { __html:
|
|
153
|
+
dangerouslySetInnerHTML: { __html: A || `<p class="text-text-secondary">${S("support.articleForm.nothingToPreview", "Nothing to preview")}</p>` }
|
|
141
154
|
})
|
|
142
|
-
}) : /* @__PURE__ */
|
|
155
|
+
}) : /* @__PURE__ */ p("textarea", {
|
|
143
156
|
id: "support-article-content",
|
|
144
|
-
"aria-label": "
|
|
157
|
+
"aria-label": S("support.articleForm.labels.content", "Content"),
|
|
145
158
|
required: !0,
|
|
146
159
|
rows: 20,
|
|
147
|
-
value:
|
|
148
|
-
onChange: (e) =>
|
|
149
|
-
...
|
|
160
|
+
value: C.content,
|
|
161
|
+
onChange: (e) => w({
|
|
162
|
+
...C,
|
|
150
163
|
content: e.target.value
|
|
151
164
|
}),
|
|
152
165
|
className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors font-mono text-sm",
|
|
153
|
-
placeholder: "Article content (supports Markdown)"
|
|
166
|
+
placeholder: S("support.articleForm.placeholders.content", "Article content (supports Markdown)")
|
|
154
167
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ p("p", {
|
|
156
169
|
className: "text-xs text-text-secondary mt-1",
|
|
157
|
-
children: "Supports Markdown: **bold**, *italic*, # headings, - lists, [links](url), ```code```"
|
|
170
|
+
children: S("support.articleForm.markdownHint", "Supports Markdown: **bold**, *italic*, # headings, - lists, [links](url), ```code```")
|
|
158
171
|
})
|
|
159
172
|
] }),
|
|
160
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
161
174
|
htmlFor: "support-article-category",
|
|
162
175
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
163
|
-
children: "Category"
|
|
164
|
-
}), /* @__PURE__ */
|
|
176
|
+
children: S("support.articleForm.labels.category", "Category")
|
|
177
|
+
}), /* @__PURE__ */ m("select", {
|
|
165
178
|
id: "support-article-category",
|
|
166
|
-
value:
|
|
167
|
-
onChange: (e) =>
|
|
168
|
-
...
|
|
179
|
+
value: C.categoryId,
|
|
180
|
+
onChange: (e) => w({
|
|
181
|
+
...C,
|
|
169
182
|
categoryId: e.target.value
|
|
170
183
|
}),
|
|
171
184
|
className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
185
|
+
children: [/* @__PURE__ */ p("option", {
|
|
173
186
|
value: "",
|
|
174
|
-
children: "Select a category"
|
|
175
|
-
}),
|
|
187
|
+
children: S("support.articleForm.placeholders.category", "Select a category")
|
|
188
|
+
}), _.map((e) => /* @__PURE__ */ p("option", {
|
|
176
189
|
value: e.id,
|
|
177
190
|
children: e.name
|
|
178
191
|
}, e.id))]
|
|
179
192
|
})] }),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ m("div", { children: [
|
|
194
|
+
/* @__PURE__ */ p("label", {
|
|
182
195
|
htmlFor: "support-article-tags",
|
|
183
196
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
184
|
-
children: "Tags"
|
|
197
|
+
children: S("support.articleForm.labels.tags", "Tags")
|
|
185
198
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ p(n, {
|
|
187
200
|
id: "support-article-tags",
|
|
188
201
|
type: "text",
|
|
189
|
-
value:
|
|
190
|
-
onChange: (e) =>
|
|
191
|
-
placeholder: "Enter tags separated by commas (e.g., billing, account, setup)"
|
|
202
|
+
value: T,
|
|
203
|
+
onChange: (e) => M(e.target.value),
|
|
204
|
+
placeholder: S("support.articleForm.placeholders.tags", "Enter tags separated by commas (e.g., billing, account, setup)")
|
|
192
205
|
}),
|
|
193
|
-
|
|
206
|
+
C.tags.length > 0 && /* @__PURE__ */ p("div", {
|
|
194
207
|
className: "flex flex-wrap gap-2 mt-2",
|
|
195
|
-
children:
|
|
208
|
+
children: C.tags.map((e) => /* @__PURE__ */ p("span", {
|
|
196
209
|
className: "px-2 py-1 text-xs rounded-full bg-action-primary-bg/10 text-primary",
|
|
197
210
|
children: e
|
|
198
211
|
}, e))
|
|
199
212
|
})
|
|
200
213
|
] }),
|
|
201
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
202
215
|
htmlFor: "support-article-meta-description",
|
|
203
216
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
204
|
-
children: "Meta Description"
|
|
205
|
-
}), /* @__PURE__ */
|
|
217
|
+
children: S("support.articleForm.labels.metaDescription", "Meta Description")
|
|
218
|
+
}), /* @__PURE__ */ p("textarea", {
|
|
206
219
|
id: "support-article-meta-description",
|
|
207
|
-
"aria-label": "Meta Description",
|
|
220
|
+
"aria-label": S("support.articleForm.labels.metaDescription", "Meta Description"),
|
|
208
221
|
rows: 2,
|
|
209
|
-
value:
|
|
210
|
-
onChange: (e) =>
|
|
211
|
-
...
|
|
222
|
+
value: C.metaDescription,
|
|
223
|
+
onChange: (e) => w({
|
|
224
|
+
...C,
|
|
212
225
|
metaDescription: e.target.value
|
|
213
226
|
}),
|
|
214
227
|
className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors",
|
|
215
|
-
placeholder: "SEO meta description (optional)"
|
|
228
|
+
placeholder: S("support.articleForm.placeholders.metaDescription", "SEO meta description (optional)")
|
|
216
229
|
})] }),
|
|
217
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
218
231
|
htmlFor: "support-article-status",
|
|
219
232
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
220
|
-
children: "Status"
|
|
221
|
-
}), /* @__PURE__ */
|
|
233
|
+
children: S("support.articleForm.labels.status", "Status")
|
|
234
|
+
}), /* @__PURE__ */ m("select", {
|
|
222
235
|
id: "support-article-status",
|
|
223
|
-
value:
|
|
224
|
-
onChange: (e) =>
|
|
225
|
-
...
|
|
236
|
+
value: C.status,
|
|
237
|
+
onChange: (e) => w({
|
|
238
|
+
...C,
|
|
226
239
|
status: e.target.value
|
|
227
240
|
}),
|
|
228
241
|
className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ p("option", {
|
|
230
243
|
value: "DRAFT",
|
|
231
|
-
children: "Draft - Not visible to users"
|
|
232
|
-
}), /* @__PURE__ */
|
|
244
|
+
children: S("support.articleForm.status.draft", "Draft - Not visible to users")
|
|
245
|
+
}), /* @__PURE__ */ p("option", {
|
|
233
246
|
value: "PUBLISHED",
|
|
234
|
-
children: "Published - Visible to all users"
|
|
247
|
+
children: S("support.articleForm.status.published", "Published - Visible to all users")
|
|
235
248
|
})]
|
|
236
249
|
})] })
|
|
237
250
|
]
|
|
238
|
-
}), /* @__PURE__ */
|
|
251
|
+
}), /* @__PURE__ */ m("div", {
|
|
239
252
|
className: "flex gap-3",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ p(t, {
|
|
241
254
|
type: "submit",
|
|
242
|
-
disabled:
|
|
255
|
+
disabled: b || !F,
|
|
243
256
|
className: "flex-1",
|
|
244
|
-
children:
|
|
257
|
+
children: b ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(l, {
|
|
245
258
|
size: 18,
|
|
246
259
|
className: "animate-spin"
|
|
247
|
-
}), "Saving…"] }) : /* @__PURE__ */
|
|
248
|
-
}), /* @__PURE__ */
|
|
260
|
+
}), S("support.articleForm.actions.saving", "Saving…")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(u, { size: 18 }), x] })
|
|
261
|
+
}), /* @__PURE__ */ m(t, {
|
|
249
262
|
type: "button",
|
|
250
263
|
variant: "outline",
|
|
251
|
-
onClick:
|
|
252
|
-
children: [/* @__PURE__ */
|
|
264
|
+
onClick: y,
|
|
265
|
+
children: [/* @__PURE__ */ p(d, { size: 18 }), S("support.articleForm.actions.cancel", "Cancel")]
|
|
253
266
|
})]
|
|
254
267
|
})]
|
|
255
268
|
});
|
|
256
269
|
}
|
|
257
270
|
//#endregion
|
|
258
|
-
export {
|
|
271
|
+
export { g as ArticleForm };
|
|
259
272
|
|
|
260
273
|
//# sourceMappingURL=ArticleForm.js.map
|