@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,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useTr as e } from "../hooks/useTr.js";
|
|
2
|
+
import { useSupport as ee } from "../providers/SupportProvider.js";
|
|
3
|
+
import { Badge as t, Button as n, CTAOverflowMenu as r, EmphasisPanel as te, NextSteps as ne } from "../components/ui.js";
|
|
4
|
+
import { EmptyState as re, LoadingState as i, PageLayout as a } from "../components/PageLayout.js";
|
|
4
5
|
import { getCategoryBadgeClass as o } from "../utils/categoryColors.js";
|
|
5
|
-
import { useKnowledgeBaseOperations as
|
|
6
|
-
import
|
|
7
|
-
import { nativeConfirm as
|
|
6
|
+
import { useKnowledgeBaseOperations as ie } from "../hooks/useKnowledgeBaseOperations.js";
|
|
7
|
+
import ae from "../../node_modules/dompurify/dist/purify.es.js";
|
|
8
|
+
import { nativeConfirm as oe, nativeImpact as se, nativeNotify as s } from "../../utils/nativeBridge.js";
|
|
8
9
|
import { useEffect as c, useRef as l, useState as u } from "react";
|
|
9
|
-
import { AlertCircle as d, Archive as f, ArrowLeft as p, Calendar as m, CheckCircle as h, Edit as
|
|
10
|
-
import { useNavigate as
|
|
11
|
-
import { Fragment as
|
|
12
|
-
import { AlertDialog as
|
|
10
|
+
import { AlertCircle as d, Archive as f, ArrowLeft as p, Calendar as m, CheckCircle as h, Edit as ce, Eye as le, Globe as g, GlobeLock as _, Loader2 as v, Tag as ue, ThumbsDown as de, ThumbsUp as fe, Trash2 as y, User as pe } from "lucide-react";
|
|
11
|
+
import { useNavigate as me, useParams as he } from "react-router";
|
|
12
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
13
|
+
import { AlertDialog as ge, AlertDialogAction as _e, AlertDialogCancel as C, AlertDialogContent as w, AlertDialogDescription as T, AlertDialogFooter as E, AlertDialogHeader as D, AlertDialogTitle as O } from "@burdenoff/fe-libs/ui";
|
|
13
14
|
//#region src/support/pages/ArticleDetailAdminPage.tsx
|
|
14
|
-
function
|
|
15
|
-
let { slug:
|
|
15
|
+
function k() {
|
|
16
|
+
let { slug: k } = he(), A = me(), { basePath: j = "" } = ee(), M = e(), { articleDetail: N, articleLoading: P, articleError: F, voteArticle: I, recordView: L, ratingArticle: R, deleteArticle: ve, publishArticle: ye, unpublishArticle: be, archiveArticle: xe, deletingArticle: z, publishingArticle: B, unpublishingArticle: V, archivingArticle: H } = ie(k), [Se, U] = u(!1), [W, G] = u(null), K = l(null), q = l(null);
|
|
16
17
|
c(() => {
|
|
17
18
|
N?.id && L(N.id);
|
|
18
19
|
}, [N?.id, L]), c(() => () => {
|
|
@@ -20,8 +21,8 @@ function A() {
|
|
|
20
21
|
}, []);
|
|
21
22
|
let J = () => {
|
|
22
23
|
q.current && clearTimeout(q.current), q.current = setTimeout(() => G(null), 3e3);
|
|
23
|
-
},
|
|
24
|
-
K.current && clearTimeout(K.current), K.current = setTimeout(() =>
|
|
24
|
+
}, Ce = (e) => {
|
|
25
|
+
K.current && clearTimeout(K.current), K.current = setTimeout(() => A(e), 1e3);
|
|
25
26
|
}, Y = async (e) => {
|
|
26
27
|
if (N) try {
|
|
27
28
|
await I(N.id, e);
|
|
@@ -31,25 +32,25 @@ function A() {
|
|
|
31
32
|
}, X = async () => {
|
|
32
33
|
if (N) {
|
|
33
34
|
try {
|
|
34
|
-
await
|
|
35
|
+
await ve(N.id), G({
|
|
35
36
|
type: "success",
|
|
36
|
-
message: "Article deleted successfully!"
|
|
37
|
-
}), s("success"),
|
|
37
|
+
message: M("support.article.notifications.deleted", "Article deleted successfully!")
|
|
38
|
+
}), s("success"), Ce(`${j}/kb`);
|
|
38
39
|
} catch {
|
|
39
40
|
G({
|
|
40
41
|
type: "error",
|
|
41
|
-
message: "Failed to delete article."
|
|
42
|
+
message: M("support.article.errors.deleteFailed", "Failed to delete article.")
|
|
42
43
|
}), s("error"), J();
|
|
43
44
|
}
|
|
44
45
|
U(!1);
|
|
45
46
|
}
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
let e = await
|
|
49
|
-
title: "Delete Article",
|
|
50
|
-
message: "Delete this article? This cannot be undone.",
|
|
51
|
-
okButtonTitle: "Delete",
|
|
52
|
-
cancelButtonTitle: "Cancel"
|
|
47
|
+
}, we = async () => {
|
|
48
|
+
se("medium");
|
|
49
|
+
let e = await oe({
|
|
50
|
+
title: M("support.article.deleteConfirm.title", "Delete Article"),
|
|
51
|
+
message: M("support.article.deleteConfirm.message", "Delete this article? This cannot be undone."),
|
|
52
|
+
okButtonTitle: M("support.article.deleteConfirm.confirm", "Delete"),
|
|
53
|
+
cancelButtonTitle: M("common.cancel", "Cancel")
|
|
53
54
|
});
|
|
54
55
|
if (e === null) {
|
|
55
56
|
U(!0);
|
|
@@ -58,220 +59,216 @@ function A() {
|
|
|
58
59
|
e && await X();
|
|
59
60
|
}, Z = async () => {
|
|
60
61
|
if (N) try {
|
|
61
|
-
await
|
|
62
|
+
await ye(N.id), G({
|
|
62
63
|
type: "success",
|
|
63
|
-
message: "Article published successfully!"
|
|
64
|
+
message: M("support.article.notifications.published", "Article published successfully!")
|
|
64
65
|
}), J();
|
|
65
66
|
} catch {
|
|
66
67
|
G({
|
|
67
68
|
type: "error",
|
|
68
|
-
message: "Failed to publish article."
|
|
69
|
+
message: M("support.article.errors.publishFailed", "Failed to publish article.")
|
|
69
70
|
}), J();
|
|
70
71
|
}
|
|
71
72
|
}, Q = async () => {
|
|
72
73
|
if (N) try {
|
|
73
|
-
await
|
|
74
|
+
await be(N.id), G({
|
|
74
75
|
type: "success",
|
|
75
|
-
message: "Article unpublished."
|
|
76
|
+
message: M("support.article.notifications.unpublished", "Article unpublished.")
|
|
76
77
|
}), J();
|
|
77
78
|
} catch {
|
|
78
79
|
G({
|
|
79
80
|
type: "error",
|
|
80
|
-
message: "Failed to unpublish article."
|
|
81
|
+
message: M("support.article.errors.unpublishFailed", "Failed to unpublish article.")
|
|
81
82
|
}), J();
|
|
82
83
|
}
|
|
83
|
-
},
|
|
84
|
+
}, Te = async () => {
|
|
84
85
|
if (N) try {
|
|
85
|
-
await
|
|
86
|
+
await xe(N.id), G({
|
|
86
87
|
type: "success",
|
|
87
|
-
message: "Article archived."
|
|
88
|
+
message: M("support.article.notifications.archived", "Article archived.")
|
|
88
89
|
}), J();
|
|
89
90
|
} catch {
|
|
90
91
|
G({
|
|
91
92
|
type: "error",
|
|
92
|
-
message: "Failed to archive article."
|
|
93
|
+
message: M("support.article.errors.archiveFailed", "Failed to archive article.")
|
|
93
94
|
}), J();
|
|
94
95
|
}
|
|
95
|
-
}, $ = z || B || V || H,
|
|
96
|
+
}, $ = z || B || V || H, Ee = [
|
|
96
97
|
...N?.status === "DRAFT" ? [{
|
|
97
|
-
label: "Publish",
|
|
98
|
-
icon: B ? /* @__PURE__ */
|
|
98
|
+
label: B ? M("support.article.actions.publishing", "Publishing…") : M("support.article.actions.publish", "Publish"),
|
|
99
|
+
icon: B ? /* @__PURE__ */ x(v, {
|
|
99
100
|
size: 16,
|
|
100
101
|
className: "animate-spin"
|
|
101
|
-
}) : /* @__PURE__ */
|
|
102
|
+
}) : /* @__PURE__ */ x(g, { size: 16 }),
|
|
102
103
|
onSelect: () => void Z(),
|
|
103
104
|
disabled: $
|
|
104
105
|
}] : [],
|
|
105
106
|
...N?.status === "PUBLISHED" ? [{
|
|
106
|
-
label: "Unpublish",
|
|
107
|
-
icon: V ? /* @__PURE__ */
|
|
107
|
+
label: V ? M("support.article.actions.unpublishing", "Unpublishing…") : M("support.article.actions.unpublish", "Unpublish"),
|
|
108
|
+
icon: V ? /* @__PURE__ */ x(v, {
|
|
108
109
|
size: 16,
|
|
109
110
|
className: "animate-spin"
|
|
110
|
-
}) : /* @__PURE__ */
|
|
111
|
+
}) : /* @__PURE__ */ x(_, { size: 16 }),
|
|
111
112
|
onSelect: () => void Q(),
|
|
112
113
|
disabled: $
|
|
113
114
|
}, {
|
|
114
|
-
label: "Archive",
|
|
115
|
-
icon: H ? /* @__PURE__ */
|
|
115
|
+
label: H ? M("support.article.actions.archiving", "Archiving…") : M("support.article.actions.archive", "Archive"),
|
|
116
|
+
icon: H ? /* @__PURE__ */ x(v, {
|
|
116
117
|
size: 16,
|
|
117
118
|
className: "animate-spin"
|
|
118
|
-
}) : /* @__PURE__ */
|
|
119
|
-
onSelect: () => void
|
|
119
|
+
}) : /* @__PURE__ */ x(f, { size: 16 }),
|
|
120
|
+
onSelect: () => void Te(),
|
|
120
121
|
disabled: $
|
|
121
122
|
}] : [],
|
|
122
123
|
{
|
|
123
|
-
label: "Delete",
|
|
124
|
-
icon: /* @__PURE__ */
|
|
124
|
+
label: M("support.article.actions.delete", "Delete"),
|
|
125
|
+
icon: /* @__PURE__ */ x(y, { size: 16 }),
|
|
125
126
|
intent: "destructive",
|
|
126
|
-
onSelect: () => void
|
|
127
|
+
onSelect: () => void we(),
|
|
127
128
|
disabled: $
|
|
128
129
|
}
|
|
129
130
|
];
|
|
130
|
-
return P ? /* @__PURE__ */
|
|
131
|
+
return P ? /* @__PURE__ */ x(a, {
|
|
131
132
|
showHeader: !1,
|
|
132
|
-
children: /* @__PURE__ */
|
|
133
|
-
}) : F || !N ? /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ x(i, { message: M("support.article.loading", "Loading article...") })
|
|
134
|
+
}) : F || !N ? /* @__PURE__ */ x(a, {
|
|
134
135
|
showHeader: !1,
|
|
135
|
-
children: /* @__PURE__ */
|
|
136
|
+
children: /* @__PURE__ */ x(re, {
|
|
136
137
|
illustration: "empty-search",
|
|
137
|
-
title: "Article not found",
|
|
138
|
-
description: "The article you're looking for doesn't exist or has been removed.",
|
|
139
|
-
action: /* @__PURE__ */
|
|
140
|
-
onClick: () =>
|
|
141
|
-
children: [/* @__PURE__ */
|
|
138
|
+
title: M("support.article.notFound.title", "Article not found"),
|
|
139
|
+
description: M("support.article.notFound.description", "The article you're looking for doesn't exist or has been removed."),
|
|
140
|
+
action: /* @__PURE__ */ S(n, {
|
|
141
|
+
onClick: () => A(`${j}/kb`),
|
|
142
|
+
children: [/* @__PURE__ */ x(p, { size: 18 }), M("support.article.actions.backToKnowledgeBase", "Back to Knowledge Base")]
|
|
142
143
|
})
|
|
143
144
|
})
|
|
144
|
-
}) : /* @__PURE__ */
|
|
145
|
+
}) : /* @__PURE__ */ S("div", {
|
|
145
146
|
className: "flex flex-col h-full",
|
|
146
147
|
children: [
|
|
147
|
-
W && /* @__PURE__ */
|
|
148
|
+
W && /* @__PURE__ */ S("div", {
|
|
148
149
|
className: `fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200 ${W.type === "success" ? "bg-success/10 text-success border-success/30" : "bg-error/10 text-error border-error/30"}`,
|
|
149
|
-
children: [W.type === "success" ? /* @__PURE__ */
|
|
150
|
+
children: [W.type === "success" ? /* @__PURE__ */ x(h, {
|
|
150
151
|
size: 20,
|
|
151
152
|
className: "text-success"
|
|
152
|
-
}) : /* @__PURE__ */
|
|
153
|
+
}) : /* @__PURE__ */ x(d, {
|
|
153
154
|
size: 20,
|
|
154
155
|
className: "text-error"
|
|
155
|
-
}), /* @__PURE__ */
|
|
156
|
+
}), /* @__PURE__ */ x("span", {
|
|
156
157
|
className: "font-medium",
|
|
157
158
|
children: W.message
|
|
158
159
|
})]
|
|
159
160
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
open:
|
|
161
|
+
/* @__PURE__ */ x(ge, {
|
|
162
|
+
open: Se,
|
|
162
163
|
onOpenChange: (e) => {
|
|
163
164
|
e || U(!1);
|
|
164
165
|
},
|
|
165
|
-
children: /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ S(w, {
|
|
166
167
|
className: "max-w-md",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
168
|
-
"Are you sure you want to delete \"",
|
|
169
|
-
N.title,
|
|
170
|
-
"\"? This action cannot be undone."
|
|
171
|
-
] })] }), /* @__PURE__ */ C(D, { children: [/* @__PURE__ */ S(he, {
|
|
168
|
+
children: [/* @__PURE__ */ S(D, { children: [/* @__PURE__ */ x(O, { children: M("support.article.deleteDialog.title", "Delete Article?") }), /* @__PURE__ */ x(T, { children: M("support.article.deleteDialog.description", "Are you sure you want to delete \"{{title}}\"? This action cannot be undone.", { title: N.title }) })] }), /* @__PURE__ */ S(E, { children: [/* @__PURE__ */ x(_e, {
|
|
172
169
|
asChild: !0,
|
|
173
|
-
children: /* @__PURE__ */
|
|
170
|
+
children: /* @__PURE__ */ x(n, {
|
|
174
171
|
variant: "destructive",
|
|
175
172
|
onClick: (e) => {
|
|
176
173
|
e.preventDefault(), X();
|
|
177
174
|
},
|
|
178
175
|
disabled: z,
|
|
179
176
|
className: "flex-1",
|
|
180
|
-
children: z ? /* @__PURE__ */
|
|
177
|
+
children: z ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(v, {
|
|
181
178
|
size: 16,
|
|
182
179
|
className: "animate-spin"
|
|
183
|
-
}), "Deleting…"] }) : /* @__PURE__ */
|
|
180
|
+
}), M("support.article.actions.deleting", "Deleting…")] }) : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(y, { size: 16 }), M("support.article.actions.delete", "Delete")] })
|
|
184
181
|
})
|
|
185
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ x(C, {
|
|
186
183
|
asChild: !0,
|
|
187
|
-
children: /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ x(n, {
|
|
188
185
|
variant: "outline",
|
|
189
186
|
className: "flex-1",
|
|
190
|
-
children: "Cancel"
|
|
187
|
+
children: M("common.cancel", "Cancel")
|
|
191
188
|
})
|
|
192
189
|
})] })]
|
|
193
190
|
})
|
|
194
191
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ S("div", {
|
|
196
193
|
className: "border-b border-border-subtle p-4 sm:p-6",
|
|
197
194
|
children: [
|
|
198
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ S("div", {
|
|
199
196
|
className: "mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
197
|
+
children: [/* @__PURE__ */ S(n, {
|
|
201
198
|
variant: "ghost",
|
|
202
199
|
size: "sm",
|
|
203
|
-
onClick: () =>
|
|
204
|
-
children: [/* @__PURE__ */
|
|
205
|
-
}), /* @__PURE__ */
|
|
200
|
+
onClick: () => A(`${j}/kb`),
|
|
201
|
+
children: [/* @__PURE__ */ x(p, { size: 20 }), M("support.article.actions.backToKnowledgeBase", "Back to Knowledge Base")]
|
|
202
|
+
}), /* @__PURE__ */ x(r, {
|
|
206
203
|
primary: {
|
|
207
|
-
label: "Edit",
|
|
208
|
-
icon: /* @__PURE__ */
|
|
209
|
-
onSelect: () =>
|
|
204
|
+
label: M("support.article.actions.edit", "Edit"),
|
|
205
|
+
icon: /* @__PURE__ */ x(ce, { size: 16 }),
|
|
206
|
+
onSelect: () => A("edit"),
|
|
210
207
|
disabled: $
|
|
211
208
|
},
|
|
212
|
-
actions:
|
|
209
|
+
actions: Ee
|
|
213
210
|
})]
|
|
214
211
|
}),
|
|
215
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ S("div", {
|
|
216
213
|
className: "flex items-center gap-3 mb-3",
|
|
217
|
-
children: [N.category && /* @__PURE__ */
|
|
214
|
+
children: [N.category && /* @__PURE__ */ x(t, {
|
|
218
215
|
variant: "outline",
|
|
219
216
|
className: o(N.category.color),
|
|
220
217
|
children: N.category.name
|
|
221
218
|
}), (() => {
|
|
222
219
|
switch (N.status) {
|
|
223
|
-
case "PUBLISHED": return /* @__PURE__ */
|
|
220
|
+
case "PUBLISHED": return /* @__PURE__ */ S(t, {
|
|
224
221
|
className: "bg-success/10 text-success",
|
|
225
|
-
children: [/* @__PURE__ */
|
|
222
|
+
children: [/* @__PURE__ */ x(g, {
|
|
226
223
|
size: 12,
|
|
227
224
|
className: "mr-1"
|
|
228
|
-
}), "Published"]
|
|
225
|
+
}), M("support.article.status.published", "Published")]
|
|
229
226
|
});
|
|
230
|
-
case "DRAFT": return /* @__PURE__ */
|
|
227
|
+
case "DRAFT": return /* @__PURE__ */ S(t, {
|
|
231
228
|
className: "bg-warning/10 text-warning",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ x(_, {
|
|
233
230
|
size: 12,
|
|
234
231
|
className: "mr-1"
|
|
235
|
-
}), "Draft"]
|
|
232
|
+
}), M("support.article.status.draft", "Draft")]
|
|
236
233
|
});
|
|
237
|
-
case "ARCHIVED": return /* @__PURE__ */
|
|
234
|
+
case "ARCHIVED": return /* @__PURE__ */ S(t, {
|
|
238
235
|
className: "bg-bg-sunken text-tertiary",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ x(f, {
|
|
240
237
|
size: 12,
|
|
241
238
|
className: "mr-1"
|
|
242
|
-
}), "Archived"]
|
|
239
|
+
}), M("support.article.status.archived", "Archived")]
|
|
243
240
|
});
|
|
244
241
|
default: return null;
|
|
245
242
|
}
|
|
246
243
|
})()]
|
|
247
244
|
}),
|
|
248
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ x("h1", {
|
|
249
246
|
className: "mb-4 text-2xl font-bold text-text-primary sm:text-3xl lg:text-4xl",
|
|
250
247
|
children: N.title
|
|
251
248
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ S("div", {
|
|
253
250
|
className: "flex flex-wrap items-center gap-4 text-sm text-text-secondary",
|
|
254
251
|
children: [
|
|
255
|
-
N.author && /* @__PURE__ */
|
|
252
|
+
N.author && /* @__PURE__ */ S("div", {
|
|
256
253
|
className: "flex items-center gap-2",
|
|
257
|
-
children: [/* @__PURE__ */
|
|
254
|
+
children: [/* @__PURE__ */ x(pe, { size: 16 }), /* @__PURE__ */ x("span", { children: N.author.name })]
|
|
258
255
|
}),
|
|
259
|
-
N.publishedAt && /* @__PURE__ */
|
|
256
|
+
N.publishedAt && /* @__PURE__ */ S("div", {
|
|
260
257
|
className: "flex items-center gap-2",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
258
|
+
children: [/* @__PURE__ */ x(m, { size: 16 }), /* @__PURE__ */ x("span", { children: new Date(N.publishedAt).toLocaleDateString() })]
|
|
262
259
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ S("div", {
|
|
264
261
|
className: "flex items-center gap-2",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ x(le, { size: 16 }), /* @__PURE__ */ x("span", { children: M("support.article.views", "{{count}} views", { count: N.viewCount }) })]
|
|
266
263
|
})
|
|
267
264
|
]
|
|
268
265
|
}),
|
|
269
|
-
N.tags && N.tags.length > 0 && /* @__PURE__ */
|
|
266
|
+
N.tags && N.tags.length > 0 && /* @__PURE__ */ S("div", {
|
|
270
267
|
className: "flex flex-wrap items-center gap-2 mt-4",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ x(ue, {
|
|
272
269
|
size: 16,
|
|
273
270
|
className: "text-text-secondary"
|
|
274
|
-
}), N.tags.map((e) => /* @__PURE__ */
|
|
271
|
+
}), N.tags.map((e) => /* @__PURE__ */ x(t, {
|
|
275
272
|
variant: "outline",
|
|
276
273
|
className: "text-xs",
|
|
277
274
|
children: e
|
|
@@ -279,83 +276,73 @@ function A() {
|
|
|
279
276
|
})
|
|
280
277
|
]
|
|
281
278
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ x("div", {
|
|
283
280
|
className: "flex-1 overflow-y-auto p-4 sm:p-6",
|
|
284
|
-
children: /* @__PURE__ */
|
|
281
|
+
children: /* @__PURE__ */ S("div", {
|
|
285
282
|
className: "max-w-4xl mx-auto",
|
|
286
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ x(ne, {
|
|
287
284
|
storageKey: "support-article-detail-admin",
|
|
288
|
-
title: "Manage this article",
|
|
285
|
+
title: M("support.article.nextSteps.title", "Manage this article"),
|
|
289
286
|
className: "mb-6",
|
|
290
287
|
steps: [
|
|
291
288
|
{
|
|
292
289
|
id: "edit",
|
|
293
|
-
label: "Edit the article",
|
|
294
|
-
description: "Update the content, category or tags.",
|
|
295
|
-
onClick: () =>
|
|
290
|
+
label: M("support.article.nextSteps.edit.label", "Edit the article"),
|
|
291
|
+
description: M("support.article.nextSteps.edit.description", "Update the content, category or tags."),
|
|
292
|
+
onClick: () => A("edit")
|
|
296
293
|
},
|
|
297
294
|
...N.status === "DRAFT" ? [{
|
|
298
295
|
id: "publish",
|
|
299
|
-
label: "Publish it",
|
|
300
|
-
description: "Make this article visible to customers.",
|
|
296
|
+
label: M("support.article.nextSteps.publish.label", "Publish it"),
|
|
297
|
+
description: M("support.article.nextSteps.publish.description", "Make this article visible to customers."),
|
|
301
298
|
onClick: () => void Z()
|
|
302
299
|
}] : [{
|
|
303
300
|
id: "unpublish",
|
|
304
|
-
label: "Unpublish or archive",
|
|
305
|
-
description: "Hide it from customers while you revise.",
|
|
301
|
+
label: M("support.article.nextSteps.unpublish.label", "Unpublish or archive"),
|
|
302
|
+
description: M("support.article.nextSteps.unpublish.description", "Hide it from customers while you revise."),
|
|
306
303
|
onClick: () => void Q(),
|
|
307
304
|
done: N.status === "ARCHIVED"
|
|
308
305
|
}],
|
|
309
306
|
{
|
|
310
307
|
id: "back-kb",
|
|
311
|
-
label: "Back to the knowledge base",
|
|
312
|
-
description: "Return to the full list of articles.",
|
|
313
|
-
onClick: () =>
|
|
308
|
+
label: M("support.article.nextSteps.back.label", "Back to the knowledge base"),
|
|
309
|
+
description: M("support.article.nextSteps.back.description", "Return to the full list of articles."),
|
|
310
|
+
onClick: () => A(`${j}/kb`)
|
|
314
311
|
}
|
|
315
312
|
]
|
|
316
|
-
}), /* @__PURE__ */
|
|
313
|
+
}), /* @__PURE__ */ x("div", {
|
|
317
314
|
className: "prose prose-lg max-w-none dark:prose-invert text-text-primary",
|
|
318
|
-
dangerouslySetInnerHTML: { __html:
|
|
315
|
+
dangerouslySetInnerHTML: { __html: ae.sanitize(N.content) }
|
|
319
316
|
})]
|
|
320
317
|
})
|
|
321
318
|
}),
|
|
322
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ x("div", {
|
|
323
320
|
className: "border-t border-border-subtle bg-bg-surface p-4 sm:p-6",
|
|
324
|
-
children: /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ S(te, {
|
|
325
322
|
className: "max-w-4xl mx-auto p-5",
|
|
326
323
|
children: [
|
|
327
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ x("h3", {
|
|
328
325
|
className: "text-lg font-semibold mb-1 text-text-primary",
|
|
329
|
-
children: "Was this article helpful?"
|
|
326
|
+
children: M("support.article.feedback.title", "Was this article helpful?")
|
|
330
327
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ x("p", {
|
|
332
329
|
className: "mb-4 text-sm text-text-secondary",
|
|
333
|
-
children: "See how readers rate this guide — low scores are a cue to revise it."
|
|
330
|
+
children: M("support.article.feedback.description", "See how readers rate this guide — low scores are a cue to revise it.")
|
|
334
331
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ S("div", {
|
|
336
333
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ S(n, {
|
|
338
335
|
variant: "outline",
|
|
339
336
|
onClick: () => Y(!0),
|
|
340
337
|
disabled: R,
|
|
341
338
|
className: "px-6",
|
|
342
|
-
children: [
|
|
343
|
-
|
|
344
|
-
"Yes (",
|
|
345
|
-
N.helpfulCount,
|
|
346
|
-
")"
|
|
347
|
-
]
|
|
348
|
-
}), /* @__PURE__ */ C(n, {
|
|
339
|
+
children: [/* @__PURE__ */ x(fe, { size: 20 }), M("support.article.feedback.yes", "Yes ({{count}})", { count: N.helpfulCount })]
|
|
340
|
+
}), /* @__PURE__ */ S(n, {
|
|
349
341
|
variant: "outline",
|
|
350
342
|
onClick: () => Y(!1),
|
|
351
343
|
disabled: R,
|
|
352
344
|
className: "px-6",
|
|
353
|
-
children: [
|
|
354
|
-
/* @__PURE__ */ S(le, { size: 20 }),
|
|
355
|
-
"No (",
|
|
356
|
-
N.notHelpfulCount,
|
|
357
|
-
")"
|
|
358
|
-
]
|
|
345
|
+
children: [/* @__PURE__ */ x(de, { size: 20 }), M("support.article.feedback.no", "No ({{count}})", { count: N.notHelpfulCount })]
|
|
359
346
|
})]
|
|
360
347
|
})
|
|
361
348
|
]
|
|
@@ -365,6 +352,6 @@ function A() {
|
|
|
365
352
|
});
|
|
366
353
|
}
|
|
367
354
|
//#endregion
|
|
368
|
-
export {
|
|
355
|
+
export { k as ArticleDetailAdminPage };
|
|
369
356
|
|
|
370
357
|
//# sourceMappingURL=ArticleDetailAdminPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleDetailAdminPage.js","names":[],"sources":["../../../src/support/pages/ArticleDetailAdminPage.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { useParams, useNavigate } from 'react-router';\nimport DOMPurify from 'dompurify';\nimport {\n ArrowLeft,\n ThumbsUp,\n ThumbsDown,\n Eye,\n Calendar,\n User,\n Tag,\n Edit,\n Trash2,\n Globe,\n GlobeLock,\n Archive,\n AlertCircle,\n CheckCircle,\n Loader2,\n} from 'lucide-react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '@burdenoff/fe-libs/ui';\nimport { Button, Badge, CTAOverflowMenu, EmphasisPanel, NextSteps } from '../components/ui';\nimport type { CTAAction } from '@burdenoff/fe-libs/ui';\nimport { useKnowledgeBaseOperations } from '../hooks/useKnowledgeBaseOperations';\nimport { PageLayout, LoadingState, EmptyState } from '../components/PageLayout';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\nimport { useSupport } from '../providers/SupportProvider';\nimport { getCategoryBadgeClass } from '../utils/categoryColors';\n\n/**\n * Admin-facing article detail page.\n *\n * Full controls: edit, publish, unpublish, archive, delete,\n * status badges, in addition to article content and voting.\n */\nexport function ArticleDetailAdminPage() {\n const { slug } = useParams<{ slug: string }>();\n const navigate = useNavigate();\n const { basePath = '' } = useSupport();\n const {\n articleDetail,\n articleLoading,\n articleError,\n voteArticle,\n recordView,\n ratingArticle,\n deleteArticle,\n publishArticle,\n unpublishArticle,\n archiveArticle,\n deletingArticle,\n publishingArticle,\n unpublishingArticle,\n archivingArticle,\n } = useKnowledgeBaseOperations(slug);\n\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\n const [notification, setNotification] = useState<{\n type: 'success' | 'error';\n message: string;\n } | null>(null);\n const navigateTimerRef = useRef<ReturnType<typeof setTimeout>>(null);\n const notificationTimerRef = useRef<ReturnType<typeof setTimeout>>(null);\n\n useEffect(() => {\n if (articleDetail?.id) {\n recordView(articleDetail.id);\n }\n }, [articleDetail?.id, recordView]);\n\n // Cleanup timers on unmount to avoid state updates on unmounted component\n useEffect(() => {\n return () => {\n if (navigateTimerRef.current) clearTimeout(navigateTimerRef.current);\n if (notificationTimerRef.current) clearTimeout(notificationTimerRef.current);\n };\n }, []);\n\n const scheduleNotificationDismiss = () => {\n if (notificationTimerRef.current) clearTimeout(notificationTimerRef.current);\n notificationTimerRef.current = setTimeout(() => setNotification(null), 3000);\n };\n\n const scheduleNavigate = (path: string) => {\n if (navigateTimerRef.current) clearTimeout(navigateTimerRef.current);\n navigateTimerRef.current = setTimeout(() => navigate(path), 1000);\n };\n\n const handleVote = async (helpful: boolean) => {\n if (!articleDetail) return;\n try {\n await voteArticle(articleDetail.id, helpful);\n } catch (error) {\n console.error('Failed to vote:', error);\n }\n };\n\n const handleDelete = async () => {\n if (!articleDetail) return;\n try {\n await deleteArticle(articleDetail.id);\n setNotification({ type: 'success', message: 'Article deleted successfully!' });\n void nativeNotify('success');\n scheduleNavigate(`${basePath}/kb`);\n } catch {\n setNotification({ type: 'error', message: 'Failed to delete article.' });\n void nativeNotify('error');\n scheduleNotificationDismiss();\n }\n setShowDeleteConfirm(false);\n };\n\n const requestDelete = async () => {\n void nativeImpact('medium');\n const result = await nativeConfirm({\n title: 'Delete Article',\n message: 'Delete this article? This cannot be undone.',\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n if (result === null) {\n setShowDeleteConfirm(true);\n return;\n }\n if (result) {\n await handleDelete();\n }\n };\n\n const handlePublish = async () => {\n if (!articleDetail) return;\n try {\n await publishArticle(articleDetail.id);\n setNotification({ type: 'success', message: 'Article published successfully!' });\n scheduleNotificationDismiss();\n } catch {\n setNotification({ type: 'error', message: 'Failed to publish article.' });\n scheduleNotificationDismiss();\n }\n };\n\n const handleUnpublish = async () => {\n if (!articleDetail) return;\n try {\n await unpublishArticle(articleDetail.id);\n setNotification({ type: 'success', message: 'Article unpublished.' });\n scheduleNotificationDismiss();\n } catch {\n setNotification({ type: 'error', message: 'Failed to unpublish article.' });\n scheduleNotificationDismiss();\n }\n };\n\n const handleArchive = async () => {\n if (!articleDetail) return;\n try {\n await archiveArticle(articleDetail.id);\n setNotification({ type: 'success', message: 'Article archived.' });\n scheduleNotificationDismiss();\n } catch {\n setNotification({ type: 'error', message: 'Failed to archive article.' });\n scheduleNotificationDismiss();\n }\n };\n\n const isProcessing =\n deletingArticle || publishingArticle || unpublishingArticle || archivingArticle;\n\n const lifecycleActions: CTAAction[] = [\n ...(articleDetail?.status === 'DRAFT'\n ? [\n {\n label: 'Publish',\n icon: publishingArticle ? (\n <Loader2 size={16} className=\"animate-spin\" />\n ) : (\n <Globe size={16} />\n ),\n onSelect: () => void handlePublish(),\n disabled: isProcessing,\n },\n ]\n : []),\n ...(articleDetail?.status === 'PUBLISHED'\n ? [\n {\n label: 'Unpublish',\n icon: unpublishingArticle ? (\n <Loader2 size={16} className=\"animate-spin\" />\n ) : (\n <GlobeLock size={16} />\n ),\n onSelect: () => void handleUnpublish(),\n disabled: isProcessing,\n },\n {\n label: 'Archive',\n icon: archivingArticle ? (\n <Loader2 size={16} className=\"animate-spin\" />\n ) : (\n <Archive size={16} />\n ),\n onSelect: () => void handleArchive(),\n disabled: isProcessing,\n },\n ]\n : []),\n {\n label: 'Delete',\n icon: <Trash2 size={16} />,\n intent: 'destructive' as const,\n onSelect: () => void requestDelete(),\n disabled: isProcessing,\n },\n ];\n\n if (articleLoading) {\n return (\n <PageLayout showHeader={false}>\n <LoadingState message=\"Loading article…\" />\n </PageLayout>\n );\n }\n\n if (articleError || !articleDetail) {\n return (\n <PageLayout showHeader={false}>\n <EmptyState\n illustration=\"empty-search\"\n title=\"Article not found\"\n description=\"The article you're looking for doesn't exist or has been removed.\"\n action={\n <Button onClick={() => navigate(`${basePath}/kb`)}>\n <ArrowLeft size={18} />\n Back to Knowledge Base\n </Button>\n }\n />\n </PageLayout>\n );\n }\n\n const getStatusBadge = () => {\n switch (articleDetail.status) {\n case 'PUBLISHED':\n return (\n <Badge className=\"bg-success/10 text-success\">\n <Globe size={12} className=\"mr-1\" />\n Published\n </Badge>\n );\n case 'DRAFT':\n return (\n <Badge className=\"bg-warning/10 text-warning\">\n <GlobeLock size={12} className=\"mr-1\" />\n Draft\n </Badge>\n );\n case 'ARCHIVED':\n return (\n <Badge className=\"bg-bg-sunken text-tertiary\">\n <Archive size={12} className=\"mr-1\" />\n Archived\n </Badge>\n );\n default:\n return null;\n }\n };\n\n return (\n <div className=\"flex flex-col h-full\">\n {/* Notification */}\n {notification && (\n <div\n className={`fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200 ${\n notification.type === 'success'\n ? 'bg-success/10 text-success border-success/30'\n : 'bg-error/10 text-error border-error/30'\n }`}\n >\n {notification.type === 'success' ? (\n <CheckCircle size={20} className=\"text-success\" />\n ) : (\n <AlertCircle size={20} className=\"text-error\" />\n )}\n <span className=\"font-medium\">{notification.message}</span>\n </div>\n )}\n\n {/* Delete Confirmation Modal */}\n <AlertDialog\n open={showDeleteConfirm}\n onOpenChange={(open) => {\n if (!open) setShowDeleteConfirm(false);\n }}\n >\n <AlertDialogContent className=\"max-w-md\">\n <AlertDialogHeader>\n <AlertDialogTitle>Delete Article?</AlertDialogTitle>\n <AlertDialogDescription>\n Are you sure you want to delete "{articleDetail.title}"? This action cannot\n be undone.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogAction asChild>\n <Button\n variant=\"destructive\"\n onClick={(e) => {\n e.preventDefault();\n void handleDelete();\n }}\n disabled={deletingArticle}\n className=\"flex-1\"\n >\n {deletingArticle ? (\n <>\n <Loader2 size={16} className=\"animate-spin\" />\n Deleting…\n </>\n ) : (\n <>\n <Trash2 size={16} />\n Delete\n </>\n )}\n </Button>\n </AlertDialogAction>\n <AlertDialogCancel asChild>\n <Button variant=\"outline\" className=\"flex-1\">\n Cancel\n </Button>\n </AlertDialogCancel>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n\n {/* Header */}\n <div className=\"border-b border-border-subtle p-4 sm:p-6\">\n <div className=\"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <Button variant=\"ghost\" size=\"sm\" onClick={() => navigate(`${basePath}/kb`)}>\n <ArrowLeft size={20} />\n Back to Knowledge Base\n </Button>\n\n {/* Admin Actions — one primary CTA (Edit), the rest in the overflow menu */}\n <CTAOverflowMenu\n primary={{\n label: 'Edit',\n icon: <Edit size={16} />,\n onSelect: () => navigate('edit'),\n disabled: isProcessing,\n }}\n actions={lifecycleActions}\n />\n </div>\n\n <div className=\"flex items-center gap-3 mb-3\">\n {articleDetail.category && (\n <Badge\n variant=\"outline\"\n className={getCategoryBadgeClass(articleDetail.category.color)}\n >\n {articleDetail.category.name}\n </Badge>\n )}\n {getStatusBadge()}\n </div>\n\n <h1 className=\"mb-4 text-2xl font-bold text-text-primary sm:text-3xl lg:text-4xl\">\n {articleDetail.title}\n </h1>\n\n <div className=\"flex flex-wrap items-center gap-4 text-sm text-text-secondary\">\n {articleDetail.author && (\n <div className=\"flex items-center gap-2\">\n <User size={16} />\n <span>{articleDetail.author.name}</span>\n </div>\n )}\n {articleDetail.publishedAt && (\n <div className=\"flex items-center gap-2\">\n <Calendar size={16} />\n <span>{new Date(articleDetail.publishedAt).toLocaleDateString()}</span>\n </div>\n )}\n <div className=\"flex items-center gap-2\">\n <Eye size={16} />\n <span>{articleDetail.viewCount} views</span>\n </div>\n </div>\n\n {articleDetail.tags && articleDetail.tags.length > 0 && (\n <div className=\"flex flex-wrap items-center gap-2 mt-4\">\n <Tag size={16} className=\"text-text-secondary\" />\n {articleDetail.tags.map((tag: string) => (\n <Badge key={tag} variant=\"outline\" className=\"text-xs\">\n {tag}\n </Badge>\n ))}\n </div>\n )}\n </div>\n\n {/* Content */}\n <div className=\"flex-1 overflow-y-auto p-4 sm:p-6\">\n <div className=\"max-w-4xl mx-auto\">\n <NextSteps\n storageKey=\"support-article-detail-admin\"\n title=\"Manage this article\"\n className=\"mb-6\"\n steps={[\n {\n id: 'edit',\n label: 'Edit the article',\n description: 'Update the content, category or tags.',\n onClick: () => navigate('edit'),\n },\n ...(articleDetail.status === 'DRAFT'\n ? [\n {\n id: 'publish',\n label: 'Publish it',\n description: 'Make this article visible to customers.',\n onClick: () => void handlePublish(),\n },\n ]\n : [\n {\n id: 'unpublish',\n label: 'Unpublish or archive',\n description: 'Hide it from customers while you revise.',\n onClick: () => void handleUnpublish(),\n done: articleDetail.status === 'ARCHIVED',\n },\n ]),\n {\n id: 'back-kb',\n label: 'Back to the knowledge base',\n description: 'Return to the full list of articles.',\n onClick: () => navigate(`${basePath}/kb`),\n },\n ]}\n />\n <div\n className=\"prose prose-lg max-w-none dark:prose-invert text-text-primary\"\n dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(articleDetail.content) }}\n />\n </div>\n </div>\n\n {/* Feedback — the page's single emphasis zone */}\n <div className=\"border-t border-border-subtle bg-bg-surface p-4 sm:p-6\">\n <EmphasisPanel className=\"max-w-4xl mx-auto p-5\">\n <h3 className=\"text-lg font-semibold mb-1 text-text-primary\">\n Was this article helpful?\n </h3>\n <p className=\"mb-4 text-sm text-text-secondary\">\n See how readers rate this guide — low scores are a cue to revise it.\n </p>\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4\">\n <Button\n variant=\"outline\"\n onClick={() => handleVote(true)}\n disabled={ratingArticle}\n className=\"px-6\"\n >\n <ThumbsUp size={20} />\n Yes ({articleDetail.helpfulCount})\n </Button>\n <Button\n variant=\"outline\"\n onClick={() => handleVote(false)}\n disabled={ratingArticle}\n className=\"px-6\"\n >\n <ThumbsDown size={20} />\n No ({articleDetail.notHelpfulCount})\n </Button>\n </div>\n </EmphasisPanel>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA4CA,SAAgB,IAAyB;CACvC,IAAM,EAAE,YAAS,GAA4B,GACvC,IAAW,GAAY,GACvB,EAAE,cAAW,OAAO,EAAW,GAC/B,EACJ,kBACA,mBACA,iBACA,gBACA,eACA,kBACA,mBACA,oBACA,sBACA,oBACA,oBACA,sBACA,wBACA,wBACE,GAA2B,CAAI,GAE7B,CAAC,IAAmB,KAAwB,EAAS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A;SAAC;SACnB,EAAc;SAAgB;QAC7B;OACL,CAAA,CAAA;;KACQ;;GACZ,CAAA;EACF;;AAET"}
|
|
1
|
+
{"version":3,"file":"ArticleDetailAdminPage.js","names":[],"sources":["../../../src/support/pages/ArticleDetailAdminPage.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { useParams, useNavigate } from 'react-router';\nimport DOMPurify from 'dompurify';\nimport {\n ArrowLeft,\n ThumbsUp,\n ThumbsDown,\n Eye,\n Calendar,\n User,\n Tag,\n Edit,\n Trash2,\n Globe,\n GlobeLock,\n Archive,\n AlertCircle,\n CheckCircle,\n Loader2,\n} from 'lucide-react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '@burdenoff/fe-libs/ui';\nimport { Button, Badge, CTAOverflowMenu, EmphasisPanel, NextSteps } from '../components/ui';\nimport type { CTAAction } from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../hooks/useTr';\nimport { useKnowledgeBaseOperations } from '../hooks/useKnowledgeBaseOperations';\nimport { PageLayout, LoadingState, EmptyState } from '../components/PageLayout';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\nimport { useSupport } from '../providers/SupportProvider';\nimport { getCategoryBadgeClass } from '../utils/categoryColors';\n\n/**\n * Admin-facing article detail page.\n *\n * Full controls: edit, publish, unpublish, archive, delete,\n * status badges, in addition to article content and voting.\n */\nexport function ArticleDetailAdminPage() {\n const { slug } = useParams<{ slug: string }>();\n const navigate = useNavigate();\n const { basePath = '' } = useSupport();\n const tr = useTr();\n const {\n articleDetail,\n articleLoading,\n articleError,\n voteArticle,\n recordView,\n ratingArticle,\n deleteArticle,\n publishArticle,\n unpublishArticle,\n archiveArticle,\n deletingArticle,\n publishingArticle,\n unpublishingArticle,\n archivingArticle,\n } = useKnowledgeBaseOperations(slug);\n\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\n const [notification, setNotification] = useState<{\n type: 'success' | 'error';\n message: string;\n } | null>(null);\n const navigateTimerRef = useRef<ReturnType<typeof setTimeout>>(null);\n const notificationTimerRef = useRef<ReturnType<typeof setTimeout>>(null);\n\n useEffect(() => {\n if (articleDetail?.id) {\n recordView(articleDetail.id);\n }\n }, [articleDetail?.id, recordView]);\n\n // Cleanup timers on unmount to avoid state updates on unmounted component\n useEffect(() => {\n return () => {\n if (navigateTimerRef.current) clearTimeout(navigateTimerRef.current);\n if (notificationTimerRef.current) clearTimeout(notificationTimerRef.current);\n };\n }, []);\n\n const scheduleNotificationDismiss = () => {\n if (notificationTimerRef.current) clearTimeout(notificationTimerRef.current);\n notificationTimerRef.current = setTimeout(() => setNotification(null), 3000);\n };\n\n const scheduleNavigate = (path: string) => {\n if (navigateTimerRef.current) clearTimeout(navigateTimerRef.current);\n navigateTimerRef.current = setTimeout(() => navigate(path), 1000);\n };\n\n const handleVote = async (helpful: boolean) => {\n if (!articleDetail) return;\n try {\n await voteArticle(articleDetail.id, helpful);\n } catch (error) {\n console.error('Failed to vote:', error);\n }\n };\n\n const handleDelete = async () => {\n if (!articleDetail) return;\n try {\n await deleteArticle(articleDetail.id);\n setNotification({\n type: 'success',\n message: tr('support.article.notifications.deleted', 'Article deleted successfully!'),\n });\n void nativeNotify('success');\n scheduleNavigate(`${basePath}/kb`);\n } catch {\n setNotification({\n type: 'error',\n message: tr('support.article.errors.deleteFailed', 'Failed to delete article.'),\n });\n void nativeNotify('error');\n scheduleNotificationDismiss();\n }\n setShowDeleteConfirm(false);\n };\n\n const requestDelete = async () => {\n void nativeImpact('medium');\n const result = await nativeConfirm({\n title: tr('support.article.deleteConfirm.title', 'Delete Article'),\n message: tr(\n 'support.article.deleteConfirm.message',\n 'Delete this article? This cannot be undone.'\n ),\n okButtonTitle: tr('support.article.deleteConfirm.confirm', 'Delete'),\n cancelButtonTitle: tr('common.cancel', 'Cancel'),\n });\n if (result === null) {\n setShowDeleteConfirm(true);\n return;\n }\n if (result) {\n await handleDelete();\n }\n };\n\n const handlePublish = async () => {\n if (!articleDetail) return;\n try {\n await publishArticle(articleDetail.id);\n setNotification({\n type: 'success',\n message: tr('support.article.notifications.published', 'Article published successfully!'),\n });\n scheduleNotificationDismiss();\n } catch {\n setNotification({\n type: 'error',\n message: tr('support.article.errors.publishFailed', 'Failed to publish article.'),\n });\n scheduleNotificationDismiss();\n }\n };\n\n const handleUnpublish = async () => {\n if (!articleDetail) return;\n try {\n await unpublishArticle(articleDetail.id);\n setNotification({\n type: 'success',\n message: tr('support.article.notifications.unpublished', 'Article unpublished.'),\n });\n scheduleNotificationDismiss();\n } catch {\n setNotification({\n type: 'error',\n message: tr('support.article.errors.unpublishFailed', 'Failed to unpublish article.'),\n });\n scheduleNotificationDismiss();\n }\n };\n\n const handleArchive = async () => {\n if (!articleDetail) return;\n try {\n await archiveArticle(articleDetail.id);\n setNotification({\n type: 'success',\n message: tr('support.article.notifications.archived', 'Article archived.'),\n });\n scheduleNotificationDismiss();\n } catch {\n setNotification({\n type: 'error',\n message: tr('support.article.errors.archiveFailed', 'Failed to archive article.'),\n });\n scheduleNotificationDismiss();\n }\n };\n\n const isProcessing =\n deletingArticle || publishingArticle || unpublishingArticle || archivingArticle;\n\n const lifecycleActions: CTAAction[] = [\n ...(articleDetail?.status === 'DRAFT'\n ? [\n {\n label: publishingArticle\n ? tr('support.article.actions.publishing', 'Publishing…')\n : tr('support.article.actions.publish', 'Publish'),\n icon: publishingArticle ? (\n <Loader2 size={16} className=\"animate-spin\" />\n ) : (\n <Globe size={16} />\n ),\n onSelect: () => void handlePublish(),\n disabled: isProcessing,\n },\n ]\n : []),\n ...(articleDetail?.status === 'PUBLISHED'\n ? [\n {\n label: unpublishingArticle\n ? tr('support.article.actions.unpublishing', 'Unpublishing…')\n : tr('support.article.actions.unpublish', 'Unpublish'),\n icon: unpublishingArticle ? (\n <Loader2 size={16} className=\"animate-spin\" />\n ) : (\n <GlobeLock size={16} />\n ),\n onSelect: () => void handleUnpublish(),\n disabled: isProcessing,\n },\n {\n label: archivingArticle\n ? tr('support.article.actions.archiving', 'Archiving…')\n : tr('support.article.actions.archive', 'Archive'),\n icon: archivingArticle ? (\n <Loader2 size={16} className=\"animate-spin\" />\n ) : (\n <Archive size={16} />\n ),\n onSelect: () => void handleArchive(),\n disabled: isProcessing,\n },\n ]\n : []),\n {\n label: tr('support.article.actions.delete', 'Delete'),\n icon: <Trash2 size={16} />,\n intent: 'destructive' as const,\n onSelect: () => void requestDelete(),\n disabled: isProcessing,\n },\n ];\n\n if (articleLoading) {\n return (\n <PageLayout showHeader={false}>\n <LoadingState message={tr('support.article.loading', 'Loading article...')} />\n </PageLayout>\n );\n }\n\n if (articleError || !articleDetail) {\n return (\n <PageLayout showHeader={false}>\n <EmptyState\n illustration=\"empty-search\"\n title={tr('support.article.notFound.title', 'Article not found')}\n description={tr(\n 'support.article.notFound.description',\n \"The article you're looking for doesn't exist or has been removed.\"\n )}\n action={\n <Button onClick={() => navigate(`${basePath}/kb`)}>\n <ArrowLeft size={18} />\n {tr('support.article.actions.backToKnowledgeBase', 'Back to Knowledge Base')}\n </Button>\n }\n />\n </PageLayout>\n );\n }\n\n const getStatusBadge = () => {\n switch (articleDetail.status) {\n case 'PUBLISHED':\n return (\n <Badge className=\"bg-success/10 text-success\">\n <Globe size={12} className=\"mr-1\" />\n {tr('support.article.status.published', 'Published')}\n </Badge>\n );\n case 'DRAFT':\n return (\n <Badge className=\"bg-warning/10 text-warning\">\n <GlobeLock size={12} className=\"mr-1\" />\n {tr('support.article.status.draft', 'Draft')}\n </Badge>\n );\n case 'ARCHIVED':\n return (\n <Badge className=\"bg-bg-sunken text-tertiary\">\n <Archive size={12} className=\"mr-1\" />\n {tr('support.article.status.archived', 'Archived')}\n </Badge>\n );\n default:\n return null;\n }\n };\n\n return (\n <div className=\"flex flex-col h-full\">\n {/* Notification */}\n {notification && (\n <div\n className={`fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200 ${\n notification.type === 'success'\n ? 'bg-success/10 text-success border-success/30'\n : 'bg-error/10 text-error border-error/30'\n }`}\n >\n {notification.type === 'success' ? (\n <CheckCircle size={20} className=\"text-success\" />\n ) : (\n <AlertCircle size={20} className=\"text-error\" />\n )}\n <span className=\"font-medium\">{notification.message}</span>\n </div>\n )}\n\n {/* Delete Confirmation Modal */}\n <AlertDialog\n open={showDeleteConfirm}\n onOpenChange={(open) => {\n if (!open) setShowDeleteConfirm(false);\n }}\n >\n <AlertDialogContent className=\"max-w-md\">\n <AlertDialogHeader>\n <AlertDialogTitle>\n {tr('support.article.deleteDialog.title', 'Delete Article?')}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {tr(\n 'support.article.deleteDialog.description',\n 'Are you sure you want to delete \"{{title}}\"? This action cannot be undone.',\n { title: articleDetail.title }\n )}\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogAction asChild>\n <Button\n variant=\"destructive\"\n onClick={(e) => {\n e.preventDefault();\n void handleDelete();\n }}\n disabled={deletingArticle}\n className=\"flex-1\"\n >\n {deletingArticle ? (\n <>\n <Loader2 size={16} className=\"animate-spin\" />\n {tr('support.article.actions.deleting', 'Deleting…')}\n </>\n ) : (\n <>\n <Trash2 size={16} />\n {tr('support.article.actions.delete', 'Delete')}\n </>\n )}\n </Button>\n </AlertDialogAction>\n <AlertDialogCancel asChild>\n <Button variant=\"outline\" className=\"flex-1\">\n {tr('common.cancel', 'Cancel')}\n </Button>\n </AlertDialogCancel>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n\n {/* Header */}\n <div className=\"border-b border-border-subtle p-4 sm:p-6\">\n <div className=\"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <Button variant=\"ghost\" size=\"sm\" onClick={() => navigate(`${basePath}/kb`)}>\n <ArrowLeft size={20} />\n {tr('support.article.actions.backToKnowledgeBase', 'Back to Knowledge Base')}\n </Button>\n\n {/* Admin Actions — one primary CTA (Edit), the rest in the overflow menu */}\n <CTAOverflowMenu\n primary={{\n label: tr('support.article.actions.edit', 'Edit'),\n icon: <Edit size={16} />,\n onSelect: () => navigate('edit'),\n disabled: isProcessing,\n }}\n actions={lifecycleActions}\n />\n </div>\n\n <div className=\"flex items-center gap-3 mb-3\">\n {articleDetail.category && (\n <Badge\n variant=\"outline\"\n className={getCategoryBadgeClass(articleDetail.category.color)}\n >\n {articleDetail.category.name}\n </Badge>\n )}\n {getStatusBadge()}\n </div>\n\n <h1 className=\"mb-4 text-2xl font-bold text-text-primary sm:text-3xl lg:text-4xl\">\n {articleDetail.title}\n </h1>\n\n <div className=\"flex flex-wrap items-center gap-4 text-sm text-text-secondary\">\n {articleDetail.author && (\n <div className=\"flex items-center gap-2\">\n <User size={16} />\n <span>{articleDetail.author.name}</span>\n </div>\n )}\n {articleDetail.publishedAt && (\n <div className=\"flex items-center gap-2\">\n <Calendar size={16} />\n <span>{new Date(articleDetail.publishedAt).toLocaleDateString()}</span>\n </div>\n )}\n <div className=\"flex items-center gap-2\">\n <Eye size={16} />\n <span>\n {tr('support.article.views', '{{count}} views', {\n count: articleDetail.viewCount,\n })}\n </span>\n </div>\n </div>\n\n {articleDetail.tags && articleDetail.tags.length > 0 && (\n <div className=\"flex flex-wrap items-center gap-2 mt-4\">\n <Tag size={16} className=\"text-text-secondary\" />\n {articleDetail.tags.map((tag: string) => (\n <Badge key={tag} variant=\"outline\" className=\"text-xs\">\n {tag}\n </Badge>\n ))}\n </div>\n )}\n </div>\n\n {/* Content */}\n <div className=\"flex-1 overflow-y-auto p-4 sm:p-6\">\n <div className=\"max-w-4xl mx-auto\">\n <NextSteps\n storageKey=\"support-article-detail-admin\"\n title={tr('support.article.nextSteps.title', 'Manage this article')}\n className=\"mb-6\"\n steps={[\n {\n id: 'edit',\n label: tr('support.article.nextSteps.edit.label', 'Edit the article'),\n description: tr(\n 'support.article.nextSteps.edit.description',\n 'Update the content, category or tags.'\n ),\n onClick: () => navigate('edit'),\n },\n ...(articleDetail.status === 'DRAFT'\n ? [\n {\n id: 'publish',\n label: tr('support.article.nextSteps.publish.label', 'Publish it'),\n description: tr(\n 'support.article.nextSteps.publish.description',\n 'Make this article visible to customers.'\n ),\n onClick: () => void handlePublish(),\n },\n ]\n : [\n {\n id: 'unpublish',\n label: tr(\n 'support.article.nextSteps.unpublish.label',\n 'Unpublish or archive'\n ),\n description: tr(\n 'support.article.nextSteps.unpublish.description',\n 'Hide it from customers while you revise.'\n ),\n onClick: () => void handleUnpublish(),\n done: articleDetail.status === 'ARCHIVED',\n },\n ]),\n {\n id: 'back-kb',\n label: tr('support.article.nextSteps.back.label', 'Back to the knowledge base'),\n description: tr(\n 'support.article.nextSteps.back.description',\n 'Return to the full list of articles.'\n ),\n onClick: () => navigate(`${basePath}/kb`),\n },\n ]}\n />\n <div\n className=\"prose prose-lg max-w-none dark:prose-invert text-text-primary\"\n dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(articleDetail.content) }}\n />\n </div>\n </div>\n\n {/* Feedback — the page's single emphasis zone */}\n <div className=\"border-t border-border-subtle bg-bg-surface p-4 sm:p-6\">\n <EmphasisPanel className=\"max-w-4xl mx-auto p-5\">\n <h3 className=\"text-lg font-semibold mb-1 text-text-primary\">\n {tr('support.article.feedback.title', 'Was this article helpful?')}\n </h3>\n <p className=\"mb-4 text-sm text-text-secondary\">\n {tr(\n 'support.article.feedback.description',\n 'See how readers rate this guide — low scores are a cue to revise it.'\n )}\n </p>\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4\">\n <Button\n variant=\"outline\"\n onClick={() => handleVote(true)}\n disabled={ratingArticle}\n className=\"px-6\"\n >\n <ThumbsUp size={20} />\n {tr('support.article.feedback.yes', 'Yes ({{count}})', {\n count: articleDetail.helpfulCount,\n })}\n </Button>\n <Button\n variant=\"outline\"\n onClick={() => handleVote(false)}\n disabled={ratingArticle}\n className=\"px-6\"\n >\n <ThumbsDown size={20} />\n {tr('support.article.feedback.no', 'No ({{count}})', {\n count: articleDetail.notHelpfulCount,\n })}\n </Button>\n </div>\n </EmphasisPanel>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA6CA,SAAgB,IAAyB;CACvC,IAAM,EAAE,YAAS,GAA4B,GACvC,IAAW,GAAY,GACvB,EAAE,cAAW,OAAO,GAAW,GAC/B,IAAK,EAAM,GACX,EACJ,kBACA,mBACA,iBACA,gBACA,eACA,kBACA,mBACA,oBACA,sBACA,oBACA,oBACA,sBACA,wBACA,wBACE,GAA2B,CAAI,GAE7B,CAAC,IAAmB,KAAwB,EAAS,EAAK,GAC1D,CAAC,GAAc,KAAmB,EAG9B,IAAI,GACR,IAAmB,EAAsC,IAAI,GAC7D,IAAuB,EAAsC,IAAI;CASvE,AAPA,QAAgB;EACd,AAAI,GAAe,MACjB,EAAW,EAAc,EAAE;CAE/B,GAAG,CAAC,GAAe,IAAI,CAAU,CAAC,GAGlC,cACe;EAEX,AADI,EAAiB,WAAS,aAAa,EAAiB,OAAO,GAC/D,EAAqB,WAAS,aAAa,EAAqB,OAAO;CAC7E,GACC,CAAC,CAAC;CAEL,IAAM,UAAoC;EAExC,AADI,EAAqB,WAAS,aAAa,EAAqB,OAAO,GAC3E,EAAqB,UAAU,iBAAiB,EAAgB,IAAI,GAAG,GAAI;CAC7E,GAEM,MAAoB,MAAiB;EAEzC,AADI,EAAiB,WAAS,aAAa,EAAiB,OAAO,GACnE,EAAiB,UAAU,iBAAiB,EAAS,CAAI,GAAG,GAAI;CAClE,GAEM,IAAa,OAAO,MAAqB;EACxC,OACL,IAAI;GACF,MAAM,EAAY,EAAc,IAAI,CAAO;EAC7C,SAAS,GAAO;GACd,QAAQ,MAAM,mBAAmB,CAAK;EACxC;CACF,GAEM,IAAe,YAAY;EAC1B,OACL;OAAI;IAOF,AANA,MAAM,GAAc,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