@burdenoff/microfe-product 2026.525.3 → 2026.525.4
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-management/modules/content-pages/pages/ContentPagesListPage.d.ts.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +147 -152
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.d.ts.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +114 -119
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.d.ts.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +136 -141
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
- package/dist/product-management/shared/hooks/useDebounced.d.ts +6 -0
- package/dist/product-management/shared/hooks/useDebounced.d.ts.map +1 -0
- package/dist/product-management/shared/hooks/useDebounced.js +13 -0
- package/dist/product-management/shared/hooks/useDebounced.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPagesListPage.d.ts","sourceRoot":"","sources":["../../../../../src/product-management/modules/content-pages/pages/ContentPagesListPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentPagesListPage.d.ts","sourceRoot":"","sources":["../../../../../src/product-management/modules/content-pages/pages/ContentPagesListPage.tsx"],"names":[],"mappings":"AAqCA,wBAAgB,oBAAoB,4CAwYnC"}
|
|
@@ -7,12 +7,13 @@ import { exportToCsv as a } from "../../../shared/utils/exportUtils.js";
|
|
|
7
7
|
import { nativeConfirm as o, nativeImpact as s, nativeNotify as c } from "../../../../utils/nativeBridge.js";
|
|
8
8
|
import { useContentPages as l, useDeleteContentPage as u } from "../hooks/useContentPages.js";
|
|
9
9
|
import { ContentPageStatusBadge as d } from "../components/ContentPageStatusBadge.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
10
|
+
import { useDebounced as f } from "../../../shared/hooks/useDebounced.js";
|
|
11
|
+
import { useEffect as p, useState as m } from "react";
|
|
12
|
+
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 C } from "lucide-react";
|
|
13
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
14
|
+
import { PermissionGate as E } from "@burdenoff/fe-libs/shared/components";
|
|
14
15
|
//#region src/product-management/modules/content-pages/pages/ContentPagesListPage.tsx
|
|
15
|
-
var
|
|
16
|
+
var D = [
|
|
16
17
|
{
|
|
17
18
|
label: "All",
|
|
18
19
|
tag: ""
|
|
@@ -37,124 +38,112 @@ var E = [
|
|
|
37
38
|
label: "Pages",
|
|
38
39
|
tag: "page"
|
|
39
40
|
}
|
|
40
|
-
],
|
|
41
|
-
function
|
|
42
|
-
let { navigate:
|
|
43
|
-
...
|
|
44
|
-
search:
|
|
41
|
+
], O = 20;
|
|
42
|
+
function k() {
|
|
43
|
+
let { navigate: k, basePath: A = "/products" } = t(), j = `${A}/content-pages`, [M, N] = m(""), P = f(M, 300), F = e(), [I, L] = m({}), [R, z] = m(0), { contentPages: B, total: V, hasMore: H, loading: U, error: W, refetch: G } = l(void 0, {
|
|
44
|
+
...I,
|
|
45
|
+
search: P || void 0
|
|
45
46
|
}, {
|
|
46
|
-
limit:
|
|
47
|
-
offset:
|
|
48
|
-
}),
|
|
49
|
-
|
|
50
|
-
if (
|
|
51
|
-
|
|
47
|
+
limit: O,
|
|
48
|
+
offset: R * O
|
|
49
|
+
}), K = Math.max(1, Math.ceil(V / O)), q = R * O + 1, J = Math.min((R + 1) * O, V);
|
|
50
|
+
p(() => {
|
|
51
|
+
if (V === 0) {
|
|
52
|
+
z(0);
|
|
52
53
|
return;
|
|
53
54
|
}
|
|
54
|
-
let e = Math.ceil(
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
-
let { deleteContentPage:
|
|
55
|
+
let e = Math.ceil(V / O) - 1;
|
|
56
|
+
z((t) => t > e ? e : t);
|
|
57
|
+
}, [V]);
|
|
58
|
+
let { deleteContentPage: Y, loading: X } = u(), Z = async (e) => {
|
|
58
59
|
s("medium");
|
|
59
|
-
let t =
|
|
60
|
+
let t = F("contentPages.confirmDelete", "Are you sure you want to delete this content page?"), n = await o({
|
|
60
61
|
title: "Delete content page",
|
|
61
62
|
message: t,
|
|
62
63
|
okButtonTitle: "Delete",
|
|
63
64
|
cancelButtonTitle: "Cancel"
|
|
64
65
|
});
|
|
65
66
|
if (n === null ? window.confirm(t) : n) try {
|
|
66
|
-
await
|
|
67
|
+
await Y(e), c("success"), G();
|
|
67
68
|
} catch (e) {
|
|
68
69
|
c("error"), console.error("Failed to delete content page:", e);
|
|
69
70
|
}
|
|
70
|
-
},
|
|
71
|
+
}, Q = (e) => e ? new Date(e).toLocaleDateString("en-US", {
|
|
71
72
|
year: "numeric",
|
|
72
73
|
month: "short",
|
|
73
74
|
day: "numeric"
|
|
74
75
|
}) : "—";
|
|
75
|
-
return
|
|
76
|
-
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
77
|
-
children: /* @__PURE__ */ C(n, { message: N("contentPages.loadingContentPages", "Loading content pages...") })
|
|
78
|
-
}) : H ? /* @__PURE__ */ C("div", {
|
|
79
|
-
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
80
|
-
children: /* @__PURE__ */ C(r, {
|
|
81
|
-
message: H.message,
|
|
82
|
-
action: {
|
|
83
|
-
label: N("productCommon.retry", "Retry"),
|
|
84
|
-
onClick: () => U()
|
|
85
|
-
}
|
|
86
|
-
})
|
|
87
|
-
}) : /* @__PURE__ */ w("div", {
|
|
76
|
+
return /* @__PURE__ */ T("div", {
|
|
88
77
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-300",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ T("div", {
|
|
90
79
|
className: "mb-6",
|
|
91
80
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ T("div", {
|
|
93
82
|
className: "flex items-center justify-between mb-4",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
83
|
+
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h1", {
|
|
95
84
|
className: "text-3xl font-bold text-text-primary mb-2",
|
|
96
|
-
children:
|
|
97
|
-
}), /* @__PURE__ */
|
|
85
|
+
children: F("contentPages.title", "Content Pages")
|
|
86
|
+
}), /* @__PURE__ */ w("p", {
|
|
98
87
|
className: "text-text-secondary",
|
|
99
|
-
children:
|
|
100
|
-
})] }), /* @__PURE__ */
|
|
88
|
+
children: F("contentPages.subtitle", "Manage content pages and documentation")
|
|
89
|
+
})] }), /* @__PURE__ */ w(E, {
|
|
101
90
|
role: "super_admin",
|
|
102
|
-
children: /* @__PURE__ */
|
|
103
|
-
onClick: () =>
|
|
91
|
+
children: /* @__PURE__ */ T("button", {
|
|
92
|
+
onClick: () => k(`${j}/new`),
|
|
104
93
|
className: "\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90 hover:scale-[1.02]\n transition-all duration-200\n font-medium\n ",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ w(b, { size: 20 }), F("contentPages.newPage", "New Page")]
|
|
106
95
|
})
|
|
107
96
|
})]
|
|
108
97
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ w("div", {
|
|
110
99
|
className: "flex flex-wrap gap-1 border-b border-default pb-px",
|
|
111
|
-
children:
|
|
100
|
+
children: D.map((e) => /* @__PURE__ */ w("button", {
|
|
112
101
|
type: "button",
|
|
113
102
|
onClick: () => {
|
|
114
|
-
|
|
115
|
-
...
|
|
103
|
+
L({
|
|
104
|
+
...I,
|
|
116
105
|
tag: e.tag || void 0
|
|
117
|
-
}),
|
|
106
|
+
}), z(0);
|
|
118
107
|
},
|
|
119
|
-
className: `px-4 py-2 rounded-t-lg text-sm font-medium transition-all border-b-2 ${(
|
|
120
|
-
children:
|
|
108
|
+
className: `px-4 py-2 rounded-t-lg text-sm font-medium transition-all border-b-2 ${(I.tag ?? "") === e.tag ? "border-[var(--color-action-primary-bg)] text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"}`,
|
|
109
|
+
children: F(`contentPages.tab.${e.label.toLowerCase()}`, e.label)
|
|
121
110
|
}, e.label))
|
|
122
111
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ T("div", {
|
|
124
113
|
className: "flex gap-4",
|
|
125
114
|
children: [
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
value:
|
|
115
|
+
/* @__PURE__ */ w(i, {
|
|
116
|
+
value: M,
|
|
128
117
|
onChange: (e) => {
|
|
129
|
-
|
|
118
|
+
N(e), z(0);
|
|
130
119
|
},
|
|
131
|
-
placeholder:
|
|
120
|
+
placeholder: F("contentPages.searchPlaceholder", "Search content pages..."),
|
|
132
121
|
className: "flex-1"
|
|
133
122
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
value:
|
|
123
|
+
/* @__PURE__ */ T("select", {
|
|
124
|
+
value: I.isPublished === void 0 ? "" : I.isPublished ? "published" : "all",
|
|
136
125
|
onChange: (e) => {
|
|
137
|
-
|
|
138
|
-
...
|
|
126
|
+
L({
|
|
127
|
+
...I,
|
|
139
128
|
isPublished: e.target.value === "published" ? !0 : void 0
|
|
140
|
-
}),
|
|
129
|
+
}), z(0);
|
|
141
130
|
},
|
|
142
131
|
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 ",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ w("option", {
|
|
144
133
|
value: "",
|
|
145
|
-
children:
|
|
146
|
-
}), /* @__PURE__ */
|
|
134
|
+
children: F("contentPages.filterAll", "All")
|
|
135
|
+
}), /* @__PURE__ */ w("option", {
|
|
147
136
|
value: "published",
|
|
148
|
-
children:
|
|
137
|
+
children: F("contentPages.publishedOnly", "Published Only")
|
|
149
138
|
})]
|
|
150
139
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
onClick: () =>
|
|
140
|
+
/* @__PURE__ */ w("button", {
|
|
141
|
+
onClick: () => G(),
|
|
153
142
|
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-muted\n transition-all duration-200\n ",
|
|
154
|
-
children: /* @__PURE__ */
|
|
143
|
+
children: /* @__PURE__ */ w(x, { size: 18 })
|
|
155
144
|
}),
|
|
156
|
-
|
|
157
|
-
onClick: () => a("content-pages",
|
|
145
|
+
B.length > 0 && /* @__PURE__ */ w("button", {
|
|
146
|
+
onClick: () => a("content-pages", B.map((e) => ({
|
|
158
147
|
id: e.id,
|
|
159
148
|
slug: e.slug,
|
|
160
149
|
title: e.title,
|
|
@@ -167,124 +156,130 @@ function O() {
|
|
|
167
156
|
updatedAt: e.updatedAt
|
|
168
157
|
}))),
|
|
169
158
|
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-muted\n transition-all duration-200\n ",
|
|
170
|
-
title:
|
|
171
|
-
children: /* @__PURE__ */
|
|
159
|
+
title: F("contentPages.exportCsv", "Export as CSV"),
|
|
160
|
+
children: /* @__PURE__ */ w(_, { size: 18 })
|
|
172
161
|
})
|
|
173
162
|
]
|
|
174
163
|
})
|
|
175
164
|
]
|
|
176
|
-
}),
|
|
165
|
+
}), W ? /* @__PURE__ */ w(r, {
|
|
166
|
+
message: W.message,
|
|
167
|
+
action: {
|
|
168
|
+
label: F("productCommon.retry", "Retry"),
|
|
169
|
+
onClick: () => G()
|
|
170
|
+
}
|
|
171
|
+
}) : U && B.length === 0 ? /* @__PURE__ */ w(n, { message: F("contentPages.loadingContentPages", "Loading content pages...") }) : B.length === 0 ? /* @__PURE__ */ T("div", {
|
|
177
172
|
className: "bg-surface border border-default rounded-lg p-12 text-center animate-in fade-in duration-300",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ w("p", {
|
|
179
174
|
className: "text-text-secondary mb-4",
|
|
180
|
-
children:
|
|
181
|
-
}), /* @__PURE__ */
|
|
182
|
-
onClick: () =>
|
|
175
|
+
children: F("contentPages.noContentPagesFound", "No content pages found")
|
|
176
|
+
}), /* @__PURE__ */ T("button", {
|
|
177
|
+
onClick: () => k(`${j}/new`),
|
|
183
178
|
className: "\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90 hover:scale-[1.02]\n transition-all duration-200\n font-medium\n ",
|
|
184
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ w(b, { size: 20 }), F("contentPages.newPage", "New Page")]
|
|
185
180
|
})]
|
|
186
|
-
}) : /* @__PURE__ */
|
|
181
|
+
}) : /* @__PURE__ */ T("div", {
|
|
187
182
|
className: "bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)] overflow-hidden",
|
|
188
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ T("table", {
|
|
189
184
|
className: "w-full",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
185
|
+
children: [/* @__PURE__ */ w("thead", {
|
|
191
186
|
className: "bg-muted border-b border-default",
|
|
192
|
-
children: /* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
187
|
+
children: /* @__PURE__ */ T("tr", { children: [
|
|
188
|
+
/* @__PURE__ */ w("th", {
|
|
194
189
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
195
|
-
children:
|
|
190
|
+
children: F("contentPages.columnPage", "Page")
|
|
196
191
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ w("th", {
|
|
198
193
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
199
|
-
children:
|
|
194
|
+
children: F("contentPages.columnSlug", "Slug")
|
|
200
195
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ w("th", {
|
|
202
197
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
203
|
-
children:
|
|
198
|
+
children: F("contentPages.columnStatus", "Status")
|
|
204
199
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ w("th", {
|
|
206
201
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
207
|
-
children:
|
|
202
|
+
children: F("contentPages.columnVersion", "Version")
|
|
208
203
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ w("th", {
|
|
210
205
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
211
|
-
children:
|
|
206
|
+
children: F("contentPages.columnLastUpdated", "Last Updated")
|
|
212
207
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ w("th", {
|
|
214
209
|
className: "text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
215
|
-
children:
|
|
210
|
+
children: F("contentPages.columnActions", "Actions")
|
|
216
211
|
})
|
|
217
212
|
] })
|
|
218
|
-
}), /* @__PURE__ */
|
|
213
|
+
}), /* @__PURE__ */ w("tbody", {
|
|
219
214
|
className: "divide-y divide-[var(--color-border-default)]",
|
|
220
|
-
children:
|
|
215
|
+
children: B.map((e) => /* @__PURE__ */ T("tr", {
|
|
221
216
|
className: "hover:bg-muted transition-all duration-200 cursor-pointer",
|
|
222
|
-
onClick: () =>
|
|
217
|
+
onClick: () => k(`${j}/${e.id}`),
|
|
223
218
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ w("td", {
|
|
225
220
|
className: "px-6 py-4",
|
|
226
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ T("div", {
|
|
227
222
|
className: "flex items-center gap-3",
|
|
228
|
-
children: [/* @__PURE__ */
|
|
223
|
+
children: [/* @__PURE__ */ w("div", {
|
|
229
224
|
className: "w-10 h-10 rounded-lg bg-[var(--color-status-info-subtle)] flex items-center justify-center",
|
|
230
|
-
children: /* @__PURE__ */
|
|
225
|
+
children: /* @__PURE__ */ w(y, {
|
|
231
226
|
size: 20,
|
|
232
227
|
className: "text-[var(--color-status-info)]"
|
|
233
228
|
})
|
|
234
|
-
}), /* @__PURE__ */
|
|
229
|
+
}), /* @__PURE__ */ w("div", { children: /* @__PURE__ */ w("p", {
|
|
235
230
|
className: "font-medium text-text-primary",
|
|
236
231
|
children: e.title
|
|
237
232
|
}) })]
|
|
238
233
|
})
|
|
239
234
|
}),
|
|
240
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ w("td", {
|
|
241
236
|
className: "px-6 py-4",
|
|
242
|
-
children: /* @__PURE__ */
|
|
237
|
+
children: /* @__PURE__ */ T("span", {
|
|
243
238
|
className: "text-sm text-text-tertiary font-mono",
|
|
244
239
|
children: ["/", e.slug]
|
|
245
240
|
})
|
|
246
241
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ w("td", {
|
|
248
243
|
className: "px-6 py-4",
|
|
249
|
-
children: /* @__PURE__ */
|
|
244
|
+
children: /* @__PURE__ */ w(d, { isPublished: e.isPublished })
|
|
250
245
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ w("td", {
|
|
252
247
|
className: "px-6 py-4",
|
|
253
|
-
children: /* @__PURE__ */
|
|
248
|
+
children: /* @__PURE__ */ T("span", {
|
|
254
249
|
className: "text-sm text-text-primary font-mono",
|
|
255
250
|
children: ["v", e.version]
|
|
256
251
|
})
|
|
257
252
|
}),
|
|
258
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ w("td", {
|
|
259
254
|
className: "px-6 py-4",
|
|
260
|
-
children: /* @__PURE__ */
|
|
255
|
+
children: /* @__PURE__ */ w("span", {
|
|
261
256
|
className: "text-sm text-text-secondary",
|
|
262
|
-
children:
|
|
257
|
+
children: Q(e.lastUpdated || e.updatedAt)
|
|
263
258
|
})
|
|
264
259
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ w("td", {
|
|
266
261
|
className: "px-6 py-4",
|
|
267
|
-
children: /* @__PURE__ */
|
|
262
|
+
children: /* @__PURE__ */ T("div", {
|
|
268
263
|
className: "flex items-center justify-end gap-2",
|
|
269
264
|
onClick: (e) => e.stopPropagation(),
|
|
270
|
-
children: [/* @__PURE__ */
|
|
271
|
-
onClick: () =>
|
|
265
|
+
children: [/* @__PURE__ */ w("button", {
|
|
266
|
+
onClick: () => k(`${j}/${e.id}`),
|
|
272
267
|
className: "p-2 rounded-lg text-text-secondary hover:bg-muted transition-all duration-200",
|
|
273
|
-
title:
|
|
274
|
-
children: /* @__PURE__ */
|
|
275
|
-
}), /* @__PURE__ */
|
|
268
|
+
title: F("contentPages.viewDetails", "View details"),
|
|
269
|
+
children: /* @__PURE__ */ w(v, { size: 18 })
|
|
270
|
+
}), /* @__PURE__ */ T(E, {
|
|
276
271
|
role: "super_admin",
|
|
277
|
-
children: [/* @__PURE__ */
|
|
278
|
-
onClick: () =>
|
|
272
|
+
children: [/* @__PURE__ */ w("button", {
|
|
273
|
+
onClick: () => k(`${j}/${e.id}/edit`),
|
|
279
274
|
className: "p-2 rounded-lg text-text-secondary hover:bg-muted transition-all duration-200",
|
|
280
|
-
title:
|
|
281
|
-
children: /* @__PURE__ */
|
|
282
|
-
}), /* @__PURE__ */
|
|
283
|
-
onClick: () =>
|
|
284
|
-
disabled:
|
|
275
|
+
title: F("contentPages.edit", "Edit"),
|
|
276
|
+
children: /* @__PURE__ */ w(S, { size: 18 })
|
|
277
|
+
}), /* @__PURE__ */ w("button", {
|
|
278
|
+
onClick: () => Z(e.id),
|
|
279
|
+
disabled: X,
|
|
285
280
|
className: "p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50",
|
|
286
|
-
title:
|
|
287
|
-
children: /* @__PURE__ */ C
|
|
281
|
+
title: F("contentPages.delete", "Delete"),
|
|
282
|
+
children: /* @__PURE__ */ w(C, { size: 18 })
|
|
288
283
|
})]
|
|
289
284
|
})]
|
|
290
285
|
})
|
|
@@ -292,49 +287,49 @@ function O() {
|
|
|
292
287
|
]
|
|
293
288
|
}, e.id))
|
|
294
289
|
})]
|
|
295
|
-
}),
|
|
290
|
+
}), V > O && /* @__PURE__ */ T("div", {
|
|
296
291
|
className: "flex items-center justify-between px-6 py-3 border-t border-default bg-muted/50",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
292
|
+
children: [/* @__PURE__ */ T("p", {
|
|
298
293
|
className: "text-sm text-text-secondary",
|
|
299
294
|
children: [
|
|
300
|
-
|
|
295
|
+
F("contentPages.showing", "Showing"),
|
|
301
296
|
" ",
|
|
302
|
-
|
|
297
|
+
q,
|
|
303
298
|
"–",
|
|
304
|
-
|
|
299
|
+
J,
|
|
305
300
|
" ",
|
|
306
|
-
|
|
301
|
+
F("contentPages.of", "of"),
|
|
307
302
|
" ",
|
|
308
|
-
|
|
303
|
+
V,
|
|
309
304
|
" ",
|
|
310
|
-
|
|
305
|
+
F("contentPages.contentPages", "content pages")
|
|
311
306
|
]
|
|
312
|
-
}), /* @__PURE__ */
|
|
307
|
+
}), /* @__PURE__ */ T("div", {
|
|
313
308
|
className: "flex items-center gap-2",
|
|
314
309
|
children: [
|
|
315
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ T("button", {
|
|
316
311
|
type: "button",
|
|
317
|
-
onClick: () =>
|
|
318
|
-
disabled:
|
|
319
|
-
"aria-label":
|
|
312
|
+
onClick: () => z((e) => Math.max(0, e - 1)),
|
|
313
|
+
disabled: R === 0 || U,
|
|
314
|
+
"aria-label": F("contentPages.prevPage", "Previous page"),
|
|
320
315
|
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-muted transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n ",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ w(h, { size: 16 }), F("contentPages.prev", "Prev")]
|
|
322
317
|
}),
|
|
323
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ T("span", {
|
|
324
319
|
className: "text-sm text-text-secondary px-2",
|
|
325
320
|
children: [
|
|
326
|
-
|
|
321
|
+
R + 1,
|
|
327
322
|
" / ",
|
|
328
|
-
|
|
323
|
+
K
|
|
329
324
|
]
|
|
330
325
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ T("button", {
|
|
332
327
|
type: "button",
|
|
333
|
-
onClick: () =>
|
|
334
|
-
disabled: !
|
|
335
|
-
"aria-label":
|
|
328
|
+
onClick: () => z((e) => e + 1),
|
|
329
|
+
disabled: !H && R + 1 >= K || U,
|
|
330
|
+
"aria-label": F("contentPages.nextPage", "Next page"),
|
|
336
331
|
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-muted transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n ",
|
|
337
|
-
children: [
|
|
332
|
+
children: [F("contentPages.next", "Next"), /* @__PURE__ */ w(g, { size: 16 })]
|
|
338
333
|
})
|
|
339
334
|
]
|
|
340
335
|
})]
|
|
@@ -343,6 +338,6 @@ function O() {
|
|
|
343
338
|
});
|
|
344
339
|
}
|
|
345
340
|
//#endregion
|
|
346
|
-
export {
|
|
341
|
+
export { k as ContentPagesListPage };
|
|
347
342
|
|
|
348
343
|
//# sourceMappingURL=ContentPagesListPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPagesListPage.js","names":[],"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 { useTr } from '../../../shared/hooks/useTr';\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';\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 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: searchQuery || 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\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 = native === null ? window.confirm(message) : 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 if (loading) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <LoadingState\n message={tr('contentPages.loadingContentPages', 'Loading content pages...')}\n />\n </div>\n );\n }\n\n if (error) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState\n message={error.message}\n action={{\n label: tr('productCommon.retry', 'Retry'),\n onClick: () => refetch(),\n }}\n />\n </div>\n );\n }\n\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-300\">\n {/* Page Header */}\n <div className=\"mb-6\">\n <div className=\"flex items-center justify-between mb-4\">\n <div>\n <h1 className=\"text-3xl font-bold text-text-primary mb-2\">\n {tr('contentPages.title', 'Content Pages')}\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 <button\n onClick={() => navigate(`${contentPagesBasePath}/new`)}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90 hover:scale-[1.02]\n transition-all duration-200\n font-medium\n \"\n >\n <Plus size={20} />\n {tr('contentPages.newPage', 'New Page')}\n </button>\n </PermissionGate>\n </div>\n\n {/* Type tabs */}\n <div className=\"flex flex-wrap gap-1 border-b border-default 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 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 >\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 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-muted\n transition-all duration-200\n \"\n >\n <RefreshCw size={18} />\n </button>\n\n {/* Export */}\n {contentPages.length > 0 && (\n <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-muted\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 {/* Content Pages Table */}\n {contentPages.length === 0 ? (\n <div className=\"bg-surface border border-default rounded-lg p-12 text-center animate-in fade-in duration-300\">\n <p className=\"text-text-secondary mb-4\">\n {tr('contentPages.noContentPagesFound', 'No content pages found')}\n </p>\n <button\n onClick={() => navigate(`${contentPagesBasePath}/new`)}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90 hover:scale-[1.02]\n transition-all duration-200\n font-medium\n \"\n >\n <Plus size={20} />\n {tr('contentPages.newPage', 'New Page')}\n </button>\n </div>\n ) : (\n <div className=\"bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)] overflow-hidden\">\n <table className=\"w-full\">\n <thead className=\"bg-muted border-b border-default\">\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-[var(--color-border-default)]\">\n {contentPages.map((page) => (\n <tr\n key={page.id}\n className=\"hover:bg-muted transition-all 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=\"w-10 h-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 onClick={() => navigate(`${contentPagesBasePath}/${page.id}`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-muted 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 onClick={() => navigate(`${contentPagesBasePath}/${page.id}/edit`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-muted transition-all duration-200\"\n title={tr('contentPages.edit', 'Edit')}\n >\n <SquarePen size={18} />\n </button>\n <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-default bg-muted/50\">\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-muted 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\">\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-muted 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 </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAyBA,IAAM,IAA8C;CAClD;EAAE,OAAO;EAAO,KAAK;EAAI;CACzB;EAAE,OAAO;EAAQ,KAAK;EAAQ;CAC9B;EAAE,OAAO;EAAS,KAAK;EAAS;CAChC;EAAE,OAAO;EAAQ,KAAK;EAAQ;CAC9B;EAAE,OAAO;EAAS,KAAK;EAAS;CAChC;EAAE,OAAO;EAAS,KAAK;EAAQ;CAChC,EAEK,IAAY;AAElB,SAAgB,IAAuB;CACrC,IAAM,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAuB,GAAG,EAAS,iBACnC,CAAC,GAAa,KAAkB,EAAS,GAAG,EAC5C,IAAK,GAAO,EACZ,CAAC,GAAQ,KAAa,EAAiC,EAAE,CAAC,EAC1D,CAAC,GAAM,KAAW,EAAS,EAAE,EAE7B,EAAE,iBAAc,UAAO,YAAS,YAAS,UAAO,eAAY,EAChE,KAAA,GACA;EAAE,GAAG;EAAQ,QAAQ,KAAe,KAAA;EAAW,EAC/C;EAAE,OAAO;EAAW,QAAQ,IAAO;EAAW,CAC/C,EAEK,IAAa,KAAK,IAAI,GAAG,KAAK,KAAK,IAAQ,EAAU,CAAC,EAEtD,IAAc,IAAO,IAAY,GACjC,IAAY,KAAK,KAAK,IAAO,KAAK,GAAW,EAAM;AAGzD,SAAgB;AACd,MAAI,MAAU,GAAG;AACf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../../../../../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 { 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';\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\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 = native === null ? window.confirm(message) : 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-300\">\n {/* Page Header */}\n <div className=\"mb-6\">\n <div className=\"flex items-center justify-between mb-4\">\n <div>\n <h1 className=\"text-3xl font-bold text-text-primary mb-2\">\n {tr('contentPages.title', 'Content Pages')}\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 <button\n onClick={() => navigate(`${contentPagesBasePath}/new`)}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90 hover:scale-[1.02]\n transition-all duration-200\n font-medium\n \"\n >\n <Plus size={20} />\n {tr('contentPages.newPage', 'New Page')}\n </button>\n </PermissionGate>\n </div>\n\n {/* Type tabs */}\n <div className=\"flex flex-wrap gap-1 border-b border-default 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 >\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 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-muted\n transition-all duration-200\n \"\n >\n <RefreshCw size={18} />\n </button>\n\n {/* Export */}\n {contentPages.length > 0 && (\n <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-muted\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 <div className=\"bg-surface border border-default rounded-lg p-12 text-center animate-in fade-in duration-300\">\n <p className=\"text-text-secondary mb-4\">\n {tr('contentPages.noContentPagesFound', 'No content pages found')}\n </p>\n <button\n onClick={() => navigate(`${contentPagesBasePath}/new`)}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90 hover:scale-[1.02]\n transition-all duration-200\n font-medium\n \"\n >\n <Plus size={20} />\n {tr('contentPages.newPage', 'New Page')}\n </button>\n </div>\n ) : (\n <div className=\"bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)] overflow-hidden\">\n <table className=\"w-full\">\n <thead className=\"bg-muted border-b border-default\">\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-[var(--color-border-default)]\">\n {contentPages.map((page) => (\n <tr\n key={page.id}\n className=\"hover:bg-muted transition-all 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=\"w-10 h-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 onClick={() => navigate(`${contentPagesBasePath}/${page.id}`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-muted 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 onClick={() => navigate(`${contentPagesBasePath}/${page.id}/edit`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-muted transition-all duration-200\"\n title={tr('contentPages.edit', 'Edit')}\n >\n <SquarePen size={18} />\n </button>\n <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-default bg-muted/50\">\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-muted 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\">\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-muted 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 </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,IAAM,IAA8C;CAClD;EAAE,OAAO;EAAO,KAAK;EAAI;CACzB;EAAE,OAAO;EAAQ,KAAK;EAAQ;CAC9B;EAAE,OAAO;EAAS,KAAK;EAAS;CAChC;EAAE,OAAO;EAAQ,KAAK;EAAQ;CAC9B;EAAE,OAAO;EAAS,KAAK;EAAS;CAChC;EAAE,OAAO;EAAS,KAAK;EAAQ;CAChC,EAEK,IAAY;AAElB,SAAgB,IAAuB;CACrC,IAAM,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAuB,GAAG,EAAS,iBACnC,CAAC,GAAa,KAAkB,EAAS,GAAG,EAE5C,IAAuB,EAAa,GAAa,IAAI,EACrD,IAAK,GAAO,EACZ,CAAC,GAAQ,KAAa,EAAiC,EAAE,CAAC,EAC1D,CAAC,GAAM,KAAW,EAAS,EAAE,EAE7B,EAAE,iBAAc,UAAO,YAAS,YAAS,UAAO,eAAY,EAChE,KAAA,GACA;EAAE,GAAG;EAAQ,QAAQ,KAAwB,KAAA;EAAW,EACxD;EAAE,OAAO;EAAW,QAAQ,IAAO;EAAW,CAC/C,EAEK,IAAa,KAAK,IAAI,GAAG,KAAK,KAAK,IAAQ,EAAU,CAAC,EAEtD,IAAc,IAAO,IAAY,GACjC,IAAY,KAAK,KAAK,IAAO,KAAK,GAAW,EAAM;AAGzD,SAAgB;AACd,MAAI,MAAU,GAAG;AACf,KAAQ,EAAE;AACV;;EAEF,IAAM,IAAW,KAAK,KAAK,IAAQ,EAAU,GAAG;AAChD,KAAS,MAAa,I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EAAa,EAAK,GAAG;WACpC,UAAU;WACV,WAAU;WACV,OAAO,EAAG,uBAAuB,SAAS;qBAE1C,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;WACb,CAAA,CACM;YACb;;QACH,CAAA;OACF;QA3DE,EAAK,GA2DP,CACL;KACI,CAAA,CACF;OAGP,IAAQ,KACP,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,KAAD;KAAG,WAAU;eAAb;MACG,EAAG,wBAAwB,UAAU;MAAC;MAAE;MAAY;MAAE;MAAW;MACjE,EAAG,mBAAmB,KAAK;MAAC;MAAE;MAAO;MACrC,EAAG,6BAA6B,gBAAgB;MAC/C;QACJ,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,UAAD;OACE,MAAK;OACL,eAAe,GAAS,MAAM,KAAK,IAAI,GAAG,IAAI,EAAE,CAAC;OACjD,UAAU,MAAS,KAAK;OACxB,cAAY,EAAG,yBAAyB,gBAAgB;OACxD,WAAU;iBALZ,CAaE,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA,EACxB,EAAG,qBAAqB,OAAO,CACzB;;MACT,kBAAC,QAAD;OAAM,WAAU;iBAAhB;QACG,IAAO;QAAE;QAAI;QACT;;MAEP,kBAAC,UAAD;OACE,MAAK;OACL,eAAe,GAAS,MAAM,IAAI,EAAE;OACpC,UAAW,CAAC,KAAW,IAAO,KAAK,KAAe;OAClD,cAAY,EAAG,yBAAyB,YAAY;OACpD,WAAU;iBALZ,CAaG,EAAG,qBAAqB,OAAO,EAChC,kBAAC,GAAD,EAAc,MAAM,IAAM,CAAA,CACnB;;MACL;OACF;MAEJ;KAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PressKitListPage.d.ts","sourceRoot":"","sources":["../../../../../src/product-management/modules/press-kit/pages/PressKitListPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PressKitListPage.d.ts","sourceRoot":"","sources":["../../../../../src/product-management/modules/press-kit/pages/PressKitListPage.tsx"],"names":[],"mappings":"AAkCA,wBAAgB,gBAAgB,4CAkS/B"}
|