@burdenoff/microfe-product 2026.624.3 → 2026.626.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/product/pages/ContentPageViewPage.js +41 -36
- package/dist/product/pages/ContentPageViewPage.js.map +1 -1
- package/dist/product/pages/ProductCatalogPage.js +63 -50
- package/dist/product/pages/ProductCatalogPage.js.map +1 -1
- package/dist/product/pages/ProductViewPage.js +220 -178
- package/dist/product/pages/ProductViewPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js +7 -7
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js +28 -26
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +119 -90
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +33 -31
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +171 -161
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +1 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +26 -24
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +152 -125
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +36 -34
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +144 -136
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +4 -4
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js +28 -26
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +111 -84
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +33 -31
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +85 -75
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductForm.js +8 -8
- package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductPlans.js +136 -147
- package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductCreatePage.js +28 -26
- package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.js +170 -140
- package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductEditPage.js +32 -30
- package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductsListPage.js +219 -202
- package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +3 -3
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js +28 -23
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +228 -209
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +31 -26
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +209 -198
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
- package/dist/product-management/shared/components/AuditHistoryTab.js +19 -17
- package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
- package/dist/product-management/shared/components/feedback/EmptyState.js +2 -20
- package/package.json +2 -2
- package/dist/product-management/shared/components/feedback/EmptyState.js.map +0 -1
|
@@ -11,52 +11,53 @@ import { AuditHistoryTab as f } from "../../../shared/components/AuditHistoryTab
|
|
|
11
11
|
import { ArrowLeft as p, Edit as m, FileText as h, Globe as g, Package as _, Trash2 as v } from "lucide-react";
|
|
12
12
|
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
13
13
|
import { useParams as S } from "react-router-dom";
|
|
14
|
+
import { CTAOverflowMenu as C, EmphasisPanel as w, GradientText as T, NextSteps as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
|
|
14
15
|
//#region src/product-management/modules/content-pages/pages/ContentPageDetailPage.tsx
|
|
15
|
-
function
|
|
16
|
+
function O(e) {
|
|
16
17
|
return e.replace(/^### (.+)$/gm, "<h3 class=\"text-lg font-semibold mt-4 mb-2\">$1</h3>").replace(/^## (.+)$/gm, "<h2 class=\"text-xl font-semibold mt-5 mb-2\">$1</h2>").replace(/^# (.+)$/gm, "<h1 class=\"text-2xl font-bold mt-6 mb-3\">$1</h1>").replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/\*(.+?)\*/g, "<em>$1</em>").replace(/`(.+?)`/g, "<code class=\"px-1.5 py-0.5 bg-bg-sunken rounded text-sm font-mono\">$1</code>").replace(/```[\s\S]*?```/g, (e) => `<pre class="bg-bg-sunken rounded-lg p-4 overflow-x-auto my-3"><code class="text-sm font-mono">${e.replace(/```\w*\n?/, "").replace(/\n?```$/, "")}</code></pre>`).replace(/\[(.+?)\]\((.+?)\)/g, "<a href=\"$2\" class=\"text-[var(--color-status-info)] underline\">$1</a>").replace(/^- (.+)$/gm, "<li class=\"ml-4 list-disc\">$1</li>").replace(/\n\n/g, "</p><p class=\"mb-3\">").replace(/\n/g, "<br/>");
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
let { id:
|
|
19
|
+
function k() {
|
|
20
|
+
let { id: k } = S(), { navigate: A, basePath: j = "/products" } = t(), M = `${j}/content-pages`, { contentPage: N, loading: P, error: F } = c(k), { deleteContentPage: I, loading: L } = l(), R = e(), { confirm: z, ConfirmDialog: B } = s(), V = async () => {
|
|
20
21
|
a("medium");
|
|
21
|
-
let e =
|
|
22
|
+
let e = R("contentPages.confirmDelete", "Are you sure you want to delete this content page?"), t = await i({
|
|
22
23
|
title: "Delete content page",
|
|
23
24
|
message: e,
|
|
24
25
|
okButtonTitle: "Delete",
|
|
25
26
|
cancelButtonTitle: "Cancel"
|
|
26
27
|
});
|
|
27
|
-
if (t === null ? await
|
|
28
|
+
if (t === null ? await z({
|
|
28
29
|
title: "Delete content page",
|
|
29
30
|
message: e,
|
|
30
31
|
okButtonTitle: "Delete",
|
|
31
32
|
cancelButtonTitle: "Cancel",
|
|
32
33
|
destructive: !0
|
|
33
34
|
}) : t) try {
|
|
34
|
-
await
|
|
35
|
+
await I(k), o("success"), A(M);
|
|
35
36
|
} catch (e) {
|
|
36
37
|
o("error"), console.error("Failed to delete content page:", e);
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
|
-
if (
|
|
40
|
+
if (P) return /* @__PURE__ */ b("div", {
|
|
40
41
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
41
|
-
children: /* @__PURE__ */ b(n, { message:
|
|
42
|
+
children: /* @__PURE__ */ b(n, { message: R("contentPages.loadingContentPage", "Loading content page...") })
|
|
42
43
|
});
|
|
43
|
-
if (
|
|
44
|
+
if (F || !N) return /* @__PURE__ */ b("div", {
|
|
44
45
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
45
46
|
children: /* @__PURE__ */ b(r, {
|
|
46
|
-
message:
|
|
47
|
+
message: F?.message || R("contentPages.contentPageNotFound", "Content page not found"),
|
|
47
48
|
action: {
|
|
48
|
-
label:
|
|
49
|
-
onClick: () =>
|
|
49
|
+
label: R("contentPages.backToContentPages", "Back to Content Pages"),
|
|
50
|
+
onClick: () => A(M)
|
|
50
51
|
}
|
|
51
52
|
})
|
|
52
53
|
});
|
|
53
|
-
let
|
|
54
|
+
let H = (e) => e ? new Date(e).toLocaleDateString("en-US", {
|
|
54
55
|
year: "numeric",
|
|
55
56
|
month: "long",
|
|
56
57
|
day: "numeric",
|
|
57
58
|
hour: "2-digit",
|
|
58
59
|
minute: "2-digit"
|
|
59
|
-
}) : "—",
|
|
60
|
+
}) : "—", U = N.seoTitle || N.seoDescription || N.seoKeywords;
|
|
60
61
|
return /* @__PURE__ */ x("div", {
|
|
61
62
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
|
|
62
63
|
children: [
|
|
@@ -64,124 +65,152 @@ function w() {
|
|
|
64
65
|
className: "mb-6",
|
|
65
66
|
children: [/* @__PURE__ */ x("button", {
|
|
66
67
|
type: "button",
|
|
67
|
-
onClick: () =>
|
|
68
|
+
onClick: () => A(M),
|
|
68
69
|
className: "\n inline-flex items-center gap-2 mb-4\n text-text-secondary\n hover:text-text-primary\n transition-all duration-200\n ",
|
|
69
70
|
children: [/* @__PURE__ */ b(p, { size: 20 }), /* @__PURE__ */ b("span", {
|
|
70
71
|
className: "text-sm font-medium",
|
|
71
|
-
children:
|
|
72
|
+
children: R("contentPages.backToContentPages", "Back to Content Pages")
|
|
72
73
|
})]
|
|
73
74
|
}), /* @__PURE__ */ x("div", {
|
|
74
|
-
className: "flex items-start justify-between",
|
|
75
|
+
className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",
|
|
75
76
|
children: [/* @__PURE__ */ x("div", {
|
|
76
77
|
className: "flex items-center gap-4",
|
|
77
78
|
children: [/* @__PURE__ */ b("div", {
|
|
78
|
-
className: "size-16 rounded-
|
|
79
|
+
className: "size-16 rounded-card bg-[var(--color-status-info-subtle)] flex items-center justify-center",
|
|
79
80
|
children: /* @__PURE__ */ b(h, {
|
|
80
81
|
size: 32,
|
|
81
82
|
className: "text-[var(--color-status-info)]"
|
|
82
83
|
})
|
|
83
84
|
}), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
|
|
84
|
-
className: "flex items-center gap-3 mb-2",
|
|
85
|
+
className: "flex flex-wrap items-center gap-3 mb-2",
|
|
85
86
|
children: [/* @__PURE__ */ b("h1", {
|
|
86
|
-
className: "text-3xl font-
|
|
87
|
-
children:
|
|
88
|
-
}), /* @__PURE__ */ b(u, { isPublished:
|
|
87
|
+
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
88
|
+
children: /* @__PURE__ */ b(T, { children: N.title })
|
|
89
|
+
}), /* @__PURE__ */ b(u, { isPublished: N.isPublished })]
|
|
89
90
|
}), /* @__PURE__ */ x("p", {
|
|
90
|
-
className: "text-text-secondary",
|
|
91
|
-
children: ["/",
|
|
91
|
+
className: "text-text-secondary font-mono",
|
|
92
|
+
children: ["/", N.slug]
|
|
92
93
|
})] })]
|
|
93
|
-
}), /* @__PURE__ */
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
94
|
+
}), /* @__PURE__ */ b(C, {
|
|
95
|
+
primary: {
|
|
96
|
+
label: R("contentPages.editPage", "Edit Page"),
|
|
97
|
+
onSelect: () => A(`${M}/${k}/edit`),
|
|
98
|
+
icon: /* @__PURE__ */ b(m, { className: "size-4" })
|
|
99
|
+
},
|
|
100
|
+
actions: [{
|
|
101
|
+
label: R("contentPages.delete", "Delete"),
|
|
102
|
+
onSelect: () => {
|
|
103
|
+
V();
|
|
104
|
+
},
|
|
105
|
+
intent: "destructive",
|
|
106
|
+
disabled: L,
|
|
107
|
+
icon: /* @__PURE__ */ b(v, { className: "size-4" })
|
|
108
|
+
}]
|
|
107
109
|
})]
|
|
108
110
|
})]
|
|
109
111
|
}),
|
|
112
|
+
/* @__PURE__ */ b(D, {
|
|
113
|
+
className: "mb-6",
|
|
114
|
+
children: R("contentPages.detailPurpose", `Preview exactly how "${N.title}" renders for users, check its metadata, SEO, and product association, and review the audit history. Edit it to change the content or its published state — only published pages are visible to end users.`)
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ b(E, {
|
|
117
|
+
storageKey: "product-content-page-detail",
|
|
118
|
+
className: "mb-6",
|
|
119
|
+
steps: [
|
|
120
|
+
{
|
|
121
|
+
id: "edit",
|
|
122
|
+
label: R("contentPages.steps.edit", "Edit this page"),
|
|
123
|
+
description: R("contentPages.steps.editDesc", "Update the content, SEO, or publish status. A new version is recorded on each save."),
|
|
124
|
+
onClick: () => A(`${M}/${k}/edit`)
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: "review-seo",
|
|
128
|
+
label: R("contentPages.steps.seo", "Check SEO & metadata"),
|
|
129
|
+
description: R("contentPages.steps.seoDesc", "Make sure the slug, title, and SEO fields are right before this page goes public.")
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: "back",
|
|
133
|
+
label: R("contentPages.steps.back", "Back to all content pages"),
|
|
134
|
+
description: R("contentPages.steps.backDesc", "Return to the list to manage the rest of your content."),
|
|
135
|
+
onClick: () => A(M)
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}),
|
|
110
139
|
/* @__PURE__ */ x("div", {
|
|
111
140
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
112
141
|
children: [
|
|
113
|
-
/* @__PURE__ */ x(
|
|
114
|
-
className: "lg:col-span-2
|
|
142
|
+
/* @__PURE__ */ x(w, {
|
|
143
|
+
className: "lg:col-span-2",
|
|
115
144
|
children: [/* @__PURE__ */ b("h2", {
|
|
116
145
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
117
|
-
children:
|
|
146
|
+
children: R("contentPages.contentPreview", "Content Preview")
|
|
118
147
|
}), /* @__PURE__ */ b("div", {
|
|
119
148
|
className: "prose prose-sm max-w-none text-text-secondary leading-relaxed",
|
|
120
|
-
dangerouslySetInnerHTML: { __html:
|
|
149
|
+
dangerouslySetInnerHTML: { __html: N.contentFormat === "markdown" ? O(N.content) : N.content }
|
|
121
150
|
})]
|
|
122
151
|
}),
|
|
123
152
|
/* @__PURE__ */ x("div", {
|
|
124
|
-
className: "bg-surface border border-
|
|
153
|
+
className: "bg-bg-surface bg-accent-wash border border-border-seam rounded-card p-6 shadow-elevation-1 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
|
|
125
154
|
children: [/* @__PURE__ */ b("h2", {
|
|
126
155
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
127
|
-
children:
|
|
156
|
+
children: R("contentPages.metadata", "Metadata")
|
|
128
157
|
}), /* @__PURE__ */ x("dl", {
|
|
129
158
|
className: "space-y-3",
|
|
130
159
|
children: [
|
|
131
160
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
132
161
|
className: "text-sm font-medium text-text-secondary",
|
|
133
|
-
children:
|
|
162
|
+
children: R("contentPages.slug", "Slug")
|
|
134
163
|
}), /* @__PURE__ */ b("dd", {
|
|
135
164
|
className: "text-sm text-text-primary mt-1 font-mono",
|
|
136
|
-
children:
|
|
165
|
+
children: N.slug
|
|
137
166
|
})] }),
|
|
138
167
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
139
168
|
className: "text-sm font-medium text-text-secondary",
|
|
140
|
-
children:
|
|
169
|
+
children: R("contentPages.version", "Version")
|
|
141
170
|
}), /* @__PURE__ */ x("dd", {
|
|
142
171
|
className: "text-sm text-text-primary mt-1 font-mono",
|
|
143
|
-
children: ["v",
|
|
172
|
+
children: ["v", N.version]
|
|
144
173
|
})] }),
|
|
145
174
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
146
175
|
className: "text-sm font-medium text-text-secondary",
|
|
147
|
-
children:
|
|
176
|
+
children: R("contentPages.contentFormat", "Content Format")
|
|
148
177
|
}), /* @__PURE__ */ b("dd", {
|
|
149
178
|
className: "text-sm text-text-primary mt-1 capitalize",
|
|
150
|
-
children:
|
|
179
|
+
children: N.contentFormat
|
|
151
180
|
})] }),
|
|
152
181
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
153
182
|
className: "text-sm font-medium text-text-secondary",
|
|
154
|
-
children:
|
|
183
|
+
children: R("contentPages.sortOrder", "Sort Order")
|
|
155
184
|
}), /* @__PURE__ */ b("dd", {
|
|
156
185
|
className: "text-sm text-text-primary mt-1 font-mono",
|
|
157
|
-
children:
|
|
186
|
+
children: N.sortOrder
|
|
158
187
|
})] }),
|
|
159
188
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
160
189
|
className: "text-sm font-medium text-text-secondary",
|
|
161
|
-
children:
|
|
190
|
+
children: R("contentPages.created", "Created")
|
|
162
191
|
}), /* @__PURE__ */ b("dd", {
|
|
163
192
|
className: "text-sm text-text-primary mt-1",
|
|
164
|
-
children:
|
|
193
|
+
children: H(N.createdAt)
|
|
165
194
|
})] }),
|
|
166
195
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
167
196
|
className: "text-sm font-medium text-text-secondary",
|
|
168
|
-
children:
|
|
197
|
+
children: R("contentPages.lastUpdated", "Last Updated")
|
|
169
198
|
}), /* @__PURE__ */ b("dd", {
|
|
170
199
|
className: "text-sm text-text-primary mt-1",
|
|
171
|
-
children:
|
|
200
|
+
children: H(N.updatedAt)
|
|
172
201
|
})] }),
|
|
173
|
-
|
|
202
|
+
N.lastUpdated && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
174
203
|
className: "text-sm font-medium text-text-secondary",
|
|
175
|
-
children:
|
|
204
|
+
children: R("contentPages.contentLastUpdated", "Content Last Updated")
|
|
176
205
|
}), /* @__PURE__ */ b("dd", {
|
|
177
206
|
className: "text-sm text-text-primary mt-1",
|
|
178
|
-
children:
|
|
207
|
+
children: H(N.lastUpdated)
|
|
179
208
|
})] })
|
|
180
209
|
]
|
|
181
210
|
})]
|
|
182
211
|
}),
|
|
183
|
-
|
|
184
|
-
className: "bg-surface border border-
|
|
212
|
+
U && /* @__PURE__ */ x("div", {
|
|
213
|
+
className: "bg-bg-surface bg-accent-wash border border-border-seam rounded-card p-6 shadow-elevation-1 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
|
|
185
214
|
children: [/* @__PURE__ */ x("div", {
|
|
186
215
|
className: "flex items-center gap-2 mb-4",
|
|
187
216
|
children: [/* @__PURE__ */ b(g, {
|
|
@@ -189,33 +218,33 @@ function w() {
|
|
|
189
218
|
className: "text-text-secondary"
|
|
190
219
|
}), /* @__PURE__ */ b("h2", {
|
|
191
220
|
className: "text-lg font-semibold text-text-primary",
|
|
192
|
-
children:
|
|
221
|
+
children: R("contentPages.seoInformation", "SEO Information")
|
|
193
222
|
})]
|
|
194
223
|
}), /* @__PURE__ */ x("dl", {
|
|
195
224
|
className: "space-y-3",
|
|
196
225
|
children: [
|
|
197
|
-
|
|
226
|
+
N.seoTitle && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
198
227
|
className: "text-sm font-medium text-text-secondary",
|
|
199
|
-
children:
|
|
228
|
+
children: R("contentPages.seoTitle", "SEO Title")
|
|
200
229
|
}), /* @__PURE__ */ b("dd", {
|
|
201
230
|
className: "text-sm text-text-primary mt-1",
|
|
202
|
-
children:
|
|
231
|
+
children: N.seoTitle
|
|
203
232
|
})] }),
|
|
204
|
-
|
|
233
|
+
N.seoDescription && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
205
234
|
className: "text-sm font-medium text-text-secondary",
|
|
206
|
-
children:
|
|
235
|
+
children: R("contentPages.seoDescription", "SEO Description")
|
|
207
236
|
}), /* @__PURE__ */ b("dd", {
|
|
208
237
|
className: "text-sm text-text-primary mt-1",
|
|
209
|
-
children:
|
|
238
|
+
children: N.seoDescription
|
|
210
239
|
})] }),
|
|
211
|
-
|
|
240
|
+
N.seoKeywords && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
212
241
|
className: "text-sm font-medium text-text-secondary",
|
|
213
|
-
children:
|
|
242
|
+
children: R("contentPages.seoKeywords", "SEO Keywords")
|
|
214
243
|
}), /* @__PURE__ */ b("dd", {
|
|
215
244
|
className: "text-sm text-text-primary mt-1",
|
|
216
245
|
children: /* @__PURE__ */ b("div", {
|
|
217
246
|
className: "flex flex-wrap gap-1.5 mt-1",
|
|
218
|
-
children:
|
|
247
|
+
children: N.seoKeywords.split(",").map((e) => /* @__PURE__ */ b("span", {
|
|
219
248
|
className: "\n inline-flex px-2 py-0.5\n bg-bg-sunken\n text-text-secondary\n rounded-md text-xs font-medium\n ",
|
|
220
249
|
children: e.trim()
|
|
221
250
|
}, e.trim()))
|
|
@@ -224,8 +253,8 @@ function w() {
|
|
|
224
253
|
]
|
|
225
254
|
})]
|
|
226
255
|
}),
|
|
227
|
-
|
|
228
|
-
className: "bg-surface border border-
|
|
256
|
+
N.productId && /* @__PURE__ */ x("div", {
|
|
257
|
+
className: "bg-bg-surface bg-accent-wash border border-border-seam rounded-card p-6 shadow-elevation-1 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
|
|
229
258
|
children: [/* @__PURE__ */ x("div", {
|
|
230
259
|
className: "flex items-center gap-2 mb-4",
|
|
231
260
|
children: [/* @__PURE__ */ b(_, {
|
|
@@ -233,55 +262,55 @@ function w() {
|
|
|
233
262
|
className: "text-text-secondary"
|
|
234
263
|
}), /* @__PURE__ */ b("h2", {
|
|
235
264
|
className: "text-lg font-semibold text-text-primary",
|
|
236
|
-
children:
|
|
265
|
+
children: R("contentPages.productAssociation", "Product Association")
|
|
237
266
|
})]
|
|
238
267
|
}), /* @__PURE__ */ x("dl", {
|
|
239
268
|
className: "space-y-3",
|
|
240
269
|
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
241
270
|
className: "text-sm font-medium text-text-secondary",
|
|
242
|
-
children:
|
|
271
|
+
children: R("contentPages.productId", "Product ID")
|
|
243
272
|
}), /* @__PURE__ */ b("dd", {
|
|
244
273
|
className: "text-sm text-text-primary mt-1 font-mono",
|
|
245
|
-
children:
|
|
246
|
-
})] }),
|
|
274
|
+
children: N.productId
|
|
275
|
+
})] }), N.product && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
247
276
|
className: "text-sm font-medium text-text-secondary",
|
|
248
|
-
children:
|
|
277
|
+
children: R("contentPages.productName", "Product Name")
|
|
249
278
|
}), /* @__PURE__ */ b("dd", {
|
|
250
279
|
className: "text-sm text-text-primary mt-1",
|
|
251
|
-
children:
|
|
280
|
+
children: N.product.name
|
|
252
281
|
})] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
253
282
|
className: "text-sm font-medium text-text-secondary",
|
|
254
|
-
children:
|
|
283
|
+
children: R("contentPages.productSlug", "Product Slug")
|
|
255
284
|
}), /* @__PURE__ */ x("dd", {
|
|
256
285
|
className: "text-sm text-text-primary mt-1 font-mono",
|
|
257
|
-
children: ["/",
|
|
286
|
+
children: ["/", N.product.slug]
|
|
258
287
|
})] })] })]
|
|
259
288
|
})]
|
|
260
289
|
}),
|
|
261
|
-
|
|
262
|
-
className: "bg-surface border border-
|
|
290
|
+
N.tags && N.tags.length > 0 && /* @__PURE__ */ x("div", {
|
|
291
|
+
className: "bg-bg-surface bg-accent-wash border border-border-seam rounded-card p-6 shadow-elevation-1",
|
|
263
292
|
children: [/* @__PURE__ */ b("h2", {
|
|
264
293
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
265
|
-
children:
|
|
266
|
-
}), /* @__PURE__ */ b(d, { tags:
|
|
294
|
+
children: R("contentPages.tags", "Tags")
|
|
295
|
+
}), /* @__PURE__ */ b(d, { tags: N.tags })]
|
|
267
296
|
}),
|
|
268
297
|
/* @__PURE__ */ x("div", {
|
|
269
|
-
className: "lg:col-span-2 bg-surface border border-
|
|
298
|
+
className: "lg:col-span-2 bg-bg-surface border border-border-seam rounded-card shadow-elevation-1",
|
|
270
299
|
children: [/* @__PURE__ */ b("h2", {
|
|
271
300
|
className: "text-lg font-semibold text-text-primary p-6 pb-0",
|
|
272
|
-
children:
|
|
301
|
+
children: R("contentPages.activityHistory", "Activity History")
|
|
273
302
|
}), /* @__PURE__ */ b(f, {
|
|
274
|
-
resourceId:
|
|
303
|
+
resourceId: N.id,
|
|
275
304
|
resourceType: "ProductContentPage"
|
|
276
305
|
})]
|
|
277
306
|
})
|
|
278
307
|
]
|
|
279
308
|
}),
|
|
280
|
-
|
|
309
|
+
B
|
|
281
310
|
]
|
|
282
311
|
});
|
|
283
312
|
}
|
|
284
313
|
//#endregion
|
|
285
|
-
export {
|
|
314
|
+
export { k as ContentPageDetailPage };
|
|
286
315
|
|
|
287
316
|
//# sourceMappingURL=ContentPageDetailPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPageDetailPage.js","names":[],"sources":["../../../../../src/product-management/modules/content-pages/pages/ContentPageDetailPage.tsx"],"sourcesContent":["import { useParams } from 'react-router-dom';\nimport { ArrowLeft, Edit, Trash2, FileText, Globe, Package } from 'lucide-react';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { useContentPage, useDeleteContentPage } from '../hooks/useContentPages';\nimport { ContentPageStatusBadge } from '../components/ContentPageStatusBadge';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport { TagList } from '../../../shared/components/TagList';\nimport { AuditHistoryTab } from '../../../shared/components/AuditHistoryTab';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../../../utils/nativeBridge';\nimport { useConfirmDialog } from '../../../shared/hooks/useConfirmDialog';\n\n/**\n * Simple markdown renderer for content preview\n * Converts basic markdown syntax to HTML\n */\nfunction renderMarkdown(content: string): string {\n return (\n content\n // Headers\n .replace(/^### (.+)$/gm, '<h3 class=\"text-lg font-semibold mt-4 mb-2\">$1</h3>')\n .replace(/^## (.+)$/gm, '<h2 class=\"text-xl font-semibold mt-5 mb-2\">$1</h2>')\n .replace(/^# (.+)$/gm, '<h1 class=\"text-2xl font-bold mt-6 mb-3\">$1</h1>')\n // Bold and italic\n .replace(/\\*\\*(.+?)\\*\\*/g, '<strong>$1</strong>')\n .replace(/\\*(.+?)\\*/g, '<em>$1</em>')\n // Inline code\n .replace(\n /`(.+?)`/g,\n '<code class=\"px-1.5 py-0.5 bg-bg-sunken rounded text-sm font-mono\">$1</code>'\n )\n // Code blocks\n .replace(/```[\\s\\S]*?```/g, (match) => {\n const code = match.replace(/```\\w*\\n?/, '').replace(/\\n?```$/, '');\n return `<pre class=\"bg-bg-sunken rounded-lg p-4 overflow-x-auto my-3\"><code class=\"text-sm font-mono\">${code}</code></pre>`;\n })\n // Links\n .replace(\n /\\[(.+?)\\]\\((.+?)\\)/g,\n '<a href=\"$2\" class=\"text-[var(--color-status-info)] underline\">$1</a>'\n )\n // Unordered lists\n .replace(/^- (.+)$/gm, '<li class=\"ml-4 list-disc\">$1</li>')\n // Paragraphs (double newline)\n .replace(/\\n\\n/g, '</p><p class=\"mb-3\">')\n // Single newlines\n .replace(/\\n/g, '<br/>')\n );\n}\n\n/**\n * Content Page Detail Page\n * Shows comprehensive content page information\n */\nexport function ContentPageDetailPage() {\n const { id } = useParams<{ id: string }>();\n const { navigate, basePath = '/products' } = useProductConsole();\n const contentPagesBasePath = `${basePath}/content-pages`;\n const { contentPage, loading, error } = useContentPage(id!);\n const { deleteContentPage, loading: deleteLoading } = useDeleteContentPage();\n const tr = useTr();\n const { confirm, ConfirmDialog } = useConfirmDialog();\n\n const handleDelete = async () => {\n void nativeImpact('medium');\n const message = tr(\n 'contentPages.confirmDelete',\n 'Are you sure you want to delete this content page?'\n );\n const native = await nativeConfirm({\n title: 'Delete content page',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n const ok =\n native === null\n ? await confirm({\n title: 'Delete content page',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n destructive: true,\n })\n : native;\n if (!ok) return;\n\n try {\n await deleteContentPage(id!);\n void nativeNotify('success');\n navigate(contentPagesBasePath);\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to delete content page:', error);\n }\n };\n\n if (loading) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <LoadingState message={tr('contentPages.loadingContentPage', 'Loading content page...')} />\n </div>\n );\n }\n\n if (error || !contentPage) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState\n message={\n error?.message || tr('contentPages.contentPageNotFound', 'Content page not found')\n }\n action={{\n label: tr('contentPages.backToContentPages', 'Back to Content Pages'),\n onClick: () => navigate(contentPagesBasePath),\n }}\n />\n </div>\n );\n }\n\n const formatDate = (dateString: string | null) => {\n if (!dateString) return '—';\n return new Date(dateString).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n };\n\n const hasSeo = contentPage.seoTitle || contentPage.seoDescription || contentPage.seoKeywords;\n\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200\">\n {/* Page Header */}\n <div className=\"mb-6\">\n <button\n type=\"button\"\n onClick={() => navigate(contentPagesBasePath)}\n className=\"\n inline-flex items-center gap-2 mb-4\n text-text-secondary\n hover:text-text-primary\n transition-all duration-200\n \"\n >\n <ArrowLeft size={20} />\n <span className=\"text-sm font-medium\">\n {tr('contentPages.backToContentPages', 'Back to Content Pages')}\n </span>\n </button>\n\n <div className=\"flex items-start justify-between\">\n <div className=\"flex items-center gap-4\">\n <div className=\"size-16 rounded-lg bg-[var(--color-status-info-subtle)] flex items-center justify-center\">\n <FileText size={32} className=\"text-[var(--color-status-info)]\" />\n </div>\n\n <div>\n <div className=\"flex items-center gap-3 mb-2\">\n <h1 className=\"text-3xl font-bold text-text-primary\">{contentPage.title}</h1>\n <ContentPageStatusBadge isPublished={contentPage.isPublished} />\n </div>\n <p className=\"text-text-secondary\">/{contentPage.slug}</p>\n </div>\n </div>\n\n <div className=\"flex gap-2\">\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/${id}/edit`)}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-surface\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n font-medium\n \"\n >\n <Edit size={16} />\n Edit Page\n </button>\n\n <button\n type=\"button\"\n onClick={handleDelete}\n disabled={deleteLoading}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-status-error-subtle)]\n text-[var(--color-status-error)]\n border border-[var(--color-status-error-border)]\n rounded-lg\n hover:opacity-80\n transition-all duration-200\n font-medium\n disabled:opacity-50\n \"\n >\n <Trash2 size={16} />\n Delete\n </button>\n </div>\n </div>\n </div>\n\n {/* Content */}\n <div className=\"grid grid-cols-1 lg:grid-cols-2 gap-6\">\n {/* Content Preview */}\n <div className=\"lg:col-span-2 bg-surface border border-default rounded-lg p-6 shadow-[var(--shadow-elevation-1)] transition-all duration-200 hover:shadow-[var(--shadow-elevation-2)]\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {tr('contentPages.contentPreview', 'Content Preview')}\n </h2>\n <div\n className=\"prose prose-sm max-w-none text-text-secondary leading-relaxed\"\n dangerouslySetInnerHTML={{\n __html:\n contentPage.contentFormat === 'markdown'\n ? renderMarkdown(contentPage.content)\n : contentPage.content,\n }}\n />\n </div>\n\n {/* Metadata */}\n <div className=\"bg-surface border border-default rounded-lg p-6 shadow-[var(--shadow-elevation-1)] transition-all duration-200 hover:shadow-[var(--shadow-elevation-2)]\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {tr('contentPages.metadata', 'Metadata')}\n </h2>\n <dl className=\"space-y-3\">\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.slug', 'Slug')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1 font-mono\">{contentPage.slug}</dd>\n </div>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.version', 'Version')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1 font-mono\">v{contentPage.version}</dd>\n </div>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.contentFormat', 'Content Format')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1 capitalize\">\n {contentPage.contentFormat}\n </dd>\n </div>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.sortOrder', 'Sort Order')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1 font-mono\">{contentPage.sortOrder}</dd>\n </div>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.created', 'Created')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">\n {formatDate(contentPage.createdAt)}\n </dd>\n </div>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.lastUpdated', 'Last Updated')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">\n {formatDate(contentPage.updatedAt)}\n </dd>\n </div>\n {contentPage.lastUpdated && (\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.contentLastUpdated', 'Content Last Updated')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">\n {formatDate(contentPage.lastUpdated)}\n </dd>\n </div>\n )}\n </dl>\n </div>\n\n {/* SEO Information */}\n {hasSeo && (\n <div className=\"bg-surface border border-default rounded-lg p-6 shadow-[var(--shadow-elevation-1)] transition-all duration-200 hover:shadow-[var(--shadow-elevation-2)]\">\n <div className=\"flex items-center gap-2 mb-4\">\n <Globe size={20} className=\"text-text-secondary\" />\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('contentPages.seoInformation', 'SEO Information')}\n </h2>\n </div>\n <dl className=\"space-y-3\">\n {contentPage.seoTitle && (\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.seoTitle', 'SEO Title')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">{contentPage.seoTitle}</dd>\n </div>\n )}\n {contentPage.seoDescription && (\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.seoDescription', 'SEO Description')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">{contentPage.seoDescription}</dd>\n </div>\n )}\n {contentPage.seoKeywords && (\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.seoKeywords', 'SEO Keywords')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">\n <div className=\"flex flex-wrap gap-1.5 mt-1\">\n {contentPage.seoKeywords.split(',').map((keyword) => (\n <span\n key={keyword.trim()}\n className=\"\n inline-flex px-2 py-0.5\n bg-bg-sunken\n text-text-secondary\n rounded-md text-xs font-medium\n \"\n >\n {keyword.trim()}\n </span>\n ))}\n </div>\n </dd>\n </div>\n )}\n </dl>\n </div>\n )}\n\n {/* Product Association */}\n {contentPage.productId && (\n <div className=\"bg-surface border border-default rounded-lg p-6 shadow-[var(--shadow-elevation-1)] transition-all duration-200 hover:shadow-[var(--shadow-elevation-2)]\">\n <div className=\"flex items-center gap-2 mb-4\">\n <Package size={20} className=\"text-text-secondary\" />\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('contentPages.productAssociation', 'Product Association')}\n </h2>\n </div>\n <dl className=\"space-y-3\">\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.productId', 'Product ID')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1 font-mono\">\n {contentPage.productId}\n </dd>\n </div>\n {contentPage.product && (\n <>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.productName', 'Product Name')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">{contentPage.product.name}</dd>\n </div>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.productSlug', 'Product Slug')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1 font-mono\">\n /{contentPage.product.slug}\n </dd>\n </div>\n </>\n )}\n </dl>\n </div>\n )}\n\n {/* Tags */}\n {contentPage.tags && contentPage.tags.length > 0 && (\n <div className=\"bg-surface border border-default rounded-lg p-6 shadow-[var(--shadow-elevation-1)]\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {tr('contentPages.tags', 'Tags')}\n </h2>\n <TagList tags={contentPage.tags} />\n </div>\n )}\n\n {/* Activity History */}\n <div className=\"lg:col-span-2 bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)]\">\n <h2 className=\"text-lg font-semibold text-text-primary p-6 pb-0\">\n {tr('contentPages.activityHistory', 'Activity History')}\n </h2>\n <AuditHistoryTab resourceId={contentPage.id} resourceType=\"ProductContentPage\" />\n </div>\n </div>\n {ConfirmDialog}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAiBA,SAAS,EAAe,GAAyB;AAC/C,QACE,EAEG,QAAQ,gBAAgB,wDAAsD,CAC9E,QAAQ,eAAe,wDAAsD,CAC7E,QAAQ,cAAc,qDAAmD,CAEzE,QAAQ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,WAAU;iBACX,EAAG,qBAAqB,OAAO;OAC7B,CAAA,EACL,kBAAC,GAAD,EAAS,MAAM,EAAY,MAAQ,CAAA,CAC/B;;KAIR,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,MAAD;OAAI,WAAU;iBACX,EAAG,gCAAgC,mBAAmB;OACpD,CAAA,EACL,kBAAC,GAAD;OAAiB,YAAY,EAAY;OAAI,cAAa;OAAuB,CAAA,CAC7E;;KACF;;GACL;GACG"}
|
|
1
|
+
{"version":3,"file":"ContentPageDetailPage.js","names":[],"sources":["../../../../../src/product-management/modules/content-pages/pages/ContentPageDetailPage.tsx"],"sourcesContent":["import { useParams } from 'react-router-dom';\nimport { ArrowLeft, Edit, Trash2, FileText, Globe, Package } from 'lucide-react';\nimport {\n CTAOverflowMenu,\n EmphasisPanel,\n GradientText,\n NextSteps,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { useContentPage, useDeleteContentPage } from '../hooks/useContentPages';\nimport { ContentPageStatusBadge } from '../components/ContentPageStatusBadge';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport { TagList } from '../../../shared/components/TagList';\nimport { AuditHistoryTab } from '../../../shared/components/AuditHistoryTab';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../../../utils/nativeBridge';\nimport { useConfirmDialog } from '../../../shared/hooks/useConfirmDialog';\n\n/**\n * Simple markdown renderer for content preview\n * Converts basic markdown syntax to HTML\n */\nfunction renderMarkdown(content: string): string {\n return (\n content\n // Headers\n .replace(/^### (.+)$/gm, '<h3 class=\"text-lg font-semibold mt-4 mb-2\">$1</h3>')\n .replace(/^## (.+)$/gm, '<h2 class=\"text-xl font-semibold mt-5 mb-2\">$1</h2>')\n .replace(/^# (.+)$/gm, '<h1 class=\"text-2xl font-bold mt-6 mb-3\">$1</h1>')\n // Bold and italic\n .replace(/\\*\\*(.+?)\\*\\*/g, '<strong>$1</strong>')\n .replace(/\\*(.+?)\\*/g, '<em>$1</em>')\n // Inline code\n .replace(\n /`(.+?)`/g,\n '<code class=\"px-1.5 py-0.5 bg-bg-sunken rounded text-sm font-mono\">$1</code>'\n )\n // Code blocks\n .replace(/```[\\s\\S]*?```/g, (match) => {\n const code = match.replace(/```\\w*\\n?/, '').replace(/\\n?```$/, '');\n return `<pre class=\"bg-bg-sunken rounded-lg p-4 overflow-x-auto my-3\"><code class=\"text-sm font-mono\">${code}</code></pre>`;\n })\n // Links\n .replace(\n /\\[(.+?)\\]\\((.+?)\\)/g,\n '<a href=\"$2\" class=\"text-[var(--color-status-info)] underline\">$1</a>'\n )\n // Unordered lists\n .replace(/^- (.+)$/gm, '<li class=\"ml-4 list-disc\">$1</li>')\n // Paragraphs (double newline)\n .replace(/\\n\\n/g, '</p><p class=\"mb-3\">')\n // Single newlines\n .replace(/\\n/g, '<br/>')\n );\n}\n\n/**\n * Content Page Detail Page\n * Shows comprehensive content page information\n */\nexport function ContentPageDetailPage() {\n const { id } = useParams<{ id: string }>();\n const { navigate, basePath = '/products' } = useProductConsole();\n const contentPagesBasePath = `${basePath}/content-pages`;\n const { contentPage, loading, error } = useContentPage(id!);\n const { deleteContentPage, loading: deleteLoading } = useDeleteContentPage();\n const tr = useTr();\n const { confirm, ConfirmDialog } = useConfirmDialog();\n\n const handleDelete = async () => {\n void nativeImpact('medium');\n const message = tr(\n 'contentPages.confirmDelete',\n 'Are you sure you want to delete this content page?'\n );\n const native = await nativeConfirm({\n title: 'Delete content page',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n const ok =\n native === null\n ? await confirm({\n title: 'Delete content page',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n destructive: true,\n })\n : native;\n if (!ok) return;\n\n try {\n await deleteContentPage(id!);\n void nativeNotify('success');\n navigate(contentPagesBasePath);\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to delete content page:', error);\n }\n };\n\n if (loading) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <LoadingState message={tr('contentPages.loadingContentPage', 'Loading content page...')} />\n </div>\n );\n }\n\n if (error || !contentPage) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState\n message={\n error?.message || tr('contentPages.contentPageNotFound', 'Content page not found')\n }\n action={{\n label: tr('contentPages.backToContentPages', 'Back to Content Pages'),\n onClick: () => navigate(contentPagesBasePath),\n }}\n />\n </div>\n );\n }\n\n const formatDate = (dateString: string | null) => {\n if (!dateString) return '—';\n return new Date(dateString).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n };\n\n const hasSeo = contentPage.seoTitle || contentPage.seoDescription || contentPage.seoKeywords;\n\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200\">\n {/* Page Header */}\n <div className=\"mb-6\">\n <button\n type=\"button\"\n onClick={() => navigate(contentPagesBasePath)}\n className=\"\n inline-flex items-center gap-2 mb-4\n text-text-secondary\n hover:text-text-primary\n transition-all duration-200\n \"\n >\n <ArrowLeft size={20} />\n <span className=\"text-sm font-medium\">\n {tr('contentPages.backToContentPages', 'Back to Content Pages')}\n </span>\n </button>\n\n <div className=\"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4\">\n <div className=\"flex items-center gap-4\">\n <div className=\"size-16 rounded-card bg-[var(--color-status-info-subtle)] flex items-center justify-center\">\n <FileText size={32} className=\"text-[var(--color-status-info)]\" />\n </div>\n\n <div>\n <div className=\"flex flex-wrap items-center gap-3 mb-2\">\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary\">\n <GradientText>{contentPage.title}</GradientText>\n </h1>\n <ContentPageStatusBadge isPublished={contentPage.isPublished} />\n </div>\n <p className=\"text-text-secondary font-mono\">/{contentPage.slug}</p>\n </div>\n </div>\n\n <CTAOverflowMenu\n primary={{\n label: tr('contentPages.editPage', 'Edit Page'),\n onSelect: () => navigate(`${contentPagesBasePath}/${id}/edit`),\n icon: <Edit className=\"size-4\" />,\n }}\n actions={[\n {\n label: tr('contentPages.delete', 'Delete'),\n onSelect: () => {\n void handleDelete();\n },\n intent: 'destructive',\n disabled: deleteLoading,\n icon: <Trash2 className=\"size-4\" />,\n },\n ]}\n />\n </div>\n </div>\n\n <PagePurpose className=\"mb-6\">\n {tr(\n 'contentPages.detailPurpose',\n `Preview exactly how \"${contentPage.title}\" renders for users, check its metadata, SEO, and product association, and review the audit history. Edit it to change the content or its published state — only published pages are visible to end users.`\n )}\n </PagePurpose>\n\n <NextSteps\n storageKey=\"product-content-page-detail\"\n className=\"mb-6\"\n steps={[\n {\n id: 'edit',\n label: tr('contentPages.steps.edit', 'Edit this page'),\n description: tr(\n 'contentPages.steps.editDesc',\n 'Update the content, SEO, or publish status. A new version is recorded on each save.'\n ),\n onClick: () => navigate(`${contentPagesBasePath}/${id}/edit`),\n },\n {\n id: 'review-seo',\n label: tr('contentPages.steps.seo', 'Check SEO & metadata'),\n description: tr(\n 'contentPages.steps.seoDesc',\n 'Make sure the slug, title, and SEO fields are right before this page goes public.'\n ),\n },\n {\n id: 'back',\n label: tr('contentPages.steps.back', 'Back to all content pages'),\n description: tr(\n 'contentPages.steps.backDesc',\n 'Return to the list to manage the rest of your content.'\n ),\n onClick: () => navigate(contentPagesBasePath),\n },\n ]}\n />\n\n {/* Content */}\n <div className=\"grid grid-cols-1 lg:grid-cols-2 gap-6\">\n {/* Content Preview — the page's emphasis zone */}\n <EmphasisPanel className=\"lg:col-span-2\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {tr('contentPages.contentPreview', 'Content Preview')}\n </h2>\n <div\n className=\"prose prose-sm max-w-none text-text-secondary leading-relaxed\"\n dangerouslySetInnerHTML={{\n __html:\n contentPage.contentFormat === 'markdown'\n ? renderMarkdown(contentPage.content)\n : contentPage.content,\n }}\n />\n </EmphasisPanel>\n\n {/* Metadata */}\n <div className=\"bg-bg-surface bg-accent-wash border border-border-seam rounded-card p-6 shadow-elevation-1 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-[var(--shadow-pop)]\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {tr('contentPages.metadata', 'Metadata')}\n </h2>\n <dl className=\"space-y-3\">\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.slug', 'Slug')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1 font-mono\">{contentPage.slug}</dd>\n </div>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.version', 'Version')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1 font-mono\">v{contentPage.version}</dd>\n </div>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.contentFormat', 'Content Format')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1 capitalize\">\n {contentPage.contentFormat}\n </dd>\n </div>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.sortOrder', 'Sort Order')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1 font-mono\">{contentPage.sortOrder}</dd>\n </div>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.created', 'Created')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">\n {formatDate(contentPage.createdAt)}\n </dd>\n </div>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.lastUpdated', 'Last Updated')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">\n {formatDate(contentPage.updatedAt)}\n </dd>\n </div>\n {contentPage.lastUpdated && (\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.contentLastUpdated', 'Content Last Updated')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">\n {formatDate(contentPage.lastUpdated)}\n </dd>\n </div>\n )}\n </dl>\n </div>\n\n {/* SEO Information */}\n {hasSeo && (\n <div className=\"bg-bg-surface bg-accent-wash border border-border-seam rounded-card p-6 shadow-elevation-1 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-[var(--shadow-pop)]\">\n <div className=\"flex items-center gap-2 mb-4\">\n <Globe size={20} className=\"text-text-secondary\" />\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('contentPages.seoInformation', 'SEO Information')}\n </h2>\n </div>\n <dl className=\"space-y-3\">\n {contentPage.seoTitle && (\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.seoTitle', 'SEO Title')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">{contentPage.seoTitle}</dd>\n </div>\n )}\n {contentPage.seoDescription && (\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.seoDescription', 'SEO Description')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">{contentPage.seoDescription}</dd>\n </div>\n )}\n {contentPage.seoKeywords && (\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.seoKeywords', 'SEO Keywords')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">\n <div className=\"flex flex-wrap gap-1.5 mt-1\">\n {contentPage.seoKeywords.split(',').map((keyword) => (\n <span\n key={keyword.trim()}\n className=\"\n inline-flex px-2 py-0.5\n bg-bg-sunken\n text-text-secondary\n rounded-md text-xs font-medium\n \"\n >\n {keyword.trim()}\n </span>\n ))}\n </div>\n </dd>\n </div>\n )}\n </dl>\n </div>\n )}\n\n {/* Product Association */}\n {contentPage.productId && (\n <div className=\"bg-bg-surface bg-accent-wash border border-border-seam rounded-card p-6 shadow-elevation-1 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-[var(--shadow-pop)]\">\n <div className=\"flex items-center gap-2 mb-4\">\n <Package size={20} className=\"text-text-secondary\" />\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('contentPages.productAssociation', 'Product Association')}\n </h2>\n </div>\n <dl className=\"space-y-3\">\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.productId', 'Product ID')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1 font-mono\">\n {contentPage.productId}\n </dd>\n </div>\n {contentPage.product && (\n <>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.productName', 'Product Name')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1\">{contentPage.product.name}</dd>\n </div>\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('contentPages.productSlug', 'Product Slug')}\n </dt>\n <dd className=\"text-sm text-text-primary mt-1 font-mono\">\n /{contentPage.product.slug}\n </dd>\n </div>\n </>\n )}\n </dl>\n </div>\n )}\n\n {/* Tags */}\n {contentPage.tags && contentPage.tags.length > 0 && (\n <div className=\"bg-bg-surface bg-accent-wash border border-border-seam rounded-card p-6 shadow-elevation-1\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {tr('contentPages.tags', 'Tags')}\n </h2>\n <TagList tags={contentPage.tags} />\n </div>\n )}\n\n {/* Activity History */}\n <div className=\"lg:col-span-2 bg-bg-surface border border-border-seam rounded-card shadow-elevation-1\">\n <h2 className=\"text-lg font-semibold text-text-primary p-6 pb-0\">\n {tr('contentPages.activityHistory', 'Activity History')}\n </h2>\n <AuditHistoryTab resourceId={contentPage.id} resourceType=\"ProductContentPage\" />\n </div>\n </div>\n {ConfirmDialog}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAwBA,SAAS,EAAe,GAAyB;AAC/C,QACE,EAEG,QAAQ,gBAAgB,wDAAsD,CAC9E,QAAQ,eAAe,wDAAsD,CAC7E,QAAQ,cAAc,qDAAmD,CAEzE,QAAQ,kBAAkB,sBAAsB,CAChD,QAAQ,cAAc,cAAc,CAEpC,QACC,YACA,iFACD,CAEA,QAA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