@burdenoff/microfe-admin 2026.625.1 → 2026.626.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/components/AccessDenied.js +2 -2
- package/dist/admin/components/AccessDenied.js.map +1 -1
- package/dist/admin/components/ActivityFeed.js +4 -4
- package/dist/admin/components/ActivityFeed.js.map +1 -1
- package/dist/admin/components/Charts.js.map +1 -1
- package/dist/admin/components/ConfirmDialog.js +1 -1
- package/dist/admin/components/ConfirmDialog.js.map +1 -1
- package/dist/admin/components/FormSheet.js +1 -1
- package/dist/admin/components/FormSheet.js.map +1 -1
- package/dist/admin/components/TenantSsoPanel.js +1 -1
- package/dist/admin/components/TenantSsoPanel.js.map +1 -1
- package/dist/admin/components/Toast.js +11 -11
- package/dist/admin/components/Toast.js.map +1 -1
- package/dist/admin/components/forms/SubscriptionForm.js +2 -2
- package/dist/admin/components/forms/SubscriptionForm.js.map +1 -1
- package/dist/admin/components/forms/TenantForm.js +1 -1
- package/dist/admin/components/forms/UserForm.js +1 -1
- package/dist/admin/components/ui.js +3 -3
- package/dist/admin/components/ui.js.map +1 -1
- package/dist/admin/constants/index.js +33 -24
- package/dist/admin/constants/index.js.map +1 -1
- package/dist/admin/pages/AuditLogsPage.js +92 -77
- package/dist/admin/pages/AuditLogsPage.js.map +1 -1
- package/dist/admin/pages/BillingPage.js +95 -51
- package/dist/admin/pages/BillingPage.js.map +1 -1
- package/dist/admin/pages/CommunicationsPage.js +97 -92
- package/dist/admin/pages/CommunicationsPage.js.map +1 -1
- package/dist/admin/pages/ContentPagesPage.js +274 -259
- package/dist/admin/pages/ContentPagesPage.js.map +1 -1
- package/dist/admin/pages/DashboardPage.js +113 -84
- package/dist/admin/pages/DashboardPage.js.map +1 -1
- package/dist/admin/pages/FeatureFlagsPage.js +93 -75
- package/dist/admin/pages/FeatureFlagsPage.js.map +1 -1
- package/dist/admin/pages/OrganizationsListPage.js +105 -87
- package/dist/admin/pages/OrganizationsListPage.js.map +1 -1
- package/dist/admin/pages/ProductsPage.js +138 -130
- package/dist/admin/pages/ProductsPage.js.map +1 -1
- package/dist/admin/pages/ReferralsPage.js +70 -52
- package/dist/admin/pages/ReferralsPage.js.map +1 -1
- package/dist/admin/pages/RolesPermissionsPage.js +136 -118
- package/dist/admin/pages/RolesPermissionsPage.js.map +1 -1
- package/dist/admin/pages/SREPage.js +34 -32
- package/dist/admin/pages/SREPage.js.map +1 -1
- package/dist/admin/pages/SandboxSettingsPage.js +360 -322
- package/dist/admin/pages/SandboxSettingsPage.js.map +1 -1
- package/dist/admin/pages/SettingsPage.js +63 -60
- package/dist/admin/pages/SettingsPage.js.map +1 -1
- package/dist/admin/pages/SyncFailuresPage.js +120 -118
- package/dist/admin/pages/SyncFailuresPage.js.map +1 -1
- package/dist/admin/pages/TenantDetailPage.js +261 -218
- package/dist/admin/pages/TenantDetailPage.js.map +1 -1
- package/dist/admin/pages/TenantFormRoutePage.js +65 -61
- package/dist/admin/pages/TenantFormRoutePage.js.map +1 -1
- package/dist/admin/pages/TenantsListPage.js +86 -71
- package/dist/admin/pages/TenantsListPage.js.map +1 -1
- package/dist/admin/pages/UsersListPage.js +128 -113
- package/dist/admin/pages/UsersListPage.js.map +1 -1
- package/dist/admin/pages/WaitlistPage.js +78 -63
- package/dist/admin/pages/WaitlistPage.js.map +1 -1
- package/dist/admin/pages/WorkflowsPage.js +107 -102
- package/dist/admin/pages/WorkflowsPage.js.map +1 -1
- package/dist/admin/pages/WorkspacesListPage.js +61 -49
- package/dist/admin/pages/WorkspacesListPage.js.map +1 -1
- package/dist/node_modules/@hookform/resolvers/dist/resolvers.js +2 -2
- package/dist/node_modules/@hookform/resolvers/dist/resolvers.js.map +1 -1
- package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js +35 -26
- package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js.map +1 -1
- package/dist/node_modules/react-hook-form/dist/index.esm.js +609 -516
- package/dist/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,20 +2,21 @@ import { useToast as e } from "../components/Toast.js";
|
|
|
2
2
|
import { useAdminPermissions as t } from "../hooks/useAdminPermissions.js";
|
|
3
3
|
import { Badge as n, Button as r, EmptyState as i, Input as a } from "../components/ui.js";
|
|
4
4
|
import { PageLayout as ee } from "../components/PageLayout.js";
|
|
5
|
-
import { formatDate as
|
|
6
|
-
import { DataTable as
|
|
7
|
-
import { FormRow as
|
|
8
|
-
import { DeleteConfirmDialog as
|
|
9
|
-
import { RowActions as
|
|
10
|
-
import { PermissionGuard as
|
|
5
|
+
import { formatDate as o } from "../utils/formatters.js";
|
|
6
|
+
import { DataTable as te, Pagination as ne } from "../components/DataTable.js";
|
|
7
|
+
import { FormRow as s, FormSection as c, FormSheet as re, FormSheetFooter as ie } from "../components/FormSheet.js";
|
|
8
|
+
import { DeleteConfirmDialog as ae } from "../components/ConfirmDialog.js";
|
|
9
|
+
import { RowActions as oe, createRowActions as se } from "../components/RowActions.js";
|
|
10
|
+
import { PermissionGuard as ce } from "../components/PermissionGuard.js";
|
|
11
11
|
import "../components/index.js";
|
|
12
|
-
import { useCallback as
|
|
13
|
-
import { FileText as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import {
|
|
12
|
+
import { useCallback as l, useEffect as u, useRef as le, useState as d } from "react";
|
|
13
|
+
import { FileText as f, Plus as ue, Search as de } from "lucide-react";
|
|
14
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
15
|
+
import { EmphasisPanel as fe, PagePurpose as pe } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { gql as h } from "@apollo/client";
|
|
16
17
|
import { useApolloClient as me } from "@apollo/client/react";
|
|
17
18
|
//#region src/admin/pages/ContentPagesPage.tsx
|
|
18
|
-
var
|
|
19
|
+
var g = 20, _ = [
|
|
19
20
|
{
|
|
20
21
|
value: "blog",
|
|
21
22
|
label: "Blog",
|
|
@@ -35,7 +36,7 @@ var m = 20, h = [
|
|
|
35
36
|
blog: "default",
|
|
36
37
|
"case-study": "secondary",
|
|
37
38
|
changelog: "outline"
|
|
38
|
-
},
|
|
39
|
+
}, ge = h`
|
|
39
40
|
query AdminContentListProducts($limit: Int, $offset: Int) {
|
|
40
41
|
platformProducts(limit: $limit, offset: $offset) {
|
|
41
42
|
items {
|
|
@@ -45,7 +46,7 @@ var m = 20, h = [
|
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
|
-
`,
|
|
49
|
+
`, _e = h`
|
|
49
50
|
query AdminContentPages(
|
|
50
51
|
$productId: String
|
|
51
52
|
$filter: ContentPageFilterInput
|
|
@@ -75,25 +76,25 @@ var m = 20, h = [
|
|
|
75
76
|
total
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
|
-
`,
|
|
79
|
+
`, ve = h`
|
|
79
80
|
mutation AdminCreateContentPage($input: CreateContentPageInput!) {
|
|
80
81
|
createContentPage(input: $input) {
|
|
81
82
|
id
|
|
82
83
|
slug
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
|
-
`,
|
|
86
|
+
`, v = h`
|
|
86
87
|
mutation AdminUpdateContentPage($id: ID!, $input: UpdateContentPageInput!) {
|
|
87
88
|
updateContentPage(id: $id, input: $input) {
|
|
88
89
|
id
|
|
89
90
|
slug
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
|
-
`, ye =
|
|
93
|
+
`, ye = h`
|
|
93
94
|
mutation AdminDeleteContentPage($id: ID!) {
|
|
94
95
|
deleteContentPage(id: $id)
|
|
95
96
|
}
|
|
96
|
-
`,
|
|
97
|
+
`, y = {
|
|
97
98
|
productId: "",
|
|
98
99
|
type: "blog",
|
|
99
100
|
slug: "",
|
|
@@ -107,24 +108,24 @@ var m = 20, h = [
|
|
|
107
108
|
featured: !1,
|
|
108
109
|
isPublished: !0
|
|
109
110
|
};
|
|
110
|
-
function
|
|
111
|
+
function be(e) {
|
|
111
112
|
return e.includes("changelog") ? "changelog" : e.includes("case-study") ? "case-study" : "blog";
|
|
112
113
|
}
|
|
113
|
-
var
|
|
114
|
-
function
|
|
115
|
-
let { canViewProducts:
|
|
116
|
-
|
|
114
|
+
var b = "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50";
|
|
115
|
+
function x() {
|
|
116
|
+
let { canViewProducts: h, canManageProducts: x, isLoading: S } = t(), C = me(), w = e(), [T, xe] = d([]), [E, D] = d(""), [O, Se] = d(""), [k, A] = d(""), [j, Ce] = d(""), [M, N] = d(1), P = le(0);
|
|
117
|
+
u(() => {
|
|
117
118
|
let e = setTimeout(() => {
|
|
118
|
-
|
|
119
|
+
Ce(k), N(1);
|
|
119
120
|
}, 300);
|
|
120
121
|
return () => clearTimeout(e);
|
|
121
|
-
}, [
|
|
122
|
-
let [
|
|
123
|
-
|
|
124
|
-
if (
|
|
122
|
+
}, [k]);
|
|
123
|
+
let [F, we] = d([]), [I, Te] = d(0), [Ee, L] = d(!1), [R, z] = d(null), [De, B] = d(!1), [V, H] = d(null), [U, W] = d(y), [Oe, G] = d(!1), [K, q] = d(null), [J, Y] = d(!1), X = S || !h;
|
|
124
|
+
u(() => {
|
|
125
|
+
if (X) return;
|
|
125
126
|
let e = !0;
|
|
126
|
-
return
|
|
127
|
-
query:
|
|
127
|
+
return C.query({
|
|
128
|
+
query: ge,
|
|
128
129
|
variables: {
|
|
129
130
|
limit: 100,
|
|
130
131
|
offset: 0
|
|
@@ -133,60 +134,60 @@ function b() {
|
|
|
133
134
|
}).then((t) => {
|
|
134
135
|
if (!e) return;
|
|
135
136
|
let n = t.data?.platformProducts?.items ?? [];
|
|
136
|
-
|
|
137
|
+
xe(n), D((e) => e || n[0]?.id || "");
|
|
137
138
|
}).catch((t) => {
|
|
138
|
-
e &&
|
|
139
|
+
e && z(t instanceof Error ? t.message : "Failed to load products");
|
|
139
140
|
}), () => {
|
|
140
141
|
e = !1;
|
|
141
142
|
};
|
|
142
|
-
}, [
|
|
143
|
-
let
|
|
144
|
-
if (
|
|
145
|
-
let e = ++
|
|
146
|
-
|
|
143
|
+
}, [C, X]);
|
|
144
|
+
let Z = l(async () => {
|
|
145
|
+
if (X || !E) return;
|
|
146
|
+
let e = ++P.current;
|
|
147
|
+
L(!0);
|
|
147
148
|
try {
|
|
148
|
-
let t = await
|
|
149
|
-
query:
|
|
149
|
+
let t = await C.query({
|
|
150
|
+
query: _e,
|
|
150
151
|
variables: {
|
|
151
|
-
productId:
|
|
152
|
+
productId: E,
|
|
152
153
|
filter: {
|
|
153
|
-
...
|
|
154
|
-
...
|
|
154
|
+
...j ? { search: j } : {},
|
|
155
|
+
...O ? { tag: O } : {}
|
|
155
156
|
},
|
|
156
|
-
limit:
|
|
157
|
-
offset: (
|
|
157
|
+
limit: g,
|
|
158
|
+
offset: (M - 1) * g
|
|
158
159
|
},
|
|
159
160
|
fetchPolicy: "network-only"
|
|
160
161
|
});
|
|
161
|
-
if (e !==
|
|
162
|
-
|
|
162
|
+
if (e !== P.current) return;
|
|
163
|
+
we(t.data?.contentPages?.items ?? []), Te(t.data?.contentPages?.total ?? 0), z(null);
|
|
163
164
|
} catch (t) {
|
|
164
|
-
if (e !==
|
|
165
|
-
|
|
165
|
+
if (e !== P.current) return;
|
|
166
|
+
z(t instanceof Error ? t.message : "Failed to load content pages");
|
|
166
167
|
} finally {
|
|
167
|
-
e ===
|
|
168
|
+
e === P.current && L(!1);
|
|
168
169
|
}
|
|
169
170
|
}, [
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
171
|
+
C,
|
|
172
|
+
X,
|
|
173
|
+
E,
|
|
174
|
+
j,
|
|
175
|
+
O,
|
|
176
|
+
M
|
|
176
177
|
]);
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}, [
|
|
180
|
-
let
|
|
181
|
-
|
|
182
|
-
...
|
|
183
|
-
productId:
|
|
184
|
-
type:
|
|
185
|
-
}),
|
|
186
|
-
}, [
|
|
187
|
-
|
|
178
|
+
u(() => {
|
|
179
|
+
Z();
|
|
180
|
+
}, [Z]);
|
|
181
|
+
let ke = Math.ceil(I / g), Ae = l(() => {
|
|
182
|
+
H(null), W({
|
|
183
|
+
...y,
|
|
184
|
+
productId: E,
|
|
185
|
+
type: O || "blog"
|
|
186
|
+
}), B(!0);
|
|
187
|
+
}, [E, O]), je = l((e) => {
|
|
188
|
+
H(e), W({
|
|
188
189
|
productId: e.productId ?? "",
|
|
189
|
-
type:
|
|
190
|
+
type: be(e.tags),
|
|
190
191
|
slug: e.slug,
|
|
191
192
|
title: e.title,
|
|
192
193
|
excerpt: e.excerpt ?? "",
|
|
@@ -197,96 +198,96 @@ function b() {
|
|
|
197
198
|
readingTime: e.readingTime == null ? "" : String(e.readingTime),
|
|
198
199
|
featured: e.featured,
|
|
199
200
|
isPublished: e.isPublished
|
|
200
|
-
}),
|
|
201
|
-
}, []),
|
|
201
|
+
}), B(!0);
|
|
202
|
+
}, []), Me = l(async () => {
|
|
202
203
|
let e = [
|
|
203
|
-
!
|
|
204
|
-
!
|
|
205
|
-
!
|
|
204
|
+
!U.title.trim() && "Title",
|
|
205
|
+
!U.slug.trim() && "Slug",
|
|
206
|
+
!U.content.trim() && "Content"
|
|
206
207
|
].filter(Boolean);
|
|
207
208
|
if (e.length) {
|
|
208
|
-
|
|
209
|
+
w.error(`${e.join(", ")} ${e.length > 1 ? "are" : "is"} required`);
|
|
209
210
|
return;
|
|
210
211
|
}
|
|
211
|
-
let t =
|
|
212
|
+
let t = U.thumbnail.trim();
|
|
212
213
|
if (t && !/^(https?:\/\/|\/\/|\/)/i.test(t)) {
|
|
213
|
-
|
|
214
|
+
w.error("Thumbnail must be an http(s) URL or an absolute path");
|
|
214
215
|
return;
|
|
215
216
|
}
|
|
216
|
-
|
|
217
|
-
let n =
|
|
218
|
-
title:
|
|
219
|
-
content:
|
|
217
|
+
G(!0);
|
|
218
|
+
let n = _.find((e) => e.value === U.type), r = V ? null : void 0, i = {
|
|
219
|
+
title: U.title.trim(),
|
|
220
|
+
content: U.content,
|
|
220
221
|
contentFormat: "markdown",
|
|
221
|
-
excerpt:
|
|
222
|
-
author:
|
|
223
|
-
publishedAt:
|
|
224
|
-
thumbnail:
|
|
225
|
-
readingTime:
|
|
226
|
-
featured:
|
|
227
|
-
isPublished:
|
|
222
|
+
excerpt: U.excerpt.trim() || r,
|
|
223
|
+
author: U.author.trim() || r,
|
|
224
|
+
publishedAt: U.publishedAt ? new Date(U.publishedAt).toISOString() : r,
|
|
225
|
+
thumbnail: U.thumbnail.trim() || r,
|
|
226
|
+
readingTime: U.readingTime === "" ? r : Number(U.readingTime),
|
|
227
|
+
featured: U.featured,
|
|
228
|
+
isPublished: U.isPublished
|
|
228
229
|
};
|
|
229
230
|
try {
|
|
230
|
-
|
|
231
|
-
mutation:
|
|
231
|
+
V ? (await C.mutate({
|
|
232
|
+
mutation: v,
|
|
232
233
|
variables: {
|
|
233
|
-
id:
|
|
234
|
+
id: V.id,
|
|
234
235
|
input: i
|
|
235
236
|
}
|
|
236
|
-
}),
|
|
237
|
-
mutation:
|
|
237
|
+
}), w.success("Content page updated")) : (await C.mutate({
|
|
238
|
+
mutation: ve,
|
|
238
239
|
variables: { input: {
|
|
239
240
|
...i,
|
|
240
241
|
visibility: "PUBLIC",
|
|
241
|
-
tags: [
|
|
242
|
+
tags: [U.type],
|
|
242
243
|
category: n.category,
|
|
243
|
-
productId:
|
|
244
|
-
slug:
|
|
244
|
+
productId: U.productId || void 0,
|
|
245
|
+
slug: U.slug.trim().replace(/-+/g, "-").replace(/^-+|-+$/g, "")
|
|
245
246
|
} }
|
|
246
|
-
}),
|
|
247
|
+
}), w.success("Content page created")), B(!1), await Z();
|
|
247
248
|
} catch (e) {
|
|
248
|
-
|
|
249
|
+
w.error(e instanceof Error ? e.message : "Failed to save content page");
|
|
249
250
|
} finally {
|
|
250
|
-
|
|
251
|
+
G(!1);
|
|
251
252
|
}
|
|
252
253
|
}, [
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
S,
|
|
254
|
+
U,
|
|
255
|
+
V,
|
|
256
256
|
C,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
257
|
+
w,
|
|
258
|
+
Z
|
|
259
|
+
]), Ne = l(async () => {
|
|
260
|
+
if (!(!K || J)) {
|
|
261
|
+
Y(!0);
|
|
261
262
|
try {
|
|
262
|
-
await
|
|
263
|
+
await C.mutate({
|
|
263
264
|
mutation: ye,
|
|
264
|
-
variables: { id:
|
|
265
|
-
}),
|
|
265
|
+
variables: { id: K.id }
|
|
266
|
+
}), w.success("Content page deleted"), q(null), F.length === 1 && M > 1 ? N((e) => e - 1) : await Z();
|
|
266
267
|
} catch (e) {
|
|
267
|
-
|
|
268
|
+
w.error(e instanceof Error ? e.message : "Failed to delete content page");
|
|
268
269
|
} finally {
|
|
269
|
-
|
|
270
|
+
Y(!1);
|
|
270
271
|
}
|
|
271
272
|
}
|
|
272
273
|
}, [
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
S,
|
|
274
|
+
K,
|
|
275
|
+
J,
|
|
276
276
|
C,
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
277
|
+
w,
|
|
278
|
+
Z,
|
|
279
|
+
F.length,
|
|
280
|
+
M
|
|
281
|
+
]), Pe = [
|
|
281
282
|
{
|
|
282
283
|
key: "title",
|
|
283
284
|
header: "Title",
|
|
284
|
-
render: (e) => /* @__PURE__ */
|
|
285
|
+
render: (e) => /* @__PURE__ */ m("div", {
|
|
285
286
|
className: "min-w-0",
|
|
286
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ p("div", {
|
|
287
288
|
className: "font-medium text-foreground",
|
|
288
289
|
children: e.title
|
|
289
|
-
}), /* @__PURE__ */
|
|
290
|
+
}), /* @__PURE__ */ p("div", {
|
|
290
291
|
className: "truncate text-xs text-muted-foreground",
|
|
291
292
|
children: e.slug
|
|
292
293
|
})]
|
|
@@ -297,8 +298,8 @@ function b() {
|
|
|
297
298
|
header: "Type",
|
|
298
299
|
width: "120px",
|
|
299
300
|
render: (e) => {
|
|
300
|
-
let t =
|
|
301
|
-
return /* @__PURE__ */
|
|
301
|
+
let t = _.find((t) => e.tags.includes(t.value));
|
|
302
|
+
return /* @__PURE__ */ p(n, {
|
|
302
303
|
variant: t ? he[t.value] : "outline",
|
|
303
304
|
className: "text-xs capitalize",
|
|
304
305
|
children: t?.label ?? "Other"
|
|
@@ -309,13 +310,13 @@ function b() {
|
|
|
309
310
|
key: "status",
|
|
310
311
|
header: "Status",
|
|
311
312
|
width: "110px",
|
|
312
|
-
render: (e) => /* @__PURE__ */
|
|
313
|
+
render: (e) => /* @__PURE__ */ m("div", {
|
|
313
314
|
className: "flex items-center gap-1",
|
|
314
|
-
children: [/* @__PURE__ */
|
|
315
|
+
children: [/* @__PURE__ */ p(n, {
|
|
315
316
|
variant: e.isPublished ? "default" : "outline",
|
|
316
317
|
className: "text-xs",
|
|
317
318
|
children: e.isPublished ? "Published" : "Draft"
|
|
318
|
-
}), e.featured && /* @__PURE__ */
|
|
319
|
+
}), e.featured && /* @__PURE__ */ p(n, {
|
|
319
320
|
variant: "secondary",
|
|
320
321
|
className: "text-xs",
|
|
321
322
|
children: "Featured"
|
|
@@ -326,194 +327,208 @@ function b() {
|
|
|
326
327
|
key: "updatedAt",
|
|
327
328
|
header: "Updated",
|
|
328
329
|
width: "110px",
|
|
329
|
-
render: (e) =>
|
|
330
|
+
render: (e) => o(e.updatedAt)
|
|
330
331
|
},
|
|
331
332
|
{
|
|
332
333
|
key: "actions",
|
|
333
334
|
header: "",
|
|
334
335
|
width: "60px",
|
|
335
336
|
align: "right",
|
|
336
|
-
render: (e) => /* @__PURE__ */
|
|
337
|
-
onEdit:
|
|
338
|
-
onDelete:
|
|
337
|
+
render: (e) => /* @__PURE__ */ p(oe, { actions: se({
|
|
338
|
+
onEdit: x ? () => je(e) : void 0,
|
|
339
|
+
onDelete: x ? () => q(e) : void 0
|
|
339
340
|
}) })
|
|
340
341
|
}
|
|
341
|
-
], Q = "content-page-form", $ = !!
|
|
342
|
-
return /* @__PURE__ */
|
|
343
|
-
allowed:
|
|
344
|
-
isLoading:
|
|
342
|
+
], Q = "content-page-form", $ = !!V && !_.some((e) => V.tags.includes(e.value));
|
|
343
|
+
return /* @__PURE__ */ m(ce, {
|
|
344
|
+
allowed: h,
|
|
345
|
+
isLoading: S,
|
|
345
346
|
pageTitle: "Content",
|
|
346
347
|
denyMessage: "You don't have permission to manage content pages.",
|
|
347
348
|
children: [
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ p(ee, {
|
|
349
350
|
title: "Content",
|
|
350
351
|
gradientWord: "Content",
|
|
351
|
-
description: `Blog posts, case studies, and changelog entries${
|
|
352
|
-
actions: /* @__PURE__ */
|
|
353
|
-
onClick:
|
|
354
|
-
disabled: !
|
|
355
|
-
children: [/* @__PURE__ */
|
|
352
|
+
description: `Blog posts, case studies, and changelog entries${I ? ` · ${I} total` : ""}`,
|
|
353
|
+
actions: /* @__PURE__ */ m(r, {
|
|
354
|
+
onClick: Ae,
|
|
355
|
+
disabled: !x || !E,
|
|
356
|
+
children: [/* @__PURE__ */ p(ue, { className: "mr-2 h-4 w-4" }), "New Content"]
|
|
356
357
|
}),
|
|
357
|
-
children: /* @__PURE__ */
|
|
358
|
+
children: /* @__PURE__ */ m("div", {
|
|
358
359
|
className: "space-y-4",
|
|
359
360
|
children: [
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ p(pe, { children: "Manage the marketing and product content that powers each product's public site — blog posts, case studies and changelog entries. Pick a product, then draft, edit and publish the stories that show up on its website." }),
|
|
362
|
+
/* @__PURE__ */ m(fe, {
|
|
363
|
+
className: "flex items-center gap-4 p-5",
|
|
364
|
+
children: [/* @__PURE__ */ p("div", {
|
|
365
|
+
className: "flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-action-primary-bg/15 text-action-primary-bg",
|
|
366
|
+
children: /* @__PURE__ */ p(f, { className: "h-6 w-6" })
|
|
367
|
+
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
|
|
368
|
+
className: "text-3xl font-bold tabular-nums text-text-primary",
|
|
369
|
+
children: I
|
|
370
|
+
}), /* @__PURE__ */ p("p", {
|
|
371
|
+
className: "text-sm text-text-secondary",
|
|
372
|
+
children: "content entries for this product"
|
|
373
|
+
})] })]
|
|
374
|
+
}),
|
|
375
|
+
/* @__PURE__ */ m("div", {
|
|
361
376
|
className: "flex flex-wrap items-center gap-3",
|
|
362
377
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ m("select", {
|
|
364
379
|
"aria-label": "Filter by product",
|
|
365
|
-
className: `${
|
|
366
|
-
value:
|
|
380
|
+
className: `${b} max-w-xs`,
|
|
381
|
+
value: E,
|
|
367
382
|
onChange: (e) => {
|
|
368
|
-
|
|
383
|
+
N(1), D(e.target.value);
|
|
369
384
|
},
|
|
370
|
-
children: [
|
|
385
|
+
children: [T.length === 0 && /* @__PURE__ */ p("option", {
|
|
371
386
|
value: "",
|
|
372
387
|
children: "Loading products…"
|
|
373
|
-
}),
|
|
388
|
+
}), T.map((e) => /* @__PURE__ */ p("option", {
|
|
374
389
|
value: e.id,
|
|
375
390
|
children: e.name
|
|
376
391
|
}, e.id))]
|
|
377
392
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ m("select", {
|
|
379
394
|
"aria-label": "Filter by content type",
|
|
380
|
-
className: `${
|
|
381
|
-
value:
|
|
395
|
+
className: `${b} max-w-[180px]`,
|
|
396
|
+
value: O,
|
|
382
397
|
onChange: (e) => {
|
|
383
|
-
|
|
398
|
+
N(1), Se(e.target.value);
|
|
384
399
|
},
|
|
385
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ p("option", {
|
|
386
401
|
value: "",
|
|
387
402
|
children: "All types"
|
|
388
|
-
}),
|
|
403
|
+
}), _.map((e) => /* @__PURE__ */ p("option", {
|
|
389
404
|
value: e.value,
|
|
390
405
|
children: e.label
|
|
391
406
|
}, e.value))]
|
|
392
407
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ m("div", {
|
|
394
409
|
className: "relative max-w-sm flex-1",
|
|
395
|
-
children: [/* @__PURE__ */
|
|
410
|
+
children: [/* @__PURE__ */ p(de, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ p(a, {
|
|
396
411
|
placeholder: "Search content...",
|
|
397
|
-
value:
|
|
398
|
-
onChange: (e) =>
|
|
412
|
+
value: k,
|
|
413
|
+
onChange: (e) => A(e.target.value),
|
|
399
414
|
className: "pl-9"
|
|
400
415
|
})]
|
|
401
416
|
})
|
|
402
417
|
]
|
|
403
418
|
}),
|
|
404
|
-
|
|
419
|
+
R && /* @__PURE__ */ p("div", {
|
|
405
420
|
className: "rounded-md border border-destructive/50 bg-destructive/10 p-4 text-sm text-destructive",
|
|
406
|
-
children:
|
|
421
|
+
children: R
|
|
407
422
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
409
|
-
columns:
|
|
410
|
-
data:
|
|
423
|
+
/* @__PURE__ */ p(te, {
|
|
424
|
+
columns: Pe,
|
|
425
|
+
data: F,
|
|
411
426
|
keyExtractor: (e) => e.id,
|
|
412
|
-
loading:
|
|
413
|
-
emptyState: /* @__PURE__ */
|
|
427
|
+
loading: Ee,
|
|
428
|
+
emptyState: /* @__PURE__ */ p(i, {
|
|
414
429
|
illustration: "empty-files",
|
|
415
|
-
icon: /* @__PURE__ */
|
|
430
|
+
icon: /* @__PURE__ */ p(f, { className: "h-8 w-8" }),
|
|
416
431
|
title: "No content yet",
|
|
417
432
|
description: "Create a blog post, case study, or changelog entry to get started."
|
|
418
433
|
})
|
|
419
434
|
}),
|
|
420
|
-
|
|
421
|
-
page:
|
|
422
|
-
totalPages:
|
|
423
|
-
totalItems:
|
|
424
|
-
pageSize:
|
|
425
|
-
onPageChange:
|
|
435
|
+
I > g && /* @__PURE__ */ p(ne, {
|
|
436
|
+
page: M,
|
|
437
|
+
totalPages: ke,
|
|
438
|
+
totalItems: I,
|
|
439
|
+
pageSize: g,
|
|
440
|
+
onPageChange: N
|
|
426
441
|
})
|
|
427
442
|
]
|
|
428
443
|
})
|
|
429
444
|
}),
|
|
430
|
-
/* @__PURE__ */
|
|
431
|
-
open:
|
|
432
|
-
onClose: () =>
|
|
433
|
-
title:
|
|
434
|
-
footer: /* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ p(re, {
|
|
446
|
+
open: De,
|
|
447
|
+
onClose: () => B(!1),
|
|
448
|
+
title: V ? "Edit content" : "New content",
|
|
449
|
+
footer: /* @__PURE__ */ p(ie, {
|
|
435
450
|
formId: Q,
|
|
436
|
-
isSubmitting:
|
|
437
|
-
submitLabel:
|
|
438
|
-
onCancel: () =>
|
|
451
|
+
isSubmitting: Oe,
|
|
452
|
+
submitLabel: V ? "Save changes" : "Create",
|
|
453
|
+
onCancel: () => B(!1)
|
|
439
454
|
}),
|
|
440
|
-
children: /* @__PURE__ */
|
|
455
|
+
children: /* @__PURE__ */ m("form", {
|
|
441
456
|
id: Q,
|
|
442
457
|
onSubmit: (e) => {
|
|
443
|
-
e.preventDefault(),
|
|
458
|
+
e.preventDefault(), Me();
|
|
444
459
|
},
|
|
445
460
|
className: "space-y-6",
|
|
446
461
|
children: [
|
|
447
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ m(c, {
|
|
448
463
|
title: "Basics",
|
|
449
464
|
children: [
|
|
450
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ m(s, {
|
|
451
466
|
cols: 2,
|
|
452
|
-
children: [/* @__PURE__ */
|
|
467
|
+
children: [/* @__PURE__ */ m("label", {
|
|
453
468
|
className: "space-y-1.5",
|
|
454
|
-
children: [/* @__PURE__ */
|
|
469
|
+
children: [/* @__PURE__ */ p("span", {
|
|
455
470
|
className: "text-sm font-medium",
|
|
456
471
|
children: "Type"
|
|
457
|
-
}), /* @__PURE__ */
|
|
458
|
-
className:
|
|
459
|
-
value: $ ? "__other" :
|
|
460
|
-
disabled: !!
|
|
461
|
-
onChange: (e) =>
|
|
472
|
+
}), /* @__PURE__ */ m("select", {
|
|
473
|
+
className: b,
|
|
474
|
+
value: $ ? "__other" : U.type,
|
|
475
|
+
disabled: !!V,
|
|
476
|
+
onChange: (e) => W((t) => ({
|
|
462
477
|
...t,
|
|
463
478
|
type: e.target.value
|
|
464
479
|
})),
|
|
465
|
-
children: [$ && /* @__PURE__ */
|
|
480
|
+
children: [$ && /* @__PURE__ */ p("option", {
|
|
466
481
|
value: "__other",
|
|
467
482
|
children: "Other"
|
|
468
|
-
}),
|
|
483
|
+
}), _.map((e) => /* @__PURE__ */ p("option", {
|
|
469
484
|
value: e.value,
|
|
470
485
|
children: e.label
|
|
471
486
|
}, e.value))]
|
|
472
487
|
})]
|
|
473
|
-
}), /* @__PURE__ */
|
|
488
|
+
}), /* @__PURE__ */ m("label", {
|
|
474
489
|
className: "space-y-1.5",
|
|
475
|
-
children: [/* @__PURE__ */
|
|
490
|
+
children: [/* @__PURE__ */ p("span", {
|
|
476
491
|
className: "text-sm font-medium",
|
|
477
492
|
children: "Product"
|
|
478
|
-
}), /* @__PURE__ */
|
|
479
|
-
className:
|
|
480
|
-
value:
|
|
481
|
-
disabled: !!
|
|
482
|
-
onChange: (e) =>
|
|
493
|
+
}), /* @__PURE__ */ p("select", {
|
|
494
|
+
className: b,
|
|
495
|
+
value: U.productId,
|
|
496
|
+
disabled: !!V,
|
|
497
|
+
onChange: (e) => W((t) => ({
|
|
483
498
|
...t,
|
|
484
499
|
productId: e.target.value
|
|
485
500
|
})),
|
|
486
|
-
children:
|
|
501
|
+
children: T.map((e) => /* @__PURE__ */ p("option", {
|
|
487
502
|
value: e.id,
|
|
488
503
|
children: e.name
|
|
489
504
|
}, e.id))
|
|
490
505
|
})]
|
|
491
506
|
})]
|
|
492
507
|
}),
|
|
493
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ m(s, {
|
|
494
509
|
cols: 2,
|
|
495
|
-
children: [/* @__PURE__ */
|
|
510
|
+
children: [/* @__PURE__ */ m("label", {
|
|
496
511
|
className: "space-y-1.5",
|
|
497
|
-
children: [/* @__PURE__ */
|
|
512
|
+
children: [/* @__PURE__ */ p("span", {
|
|
498
513
|
className: "text-sm font-medium",
|
|
499
514
|
children: "Title"
|
|
500
|
-
}), /* @__PURE__ */
|
|
501
|
-
value:
|
|
502
|
-
onChange: (e) =>
|
|
515
|
+
}), /* @__PURE__ */ p(a, {
|
|
516
|
+
value: U.title,
|
|
517
|
+
onChange: (e) => W((t) => ({
|
|
503
518
|
...t,
|
|
504
519
|
title: e.target.value
|
|
505
520
|
})),
|
|
506
521
|
placeholder: "A clear, descriptive title"
|
|
507
522
|
})]
|
|
508
|
-
}), /* @__PURE__ */
|
|
523
|
+
}), /* @__PURE__ */ m("label", {
|
|
509
524
|
className: "space-y-1.5",
|
|
510
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ p("span", {
|
|
511
526
|
className: "text-sm font-medium",
|
|
512
527
|
children: "Slug"
|
|
513
|
-
}), /* @__PURE__ */
|
|
514
|
-
value:
|
|
515
|
-
disabled: !!
|
|
516
|
-
onChange: (e) =>
|
|
528
|
+
}), /* @__PURE__ */ p(a, {
|
|
529
|
+
value: U.slug,
|
|
530
|
+
disabled: !!V,
|
|
531
|
+
onChange: (e) => W((t) => ({
|
|
517
532
|
...t,
|
|
518
533
|
slug: e.target.value.toLowerCase().replace(/[^a-z0-9-]+/g, "-")
|
|
519
534
|
})),
|
|
@@ -521,15 +536,15 @@ function b() {
|
|
|
521
536
|
})]
|
|
522
537
|
})]
|
|
523
538
|
}),
|
|
524
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ m("label", {
|
|
525
540
|
className: "block space-y-1.5",
|
|
526
|
-
children: [/* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ p("span", {
|
|
527
542
|
className: "text-sm font-medium",
|
|
528
543
|
children: "Excerpt"
|
|
529
|
-
}), /* @__PURE__ */
|
|
530
|
-
className: `${
|
|
531
|
-
value:
|
|
532
|
-
onChange: (e) =>
|
|
544
|
+
}), /* @__PURE__ */ p("textarea", {
|
|
545
|
+
className: `${b} h-16 py-2`,
|
|
546
|
+
value: U.excerpt,
|
|
547
|
+
onChange: (e) => W((t) => ({
|
|
533
548
|
...t,
|
|
534
549
|
excerpt: e.target.value
|
|
535
550
|
})),
|
|
@@ -538,64 +553,64 @@ function b() {
|
|
|
538
553
|
})
|
|
539
554
|
]
|
|
540
555
|
}),
|
|
541
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ p(c, {
|
|
542
557
|
title: "Content",
|
|
543
558
|
description: "Markdown supported (headings, lists, links, bold).",
|
|
544
|
-
children: /* @__PURE__ */
|
|
559
|
+
children: /* @__PURE__ */ p("textarea", {
|
|
545
560
|
"aria-label": "Content",
|
|
546
|
-
className: `${
|
|
547
|
-
value:
|
|
548
|
-
onChange: (e) =>
|
|
561
|
+
className: `${b} h-64 py-2 font-mono text-xs`,
|
|
562
|
+
value: U.content,
|
|
563
|
+
onChange: (e) => W((t) => ({
|
|
549
564
|
...t,
|
|
550
565
|
content: e.target.value
|
|
551
566
|
})),
|
|
552
567
|
placeholder: "## Heading\n\nWrite your content in markdown..."
|
|
553
568
|
})
|
|
554
569
|
}),
|
|
555
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ m(c, {
|
|
556
571
|
title: "Meta",
|
|
557
572
|
children: [
|
|
558
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ m(s, {
|
|
559
574
|
cols: 3,
|
|
560
575
|
children: [
|
|
561
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ m("label", {
|
|
562
577
|
className: "space-y-1.5",
|
|
563
|
-
children: [/* @__PURE__ */
|
|
578
|
+
children: [/* @__PURE__ */ p("span", {
|
|
564
579
|
className: "text-sm font-medium",
|
|
565
580
|
children: "Author"
|
|
566
|
-
}), /* @__PURE__ */
|
|
567
|
-
value:
|
|
568
|
-
onChange: (e) =>
|
|
581
|
+
}), /* @__PURE__ */ p(a, {
|
|
582
|
+
value: U.author,
|
|
583
|
+
onChange: (e) => W((t) => ({
|
|
569
584
|
...t,
|
|
570
585
|
author: e.target.value
|
|
571
586
|
})),
|
|
572
587
|
placeholder: "The Team"
|
|
573
588
|
})]
|
|
574
589
|
}),
|
|
575
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ m("label", {
|
|
576
591
|
className: "space-y-1.5",
|
|
577
|
-
children: [/* @__PURE__ */
|
|
592
|
+
children: [/* @__PURE__ */ p("span", {
|
|
578
593
|
className: "text-sm font-medium",
|
|
579
594
|
children: "Published date"
|
|
580
|
-
}), /* @__PURE__ */
|
|
595
|
+
}), /* @__PURE__ */ p(a, {
|
|
581
596
|
type: "date",
|
|
582
|
-
value:
|
|
583
|
-
onChange: (e) =>
|
|
597
|
+
value: U.publishedAt,
|
|
598
|
+
onChange: (e) => W((t) => ({
|
|
584
599
|
...t,
|
|
585
600
|
publishedAt: e.target.value
|
|
586
601
|
}))
|
|
587
602
|
})]
|
|
588
603
|
}),
|
|
589
|
-
/* @__PURE__ */
|
|
604
|
+
/* @__PURE__ */ m("label", {
|
|
590
605
|
className: "space-y-1.5",
|
|
591
|
-
children: [/* @__PURE__ */
|
|
606
|
+
children: [/* @__PURE__ */ p("span", {
|
|
592
607
|
className: "text-sm font-medium",
|
|
593
608
|
children: "Reading time (min)"
|
|
594
|
-
}), /* @__PURE__ */
|
|
609
|
+
}), /* @__PURE__ */ p(a, {
|
|
595
610
|
type: "number",
|
|
596
611
|
min: 0,
|
|
597
|
-
value:
|
|
598
|
-
onChange: (e) =>
|
|
612
|
+
value: U.readingTime,
|
|
613
|
+
onChange: (e) => W((t) => ({
|
|
599
614
|
...t,
|
|
600
615
|
readingTime: e.target.value
|
|
601
616
|
}))
|
|
@@ -603,38 +618,38 @@ function b() {
|
|
|
603
618
|
})
|
|
604
619
|
]
|
|
605
620
|
}),
|
|
606
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ m("label", {
|
|
607
622
|
className: "block space-y-1.5",
|
|
608
|
-
children: [/* @__PURE__ */
|
|
623
|
+
children: [/* @__PURE__ */ p("span", {
|
|
609
624
|
className: "text-sm font-medium",
|
|
610
625
|
children: "Thumbnail URL"
|
|
611
|
-
}), /* @__PURE__ */
|
|
612
|
-
value:
|
|
613
|
-
onChange: (e) =>
|
|
626
|
+
}), /* @__PURE__ */ p(a, {
|
|
627
|
+
value: U.thumbnail,
|
|
628
|
+
onChange: (e) => W((t) => ({
|
|
614
629
|
...t,
|
|
615
630
|
thumbnail: e.target.value
|
|
616
631
|
})),
|
|
617
632
|
placeholder: "https://…/image.png"
|
|
618
633
|
})]
|
|
619
634
|
}),
|
|
620
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ m("div", {
|
|
621
636
|
className: "flex items-center gap-6 pt-1",
|
|
622
|
-
children: [/* @__PURE__ */
|
|
637
|
+
children: [/* @__PURE__ */ m("label", {
|
|
623
638
|
className: "flex items-center gap-2 text-sm",
|
|
624
|
-
children: [/* @__PURE__ */
|
|
639
|
+
children: [/* @__PURE__ */ p("input", {
|
|
625
640
|
type: "checkbox",
|
|
626
|
-
checked:
|
|
627
|
-
onChange: (e) =>
|
|
641
|
+
checked: U.featured,
|
|
642
|
+
onChange: (e) => W((t) => ({
|
|
628
643
|
...t,
|
|
629
644
|
featured: e.target.checked
|
|
630
645
|
}))
|
|
631
646
|
}), "Featured"]
|
|
632
|
-
}), /* @__PURE__ */
|
|
647
|
+
}), /* @__PURE__ */ m("label", {
|
|
633
648
|
className: "flex items-center gap-2 text-sm",
|
|
634
|
-
children: [/* @__PURE__ */
|
|
649
|
+
children: [/* @__PURE__ */ p("input", {
|
|
635
650
|
type: "checkbox",
|
|
636
|
-
checked:
|
|
637
|
-
onChange: (e) =>
|
|
651
|
+
checked: U.isPublished,
|
|
652
|
+
onChange: (e) => W((t) => ({
|
|
638
653
|
...t,
|
|
639
654
|
isPublished: e.target.checked
|
|
640
655
|
}))
|
|
@@ -646,18 +661,18 @@ function b() {
|
|
|
646
661
|
]
|
|
647
662
|
})
|
|
648
663
|
}),
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
open: !!
|
|
651
|
-
onClose: () =>
|
|
652
|
-
onConfirm:
|
|
653
|
-
itemName:
|
|
664
|
+
/* @__PURE__ */ p(ae, {
|
|
665
|
+
open: !!K,
|
|
666
|
+
onClose: () => q(null),
|
|
667
|
+
onConfirm: Ne,
|
|
668
|
+
itemName: K?.title ?? "this content page",
|
|
654
669
|
itemType: "content page",
|
|
655
|
-
loading:
|
|
670
|
+
loading: J
|
|
656
671
|
})
|
|
657
672
|
]
|
|
658
673
|
});
|
|
659
674
|
}
|
|
660
675
|
//#endregion
|
|
661
|
-
export {
|
|
676
|
+
export { x as ContentPagesPage };
|
|
662
677
|
|
|
663
678
|
//# sourceMappingURL=ContentPagesPage.js.map
|