@burdenoff/microfe-product 2026.520.3 → 2026.521.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/global-operations.d.ts +7 -0
- package/dist/generated/global-operations.d.ts.map +1 -1
- package/dist/generated/global-operations.js +5 -0
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +3 -0
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.d.ts.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +183 -119
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductForm.d.ts.map +1 -1
- package/dist/product-management/modules/products/components/ProductForm.js +419 -317
- package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.js +216 -194
- package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductsListPage.d.ts.map +1 -1
- package/dist/product-management/modules/products/pages/ProductsListPage.js +152 -139
- package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
- package/dist/product-management/modules/products/schemas/index.d.ts +2 -0
- package/dist/product-management/modules/products/schemas/index.d.ts.map +1 -1
- package/dist/product-management/modules/products/schemas/index.js +6 -3
- package/dist/product-management/modules/products/schemas/index.js.map +1 -1
- package/dist/product-management/modules/products/types/index.d.ts +3 -0
- package/dist/product-management/modules/products/types/index.d.ts.map +1 -1
- package/dist/product-management/modules/products/types/index.js.map +1 -1
- 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":"AAoCA,wBAAgB,oBAAoB,4CAkZnC"}
|
|
@@ -7,12 +7,12 @@ 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 { Download as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import { PermissionGate as
|
|
10
|
+
import { useEffect as f, useState as p } from "react";
|
|
11
|
+
import { ChevronLeft as m, ChevronRight as h, Download as g, Eye as _, FileText as v, Plus as y, RefreshCw as b, SquarePen as x, Trash2 as S } from "lucide-react";
|
|
12
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
13
|
+
import { PermissionGate as T } from "@burdenoff/fe-libs/shared/components";
|
|
14
14
|
//#region src/product-management/modules/content-pages/pages/ContentPagesListPage.tsx
|
|
15
|
-
var
|
|
15
|
+
var E = [
|
|
16
16
|
{
|
|
17
17
|
label: "All",
|
|
18
18
|
tag: ""
|
|
@@ -37,106 +37,124 @@ var C = [
|
|
|
37
37
|
label: "Pages",
|
|
38
38
|
tag: "page"
|
|
39
39
|
}
|
|
40
|
-
];
|
|
41
|
-
function
|
|
42
|
-
let { navigate:
|
|
43
|
-
...
|
|
44
|
-
search:
|
|
45
|
-
}, {
|
|
40
|
+
], D = 20;
|
|
41
|
+
function O() {
|
|
42
|
+
let { navigate: O, basePath: k = "/products" } = t(), A = `${k}/content-pages`, [j, M] = p(""), N = e(), [P, F] = p({}), [I, L] = p(0), { contentPages: R, total: z, hasMore: B, loading: V, error: H, refetch: U } = l(void 0, {
|
|
43
|
+
...P,
|
|
44
|
+
search: j || void 0
|
|
45
|
+
}, {
|
|
46
|
+
limit: D,
|
|
47
|
+
offset: I * D
|
|
48
|
+
}), W = Math.max(1, Math.ceil(z / D)), G = I * D + 1, K = Math.min((I + 1) * D, z);
|
|
49
|
+
f(() => {
|
|
50
|
+
if (z === 0) {
|
|
51
|
+
L(0);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
let e = Math.ceil(z / D) - 1;
|
|
55
|
+
L((t) => t > e ? e : t);
|
|
56
|
+
}, [z]);
|
|
57
|
+
let { deleteContentPage: q, loading: J } = u(), Y = async (e) => {
|
|
46
58
|
s("medium");
|
|
47
|
-
let t =
|
|
59
|
+
let t = N("contentPages.confirmDelete", "Are you sure you want to delete this content page?"), n = await o({
|
|
48
60
|
title: "Delete content page",
|
|
49
61
|
message: t,
|
|
50
62
|
okButtonTitle: "Delete",
|
|
51
63
|
cancelButtonTitle: "Cancel"
|
|
52
64
|
});
|
|
53
65
|
if (n === null ? window.confirm(t) : n) try {
|
|
54
|
-
await
|
|
66
|
+
await q(e), c("success"), U();
|
|
55
67
|
} catch (e) {
|
|
56
68
|
c("error"), console.error("Failed to delete content page:", e);
|
|
57
69
|
}
|
|
58
|
-
},
|
|
70
|
+
}, X = (e) => e ? new Date(e).toLocaleDateString("en-US", {
|
|
59
71
|
year: "numeric",
|
|
60
72
|
month: "short",
|
|
61
73
|
day: "numeric"
|
|
62
74
|
}) : "—";
|
|
63
|
-
return
|
|
75
|
+
return V ? /* @__PURE__ */ C("div", {
|
|
64
76
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
65
|
-
children: /* @__PURE__ */
|
|
66
|
-
}) :
|
|
77
|
+
children: /* @__PURE__ */ C(n, { message: N("contentPages.loadingContentPages", "Loading content pages...") })
|
|
78
|
+
}) : H ? /* @__PURE__ */ C("div", {
|
|
67
79
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
68
|
-
children: /* @__PURE__ */
|
|
69
|
-
message:
|
|
80
|
+
children: /* @__PURE__ */ C(r, {
|
|
81
|
+
message: H.message,
|
|
70
82
|
action: {
|
|
71
|
-
label:
|
|
72
|
-
onClick: () =>
|
|
83
|
+
label: N("productCommon.retry", "Retry"),
|
|
84
|
+
onClick: () => U()
|
|
73
85
|
}
|
|
74
86
|
})
|
|
75
|
-
}) : /* @__PURE__ */
|
|
87
|
+
}) : /* @__PURE__ */ w("div", {
|
|
76
88
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-300",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
89
|
+
children: [/* @__PURE__ */ w("div", {
|
|
78
90
|
className: "mb-6",
|
|
79
91
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ w("div", {
|
|
81
93
|
className: "flex items-center justify-between mb-4",
|
|
82
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h1", {
|
|
83
95
|
className: "text-3xl font-bold text-text-primary mb-2",
|
|
84
|
-
children:
|
|
85
|
-
}), /* @__PURE__ */
|
|
96
|
+
children: N("contentPages.title", "Content Pages")
|
|
97
|
+
}), /* @__PURE__ */ C("p", {
|
|
86
98
|
className: "text-text-secondary",
|
|
87
|
-
children:
|
|
88
|
-
})] }), /* @__PURE__ */
|
|
99
|
+
children: N("contentPages.subtitle", "Manage content pages and documentation")
|
|
100
|
+
})] }), /* @__PURE__ */ C(T, {
|
|
89
101
|
role: "super_admin",
|
|
90
|
-
children: /* @__PURE__ */
|
|
91
|
-
onClick: () =>
|
|
102
|
+
children: /* @__PURE__ */ w("button", {
|
|
103
|
+
onClick: () => O(`${A}/new`),
|
|
92
104
|
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 ",
|
|
93
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ C(y, { size: 20 }), N("contentPages.newPage", "New Page")]
|
|
94
106
|
})
|
|
95
107
|
})]
|
|
96
108
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ C("div", {
|
|
98
110
|
className: "flex flex-wrap gap-1 border-b border-default pb-px",
|
|
99
|
-
children:
|
|
111
|
+
children: E.map((e) => /* @__PURE__ */ C("button", {
|
|
100
112
|
type: "button",
|
|
101
|
-
onClick: () =>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
113
|
+
onClick: () => {
|
|
114
|
+
F({
|
|
115
|
+
...P,
|
|
116
|
+
tag: e.tag || void 0
|
|
117
|
+
}), L(0);
|
|
118
|
+
},
|
|
119
|
+
className: `px-4 py-2 rounded-t-lg text-sm font-medium transition-all border-b-2 ${(P.tag ?? "") === e.tag ? "border-[var(--color-action-primary-bg)] text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"}`,
|
|
120
|
+
children: N(`contentPages.tab.${e.label.toLowerCase()}`, e.label)
|
|
107
121
|
}, e.label))
|
|
108
122
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ w("div", {
|
|
110
124
|
className: "flex gap-4",
|
|
111
125
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
value:
|
|
114
|
-
onChange:
|
|
115
|
-
|
|
126
|
+
/* @__PURE__ */ C(i, {
|
|
127
|
+
value: j,
|
|
128
|
+
onChange: (e) => {
|
|
129
|
+
M(e), L(0);
|
|
130
|
+
},
|
|
131
|
+
placeholder: N("contentPages.searchPlaceholder", "Search content pages..."),
|
|
116
132
|
className: "flex-1"
|
|
117
133
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
value:
|
|
120
|
-
onChange: (e) =>
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
134
|
+
/* @__PURE__ */ w("select", {
|
|
135
|
+
value: P.isPublished === void 0 ? "" : P.isPublished ? "published" : "all",
|
|
136
|
+
onChange: (e) => {
|
|
137
|
+
F({
|
|
138
|
+
...P,
|
|
139
|
+
isPublished: e.target.value === "published" ? !0 : void 0
|
|
140
|
+
}), L(0);
|
|
141
|
+
},
|
|
124
142
|
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 ",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ C("option", {
|
|
126
144
|
value: "",
|
|
127
|
-
children:
|
|
128
|
-
}), /* @__PURE__ */
|
|
145
|
+
children: N("contentPages.filterAll", "All")
|
|
146
|
+
}), /* @__PURE__ */ C("option", {
|
|
129
147
|
value: "published",
|
|
130
|
-
children:
|
|
148
|
+
children: N("contentPages.publishedOnly", "Published Only")
|
|
131
149
|
})]
|
|
132
150
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
onClick: () =>
|
|
151
|
+
/* @__PURE__ */ C("button", {
|
|
152
|
+
onClick: () => U(),
|
|
135
153
|
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 ",
|
|
136
|
-
children: /* @__PURE__ */ b
|
|
154
|
+
children: /* @__PURE__ */ C(b, { size: 18 })
|
|
137
155
|
}),
|
|
138
|
-
|
|
139
|
-
onClick: () => a("content-pages",
|
|
156
|
+
R.length > 0 && /* @__PURE__ */ C("button", {
|
|
157
|
+
onClick: () => a("content-pages", R.map((e) => ({
|
|
140
158
|
id: e.id,
|
|
141
159
|
slug: e.slug,
|
|
142
160
|
title: e.title,
|
|
@@ -149,124 +167,124 @@ function w() {
|
|
|
149
167
|
updatedAt: e.updatedAt
|
|
150
168
|
}))),
|
|
151
169
|
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 ",
|
|
152
|
-
title:
|
|
153
|
-
children: /* @__PURE__ */
|
|
170
|
+
title: N("contentPages.exportCsv", "Export as CSV"),
|
|
171
|
+
children: /* @__PURE__ */ C(g, { size: 18 })
|
|
154
172
|
})
|
|
155
173
|
]
|
|
156
174
|
})
|
|
157
175
|
]
|
|
158
|
-
}),
|
|
176
|
+
}), R.length === 0 ? /* @__PURE__ */ w("div", {
|
|
159
177
|
className: "bg-surface border border-default rounded-lg p-12 text-center animate-in fade-in duration-300",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
178
|
+
children: [/* @__PURE__ */ C("p", {
|
|
161
179
|
className: "text-text-secondary mb-4",
|
|
162
|
-
children:
|
|
163
|
-
}), /* @__PURE__ */
|
|
164
|
-
onClick: () =>
|
|
180
|
+
children: N("contentPages.noContentPagesFound", "No content pages found")
|
|
181
|
+
}), /* @__PURE__ */ w("button", {
|
|
182
|
+
onClick: () => O(`${A}/new`),
|
|
165
183
|
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 ",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ C(y, { size: 20 }), N("contentPages.newPage", "New Page")]
|
|
167
185
|
})]
|
|
168
|
-
}) : /* @__PURE__ */
|
|
186
|
+
}) : /* @__PURE__ */ w("div", {
|
|
169
187
|
className: "bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)] overflow-hidden",
|
|
170
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ w("table", {
|
|
171
189
|
className: "w-full",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ C("thead", {
|
|
173
191
|
className: "bg-muted border-b border-default",
|
|
174
|
-
children: /* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
192
|
+
children: /* @__PURE__ */ w("tr", { children: [
|
|
193
|
+
/* @__PURE__ */ C("th", {
|
|
176
194
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
177
|
-
children:
|
|
195
|
+
children: N("contentPages.columnPage", "Page")
|
|
178
196
|
}),
|
|
179
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ C("th", {
|
|
180
198
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
181
|
-
children:
|
|
199
|
+
children: N("contentPages.columnSlug", "Slug")
|
|
182
200
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ C("th", {
|
|
184
202
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
185
|
-
children:
|
|
203
|
+
children: N("contentPages.columnStatus", "Status")
|
|
186
204
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ C("th", {
|
|
188
206
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
189
|
-
children:
|
|
207
|
+
children: N("contentPages.columnVersion", "Version")
|
|
190
208
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ C("th", {
|
|
192
210
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
193
|
-
children:
|
|
211
|
+
children: N("contentPages.columnLastUpdated", "Last Updated")
|
|
194
212
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ C("th", {
|
|
196
214
|
className: "text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
197
|
-
children:
|
|
215
|
+
children: N("contentPages.columnActions", "Actions")
|
|
198
216
|
})
|
|
199
217
|
] })
|
|
200
|
-
}), /* @__PURE__ */
|
|
218
|
+
}), /* @__PURE__ */ C("tbody", {
|
|
201
219
|
className: "divide-y divide-[var(--color-border-default)]",
|
|
202
|
-
children:
|
|
220
|
+
children: R.map((e) => /* @__PURE__ */ w("tr", {
|
|
203
221
|
className: "hover:bg-muted transition-all duration-200 cursor-pointer",
|
|
204
|
-
onClick: () =>
|
|
222
|
+
onClick: () => O(`${A}/${e.id}`),
|
|
205
223
|
children: [
|
|
206
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ C("td", {
|
|
207
225
|
className: "px-6 py-4",
|
|
208
|
-
children: /* @__PURE__ */
|
|
226
|
+
children: /* @__PURE__ */ w("div", {
|
|
209
227
|
className: "flex items-center gap-3",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
228
|
+
children: [/* @__PURE__ */ C("div", {
|
|
211
229
|
className: "w-10 h-10 rounded-lg bg-[var(--color-status-info-subtle)] flex items-center justify-center",
|
|
212
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ C(v, {
|
|
213
231
|
size: 20,
|
|
214
232
|
className: "text-[var(--color-status-info)]"
|
|
215
233
|
})
|
|
216
|
-
}), /* @__PURE__ */
|
|
234
|
+
}), /* @__PURE__ */ C("div", { children: /* @__PURE__ */ C("p", {
|
|
217
235
|
className: "font-medium text-text-primary",
|
|
218
236
|
children: e.title
|
|
219
237
|
}) })]
|
|
220
238
|
})
|
|
221
239
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ C("td", {
|
|
223
241
|
className: "px-6 py-4",
|
|
224
|
-
children: /* @__PURE__ */
|
|
242
|
+
children: /* @__PURE__ */ w("span", {
|
|
225
243
|
className: "text-sm text-text-tertiary font-mono",
|
|
226
244
|
children: ["/", e.slug]
|
|
227
245
|
})
|
|
228
246
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ C("td", {
|
|
230
248
|
className: "px-6 py-4",
|
|
231
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ C(d, { isPublished: e.isPublished })
|
|
232
250
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ C("td", {
|
|
234
252
|
className: "px-6 py-4",
|
|
235
|
-
children: /* @__PURE__ */
|
|
253
|
+
children: /* @__PURE__ */ w("span", {
|
|
236
254
|
className: "text-sm text-text-primary font-mono",
|
|
237
255
|
children: ["v", e.version]
|
|
238
256
|
})
|
|
239
257
|
}),
|
|
240
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ C("td", {
|
|
241
259
|
className: "px-6 py-4",
|
|
242
|
-
children: /* @__PURE__ */
|
|
260
|
+
children: /* @__PURE__ */ C("span", {
|
|
243
261
|
className: "text-sm text-text-secondary",
|
|
244
|
-
children:
|
|
262
|
+
children: X(e.lastUpdated || e.updatedAt)
|
|
245
263
|
})
|
|
246
264
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ C("td", {
|
|
248
266
|
className: "px-6 py-4",
|
|
249
|
-
children: /* @__PURE__ */
|
|
267
|
+
children: /* @__PURE__ */ w("div", {
|
|
250
268
|
className: "flex items-center justify-end gap-2",
|
|
251
269
|
onClick: (e) => e.stopPropagation(),
|
|
252
|
-
children: [/* @__PURE__ */
|
|
253
|
-
onClick: () =>
|
|
270
|
+
children: [/* @__PURE__ */ C("button", {
|
|
271
|
+
onClick: () => O(`${A}/${e.id}`),
|
|
254
272
|
className: "p-2 rounded-lg text-text-secondary hover:bg-muted transition-all duration-200",
|
|
255
|
-
title:
|
|
256
|
-
children: /* @__PURE__ */
|
|
257
|
-
}), /* @__PURE__ */
|
|
273
|
+
title: N("contentPages.viewDetails", "View details"),
|
|
274
|
+
children: /* @__PURE__ */ C(_, { size: 18 })
|
|
275
|
+
}), /* @__PURE__ */ w(T, {
|
|
258
276
|
role: "super_admin",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
260
|
-
onClick: () =>
|
|
277
|
+
children: [/* @__PURE__ */ C("button", {
|
|
278
|
+
onClick: () => O(`${A}/${e.id}/edit`),
|
|
261
279
|
className: "p-2 rounded-lg text-text-secondary hover:bg-muted transition-all duration-200",
|
|
262
|
-
title:
|
|
263
|
-
children: /* @__PURE__ */
|
|
264
|
-
}), /* @__PURE__ */
|
|
265
|
-
onClick: () =>
|
|
266
|
-
disabled:
|
|
280
|
+
title: N("contentPages.edit", "Edit"),
|
|
281
|
+
children: /* @__PURE__ */ C(x, { size: 18 })
|
|
282
|
+
}), /* @__PURE__ */ C("button", {
|
|
283
|
+
onClick: () => Y(e.id),
|
|
284
|
+
disabled: J,
|
|
267
285
|
className: "p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50",
|
|
268
|
-
title:
|
|
269
|
-
children: /* @__PURE__ */
|
|
286
|
+
title: N("contentPages.delete", "Delete"),
|
|
287
|
+
children: /* @__PURE__ */ C(S, { size: 18 })
|
|
270
288
|
})]
|
|
271
289
|
})]
|
|
272
290
|
})
|
|
@@ -274,11 +292,57 @@ function w() {
|
|
|
274
292
|
]
|
|
275
293
|
}, e.id))
|
|
276
294
|
})]
|
|
277
|
-
})
|
|
295
|
+
}), z > D && /* @__PURE__ */ w("div", {
|
|
296
|
+
className: "flex items-center justify-between px-6 py-3 border-t border-default bg-muted/50",
|
|
297
|
+
children: [/* @__PURE__ */ w("p", {
|
|
298
|
+
className: "text-sm text-text-secondary",
|
|
299
|
+
children: [
|
|
300
|
+
N("contentPages.showing", "Showing"),
|
|
301
|
+
" ",
|
|
302
|
+
G,
|
|
303
|
+
"–",
|
|
304
|
+
K,
|
|
305
|
+
" ",
|
|
306
|
+
N("contentPages.of", "of"),
|
|
307
|
+
" ",
|
|
308
|
+
z,
|
|
309
|
+
" ",
|
|
310
|
+
N("contentPages.contentPages", "content pages")
|
|
311
|
+
]
|
|
312
|
+
}), /* @__PURE__ */ w("div", {
|
|
313
|
+
className: "flex items-center gap-2",
|
|
314
|
+
children: [
|
|
315
|
+
/* @__PURE__ */ w("button", {
|
|
316
|
+
type: "button",
|
|
317
|
+
onClick: () => L((e) => Math.max(0, e - 1)),
|
|
318
|
+
disabled: I === 0 || V,
|
|
319
|
+
"aria-label": N("contentPages.prevPage", "Previous page"),
|
|
320
|
+
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__ */ C(m, { size: 16 }), N("contentPages.prev", "Prev")]
|
|
322
|
+
}),
|
|
323
|
+
/* @__PURE__ */ w("span", {
|
|
324
|
+
className: "text-sm text-text-secondary px-2",
|
|
325
|
+
children: [
|
|
326
|
+
I + 1,
|
|
327
|
+
" / ",
|
|
328
|
+
W
|
|
329
|
+
]
|
|
330
|
+
}),
|
|
331
|
+
/* @__PURE__ */ w("button", {
|
|
332
|
+
type: "button",
|
|
333
|
+
onClick: () => L((e) => e + 1),
|
|
334
|
+
disabled: !B && I + 1 >= W || V,
|
|
335
|
+
"aria-label": N("contentPages.nextPage", "Next page"),
|
|
336
|
+
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: [N("contentPages.next", "Next"), /* @__PURE__ */ C(h, { size: 16 })]
|
|
338
|
+
})
|
|
339
|
+
]
|
|
340
|
+
})]
|
|
341
|
+
})]
|
|
278
342
|
})]
|
|
279
343
|
});
|
|
280
344
|
}
|
|
281
345
|
//#endregion
|
|
282
|
-
export {
|
|
346
|
+
export { O as ContentPagesListPage };
|
|
283
347
|
|
|
284
348
|
//# 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 { useState } from 'react';\nimport { Download, FileText, Plus, Eye, SquarePen, Trash2, RefreshCw } 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\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\n const { contentPages, loading, error, refetch } = useContentPages(\n undefined,\n { ...filter, search: searchQuery || undefined },\n { limit: 20 }\n );\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={() => setFilter({ ...filter, tag: t.tag || undefined })}\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={setSearchQuery}\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 }\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 </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAeA,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;CA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D,kBAAC,GAAD,EAAK,MAAM,IAAM,CAAA;UACV,CAAA,EACT,kBAAC,GAAD;UAAgB,MAAK;oBAArB,CACE,kBAAC,UAAD;WACE,eAAe,EAAS,GAAG,EAAqB,GAAG,EAAK,GAAG,OAAO;WAClE,WAAU;WACV,OAAO,EAAG,qBAAqB,OAAO;qBAEtC,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;WAChB,CAAA,EACT,kBAAC,UAAD;WACE,eAAe,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;;GACJ,CAAA,CAEJ"}
|
|
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,iBA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AAI;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":"ProductForm.d.ts","sourceRoot":"","sources":["../../../../../src/product-management/modules/products/components/ProductForm.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductForm.d.ts","sourceRoot":"","sources":["../../../../../src/product-management/modules/products/components/ProductForm.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAqBxF,UAAU,gBAAgB;IACxB,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,CAAC,IAAI,EAAE,kBAAkB,GAAG,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAsBD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,gBAAgB,2CAumCrF"}
|