@burdenoff/microfe-product 2026.1109.2 → 2026.1109.3
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/generated/global-operations.d.ts +0 -1
- package/dist/generated/global-types.d.ts +0 -1
- package/dist/generated/wspace-operations.d.ts +0 -1
- package/dist/generated/wspace-types.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +96 -17
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/product/ProductUserRoot.d.ts +0 -1
- package/dist/product/ProductUserRoutes.d.ts +1 -2
- package/dist/product/hooks/usePublicContentPage.d.ts +0 -1
- package/dist/product/hooks/usePublicProduct.d.ts +0 -1
- package/dist/product/hooks/usePublicProducts.d.ts +0 -1
- package/dist/product/pages/ContentPageViewPage.d.ts +1 -2
- package/dist/product/pages/ProductCatalogPage.d.ts +1 -2
- package/dist/product/pages/ProductViewPage.d.ts +1 -2
- package/dist/product/pages/UserProductsLandingPage.d.ts +1 -2
- package/dist/product/providers/ProductUserProvider.d.ts +1 -2
- package/dist/product/types/index.d.ts +0 -1
- package/dist/product-management/ProductManagementRoot.d.ts +0 -1
- package/dist/product-management/ProductManagementRoutes.d.ts +1 -2
- package/dist/product-management/index.d.ts +0 -1
- package/dist/product-management/modules/content-pages/components/ContentPageForm.d.ts +1 -2
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js +4 -4
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
- package/dist/product-management/modules/content-pages/components/ContentPageStatusBadge.d.ts +1 -2
- package/dist/product-management/modules/content-pages/hooks/useContentPages.d.ts +0 -1
- package/dist/product-management/modules/content-pages/index.d.ts +0 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.d.ts +1 -2
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.d.ts +1 -2
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.d.ts +1 -2
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.d.ts +1 -2
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +140 -147
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/schemas/index.d.ts +0 -1
- package/dist/product-management/modules/content-pages/types/index.d.ts +0 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.d.ts +0 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagStatusBadge.d.ts +0 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagTypeBadge.d.ts +0 -1
- package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.d.ts +0 -1
- package/dist/product-management/modules/feature-flags/index.d.ts +0 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.d.ts +0 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.d.ts +0 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.d.ts +0 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.d.ts +0 -1
- package/dist/product-management/modules/feature-flags/schemas/index.d.ts +0 -1
- package/dist/product-management/modules/feature-flags/types/index.d.ts +0 -1
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.d.ts +1 -2
- package/dist/product-management/modules/press-kit/hooks/usePressKitAssets.d.ts +0 -1
- package/dist/product-management/modules/press-kit/index.d.ts +0 -1
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.d.ts +1 -2
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.d.ts +1 -2
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.d.ts +1 -2
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.d.ts +1 -2
- package/dist/product-management/modules/press-kit/schemas/index.d.ts +0 -1
- package/dist/product-management/modules/press-kit/types/index.d.ts +0 -1
- package/dist/product-management/modules/products/components/ProductCard.d.ts +1 -2
- package/dist/product-management/modules/products/components/ProductForm.d.ts +1 -2
- package/dist/product-management/modules/products/components/ProductPlans.d.ts +1 -2
- package/dist/product-management/modules/products/components/ProductPlans.js +143 -130
- package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductStats.d.ts +1 -2
- package/dist/product-management/modules/products/components/ProductStatusBadge.d.ts +1 -2
- package/dist/product-management/modules/products/hooks/useProducts.d.ts +0 -1
- package/dist/product-management/modules/products/index.d.ts +0 -1
- package/dist/product-management/modules/products/pages/ProductCreatePage.d.ts +1 -2
- package/dist/product-management/modules/products/pages/ProductDetailPage.d.ts +1 -2
- package/dist/product-management/modules/products/pages/ProductEditPage.d.ts +1 -2
- package/dist/product-management/modules/products/pages/ProductsListPage.d.ts +1 -2
- package/dist/product-management/modules/products/pages/ProductsListPage.js +144 -151
- package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
- package/dist/product-management/modules/products/schemas/index.d.ts +0 -1
- package/dist/product-management/modules/products/types/index.d.ts +0 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutCategoryBadge.d.ts +1 -2
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.d.ts +1 -2
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +66 -72
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutKeyBadge.d.ts +1 -2
- package/dist/product-management/modules/shortcuts/hooks/useShortcuts.d.ts +0 -1
- package/dist/product-management/modules/shortcuts/index.d.ts +0 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.d.ts +1 -2
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.d.ts +1 -2
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.d.ts +1 -2
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.d.ts +1 -2
- package/dist/product-management/modules/shortcuts/schemas/index.d.ts +0 -1
- package/dist/product-management/modules/shortcuts/types/index.d.ts +0 -1
- package/dist/product-management/providers/ProductConsoleProvider.d.ts +1 -2
- package/dist/product-management/shared/components/AuditHistoryTab.d.ts +1 -2
- package/dist/product-management/shared/components/TagList.d.ts +1 -2
- package/dist/product-management/shared/components/feedback/EmptyState.d.ts +1 -2
- package/dist/product-management/shared/components/feedback/ErrorState.d.ts +1 -2
- package/dist/product-management/shared/components/feedback/LoadingState.d.ts +1 -2
- package/dist/product-management/shared/components/input/ProductCombobox.d.ts +1 -2
- package/dist/product-management/shared/components/input/SearchInput.d.ts +1 -2
- package/dist/product-management/shared/components/input/TagInput.d.ts +1 -2
- package/dist/product-management/shared/hooks/useConfirmDialog.d.ts +1 -2
- package/dist/product-management/shared/hooks/useDebounced.d.ts +0 -1
- package/dist/product-management/shared/hooks/useTr.d.ts +0 -1
- package/dist/product-management/shared/index.d.ts +0 -1
- package/dist/product-management/shared/types/graphql.d.ts +0 -1
- package/dist/product-management/shared/utils/cn.d.ts +0 -1
- package/dist/product-management/shared/utils/exportUtils.d.ts +0 -1
- package/dist/product-management/shared/utils/permission-error.d.ts +0 -1
- package/dist/product-management/types/index.d.ts +0 -1
- package/dist/shared/components/MarkdownEditor.d.ts +1 -2
- package/dist/shared/components/index.d.ts +0 -1
- package/dist/shared/hooks/useTr.d.ts +0 -1
- package/dist/shared/index.d.ts +0 -1
- package/dist/shared/utils/formatDate.d.ts +0 -1
- package/dist/shared/utils/index.d.ts +0 -1
- package/dist/shared/utils/isSafeUrl.d.ts +0 -1
- package/dist/shared/utils/renderMarkdown.d.ts +0 -1
- package/dist/translations/en.d.ts +0 -1
- package/dist/translations/index.d.ts +0 -1
- package/dist/utils/nativeBridge.d.ts +0 -1
- package/package.json +59 -39
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/product/ProductUserRoot.d.ts.map +0 -1
- package/dist/product/ProductUserRoutes.d.ts.map +0 -1
- package/dist/product/hooks/usePublicContentPage.d.ts.map +0 -1
- package/dist/product/hooks/usePublicProduct.d.ts.map +0 -1
- package/dist/product/hooks/usePublicProducts.d.ts.map +0 -1
- package/dist/product/pages/ContentPageViewPage.d.ts.map +0 -1
- package/dist/product/pages/ProductCatalogPage.d.ts.map +0 -1
- package/dist/product/pages/ProductViewPage.d.ts.map +0 -1
- package/dist/product/pages/UserProductsLandingPage.d.ts.map +0 -1
- package/dist/product/providers/ProductUserProvider.d.ts.map +0 -1
- package/dist/product/types/index.d.ts.map +0 -1
- package/dist/product-management/ProductManagementRoot.d.ts.map +0 -1
- package/dist/product-management/ProductManagementRoutes.d.ts.map +0 -1
- package/dist/product-management/index.d.ts.map +0 -1
- package/dist/product-management/modules/content-pages/components/ContentPageForm.d.ts.map +0 -1
- package/dist/product-management/modules/content-pages/components/ContentPageStatusBadge.d.ts.map +0 -1
- package/dist/product-management/modules/content-pages/hooks/useContentPages.d.ts.map +0 -1
- package/dist/product-management/modules/content-pages/index.d.ts.map +0 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.d.ts.map +0 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.d.ts.map +0 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.d.ts.map +0 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.d.ts.map +0 -1
- package/dist/product-management/modules/content-pages/schemas/index.d.ts.map +0 -1
- package/dist/product-management/modules/content-pages/types/index.d.ts.map +0 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.d.ts.map +0 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagStatusBadge.d.ts.map +0 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagTypeBadge.d.ts.map +0 -1
- package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.d.ts.map +0 -1
- package/dist/product-management/modules/feature-flags/index.d.ts.map +0 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.d.ts.map +0 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.d.ts.map +0 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.d.ts.map +0 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.d.ts.map +0 -1
- package/dist/product-management/modules/feature-flags/schemas/index.d.ts.map +0 -1
- package/dist/product-management/modules/feature-flags/types/index.d.ts.map +0 -1
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.d.ts.map +0 -1
- package/dist/product-management/modules/press-kit/hooks/usePressKitAssets.d.ts.map +0 -1
- package/dist/product-management/modules/press-kit/index.d.ts.map +0 -1
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.d.ts.map +0 -1
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.d.ts.map +0 -1
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.d.ts.map +0 -1
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.d.ts.map +0 -1
- package/dist/product-management/modules/press-kit/schemas/index.d.ts.map +0 -1
- package/dist/product-management/modules/press-kit/types/index.d.ts.map +0 -1
- package/dist/product-management/modules/products/components/ProductCard.d.ts.map +0 -1
- package/dist/product-management/modules/products/components/ProductForm.d.ts.map +0 -1
- package/dist/product-management/modules/products/components/ProductPlans.d.ts.map +0 -1
- package/dist/product-management/modules/products/components/ProductStats.d.ts.map +0 -1
- package/dist/product-management/modules/products/components/ProductStatusBadge.d.ts.map +0 -1
- package/dist/product-management/modules/products/hooks/useProducts.d.ts.map +0 -1
- package/dist/product-management/modules/products/index.d.ts.map +0 -1
- package/dist/product-management/modules/products/pages/ProductCreatePage.d.ts.map +0 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.d.ts.map +0 -1
- package/dist/product-management/modules/products/pages/ProductEditPage.d.ts.map +0 -1
- package/dist/product-management/modules/products/pages/ProductsListPage.d.ts.map +0 -1
- package/dist/product-management/modules/products/schemas/index.d.ts.map +0 -1
- package/dist/product-management/modules/products/types/index.d.ts.map +0 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutCategoryBadge.d.ts.map +0 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.d.ts.map +0 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutKeyBadge.d.ts.map +0 -1
- package/dist/product-management/modules/shortcuts/hooks/useShortcuts.d.ts.map +0 -1
- package/dist/product-management/modules/shortcuts/index.d.ts.map +0 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.d.ts.map +0 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.d.ts.map +0 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.d.ts.map +0 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.d.ts.map +0 -1
- package/dist/product-management/modules/shortcuts/schemas/index.d.ts.map +0 -1
- package/dist/product-management/modules/shortcuts/types/index.d.ts.map +0 -1
- package/dist/product-management/providers/ProductConsoleProvider.d.ts.map +0 -1
- package/dist/product-management/shared/components/AuditHistoryTab.d.ts.map +0 -1
- package/dist/product-management/shared/components/TagList.d.ts.map +0 -1
- package/dist/product-management/shared/components/feedback/EmptyState.d.ts.map +0 -1
- package/dist/product-management/shared/components/feedback/ErrorState.d.ts.map +0 -1
- package/dist/product-management/shared/components/feedback/LoadingState.d.ts.map +0 -1
- package/dist/product-management/shared/components/input/ProductCombobox.d.ts.map +0 -1
- package/dist/product-management/shared/components/input/SearchInput.d.ts.map +0 -1
- package/dist/product-management/shared/components/input/TagInput.d.ts.map +0 -1
- package/dist/product-management/shared/hooks/useConfirmDialog.d.ts.map +0 -1
- package/dist/product-management/shared/hooks/useDebounced.d.ts.map +0 -1
- package/dist/product-management/shared/hooks/useTr.d.ts.map +0 -1
- package/dist/product-management/shared/index.d.ts.map +0 -1
- package/dist/product-management/shared/types/graphql.d.ts.map +0 -1
- package/dist/product-management/shared/utils/cn.d.ts.map +0 -1
- package/dist/product-management/shared/utils/exportUtils.d.ts.map +0 -1
- package/dist/product-management/shared/utils/permission-error.d.ts.map +0 -1
- package/dist/product-management/types/index.d.ts.map +0 -1
- package/dist/shared/components/MarkdownEditor.d.ts.map +0 -1
- package/dist/shared/components/index.d.ts.map +0 -1
- package/dist/shared/hooks/useTr.d.ts.map +0 -1
- package/dist/shared/index.d.ts.map +0 -1
- package/dist/shared/utils/formatDate.d.ts.map +0 -1
- package/dist/shared/utils/index.d.ts.map +0 -1
- package/dist/shared/utils/isSafeUrl.d.ts.map +0 -1
- package/dist/shared/utils/renderMarkdown.d.ts.map +0 -1
- package/dist/translations/en.d.ts.map +0 -1
- package/dist/translations/index.d.ts.map +0 -1
- package/dist/utils/nativeBridge.d.ts.map +0 -1
|
@@ -9,13 +9,13 @@ import { LoadingState as c } from "../../../shared/components/feedback/LoadingSt
|
|
|
9
9
|
import { ErrorState as l } from "../../../shared/components/feedback/ErrorState.js";
|
|
10
10
|
import { nativeConfirm as u, nativeImpact as d, nativeNotify as f } from "../../../../utils/nativeBridge.js";
|
|
11
11
|
import { useConfirmDialog as p } from "../../../shared/hooks/useConfirmDialog.js";
|
|
12
|
-
import {
|
|
13
|
-
import { ChevronLeft as h, ChevronRight as g, Download as _, Eye as v, FileText as y, Plus as b, RefreshCw as x, SquarePen as S, Trash2 as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import { PermissionGate as
|
|
16
|
-
import { Button as
|
|
12
|
+
import { useState as m } from "react";
|
|
13
|
+
import { ChevronLeft as h, ChevronRight as g, Download as _, Eye as v, FileText as y, Plus as b, RefreshCw as x, SquarePen as S, Trash2 as ee } from "lucide-react";
|
|
14
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
15
|
+
import { PermissionGate as T } from "@burdenoff/fe-libs/shared/components";
|
|
16
|
+
import { Button as te, CTAOverflowMenu as E, GlassCard as D, GradientText as O, IllustratedEmptyState as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
|
|
17
17
|
// src/product-management/modules/content-pages/pages/ContentPagesListPage.tsx
|
|
18
|
-
var
|
|
18
|
+
var j = [
|
|
19
19
|
{
|
|
20
20
|
label: "All",
|
|
21
21
|
tag: ""
|
|
@@ -40,26 +40,19 @@ var N = [
|
|
|
40
40
|
label: "Pages",
|
|
41
41
|
tag: "page"
|
|
42
42
|
}
|
|
43
|
-
],
|
|
44
|
-
function
|
|
45
|
-
let { navigate:
|
|
46
|
-
...
|
|
47
|
-
search:
|
|
43
|
+
], M = 20;
|
|
44
|
+
function N() {
|
|
45
|
+
let { navigate: N, basePath: P = "/products" } = n(), F = `${P}/content-pages`, [I, L] = m(""), R = t(I, 300), z = e(), [B, V] = m({}), [H, U] = m(0), { contentPages: W, total: G, hasMore: K, loading: q, error: J, refetch: Y } = r(void 0, {
|
|
46
|
+
...B,
|
|
47
|
+
search: R || void 0
|
|
48
48
|
}, {
|
|
49
|
-
limit:
|
|
50
|
-
offset:
|
|
51
|
-
}),
|
|
52
|
-
|
|
53
|
-
if (q === 0) {
|
|
54
|
-
G(0);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
let e = Math.ceil(q / P) - 1;
|
|
58
|
-
G((t) => t > e ? e : t);
|
|
59
|
-
}, [q]);
|
|
49
|
+
limit: M,
|
|
50
|
+
offset: H * M
|
|
51
|
+
}), X = Math.max(1, Math.ceil(G / M)), Z = H * M + 1, Q = Math.min((H + 1) * M, G), $ = G === 0 ? 0 : Math.min(H, Math.ceil(G / M) - 1);
|
|
52
|
+
$ !== H && U($);
|
|
60
53
|
let { deleteContentPage: ne, loading: re } = i(), { confirm: ie, ConfirmDialog: ae } = p(), oe = async (e) => {
|
|
61
54
|
d("medium");
|
|
62
|
-
let t =
|
|
55
|
+
let t = z("contentPages.confirmDelete", "Are you sure you want to delete this content page?"), n = await u({
|
|
63
56
|
title: "Delete content page",
|
|
64
57
|
message: t,
|
|
65
58
|
okButtonTitle: "Delete",
|
|
@@ -72,7 +65,7 @@ function F() {
|
|
|
72
65
|
cancelButtonTitle: "Cancel",
|
|
73
66
|
destructive: !0
|
|
74
67
|
}) : n) try {
|
|
75
|
-
await ne(e), f("success"),
|
|
68
|
+
await ne(e), f("success"), Y();
|
|
76
69
|
} catch (e) {
|
|
77
70
|
f("error"), console.error("Failed to delete content page:", e);
|
|
78
71
|
}
|
|
@@ -81,90 +74,90 @@ function F() {
|
|
|
81
74
|
month: "short",
|
|
82
75
|
day: "numeric"
|
|
83
76
|
}) : "—";
|
|
84
|
-
return /* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ w("div", {
|
|
85
78
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
|
|
86
79
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ w("div", {
|
|
88
81
|
className: "mb-6",
|
|
89
82
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ w("div", {
|
|
91
84
|
className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h1", {
|
|
93
86
|
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2",
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
-
}), /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */ C(O, { children: z("contentPages.title", "Content Pages") })
|
|
88
|
+
}), /* @__PURE__ */ C("p", {
|
|
96
89
|
className: "text-text-secondary",
|
|
97
|
-
children:
|
|
98
|
-
})] }), /* @__PURE__ */
|
|
90
|
+
children: z("contentPages.subtitle", "Manage content pages and documentation")
|
|
91
|
+
})] }), /* @__PURE__ */ C(T, {
|
|
99
92
|
role: "super_admin",
|
|
100
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ C(E, {
|
|
101
94
|
primary: {
|
|
102
|
-
label:
|
|
103
|
-
onSelect: () =>
|
|
104
|
-
icon: /* @__PURE__ */
|
|
95
|
+
label: z("contentPages.newPage", "New Page"),
|
|
96
|
+
onSelect: () => N(`${F}/new`),
|
|
97
|
+
icon: /* @__PURE__ */ C(b, { className: "size-4" })
|
|
105
98
|
},
|
|
106
99
|
actions: []
|
|
107
100
|
})
|
|
108
101
|
})]
|
|
109
102
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ C(A, {
|
|
111
104
|
className: "mb-4",
|
|
112
|
-
children:
|
|
105
|
+
children: z("contentPages.purpose", "Content pages are the published text your products show users — blog posts, legal pages, docs, and announcements. Write them in markdown or HTML, version each change, and publish only when they are ready to go live.")
|
|
113
106
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ C("div", {
|
|
115
108
|
className: "flex flex-wrap gap-1 border-b border-border-seam pb-px",
|
|
116
|
-
children:
|
|
117
|
-
let t = (
|
|
118
|
-
return /* @__PURE__ */
|
|
109
|
+
children: j.map((e) => {
|
|
110
|
+
let t = (B.tag ?? "") === e.tag;
|
|
111
|
+
return /* @__PURE__ */ C("button", {
|
|
119
112
|
type: "button",
|
|
120
113
|
onClick: () => {
|
|
121
|
-
|
|
122
|
-
...
|
|
114
|
+
V({
|
|
115
|
+
...B,
|
|
123
116
|
tag: e.tag || void 0
|
|
124
|
-
}),
|
|
117
|
+
}), U(0);
|
|
125
118
|
},
|
|
126
119
|
className: `px-4 py-2 rounded-t-lg text-sm font-medium transition-all border-b-2 ${t ? "border-[var(--color-action-primary-bg)] text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"}`,
|
|
127
|
-
children:
|
|
120
|
+
children: z(`contentPages.tab.${e.label.toLowerCase()}`, e.label)
|
|
128
121
|
}, e.label);
|
|
129
122
|
})
|
|
130
123
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ w("div", {
|
|
132
125
|
className: "flex gap-4",
|
|
133
126
|
children: [
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
value:
|
|
127
|
+
/* @__PURE__ */ C(o, {
|
|
128
|
+
value: I,
|
|
136
129
|
onChange: (e) => {
|
|
137
|
-
|
|
130
|
+
L(e), U(0);
|
|
138
131
|
},
|
|
139
|
-
placeholder:
|
|
132
|
+
placeholder: z("contentPages.searchPlaceholder", "Search content pages..."),
|
|
140
133
|
className: "flex-1"
|
|
141
134
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
value:
|
|
135
|
+
/* @__PURE__ */ w("select", {
|
|
136
|
+
value: B.isPublished === void 0 ? "" : B.isPublished ? "published" : "all",
|
|
144
137
|
onChange: (e) => {
|
|
145
|
-
|
|
146
|
-
...
|
|
138
|
+
V({
|
|
139
|
+
...B,
|
|
147
140
|
isPublished: e.target.value === "published" || void 0
|
|
148
|
-
}),
|
|
141
|
+
}), U(0);
|
|
149
142
|
},
|
|
150
143
|
className: "\n px-4 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n transition-all duration-200\n \n scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ C("option", {
|
|
152
145
|
value: "",
|
|
153
|
-
children:
|
|
154
|
-
}), /* @__PURE__ */
|
|
146
|
+
children: z("contentPages.filterAll", "All")
|
|
147
|
+
}), /* @__PURE__ */ C("option", {
|
|
155
148
|
value: "published",
|
|
156
|
-
children:
|
|
149
|
+
children: z("contentPages.publishedOnly", "Published Only")
|
|
157
150
|
})]
|
|
158
151
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ C("button", {
|
|
160
153
|
type: "button",
|
|
161
|
-
onClick: () =>
|
|
154
|
+
onClick: () => Y(),
|
|
162
155
|
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 ",
|
|
163
|
-
children: /* @__PURE__ */
|
|
156
|
+
children: /* @__PURE__ */ C(x, { size: 18 })
|
|
164
157
|
}),
|
|
165
|
-
|
|
158
|
+
W.length > 0 && /* @__PURE__ */ C("button", {
|
|
166
159
|
type: "button",
|
|
167
|
-
onClick: () => s("content-pages",
|
|
160
|
+
onClick: () => s("content-pages", W.map((e) => ({
|
|
168
161
|
id: e.id,
|
|
169
162
|
slug: e.slug,
|
|
170
163
|
title: e.title,
|
|
@@ -177,138 +170,138 @@ function F() {
|
|
|
177
170
|
updatedAt: e.updatedAt
|
|
178
171
|
}))),
|
|
179
172
|
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 ",
|
|
180
|
-
title:
|
|
181
|
-
children: /* @__PURE__ */
|
|
173
|
+
title: z("contentPages.exportCsv", "Export as CSV"),
|
|
174
|
+
children: /* @__PURE__ */ C(_, { size: 18 })
|
|
182
175
|
})
|
|
183
176
|
]
|
|
184
177
|
})
|
|
185
178
|
]
|
|
186
179
|
}),
|
|
187
|
-
|
|
188
|
-
message:
|
|
180
|
+
J ? /* @__PURE__ */ C(l, {
|
|
181
|
+
message: J.message,
|
|
189
182
|
action: {
|
|
190
|
-
label:
|
|
191
|
-
onClick: () =>
|
|
183
|
+
label: z("productCommon.retry", "Retry"),
|
|
184
|
+
onClick: () => Y()
|
|
192
185
|
}
|
|
193
|
-
}) :
|
|
186
|
+
}) : q && W.length === 0 ? /* @__PURE__ */ C(c, { message: z("contentPages.loadingContentPages", "Loading content pages...") }) : W.length === 0 ? /* @__PURE__ */ C(D, {
|
|
194
187
|
treatment: "insight",
|
|
195
188
|
className: "animate-in fade-in duration-200",
|
|
196
|
-
children: /* @__PURE__ */
|
|
197
|
-
illustration:
|
|
198
|
-
title:
|
|
199
|
-
action: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ C(k, {
|
|
190
|
+
illustration: I || B.tag || B.isPublished ? "empty-search" : "empty-files",
|
|
191
|
+
title: z("contentPages.noContentPagesFound", "No content pages found"),
|
|
192
|
+
action: /* @__PURE__ */ w(te, {
|
|
200
193
|
type: "button",
|
|
201
|
-
onClick: () =>
|
|
202
|
-
children: [/* @__PURE__ */
|
|
194
|
+
onClick: () => N(`${F}/new`),
|
|
195
|
+
children: [/* @__PURE__ */ C(b, { className: "size-4" }), z("contentPages.newPage", "New Page")]
|
|
203
196
|
})
|
|
204
197
|
})
|
|
205
|
-
}) : /* @__PURE__ */
|
|
198
|
+
}) : /* @__PURE__ */ w(D, {
|
|
206
199
|
treatment: "glass",
|
|
207
200
|
glow: !0,
|
|
208
201
|
className: "overflow-hidden p-0",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ w("table", {
|
|
210
203
|
className: "w-full",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ C("thead", {
|
|
212
205
|
className: "bg-bg-sunken/60 border-b border-border-seam",
|
|
213
|
-
children: /* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
206
|
+
children: /* @__PURE__ */ w("tr", { children: [
|
|
207
|
+
/* @__PURE__ */ C("th", {
|
|
215
208
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
216
|
-
children:
|
|
209
|
+
children: z("contentPages.columnPage", "Page")
|
|
217
210
|
}),
|
|
218
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ C("th", {
|
|
219
212
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
220
|
-
children:
|
|
213
|
+
children: z("contentPages.columnSlug", "Slug")
|
|
221
214
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ C("th", {
|
|
223
216
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
224
|
-
children:
|
|
217
|
+
children: z("contentPages.columnStatus", "Status")
|
|
225
218
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ C("th", {
|
|
227
220
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
228
|
-
children:
|
|
221
|
+
children: z("contentPages.columnVersion", "Version")
|
|
229
222
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ C("th", {
|
|
231
224
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
232
|
-
children:
|
|
225
|
+
children: z("contentPages.columnLastUpdated", "Last Updated")
|
|
233
226
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ C("th", {
|
|
235
228
|
className: "text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
236
|
-
children:
|
|
229
|
+
children: z("contentPages.columnActions", "Actions")
|
|
237
230
|
})
|
|
238
231
|
] })
|
|
239
|
-
}), /* @__PURE__ */
|
|
232
|
+
}), /* @__PURE__ */ C("tbody", {
|
|
240
233
|
className: "divide-y divide-border-seam",
|
|
241
|
-
children:
|
|
234
|
+
children: W.map((e) => /* @__PURE__ */ w("tr", {
|
|
242
235
|
className: "hover:bg-bg-sunken/70 transition-colors duration-200 cursor-pointer",
|
|
243
|
-
onClick: () =>
|
|
236
|
+
onClick: () => N(`${F}/${e.id}`),
|
|
244
237
|
children: [
|
|
245
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ C("td", {
|
|
246
239
|
className: "px-6 py-4",
|
|
247
|
-
children: /* @__PURE__ */
|
|
240
|
+
children: /* @__PURE__ */ w("div", {
|
|
248
241
|
className: "flex items-center gap-3",
|
|
249
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ C("div", {
|
|
250
243
|
className: "size-10 rounded-lg bg-[var(--color-status-info-subtle)] flex items-center justify-center",
|
|
251
|
-
children: /* @__PURE__ */
|
|
244
|
+
children: /* @__PURE__ */ C(y, {
|
|
252
245
|
size: 20,
|
|
253
246
|
className: "text-[var(--color-status-info)]"
|
|
254
247
|
})
|
|
255
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ C("div", { children: /* @__PURE__ */ C("p", {
|
|
256
249
|
className: "font-medium text-text-primary",
|
|
257
250
|
children: e.title
|
|
258
251
|
}) })]
|
|
259
252
|
})
|
|
260
253
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ C("td", {
|
|
262
255
|
className: "px-6 py-4",
|
|
263
|
-
children: /* @__PURE__ */
|
|
256
|
+
children: /* @__PURE__ */ w("span", {
|
|
264
257
|
className: "text-sm text-text-tertiary font-mono",
|
|
265
258
|
children: ["/", e.slug]
|
|
266
259
|
})
|
|
267
260
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ C("td", {
|
|
269
262
|
className: "px-6 py-4",
|
|
270
|
-
children: /* @__PURE__ */
|
|
263
|
+
children: /* @__PURE__ */ C(a, { isPublished: e.isPublished })
|
|
271
264
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ C("td", {
|
|
273
266
|
className: "px-6 py-4",
|
|
274
|
-
children: /* @__PURE__ */
|
|
267
|
+
children: /* @__PURE__ */ w("span", {
|
|
275
268
|
className: "text-sm text-text-primary font-mono",
|
|
276
269
|
children: ["v", e.version]
|
|
277
270
|
})
|
|
278
271
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ C("td", {
|
|
280
273
|
className: "px-6 py-4",
|
|
281
|
-
children: /* @__PURE__ */
|
|
274
|
+
children: /* @__PURE__ */ C("span", {
|
|
282
275
|
className: "text-sm text-text-secondary",
|
|
283
276
|
children: se(e.lastUpdated || e.updatedAt)
|
|
284
277
|
})
|
|
285
278
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ C("td", {
|
|
287
280
|
className: "px-6 py-4",
|
|
288
|
-
children: /* @__PURE__ */
|
|
281
|
+
children: /* @__PURE__ */ w("div", {
|
|
289
282
|
className: "flex items-center justify-end gap-2",
|
|
290
283
|
onClick: (e) => e.stopPropagation(),
|
|
291
|
-
children: [/* @__PURE__ */
|
|
284
|
+
children: [/* @__PURE__ */ C("button", {
|
|
292
285
|
type: "button",
|
|
293
|
-
onClick: () =>
|
|
286
|
+
onClick: () => N(`${F}/${e.id}`),
|
|
294
287
|
className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
|
|
295
|
-
title:
|
|
296
|
-
children: /* @__PURE__ */
|
|
297
|
-
}), /* @__PURE__ */ T
|
|
288
|
+
title: z("contentPages.viewDetails", "View details"),
|
|
289
|
+
children: /* @__PURE__ */ C(v, { size: 18 })
|
|
290
|
+
}), /* @__PURE__ */ w(T, {
|
|
298
291
|
role: "super_admin",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
292
|
+
children: [/* @__PURE__ */ C("button", {
|
|
300
293
|
type: "button",
|
|
301
|
-
onClick: () =>
|
|
294
|
+
onClick: () => N(`${F}/${e.id}/edit`),
|
|
302
295
|
className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
|
|
303
|
-
title:
|
|
304
|
-
children: /* @__PURE__ */
|
|
305
|
-
}), /* @__PURE__ */
|
|
296
|
+
title: z("contentPages.edit", "Edit"),
|
|
297
|
+
children: /* @__PURE__ */ C(S, { size: 18 })
|
|
298
|
+
}), /* @__PURE__ */ C("button", {
|
|
306
299
|
type: "button",
|
|
307
300
|
onClick: () => oe(e.id),
|
|
308
301
|
disabled: re,
|
|
309
302
|
className: "p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50",
|
|
310
|
-
title:
|
|
311
|
-
children: /* @__PURE__ */
|
|
303
|
+
title: z("contentPages.delete", "Delete"),
|
|
304
|
+
children: /* @__PURE__ */ C(ee, { size: 18 })
|
|
312
305
|
})]
|
|
313
306
|
})]
|
|
314
307
|
})
|
|
@@ -316,49 +309,49 @@ function F() {
|
|
|
316
309
|
]
|
|
317
310
|
}, e.id))
|
|
318
311
|
})]
|
|
319
|
-
}),
|
|
312
|
+
}), G > M && /* @__PURE__ */ w("div", {
|
|
320
313
|
className: "flex items-center justify-between px-6 py-3 border-t border-border-seam bg-bg-sunken/40",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
314
|
+
children: [/* @__PURE__ */ w("p", {
|
|
322
315
|
className: "text-sm text-text-secondary",
|
|
323
316
|
children: [
|
|
324
|
-
|
|
317
|
+
z("contentPages.showing", "Showing"),
|
|
325
318
|
" ",
|
|
326
|
-
|
|
319
|
+
Z,
|
|
327
320
|
"–",
|
|
328
|
-
|
|
321
|
+
Q,
|
|
329
322
|
" ",
|
|
330
|
-
|
|
323
|
+
z("contentPages.of", "of"),
|
|
331
324
|
" ",
|
|
332
|
-
|
|
325
|
+
G,
|
|
333
326
|
" ",
|
|
334
|
-
|
|
327
|
+
z("contentPages.contentPages", "content pages")
|
|
335
328
|
]
|
|
336
|
-
}), /* @__PURE__ */
|
|
329
|
+
}), /* @__PURE__ */ w("div", {
|
|
337
330
|
className: "flex items-center gap-2",
|
|
338
331
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ w("button", {
|
|
340
333
|
type: "button",
|
|
341
|
-
onClick: () =>
|
|
342
|
-
disabled:
|
|
343
|
-
"aria-label":
|
|
334
|
+
onClick: () => U((e) => Math.max(0, e - 1)),
|
|
335
|
+
disabled: H === 0 || q,
|
|
336
|
+
"aria-label": z("contentPages.prevPage", "Previous page"),
|
|
344
337
|
className: "\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n ",
|
|
345
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ C(h, { size: 16 }), z("contentPages.prev", "Prev")]
|
|
346
339
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ w("span", {
|
|
348
341
|
className: "text-sm text-text-secondary px-2 tabular-nums",
|
|
349
342
|
children: [
|
|
350
|
-
|
|
343
|
+
H + 1,
|
|
351
344
|
" / ",
|
|
352
|
-
|
|
345
|
+
X
|
|
353
346
|
]
|
|
354
347
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ w("button", {
|
|
356
349
|
type: "button",
|
|
357
|
-
onClick: () =>
|
|
358
|
-
disabled: !
|
|
359
|
-
"aria-label":
|
|
350
|
+
onClick: () => U((e) => e + 1),
|
|
351
|
+
disabled: !K && H + 1 >= X || q,
|
|
352
|
+
"aria-label": z("contentPages.nextPage", "Next page"),
|
|
360
353
|
className: "\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n ",
|
|
361
|
-
children: [
|
|
354
|
+
children: [z("contentPages.next", "Next"), /* @__PURE__ */ C(g, { size: 16 })]
|
|
362
355
|
})
|
|
363
356
|
]
|
|
364
357
|
})]
|
|
@@ -368,6 +361,6 @@ function F() {
|
|
|
368
361
|
]
|
|
369
362
|
});
|
|
370
363
|
}
|
|
371
|
-
export {
|
|
364
|
+
export { N as ContentPagesListPage };
|
|
372
365
|
|
|
373
366
|
//# sourceMappingURL=ContentPagesListPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPagesListPage.js","names":["TYPE_TABS","PAGE_SIZE","ContentPagesListPage","useProductConsole","contentPagesBasePath","basePath","searchQuery","setSearchQuery","useState","debouncedSearchQuery","useDebounced","tr","useTr","filter","setFilter","page","setPage","useContentPages","totalPages","total","showingFrom","showingTo","lastPage","current","deleteLoading","useDeleteContentPage","useConfirmDialog","handleDelete","message","native","nativeConfirm","confirm","deleteContentPage","id","nativeNotify","refetch","error","formatDate","dateString","GradientText","PermissionGate","CTAOverflowMenu","navigate","Plus","PagePurpose","active","t","SearchInput","v","RefreshCw","contentPages","exportToCsv","p","Download","ErrorState","loading","LoadingState","GlassCard","IllustratedEmptyState","Button","FileText","ContentPageStatusBadge","Eye","SquarePen","Trash2","ChevronLeft","hasMore","ChevronRight","ConfirmDialog"],"sources":["../../../../../src/product-management/modules/content-pages/pages/ContentPagesListPage.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport {\n ChevronLeft,\n ChevronRight,\n Download,\n FileText,\n Plus,\n Eye,\n SquarePen,\n Trash2,\n RefreshCw,\n} from 'lucide-react';\nimport { PermissionGate } from '@burdenoff/fe-libs/shared/components';\nimport {\n Button,\n CTAOverflowMenu,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useDebounced } from '../../../shared/hooks/useDebounced';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { useContentPages, useDeleteContentPage } from '../hooks/useContentPages';\nimport { ContentPageStatusBadge } from '../components/ContentPageStatusBadge';\nimport { SearchInput } from '../../../shared/components/input/SearchInput';\nimport { exportToCsv } from '../../../shared/utils/exportUtils';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport type { ContentPageFilterInput } from '../types';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../../../utils/nativeBridge';\nimport { useConfirmDialog } from '../../../shared/hooks/useConfirmDialog';\n\n/** Type tabs — each filters the list server-side by tag ('' = All). */\nconst TYPE_TABS: { label: string; tag: string }[] = [\n { label: 'All', tag: '' },\n { label: 'Blog', tag: 'blog' },\n { label: 'Legal', tag: 'legal' },\n { label: 'Docs', tag: 'docs' },\n { label: 'Press', tag: 'press' },\n { label: 'Pages', tag: 'page' },\n];\n\nconst PAGE_SIZE = 20;\n\nexport function ContentPagesListPage() {\n const { navigate, basePath = '/products' } = useProductConsole();\n const contentPagesBasePath = `${basePath}/content-pages`;\n const [searchQuery, setSearchQuery] = useState('');\n // Debounce so typing doesn't fire a query (and flip `loading`) on every keystroke.\n const debouncedSearchQuery = useDebounced(searchQuery, 300);\n const tr = useTr();\n const [filter, setFilter] = useState<ContentPageFilterInput>({});\n const [page, setPage] = useState(0);\n\n const { contentPages, total, hasMore, loading, error, refetch } = useContentPages(\n undefined,\n { ...filter, search: debouncedSearchQuery || undefined },\n { limit: PAGE_SIZE, offset: page * PAGE_SIZE }\n );\n\n const totalPages = Math.max(1, Math.ceil(total / PAGE_SIZE));\n // Footer is gated on `total > PAGE_SIZE`, so total === 0 never reaches the renderer; no empty-state special case needed.\n const showingFrom = page * PAGE_SIZE + 1;\n const showingTo = Math.min((page + 1) * PAGE_SIZE, total);\n\n // Clamp `page` when total shrinks below the current offset (e.g. concurrent delete strands the user past the last page).\n useEffect(() => {\n if (total === 0) {\n setPage(0);\n return;\n }\n const lastPage = Math.ceil(total / PAGE_SIZE) - 1;\n setPage((current) => (current > lastPage ? lastPage : current));\n }, [total]);\n\n const { deleteContentPage, loading: deleteLoading } = useDeleteContentPage();\n const { confirm, ConfirmDialog } = useConfirmDialog();\n\n const handleDelete = async (id: string) => {\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 refetch();\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to delete content page:', error);\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: 'short',\n day: 'numeric',\n });\n };\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 <div className=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4\">\n <div>\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2\">\n <GradientText>{tr('contentPages.title', 'Content Pages')}</GradientText>\n </h1>\n <p className=\"text-text-secondary\">\n {tr('contentPages.subtitle', 'Manage content pages and documentation')}\n </p>\n </div>\n\n <PermissionGate role=\"super_admin\">\n <CTAOverflowMenu\n primary={{\n label: tr('contentPages.newPage', 'New Page'),\n onSelect: () => navigate(`${contentPagesBasePath}/new`),\n icon: <Plus className=\"size-4\" />,\n }}\n actions={[]}\n />\n </PermissionGate>\n </div>\n\n <PagePurpose className=\"mb-4\">\n {tr(\n 'contentPages.purpose',\n 'Content pages are the published text your products show users — blog posts, legal pages, docs, and announcements. Write them in markdown or HTML, version each change, and publish only when they are ready to go live.'\n )}\n </PagePurpose>\n\n {/* Type tabs */}\n <div className=\"flex flex-wrap gap-1 border-b border-border-seam pb-px\">\n {TYPE_TABS.map((t) => {\n const active = (filter.tag ?? '') === t.tag;\n return (\n <button\n key={t.label}\n type=\"button\"\n onClick={() => {\n setFilter({ ...filter, tag: t.tag || undefined });\n setPage(0);\n }}\n className={`px-4 py-2 rounded-t-lg text-sm font-medium transition-all border-b-2 ${\n active\n ? 'border-[var(--color-action-primary-bg)] text-text-primary'\n : 'border-transparent text-text-secondary hover:text-text-primary'\n }`}\n >\n {tr(`contentPages.tab.${t.label.toLowerCase()}`, t.label)}\n </button>\n );\n })}\n </div>\n\n {/* Search and Filters */}\n <div className=\"flex gap-4\">\n {/* Search */}\n <SearchInput\n value={searchQuery}\n onChange={(v) => {\n // Reset to page 1 synchronously with the keystroke: by the time the\n // debounced query fires, the offset is already 0 — one fetch with the\n // correct slice, no stale-offset/empty window from a post-debounce reset.\n setSearchQuery(v);\n setPage(0);\n }}\n placeholder={tr('contentPages.searchPlaceholder', 'Search content pages...')}\n className=\"flex-1\"\n />\n\n {/* Published Filter */}\n <select\n value={filter.isPublished === undefined ? '' : filter.isPublished ? 'published' : 'all'}\n onChange={(e) => {\n setFilter({\n ...filter,\n isPublished: e.target.value === 'published' ? true : undefined,\n });\n setPage(0);\n }}\n className=\"\n px-4 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n transition-all duration-200\n \n scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"\">{tr('contentPages.filterAll', 'All')}</option>\n <option value=\"published\">{tr('contentPages.publishedOnly', 'Published Only')}</option>\n </select>\n\n {/* Refresh */}\n <button\n type=\"button\"\n onClick={() => refetch()}\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 \"\n >\n <RefreshCw size={18} />\n </button>\n\n {/* Export */}\n {contentPages.length > 0 && (\n <button\n type=\"button\"\n onClick={() =>\n exportToCsv(\n 'content-pages',\n contentPages.map((p) => ({\n id: p.id,\n slug: p.slug,\n title: p.title,\n isPublished: p.isPublished,\n contentFormat: p.contentFormat,\n tags: (p.tags ?? []).join(', '),\n sortOrder: p.sortOrder,\n productId: p.productId ?? '',\n createdAt: p.createdAt,\n updatedAt: p.updatedAt,\n }))\n )\n }\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 \"\n title={tr('contentPages.exportCsv', 'Export as CSV')}\n >\n <Download size={18} />\n </button>\n )}\n </div>\n </div>\n\n {/* Body — header above stays mounted across refetches so the search keeps focus. */}\n {error ? (\n <ErrorState\n message={error.message}\n action={{ label: tr('productCommon.retry', 'Retry'), onClick: () => refetch() }}\n />\n ) : loading && contentPages.length === 0 ? (\n <LoadingState\n message={tr('contentPages.loadingContentPages', 'Loading content pages...')}\n />\n ) : contentPages.length === 0 ? (\n <GlassCard treatment=\"insight\" className=\"animate-in fade-in duration-200\">\n <IllustratedEmptyState\n illustration={\n searchQuery || filter.tag || filter.isPublished ? 'empty-search' : 'empty-files'\n }\n title={tr('contentPages.noContentPagesFound', 'No content pages found')}\n action={\n <Button type=\"button\" onClick={() => navigate(`${contentPagesBasePath}/new`)}>\n <Plus className=\"size-4\" />\n {tr('contentPages.newPage', 'New Page')}\n </Button>\n }\n />\n </GlassCard>\n ) : (\n <GlassCard treatment=\"glass\" glow className=\"overflow-hidden p-0\">\n <table className=\"w-full\">\n <thead className=\"bg-bg-sunken/60 border-b border-border-seam\">\n <tr>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnPage', 'Page')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnSlug', 'Slug')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnStatus', 'Status')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnVersion', 'Version')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnLastUpdated', 'Last Updated')}\n </th>\n <th className=\"text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnActions', 'Actions')}\n </th>\n </tr>\n </thead>\n <tbody className=\"divide-y divide-border-seam\">\n {contentPages.map((page) => (\n <tr\n key={page.id}\n className=\"hover:bg-bg-sunken/70 transition-colors duration-200 cursor-pointer\"\n onClick={() => navigate(`${contentPagesBasePath}/${page.id}`)}\n >\n <td className=\"px-6 py-4\">\n <div className=\"flex items-center gap-3\">\n <div className=\"size-10 rounded-lg bg-[var(--color-status-info-subtle)] flex items-center justify-center\">\n <FileText size={20} className=\"text-[var(--color-status-info)]\" />\n </div>\n <div>\n <p className=\"font-medium text-text-primary\">{page.title}</p>\n </div>\n </div>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-tertiary font-mono\">/{page.slug}</span>\n </td>\n <td className=\"px-6 py-4\">\n <ContentPageStatusBadge isPublished={page.isPublished} />\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-primary font-mono\">v{page.version}</span>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-secondary\">\n {formatDate(page.lastUpdated || page.updatedAt)}\n </span>\n </td>\n <td className=\"px-6 py-4\">\n <div\n className=\"flex items-center justify-end gap-2\"\n onClick={(e) => e.stopPropagation()}\n >\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/${page.id}`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('contentPages.viewDetails', 'View details')}\n >\n <Eye size={18} />\n </button>\n <PermissionGate role=\"super_admin\">\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/${page.id}/edit`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('contentPages.edit', 'Edit')}\n >\n <SquarePen size={18} />\n </button>\n <button\n type=\"button\"\n onClick={() => handleDelete(page.id)}\n disabled={deleteLoading}\n className=\"p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50\"\n title={tr('contentPages.delete', 'Delete')}\n >\n <Trash2 size={18} />\n </button>\n </PermissionGate>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n\n {/* Pagination — hidden when total fits on one page to avoid always-disabled buttons. */}\n {total > PAGE_SIZE && (\n <div className=\"flex items-center justify-between px-6 py-3 border-t border-border-seam bg-bg-sunken/40\">\n <p className=\"text-sm text-text-secondary\">\n {tr('contentPages.showing', 'Showing')} {showingFrom}–{showingTo}{' '}\n {tr('contentPages.of', 'of')} {total}{' '}\n {tr('contentPages.contentPages', 'content pages')}\n </p>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => setPage((p) => Math.max(0, p - 1))}\n disabled={page === 0 || loading}\n aria-label={tr('contentPages.prevPage', 'Previous page')}\n className=\"\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n \"\n >\n <ChevronLeft size={16} />\n {tr('contentPages.prev', 'Prev')}\n </button>\n <span className=\"text-sm text-text-secondary px-2 tabular-nums\">\n {page + 1} / {totalPages}\n </span>\n {/* Belt-and-suspenders: `page+1 >= totalPages` alone is enough when backend `total` is reliable; `!hasMore` guards against stale/lying counts. */}\n <button\n type=\"button\"\n onClick={() => setPage((p) => p + 1)}\n disabled={(!hasMore && page + 1 >= totalPages) || loading}\n aria-label={tr('contentPages.nextPage', 'Next page')}\n className=\"\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n \"\n >\n {tr('contentPages.next', 'Next')}\n <ChevronRight size={16} />\n </button>\n </div>\n </div>\n )}\n </GlassCard>\n )}\n {ConfirmDialog}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmCA,IAAMA,IAA8C;CAClD;EAAE,OAAO;EAAO,KAAK;CAAG;CACxB;EAAE,OAAO;EAAQ,KAAK;CAAO;CAC7B;EAAE,OAAO;EAAS,KAAK;CAAQ;CAC/B;EAAE,OAAO;EAAQ,KAAK;CAAO;CAC7B;EAAE,OAAO;EAAS,KA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B,MAAM,CACzB;;OACR,kBAAC,QAAD;QAAM,WAAU;QAAhB,UAAA;SACGI,IAAO;SAAE;SAAIG;QACV;;OAEN,kBAAC,UAAD;QACE,MAAK;QACL,eAAeF,GAAS,MAAMoC,IAAI,CAAC;QACnC,UAAW,CAACc,KAAWnD,IAAO,KAAKG,KAAeqC;QAClD,cAAY5C,EAAG,yBAAyB,WAAW;QACnD,WAAU;QALZ,UAAA,CAaGA,EAAG,qBAAqB,MAAM,GAC/B,kBAACwD,GAAD,EAAc,MAAM,GAAK,CAAA,CACnB;;MACL;KACF,CAAA,CAAA;IAEE,CAAA,CAAA;;GAEZC;EACE;;AAET"}
|
|
1
|
+
{"version":3,"file":"ContentPagesListPage.js","names":["TYPE_TABS","PAGE_SIZE","ContentPagesListPage","useProductConsole","contentPagesBasePath","basePath","searchQuery","setSearchQuery","useState","debouncedSearchQuery","useDebounced","tr","useTr","filter","setFilter","page","setPage","useContentPages","totalPages","total","showingFrom","showingTo","clampedPage","deleteLoading","useDeleteContentPage","useConfirmDialog","handleDelete","message","native","nativeConfirm","confirm","deleteContentPage","id","nativeNotify","refetch","error","formatDate","dateString","GradientText","PermissionGate","CTAOverflowMenu","navigate","Plus","PagePurpose","active","t","SearchInput","v","RefreshCw","contentPages","exportToCsv","p","Download","ErrorState","loading","LoadingState","GlassCard","IllustratedEmptyState","Button","FileText","ContentPageStatusBadge","Eye","SquarePen","Trash2","ChevronLeft","hasMore","ChevronRight","ConfirmDialog"],"sources":["../../../../../src/product-management/modules/content-pages/pages/ContentPagesListPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n ChevronLeft,\n ChevronRight,\n Download,\n FileText,\n Plus,\n Eye,\n SquarePen,\n Trash2,\n RefreshCw,\n} from 'lucide-react';\nimport { PermissionGate } from '@burdenoff/fe-libs/shared/components';\nimport {\n Button,\n CTAOverflowMenu,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useDebounced } from '../../../shared/hooks/useDebounced';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { useContentPages, useDeleteContentPage } from '../hooks/useContentPages';\nimport { ContentPageStatusBadge } from '../components/ContentPageStatusBadge';\nimport { SearchInput } from '../../../shared/components/input/SearchInput';\nimport { exportToCsv } from '../../../shared/utils/exportUtils';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport type { ContentPageFilterInput } from '../types';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../../../utils/nativeBridge';\nimport { useConfirmDialog } from '../../../shared/hooks/useConfirmDialog';\n\n/** Type tabs — each filters the list server-side by tag ('' = All). */\nconst TYPE_TABS: { label: string; tag: string }[] = [\n { label: 'All', tag: '' },\n { label: 'Blog', tag: 'blog' },\n { label: 'Legal', tag: 'legal' },\n { label: 'Docs', tag: 'docs' },\n { label: 'Press', tag: 'press' },\n { label: 'Pages', tag: 'page' },\n];\n\nconst PAGE_SIZE = 20;\n\nexport function ContentPagesListPage() {\n const { navigate, basePath = '/products' } = useProductConsole();\n const contentPagesBasePath = `${basePath}/content-pages`;\n const [searchQuery, setSearchQuery] = useState('');\n // Debounce so typing doesn't fire a query (and flip `loading`) on every keystroke.\n const debouncedSearchQuery = useDebounced(searchQuery, 300);\n const tr = useTr();\n const [filter, setFilter] = useState<ContentPageFilterInput>({});\n const [page, setPage] = useState(0);\n\n const { contentPages, total, hasMore, loading, error, refetch } = useContentPages(\n undefined,\n { ...filter, search: debouncedSearchQuery || undefined },\n { limit: PAGE_SIZE, offset: page * PAGE_SIZE }\n );\n\n const totalPages = Math.max(1, Math.ceil(total / PAGE_SIZE));\n // Footer is gated on `total > PAGE_SIZE`, so total === 0 never reaches the renderer; no empty-state special case needed.\n const showingFrom = page * PAGE_SIZE + 1;\n const showingTo = Math.min((page + 1) * PAGE_SIZE, total);\n\n // Clamp `page` when total shrinks below the current offset (e.g. concurrent delete strands the user past the last page).\n // Adjusting state during render (instead of in an effect) avoids a render with the stale page.\n const clampedPage = total === 0 ? 0 : Math.min(page, Math.ceil(total / PAGE_SIZE) - 1);\n if (clampedPage !== page) {\n setPage(clampedPage);\n }\n\n const { deleteContentPage, loading: deleteLoading } = useDeleteContentPage();\n const { confirm, ConfirmDialog } = useConfirmDialog();\n\n const handleDelete = async (id: string) => {\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 refetch();\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to delete content page:', error);\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: 'short',\n day: 'numeric',\n });\n };\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 <div className=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4\">\n <div>\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2\">\n <GradientText>{tr('contentPages.title', 'Content Pages')}</GradientText>\n </h1>\n <p className=\"text-text-secondary\">\n {tr('contentPages.subtitle', 'Manage content pages and documentation')}\n </p>\n </div>\n\n <PermissionGate role=\"super_admin\">\n <CTAOverflowMenu\n primary={{\n label: tr('contentPages.newPage', 'New Page'),\n onSelect: () => navigate(`${contentPagesBasePath}/new`),\n icon: <Plus className=\"size-4\" />,\n }}\n actions={[]}\n />\n </PermissionGate>\n </div>\n\n <PagePurpose className=\"mb-4\">\n {tr(\n 'contentPages.purpose',\n 'Content pages are the published text your products show users — blog posts, legal pages, docs, and announcements. Write them in markdown or HTML, version each change, and publish only when they are ready to go live.'\n )}\n </PagePurpose>\n\n {/* Type tabs */}\n <div className=\"flex flex-wrap gap-1 border-b border-border-seam pb-px\">\n {TYPE_TABS.map((t) => {\n const active = (filter.tag ?? '') === t.tag;\n return (\n <button\n key={t.label}\n type=\"button\"\n onClick={() => {\n setFilter({ ...filter, tag: t.tag || undefined });\n setPage(0);\n }}\n className={`px-4 py-2 rounded-t-lg text-sm font-medium transition-all border-b-2 ${\n active\n ? 'border-[var(--color-action-primary-bg)] text-text-primary'\n : 'border-transparent text-text-secondary hover:text-text-primary'\n }`}\n >\n {tr(`contentPages.tab.${t.label.toLowerCase()}`, t.label)}\n </button>\n );\n })}\n </div>\n\n {/* Search and Filters */}\n <div className=\"flex gap-4\">\n {/* Search */}\n <SearchInput\n value={searchQuery}\n onChange={(v) => {\n // Reset to page 1 synchronously with the keystroke: by the time the\n // debounced query fires, the offset is already 0 — one fetch with the\n // correct slice, no stale-offset/empty window from a post-debounce reset.\n setSearchQuery(v);\n setPage(0);\n }}\n placeholder={tr('contentPages.searchPlaceholder', 'Search content pages...')}\n className=\"flex-1\"\n />\n\n {/* Published Filter */}\n <select\n value={filter.isPublished === undefined ? '' : filter.isPublished ? 'published' : 'all'}\n onChange={(e) => {\n setFilter({\n ...filter,\n isPublished: e.target.value === 'published' ? true : undefined,\n });\n setPage(0);\n }}\n className=\"\n px-4 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n transition-all duration-200\n \n scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"\">{tr('contentPages.filterAll', 'All')}</option>\n <option value=\"published\">{tr('contentPages.publishedOnly', 'Published Only')}</option>\n </select>\n\n {/* Refresh */}\n <button\n type=\"button\"\n onClick={() => refetch()}\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 \"\n >\n <RefreshCw size={18} />\n </button>\n\n {/* Export */}\n {contentPages.length > 0 && (\n <button\n type=\"button\"\n onClick={() =>\n exportToCsv(\n 'content-pages',\n contentPages.map((p) => ({\n id: p.id,\n slug: p.slug,\n title: p.title,\n isPublished: p.isPublished,\n contentFormat: p.contentFormat,\n tags: (p.tags ?? []).join(', '),\n sortOrder: p.sortOrder,\n productId: p.productId ?? '',\n createdAt: p.createdAt,\n updatedAt: p.updatedAt,\n }))\n )\n }\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 \"\n title={tr('contentPages.exportCsv', 'Export as CSV')}\n >\n <Download size={18} />\n </button>\n )}\n </div>\n </div>\n\n {/* Body — header above stays mounted across refetches so the search keeps focus. */}\n {error ? (\n <ErrorState\n message={error.message}\n action={{ label: tr('productCommon.retry', 'Retry'), onClick: () => refetch() }}\n />\n ) : loading && contentPages.length === 0 ? (\n <LoadingState\n message={tr('contentPages.loadingContentPages', 'Loading content pages...')}\n />\n ) : contentPages.length === 0 ? (\n <GlassCard treatment=\"insight\" className=\"animate-in fade-in duration-200\">\n <IllustratedEmptyState\n illustration={\n searchQuery || filter.tag || filter.isPublished ? 'empty-search' : 'empty-files'\n }\n title={tr('contentPages.noContentPagesFound', 'No content pages found')}\n action={\n <Button type=\"button\" onClick={() => navigate(`${contentPagesBasePath}/new`)}>\n <Plus className=\"size-4\" />\n {tr('contentPages.newPage', 'New Page')}\n </Button>\n }\n />\n </GlassCard>\n ) : (\n <GlassCard treatment=\"glass\" glow className=\"overflow-hidden p-0\">\n <table className=\"w-full\">\n <thead className=\"bg-bg-sunken/60 border-b border-border-seam\">\n <tr>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnPage', 'Page')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnSlug', 'Slug')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnStatus', 'Status')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnVersion', 'Version')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnLastUpdated', 'Last Updated')}\n </th>\n <th className=\"text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('contentPages.columnActions', 'Actions')}\n </th>\n </tr>\n </thead>\n <tbody className=\"divide-y divide-border-seam\">\n {contentPages.map((page) => (\n <tr\n key={page.id}\n className=\"hover:bg-bg-sunken/70 transition-colors duration-200 cursor-pointer\"\n onClick={() => navigate(`${contentPagesBasePath}/${page.id}`)}\n >\n <td className=\"px-6 py-4\">\n <div className=\"flex items-center gap-3\">\n <div className=\"size-10 rounded-lg bg-[var(--color-status-info-subtle)] flex items-center justify-center\">\n <FileText size={20} className=\"text-[var(--color-status-info)]\" />\n </div>\n <div>\n <p className=\"font-medium text-text-primary\">{page.title}</p>\n </div>\n </div>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-tertiary font-mono\">/{page.slug}</span>\n </td>\n <td className=\"px-6 py-4\">\n <ContentPageStatusBadge isPublished={page.isPublished} />\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-primary font-mono\">v{page.version}</span>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-secondary\">\n {formatDate(page.lastUpdated || page.updatedAt)}\n </span>\n </td>\n <td className=\"px-6 py-4\">\n <div\n className=\"flex items-center justify-end gap-2\"\n onClick={(e) => e.stopPropagation()}\n >\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/${page.id}`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('contentPages.viewDetails', 'View details')}\n >\n <Eye size={18} />\n </button>\n <PermissionGate role=\"super_admin\">\n <button\n type=\"button\"\n onClick={() => navigate(`${contentPagesBasePath}/${page.id}/edit`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('contentPages.edit', 'Edit')}\n >\n <SquarePen size={18} />\n </button>\n <button\n type=\"button\"\n onClick={() => handleDelete(page.id)}\n disabled={deleteLoading}\n className=\"p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50\"\n title={tr('contentPages.delete', 'Delete')}\n >\n <Trash2 size={18} />\n </button>\n </PermissionGate>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n\n {/* Pagination — hidden when total fits on one page to avoid always-disabled buttons. */}\n {total > PAGE_SIZE && (\n <div className=\"flex items-center justify-between px-6 py-3 border-t border-border-seam bg-bg-sunken/40\">\n <p className=\"text-sm text-text-secondary\">\n {tr('contentPages.showing', 'Showing')} {showingFrom}–{showingTo}{' '}\n {tr('contentPages.of', 'of')} {total}{' '}\n {tr('contentPages.contentPages', 'content pages')}\n </p>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => setPage((p) => Math.max(0, p - 1))}\n disabled={page === 0 || loading}\n aria-label={tr('contentPages.prevPage', 'Previous page')}\n className=\"\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n \"\n >\n <ChevronLeft size={16} />\n {tr('contentPages.prev', 'Prev')}\n </button>\n <span className=\"text-sm text-text-secondary px-2 tabular-nums\">\n {page + 1} / {totalPages}\n </span>\n {/* Belt-and-suspenders: `page+1 >= totalPages` alone is enough when backend `total` is reliable; `!hasMore` guards against stale/lying counts. */}\n <button\n type=\"button\"\n onClick={() => setPage((p) => p + 1)}\n disabled={(!hasMore && page + 1 >= totalPages) || loading}\n aria-label={tr('contentPages.nextPage', 'Next page')}\n className=\"\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n \"\n >\n {tr('contentPages.next', 'Next')}\n <ChevronRight size={16} />\n </button>\n </div>\n </div>\n )}\n </GlassCard>\n )}\n {ConfirmDialog}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmCA,IAAMA,IAA8C;CAClD;EAAE,OAAO;EAAO,KAAK;CAAG;CACxB;EAAE,OAAO;EAAQ,KAAK;CAAO;CAC7B;EAAE,OAAO;EAAS,KAAK;CAAQ;CAC/B;EAAE,OAAO;EAAQ,KAAK;CAAO;CAC7B;EAAE,OAAO;EAAS,KAAK;CAAQ;CAC/B;EAAE,OAAO;EAAS,KAAK;CAAO;AAChC,GAEMC,IAAY;AAElB,SAAgBC,IAAuB;CACrC,IAAM,EAAE,aAAU,cAAW,gBAAgBC,EAAkB,GACzDC,IAAuB,GAAGC,EAAS,iBACnC,CAACC,GAAaC,KAAkBC,EAAS,EAAE,GAE3CC,IAAuBC,EAAaJ,GAAa,GAAG,GACpDK,IAAKC,EAAM,GACX,CAACC,GAAQC,KAAaN,EAAiC,CAAC,CAAC,GACzD,CAACO,GAAMC,KAAWR,EAAS,CAAC,GAE5B,EAAE,iBAAc,UAAO,YAAS,YAAS,UAAO,eAAYS,EAChE,KAAA,GACA;EAAE,GAAGJ;EAAQ,QAAQJ,KAAwB,KAAA;CAAU,GACvD;EAAE,OAAOR;EAAW,QAAQc,IAAOd;CAAU,CAC/C,GAEMiB,IAAa,KAAK,IAAI,GAAG,KAAK,KAAKC,IAAQlB,CAAS,CAAC,GAErDmB,IAAcL,IAAOd,IAAY,GACjCoB,IA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