@burdenoff/microfe-support 2026.830.1 → 2026.902.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.d.ts +42 -0
- package/dist/generated/global-operations.js +252 -239
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +27 -0
- package/dist/generated/global-types.js.map +1 -1
- 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/careers/BulkCandidateDialogs.d.ts +1 -0
- package/dist/support/components/careers/BulkCandidateDialogs.js +351 -214
- package/dist/support/components/careers/BulkCandidateDialogs.js.map +1 -1
- package/dist/support/components/careers/BulkOperationFeedback.d.ts +4 -1
- package/dist/support/components/careers/BulkOperationFeedback.js +49 -1
- package/dist/support/components/careers/BulkOperationFeedback.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/JobApplicationsPage.js +511 -494
- package/dist/support/pages/JobApplicationsPage.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/dist/support/utils/bulkCandidateOperations.d.ts +15 -0
- package/dist/support/utils/bulkCandidateOperations.js +19 -4
- package/dist/support/utils/bulkCandidateOperations.js.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleForm.js","names":[],"sources":["../../../../src/support/components/kb/ArticleForm.tsx"],"sourcesContent":["import { useState, useMemo, useRef } from 'react';\nimport { Loader2, Save, X, Eye, Edit } from 'lucide-react';\nimport { Button, Input } from '../ui';\nimport { renderSupportMarkdown } from '../../utils/markdown';\n\nexport interface ArticleFormData {\n title: string;\n slug: string;\n content: string;\n excerpt: string;\n categoryId: string;\n tags: string[];\n metaDescription: string;\n status: 'DRAFT' | 'PUBLISHED';\n}\n\ninterface Category {\n id: string;\n name: string;\n color?: string;\n}\n\ninterface ArticleFormProps {\n initialData?: Partial<ArticleFormData>;\n categories: Category[];\n onSubmit: (data: ArticleFormData) => Promise<void>;\n onCancel: () => void;\n isSubmitting: boolean;\n submitLabel?: string;\n}\n\n// Generate URL-friendly slug from title\nfunction generateSlug(title: string): string {\n return title\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n .substring(0, 100);\n}\n\nexport function ArticleForm({\n initialData,\n categories,\n onSubmit,\n onCancel,\n isSubmitting,\n submitLabel = 'Save Article',\n}: ArticleFormProps) {\n const [formData, setFormData] = useState<ArticleFormData>({\n title: initialData?.title || '',\n slug: initialData?.slug || '',\n content: initialData?.content || '',\n excerpt: initialData?.excerpt || '',\n categoryId: initialData?.categoryId || '',\n tags: initialData?.tags || [],\n metaDescription: initialData?.metaDescription || '',\n status: initialData?.status || 'DRAFT',\n });\n\n const [tagsInput, setTagsInput] = useState(initialData?.tags?.join(', ') || '');\n const slugManuallyEditedRef = useRef(false);\n const [showPreview, setShowPreview] = useState(false);\n\n // Parse markdown content for preview\n const parsedContent = useMemo(() => {\n if (!formData.content) return '';\n try {\n return renderSupportMarkdown(formData.content);\n } catch {\n return formData.content;\n }\n }, [formData.content]);\n\n // Handle title change with auto-slug generation\n const handleTitleChange = (title: string) => {\n if (!slugManuallyEditedRef.current) {\n setFormData((prev) => ({\n ...prev,\n title,\n slug: generateSlug(title),\n }));\n } else {\n setFormData((prev) => ({ ...prev, title }));\n }\n };\n\n // Parse tags from comma-separated input\n const handleTagsChange = (value: string) => {\n setTagsInput(value);\n const tags = value\n .split(',')\n .map((tag) => tag.trim())\n .filter((tag) => tag.length > 0);\n setFormData((prev) => ({ ...prev, tags }));\n };\n\n const handleSlugChange = (value: string) => {\n slugManuallyEditedRef.current = true;\n setFormData((prev) => ({ ...prev, slug: value }));\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n await onSubmit(formData);\n };\n\n const isValid = formData.title.trim() && formData.slug.trim() && formData.content.trim();\n\n return (\n <form onSubmit={handleSubmit} className=\"space-y-6\">\n <div className=\"p-6 rounded-xl border border-border-seam bg-bg-surface space-y-6\">\n {/* Title */}\n <div>\n <label\n htmlFor=\"support-article-title\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Title <span className=\"text-status-error-text\">*</span>\n </label>\n <Input\n id=\"support-article-title\"\n type=\"text\"\n required\n value={formData.title}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => handleTitleChange(e.target.value)}\n placeholder=\"Article title\"\n />\n </div>\n\n {/* Slug */}\n <div>\n <label\n htmlFor=\"support-article-slug\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n URL Slug <span className=\"text-status-error-text\">*</span>\n </label>\n <div className=\"flex flex-col gap-2 sm:flex-row sm:items-center\">\n <span className=\"text-sm text-text-secondary\">/kb/articles/</span>\n <Input\n id=\"support-article-slug\"\n type=\"text\"\n required\n value={formData.slug}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n handleSlugChange(e.target.value)\n }\n placeholder=\"article-url-slug\"\n className=\"flex-1\"\n />\n </div>\n <p className=\"text-xs text-text-secondary mt-1\">\n Auto-generated from title. Edit to customize.\n </p>\n </div>\n\n {/* Excerpt */}\n <div>\n <label\n htmlFor=\"support-article-excerpt\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Excerpt\n </label>\n <textarea\n id=\"support-article-excerpt\"\n aria-label=\"Excerpt\"\n rows={3}\n value={formData.excerpt}\n onChange={(e) => setFormData({ ...formData, excerpt: e.target.value })}\n 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\"\n placeholder=\"Brief summary of the article (displayed in search results)\"\n />\n </div>\n\n {/* Content */}\n <div>\n <div className=\"flex items-center justify-between mb-2\">\n <label\n htmlFor=\"support-article-content\"\n className=\"text-sm font-medium text-text-primary\"\n >\n Content <span className=\"text-status-error-text\">*</span>\n </label>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => setShowPreview(!showPreview)}\n className=\"text-xs\"\n >\n {showPreview ? (\n <>\n <Edit size={14} />\n Edit\n </>\n ) : (\n <>\n <Eye size={14} />\n Preview\n </>\n )}\n </Button>\n </div>\n\n {showPreview ? (\n <div className=\"w-full min-h-[400px] px-4 py-3 rounded-lg border bg-bg-surface overflow-auto\">\n <div\n className=\"prose prose-sm max-w-none dark:prose-invert\"\n dangerouslySetInnerHTML={{\n __html: parsedContent || '<p class=\"text-text-secondary\">Nothing to preview</p>',\n }}\n />\n </div>\n ) : (\n <textarea\n id=\"support-article-content\"\n aria-label=\"Article content\"\n required\n rows={20}\n value={formData.content}\n onChange={(e) => setFormData({ ...formData, content: e.target.value })}\n 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\"\n placeholder=\"Article content (supports Markdown)\"\n />\n )}\n <p className=\"text-xs text-text-secondary mt-1\">\n Supports Markdown: **bold**, *italic*, # headings, - lists, [links](url), ```code```\n </p>\n </div>\n\n {/* Category */}\n <div>\n <label\n htmlFor=\"support-article-category\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Category\n </label>\n <select\n id=\"support-article-category\"\n value={formData.categoryId}\n onChange={(e) => setFormData({ ...formData, categoryId: e.target.value })}\n 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\"\n >\n <option value=\"\">Select a category</option>\n {categories.map((cat) => (\n <option key={cat.id} value={cat.id}>\n {cat.name}\n </option>\n ))}\n </select>\n </div>\n\n {/* Tags */}\n <div>\n <label\n htmlFor=\"support-article-tags\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Tags\n </label>\n <Input\n id=\"support-article-tags\"\n type=\"text\"\n value={tagsInput}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => handleTagsChange(e.target.value)}\n placeholder=\"Enter tags separated by commas (e.g., billing, account, setup)\"\n />\n {formData.tags.length > 0 && (\n <div className=\"flex flex-wrap gap-2 mt-2\">\n {formData.tags.map((tag) => (\n <span\n key={tag}\n className=\"px-2 py-1 text-xs rounded-full bg-action-primary-bg/10 text-primary\"\n >\n {tag}\n </span>\n ))}\n </div>\n )}\n </div>\n\n {/* Meta Description */}\n <div>\n <label\n htmlFor=\"support-article-meta-description\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Meta Description\n </label>\n <textarea\n id=\"support-article-meta-description\"\n aria-label=\"Meta Description\"\n rows={2}\n value={formData.metaDescription}\n onChange={(e) => setFormData({ ...formData, metaDescription: e.target.value })}\n 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\"\n placeholder=\"SEO meta description (optional)\"\n />\n </div>\n\n {/* Status */}\n <div>\n <label\n htmlFor=\"support-article-status\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Status\n </label>\n <select\n id=\"support-article-status\"\n value={formData.status}\n onChange={(e) =>\n setFormData({ ...formData, status: e.target.value as 'DRAFT' | 'PUBLISHED' })\n }\n 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\"\n >\n <option value=\"DRAFT\">Draft - Not visible to users</option>\n <option value=\"PUBLISHED\">Published - Visible to all users</option>\n </select>\n </div>\n </div>\n\n {/* Actions */}\n <div className=\"flex gap-3\">\n <Button type=\"submit\" disabled={isSubmitting || !isValid} className=\"flex-1\">\n {isSubmitting ? (\n <>\n <Loader2 size={18} className=\"animate-spin\" />\n Saving…\n </>\n ) : (\n <>\n <Save size={18} />\n {submitLabel}\n </>\n )}\n </Button>\n <Button type=\"button\" variant=\"outline\" onClick={onCancel}>\n <X size={18} />\n Cancel\n </Button>\n </div>\n </form>\n );\n}\n"],"mappings":";;;;;;AAgCA,SAAS,EAAa,GAAuB;CAC3C,OAAO,EACJ,YAAY,CAAC,CACb,QAAQ,eAAe,GAAG,CAAC,CAC3B,QAAQ,YAAY,EAAE,CAAC,CACvB,UAAU,GAAG,GAAG;AACrB;AAEA,SAAgB,EAAY,EAC1B,gBACA,eACA,aACA,aACA,iBACA,iBAAc,kBACK;CACnB,IAAM,CAAC,GAAU,KAAe,EAA0B;EACxD,OAAO,GAAa,SAAS;EAC7B,MAAM,GAAa,QAAQ;EAC3B,SAAS,GAAa,WAAW;EACjC,SAAS,GAAa,WAAW;EACjC,YAAY,GAAa,cAAc;EACvC,MAAM,GAAa,QAAQ,CAAC;EAC5B,iBAAiB,GAAa,mBAAmB;EACjD,QAAQ,GAAa,UAAU;CACjC,CAAC,GAEK,CAAC,GAAW,KAAgB,EAAS,GAAa,MAAM,KAAK,IAAI,KAAK,EAAE,GACxE,IAAwB,EAAO,EAAK,GACpC,CAAC,GAAa,KAAkB,EAAS,EAAK,GAG9C,IAAgB,QAAc;EAClC,IAAI,CAAC,EAAS,SAAS,OAAO;EAC9B,IAAI;GACF,OAAO,EAAsB,EAAS,OAAO;EAC/C,QAAQ;GACN,OAAO,EAAS;EAClB;C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,CAAA,GACP,kBAAC,YAAD;KACE,IAAG;KACH,cAAW;KACX,MAAM;KACN,OAAO,EAAS;KAChB,WAAW,MAAM,EAAY;MAAE,GAAG;MAAU,iBAAiB,EAAE,OAAO;KAAM,CAAC;KAC7E,WAAU;KACV,aAAY;IACb,CAAA,CACE,EAAA,CAAA;IAGL,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;KACE,SAAQ;KACR,WAAU;KACX,UAAA;IAEM,CAAA,GACP,kBAAC,UAAD;KACE,IAAG;KACH,OAAO,EAAS;KAChB,WAAW,MACT,EAAY;MAAE,GAAG;MAAU,QAAQ,EAAE,OAAO;KAA+B,CAAC;KAE9E,WAAU;KANZ,UAAA,CAQE,kBAAC,UAAD;MAAQ,OAAM;MAAQ,UAAA;KAAoC,CAAA,GAC1D,kBAAC,UAAD;MAAQ,OAAM;MAAY,UAAA;KAAwC,CAAA,CAC5D;IACL,CAAA,CAAA,EAAA,CAAA;GACF;EAGL,CAAA,GAAA,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,GAAD;IAAQ,MAAK;IAAS,UAAU,KAAgB,CAAC;IAAS,WAAU;IACjE,UAAA,IACC,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;KAAS,MAAM;KAAI,WAAU;IAAgB,CAAA,GAAC,SAE9C,EAAA,CAAA,IAEF,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD,EAAM,MAAM,GAAK,CAAA,GAChB,CACD,EAAA,CAAA;GAEE,CAAA,GACR,kBAAC,GAAD;IAAQ,MAAK;IAAS,SAAQ;IAAU,SAAS;IAAjD,UAAA,CACE,kBAAC,GAAD,EAAG,MAAM,GAAK,CAAA,GAAC,QAET;GACL,CAAA,CAAA;EACD,CAAA,CAAA;;AAEV"}
|
|
1
|
+
{"version":3,"file":"ArticleForm.js","names":[],"sources":["../../../../src/support/components/kb/ArticleForm.tsx"],"sourcesContent":["import { useState, useMemo, useRef } from 'react';\nimport { Loader2, Save, X, Eye, Edit } from 'lucide-react';\nimport { Button, Input } from '../ui';\nimport { useTr } from '../../hooks/useTr';\nimport { renderSupportMarkdown } from '../../utils/markdown';\n\nexport interface ArticleFormData {\n title: string;\n slug: string;\n content: string;\n excerpt: string;\n categoryId: string;\n tags: string[];\n metaDescription: string;\n status: 'DRAFT' | 'PUBLISHED';\n}\n\ninterface Category {\n id: string;\n name: string;\n color?: string;\n}\n\ninterface ArticleFormProps {\n initialData?: Partial<ArticleFormData>;\n categories: Category[];\n onSubmit: (data: ArticleFormData) => Promise<void>;\n onCancel: () => void;\n isSubmitting: boolean;\n submitLabel?: string;\n}\n\n// Generate URL-friendly slug from title\nfunction generateSlug(title: string): string {\n return title\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n .substring(0, 100);\n}\n\nexport function ArticleForm({\n initialData,\n categories,\n onSubmit,\n onCancel,\n isSubmitting,\n submitLabel = 'Save Article',\n}: ArticleFormProps) {\n const tr = useTr();\n const [formData, setFormData] = useState<ArticleFormData>({\n title: initialData?.title || '',\n slug: initialData?.slug || '',\n content: initialData?.content || '',\n excerpt: initialData?.excerpt || '',\n categoryId: initialData?.categoryId || '',\n tags: initialData?.tags || [],\n metaDescription: initialData?.metaDescription || '',\n status: initialData?.status || 'DRAFT',\n });\n\n const [tagsInput, setTagsInput] = useState(initialData?.tags?.join(', ') || '');\n const slugManuallyEditedRef = useRef(false);\n const [showPreview, setShowPreview] = useState(false);\n\n // Parse markdown content for preview\n const parsedContent = useMemo(() => {\n if (!formData.content) return '';\n try {\n return renderSupportMarkdown(formData.content);\n } catch {\n return formData.content;\n }\n }, [formData.content]);\n\n // Handle title change with auto-slug generation\n const handleTitleChange = (title: string) => {\n if (!slugManuallyEditedRef.current) {\n setFormData((prev) => ({\n ...prev,\n title,\n slug: generateSlug(title),\n }));\n } else {\n setFormData((prev) => ({ ...prev, title }));\n }\n };\n\n // Parse tags from comma-separated input\n const handleTagsChange = (value: string) => {\n setTagsInput(value);\n const tags = value\n .split(',')\n .map((tag) => tag.trim())\n .filter((tag) => tag.length > 0);\n setFormData((prev) => ({ ...prev, tags }));\n };\n\n const handleSlugChange = (value: string) => {\n slugManuallyEditedRef.current = true;\n setFormData((prev) => ({ ...prev, slug: value }));\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n await onSubmit(formData);\n };\n\n const isValid = formData.title.trim() && formData.slug.trim() && formData.content.trim();\n\n return (\n <form onSubmit={handleSubmit} className=\"space-y-6\">\n <div className=\"p-6 rounded-xl border border-border-seam bg-bg-surface space-y-6\">\n {/* Title */}\n <div>\n <label\n htmlFor=\"support-article-title\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n {tr('support.articleForm.labels.title', 'Title')}{' '}\n <span className=\"text-status-error-text\">*</span>\n </label>\n <Input\n id=\"support-article-title\"\n type=\"text\"\n required\n value={formData.title}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => handleTitleChange(e.target.value)}\n placeholder={tr('support.articleForm.placeholders.title', 'Article title')}\n />\n </div>\n\n {/* Slug */}\n <div>\n <label\n htmlFor=\"support-article-slug\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n {tr('support.articleForm.labels.slug', 'URL Slug')}{' '}\n <span className=\"text-status-error-text\">*</span>\n </label>\n <div className=\"flex flex-col gap-2 sm:flex-row sm:items-center\">\n <span className=\"text-sm text-text-secondary\">/kb/articles/</span>\n <Input\n id=\"support-article-slug\"\n type=\"text\"\n required\n value={formData.slug}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n handleSlugChange(e.target.value)\n }\n placeholder={tr('support.articleForm.placeholders.slug', 'article-url-slug')}\n className=\"flex-1\"\n />\n </div>\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr('support.articleForm.slugHint', 'Auto-generated from title. Edit to customize.')}\n </p>\n </div>\n\n {/* Excerpt */}\n <div>\n <label\n htmlFor=\"support-article-excerpt\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n {tr('support.articleForm.labels.excerpt', 'Excerpt')}\n </label>\n <textarea\n id=\"support-article-excerpt\"\n aria-label={tr('support.articleForm.labels.excerpt', 'Excerpt')}\n rows={3}\n value={formData.excerpt}\n onChange={(e) => setFormData({ ...formData, excerpt: e.target.value })}\n 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\"\n placeholder={tr(\n 'support.articleForm.placeholders.excerpt',\n 'Brief summary of the article (displayed in search results)'\n )}\n />\n </div>\n\n {/* Content */}\n <div>\n <div className=\"flex items-center justify-between mb-2\">\n <label\n htmlFor=\"support-article-content\"\n className=\"text-sm font-medium text-text-primary\"\n >\n {tr('support.articleForm.labels.content', 'Content')}{' '}\n <span className=\"text-status-error-text\">*</span>\n </label>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => setShowPreview(!showPreview)}\n className=\"text-xs\"\n >\n {showPreview ? (\n <>\n <Edit size={14} />\n {tr('support.articleForm.actions.edit', 'Edit')}\n </>\n ) : (\n <>\n <Eye size={14} />\n {tr('support.articleForm.actions.preview', 'Preview')}\n </>\n )}\n </Button>\n </div>\n\n {showPreview ? (\n <div className=\"w-full min-h-[400px] px-4 py-3 rounded-lg border bg-bg-surface overflow-auto\">\n <div\n className=\"prose prose-sm max-w-none dark:prose-invert\"\n dangerouslySetInnerHTML={{\n __html:\n parsedContent ||\n `<p class=\"text-text-secondary\">${tr(\n 'support.articleForm.nothingToPreview',\n 'Nothing to preview'\n )}</p>`,\n }}\n />\n </div>\n ) : (\n <textarea\n id=\"support-article-content\"\n aria-label={tr('support.articleForm.labels.content', 'Content')}\n required\n rows={20}\n value={formData.content}\n onChange={(e) => setFormData({ ...formData, content: e.target.value })}\n 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\"\n placeholder={tr(\n 'support.articleForm.placeholders.content',\n 'Article content (supports Markdown)'\n )}\n />\n )}\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'support.articleForm.markdownHint',\n 'Supports Markdown: **bold**, *italic*, # headings, - lists, [links](url), ```code```'\n )}\n </p>\n </div>\n\n {/* Category */}\n <div>\n <label\n htmlFor=\"support-article-category\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n {tr('support.articleForm.labels.category', 'Category')}\n </label>\n <select\n id=\"support-article-category\"\n value={formData.categoryId}\n onChange={(e) => setFormData({ ...formData, categoryId: e.target.value })}\n 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\"\n >\n <option value=\"\">\n {tr('support.articleForm.placeholders.category', 'Select a category')}\n </option>\n {categories.map((cat) => (\n <option key={cat.id} value={cat.id}>\n {cat.name}\n </option>\n ))}\n </select>\n </div>\n\n {/* Tags */}\n <div>\n <label\n htmlFor=\"support-article-tags\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n {tr('support.articleForm.labels.tags', 'Tags')}\n </label>\n <Input\n id=\"support-article-tags\"\n type=\"text\"\n value={tagsInput}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => handleTagsChange(e.target.value)}\n placeholder={tr(\n 'support.articleForm.placeholders.tags',\n 'Enter tags separated by commas (e.g., billing, account, setup)'\n )}\n />\n {formData.tags.length > 0 && (\n <div className=\"flex flex-wrap gap-2 mt-2\">\n {formData.tags.map((tag) => (\n <span\n key={tag}\n className=\"px-2 py-1 text-xs rounded-full bg-action-primary-bg/10 text-primary\"\n >\n {tag}\n </span>\n ))}\n </div>\n )}\n </div>\n\n {/* Meta Description */}\n <div>\n <label\n htmlFor=\"support-article-meta-description\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n {tr('support.articleForm.labels.metaDescription', 'Meta Description')}\n </label>\n <textarea\n id=\"support-article-meta-description\"\n aria-label={tr('support.articleForm.labels.metaDescription', 'Meta Description')}\n rows={2}\n value={formData.metaDescription}\n onChange={(e) => setFormData({ ...formData, metaDescription: e.target.value })}\n 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\"\n placeholder={tr(\n 'support.articleForm.placeholders.metaDescription',\n 'SEO meta description (optional)'\n )}\n />\n </div>\n\n {/* Status */}\n <div>\n <label\n htmlFor=\"support-article-status\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n {tr('support.articleForm.labels.status', 'Status')}\n </label>\n <select\n id=\"support-article-status\"\n value={formData.status}\n onChange={(e) =>\n setFormData({ ...formData, status: e.target.value as 'DRAFT' | 'PUBLISHED' })\n }\n 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\"\n >\n <option value=\"DRAFT\">\n {tr('support.articleForm.status.draft', 'Draft - Not visible to users')}\n </option>\n <option value=\"PUBLISHED\">\n {tr('support.articleForm.status.published', 'Published - Visible to all users')}\n </option>\n </select>\n </div>\n </div>\n\n {/* Actions */}\n <div className=\"flex gap-3\">\n <Button type=\"submit\" disabled={isSubmitting || !isValid} className=\"flex-1\">\n {isSubmitting ? (\n <>\n <Loader2 size={18} className=\"animate-spin\" />\n {tr('support.articleForm.actions.saving', 'Saving…')}\n </>\n ) : (\n <>\n <Save size={18} />\n {submitLabel}\n </>\n )}\n </Button>\n <Button type=\"button\" variant=\"outline\" onClick={onCancel}>\n <X size={18} />\n {tr('support.articleForm.actions.cancel', 'Cancel')}\n </Button>\n </div>\n </form>\n );\n}\n"],"mappings":";;;;;;;AAiCA,SAAS,EAAa,GAAuB;CAC3C,OAAO,EACJ,YAAY,CAAC,CACb,QAAQ,eAAe,GAAG,CAAC,CAC3B,QAAQ,YAAY,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