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