@burdenoff/microfe-product 2026.625.1 → 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 +40 -36
- package/dist/product/pages/ContentPageViewPage.js.map +1 -1
- package/dist/product/pages/ProductCatalogPage.js +71 -63
- package/dist/product/pages/ProductCatalogPage.js.map +1 -1
- package/dist/product/pages/ProductViewPage.js +218 -181
- package/dist/product/pages/ProductViewPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js +27 -25
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +99 -72
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +32 -30
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +96 -91
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +25 -23
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +136 -111
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +35 -33
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +130 -126
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js +27 -25
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +95 -70
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +32 -30
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +63 -58
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductPlans.js +132 -143
- package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductCreatePage.js +27 -25
- package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.js +142 -114
- package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductEditPage.js +31 -29
- package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductsListPage.js +218 -210
- package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js +27 -22
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +156 -129
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +30 -25
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +140 -132
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
- package/dist/product-management/shared/components/AuditHistoryTab.js +18 -16
- package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
- package/package.json +2 -2
|
@@ -5,26 +5,27 @@ import { ContentPageForm as r } from "../components/ContentPageForm.js";
|
|
|
5
5
|
import { useState as i } from "react";
|
|
6
6
|
import { ArrowLeft as a } from "lucide-react";
|
|
7
7
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
import { EmphasisPanel as c, PagePurpose as l } from "@burdenoff/fe-libs/ui";
|
|
8
9
|
//#region src/product-management/modules/content-pages/pages/ContentPageCreatePage.tsx
|
|
9
|
-
function
|
|
10
|
-
let { navigate:
|
|
10
|
+
function u() {
|
|
11
|
+
let { navigate: u, basePath: d = "/products" } = t(), f = `${d}/content-pages`, { createContentPage: p, loading: m } = n(), h = e(), [g, _] = i(null), v = async (e) => {
|
|
11
12
|
try {
|
|
12
|
-
|
|
13
|
-
let t = await
|
|
13
|
+
_(null);
|
|
14
|
+
let t = await p(e);
|
|
14
15
|
if (t.errors && t.errors.length > 0) {
|
|
15
|
-
|
|
16
|
+
_(t.errors[0]?.message ?? "Failed to create content page");
|
|
16
17
|
return;
|
|
17
18
|
}
|
|
18
19
|
if (t.data?.createContentPage) {
|
|
19
|
-
|
|
20
|
+
u(`${f}/${t.data.createContentPage.id}`);
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
_("Failed to create content page");
|
|
23
24
|
} catch (e) {
|
|
24
|
-
|
|
25
|
+
_(e instanceof Error ? e.message : "Failed to create content page"), console.error("Failed to create content page:", e);
|
|
25
26
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
27
|
+
}, y = () => {
|
|
28
|
+
u(f);
|
|
28
29
|
};
|
|
29
30
|
return /* @__PURE__ */ s("div", {
|
|
30
31
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
|
|
@@ -34,45 +35,46 @@ function c() {
|
|
|
34
35
|
children: [
|
|
35
36
|
/* @__PURE__ */ s("button", {
|
|
36
37
|
type: "button",
|
|
37
|
-
onClick:
|
|
38
|
+
onClick: y,
|
|
38
39
|
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 ",
|
|
39
40
|
children: [/* @__PURE__ */ o(a, { size: 20 }), /* @__PURE__ */ o("span", {
|
|
40
41
|
className: "text-sm font-medium",
|
|
41
|
-
children:
|
|
42
|
+
children: h("contentPages.backToContentPages", "Back to Content Pages")
|
|
42
43
|
})]
|
|
43
44
|
}),
|
|
44
45
|
/* @__PURE__ */ o("h1", {
|
|
45
46
|
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2",
|
|
46
|
-
children:
|
|
47
|
+
children: h("contentPages.createContentPage", "Create Content Page")
|
|
47
48
|
}),
|
|
48
49
|
/* @__PURE__ */ o("p", {
|
|
49
50
|
className: "text-text-secondary",
|
|
50
|
-
children:
|
|
51
|
+
children: h("contentPages.createContentPageSubtitle", "Add a new content page")
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ o(l, {
|
|
54
|
+
className: "mt-3 max-w-2xl",
|
|
55
|
+
children: h("contentPages.createPurpose", "Write a new page users will see — a blog post, legal page, doc, or announcement. Choose markdown or HTML, set a clean slug and SEO fields, and leave it unpublished until you are ready to make it live.")
|
|
51
56
|
})
|
|
52
57
|
]
|
|
53
58
|
}),
|
|
54
|
-
|
|
59
|
+
g && /* @__PURE__ */ o("div", {
|
|
55
60
|
className: "mb-6 p-4 bg-[var(--color-status-error-subtle)] border border-[var(--color-status-error-border)] rounded-lg",
|
|
56
61
|
children: /* @__PURE__ */ o("p", {
|
|
57
62
|
className: "text-sm text-[var(--color-status-error)]",
|
|
58
|
-
children:
|
|
63
|
+
children: g
|
|
59
64
|
})
|
|
60
65
|
}),
|
|
61
66
|
/* @__PURE__ */ o("div", {
|
|
62
67
|
className: "max-w-2xl",
|
|
63
|
-
children: /* @__PURE__ */ o(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
loading: f
|
|
69
|
-
})
|
|
70
|
-
})
|
|
68
|
+
children: /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o(r, {
|
|
69
|
+
onSubmit: v,
|
|
70
|
+
onCancel: y,
|
|
71
|
+
loading: m
|
|
72
|
+
}) })
|
|
71
73
|
})
|
|
72
74
|
]
|
|
73
75
|
});
|
|
74
76
|
}
|
|
75
77
|
//#endregion
|
|
76
|
-
export {
|
|
78
|
+
export { u as ContentPageCreatePage };
|
|
77
79
|
|
|
78
80
|
//# sourceMappingURL=ContentPageCreatePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPageCreatePage.js","names":[],"sources":["../../../../../src/product-management/modules/content-pages/pages/ContentPageCreatePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { ArrowLeft } from 'lucide-react';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { useCreateContentPage } from '../hooks/useContentPages';\nimport { ContentPageForm } from '../components/ContentPageForm';\nimport type { CreateContentPageInput, UpdateContentPageInput } from '../types';\n\nexport function ContentPageCreatePage() {\n const { navigate, basePath = '/products' } = useProductConsole();\n const contentPagesBasePath = `${basePath}/content-pages`;\n const { createContentPage, loading } = useCreateContentPage();\n const tr = useTr();\n const [error, setError] = useState<string | null>(null);\n\n const handleSubmit = async (data: CreateContentPageInput | UpdateContentPageInput) => {\n try {\n setError(null);\n const createData = data as CreateContentPageInput;\n const result = await createContentPage(createData);\n\n // Generated hooks (v3-style codegen) return GraphQL errors in `result.errors`\n // instead of throwing. Surface them inline so submit doesn't silently succeed.\n if (result.errors && result.errors.length > 0) {\n setError(result.errors[0]?.message ?? 'Failed to create content page');\n return;\n }\n\n if (result.data?.createContentPage) {\n navigate(`${contentPagesBasePath}/${result.data.createContentPage.id}`);\n return;\n }\n\n setError('Failed to create content page');\n } catch (err) {\n const message = err instanceof Error ? err.message : 'Failed to create content page';\n setError(message);\n console.error('Failed to create content page:', err);\n }\n };\n\n const handleCancel = () => {\n navigate(contentPagesBasePath);\n };\n\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200\">\n <div className=\"mb-6\">\n <button\n type=\"button\"\n onClick={handleCancel}\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 <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2\">\n {tr('contentPages.createContentPage', 'Create Content Page')}\n </h1>\n <p className=\"text-text-secondary\">\n {tr('contentPages.createContentPageSubtitle', 'Add a new content page')}\n </p>\n </div>\n\n {error && (\n <div className=\"mb-6 p-4 bg-[var(--color-status-error-subtle)] border border-[var(--color-status-error-border)] rounded-lg\">\n <p className=\"text-sm text-[var(--color-status-error)]\">{error}</p>\n </div>\n )}\n\n <div className=\"max-w-2xl\">\n <
|
|
1
|
+
{"version":3,"file":"ContentPageCreatePage.js","names":[],"sources":["../../../../../src/product-management/modules/content-pages/pages/ContentPageCreatePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { ArrowLeft } from 'lucide-react';\nimport { EmphasisPanel, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { useCreateContentPage } from '../hooks/useContentPages';\nimport { ContentPageForm } from '../components/ContentPageForm';\nimport type { CreateContentPageInput, UpdateContentPageInput } from '../types';\n\nexport function ContentPageCreatePage() {\n const { navigate, basePath = '/products' } = useProductConsole();\n const contentPagesBasePath = `${basePath}/content-pages`;\n const { createContentPage, loading } = useCreateContentPage();\n const tr = useTr();\n const [error, setError] = useState<string | null>(null);\n\n const handleSubmit = async (data: CreateContentPageInput | UpdateContentPageInput) => {\n try {\n setError(null);\n const createData = data as CreateContentPageInput;\n const result = await createContentPage(createData);\n\n // Generated hooks (v3-style codegen) return GraphQL errors in `result.errors`\n // instead of throwing. Surface them inline so submit doesn't silently succeed.\n if (result.errors && result.errors.length > 0) {\n setError(result.errors[0]?.message ?? 'Failed to create content page');\n return;\n }\n\n if (result.data?.createContentPage) {\n navigate(`${contentPagesBasePath}/${result.data.createContentPage.id}`);\n return;\n }\n\n setError('Failed to create content page');\n } catch (err) {\n const message = err instanceof Error ? err.message : 'Failed to create content page';\n setError(message);\n console.error('Failed to create content page:', err);\n }\n };\n\n const handleCancel = () => {\n navigate(contentPagesBasePath);\n };\n\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200\">\n <div className=\"mb-6\">\n <button\n type=\"button\"\n onClick={handleCancel}\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 <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2\">\n {tr('contentPages.createContentPage', 'Create Content Page')}\n </h1>\n <p className=\"text-text-secondary\">\n {tr('contentPages.createContentPageSubtitle', 'Add a new content page')}\n </p>\n\n <PagePurpose className=\"mt-3 max-w-2xl\">\n {tr(\n 'contentPages.createPurpose',\n 'Write a new page users will see — a blog post, legal page, doc, or announcement. Choose markdown or HTML, set a clean slug and SEO fields, and leave it unpublished until you are ready to make it live.'\n )}\n </PagePurpose>\n </div>\n\n {error && (\n <div className=\"mb-6 p-4 bg-[var(--color-status-error-subtle)] border border-[var(--color-status-error-border)] rounded-lg\">\n <p className=\"text-sm text-[var(--color-status-error)]\">{error}</p>\n </div>\n )}\n\n <div className=\"max-w-2xl\">\n <EmphasisPanel>\n <ContentPageForm onSubmit={handleSubmit} onCancel={handleCancel} loading={loading} />\n </EmphasisPanel>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AASA,SAAgB,IAAwB;CACtC,IAAM,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAuB,GAAG,EAAS,iBACnC,EAAE,sBAAmB,eAAY,GAAsB,EACvD,IAAK,GAAO,EACZ,CAAC,GAAO,KAAY,EAAwB,KAAK,EAEjD,IAAe,OAAO,MAA0D;AACpF,MAAI;AACF,KAAS,KAAK;GAEd,IAAM,IAAS,MAAM,EAAkB,EAAW;AAIlD,OAAI,EAAO,UAAU,EAAO,OAAO,SAAS,GAAG;AAC7C,MAAS,EAAO,OAAO,IAAI,WAAW,gCAAgC;AACtE;;AAGF,OAAI,EAAO,MAAM,mBAAmB;AAClC,MAAS,GAAG,EAAqB,GAAG,EAAO,KAAK,kBAAkB,KAAK;AACvE;;AAGF,KAAS,gCAAgC;WAClC,GAAK;AAGZ,GADA,EADgB,aAAe,QAAQ,EAAI,UAAU,gCACpC,EACjB,QAAQ,MAAM,kCAAkC,EAAI;;IAIlD,UAAqB;AACzB,IAAS,EAAqB;;AAGhC,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,UAAD;MACE,MAAK;MACL,SAAS;MACT,WAAU;gBAHZ,CAUE,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA,EACvB,kBAAC,QAAD;OAAM,WAAU;iBACb,EAAG,mCAAmC,wBAAwB;OAC1D,CAAA,CACA;;KAET,kBAAC,MAAD;MAAI,WAAU;gBACX,EAAG,kCAAkC,sBAAsB;MACzD,CAAA;KACL,kBAAC,KAAD;MAAG,WAAU;gBACV,EAAG,0CAA0C,yBAAyB;MACrE,CAAA;KAEJ,kBAAC,GAAD;MAAa,WAAU;gBACpB,EACC,8BACA,2MACD;MACW,CAAA;KACV;;GAEL,KACC,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,KAAD;KAAG,WAAU;eAA4C;KAAU,CAAA;IAC/D,CAAA;GAGR,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;KAAiB,UAAU;KAAc,UAAU;KAAuB;KAAW,CAAA,EACvE,CAAA;IACZ,CAAA;GACF"}
|
|
@@ -11,53 +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,
|
|
14
|
+
import { CTAOverflowMenu as C, EmphasisPanel as w, GradientText as T, NextSteps as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
|
|
15
15
|
//#region src/product-management/modules/content-pages/pages/ContentPageDetailPage.tsx
|
|
16
|
-
function
|
|
16
|
+
function O(e) {
|
|
17
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/>");
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
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 () => {
|
|
21
21
|
a("medium");
|
|
22
|
-
let e =
|
|
22
|
+
let e = R("contentPages.confirmDelete", "Are you sure you want to delete this content page?"), t = await i({
|
|
23
23
|
title: "Delete content page",
|
|
24
24
|
message: e,
|
|
25
25
|
okButtonTitle: "Delete",
|
|
26
26
|
cancelButtonTitle: "Cancel"
|
|
27
27
|
});
|
|
28
|
-
if (t === null ? await
|
|
28
|
+
if (t === null ? await z({
|
|
29
29
|
title: "Delete content page",
|
|
30
30
|
message: e,
|
|
31
31
|
okButtonTitle: "Delete",
|
|
32
32
|
cancelButtonTitle: "Cancel",
|
|
33
33
|
destructive: !0
|
|
34
34
|
}) : t) try {
|
|
35
|
-
await
|
|
35
|
+
await I(k), o("success"), A(M);
|
|
36
36
|
} catch (e) {
|
|
37
37
|
o("error"), console.error("Failed to delete content page:", e);
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
if (
|
|
40
|
+
if (P) return /* @__PURE__ */ b("div", {
|
|
41
41
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
42
|
-
children: /* @__PURE__ */ b(n, { message:
|
|
42
|
+
children: /* @__PURE__ */ b(n, { message: R("contentPages.loadingContentPage", "Loading content page...") })
|
|
43
43
|
});
|
|
44
|
-
if (
|
|
44
|
+
if (F || !N) return /* @__PURE__ */ b("div", {
|
|
45
45
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
46
46
|
children: /* @__PURE__ */ b(r, {
|
|
47
|
-
message:
|
|
47
|
+
message: F?.message || R("contentPages.contentPageNotFound", "Content page not found"),
|
|
48
48
|
action: {
|
|
49
|
-
label:
|
|
50
|
-
onClick: () =>
|
|
49
|
+
label: R("contentPages.backToContentPages", "Back to Content Pages"),
|
|
50
|
+
onClick: () => A(M)
|
|
51
51
|
}
|
|
52
52
|
})
|
|
53
53
|
});
|
|
54
|
-
let
|
|
54
|
+
let H = (e) => e ? new Date(e).toLocaleDateString("en-US", {
|
|
55
55
|
year: "numeric",
|
|
56
56
|
month: "long",
|
|
57
57
|
day: "numeric",
|
|
58
58
|
hour: "2-digit",
|
|
59
59
|
minute: "2-digit"
|
|
60
|
-
}) : "—",
|
|
60
|
+
}) : "—", U = N.seoTitle || N.seoDescription || N.seoKeywords;
|
|
61
61
|
return /* @__PURE__ */ x("div", {
|
|
62
62
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
|
|
63
63
|
children: [
|
|
@@ -65,11 +65,11 @@ function E() {
|
|
|
65
65
|
className: "mb-6",
|
|
66
66
|
children: [/* @__PURE__ */ x("button", {
|
|
67
67
|
type: "button",
|
|
68
|
-
onClick: () =>
|
|
68
|
+
onClick: () => A(M),
|
|
69
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 ",
|
|
70
70
|
children: [/* @__PURE__ */ b(p, { size: 20 }), /* @__PURE__ */ b("span", {
|
|
71
71
|
className: "text-sm font-medium",
|
|
72
|
-
children:
|
|
72
|
+
children: R("contentPages.backToContentPages", "Back to Content Pages")
|
|
73
73
|
})]
|
|
74
74
|
}), /* @__PURE__ */ x("div", {
|
|
75
75
|
className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",
|
|
@@ -85,104 +85,131 @@ function E() {
|
|
|
85
85
|
className: "flex flex-wrap items-center gap-3 mb-2",
|
|
86
86
|
children: [/* @__PURE__ */ b("h1", {
|
|
87
87
|
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
88
|
-
children: /* @__PURE__ */ b(
|
|
89
|
-
}), /* @__PURE__ */ b(u, { isPublished:
|
|
88
|
+
children: /* @__PURE__ */ b(T, { children: N.title })
|
|
89
|
+
}), /* @__PURE__ */ b(u, { isPublished: N.isPublished })]
|
|
90
90
|
}), /* @__PURE__ */ x("p", {
|
|
91
91
|
className: "text-text-secondary font-mono",
|
|
92
|
-
children: ["/",
|
|
92
|
+
children: ["/", N.slug]
|
|
93
93
|
})] })]
|
|
94
94
|
}), /* @__PURE__ */ b(C, {
|
|
95
95
|
primary: {
|
|
96
|
-
label:
|
|
97
|
-
onSelect: () =>
|
|
96
|
+
label: R("contentPages.editPage", "Edit Page"),
|
|
97
|
+
onSelect: () => A(`${M}/${k}/edit`),
|
|
98
98
|
icon: /* @__PURE__ */ b(m, { className: "size-4" })
|
|
99
99
|
},
|
|
100
100
|
actions: [{
|
|
101
|
-
label:
|
|
101
|
+
label: R("contentPages.delete", "Delete"),
|
|
102
102
|
onSelect: () => {
|
|
103
|
-
|
|
103
|
+
V();
|
|
104
104
|
},
|
|
105
105
|
intent: "destructive",
|
|
106
|
-
disabled:
|
|
106
|
+
disabled: L,
|
|
107
107
|
icon: /* @__PURE__ */ b(v, { className: "size-4" })
|
|
108
108
|
}]
|
|
109
109
|
})]
|
|
110
110
|
})]
|
|
111
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
|
+
}),
|
|
112
139
|
/* @__PURE__ */ x("div", {
|
|
113
140
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
114
141
|
children: [
|
|
115
|
-
/* @__PURE__ */ x(
|
|
116
|
-
className: "lg:col-span-2
|
|
142
|
+
/* @__PURE__ */ x(w, {
|
|
143
|
+
className: "lg:col-span-2",
|
|
117
144
|
children: [/* @__PURE__ */ b("h2", {
|
|
118
145
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
119
|
-
children:
|
|
146
|
+
children: R("contentPages.contentPreview", "Content Preview")
|
|
120
147
|
}), /* @__PURE__ */ b("div", {
|
|
121
148
|
className: "prose prose-sm max-w-none text-text-secondary leading-relaxed",
|
|
122
|
-
dangerouslySetInnerHTML: { __html:
|
|
149
|
+
dangerouslySetInnerHTML: { __html: N.contentFormat === "markdown" ? O(N.content) : N.content }
|
|
123
150
|
})]
|
|
124
151
|
}),
|
|
125
152
|
/* @__PURE__ */ x("div", {
|
|
126
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)]",
|
|
127
154
|
children: [/* @__PURE__ */ b("h2", {
|
|
128
155
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
129
|
-
children:
|
|
156
|
+
children: R("contentPages.metadata", "Metadata")
|
|
130
157
|
}), /* @__PURE__ */ x("dl", {
|
|
131
158
|
className: "space-y-3",
|
|
132
159
|
children: [
|
|
133
160
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
134
161
|
className: "text-sm font-medium text-text-secondary",
|
|
135
|
-
children:
|
|
162
|
+
children: R("contentPages.slug", "Slug")
|
|
136
163
|
}), /* @__PURE__ */ b("dd", {
|
|
137
164
|
className: "text-sm text-text-primary mt-1 font-mono",
|
|
138
|
-
children:
|
|
165
|
+
children: N.slug
|
|
139
166
|
})] }),
|
|
140
167
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
141
168
|
className: "text-sm font-medium text-text-secondary",
|
|
142
|
-
children:
|
|
169
|
+
children: R("contentPages.version", "Version")
|
|
143
170
|
}), /* @__PURE__ */ x("dd", {
|
|
144
171
|
className: "text-sm text-text-primary mt-1 font-mono",
|
|
145
|
-
children: ["v",
|
|
172
|
+
children: ["v", N.version]
|
|
146
173
|
})] }),
|
|
147
174
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
148
175
|
className: "text-sm font-medium text-text-secondary",
|
|
149
|
-
children:
|
|
176
|
+
children: R("contentPages.contentFormat", "Content Format")
|
|
150
177
|
}), /* @__PURE__ */ b("dd", {
|
|
151
178
|
className: "text-sm text-text-primary mt-1 capitalize",
|
|
152
|
-
children:
|
|
179
|
+
children: N.contentFormat
|
|
153
180
|
})] }),
|
|
154
181
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
155
182
|
className: "text-sm font-medium text-text-secondary",
|
|
156
|
-
children:
|
|
183
|
+
children: R("contentPages.sortOrder", "Sort Order")
|
|
157
184
|
}), /* @__PURE__ */ b("dd", {
|
|
158
185
|
className: "text-sm text-text-primary mt-1 font-mono",
|
|
159
|
-
children:
|
|
186
|
+
children: N.sortOrder
|
|
160
187
|
})] }),
|
|
161
188
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
162
189
|
className: "text-sm font-medium text-text-secondary",
|
|
163
|
-
children:
|
|
190
|
+
children: R("contentPages.created", "Created")
|
|
164
191
|
}), /* @__PURE__ */ b("dd", {
|
|
165
192
|
className: "text-sm text-text-primary mt-1",
|
|
166
|
-
children:
|
|
193
|
+
children: H(N.createdAt)
|
|
167
194
|
})] }),
|
|
168
195
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
169
196
|
className: "text-sm font-medium text-text-secondary",
|
|
170
|
-
children:
|
|
197
|
+
children: R("contentPages.lastUpdated", "Last Updated")
|
|
171
198
|
}), /* @__PURE__ */ b("dd", {
|
|
172
199
|
className: "text-sm text-text-primary mt-1",
|
|
173
|
-
children:
|
|
200
|
+
children: H(N.updatedAt)
|
|
174
201
|
})] }),
|
|
175
|
-
|
|
202
|
+
N.lastUpdated && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
176
203
|
className: "text-sm font-medium text-text-secondary",
|
|
177
|
-
children:
|
|
204
|
+
children: R("contentPages.contentLastUpdated", "Content Last Updated")
|
|
178
205
|
}), /* @__PURE__ */ b("dd", {
|
|
179
206
|
className: "text-sm text-text-primary mt-1",
|
|
180
|
-
children:
|
|
207
|
+
children: H(N.lastUpdated)
|
|
181
208
|
})] })
|
|
182
209
|
]
|
|
183
210
|
})]
|
|
184
211
|
}),
|
|
185
|
-
|
|
212
|
+
U && /* @__PURE__ */ x("div", {
|
|
186
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)]",
|
|
187
214
|
children: [/* @__PURE__ */ x("div", {
|
|
188
215
|
className: "flex items-center gap-2 mb-4",
|
|
@@ -191,33 +218,33 @@ function E() {
|
|
|
191
218
|
className: "text-text-secondary"
|
|
192
219
|
}), /* @__PURE__ */ b("h2", {
|
|
193
220
|
className: "text-lg font-semibold text-text-primary",
|
|
194
|
-
children:
|
|
221
|
+
children: R("contentPages.seoInformation", "SEO Information")
|
|
195
222
|
})]
|
|
196
223
|
}), /* @__PURE__ */ x("dl", {
|
|
197
224
|
className: "space-y-3",
|
|
198
225
|
children: [
|
|
199
|
-
|
|
226
|
+
N.seoTitle && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
200
227
|
className: "text-sm font-medium text-text-secondary",
|
|
201
|
-
children:
|
|
228
|
+
children: R("contentPages.seoTitle", "SEO Title")
|
|
202
229
|
}), /* @__PURE__ */ b("dd", {
|
|
203
230
|
className: "text-sm text-text-primary mt-1",
|
|
204
|
-
children:
|
|
231
|
+
children: N.seoTitle
|
|
205
232
|
})] }),
|
|
206
|
-
|
|
233
|
+
N.seoDescription && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
207
234
|
className: "text-sm font-medium text-text-secondary",
|
|
208
|
-
children:
|
|
235
|
+
children: R("contentPages.seoDescription", "SEO Description")
|
|
209
236
|
}), /* @__PURE__ */ b("dd", {
|
|
210
237
|
className: "text-sm text-text-primary mt-1",
|
|
211
|
-
children:
|
|
238
|
+
children: N.seoDescription
|
|
212
239
|
})] }),
|
|
213
|
-
|
|
240
|
+
N.seoKeywords && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
214
241
|
className: "text-sm font-medium text-text-secondary",
|
|
215
|
-
children:
|
|
242
|
+
children: R("contentPages.seoKeywords", "SEO Keywords")
|
|
216
243
|
}), /* @__PURE__ */ b("dd", {
|
|
217
244
|
className: "text-sm text-text-primary mt-1",
|
|
218
245
|
children: /* @__PURE__ */ b("div", {
|
|
219
246
|
className: "flex flex-wrap gap-1.5 mt-1",
|
|
220
|
-
children:
|
|
247
|
+
children: N.seoKeywords.split(",").map((e) => /* @__PURE__ */ b("span", {
|
|
221
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 ",
|
|
222
249
|
children: e.trim()
|
|
223
250
|
}, e.trim()))
|
|
@@ -226,7 +253,7 @@ function E() {
|
|
|
226
253
|
]
|
|
227
254
|
})]
|
|
228
255
|
}),
|
|
229
|
-
|
|
256
|
+
N.productId && /* @__PURE__ */ x("div", {
|
|
230
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)]",
|
|
231
258
|
children: [/* @__PURE__ */ x("div", {
|
|
232
259
|
className: "flex items-center gap-2 mb-4",
|
|
@@ -235,55 +262,55 @@ function E() {
|
|
|
235
262
|
className: "text-text-secondary"
|
|
236
263
|
}), /* @__PURE__ */ b("h2", {
|
|
237
264
|
className: "text-lg font-semibold text-text-primary",
|
|
238
|
-
children:
|
|
265
|
+
children: R("contentPages.productAssociation", "Product Association")
|
|
239
266
|
})]
|
|
240
267
|
}), /* @__PURE__ */ x("dl", {
|
|
241
268
|
className: "space-y-3",
|
|
242
269
|
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
243
270
|
className: "text-sm font-medium text-text-secondary",
|
|
244
|
-
children:
|
|
271
|
+
children: R("contentPages.productId", "Product ID")
|
|
245
272
|
}), /* @__PURE__ */ b("dd", {
|
|
246
273
|
className: "text-sm text-text-primary mt-1 font-mono",
|
|
247
|
-
children:
|
|
248
|
-
})] }),
|
|
274
|
+
children: N.productId
|
|
275
|
+
})] }), N.product && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
249
276
|
className: "text-sm font-medium text-text-secondary",
|
|
250
|
-
children:
|
|
277
|
+
children: R("contentPages.productName", "Product Name")
|
|
251
278
|
}), /* @__PURE__ */ b("dd", {
|
|
252
279
|
className: "text-sm text-text-primary mt-1",
|
|
253
|
-
children:
|
|
280
|
+
children: N.product.name
|
|
254
281
|
})] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("dt", {
|
|
255
282
|
className: "text-sm font-medium text-text-secondary",
|
|
256
|
-
children:
|
|
283
|
+
children: R("contentPages.productSlug", "Product Slug")
|
|
257
284
|
}), /* @__PURE__ */ x("dd", {
|
|
258
285
|
className: "text-sm text-text-primary mt-1 font-mono",
|
|
259
|
-
children: ["/",
|
|
286
|
+
children: ["/", N.product.slug]
|
|
260
287
|
})] })] })]
|
|
261
288
|
})]
|
|
262
289
|
}),
|
|
263
|
-
|
|
290
|
+
N.tags && N.tags.length > 0 && /* @__PURE__ */ x("div", {
|
|
264
291
|
className: "bg-bg-surface bg-accent-wash border border-border-seam rounded-card p-6 shadow-elevation-1",
|
|
265
292
|
children: [/* @__PURE__ */ b("h2", {
|
|
266
293
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
267
|
-
children:
|
|
268
|
-
}), /* @__PURE__ */ b(d, { tags:
|
|
294
|
+
children: R("contentPages.tags", "Tags")
|
|
295
|
+
}), /* @__PURE__ */ b(d, { tags: N.tags })]
|
|
269
296
|
}),
|
|
270
297
|
/* @__PURE__ */ x("div", {
|
|
271
298
|
className: "lg:col-span-2 bg-bg-surface border border-border-seam rounded-card shadow-elevation-1",
|
|
272
299
|
children: [/* @__PURE__ */ b("h2", {
|
|
273
300
|
className: "text-lg font-semibold text-text-primary p-6 pb-0",
|
|
274
|
-
children:
|
|
301
|
+
children: R("contentPages.activityHistory", "Activity History")
|
|
275
302
|
}), /* @__PURE__ */ b(f, {
|
|
276
|
-
resourceId:
|
|
303
|
+
resourceId: N.id,
|
|
277
304
|
resourceType: "ProductContentPage"
|
|
278
305
|
})]
|
|
279
306
|
})
|
|
280
307
|
]
|
|
281
308
|
}),
|
|
282
|
-
|
|
309
|
+
B
|
|
283
310
|
]
|
|
284
311
|
});
|
|
285
312
|
}
|
|
286
313
|
//#endregion
|
|
287
|
-
export {
|
|
314
|
+
export { k as ContentPageDetailPage };
|
|
288
315
|
|
|
289
316
|
//# sourceMappingURL=ContentPageDetailPage.js.map
|