@burdenoff/microfe-support 2026.624.1 → 2026.625.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/support/components/NotificationToast.js +1 -1
- package/dist/support/components/NotificationToast.js.map +1 -1
- package/dist/support/components/PageLayout.js +2 -2
- package/dist/support/components/PageLayout.js.map +1 -1
- package/dist/support/components/analytics/CategoryBreakdown.js +28 -26
- package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
- package/dist/support/components/analytics/MetricCard.js +21 -16
- package/dist/support/components/analytics/MetricCard.js.map +1 -1
- package/dist/support/components/analytics/PriorityBreakdown.js +30 -28
- package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
- package/dist/support/components/analytics/SLAReport.js +44 -42
- package/dist/support/components/analytics/SLAReport.js.map +1 -1
- package/dist/support/components/analytics/SatisfactionDistribution.js +59 -57
- package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
- package/dist/support/components/analytics/TopAgents.js +31 -29
- package/dist/support/components/analytics/TopAgents.js.map +1 -1
- package/dist/support/components/analytics/TrendChart.js +24 -22
- package/dist/support/components/analytics/TrendChart.js.map +1 -1
- package/dist/support/components/kb/ArticleForm.js +1 -1
- package/dist/support/components/kb/ArticleForm.js.map +1 -1
- package/dist/support/components/settings/CannedResponsesSettings.js +3 -3
- package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js +3 -3
- package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
- package/dist/support/components/settings/TicketCategoriesSettings.js +154 -153
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/ui.js +2 -2
- package/dist/support/pages/AnalyticsPage.js +129 -126
- package/dist/support/pages/AnalyticsPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +191 -206
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +2 -2
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +8 -8
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateArticlePage.js +1 -1
- package/dist/support/pages/CreateArticlePage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.js +1 -1
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/EditArticlePage.js +1 -1
- package/dist/support/pages/EditArticlePage.js.map +1 -1
- package/dist/support/pages/JobApplicationDetailPage.js +10 -10
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +2 -2
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.js +3 -3
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +3 -3
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
- package/dist/support/pages/TicketDetailUserPage.js +49 -49
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.js +4 -4
- package/dist/support/pages/TicketListPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,257 +1,242 @@
|
|
|
1
1
|
import { useSupport as e } from "../providers/SupportProvider.js";
|
|
2
|
-
import { Badge as t, Button as n } from "../components/ui.js";
|
|
3
|
-
import { EmptyState as
|
|
4
|
-
import { getCategoryBadgeClass as
|
|
5
|
-
import { useKnowledgeBaseOperations as
|
|
6
|
-
import { purify as
|
|
7
|
-
import { nativeConfirm as
|
|
8
|
-
import { useEffect as
|
|
9
|
-
import { AlertCircle as
|
|
10
|
-
import { useNavigate as
|
|
11
|
-
import { Fragment as
|
|
2
|
+
import { Badge as t, Button as n, CTAOverflowMenu as ee } from "../components/ui.js";
|
|
3
|
+
import { EmptyState as te, LoadingState as ne, PageLayout as r } from "../components/PageLayout.js";
|
|
4
|
+
import { getCategoryBadgeClass as re } from "../utils/categoryColors.js";
|
|
5
|
+
import { useKnowledgeBaseOperations as i } from "../hooks/useKnowledgeBaseOperations.js";
|
|
6
|
+
import { purify as a } from "../../node_modules/dompurify/dist/purify.es.js";
|
|
7
|
+
import { nativeConfirm as ie, nativeImpact as ae, nativeNotify as o } from "../../utils/nativeBridge.js";
|
|
8
|
+
import { useEffect as s, useRef as c, useState as l } from "react";
|
|
9
|
+
import { AlertCircle as oe, Archive as u, ArrowLeft as d, BookOpen as f, Calendar as p, CheckCircle as m, Edit as h, Eye as g, Globe as _, GlobeLock as v, Loader2 as y, Tag as se, ThumbsDown as ce, ThumbsUp as le, Trash2 as b, User as ue } from "lucide-react";
|
|
10
|
+
import { useNavigate as de, useParams as fe } from "react-router-dom";
|
|
11
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
12
|
+
import { AlertDialog as pe, AlertDialogAction as w, AlertDialogCancel as T, AlertDialogContent as E, AlertDialogDescription as D, AlertDialogFooter as O, AlertDialogHeader as k, AlertDialogTitle as A } from "@burdenoff/fe-libs/ui";
|
|
12
13
|
//#region src/support/pages/ArticleDetailAdminPage.tsx
|
|
13
|
-
function
|
|
14
|
-
let { slug:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}, [
|
|
18
|
-
|
|
14
|
+
function j() {
|
|
15
|
+
let { slug: j } = fe(), M = de(), { basePath: N = "" } = e(), { articleDetail: P, articleLoading: F, articleError: I, voteArticle: L, recordView: R, ratingArticle: z, deleteArticle: B, publishArticle: me, unpublishArticle: he, archiveArticle: ge, deletingArticle: V, publishingArticle: H, unpublishingArticle: U, archivingArticle: W } = i(j), [_e, G] = l(!1), [K, q] = l(null), J = c(null), Y = c(null);
|
|
16
|
+
s(() => {
|
|
17
|
+
P?.id && R(P.id);
|
|
18
|
+
}, [P?.id, R]), s(() => () => {
|
|
19
|
+
J.current && clearTimeout(J.current), Y.current && clearTimeout(Y.current);
|
|
19
20
|
}, []);
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
if (
|
|
26
|
-
await
|
|
21
|
+
let X = () => {
|
|
22
|
+
Y.current && clearTimeout(Y.current), Y.current = setTimeout(() => q(null), 3e3);
|
|
23
|
+
}, ve = (e) => {
|
|
24
|
+
J.current && clearTimeout(J.current), J.current = setTimeout(() => M(e), 1e3);
|
|
25
|
+
}, Z = async (e) => {
|
|
26
|
+
if (P) try {
|
|
27
|
+
await L(P.id, e);
|
|
27
28
|
} catch (e) {
|
|
28
29
|
console.error("Failed to vote:", e);
|
|
29
30
|
}
|
|
30
|
-
},
|
|
31
|
-
if (
|
|
31
|
+
}, Q = async () => {
|
|
32
|
+
if (P) {
|
|
32
33
|
try {
|
|
33
|
-
await
|
|
34
|
+
await B(P.id), q({
|
|
34
35
|
type: "success",
|
|
35
36
|
message: "Article deleted successfully!"
|
|
36
|
-
}),
|
|
37
|
+
}), o("success"), ve(`${N}/kb`);
|
|
37
38
|
} catch {
|
|
38
|
-
|
|
39
|
+
q({
|
|
39
40
|
type: "error",
|
|
40
41
|
message: "Failed to delete article."
|
|
41
|
-
}),
|
|
42
|
+
}), o("error"), X();
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
+
G(!1);
|
|
44
45
|
}
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
let e = await
|
|
46
|
+
}, ye = async () => {
|
|
47
|
+
ae("medium");
|
|
48
|
+
let e = await ie({
|
|
48
49
|
title: "Delete Article",
|
|
49
50
|
message: "Delete this article? This cannot be undone.",
|
|
50
51
|
okButtonTitle: "Delete",
|
|
51
52
|
cancelButtonTitle: "Cancel"
|
|
52
53
|
});
|
|
53
54
|
if (e === null) {
|
|
54
|
-
|
|
55
|
+
G(!0);
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
57
|
-
e && await
|
|
58
|
-
},
|
|
59
|
-
if (
|
|
60
|
-
await
|
|
58
|
+
e && await Q();
|
|
59
|
+
}, be = async () => {
|
|
60
|
+
if (P) try {
|
|
61
|
+
await me(P.id), q({
|
|
61
62
|
type: "success",
|
|
62
63
|
message: "Article published successfully!"
|
|
63
|
-
}),
|
|
64
|
+
}), X();
|
|
64
65
|
} catch {
|
|
65
|
-
|
|
66
|
+
q({
|
|
66
67
|
type: "error",
|
|
67
68
|
message: "Failed to publish article."
|
|
68
|
-
}),
|
|
69
|
+
}), X();
|
|
69
70
|
}
|
|
70
|
-
},
|
|
71
|
-
if (
|
|
72
|
-
await
|
|
71
|
+
}, xe = async () => {
|
|
72
|
+
if (P) try {
|
|
73
|
+
await he(P.id), q({
|
|
73
74
|
type: "success",
|
|
74
75
|
message: "Article unpublished."
|
|
75
|
-
}),
|
|
76
|
+
}), X();
|
|
76
77
|
} catch {
|
|
77
|
-
|
|
78
|
+
q({
|
|
78
79
|
type: "error",
|
|
79
80
|
message: "Failed to unpublish article."
|
|
80
|
-
}),
|
|
81
|
+
}), X();
|
|
81
82
|
}
|
|
82
|
-
},
|
|
83
|
-
if (
|
|
84
|
-
await
|
|
83
|
+
}, Se = async () => {
|
|
84
|
+
if (P) try {
|
|
85
|
+
await ge(P.id), q({
|
|
85
86
|
type: "success",
|
|
86
87
|
message: "Article archived."
|
|
87
|
-
}),
|
|
88
|
+
}), X();
|
|
88
89
|
} catch {
|
|
89
|
-
|
|
90
|
+
q({
|
|
90
91
|
type: "error",
|
|
91
92
|
message: "Failed to archive article."
|
|
92
|
-
}),
|
|
93
|
+
}), X();
|
|
94
|
+
}
|
|
95
|
+
}, $ = V || H || U || W, Ce = [
|
|
96
|
+
...P?.status === "DRAFT" ? [{
|
|
97
|
+
label: "Publish",
|
|
98
|
+
icon: H ? /* @__PURE__ */ S(y, {
|
|
99
|
+
size: 16,
|
|
100
|
+
className: "animate-spin"
|
|
101
|
+
}) : /* @__PURE__ */ S(_, { size: 16 }),
|
|
102
|
+
onSelect: () => void be(),
|
|
103
|
+
disabled: $
|
|
104
|
+
}] : [],
|
|
105
|
+
...P?.status === "PUBLISHED" ? [{
|
|
106
|
+
label: "Unpublish",
|
|
107
|
+
icon: U ? /* @__PURE__ */ S(y, {
|
|
108
|
+
size: 16,
|
|
109
|
+
className: "animate-spin"
|
|
110
|
+
}) : /* @__PURE__ */ S(v, { size: 16 }),
|
|
111
|
+
onSelect: () => void xe(),
|
|
112
|
+
disabled: $
|
|
113
|
+
}, {
|
|
114
|
+
label: "Archive",
|
|
115
|
+
icon: W ? /* @__PURE__ */ S(y, {
|
|
116
|
+
size: 16,
|
|
117
|
+
className: "animate-spin"
|
|
118
|
+
}) : /* @__PURE__ */ S(u, { size: 16 }),
|
|
119
|
+
onSelect: () => void Se(),
|
|
120
|
+
disabled: $
|
|
121
|
+
}] : [],
|
|
122
|
+
{
|
|
123
|
+
label: "Delete",
|
|
124
|
+
icon: /* @__PURE__ */ S(b, { size: 16 }),
|
|
125
|
+
intent: "destructive",
|
|
126
|
+
onSelect: () => void ye(),
|
|
127
|
+
disabled: $
|
|
93
128
|
}
|
|
94
|
-
|
|
95
|
-
return
|
|
129
|
+
];
|
|
130
|
+
return F ? /* @__PURE__ */ S(r, {
|
|
96
131
|
showHeader: !1,
|
|
97
|
-
children: /* @__PURE__ */
|
|
98
|
-
}) :
|
|
132
|
+
children: /* @__PURE__ */ S(ne, { message: "Loading article…" })
|
|
133
|
+
}) : I || !P ? /* @__PURE__ */ S(r, {
|
|
99
134
|
showHeader: !1,
|
|
100
|
-
children: /* @__PURE__ */
|
|
101
|
-
icon: /* @__PURE__ */
|
|
135
|
+
children: /* @__PURE__ */ S(te, {
|
|
136
|
+
icon: /* @__PURE__ */ S(f, { size: 48 }),
|
|
102
137
|
title: "Article not found",
|
|
103
138
|
description: "The article you're looking for doesn't exist or has been removed.",
|
|
104
|
-
action: /* @__PURE__ */
|
|
105
|
-
onClick: () =>
|
|
106
|
-
children: [/* @__PURE__ */
|
|
139
|
+
action: /* @__PURE__ */ C(n, {
|
|
140
|
+
onClick: () => M(`${N}/kb`),
|
|
141
|
+
children: [/* @__PURE__ */ S(d, { size: 18 }), "Back to Knowledge Base"]
|
|
107
142
|
})
|
|
108
143
|
})
|
|
109
|
-
}) : /* @__PURE__ */
|
|
144
|
+
}) : /* @__PURE__ */ C("div", {
|
|
110
145
|
className: "flex flex-col h-full",
|
|
111
146
|
children: [
|
|
112
|
-
|
|
113
|
-
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-
|
|
114
|
-
children: [
|
|
147
|
+
K && /* @__PURE__ */ C("div", {
|
|
148
|
+
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 ${K.type === "success" ? "bg-success/10 text-success border-success/30" : "bg-error/10 text-error border-error/30"}`,
|
|
149
|
+
children: [K.type === "success" ? /* @__PURE__ */ S(m, {
|
|
115
150
|
size: 20,
|
|
116
151
|
className: "text-success"
|
|
117
|
-
}) : /* @__PURE__ */
|
|
152
|
+
}) : /* @__PURE__ */ S(oe, {
|
|
118
153
|
size: 20,
|
|
119
154
|
className: "text-error"
|
|
120
|
-
}), /* @__PURE__ */
|
|
155
|
+
}), /* @__PURE__ */ S("span", {
|
|
121
156
|
className: "font-medium",
|
|
122
|
-
children:
|
|
157
|
+
children: K.message
|
|
123
158
|
})]
|
|
124
159
|
}),
|
|
125
|
-
|
|
126
|
-
open:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
children: /* @__PURE__ */
|
|
131
|
-
className: "
|
|
132
|
-
children: [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
children: [/* @__PURE__ */
|
|
149
|
-
variant: "destructive",
|
|
150
|
-
onClick: Z,
|
|
151
|
-
disabled: z,
|
|
152
|
-
className: "flex-1",
|
|
153
|
-
children: z ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(b, {
|
|
154
|
-
size: 16,
|
|
155
|
-
className: "animate-spin"
|
|
156
|
-
}), "Deleting…"] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(S, { size: 16 }), "Delete"] })
|
|
157
|
-
}), /* @__PURE__ */ w(n, {
|
|
158
|
-
variant: "outline",
|
|
159
|
-
onClick: () => W(!1),
|
|
160
|
-
className: "flex-1",
|
|
161
|
-
children: "Cancel"
|
|
162
|
-
})]
|
|
160
|
+
/* @__PURE__ */ S(pe, {
|
|
161
|
+
open: _e,
|
|
162
|
+
onOpenChange: (e) => {
|
|
163
|
+
e || G(!1);
|
|
164
|
+
},
|
|
165
|
+
children: /* @__PURE__ */ C(E, {
|
|
166
|
+
className: "max-w-md",
|
|
167
|
+
children: [/* @__PURE__ */ C(k, { children: [/* @__PURE__ */ S(A, { children: "Delete Article?" }), /* @__PURE__ */ C(D, { children: [
|
|
168
|
+
"Are you sure you want to delete \"",
|
|
169
|
+
P.title,
|
|
170
|
+
"\"? This action cannot be undone."
|
|
171
|
+
] })] }), /* @__PURE__ */ C(O, { children: [/* @__PURE__ */ S(w, {
|
|
172
|
+
asChild: !0,
|
|
173
|
+
children: /* @__PURE__ */ S(n, {
|
|
174
|
+
variant: "destructive",
|
|
175
|
+
onClick: (e) => {
|
|
176
|
+
e.preventDefault(), Q();
|
|
177
|
+
},
|
|
178
|
+
disabled: V,
|
|
179
|
+
className: "flex-1",
|
|
180
|
+
children: V ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(y, {
|
|
181
|
+
size: 16,
|
|
182
|
+
className: "animate-spin"
|
|
183
|
+
}), "Deleting…"] }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(b, { size: 16 }), "Delete"] })
|
|
163
184
|
})
|
|
164
|
-
|
|
185
|
+
}), /* @__PURE__ */ S(T, {
|
|
186
|
+
asChild: !0,
|
|
187
|
+
children: /* @__PURE__ */ S(n, {
|
|
188
|
+
variant: "outline",
|
|
189
|
+
className: "flex-1",
|
|
190
|
+
children: "Cancel"
|
|
191
|
+
})
|
|
192
|
+
})] })]
|
|
165
193
|
})
|
|
166
194
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ C("div", {
|
|
168
196
|
className: "border-b border-border-subtle p-4 sm:p-6",
|
|
169
197
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ C("div", {
|
|
171
199
|
className: "mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ C(n, {
|
|
173
201
|
variant: "ghost",
|
|
174
202
|
size: "sm",
|
|
175
|
-
onClick: () =>
|
|
176
|
-
children: [/* @__PURE__ */
|
|
177
|
-
}), /* @__PURE__ */
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
children: [/* @__PURE__ */ w(g, { size: 16 }), "Edit"]
|
|
186
|
-
}),
|
|
187
|
-
k.status === "DRAFT" && /* @__PURE__ */ T(n, {
|
|
188
|
-
variant: "outline",
|
|
189
|
-
size: "sm",
|
|
190
|
-
onClick: de,
|
|
191
|
-
disabled: $,
|
|
192
|
-
className: "text-success hover:text-success/80 transition-colors duration-200",
|
|
193
|
-
children: [B ? /* @__PURE__ */ w(b, {
|
|
194
|
-
size: 16,
|
|
195
|
-
className: "animate-spin"
|
|
196
|
-
}) : /* @__PURE__ */ w(v, { size: 16 }), "Publish"]
|
|
197
|
-
}),
|
|
198
|
-
k.status === "PUBLISHED" && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T(n, {
|
|
199
|
-
variant: "outline",
|
|
200
|
-
size: "sm",
|
|
201
|
-
onClick: fe,
|
|
202
|
-
disabled: $,
|
|
203
|
-
className: "text-warning hover:text-warning/80 transition-colors duration-200",
|
|
204
|
-
children: [V ? /* @__PURE__ */ w(b, {
|
|
205
|
-
size: 16,
|
|
206
|
-
className: "animate-spin"
|
|
207
|
-
}) : /* @__PURE__ */ w(y, { size: 16 }), "Unpublish"]
|
|
208
|
-
}), /* @__PURE__ */ T(n, {
|
|
209
|
-
variant: "outline",
|
|
210
|
-
size: "sm",
|
|
211
|
-
onClick: pe,
|
|
212
|
-
disabled: $,
|
|
213
|
-
className: "text-tertiary hover:text-secondary transition-colors duration-200",
|
|
214
|
-
children: [H ? /* @__PURE__ */ w(b, {
|
|
215
|
-
size: 16,
|
|
216
|
-
className: "animate-spin"
|
|
217
|
-
}) : /* @__PURE__ */ w(d, { size: 16 }), "Archive"]
|
|
218
|
-
})] }),
|
|
219
|
-
/* @__PURE__ */ T(n, {
|
|
220
|
-
variant: "outline",
|
|
221
|
-
size: "sm",
|
|
222
|
-
onClick: () => void Q(),
|
|
223
|
-
disabled: $,
|
|
224
|
-
className: "text-error hover:text-error/80 transition-colors duration-200",
|
|
225
|
-
children: [/* @__PURE__ */ w(S, { size: 16 }), "Delete"]
|
|
226
|
-
})
|
|
227
|
-
]
|
|
203
|
+
onClick: () => M(`${N}/kb`),
|
|
204
|
+
children: [/* @__PURE__ */ S(d, { size: 20 }), "Back to Knowledge Base"]
|
|
205
|
+
}), /* @__PURE__ */ S(ee, {
|
|
206
|
+
primary: {
|
|
207
|
+
label: "Edit",
|
|
208
|
+
icon: /* @__PURE__ */ S(h, { size: 16 }),
|
|
209
|
+
onSelect: () => M("edit"),
|
|
210
|
+
disabled: $
|
|
211
|
+
},
|
|
212
|
+
actions: Ce
|
|
228
213
|
})]
|
|
229
214
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ C("div", {
|
|
231
216
|
className: "flex items-center gap-3 mb-3",
|
|
232
|
-
children: [
|
|
217
|
+
children: [P.category && /* @__PURE__ */ S(t, {
|
|
233
218
|
variant: "outline",
|
|
234
|
-
className:
|
|
235
|
-
children:
|
|
219
|
+
className: re(P.category.color),
|
|
220
|
+
children: P.category.name
|
|
236
221
|
}), (() => {
|
|
237
|
-
switch (
|
|
238
|
-
case "PUBLISHED": return /* @__PURE__ */
|
|
222
|
+
switch (P.status) {
|
|
223
|
+
case "PUBLISHED": return /* @__PURE__ */ C(t, {
|
|
239
224
|
className: "bg-success/10 text-success",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
225
|
+
children: [/* @__PURE__ */ S(_, {
|
|
241
226
|
size: 12,
|
|
242
227
|
className: "mr-1"
|
|
243
228
|
}), "Published"]
|
|
244
229
|
});
|
|
245
|
-
case "DRAFT": return /* @__PURE__ */
|
|
230
|
+
case "DRAFT": return /* @__PURE__ */ C(t, {
|
|
246
231
|
className: "bg-warning/10 text-warning",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
232
|
+
children: [/* @__PURE__ */ S(v, {
|
|
248
233
|
size: 12,
|
|
249
234
|
className: "mr-1"
|
|
250
235
|
}), "Draft"]
|
|
251
236
|
});
|
|
252
|
-
case "ARCHIVED": return /* @__PURE__ */
|
|
237
|
+
case "ARCHIVED": return /* @__PURE__ */ C(t, {
|
|
253
238
|
className: "bg-bg-sunken text-tertiary",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ S(u, {
|
|
255
240
|
size: 12,
|
|
256
241
|
className: "mr-1"
|
|
257
242
|
}), "Archived"]
|
|
@@ -260,33 +245,33 @@ function E() {
|
|
|
260
245
|
}
|
|
261
246
|
})()]
|
|
262
247
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ S("h1", {
|
|
264
249
|
className: "mb-4 text-2xl font-bold text-text-primary sm:text-3xl lg:text-4xl",
|
|
265
|
-
children:
|
|
250
|
+
children: P.title
|
|
266
251
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ C("div", {
|
|
268
253
|
className: "flex flex-wrap items-center gap-4 text-sm text-text-secondary",
|
|
269
254
|
children: [
|
|
270
|
-
|
|
255
|
+
P.author && /* @__PURE__ */ C("div", {
|
|
271
256
|
className: "flex items-center gap-2",
|
|
272
|
-
children: [/* @__PURE__ */
|
|
257
|
+
children: [/* @__PURE__ */ S(ue, { size: 16 }), /* @__PURE__ */ S("span", { children: P.author.name })]
|
|
273
258
|
}),
|
|
274
|
-
|
|
259
|
+
P.publishedAt && /* @__PURE__ */ C("div", {
|
|
275
260
|
className: "flex items-center gap-2",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
261
|
+
children: [/* @__PURE__ */ S(p, { size: 16 }), /* @__PURE__ */ S("span", { children: new Date(P.publishedAt).toLocaleDateString() })]
|
|
277
262
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ C("div", {
|
|
279
264
|
className: "flex items-center gap-2",
|
|
280
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ S(g, { size: 16 }), /* @__PURE__ */ C("span", { children: [P.viewCount, " views"] })]
|
|
281
266
|
})
|
|
282
267
|
]
|
|
283
268
|
}),
|
|
284
|
-
|
|
269
|
+
P.tags && P.tags.length > 0 && /* @__PURE__ */ C("div", {
|
|
285
270
|
className: "flex flex-wrap items-center gap-2 mt-4",
|
|
286
|
-
children: [/* @__PURE__ */
|
|
271
|
+
children: [/* @__PURE__ */ S(se, {
|
|
287
272
|
size: 16,
|
|
288
273
|
className: "text-text-secondary"
|
|
289
|
-
}),
|
|
274
|
+
}), P.tags.map((e) => /* @__PURE__ */ S(t, {
|
|
290
275
|
variant: "outline",
|
|
291
276
|
className: "text-xs",
|
|
292
277
|
children: e
|
|
@@ -294,45 +279,45 @@ function E() {
|
|
|
294
279
|
})
|
|
295
280
|
]
|
|
296
281
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ S("div", {
|
|
298
283
|
className: "flex-1 overflow-y-auto p-4 sm:p-6",
|
|
299
|
-
children: /* @__PURE__ */
|
|
284
|
+
children: /* @__PURE__ */ S("div", {
|
|
300
285
|
className: "max-w-4xl mx-auto",
|
|
301
|
-
children: /* @__PURE__ */
|
|
286
|
+
children: /* @__PURE__ */ S("div", {
|
|
302
287
|
className: "prose prose-lg max-w-none dark:prose-invert text-text-primary",
|
|
303
|
-
dangerouslySetInnerHTML: { __html:
|
|
288
|
+
dangerouslySetInnerHTML: { __html: a.sanitize(P.content) }
|
|
304
289
|
})
|
|
305
290
|
})
|
|
306
291
|
}),
|
|
307
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ S("div", {
|
|
308
293
|
className: "border-t border-border-subtle bg-bg-surface p-4 sm:p-6",
|
|
309
|
-
children: /* @__PURE__ */
|
|
294
|
+
children: /* @__PURE__ */ C("div", {
|
|
310
295
|
className: "max-w-4xl mx-auto",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
296
|
+
children: [/* @__PURE__ */ S("h3", {
|
|
312
297
|
className: "text-lg font-semibold mb-4 text-text-primary",
|
|
313
298
|
children: "Was this article helpful?"
|
|
314
|
-
}), /* @__PURE__ */
|
|
299
|
+
}), /* @__PURE__ */ C("div", {
|
|
315
300
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",
|
|
316
|
-
children: [/* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ C(n, {
|
|
317
302
|
variant: "outline",
|
|
318
|
-
onClick: () =>
|
|
319
|
-
disabled:
|
|
303
|
+
onClick: () => Z(!0),
|
|
304
|
+
disabled: z,
|
|
320
305
|
className: "px-6",
|
|
321
306
|
children: [
|
|
322
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ S(le, { size: 20 }),
|
|
323
308
|
"Yes (",
|
|
324
|
-
|
|
309
|
+
P.helpfulCount,
|
|
325
310
|
")"
|
|
326
311
|
]
|
|
327
|
-
}), /* @__PURE__ */
|
|
312
|
+
}), /* @__PURE__ */ C(n, {
|
|
328
313
|
variant: "outline",
|
|
329
|
-
onClick: () =>
|
|
330
|
-
disabled:
|
|
314
|
+
onClick: () => Z(!1),
|
|
315
|
+
disabled: z,
|
|
331
316
|
className: "px-6",
|
|
332
317
|
children: [
|
|
333
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ S(ce, { size: 20 }),
|
|
334
319
|
"No (",
|
|
335
|
-
|
|
320
|
+
P.notHelpfulCount,
|
|
336
321
|
")"
|
|
337
322
|
]
|
|
338
323
|
})]
|
|
@@ -343,6 +328,6 @@ function E() {
|
|
|
343
328
|
});
|
|
344
329
|
}
|
|
345
330
|
//#endregion
|
|
346
|
-
export {
|
|
331
|
+
export { j as ArticleDetailAdminPage };
|
|
347
332
|
|
|
348
333
|
//# sourceMappingURL=ArticleDetailAdminPage.js.map
|