@orion-studios/payload-studio 0.6.0-beta.2 → 0.6.0-beta.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/admin/client.d.mts +0 -1
- package/dist/admin/client.d.ts +0 -1
- package/dist/admin/client.js +896 -982
- package/dist/admin/client.mjs +609 -696
- package/dist/admin/index.d.mts +2 -1
- package/dist/admin/index.d.ts +2 -1
- package/dist/admin/index.js +1505 -1
- package/dist/admin/index.mjs +4 -2
- package/dist/admin-app/index.mjs +4 -4
- package/dist/admin-app/styles.css +362 -0
- package/dist/chunk-DYXSAVUQ.mjs +2372 -0
- package/dist/{chunk-RKTIFEUY.mjs → chunk-EHUE4LCT.mjs} +3 -33
- package/dist/chunk-Z6L5K5MH.mjs +64 -0
- package/dist/index-DEkV-sMs.d.mts +191 -0
- package/dist/index-bbA3HSxa.d.ts +191 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1521 -63
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunk-QJAWO6K3.mjs +0 -910
- package/dist/chunk-W2UOCJDX.mjs +0 -32
- package/dist/index-B6_D4Hm4.d.ts +0 -439
- package/dist/index-CYaWadBl.d.mts +0 -439
package/dist/admin/client.mjs
CHANGED
|
@@ -1266,50 +1266,97 @@ function WelcomeHeader({
|
|
|
1266
1266
|
);
|
|
1267
1267
|
}
|
|
1268
1268
|
|
|
1269
|
-
// src/admin/components/studio/
|
|
1270
|
-
import
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1274
|
-
function AdminBreadcrumbs({ items }) {
|
|
1275
|
-
return /* @__PURE__ */ jsx12("nav", { "aria-label": "Breadcrumb", className: "orion-admin-breadcrumbs", children: items.map((item, index) => {
|
|
1276
|
-
const isLast = index === items.length - 1;
|
|
1277
|
-
return /* @__PURE__ */ jsxs11("span", { children: [
|
|
1278
|
-
item.href && !isLast ? /* @__PURE__ */ jsx12("a", { href: item.href, children: item.label }) : /* @__PURE__ */ jsx12("span", { children: item.label }),
|
|
1279
|
-
!isLast ? /* @__PURE__ */ jsx12("span", { className: "orion-admin-breadcrumb-sep", children: "/" }) : null
|
|
1280
|
-
] }, `${item.label}-${index}`);
|
|
1281
|
-
}) });
|
|
1282
|
-
}
|
|
1269
|
+
// src/admin/components/studio/AdminStudioNav.tsx
|
|
1270
|
+
import { useMemo } from "react";
|
|
1271
|
+
import { usePathname } from "next/navigation";
|
|
1272
|
+
import { Logout, useAuth } from "@payloadcms/ui";
|
|
1283
1273
|
|
|
1284
|
-
// src/admin
|
|
1285
|
-
import {
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1274
|
+
// src/admin/components/studio/adminPathUtils.ts
|
|
1275
|
+
import { useEffect as useEffect6, useState as useState6 } from "react";
|
|
1276
|
+
var DEFAULT_ADMIN_BASE_PATH = "/admin";
|
|
1277
|
+
var normalizePath = (value) => {
|
|
1278
|
+
if (!value || value === "/") return "/";
|
|
1279
|
+
const withLeadingSlash = value.startsWith("/") ? value : `/${value}`;
|
|
1280
|
+
const trimmed = withLeadingSlash.replace(/\/+$/, "");
|
|
1281
|
+
return trimmed.length > 0 ? trimmed : "/";
|
|
1282
|
+
};
|
|
1283
|
+
var normalizeAdminBasePath = (value) => {
|
|
1284
|
+
const normalized = normalizePath(value);
|
|
1285
|
+
return normalized === "/" ? DEFAULT_ADMIN_BASE_PATH : normalized;
|
|
1286
|
+
};
|
|
1287
|
+
var detectAdminBasePath = (pathname, fallback = DEFAULT_ADMIN_BASE_PATH) => {
|
|
1288
|
+
const normalizedPathname = normalizePath(pathname);
|
|
1289
|
+
const normalizedFallback = normalizeAdminBasePath(fallback);
|
|
1290
|
+
const markers = [
|
|
1291
|
+
"/contact-form",
|
|
1292
|
+
"/collections/",
|
|
1293
|
+
"/globals/",
|
|
1294
|
+
"/forms",
|
|
1295
|
+
"/pages/",
|
|
1296
|
+
"/tools",
|
|
1297
|
+
"/media",
|
|
1298
|
+
"/logout",
|
|
1299
|
+
"/login"
|
|
1300
|
+
];
|
|
1301
|
+
for (const marker of markers) {
|
|
1302
|
+
const index = normalizedPathname.indexOf(marker);
|
|
1303
|
+
if (index > 0) {
|
|
1304
|
+
return normalizeAdminBasePath(normalizedPathname.slice(0, index));
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
if (normalizedPathname === normalizedFallback || normalizedPathname.startsWith(`${normalizedFallback}/`)) {
|
|
1308
|
+
return normalizedFallback;
|
|
1309
|
+
}
|
|
1310
|
+
const segments = normalizedPathname.split("/").filter(Boolean);
|
|
1311
|
+
if (segments.length > 0) {
|
|
1312
|
+
return normalizeAdminBasePath(`/${segments[0]}`);
|
|
1313
|
+
}
|
|
1314
|
+
return normalizedFallback;
|
|
1315
|
+
};
|
|
1316
|
+
var isAbsoluteExternalURL = (value) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(value) || value.startsWith("//");
|
|
1317
|
+
var resolveAdminPath = (adminBasePath, targetPath) => {
|
|
1318
|
+
if (!targetPath) return adminBasePath;
|
|
1319
|
+
if (isAbsoluteExternalURL(targetPath)) return targetPath;
|
|
1320
|
+
const normalizedBasePath = normalizeAdminBasePath(adminBasePath);
|
|
1321
|
+
const normalizedTargetPath = normalizePath(targetPath);
|
|
1322
|
+
if (normalizedTargetPath === "/admin") {
|
|
1323
|
+
return normalizedBasePath;
|
|
1324
|
+
}
|
|
1325
|
+
if (normalizedTargetPath.startsWith("/admin/")) {
|
|
1326
|
+
return `${normalizedBasePath}${normalizedTargetPath.slice("/admin".length)}`;
|
|
1327
|
+
}
|
|
1328
|
+
if (normalizedTargetPath === normalizedBasePath || normalizedTargetPath.startsWith(`${normalizedBasePath}/`)) {
|
|
1329
|
+
return normalizedTargetPath;
|
|
1330
|
+
}
|
|
1331
|
+
if (normalizedTargetPath === "/") {
|
|
1332
|
+
return normalizedBasePath;
|
|
1333
|
+
}
|
|
1334
|
+
return `${normalizedBasePath}${normalizedTargetPath}`;
|
|
1335
|
+
};
|
|
1336
|
+
var useAdminBasePath = (fallback = DEFAULT_ADMIN_BASE_PATH) => {
|
|
1337
|
+
const [adminBasePath, setAdminBasePath] = useState6(normalizeAdminBasePath(fallback));
|
|
1338
|
+
useEffect6(() => {
|
|
1339
|
+
const update = () => {
|
|
1340
|
+
setAdminBasePath(detectAdminBasePath(window.location.pathname, fallback));
|
|
1341
|
+
};
|
|
1342
|
+
update();
|
|
1343
|
+
window.addEventListener("popstate", update);
|
|
1344
|
+
return () => window.removeEventListener("popstate", update);
|
|
1345
|
+
}, [fallback]);
|
|
1346
|
+
return adminBasePath;
|
|
1347
|
+
};
|
|
1301
1348
|
|
|
1302
1349
|
// src/shared/studioSections.ts
|
|
1303
1350
|
var studioRoles = /* @__PURE__ */ new Set(["admin", "editor", "client"]);
|
|
1304
1351
|
var studioIcons = new Set(adminNavIcons);
|
|
1305
1352
|
var isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
1306
|
-
var
|
|
1353
|
+
var isAbsoluteExternalURL2 = (value) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(value) || value.startsWith("//");
|
|
1307
1354
|
var normalizePathLikeValue = (value) => {
|
|
1308
1355
|
const trimmed = value.trim();
|
|
1309
1356
|
if (!trimmed) {
|
|
1310
1357
|
return "";
|
|
1311
1358
|
}
|
|
1312
|
-
if (
|
|
1359
|
+
if (isAbsoluteExternalURL2(trimmed)) {
|
|
1313
1360
|
return trimmed;
|
|
1314
1361
|
}
|
|
1315
1362
|
const withLeadingSlash = trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
|
|
@@ -1377,86 +1424,6 @@ var resolveStudioSections = (value) => {
|
|
|
1377
1424
|
return sections;
|
|
1378
1425
|
};
|
|
1379
1426
|
|
|
1380
|
-
// src/admin/components/studio/adminPathUtils.ts
|
|
1381
|
-
import { useEffect as useEffect6, useState as useState6 } from "react";
|
|
1382
|
-
var DEFAULT_ADMIN_BASE_PATH = "/admin";
|
|
1383
|
-
var normalizePath = (value) => {
|
|
1384
|
-
if (!value || value === "/") return "/";
|
|
1385
|
-
const withLeadingSlash = value.startsWith("/") ? value : `/${value}`;
|
|
1386
|
-
const trimmed = withLeadingSlash.replace(/\/+$/, "");
|
|
1387
|
-
return trimmed.length > 0 ? trimmed : "/";
|
|
1388
|
-
};
|
|
1389
|
-
var normalizeAdminBasePath = (value) => {
|
|
1390
|
-
const normalized = normalizePath(value);
|
|
1391
|
-
return normalized === "/" ? DEFAULT_ADMIN_BASE_PATH : normalized;
|
|
1392
|
-
};
|
|
1393
|
-
var detectAdminBasePath = (pathname, fallback = DEFAULT_ADMIN_BASE_PATH) => {
|
|
1394
|
-
const normalizedPathname = normalizePath(pathname);
|
|
1395
|
-
const normalizedFallback = normalizeAdminBasePath(fallback);
|
|
1396
|
-
const markers = [
|
|
1397
|
-
"/contact-form",
|
|
1398
|
-
"/collections/",
|
|
1399
|
-
"/globals/",
|
|
1400
|
-
"/forms",
|
|
1401
|
-
"/pages/",
|
|
1402
|
-
"/tools",
|
|
1403
|
-
"/media",
|
|
1404
|
-
"/logout",
|
|
1405
|
-
"/login"
|
|
1406
|
-
];
|
|
1407
|
-
for (const marker of markers) {
|
|
1408
|
-
const index = normalizedPathname.indexOf(marker);
|
|
1409
|
-
if (index > 0) {
|
|
1410
|
-
return normalizeAdminBasePath(normalizedPathname.slice(0, index));
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
if (normalizedPathname === normalizedFallback || normalizedPathname.startsWith(`${normalizedFallback}/`)) {
|
|
1414
|
-
return normalizedFallback;
|
|
1415
|
-
}
|
|
1416
|
-
const segments = normalizedPathname.split("/").filter(Boolean);
|
|
1417
|
-
if (segments.length > 0) {
|
|
1418
|
-
return normalizeAdminBasePath(`/${segments[0]}`);
|
|
1419
|
-
}
|
|
1420
|
-
return normalizedFallback;
|
|
1421
|
-
};
|
|
1422
|
-
var isAbsoluteExternalURL2 = (value) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(value) || value.startsWith("//");
|
|
1423
|
-
var resolveAdminPath = (adminBasePath, targetPath) => {
|
|
1424
|
-
if (!targetPath) return adminBasePath;
|
|
1425
|
-
if (isAbsoluteExternalURL2(targetPath)) return targetPath;
|
|
1426
|
-
const normalizedBasePath = normalizeAdminBasePath(adminBasePath);
|
|
1427
|
-
const normalizedTargetPath = normalizePath(targetPath);
|
|
1428
|
-
if (normalizedTargetPath === "/admin") {
|
|
1429
|
-
return normalizedBasePath;
|
|
1430
|
-
}
|
|
1431
|
-
if (normalizedTargetPath.startsWith("/admin/")) {
|
|
1432
|
-
return `${normalizedBasePath}${normalizedTargetPath.slice("/admin".length)}`;
|
|
1433
|
-
}
|
|
1434
|
-
if (normalizedTargetPath === normalizedBasePath || normalizedTargetPath.startsWith(`${normalizedBasePath}/`)) {
|
|
1435
|
-
return normalizedTargetPath;
|
|
1436
|
-
}
|
|
1437
|
-
if (normalizedTargetPath === "/") {
|
|
1438
|
-
return normalizedBasePath;
|
|
1439
|
-
}
|
|
1440
|
-
return `${normalizedBasePath}${normalizedTargetPath}`;
|
|
1441
|
-
};
|
|
1442
|
-
var useAdminBasePath = (fallback = DEFAULT_ADMIN_BASE_PATH) => {
|
|
1443
|
-
const [adminBasePath, setAdminBasePath] = useState6(normalizeAdminBasePath(fallback));
|
|
1444
|
-
useEffect6(() => {
|
|
1445
|
-
const update = () => {
|
|
1446
|
-
setAdminBasePath(detectAdminBasePath(window.location.pathname, fallback));
|
|
1447
|
-
};
|
|
1448
|
-
update();
|
|
1449
|
-
window.addEventListener("popstate", update);
|
|
1450
|
-
return () => window.removeEventListener("popstate", update);
|
|
1451
|
-
}, [fallback]);
|
|
1452
|
-
return adminBasePath;
|
|
1453
|
-
};
|
|
1454
|
-
|
|
1455
|
-
// src/admin/components/studio/StudioSectionLayout.tsx
|
|
1456
|
-
import { useLayoutEffect as useLayoutEffect2, useMemo } from "react";
|
|
1457
|
-
import { usePathname, useRouter } from "next/navigation";
|
|
1458
|
-
import { useAuth } from "@payloadcms/ui";
|
|
1459
|
-
|
|
1460
1427
|
// src/admin/components/studio/studioNavModel.ts
|
|
1461
1428
|
var getPropString = (props, key, fallback) => {
|
|
1462
1429
|
if (!props || typeof props !== "object") return fallback;
|
|
@@ -1530,7 +1497,7 @@ var buildStudioNavItems = (props, adminBasePath) => {
|
|
|
1530
1497
|
const resolvedGlobalsExtraMatchPrefixes = globalsExtraMatchPrefixes.map(
|
|
1531
1498
|
(prefix) => resolveAdminPath(adminBasePath, prefix)
|
|
1532
1499
|
);
|
|
1533
|
-
const
|
|
1500
|
+
const baseItemsBeforeTools = [
|
|
1534
1501
|
{
|
|
1535
1502
|
href: adminBasePath,
|
|
1536
1503
|
icon: "dashboard",
|
|
@@ -1571,15 +1538,15 @@ var buildStudioNavItems = (props, adminBasePath) => {
|
|
|
1571
1538
|
icon: "media",
|
|
1572
1539
|
label: "Media",
|
|
1573
1540
|
matchPrefixes: [mediaPath, resolveAdminPath(adminBasePath, `/collections/${mediaCollectionSlug}`)]
|
|
1574
|
-
},
|
|
1575
|
-
{
|
|
1576
|
-
href: toolsPath,
|
|
1577
|
-
icon: "tools",
|
|
1578
|
-
label: "Admin Tools",
|
|
1579
|
-
matchPrefixes: [toolsPath, resolveAdminPath(adminBasePath, "/collections/users")],
|
|
1580
|
-
roles: ["admin"]
|
|
1581
1541
|
}
|
|
1582
1542
|
];
|
|
1543
|
+
const adminToolsItem = {
|
|
1544
|
+
href: toolsPath,
|
|
1545
|
+
icon: "tools",
|
|
1546
|
+
label: "Admin Tools",
|
|
1547
|
+
matchPrefixes: [toolsPath, resolveAdminPath(adminBasePath, "/collections/users")],
|
|
1548
|
+
roles: ["admin"]
|
|
1549
|
+
};
|
|
1583
1550
|
const extensionItems = sections.map((section) => ({
|
|
1584
1551
|
href: resolveAdminPath(adminBasePath, section.href),
|
|
1585
1552
|
...section.icon ? { icon: section.icon } : {},
|
|
@@ -1587,7 +1554,7 @@ var buildStudioNavItems = (props, adminBasePath) => {
|
|
|
1587
1554
|
matchPrefixes: section.matchPrefixes.map((prefix) => resolveAdminPath(adminBasePath, prefix)),
|
|
1588
1555
|
roles: section.roles
|
|
1589
1556
|
}));
|
|
1590
|
-
return [...
|
|
1557
|
+
return [...baseItemsBeforeTools, ...extensionItems, adminToolsItem];
|
|
1591
1558
|
};
|
|
1592
1559
|
var isStudioShellRoute = (pathname, props, adminBasePath) => {
|
|
1593
1560
|
const globalsBasePath = getPropString(props, "globalsBasePath", "/globals");
|
|
@@ -1614,143 +1581,8 @@ var isStudioShellRoute = (pathname, props, adminBasePath) => {
|
|
|
1614
1581
|
return shellPrefixes.some((prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`));
|
|
1615
1582
|
};
|
|
1616
1583
|
|
|
1617
|
-
// src/admin/components/studio/StudioSectionLayout.tsx
|
|
1618
|
-
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1619
|
-
function StudioSectionLayout({ children, navProps }) {
|
|
1620
|
-
const { user } = useAuth();
|
|
1621
|
-
const pathname = usePathname() || "";
|
|
1622
|
-
const router = useRouter();
|
|
1623
|
-
const adminBasePath = useAdminBasePath();
|
|
1624
|
-
const defaultBrandName = getPropString(navProps, "brandName", "Orion Studio");
|
|
1625
|
-
const defaultLogoUrl = getPropString(navProps, "logoUrl", "");
|
|
1626
|
-
const navItems = useMemo(
|
|
1627
|
-
() => buildStudioNavItems(navProps, adminBasePath),
|
|
1628
|
-
[adminBasePath, navProps]
|
|
1629
|
-
);
|
|
1630
|
-
const branding = useSiteBranding(defaultBrandName, defaultLogoUrl || void 0);
|
|
1631
|
-
useLayoutEffect2(() => {
|
|
1632
|
-
document.body.classList.add("orion-studio-shell-active");
|
|
1633
|
-
return () => {
|
|
1634
|
-
document.body.classList.remove("orion-studio-shell-active");
|
|
1635
|
-
};
|
|
1636
|
-
}, []);
|
|
1637
|
-
const logout = useMemo(
|
|
1638
|
-
() => async () => {
|
|
1639
|
-
await fetch("/api/users/logout", {
|
|
1640
|
-
credentials: "include",
|
|
1641
|
-
method: "POST"
|
|
1642
|
-
});
|
|
1643
|
-
router.push(resolveAdminPath(adminBasePath, "/login"));
|
|
1644
|
-
router.refresh();
|
|
1645
|
-
},
|
|
1646
|
-
[adminBasePath, router]
|
|
1647
|
-
);
|
|
1648
|
-
return /* @__PURE__ */ jsx14(
|
|
1649
|
-
AdminShellClient,
|
|
1650
|
-
{
|
|
1651
|
-
brandName: branding.siteName || defaultBrandName,
|
|
1652
|
-
logoUrl: branding.logoUrl || defaultLogoUrl || void 0,
|
|
1653
|
-
navItems,
|
|
1654
|
-
onLogout: logout,
|
|
1655
|
-
pathname,
|
|
1656
|
-
storageKey: "orion-admin-sidebar-collapsed-v1",
|
|
1657
|
-
userEmail: typeof user?.email === "string" ? user.email : "user",
|
|
1658
|
-
userRole: readUserRole(user),
|
|
1659
|
-
children
|
|
1660
|
-
}
|
|
1661
|
-
);
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
// src/admin/components/studio/AdminStudioDashboard.tsx
|
|
1665
|
-
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1666
|
-
var getPropString2 = (props, key, fallback) => {
|
|
1667
|
-
if (!props || typeof props !== "object") return fallback;
|
|
1668
|
-
const direct = props[key];
|
|
1669
|
-
if (typeof direct === "string" && direct.length > 0) return direct;
|
|
1670
|
-
const clientProps = props.clientProps;
|
|
1671
|
-
if (clientProps && typeof clientProps === "object") {
|
|
1672
|
-
const nested = clientProps[key];
|
|
1673
|
-
if (typeof nested === "string" && nested.length > 0) return nested;
|
|
1674
|
-
}
|
|
1675
|
-
return fallback;
|
|
1676
|
-
};
|
|
1677
|
-
var getPropBoolean2 = (props, key, fallback) => {
|
|
1678
|
-
if (!props || typeof props !== "object") return fallback;
|
|
1679
|
-
const direct = props[key];
|
|
1680
|
-
if (typeof direct === "boolean") return direct;
|
|
1681
|
-
const clientProps = props.clientProps;
|
|
1682
|
-
if (clientProps && typeof clientProps === "object") {
|
|
1683
|
-
const nested = clientProps[key];
|
|
1684
|
-
if (typeof nested === "boolean") return nested;
|
|
1685
|
-
}
|
|
1686
|
-
return fallback;
|
|
1687
|
-
};
|
|
1688
|
-
var getPropSections2 = (props) => {
|
|
1689
|
-
if (!props || typeof props !== "object") return [];
|
|
1690
|
-
const direct = resolveStudioSections(props.sections);
|
|
1691
|
-
if (direct.length > 0) return direct;
|
|
1692
|
-
const clientProps = props.clientProps;
|
|
1693
|
-
if (clientProps && typeof clientProps === "object") {
|
|
1694
|
-
return resolveStudioSections(clientProps.sections);
|
|
1695
|
-
}
|
|
1696
|
-
return [];
|
|
1697
|
-
};
|
|
1698
|
-
function AdminStudioDashboard(props) {
|
|
1699
|
-
const formsEnabled = getPropBoolean2(props, "formsEnabled", false);
|
|
1700
|
-
const globalsBasePath = getPropString2(props, "globalsBasePath", "/globals");
|
|
1701
|
-
const sections = getPropSections2(props);
|
|
1702
|
-
const adminBasePath = useAdminBasePath();
|
|
1703
|
-
const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
|
|
1704
|
-
const formsPath = resolveAdminPath(adminBasePath, "/forms");
|
|
1705
|
-
const pagesPath = resolveAdminPath(adminBasePath, "/pages");
|
|
1706
|
-
const mediaPath = resolveAdminPath(adminBasePath, "/media");
|
|
1707
|
-
const toolsPath = resolveAdminPath(adminBasePath, "/tools");
|
|
1708
|
-
const extensionCards = sections.filter((section) => section.card).map((section) => ({
|
|
1709
|
-
href: resolveAdminPath(adminBasePath, section.href),
|
|
1710
|
-
title: section.card?.title || section.label,
|
|
1711
|
-
description: section.card?.description || ""
|
|
1712
|
-
}));
|
|
1713
|
-
return /* @__PURE__ */ jsx15(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsx15(
|
|
1714
|
-
AdminPage,
|
|
1715
|
-
{
|
|
1716
|
-
breadcrumbs: [{ label: "Dashboard" }],
|
|
1717
|
-
description: "Pick what you want to manage.",
|
|
1718
|
-
title: "Studio",
|
|
1719
|
-
children: /* @__PURE__ */ jsxs13("div", { className: "orion-admin-grid", children: [
|
|
1720
|
-
/* @__PURE__ */ jsxs13(Link, { className: "orion-admin-card", href: pagesPath, children: [
|
|
1721
|
-
/* @__PURE__ */ jsx15("strong", { children: "Pages" }),
|
|
1722
|
-
/* @__PURE__ */ jsx15("span", { children: "Manage and edit site pages in the custom builder." })
|
|
1723
|
-
] }),
|
|
1724
|
-
formsEnabled ? /* @__PURE__ */ jsxs13(Link, { className: "orion-admin-card", href: formsPath, children: [
|
|
1725
|
-
/* @__PURE__ */ jsx15("strong", { children: "Forms" }),
|
|
1726
|
-
/* @__PURE__ */ jsx15("span", { children: "Review forms, submissions, and uploaded files." })
|
|
1727
|
-
] }) : null,
|
|
1728
|
-
extensionCards.map((card) => /* @__PURE__ */ jsxs13(Link, { className: "orion-admin-card", href: card.href, children: [
|
|
1729
|
-
/* @__PURE__ */ jsx15("strong", { children: card.title }),
|
|
1730
|
-
/* @__PURE__ */ jsx15("span", { children: card.description })
|
|
1731
|
-
] }, card.href)),
|
|
1732
|
-
/* @__PURE__ */ jsxs13(Link, { className: "orion-admin-card", href: resolvedGlobalsBasePath, children: [
|
|
1733
|
-
/* @__PURE__ */ jsx15("strong", { children: "Globals" }),
|
|
1734
|
-
/* @__PURE__ */ jsx15("span", { children: "Update site settings, navigation, footer, social links, and form settings." })
|
|
1735
|
-
] }),
|
|
1736
|
-
/* @__PURE__ */ jsxs13(Link, { className: "orion-admin-card", href: mediaPath, children: [
|
|
1737
|
-
/* @__PURE__ */ jsx15("strong", { children: "Media" }),
|
|
1738
|
-
/* @__PURE__ */ jsx15("span", { children: "Upload and manage all site media assets." })
|
|
1739
|
-
] }),
|
|
1740
|
-
/* @__PURE__ */ jsxs13(Link, { className: "orion-admin-card", href: toolsPath, children: [
|
|
1741
|
-
/* @__PURE__ */ jsx15("strong", { children: "Admin Tools" }),
|
|
1742
|
-
/* @__PURE__ */ jsx15("span", { children: "Manage users, roles, and system fallback links." })
|
|
1743
|
-
] })
|
|
1744
|
-
] })
|
|
1745
|
-
}
|
|
1746
|
-
) });
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
1584
|
// src/admin/components/studio/AdminStudioNav.tsx
|
|
1750
|
-
import {
|
|
1751
|
-
import { usePathname as usePathname2 } from "next/navigation";
|
|
1752
|
-
import { Logout, useAuth as useAuth2 } from "@payloadcms/ui";
|
|
1753
|
-
import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1585
|
+
import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1754
1586
|
var iconSize2 = 18;
|
|
1755
1587
|
function NavIcon({ sectionID }) {
|
|
1756
1588
|
const props = {
|
|
@@ -1765,63 +1597,63 @@ function NavIcon({ sectionID }) {
|
|
|
1765
1597
|
};
|
|
1766
1598
|
switch (sectionID) {
|
|
1767
1599
|
case "dashboard":
|
|
1768
|
-
return /* @__PURE__ */
|
|
1769
|
-
/* @__PURE__ */
|
|
1770
|
-
/* @__PURE__ */
|
|
1771
|
-
/* @__PURE__ */
|
|
1772
|
-
/* @__PURE__ */
|
|
1600
|
+
return /* @__PURE__ */ jsxs11("svg", { ...props, children: [
|
|
1601
|
+
/* @__PURE__ */ jsx12("rect", { x: "3", y: "3", width: "7", height: "9", rx: "1" }),
|
|
1602
|
+
/* @__PURE__ */ jsx12("rect", { x: "14", y: "3", width: "7", height: "5", rx: "1" }),
|
|
1603
|
+
/* @__PURE__ */ jsx12("rect", { x: "14", y: "12", width: "7", height: "9", rx: "1" }),
|
|
1604
|
+
/* @__PURE__ */ jsx12("rect", { x: "3", y: "16", width: "7", height: "5", rx: "1" })
|
|
1773
1605
|
] });
|
|
1774
1606
|
case "pages":
|
|
1775
|
-
return /* @__PURE__ */
|
|
1776
|
-
/* @__PURE__ */
|
|
1777
|
-
/* @__PURE__ */
|
|
1778
|
-
/* @__PURE__ */
|
|
1779
|
-
/* @__PURE__ */
|
|
1607
|
+
return /* @__PURE__ */ jsxs11("svg", { ...props, children: [
|
|
1608
|
+
/* @__PURE__ */ jsx12("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
|
|
1609
|
+
/* @__PURE__ */ jsx12("polyline", { points: "14 2 14 8 20 8" }),
|
|
1610
|
+
/* @__PURE__ */ jsx12("line", { x1: "8", y1: "13", x2: "16", y2: "13" }),
|
|
1611
|
+
/* @__PURE__ */ jsx12("line", { x1: "8", y1: "17", x2: "12", y2: "17" })
|
|
1780
1612
|
] });
|
|
1781
1613
|
case "forms":
|
|
1782
|
-
return /* @__PURE__ */
|
|
1783
|
-
/* @__PURE__ */
|
|
1784
|
-
/* @__PURE__ */
|
|
1785
|
-
/* @__PURE__ */
|
|
1786
|
-
/* @__PURE__ */
|
|
1787
|
-
/* @__PURE__ */
|
|
1614
|
+
return /* @__PURE__ */ jsxs11("svg", { ...props, children: [
|
|
1615
|
+
/* @__PURE__ */ jsx12("path", { d: "M9 3h6" }),
|
|
1616
|
+
/* @__PURE__ */ jsx12("path", { d: "M12 3v18" }),
|
|
1617
|
+
/* @__PURE__ */ jsx12("path", { d: "M5 7h14a2 2 0 0 1 2 2v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a2 2 0 0 1 2-2Z" }),
|
|
1618
|
+
/* @__PURE__ */ jsx12("path", { d: "M7 11h10" }),
|
|
1619
|
+
/* @__PURE__ */ jsx12("path", { d: "M7 15h6" })
|
|
1788
1620
|
] });
|
|
1789
1621
|
case "globals":
|
|
1790
|
-
return /* @__PURE__ */
|
|
1791
|
-
/* @__PURE__ */
|
|
1792
|
-
/* @__PURE__ */
|
|
1622
|
+
return /* @__PURE__ */ jsxs11("svg", { ...props, children: [
|
|
1623
|
+
/* @__PURE__ */ jsx12("circle", { cx: "12", cy: "12", r: "3" }),
|
|
1624
|
+
/* @__PURE__ */ jsx12("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
|
|
1793
1625
|
] });
|
|
1794
1626
|
case "media":
|
|
1795
|
-
return /* @__PURE__ */
|
|
1796
|
-
/* @__PURE__ */
|
|
1797
|
-
/* @__PURE__ */
|
|
1798
|
-
/* @__PURE__ */
|
|
1627
|
+
return /* @__PURE__ */ jsxs11("svg", { ...props, children: [
|
|
1628
|
+
/* @__PURE__ */ jsx12("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
1629
|
+
/* @__PURE__ */ jsx12("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
|
|
1630
|
+
/* @__PURE__ */ jsx12("polyline", { points: "21 15 16 10 5 21" })
|
|
1799
1631
|
] });
|
|
1800
1632
|
case "analytics":
|
|
1801
|
-
return /* @__PURE__ */
|
|
1802
|
-
/* @__PURE__ */
|
|
1803
|
-
/* @__PURE__ */
|
|
1804
|
-
/* @__PURE__ */
|
|
1805
|
-
/* @__PURE__ */
|
|
1633
|
+
return /* @__PURE__ */ jsxs11("svg", { ...props, children: [
|
|
1634
|
+
/* @__PURE__ */ jsx12("path", { d: "M4 19V5" }),
|
|
1635
|
+
/* @__PURE__ */ jsx12("path", { d: "M10 19V10" }),
|
|
1636
|
+
/* @__PURE__ */ jsx12("path", { d: "M16 19v-6" }),
|
|
1637
|
+
/* @__PURE__ */ jsx12("path", { d: "M22 19V3" })
|
|
1806
1638
|
] });
|
|
1807
1639
|
case "admin-tools":
|
|
1808
|
-
return /* @__PURE__ */
|
|
1640
|
+
return /* @__PURE__ */ jsx12("svg", { ...props, children: /* @__PURE__ */ jsx12("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76Z" }) });
|
|
1809
1641
|
default:
|
|
1810
1642
|
return null;
|
|
1811
1643
|
}
|
|
1812
1644
|
}
|
|
1813
1645
|
function AdminStudioNav(props) {
|
|
1814
|
-
const { user } =
|
|
1646
|
+
const { user } = useAuth();
|
|
1815
1647
|
const brandName = getPropString(props, "brandName", "Orion Studio");
|
|
1816
1648
|
const logoUrl = getPropString(props, "logoUrl", "");
|
|
1817
1649
|
const compact = getPropBoolean(props, "compact", false);
|
|
1818
1650
|
const adminBasePath = useAdminBasePath();
|
|
1819
|
-
const pathname =
|
|
1651
|
+
const pathname = usePathname() || "";
|
|
1820
1652
|
const branding = useSiteBranding(brandName, logoUrl || void 0);
|
|
1821
1653
|
const resolvedName = branding.siteName || brandName;
|
|
1822
1654
|
const dashboardPath = adminBasePath;
|
|
1823
1655
|
const userRole = readUserRole(user);
|
|
1824
|
-
const links =
|
|
1656
|
+
const links = useMemo(() => buildStudioNavItems(props, adminBasePath), [adminBasePath, props]);
|
|
1825
1657
|
if (isStudioShellRoute(pathname, props, adminBasePath)) {
|
|
1826
1658
|
return null;
|
|
1827
1659
|
}
|
|
@@ -1838,7 +1670,7 @@ function AdminStudioNav(props) {
|
|
|
1838
1670
|
padding: compact ? "0.6rem" : "0.6rem 0.75rem",
|
|
1839
1671
|
textDecoration: "none"
|
|
1840
1672
|
});
|
|
1841
|
-
return /* @__PURE__ */
|
|
1673
|
+
return /* @__PURE__ */ jsxs11(
|
|
1842
1674
|
"div",
|
|
1843
1675
|
{
|
|
1844
1676
|
style: {
|
|
@@ -1849,8 +1681,8 @@ function AdminStudioNav(props) {
|
|
|
1849
1681
|
padding: compact ? "0.8rem 0.5rem" : "1rem 0.85rem"
|
|
1850
1682
|
},
|
|
1851
1683
|
children: [
|
|
1852
|
-
/* @__PURE__ */
|
|
1853
|
-
branding.logoUrl ? /* @__PURE__ */
|
|
1684
|
+
/* @__PURE__ */ jsxs11("div", { className: "admin-studio-brand", style: { padding: compact ? "0" : "0 0.35rem 0 2.4rem" }, children: [
|
|
1685
|
+
branding.logoUrl ? /* @__PURE__ */ jsx12(
|
|
1854
1686
|
"div",
|
|
1855
1687
|
{
|
|
1856
1688
|
style: {
|
|
@@ -1860,10 +1692,10 @@ function AdminStudioNav(props) {
|
|
|
1860
1692
|
overflow: "hidden",
|
|
1861
1693
|
width: compact ? 34 : 40
|
|
1862
1694
|
},
|
|
1863
|
-
children: /* @__PURE__ */
|
|
1695
|
+
children: /* @__PURE__ */ jsx12("img", { alt: `${resolvedName} logo`, src: branding.logoUrl, style: { height: "100%", objectFit: "cover", width: "100%" } })
|
|
1864
1696
|
}
|
|
1865
1697
|
) : null,
|
|
1866
|
-
/* @__PURE__ */
|
|
1698
|
+
/* @__PURE__ */ jsx12(
|
|
1867
1699
|
"div",
|
|
1868
1700
|
{
|
|
1869
1701
|
style: {
|
|
@@ -1878,12 +1710,12 @@ function AdminStudioNav(props) {
|
|
|
1878
1710
|
children: compact ? resolvedName.slice(0, 1).toUpperCase() : resolvedName
|
|
1879
1711
|
}
|
|
1880
1712
|
),
|
|
1881
|
-
!compact ? /* @__PURE__ */
|
|
1713
|
+
!compact ? /* @__PURE__ */ jsx12("div", { style: { color: "var(--theme-elevation-600)", fontSize: "0.85rem" }, children: "Studio" }) : null
|
|
1882
1714
|
] }),
|
|
1883
|
-
/* @__PURE__ */
|
|
1715
|
+
/* @__PURE__ */ jsx12("nav", { style: { display: "grid", gap: "0.25rem" }, children: links.filter((link) => !link.roles || userRole && link.roles.includes(userRole)).map((link) => {
|
|
1884
1716
|
const active = link.href === dashboardPath ? pathname === dashboardPath : link.matchPrefixes.some((prefix) => pathname.startsWith(prefix));
|
|
1885
|
-
return /* @__PURE__ */
|
|
1886
|
-
const icon = /* @__PURE__ */
|
|
1717
|
+
return /* @__PURE__ */ jsx12("a", { href: link.href, style: linkStyle(active), title: link.label, children: (() => {
|
|
1718
|
+
const icon = /* @__PURE__ */ jsx12(
|
|
1887
1719
|
NavIcon,
|
|
1888
1720
|
{
|
|
1889
1721
|
sectionID: link.icon === "tools" ? "admin-tools" : link.icon || ""
|
|
@@ -1892,14 +1724,14 @@ function AdminStudioNav(props) {
|
|
|
1892
1724
|
if (compact) {
|
|
1893
1725
|
return icon || link.label.slice(0, 1);
|
|
1894
1726
|
}
|
|
1895
|
-
return /* @__PURE__ */
|
|
1727
|
+
return /* @__PURE__ */ jsxs11("span", { style: { alignItems: "center", display: "inline-flex", gap: "0.6rem" }, children: [
|
|
1896
1728
|
icon,
|
|
1897
|
-
/* @__PURE__ */
|
|
1729
|
+
/* @__PURE__ */ jsx12("span", { children: link.label })
|
|
1898
1730
|
] });
|
|
1899
1731
|
})() }, link.href);
|
|
1900
1732
|
}) }),
|
|
1901
|
-
/* @__PURE__ */
|
|
1902
|
-
/* @__PURE__ */
|
|
1733
|
+
/* @__PURE__ */ jsx12("div", { style: { flex: 1 } }),
|
|
1734
|
+
/* @__PURE__ */ jsxs11(
|
|
1903
1735
|
"div",
|
|
1904
1736
|
{
|
|
1905
1737
|
style: {
|
|
@@ -1908,11 +1740,11 @@ function AdminStudioNav(props) {
|
|
|
1908
1740
|
textAlign: compact ? "center" : "left"
|
|
1909
1741
|
},
|
|
1910
1742
|
children: [
|
|
1911
|
-
!compact ? /* @__PURE__ */
|
|
1912
|
-
/* @__PURE__ */
|
|
1913
|
-
/* @__PURE__ */
|
|
1743
|
+
!compact ? /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
1744
|
+
/* @__PURE__ */ jsx12("div", { style: { color: "var(--theme-elevation-700)", fontSize: "0.85rem" }, children: "Signed in as" }),
|
|
1745
|
+
/* @__PURE__ */ jsx12("div", { style: { fontWeight: 800, marginBottom: "0.55rem" }, children: typeof user?.email === "string" ? user.email : "User" })
|
|
1914
1746
|
] }) : null,
|
|
1915
|
-
/* @__PURE__ */
|
|
1747
|
+
/* @__PURE__ */ jsx12(Logout, {})
|
|
1916
1748
|
]
|
|
1917
1749
|
}
|
|
1918
1750
|
)
|
|
@@ -1921,17 +1753,99 @@ function AdminStudioNav(props) {
|
|
|
1921
1753
|
);
|
|
1922
1754
|
}
|
|
1923
1755
|
|
|
1756
|
+
// src/admin/components/studio/StudioSectionLayout.tsx
|
|
1757
|
+
import { useLayoutEffect as useLayoutEffect2, useMemo as useMemo2 } from "react";
|
|
1758
|
+
import { usePathname as usePathname2, useRouter } from "next/navigation";
|
|
1759
|
+
import { useAuth as useAuth2 } from "@payloadcms/ui";
|
|
1760
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1761
|
+
function StudioSectionLayout({ children, navProps }) {
|
|
1762
|
+
const { user } = useAuth2();
|
|
1763
|
+
const pathname = usePathname2() || "";
|
|
1764
|
+
const router = useRouter();
|
|
1765
|
+
const adminBasePath = useAdminBasePath();
|
|
1766
|
+
const defaultBrandName = getPropString(navProps, "brandName", "Orion Studio");
|
|
1767
|
+
const defaultLogoUrl = getPropString(navProps, "logoUrl", "");
|
|
1768
|
+
const navItems = useMemo2(
|
|
1769
|
+
() => buildStudioNavItems(navProps, adminBasePath),
|
|
1770
|
+
[adminBasePath, navProps]
|
|
1771
|
+
);
|
|
1772
|
+
const branding = useSiteBranding(defaultBrandName, defaultLogoUrl || void 0);
|
|
1773
|
+
useLayoutEffect2(() => {
|
|
1774
|
+
document.body.classList.add("orion-studio-shell-active");
|
|
1775
|
+
return () => {
|
|
1776
|
+
document.body.classList.remove("orion-studio-shell-active");
|
|
1777
|
+
};
|
|
1778
|
+
}, []);
|
|
1779
|
+
const logout = useMemo2(
|
|
1780
|
+
() => async () => {
|
|
1781
|
+
await fetch("/api/users/logout", {
|
|
1782
|
+
credentials: "include",
|
|
1783
|
+
method: "POST"
|
|
1784
|
+
});
|
|
1785
|
+
router.push(resolveAdminPath(adminBasePath, "/login"));
|
|
1786
|
+
router.refresh();
|
|
1787
|
+
},
|
|
1788
|
+
[adminBasePath, router]
|
|
1789
|
+
);
|
|
1790
|
+
return /* @__PURE__ */ jsx13(
|
|
1791
|
+
AdminShellClient,
|
|
1792
|
+
{
|
|
1793
|
+
brandName: branding.siteName || defaultBrandName,
|
|
1794
|
+
logoUrl: branding.logoUrl || defaultLogoUrl || void 0,
|
|
1795
|
+
navItems,
|
|
1796
|
+
onLogout: logout,
|
|
1797
|
+
pathname,
|
|
1798
|
+
storageKey: "orion-admin-sidebar-collapsed-v1",
|
|
1799
|
+
userEmail: typeof user?.email === "string" ? user.email : "user",
|
|
1800
|
+
userRole: readUserRole(user),
|
|
1801
|
+
children
|
|
1802
|
+
}
|
|
1803
|
+
);
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1924
1806
|
// src/admin/components/studio/AdminStudioPagesListView.tsx
|
|
1925
1807
|
import { useEffect as useEffect7, useMemo as useMemo3, useState as useState7 } from "react";
|
|
1926
|
-
import
|
|
1808
|
+
import Link from "next/link";
|
|
1927
1809
|
import { useAuth as useAuth3 } from "@payloadcms/ui";
|
|
1928
|
-
|
|
1810
|
+
|
|
1811
|
+
// src/admin-app/components/AdminBreadcrumbs.tsx
|
|
1812
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1813
|
+
function AdminBreadcrumbs({ items }) {
|
|
1814
|
+
return /* @__PURE__ */ jsx14("nav", { "aria-label": "Breadcrumb", className: "orion-admin-breadcrumbs", children: items.map((item, index) => {
|
|
1815
|
+
const isLast = index === items.length - 1;
|
|
1816
|
+
return /* @__PURE__ */ jsxs12("span", { children: [
|
|
1817
|
+
item.href && !isLast ? /* @__PURE__ */ jsx14("a", { href: item.href, children: item.label }) : /* @__PURE__ */ jsx14("span", { children: item.label }),
|
|
1818
|
+
!isLast ? /* @__PURE__ */ jsx14("span", { className: "orion-admin-breadcrumb-sep", children: "/" }) : null
|
|
1819
|
+
] }, `${item.label}-${index}`);
|
|
1820
|
+
}) });
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
// src/admin-app/components/AdminPage.tsx
|
|
1824
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1825
|
+
function AdminPage({ title, description, breadcrumbs, actions, children }) {
|
|
1826
|
+
return /* @__PURE__ */ jsxs13("div", { className: "orion-admin-page", children: [
|
|
1827
|
+
/* @__PURE__ */ jsxs13("div", { className: "orion-admin-page-header", children: [
|
|
1828
|
+
/* @__PURE__ */ jsx15(AdminBreadcrumbs, { items: breadcrumbs }),
|
|
1829
|
+
/* @__PURE__ */ jsxs13("div", { className: "orion-admin-page-title-row", children: [
|
|
1830
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
1831
|
+
/* @__PURE__ */ jsx15("h1", { children: title }),
|
|
1832
|
+
description ? /* @__PURE__ */ jsx15("p", { children: description }) : null
|
|
1833
|
+
] }),
|
|
1834
|
+
actions ? /* @__PURE__ */ jsx15("div", { className: "orion-admin-page-actions", children: actions }) : null
|
|
1835
|
+
] })
|
|
1836
|
+
] }),
|
|
1837
|
+
/* @__PURE__ */ jsx15("div", { className: "orion-admin-page-content", children })
|
|
1838
|
+
] });
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
// src/admin/components/studio/AdminStudioPagesListView.tsx
|
|
1842
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1929
1843
|
var isAdmin = (user) => {
|
|
1930
1844
|
if (!user || typeof user !== "object") return false;
|
|
1931
1845
|
const role = user.role;
|
|
1932
1846
|
return typeof role === "string" && role === "admin";
|
|
1933
1847
|
};
|
|
1934
|
-
var
|
|
1848
|
+
var getPropString2 = (props, key, fallback) => {
|
|
1935
1849
|
if (!props || typeof props !== "object") return fallback;
|
|
1936
1850
|
const direct = props[key];
|
|
1937
1851
|
if (typeof direct === "string" && direct.length > 0) return direct;
|
|
@@ -1944,7 +1858,7 @@ var getPropString3 = (props, key, fallback) => {
|
|
|
1944
1858
|
};
|
|
1945
1859
|
function AdminStudioPagesListView(props) {
|
|
1946
1860
|
const { user } = useAuth3();
|
|
1947
|
-
const pagesCollectionSlug =
|
|
1861
|
+
const pagesCollectionSlug = getPropString2(props, "pagesCollectionSlug", "pages");
|
|
1948
1862
|
const adminBasePath = useAdminBasePath();
|
|
1949
1863
|
const newPagePath = resolveAdminPath(adminBasePath, "/pages/new");
|
|
1950
1864
|
const [loading, setLoading] = useState7(true);
|
|
@@ -1989,10 +1903,10 @@ function AdminStudioPagesListView(props) {
|
|
|
1989
1903
|
cancelled = true;
|
|
1990
1904
|
};
|
|
1991
1905
|
}, [apiURL]);
|
|
1992
|
-
return /* @__PURE__ */
|
|
1906
|
+
return /* @__PURE__ */ jsx16(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs14(
|
|
1993
1907
|
AdminPage,
|
|
1994
1908
|
{
|
|
1995
|
-
actions: isAdmin(user) ? /* @__PURE__ */
|
|
1909
|
+
actions: isAdmin(user) ? /* @__PURE__ */ jsx16(Link, { className: "orion-admin-action-button", href: newPagePath, children: "New Page" }) : null,
|
|
1996
1910
|
breadcrumbs: [
|
|
1997
1911
|
{ label: "Dashboard", href: adminBasePath },
|
|
1998
1912
|
{ label: "Pages" }
|
|
@@ -2000,21 +1914,21 @@ function AdminStudioPagesListView(props) {
|
|
|
2000
1914
|
description: "Open a page to edit it in the inline custom builder.",
|
|
2001
1915
|
title: "Pages",
|
|
2002
1916
|
children: [
|
|
2003
|
-
loading ? /* @__PURE__ */
|
|
2004
|
-
error ? /* @__PURE__ */
|
|
2005
|
-
/* @__PURE__ */
|
|
2006
|
-
!loading && !error && docs.length === 0 ? /* @__PURE__ */
|
|
2007
|
-
/* @__PURE__ */
|
|
2008
|
-
/* @__PURE__ */
|
|
1917
|
+
loading ? /* @__PURE__ */ jsx16("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
|
|
1918
|
+
error ? /* @__PURE__ */ jsx16("div", { className: "orion-admin-error", children: error }) : null,
|
|
1919
|
+
/* @__PURE__ */ jsxs14("div", { className: "orion-admin-list", children: [
|
|
1920
|
+
!loading && !error && docs.length === 0 ? /* @__PURE__ */ jsxs14("div", { className: "orion-admin-card", children: [
|
|
1921
|
+
/* @__PURE__ */ jsx16("strong", { children: "No pages yet" }),
|
|
1922
|
+
/* @__PURE__ */ jsx16("span", { children: "Create the first page to start building content." })
|
|
2009
1923
|
] }) : null,
|
|
2010
1924
|
docs.map((doc) => {
|
|
2011
1925
|
const id = typeof doc.id === "string" || typeof doc.id === "number" ? String(doc.id) : "";
|
|
2012
1926
|
if (!id) return null;
|
|
2013
1927
|
const title = typeof doc.title === "string" ? doc.title : "Untitled Page";
|
|
2014
1928
|
const status = typeof doc._status === "string" ? doc._status : "draft";
|
|
2015
|
-
return /* @__PURE__ */
|
|
2016
|
-
/* @__PURE__ */
|
|
2017
|
-
/* @__PURE__ */
|
|
1929
|
+
return /* @__PURE__ */ jsxs14(Link, { className: "orion-admin-list-item", href: resolveAdminPath(adminBasePath, `/pages/${id}`), children: [
|
|
1930
|
+
/* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsx16("strong", { children: title }) }),
|
|
1931
|
+
/* @__PURE__ */ jsx16("span", { className: "orion-admin-pill", children: status })
|
|
2018
1932
|
] }, id);
|
|
2019
1933
|
})
|
|
2020
1934
|
] })
|
|
@@ -2026,7 +1940,7 @@ function AdminStudioPagesListView(props) {
|
|
|
2026
1940
|
// src/admin/components/studio/AdminStudioPageEditView.tsx
|
|
2027
1941
|
import { useEffect as useEffect8, useMemo as useMemo4, useRef as useRef3, useState as useState8 } from "react";
|
|
2028
1942
|
import { SetStepNav, toast, useAuth as useAuth4 } from "@payloadcms/ui";
|
|
2029
|
-
import { Fragment as Fragment3, jsx as
|
|
1943
|
+
import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2030
1944
|
var isAdmin2 = (user) => {
|
|
2031
1945
|
if (!user || typeof user !== "object") return false;
|
|
2032
1946
|
const role = user.role;
|
|
@@ -2037,7 +1951,7 @@ var isEditor = (user) => {
|
|
|
2037
1951
|
const role = user.role;
|
|
2038
1952
|
return typeof role === "string" && role === "editor";
|
|
2039
1953
|
};
|
|
2040
|
-
var
|
|
1954
|
+
var getPropString3 = (props, key, fallback) => {
|
|
2041
1955
|
if (!props || typeof props !== "object") return fallback;
|
|
2042
1956
|
const direct = props[key];
|
|
2043
1957
|
if (typeof direct === "string" && direct.length > 0) return direct;
|
|
@@ -2072,7 +1986,7 @@ function AdminStudioPageEditView(props) {
|
|
|
2072
1986
|
const [hasUnpublishedChanges, setHasUnpublishedChanges] = useState8(false);
|
|
2073
1987
|
const [canUndo, setCanUndo] = useState8(false);
|
|
2074
1988
|
const [canRedo, setCanRedo] = useState8(false);
|
|
2075
|
-
const builderBasePath =
|
|
1989
|
+
const builderBasePath = getPropString3(props, "builderBasePath", "/builder");
|
|
2076
1990
|
const pagesPath = resolveAdminPath(adminBasePath, "/pages");
|
|
2077
1991
|
const pageIDFromParams = useMemo4(() => getParam(props.params, "id"), [props.params]);
|
|
2078
1992
|
const [pageID, setPageID] = useState8(pageIDFromParams);
|
|
@@ -2179,8 +2093,8 @@ function AdminStudioPageEditView(props) {
|
|
|
2179
2093
|
return () => window.removeEventListener("message", onMessage);
|
|
2180
2094
|
}, []);
|
|
2181
2095
|
if (!pageID && !didResolvePathFallback) {
|
|
2182
|
-
return /* @__PURE__ */
|
|
2183
|
-
/* @__PURE__ */
|
|
2096
|
+
return /* @__PURE__ */ jsx17(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
2097
|
+
/* @__PURE__ */ jsx17(
|
|
2184
2098
|
SetStepNav,
|
|
2185
2099
|
{
|
|
2186
2100
|
nav: [
|
|
@@ -2189,13 +2103,13 @@ function AdminStudioPageEditView(props) {
|
|
|
2189
2103
|
]
|
|
2190
2104
|
}
|
|
2191
2105
|
),
|
|
2192
|
-
/* @__PURE__ */
|
|
2193
|
-
/* @__PURE__ */
|
|
2106
|
+
/* @__PURE__ */ jsx17("h1", { style: { margin: 0 }, children: "Page Editor" }),
|
|
2107
|
+
/* @__PURE__ */ jsx17("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading page editor..." })
|
|
2194
2108
|
] }) });
|
|
2195
2109
|
}
|
|
2196
2110
|
if (!pageID) {
|
|
2197
|
-
return /* @__PURE__ */
|
|
2198
|
-
/* @__PURE__ */
|
|
2111
|
+
return /* @__PURE__ */ jsx17(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
2112
|
+
/* @__PURE__ */ jsx17(
|
|
2199
2113
|
SetStepNav,
|
|
2200
2114
|
{
|
|
2201
2115
|
nav: [
|
|
@@ -2204,12 +2118,12 @@ function AdminStudioPageEditView(props) {
|
|
|
2204
2118
|
]
|
|
2205
2119
|
}
|
|
2206
2120
|
),
|
|
2207
|
-
/* @__PURE__ */
|
|
2208
|
-
/* @__PURE__ */
|
|
2121
|
+
/* @__PURE__ */ jsx17("h1", { style: { margin: 0 }, children: "Page Editor" }),
|
|
2122
|
+
/* @__PURE__ */ jsx17("p", { style: { color: "var(--theme-elevation-600)" }, children: "Missing page ID." })
|
|
2209
2123
|
] }) });
|
|
2210
2124
|
}
|
|
2211
|
-
return /* @__PURE__ */
|
|
2212
|
-
/* @__PURE__ */
|
|
2125
|
+
return /* @__PURE__ */ jsx17(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
2126
|
+
/* @__PURE__ */ jsx17(
|
|
2213
2127
|
SetStepNav,
|
|
2214
2128
|
{
|
|
2215
2129
|
nav: [
|
|
@@ -2218,8 +2132,8 @@ function AdminStudioPageEditView(props) {
|
|
|
2218
2132
|
]
|
|
2219
2133
|
}
|
|
2220
2134
|
),
|
|
2221
|
-
/* @__PURE__ */
|
|
2222
|
-
/* @__PURE__ */
|
|
2135
|
+
/* @__PURE__ */ jsxs15("div", { style: { display: "grid", gridTemplateRows: "auto 1fr", height: "calc(100vh - 120px)" }, children: [
|
|
2136
|
+
/* @__PURE__ */ jsxs15(
|
|
2223
2137
|
"div",
|
|
2224
2138
|
{
|
|
2225
2139
|
style: {
|
|
@@ -2235,9 +2149,9 @@ function AdminStudioPageEditView(props) {
|
|
|
2235
2149
|
zIndex: 20
|
|
2236
2150
|
},
|
|
2237
2151
|
children: [
|
|
2238
|
-
/* @__PURE__ */
|
|
2239
|
-
/* @__PURE__ */
|
|
2240
|
-
/* @__PURE__ */
|
|
2152
|
+
/* @__PURE__ */ jsxs15("div", { style: { minWidth: 0 }, children: [
|
|
2153
|
+
/* @__PURE__ */ jsx17("div", { style: { fontWeight: 900 }, children: "Page Editor" }),
|
|
2154
|
+
/* @__PURE__ */ jsxs15(
|
|
2241
2155
|
"div",
|
|
2242
2156
|
{
|
|
2243
2157
|
style: {
|
|
@@ -2253,9 +2167,9 @@ function AdminStudioPageEditView(props) {
|
|
|
2253
2167
|
}
|
|
2254
2168
|
)
|
|
2255
2169
|
] }),
|
|
2256
|
-
/* @__PURE__ */
|
|
2257
|
-
/* @__PURE__ */
|
|
2258
|
-
/* @__PURE__ */
|
|
2170
|
+
/* @__PURE__ */ jsxs15("div", { style: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
|
|
2171
|
+
/* @__PURE__ */ jsx17("div", { style: { color: dirty ? "var(--theme-elevation-900)" : "var(--theme-elevation-600)", fontSize: "0.85rem", fontWeight: 700 }, children: dirty ? "Unsaved changes" : "All changes saved" }),
|
|
2172
|
+
/* @__PURE__ */ jsx17(
|
|
2259
2173
|
"div",
|
|
2260
2174
|
{
|
|
2261
2175
|
style: {
|
|
@@ -2272,7 +2186,7 @@ function AdminStudioPageEditView(props) {
|
|
|
2272
2186
|
children: hasUnpublishedChanges ? "Unpublished draft changes" : "Live is up to date"
|
|
2273
2187
|
}
|
|
2274
2188
|
),
|
|
2275
|
-
/* @__PURE__ */
|
|
2189
|
+
/* @__PURE__ */ jsx17(
|
|
2276
2190
|
"button",
|
|
2277
2191
|
{
|
|
2278
2192
|
disabled: !canUndo,
|
|
@@ -2288,7 +2202,7 @@ function AdminStudioPageEditView(props) {
|
|
|
2288
2202
|
children: "Undo"
|
|
2289
2203
|
}
|
|
2290
2204
|
),
|
|
2291
|
-
/* @__PURE__ */
|
|
2205
|
+
/* @__PURE__ */ jsx17(
|
|
2292
2206
|
"button",
|
|
2293
2207
|
{
|
|
2294
2208
|
disabled: !canRedo,
|
|
@@ -2304,7 +2218,7 @@ function AdminStudioPageEditView(props) {
|
|
|
2304
2218
|
children: "Redo"
|
|
2305
2219
|
}
|
|
2306
2220
|
),
|
|
2307
|
-
/* @__PURE__ */
|
|
2221
|
+
/* @__PURE__ */ jsx17(
|
|
2308
2222
|
"button",
|
|
2309
2223
|
{
|
|
2310
2224
|
disabled: saving !== null,
|
|
@@ -2320,7 +2234,7 @@ function AdminStudioPageEditView(props) {
|
|
|
2320
2234
|
children: saving === "draft" ? "Saving\u2026" : "Save Draft"
|
|
2321
2235
|
}
|
|
2322
2236
|
),
|
|
2323
|
-
/* @__PURE__ */
|
|
2237
|
+
/* @__PURE__ */ jsx17(
|
|
2324
2238
|
"button",
|
|
2325
2239
|
{
|
|
2326
2240
|
disabled: !canPublish || saving !== null,
|
|
@@ -2343,7 +2257,7 @@ function AdminStudioPageEditView(props) {
|
|
|
2343
2257
|
]
|
|
2344
2258
|
}
|
|
2345
2259
|
),
|
|
2346
|
-
/* @__PURE__ */
|
|
2260
|
+
/* @__PURE__ */ jsx17(
|
|
2347
2261
|
"iframe",
|
|
2348
2262
|
{
|
|
2349
2263
|
ref: iframeRef,
|
|
@@ -2365,9 +2279,9 @@ function AdminStudioPageEditView(props) {
|
|
|
2365
2279
|
// src/admin/components/studio/AdminStudioNewPageView.tsx
|
|
2366
2280
|
import { useState as useState9 } from "react";
|
|
2367
2281
|
import { useAuth as useAuth5 } from "@payloadcms/ui";
|
|
2368
|
-
import { jsx as
|
|
2282
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2369
2283
|
var pageTemplates = ["standard", "landing", "services", "contact"];
|
|
2370
|
-
var
|
|
2284
|
+
var getPropString4 = (props, key, fallback) => {
|
|
2371
2285
|
if (!props || typeof props !== "object") return fallback;
|
|
2372
2286
|
const direct = props[key];
|
|
2373
2287
|
if (typeof direct === "string" && direct.length > 0) return direct;
|
|
@@ -2387,11 +2301,11 @@ var slugify = (value) => value.toLowerCase().trim().replace(/[^a-z0-9\s-]/g, "")
|
|
|
2387
2301
|
function AdminStudioNewPageView(props) {
|
|
2388
2302
|
const { user } = useAuth5();
|
|
2389
2303
|
const adminBasePath = useAdminBasePath();
|
|
2390
|
-
const pagesCollectionSlug =
|
|
2304
|
+
const pagesCollectionSlug = getPropString4(props, "pagesCollectionSlug", "pages");
|
|
2391
2305
|
const [submitting, setSubmitting] = useState9(false);
|
|
2392
2306
|
const [error, setError] = useState9(null);
|
|
2393
2307
|
if (!canManagePages(user)) {
|
|
2394
|
-
return /* @__PURE__ */
|
|
2308
|
+
return /* @__PURE__ */ jsx18(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsx18(
|
|
2395
2309
|
AdminPage,
|
|
2396
2310
|
{
|
|
2397
2311
|
breadcrumbs: [
|
|
@@ -2401,9 +2315,9 @@ function AdminStudioNewPageView(props) {
|
|
|
2401
2315
|
],
|
|
2402
2316
|
description: "You do not have access to create pages.",
|
|
2403
2317
|
title: "New Page",
|
|
2404
|
-
children: /* @__PURE__ */
|
|
2405
|
-
/* @__PURE__ */
|
|
2406
|
-
/* @__PURE__ */
|
|
2318
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "orion-admin-card", children: [
|
|
2319
|
+
/* @__PURE__ */ jsx18("strong", { children: "Access denied" }),
|
|
2320
|
+
/* @__PURE__ */ jsx18("span", { children: "This section is restricted to administrator and editor accounts." })
|
|
2407
2321
|
] })
|
|
2408
2322
|
}
|
|
2409
2323
|
) });
|
|
@@ -2448,7 +2362,7 @@ function AdminStudioNewPageView(props) {
|
|
|
2448
2362
|
setSubmitting(false);
|
|
2449
2363
|
}
|
|
2450
2364
|
};
|
|
2451
|
-
return /* @__PURE__ */
|
|
2365
|
+
return /* @__PURE__ */ jsx18(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsx18(
|
|
2452
2366
|
AdminPage,
|
|
2453
2367
|
{
|
|
2454
2368
|
breadcrumbs: [
|
|
@@ -2458,33 +2372,33 @@ function AdminStudioNewPageView(props) {
|
|
|
2458
2372
|
],
|
|
2459
2373
|
description: "Create a new page and open it in the custom editor.",
|
|
2460
2374
|
title: "New Page",
|
|
2461
|
-
children: /* @__PURE__ */
|
|
2462
|
-
error ? /* @__PURE__ */
|
|
2463
|
-
/* @__PURE__ */
|
|
2375
|
+
children: /* @__PURE__ */ jsxs16("form", { className: "orion-admin-form", onSubmit: createPage, children: [
|
|
2376
|
+
error ? /* @__PURE__ */ jsx18("div", { className: "orion-admin-error", children: error }) : null,
|
|
2377
|
+
/* @__PURE__ */ jsxs16("label", { children: [
|
|
2464
2378
|
"Title",
|
|
2465
|
-
/* @__PURE__ */
|
|
2379
|
+
/* @__PURE__ */ jsx18("input", { name: "title", placeholder: "Services", required: true, type: "text" })
|
|
2466
2380
|
] }),
|
|
2467
|
-
/* @__PURE__ */
|
|
2381
|
+
/* @__PURE__ */ jsxs16("label", { children: [
|
|
2468
2382
|
"Slug",
|
|
2469
|
-
/* @__PURE__ */
|
|
2383
|
+
/* @__PURE__ */ jsx18("input", { name: "slug", placeholder: "services", type: "text" })
|
|
2470
2384
|
] }),
|
|
2471
|
-
/* @__PURE__ */
|
|
2385
|
+
/* @__PURE__ */ jsxs16("label", { children: [
|
|
2472
2386
|
"Template",
|
|
2473
|
-
/* @__PURE__ */
|
|
2474
|
-
/* @__PURE__ */
|
|
2475
|
-
/* @__PURE__ */
|
|
2476
|
-
/* @__PURE__ */
|
|
2477
|
-
/* @__PURE__ */
|
|
2387
|
+
/* @__PURE__ */ jsxs16("select", { defaultValue: "standard", name: "template", children: [
|
|
2388
|
+
/* @__PURE__ */ jsx18("option", { value: "standard", children: "Standard" }),
|
|
2389
|
+
/* @__PURE__ */ jsx18("option", { value: "landing", children: "Landing" }),
|
|
2390
|
+
/* @__PURE__ */ jsx18("option", { value: "contact", children: "Contact" }),
|
|
2391
|
+
/* @__PURE__ */ jsx18("option", { value: "services", children: "Services" })
|
|
2478
2392
|
] })
|
|
2479
2393
|
] }),
|
|
2480
|
-
/* @__PURE__ */
|
|
2394
|
+
/* @__PURE__ */ jsx18("button", { disabled: submitting, type: "submit", children: submitting ? "Creating..." : "Create Page" })
|
|
2481
2395
|
] })
|
|
2482
2396
|
}
|
|
2483
2397
|
) });
|
|
2484
2398
|
}
|
|
2485
2399
|
|
|
2486
2400
|
// src/admin/components/studio/AdminStudioGlobalsView.tsx
|
|
2487
|
-
import { jsx as
|
|
2401
|
+
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2488
2402
|
var getPropGlobals = (props) => {
|
|
2489
2403
|
if (!props || typeof props !== "object") return null;
|
|
2490
2404
|
const direct = props.globals;
|
|
@@ -2504,7 +2418,7 @@ function AdminStudioGlobalsView(props) {
|
|
|
2504
2418
|
{ slug: "footer", label: "Footer" },
|
|
2505
2419
|
{ slug: "social-media", label: "Social Media" }
|
|
2506
2420
|
];
|
|
2507
|
-
return /* @__PURE__ */
|
|
2421
|
+
return /* @__PURE__ */ jsx19(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsx19(
|
|
2508
2422
|
AdminPage,
|
|
2509
2423
|
{
|
|
2510
2424
|
breadcrumbs: [
|
|
@@ -2513,17 +2427,17 @@ function AdminStudioGlobalsView(props) {
|
|
|
2513
2427
|
],
|
|
2514
2428
|
description: "Site-wide content and branding settings.",
|
|
2515
2429
|
title: "Globals",
|
|
2516
|
-
children: /* @__PURE__ */
|
|
2430
|
+
children: /* @__PURE__ */ jsx19("div", { className: "orion-admin-list", children: globals.map((global) => {
|
|
2517
2431
|
const href = resolveAdminPath(
|
|
2518
2432
|
adminBasePath,
|
|
2519
2433
|
typeof global.href === "string" ? global.href : `/globals/${global.slug}`
|
|
2520
2434
|
);
|
|
2521
|
-
return /* @__PURE__ */
|
|
2522
|
-
/* @__PURE__ */
|
|
2523
|
-
/* @__PURE__ */
|
|
2524
|
-
/* @__PURE__ */
|
|
2435
|
+
return /* @__PURE__ */ jsxs17("a", { className: "orion-admin-list-item", href, children: [
|
|
2436
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
2437
|
+
/* @__PURE__ */ jsx19("strong", { children: global.label }),
|
|
2438
|
+
/* @__PURE__ */ jsx19("div", { className: "orion-admin-list-meta", children: typeof global.description === "string" && global.description.length > 0 ? global.description : href })
|
|
2525
2439
|
] }),
|
|
2526
|
-
/* @__PURE__ */
|
|
2440
|
+
/* @__PURE__ */ jsx19("span", { className: "orion-admin-list-meta", children: "Open" })
|
|
2527
2441
|
] }, global.slug);
|
|
2528
2442
|
}) })
|
|
2529
2443
|
}
|
|
@@ -2532,8 +2446,8 @@ function AdminStudioGlobalsView(props) {
|
|
|
2532
2446
|
|
|
2533
2447
|
// src/admin/components/studio/AdminStudioSiteSettingsGlobalView.tsx
|
|
2534
2448
|
import { useEffect as useEffect9, useMemo as useMemo5, useState as useState10 } from "react";
|
|
2535
|
-
import { jsx as
|
|
2536
|
-
var
|
|
2449
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2450
|
+
var getPropString5 = (props, key, fallback) => {
|
|
2537
2451
|
if (!props || typeof props !== "object") return fallback;
|
|
2538
2452
|
const direct = props[key];
|
|
2539
2453
|
if (typeof direct === "string" && direct.length > 0) return direct;
|
|
@@ -2612,9 +2526,9 @@ var serializeRows = (value, formatter) => {
|
|
|
2612
2526
|
return value.filter((item) => Boolean(item) && typeof item === "object").map((item) => formatter(item)).filter((item) => Boolean(item)).join("\n");
|
|
2613
2527
|
};
|
|
2614
2528
|
function AdminStudioSiteSettingsGlobalView(props) {
|
|
2615
|
-
const globalSlug =
|
|
2616
|
-
const globalsBasePath =
|
|
2617
|
-
const mediaCollectionSlug =
|
|
2529
|
+
const globalSlug = getPropString5(props, "globalSlug", "site-settings");
|
|
2530
|
+
const globalsBasePath = getPropString5(props, "globalsBasePath", "/globals");
|
|
2531
|
+
const mediaCollectionSlug = getPropString5(props, "mediaCollectionSlug", "media");
|
|
2618
2532
|
const adminBasePath = useAdminBasePath();
|
|
2619
2533
|
const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
|
|
2620
2534
|
const [loading, setLoading] = useState10(true);
|
|
@@ -2769,7 +2683,7 @@ function AdminStudioSiteSettingsGlobalView(props) {
|
|
|
2769
2683
|
};
|
|
2770
2684
|
const logoID = getRelationID(globalData.logo);
|
|
2771
2685
|
const ogImageID = getRelationID(defaultSeo.ogImage);
|
|
2772
|
-
return /* @__PURE__ */
|
|
2686
|
+
return /* @__PURE__ */ jsx20(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs18(
|
|
2773
2687
|
AdminPage,
|
|
2774
2688
|
{
|
|
2775
2689
|
breadcrumbs: [
|
|
@@ -2780,126 +2694,126 @@ function AdminStudioSiteSettingsGlobalView(props) {
|
|
|
2780
2694
|
description: "Manage site-wide brand, SEO, and business metadata.",
|
|
2781
2695
|
title: "Website Settings",
|
|
2782
2696
|
children: [
|
|
2783
|
-
loading ? /* @__PURE__ */
|
|
2784
|
-
!loading ? /* @__PURE__ */
|
|
2785
|
-
error ? /* @__PURE__ */
|
|
2786
|
-
savedMessage ? /* @__PURE__ */
|
|
2787
|
-
/* @__PURE__ */
|
|
2697
|
+
loading ? /* @__PURE__ */ jsx20("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
|
|
2698
|
+
!loading ? /* @__PURE__ */ jsxs18("form", { className: "orion-admin-form", onSubmit: save, children: [
|
|
2699
|
+
error ? /* @__PURE__ */ jsx20("div", { className: "orion-admin-error", children: error }) : null,
|
|
2700
|
+
savedMessage ? /* @__PURE__ */ jsx20("div", { className: "orion-admin-success", children: savedMessage }) : null,
|
|
2701
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2788
2702
|
"Site Name",
|
|
2789
|
-
/* @__PURE__ */
|
|
2703
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(globalData.siteName || ""), name: "siteName", required: true, type: "text" })
|
|
2790
2704
|
] }),
|
|
2791
|
-
/* @__PURE__ */
|
|
2705
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2792
2706
|
"Tagline",
|
|
2793
|
-
/* @__PURE__ */
|
|
2707
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(globalData.tagline || ""), name: "tagline", type: "text" })
|
|
2794
2708
|
] }),
|
|
2795
|
-
/* @__PURE__ */
|
|
2709
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2796
2710
|
"Logo (media ID)",
|
|
2797
|
-
/* @__PURE__ */
|
|
2798
|
-
/* @__PURE__ */
|
|
2711
|
+
/* @__PURE__ */ jsxs18("select", { defaultValue: logoID ? String(logoID) : "", name: "logo", children: [
|
|
2712
|
+
/* @__PURE__ */ jsx20("option", { value: "", children: "No logo" }),
|
|
2799
2713
|
mediaOptions.map((asset) => {
|
|
2800
2714
|
const id = typeof asset.id === "string" || typeof asset.id === "number" ? String(asset.id) : "";
|
|
2801
2715
|
if (!id) return null;
|
|
2802
|
-
return /* @__PURE__ */
|
|
2716
|
+
return /* @__PURE__ */ jsx20("option", { value: id, children: asset.filename || `Media ${id}` }, id);
|
|
2803
2717
|
})
|
|
2804
2718
|
] })
|
|
2805
2719
|
] }),
|
|
2806
|
-
/* @__PURE__ */
|
|
2720
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2807
2721
|
"SEO Meta Title",
|
|
2808
|
-
/* @__PURE__ */
|
|
2722
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(defaultSeo.metaTitle || ""), name: "metaTitle", type: "text" })
|
|
2809
2723
|
] }),
|
|
2810
|
-
/* @__PURE__ */
|
|
2724
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2811
2725
|
"SEO Meta Description",
|
|
2812
|
-
/* @__PURE__ */
|
|
2726
|
+
/* @__PURE__ */ jsx20("textarea", { defaultValue: String(defaultSeo.metaDescription || ""), name: "metaDescription", rows: 3 })
|
|
2813
2727
|
] }),
|
|
2814
|
-
/* @__PURE__ */
|
|
2728
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2815
2729
|
"Canonical Base URL",
|
|
2816
|
-
/* @__PURE__ */
|
|
2730
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(defaultSeo.canonicalBaseUrl || ""), name: "canonicalBaseUrl", type: "text" })
|
|
2817
2731
|
] }),
|
|
2818
|
-
/* @__PURE__ */
|
|
2732
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2819
2733
|
"SEO OG Image (media ID)",
|
|
2820
|
-
/* @__PURE__ */
|
|
2821
|
-
/* @__PURE__ */
|
|
2734
|
+
/* @__PURE__ */ jsxs18("select", { defaultValue: ogImageID ? String(ogImageID) : "", name: "ogImage", children: [
|
|
2735
|
+
/* @__PURE__ */ jsx20("option", { value: "", children: "No image" }),
|
|
2822
2736
|
mediaOptions.map((asset) => {
|
|
2823
2737
|
const id = typeof asset.id === "string" || typeof asset.id === "number" ? String(asset.id) : "";
|
|
2824
2738
|
if (!id) return null;
|
|
2825
|
-
return /* @__PURE__ */
|
|
2739
|
+
return /* @__PURE__ */ jsx20("option", { value: id, children: asset.filename || `Media ${id}` }, id);
|
|
2826
2740
|
})
|
|
2827
2741
|
] })
|
|
2828
2742
|
] }),
|
|
2829
|
-
/* @__PURE__ */
|
|
2743
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2830
2744
|
"Business Schema Type",
|
|
2831
|
-
/* @__PURE__ */
|
|
2745
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(businessProfile.schemaType || "Store"), name: "schemaType", type: "text" })
|
|
2832
2746
|
] }),
|
|
2833
|
-
/* @__PURE__ */
|
|
2747
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2834
2748
|
"Business Description",
|
|
2835
|
-
/* @__PURE__ */
|
|
2749
|
+
/* @__PURE__ */ jsx20("textarea", { defaultValue: String(businessProfile.description || ""), name: "businessDescription", rows: 4 })
|
|
2836
2750
|
] }),
|
|
2837
|
-
/* @__PURE__ */
|
|
2751
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2838
2752
|
"Street Address",
|
|
2839
|
-
/* @__PURE__ */
|
|
2753
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(businessProfile.streetAddress || ""), name: "streetAddress", type: "text" })
|
|
2840
2754
|
] }),
|
|
2841
|
-
/* @__PURE__ */
|
|
2755
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2842
2756
|
"City",
|
|
2843
|
-
/* @__PURE__ */
|
|
2757
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(businessProfile.addressLocality || ""), name: "addressLocality", type: "text" })
|
|
2844
2758
|
] }),
|
|
2845
|
-
/* @__PURE__ */
|
|
2759
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2846
2760
|
"State / Region",
|
|
2847
|
-
/* @__PURE__ */
|
|
2761
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(businessProfile.addressRegion || ""), name: "addressRegion", type: "text" })
|
|
2848
2762
|
] }),
|
|
2849
|
-
/* @__PURE__ */
|
|
2763
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2850
2764
|
"Postal Code",
|
|
2851
|
-
/* @__PURE__ */
|
|
2765
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(businessProfile.postalCode || ""), name: "postalCode", type: "text" })
|
|
2852
2766
|
] }),
|
|
2853
|
-
/* @__PURE__ */
|
|
2767
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2854
2768
|
"Country Code",
|
|
2855
|
-
/* @__PURE__ */
|
|
2769
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(businessProfile.addressCountry || "US"), name: "addressCountry", type: "text" })
|
|
2856
2770
|
] }),
|
|
2857
|
-
/* @__PURE__ */
|
|
2771
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2858
2772
|
"Neighborhood",
|
|
2859
|
-
/* @__PURE__ */
|
|
2773
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(businessProfile.neighborhood || ""), name: "neighborhood", type: "text" })
|
|
2860
2774
|
] }),
|
|
2861
|
-
/* @__PURE__ */
|
|
2775
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2862
2776
|
"Latitude",
|
|
2863
|
-
/* @__PURE__ */
|
|
2777
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(businessProfile.latitude || ""), name: "latitude", type: "text" })
|
|
2864
2778
|
] }),
|
|
2865
|
-
/* @__PURE__ */
|
|
2779
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2866
2780
|
"Longitude",
|
|
2867
|
-
/* @__PURE__ */
|
|
2781
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(businessProfile.longitude || ""), name: "longitude", type: "text" })
|
|
2868
2782
|
] }),
|
|
2869
|
-
/* @__PURE__ */
|
|
2783
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2870
2784
|
"Price Range",
|
|
2871
|
-
/* @__PURE__ */
|
|
2785
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(businessProfile.priceRange || ""), name: "priceRange", type: "text" })
|
|
2872
2786
|
] }),
|
|
2873
|
-
/* @__PURE__ */
|
|
2787
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2874
2788
|
"Map URL",
|
|
2875
|
-
/* @__PURE__ */
|
|
2789
|
+
/* @__PURE__ */ jsx20("input", { defaultValue: String(businessProfile.mapUrl || ""), name: "mapUrl", type: "text" })
|
|
2876
2790
|
] }),
|
|
2877
|
-
/* @__PURE__ */
|
|
2791
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2878
2792
|
"LLM Summary",
|
|
2879
|
-
/* @__PURE__ */
|
|
2793
|
+
/* @__PURE__ */ jsx20("textarea", { defaultValue: String(businessProfile.llmsSummary || ""), name: "llmsSummary", rows: 4 })
|
|
2880
2794
|
] }),
|
|
2881
|
-
/* @__PURE__ */
|
|
2795
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2882
2796
|
"Opening Hours Rows",
|
|
2883
|
-
/* @__PURE__ */
|
|
2884
|
-
/* @__PURE__ */
|
|
2797
|
+
/* @__PURE__ */ jsx20("textarea", { defaultValue: openingHoursRows, name: "openingHoursRows", rows: 4 }),
|
|
2798
|
+
/* @__PURE__ */ jsxs18("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: [
|
|
2885
2799
|
"One row per line: ",
|
|
2886
|
-
/* @__PURE__ */
|
|
2800
|
+
/* @__PURE__ */ jsx20("code", { children: "Monday,Tuesday,Wednesday|10:00|19:00" })
|
|
2887
2801
|
] })
|
|
2888
2802
|
] }),
|
|
2889
|
-
/* @__PURE__ */
|
|
2803
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2890
2804
|
"Citation / SameAs URLs",
|
|
2891
|
-
/* @__PURE__ */
|
|
2892
|
-
/* @__PURE__ */
|
|
2805
|
+
/* @__PURE__ */ jsx20("textarea", { defaultValue: sameAsRows, name: "sameAsRows", rows: 4 }),
|
|
2806
|
+
/* @__PURE__ */ jsx20("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: "One absolute URL per line. Social links still come from the Social Media global." })
|
|
2893
2807
|
] }),
|
|
2894
|
-
/* @__PURE__ */
|
|
2808
|
+
/* @__PURE__ */ jsxs18("label", { children: [
|
|
2895
2809
|
"Service Schema Rows",
|
|
2896
|
-
/* @__PURE__ */
|
|
2897
|
-
/* @__PURE__ */
|
|
2810
|
+
/* @__PURE__ */ jsx20("textarea", { defaultValue: serviceCatalogRows, name: "serviceCatalogRows", rows: 6 }),
|
|
2811
|
+
/* @__PURE__ */ jsxs18("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: [
|
|
2898
2812
|
"One row per line: ",
|
|
2899
|
-
/* @__PURE__ */
|
|
2813
|
+
/* @__PURE__ */ jsx20("code", { children: "Name|Description|Optional price range|/page-path" })
|
|
2900
2814
|
] })
|
|
2901
2815
|
] }),
|
|
2902
|
-
/* @__PURE__ */
|
|
2816
|
+
/* @__PURE__ */ jsx20("button", { disabled: saving, type: "submit", children: saving ? "Saving..." : "Save Global" })
|
|
2903
2817
|
] }) : null
|
|
2904
2818
|
]
|
|
2905
2819
|
}
|
|
@@ -2989,10 +2903,10 @@ var SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM = SOCIAL_MEDIA_PLATFORMS.reduce(
|
|
|
2989
2903
|
);
|
|
2990
2904
|
|
|
2991
2905
|
// src/admin/components/studio/AdminStudioSocialMediaGlobalView.tsx
|
|
2992
|
-
import { jsx as
|
|
2906
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2993
2907
|
var getSocialUrlFieldName = (platform) => `social-${platform}-url`;
|
|
2994
2908
|
var getSocialIconFieldName = (platform) => `social-${platform}-icon`;
|
|
2995
|
-
var
|
|
2909
|
+
var getPropString6 = (props, key, fallback) => {
|
|
2996
2910
|
if (!props || typeof props !== "object") return fallback;
|
|
2997
2911
|
const direct = props[key];
|
|
2998
2912
|
if (typeof direct === "string" && direct.length > 0) return direct;
|
|
@@ -3040,8 +2954,8 @@ var normalizeOptionalProfileUrl = (value, platformLabel) => {
|
|
|
3040
2954
|
return parsed.toString();
|
|
3041
2955
|
};
|
|
3042
2956
|
function AdminStudioSocialMediaGlobalView(props) {
|
|
3043
|
-
const globalSlug =
|
|
3044
|
-
const globalsBasePath =
|
|
2957
|
+
const globalSlug = getPropString6(props, "globalSlug", "social-media");
|
|
2958
|
+
const globalsBasePath = getPropString6(props, "globalsBasePath", "/globals");
|
|
3045
2959
|
const adminBasePath = useAdminBasePath();
|
|
3046
2960
|
const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
|
|
3047
2961
|
const [loading, setLoading] = useState11(true);
|
|
@@ -3126,7 +3040,7 @@ function AdminStudioSocialMediaGlobalView(props) {
|
|
|
3126
3040
|
setSaving(false);
|
|
3127
3041
|
}
|
|
3128
3042
|
};
|
|
3129
|
-
return /* @__PURE__ */
|
|
3043
|
+
return /* @__PURE__ */ jsx21(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs19(
|
|
3130
3044
|
AdminPage,
|
|
3131
3045
|
{
|
|
3132
3046
|
breadcrumbs: [
|
|
@@ -3137,16 +3051,16 @@ function AdminStudioSocialMediaGlobalView(props) {
|
|
|
3137
3051
|
description: "Control which social profiles appear across the site.",
|
|
3138
3052
|
title: "Social Media",
|
|
3139
3053
|
children: [
|
|
3140
|
-
loading ? /* @__PURE__ */
|
|
3141
|
-
!loading ? /* @__PURE__ */
|
|
3142
|
-
error ? /* @__PURE__ */
|
|
3143
|
-
savedMessage ? /* @__PURE__ */
|
|
3144
|
-
/* @__PURE__ */
|
|
3054
|
+
loading ? /* @__PURE__ */ jsx21("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
|
|
3055
|
+
!loading ? /* @__PURE__ */ jsxs19("form", { className: "orion-admin-form", onSubmit: save, children: [
|
|
3056
|
+
error ? /* @__PURE__ */ jsx21("div", { className: "orion-admin-error", children: error }) : null,
|
|
3057
|
+
savedMessage ? /* @__PURE__ */ jsx21("div", { className: "orion-admin-success", children: savedMessage }) : null,
|
|
3058
|
+
/* @__PURE__ */ jsx21("div", { style: { color: "var(--orion-admin-muted)", fontSize: "0.88rem", fontWeight: 700 }, children: "Add URLs for the platforms you use. Leave a URL blank to hide that platform." }),
|
|
3145
3059
|
SOCIAL_MEDIA_PLATFORMS.map((platform) => {
|
|
3146
3060
|
const profile = socialProfiles[platform];
|
|
3147
3061
|
const platformLabel = SOCIAL_MEDIA_PLATFORM_LABELS[platform];
|
|
3148
3062
|
const placeholderDomain = platform === "x" ? "x.com" : `${platform}.com`;
|
|
3149
|
-
return /* @__PURE__ */
|
|
3063
|
+
return /* @__PURE__ */ jsxs19(
|
|
3150
3064
|
"fieldset",
|
|
3151
3065
|
{
|
|
3152
3066
|
style: {
|
|
@@ -3157,10 +3071,10 @@ function AdminStudioSocialMediaGlobalView(props) {
|
|
|
3157
3071
|
padding: "0.85rem"
|
|
3158
3072
|
},
|
|
3159
3073
|
children: [
|
|
3160
|
-
/* @__PURE__ */
|
|
3161
|
-
/* @__PURE__ */
|
|
3074
|
+
/* @__PURE__ */ jsx21("legend", { style: { fontWeight: 700, padding: "0 0.3rem" }, children: platformLabel }),
|
|
3075
|
+
/* @__PURE__ */ jsxs19("label", { children: [
|
|
3162
3076
|
"Profile URL",
|
|
3163
|
-
/* @__PURE__ */
|
|
3077
|
+
/* @__PURE__ */ jsx21(
|
|
3164
3078
|
"input",
|
|
3165
3079
|
{
|
|
3166
3080
|
defaultValue: profile.url,
|
|
@@ -3171,16 +3085,16 @@ function AdminStudioSocialMediaGlobalView(props) {
|
|
|
3171
3085
|
}
|
|
3172
3086
|
)
|
|
3173
3087
|
] }),
|
|
3174
|
-
/* @__PURE__ */
|
|
3088
|
+
/* @__PURE__ */ jsxs19("label", { children: [
|
|
3175
3089
|
"Icon Style",
|
|
3176
|
-
/* @__PURE__ */
|
|
3090
|
+
/* @__PURE__ */ jsx21("select", { defaultValue: profile.icon, name: getSocialIconFieldName(platform), children: SOCIAL_MEDIA_ICON_OPTIONS[platform].map((option) => /* @__PURE__ */ jsx21("option", { value: option.value, children: option.label }, option.value)) })
|
|
3177
3091
|
] })
|
|
3178
3092
|
]
|
|
3179
3093
|
},
|
|
3180
3094
|
platform
|
|
3181
3095
|
);
|
|
3182
3096
|
}),
|
|
3183
|
-
/* @__PURE__ */
|
|
3097
|
+
/* @__PURE__ */ jsx21("button", { disabled: saving, type: "submit", children: saving ? "Saving..." : "Save Global" })
|
|
3184
3098
|
] }) : null
|
|
3185
3099
|
]
|
|
3186
3100
|
}
|
|
@@ -3218,8 +3132,8 @@ function resolveSocialMediaLinks(data) {
|
|
|
3218
3132
|
}
|
|
3219
3133
|
|
|
3220
3134
|
// src/admin/components/studio/AdminStudioHeaderGlobalView.tsx
|
|
3221
|
-
import { jsx as
|
|
3222
|
-
var
|
|
3135
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3136
|
+
var getPropString7 = (props, key, fallback) => {
|
|
3223
3137
|
if (!props || typeof props !== "object") return fallback;
|
|
3224
3138
|
const direct = props[key];
|
|
3225
3139
|
if (typeof direct === "string" && direct.length > 0) return direct;
|
|
@@ -3275,11 +3189,11 @@ var resolveMediaURL = (value) => {
|
|
|
3275
3189
|
return "";
|
|
3276
3190
|
};
|
|
3277
3191
|
function AdminStudioHeaderGlobalView(props) {
|
|
3278
|
-
const globalSlug =
|
|
3279
|
-
const globalsBasePath =
|
|
3280
|
-
const pagesCollectionSlug =
|
|
3281
|
-
const actionHref =
|
|
3282
|
-
const actionLabel =
|
|
3192
|
+
const globalSlug = getPropString7(props, "globalSlug", "header");
|
|
3193
|
+
const globalsBasePath = getPropString7(props, "globalsBasePath", "/globals");
|
|
3194
|
+
const pagesCollectionSlug = getPropString7(props, "pagesCollectionSlug", "pages");
|
|
3195
|
+
const actionHref = getPropString7(props, "actionHref", "/contact");
|
|
3196
|
+
const actionLabel = getPropString7(props, "actionLabel", "Visit Today");
|
|
3283
3197
|
const locationSummary = getPropLocationSummary(props, "locationSummary");
|
|
3284
3198
|
const adminBasePath = useAdminBasePath();
|
|
3285
3199
|
const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
|
|
@@ -3402,8 +3316,8 @@ function AdminStudioHeaderGlobalView(props) {
|
|
|
3402
3316
|
setSaving(false);
|
|
3403
3317
|
}
|
|
3404
3318
|
};
|
|
3405
|
-
return /* @__PURE__ */
|
|
3406
|
-
/* @__PURE__ */
|
|
3319
|
+
return /* @__PURE__ */ jsx22(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs20("div", { style: { paddingBottom: "2rem" }, children: [
|
|
3320
|
+
/* @__PURE__ */ jsx22(
|
|
3407
3321
|
SetStepNav2,
|
|
3408
3322
|
{
|
|
3409
3323
|
nav: [
|
|
@@ -3412,13 +3326,13 @@ function AdminStudioHeaderGlobalView(props) {
|
|
|
3412
3326
|
]
|
|
3413
3327
|
}
|
|
3414
3328
|
),
|
|
3415
|
-
/* @__PURE__ */
|
|
3416
|
-
/* @__PURE__ */
|
|
3417
|
-
loading ? /* @__PURE__ */
|
|
3418
|
-
error ? /* @__PURE__ */
|
|
3419
|
-
savedMessage ? /* @__PURE__ */
|
|
3420
|
-
!loading ? /* @__PURE__ */
|
|
3421
|
-
/* @__PURE__ */
|
|
3329
|
+
/* @__PURE__ */ jsx22("h1", { style: { margin: 0 }, children: "Header & Navigation" }),
|
|
3330
|
+
/* @__PURE__ */ jsx22("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Manage the main website navigation and preview it in place." }),
|
|
3331
|
+
loading ? /* @__PURE__ */ jsx22("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading header settings\u2026" }) : null,
|
|
3332
|
+
error ? /* @__PURE__ */ jsx22("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
|
|
3333
|
+
savedMessage ? /* @__PURE__ */ jsx22("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
|
|
3334
|
+
!loading ? /* @__PURE__ */ jsxs20("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem" }, children: [
|
|
3335
|
+
/* @__PURE__ */ jsx22(
|
|
3422
3336
|
HeaderNavEditorWithPreview,
|
|
3423
3337
|
{
|
|
3424
3338
|
actionHref,
|
|
@@ -3435,7 +3349,7 @@ function AdminStudioHeaderGlobalView(props) {
|
|
|
3435
3349
|
},
|
|
3436
3350
|
editorKey
|
|
3437
3351
|
),
|
|
3438
|
-
/* @__PURE__ */
|
|
3352
|
+
/* @__PURE__ */ jsx22("div", { style: { display: "flex", gap: "0.6rem" }, children: /* @__PURE__ */ jsx22(
|
|
3439
3353
|
"button",
|
|
3440
3354
|
{
|
|
3441
3355
|
disabled: saving,
|
|
@@ -3461,8 +3375,8 @@ function AdminStudioHeaderGlobalView(props) {
|
|
|
3461
3375
|
// src/admin/components/studio/AdminStudioFooterGlobalView.tsx
|
|
3462
3376
|
import { useEffect as useEffect12, useMemo as useMemo8, useState as useState13 } from "react";
|
|
3463
3377
|
import { SetStepNav as SetStepNav3 } from "@payloadcms/ui";
|
|
3464
|
-
import { jsx as
|
|
3465
|
-
var
|
|
3378
|
+
import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3379
|
+
var getPropString8 = (props, key, fallback) => {
|
|
3466
3380
|
if (!props || typeof props !== "object") return fallback;
|
|
3467
3381
|
const direct = props[key];
|
|
3468
3382
|
if (typeof direct === "string") return direct;
|
|
@@ -3556,11 +3470,11 @@ var deriveHours = (siteSettings) => {
|
|
|
3556
3470
|
return `${dayOfWeek} \u2022 ${opens} - ${closes}`;
|
|
3557
3471
|
};
|
|
3558
3472
|
function AdminStudioFooterGlobalView(props) {
|
|
3559
|
-
const globalSlug =
|
|
3560
|
-
const globalsBasePath =
|
|
3561
|
-
const builtByHref =
|
|
3562
|
-
const builtByLabel =
|
|
3563
|
-
const description =
|
|
3473
|
+
const globalSlug = getPropString8(props, "globalSlug", "footer");
|
|
3474
|
+
const globalsBasePath = getPropString8(props, "globalsBasePath", "/globals");
|
|
3475
|
+
const builtByHref = getPropString8(props, "builtByHref", "");
|
|
3476
|
+
const builtByLabel = getPropString8(props, "builtByLabel", "");
|
|
3477
|
+
const description = getPropString8(props, "description", "");
|
|
3564
3478
|
const footerCategories = getPropStringArray2(props, "footerCategories");
|
|
3565
3479
|
const footerLinks = getPropLinks(props, "footerLinks");
|
|
3566
3480
|
const configuredLocationSummary = getPropLocationSummary2(props, "locationSummary");
|
|
@@ -3675,8 +3589,8 @@ function AdminStudioFooterGlobalView(props) {
|
|
|
3675
3589
|
setSaving(false);
|
|
3676
3590
|
}
|
|
3677
3591
|
};
|
|
3678
|
-
return /* @__PURE__ */
|
|
3679
|
-
/* @__PURE__ */
|
|
3592
|
+
return /* @__PURE__ */ jsx23(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs21("div", { style: { paddingBottom: "2rem" }, children: [
|
|
3593
|
+
/* @__PURE__ */ jsx23(
|
|
3680
3594
|
SetStepNav3,
|
|
3681
3595
|
{
|
|
3682
3596
|
nav: [
|
|
@@ -3685,13 +3599,13 @@ function AdminStudioFooterGlobalView(props) {
|
|
|
3685
3599
|
]
|
|
3686
3600
|
}
|
|
3687
3601
|
),
|
|
3688
|
-
/* @__PURE__ */
|
|
3689
|
-
/* @__PURE__ */
|
|
3690
|
-
loading ? /* @__PURE__ */
|
|
3691
|
-
error ? /* @__PURE__ */
|
|
3692
|
-
savedMessage ? /* @__PURE__ */
|
|
3693
|
-
!loading ? /* @__PURE__ */
|
|
3694
|
-
/* @__PURE__ */
|
|
3602
|
+
/* @__PURE__ */ jsx23("h1", { style: { margin: 0 }, children: "Footer" }),
|
|
3603
|
+
/* @__PURE__ */ jsx23("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Manage footer contact details and preview the package footer in place." }),
|
|
3604
|
+
loading ? /* @__PURE__ */ jsx23("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading footer settings\u2026" }) : null,
|
|
3605
|
+
error ? /* @__PURE__ */ jsx23("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
|
|
3606
|
+
savedMessage ? /* @__PURE__ */ jsx23("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
|
|
3607
|
+
!loading ? /* @__PURE__ */ jsxs21("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem" }, children: [
|
|
3608
|
+
/* @__PURE__ */ jsxs21(
|
|
3695
3609
|
"label",
|
|
3696
3610
|
{
|
|
3697
3611
|
style: {
|
|
@@ -3703,7 +3617,7 @@ function AdminStudioFooterGlobalView(props) {
|
|
|
3703
3617
|
},
|
|
3704
3618
|
children: [
|
|
3705
3619
|
"Copyright",
|
|
3706
|
-
/* @__PURE__ */
|
|
3620
|
+
/* @__PURE__ */ jsx23(
|
|
3707
3621
|
"input",
|
|
3708
3622
|
{
|
|
3709
3623
|
onChange: (event) => setDoc((current) => ({ ...current, copyright: event.target.value })),
|
|
@@ -3724,7 +3638,7 @@ function AdminStudioFooterGlobalView(props) {
|
|
|
3724
3638
|
]
|
|
3725
3639
|
}
|
|
3726
3640
|
),
|
|
3727
|
-
/* @__PURE__ */
|
|
3641
|
+
/* @__PURE__ */ jsxs21(
|
|
3728
3642
|
"label",
|
|
3729
3643
|
{
|
|
3730
3644
|
style: {
|
|
@@ -3736,7 +3650,7 @@ function AdminStudioFooterGlobalView(props) {
|
|
|
3736
3650
|
},
|
|
3737
3651
|
children: [
|
|
3738
3652
|
"Contact Email",
|
|
3739
|
-
/* @__PURE__ */
|
|
3653
|
+
/* @__PURE__ */ jsx23(
|
|
3740
3654
|
"input",
|
|
3741
3655
|
{
|
|
3742
3656
|
onChange: (event) => setDoc((current) => ({ ...current, contactEmail: event.target.value })),
|
|
@@ -3757,7 +3671,7 @@ function AdminStudioFooterGlobalView(props) {
|
|
|
3757
3671
|
]
|
|
3758
3672
|
}
|
|
3759
3673
|
),
|
|
3760
|
-
/* @__PURE__ */
|
|
3674
|
+
/* @__PURE__ */ jsxs21(
|
|
3761
3675
|
"label",
|
|
3762
3676
|
{
|
|
3763
3677
|
style: {
|
|
@@ -3769,7 +3683,7 @@ function AdminStudioFooterGlobalView(props) {
|
|
|
3769
3683
|
},
|
|
3770
3684
|
children: [
|
|
3771
3685
|
"Contact Phone",
|
|
3772
|
-
/* @__PURE__ */
|
|
3686
|
+
/* @__PURE__ */ jsx23(
|
|
3773
3687
|
"input",
|
|
3774
3688
|
{
|
|
3775
3689
|
onChange: (event) => setDoc((current) => ({ ...current, contactPhone: event.target.value })),
|
|
@@ -3790,8 +3704,8 @@ function AdminStudioFooterGlobalView(props) {
|
|
|
3790
3704
|
]
|
|
3791
3705
|
}
|
|
3792
3706
|
),
|
|
3793
|
-
/* @__PURE__ */
|
|
3794
|
-
/* @__PURE__ */
|
|
3707
|
+
/* @__PURE__ */ jsx23("div", { className: "orion-admin-preview-label", children: "Footer Preview" }),
|
|
3708
|
+
/* @__PURE__ */ jsx23("div", { className: "orion-admin-preview-frame", children: /* @__PURE__ */ jsx23("div", { className: "orion-admin-preview-surface", children: /* @__PURE__ */ jsx23(
|
|
3795
3709
|
SiteFooterPreview,
|
|
3796
3710
|
{
|
|
3797
3711
|
site: {
|
|
@@ -3810,7 +3724,7 @@ function AdminStudioFooterGlobalView(props) {
|
|
|
3810
3724
|
}
|
|
3811
3725
|
}
|
|
3812
3726
|
) }) }),
|
|
3813
|
-
/* @__PURE__ */
|
|
3727
|
+
/* @__PURE__ */ jsx23("div", { style: { display: "flex", gap: "0.6rem" }, children: /* @__PURE__ */ jsx23(
|
|
3814
3728
|
"button",
|
|
3815
3729
|
{
|
|
3816
3730
|
disabled: saving,
|
|
@@ -3836,7 +3750,7 @@ function AdminStudioFooterGlobalView(props) {
|
|
|
3836
3750
|
// src/admin/components/studio/AdminStudioContactFormView.tsx
|
|
3837
3751
|
import { useEffect as useEffect13, useMemo as useMemo9, useState as useState14 } from "react";
|
|
3838
3752
|
import { SetStepNav as SetStepNav4 } from "@payloadcms/ui";
|
|
3839
|
-
import { jsx as
|
|
3753
|
+
import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3840
3754
|
var defaultDoc = {
|
|
3841
3755
|
disabledMessage: "This form is temporarily unavailable. Please call us for immediate service.",
|
|
3842
3756
|
enabled: true,
|
|
@@ -3851,7 +3765,7 @@ var defaultDoc = {
|
|
|
3851
3765
|
submitButtonLabel: "Send Request",
|
|
3852
3766
|
successMessage: "Thanks, your request has been received. We will follow up shortly."
|
|
3853
3767
|
};
|
|
3854
|
-
var
|
|
3768
|
+
var getPropString9 = (props, key, fallback) => {
|
|
3855
3769
|
if (!props || typeof props !== "object") return fallback;
|
|
3856
3770
|
const direct = props[key];
|
|
3857
3771
|
if (typeof direct === "string" && direct.length > 0) return direct;
|
|
@@ -3920,8 +3834,8 @@ var ghostButtonStyle = {
|
|
|
3920
3834
|
color: "var(--theme-elevation-900)"
|
|
3921
3835
|
};
|
|
3922
3836
|
function AdminStudioContactFormView(props) {
|
|
3923
|
-
const globalSlug =
|
|
3924
|
-
const globalsBasePath =
|
|
3837
|
+
const globalSlug = getPropString9(props, "globalSlug", "contact-form");
|
|
3838
|
+
const globalsBasePath = getPropString9(props, "globalsBasePath", "/globals");
|
|
3925
3839
|
const adminBasePath = useAdminBasePath();
|
|
3926
3840
|
const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
|
|
3927
3841
|
const rawGlobalPath = resolveAdminPath(adminBasePath, `/globals/${globalSlug}`);
|
|
@@ -3997,8 +3911,8 @@ function AdminStudioContactFormView(props) {
|
|
|
3997
3911
|
setIsSaving(false);
|
|
3998
3912
|
}
|
|
3999
3913
|
};
|
|
4000
|
-
return /* @__PURE__ */
|
|
4001
|
-
/* @__PURE__ */
|
|
3914
|
+
return /* @__PURE__ */ jsx24(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs22("div", { style: { paddingBottom: "2rem" }, children: [
|
|
3915
|
+
/* @__PURE__ */ jsx24(
|
|
4002
3916
|
SetStepNav4,
|
|
4003
3917
|
{
|
|
4004
3918
|
nav: [
|
|
@@ -4007,14 +3921,14 @@ function AdminStudioContactFormView(props) {
|
|
|
4007
3921
|
]
|
|
4008
3922
|
}
|
|
4009
3923
|
),
|
|
4010
|
-
/* @__PURE__ */
|
|
4011
|
-
/* @__PURE__ */
|
|
4012
|
-
isLoading ? /* @__PURE__ */
|
|
4013
|
-
error ? /* @__PURE__ */
|
|
4014
|
-
savedMessage ? /* @__PURE__ */
|
|
4015
|
-
!isLoading ? /* @__PURE__ */
|
|
4016
|
-
/* @__PURE__ */
|
|
4017
|
-
/* @__PURE__ */
|
|
3924
|
+
/* @__PURE__ */ jsx24("h1", { style: { margin: 0 }, children: "Contact Form" }),
|
|
3925
|
+
/* @__PURE__ */ jsx24("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Edit form behavior and submission messaging without leaving Studio." }),
|
|
3926
|
+
isLoading ? /* @__PURE__ */ jsx24("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading form settings\u2026" }) : null,
|
|
3927
|
+
error ? /* @__PURE__ */ jsx24("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
|
|
3928
|
+
savedMessage ? /* @__PURE__ */ jsx24("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
|
|
3929
|
+
!isLoading ? /* @__PURE__ */ jsxs22("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem", maxWidth: 900 }, children: [
|
|
3930
|
+
/* @__PURE__ */ jsxs22("label", { style: { ...fieldLabelStyle, alignItems: "center", display: "flex", gap: "0.6rem" }, children: [
|
|
3931
|
+
/* @__PURE__ */ jsx24(
|
|
4018
3932
|
"input",
|
|
4019
3933
|
{
|
|
4020
3934
|
checked: doc.enabled,
|
|
@@ -4024,9 +3938,9 @@ function AdminStudioContactFormView(props) {
|
|
|
4024
3938
|
),
|
|
4025
3939
|
"Form enabled"
|
|
4026
3940
|
] }),
|
|
4027
|
-
/* @__PURE__ */
|
|
3941
|
+
/* @__PURE__ */ jsxs22("label", { style: fieldLabelStyle, children: [
|
|
4028
3942
|
"Notification Email",
|
|
4029
|
-
/* @__PURE__ */
|
|
3943
|
+
/* @__PURE__ */ jsx24(
|
|
4030
3944
|
"input",
|
|
4031
3945
|
{
|
|
4032
3946
|
onChange: (event) => setDoc((prev) => ({ ...prev, notificationEmail: event.target.value })),
|
|
@@ -4036,9 +3950,9 @@ function AdminStudioContactFormView(props) {
|
|
|
4036
3950
|
}
|
|
4037
3951
|
)
|
|
4038
3952
|
] }),
|
|
4039
|
-
/* @__PURE__ */
|
|
3953
|
+
/* @__PURE__ */ jsxs22("label", { style: fieldLabelStyle, children: [
|
|
4040
3954
|
"Submit Button Label",
|
|
4041
|
-
/* @__PURE__ */
|
|
3955
|
+
/* @__PURE__ */ jsx24(
|
|
4042
3956
|
"input",
|
|
4043
3957
|
{
|
|
4044
3958
|
onChange: (event) => setDoc((prev) => ({ ...prev, submitButtonLabel: event.target.value })),
|
|
@@ -4048,9 +3962,9 @@ function AdminStudioContactFormView(props) {
|
|
|
4048
3962
|
}
|
|
4049
3963
|
)
|
|
4050
3964
|
] }),
|
|
4051
|
-
/* @__PURE__ */
|
|
3965
|
+
/* @__PURE__ */ jsxs22("label", { style: fieldLabelStyle, children: [
|
|
4052
3966
|
"Success Message",
|
|
4053
|
-
/* @__PURE__ */
|
|
3967
|
+
/* @__PURE__ */ jsx24(
|
|
4054
3968
|
"input",
|
|
4055
3969
|
{
|
|
4056
3970
|
onChange: (event) => setDoc((prev) => ({ ...prev, successMessage: event.target.value })),
|
|
@@ -4060,9 +3974,9 @@ function AdminStudioContactFormView(props) {
|
|
|
4060
3974
|
}
|
|
4061
3975
|
)
|
|
4062
3976
|
] }),
|
|
4063
|
-
/* @__PURE__ */
|
|
3977
|
+
/* @__PURE__ */ jsxs22("label", { style: fieldLabelStyle, children: [
|
|
4064
3978
|
"Error Message",
|
|
4065
|
-
/* @__PURE__ */
|
|
3979
|
+
/* @__PURE__ */ jsx24(
|
|
4066
3980
|
"input",
|
|
4067
3981
|
{
|
|
4068
3982
|
onChange: (event) => setDoc((prev) => ({ ...prev, errorMessage: event.target.value })),
|
|
@@ -4072,9 +3986,9 @@ function AdminStudioContactFormView(props) {
|
|
|
4072
3986
|
}
|
|
4073
3987
|
)
|
|
4074
3988
|
] }),
|
|
4075
|
-
/* @__PURE__ */
|
|
3989
|
+
/* @__PURE__ */ jsxs22("label", { style: fieldLabelStyle, children: [
|
|
4076
3990
|
"Disabled Message",
|
|
4077
|
-
/* @__PURE__ */
|
|
3991
|
+
/* @__PURE__ */ jsx24(
|
|
4078
3992
|
"input",
|
|
4079
3993
|
{
|
|
4080
3994
|
onChange: (event) => setDoc((prev) => ({ ...prev, disabledMessage: event.target.value })),
|
|
@@ -4084,7 +3998,7 @@ function AdminStudioContactFormView(props) {
|
|
|
4084
3998
|
}
|
|
4085
3999
|
)
|
|
4086
4000
|
] }),
|
|
4087
|
-
/* @__PURE__ */
|
|
4001
|
+
/* @__PURE__ */ jsxs22(
|
|
4088
4002
|
"div",
|
|
4089
4003
|
{
|
|
4090
4004
|
style: {
|
|
@@ -4094,9 +4008,9 @@ function AdminStudioContactFormView(props) {
|
|
|
4094
4008
|
padding: "0.85rem"
|
|
4095
4009
|
},
|
|
4096
4010
|
children: [
|
|
4097
|
-
/* @__PURE__ */
|
|
4098
|
-
/* @__PURE__ */
|
|
4099
|
-
/* @__PURE__ */
|
|
4011
|
+
/* @__PURE__ */ jsx24("div", { style: { fontWeight: 900, marginBottom: "0.65rem" }, children: "Service Options" }),
|
|
4012
|
+
/* @__PURE__ */ jsx24("div", { style: { display: "grid", gap: "0.55rem" }, children: doc.serviceOptions.map((option, index) => /* @__PURE__ */ jsxs22("div", { style: { display: "flex", gap: "0.5rem" }, children: [
|
|
4013
|
+
/* @__PURE__ */ jsx24(
|
|
4100
4014
|
"input",
|
|
4101
4015
|
{
|
|
4102
4016
|
onChange: (event) => setDoc((prev) => ({
|
|
@@ -4110,7 +4024,7 @@ function AdminStudioContactFormView(props) {
|
|
|
4110
4024
|
value: option.label
|
|
4111
4025
|
}
|
|
4112
4026
|
),
|
|
4113
|
-
/* @__PURE__ */
|
|
4027
|
+
/* @__PURE__ */ jsx24(
|
|
4114
4028
|
"button",
|
|
4115
4029
|
{
|
|
4116
4030
|
onClick: () => setDoc((prev) => ({
|
|
@@ -4123,7 +4037,7 @@ function AdminStudioContactFormView(props) {
|
|
|
4123
4037
|
}
|
|
4124
4038
|
)
|
|
4125
4039
|
] }, `${index}-${option.label}`)) }),
|
|
4126
|
-
/* @__PURE__ */
|
|
4040
|
+
/* @__PURE__ */ jsx24(
|
|
4127
4041
|
"button",
|
|
4128
4042
|
{
|
|
4129
4043
|
onClick: () => setDoc((prev) => ({
|
|
@@ -4138,9 +4052,9 @@ function AdminStudioContactFormView(props) {
|
|
|
4138
4052
|
]
|
|
4139
4053
|
}
|
|
4140
4054
|
),
|
|
4141
|
-
/* @__PURE__ */
|
|
4142
|
-
/* @__PURE__ */
|
|
4143
|
-
/* @__PURE__ */
|
|
4055
|
+
/* @__PURE__ */ jsxs22("div", { style: { display: "flex", gap: "0.6rem" }, children: [
|
|
4056
|
+
/* @__PURE__ */ jsx24("button", { disabled: isSaving, onClick: () => void save(), style: buttonStyle, type: "button", children: isSaving ? "Saving\u2026" : "Save Form Settings" }),
|
|
4057
|
+
/* @__PURE__ */ jsx24(
|
|
4144
4058
|
"a",
|
|
4145
4059
|
{
|
|
4146
4060
|
href: rawGlobalPath,
|
|
@@ -4161,9 +4075,9 @@ function AdminStudioContactFormView(props) {
|
|
|
4161
4075
|
|
|
4162
4076
|
// src/admin/components/studio/AdminStudioMediaView.tsx
|
|
4163
4077
|
import { useEffect as useEffect14, useMemo as useMemo10, useState as useState15 } from "react";
|
|
4164
|
-
import { jsx as
|
|
4078
|
+
import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4165
4079
|
var MEDIA_LIBRARY_SYNC_EVENT = "orion-media-library-updated";
|
|
4166
|
-
var
|
|
4080
|
+
var getPropString10 = (props, key, fallback) => {
|
|
4167
4081
|
if (!props || typeof props !== "object") return fallback;
|
|
4168
4082
|
const direct = props[key];
|
|
4169
4083
|
if (typeof direct === "string" && direct.length > 0) return direct;
|
|
@@ -4175,7 +4089,7 @@ var getPropString11 = (props, key, fallback) => {
|
|
|
4175
4089
|
return fallback;
|
|
4176
4090
|
};
|
|
4177
4091
|
function AdminStudioMediaView(props) {
|
|
4178
|
-
const mediaCollectionSlug =
|
|
4092
|
+
const mediaCollectionSlug = getPropString10(props, "mediaCollectionSlug", "media");
|
|
4179
4093
|
const adminBasePath = useAdminBasePath();
|
|
4180
4094
|
const [docs, setDocs] = useState15([]);
|
|
4181
4095
|
const [loading, setLoading] = useState15(true);
|
|
@@ -4225,7 +4139,7 @@ function AdminStudioMediaView(props) {
|
|
|
4225
4139
|
window.removeEventListener("storage", rerun);
|
|
4226
4140
|
};
|
|
4227
4141
|
}, [apiURL]);
|
|
4228
|
-
return /* @__PURE__ */
|
|
4142
|
+
return /* @__PURE__ */ jsx25(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs23(
|
|
4229
4143
|
AdminPage,
|
|
4230
4144
|
{
|
|
4231
4145
|
breadcrumbs: [
|
|
@@ -4235,18 +4149,18 @@ function AdminStudioMediaView(props) {
|
|
|
4235
4149
|
description: `${docs.length} asset${docs.length === 1 ? "" : "s"} \u2014 Upload assets here, including logos used in Site Settings branding.`,
|
|
4236
4150
|
title: "Media",
|
|
4237
4151
|
children: [
|
|
4238
|
-
/* @__PURE__ */
|
|
4239
|
-
loading ? /* @__PURE__ */
|
|
4240
|
-
error ? /* @__PURE__ */
|
|
4241
|
-
/* @__PURE__ */
|
|
4242
|
-
!loading && !error && docs.length === 0 ? /* @__PURE__ */
|
|
4243
|
-
/* @__PURE__ */
|
|
4244
|
-
/* @__PURE__ */
|
|
4152
|
+
/* @__PURE__ */ jsx25(MediaUploadForm, {}),
|
|
4153
|
+
loading ? /* @__PURE__ */ jsx25("div", { className: "orion-admin-list-meta", style: { marginTop: "1rem" }, children: "Loading..." }) : null,
|
|
4154
|
+
error ? /* @__PURE__ */ jsx25("div", { className: "orion-admin-error", style: { marginTop: "1rem" }, children: error }) : null,
|
|
4155
|
+
/* @__PURE__ */ jsxs23("div", { className: "orion-admin-list", style: { marginTop: "1rem" }, children: [
|
|
4156
|
+
!loading && !error && docs.length === 0 ? /* @__PURE__ */ jsxs23("div", { className: "orion-admin-card", children: [
|
|
4157
|
+
/* @__PURE__ */ jsx25("strong", { children: "No media found" }),
|
|
4158
|
+
/* @__PURE__ */ jsx25("span", { children: "Upload an image to get started." })
|
|
4245
4159
|
] }) : null,
|
|
4246
4160
|
docs.map((doc) => {
|
|
4247
4161
|
const id = typeof doc.id === "string" || typeof doc.id === "number" ? String(doc.id) : "";
|
|
4248
4162
|
if (!id) return null;
|
|
4249
|
-
return /* @__PURE__ */
|
|
4163
|
+
return /* @__PURE__ */ jsx25(
|
|
4250
4164
|
MediaListItem,
|
|
4251
4165
|
{
|
|
4252
4166
|
alt: doc.alt,
|
|
@@ -4270,8 +4184,8 @@ function AdminStudioMediaView(props) {
|
|
|
4270
4184
|
|
|
4271
4185
|
// src/admin/components/studio/AdminStudioMediaItemView.tsx
|
|
4272
4186
|
import { useEffect as useEffect15, useMemo as useMemo11, useState as useState16 } from "react";
|
|
4273
|
-
import { jsx as
|
|
4274
|
-
var
|
|
4187
|
+
import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4188
|
+
var getPropString11 = (props, key, fallback) => {
|
|
4275
4189
|
if (!props || typeof props !== "object") return fallback;
|
|
4276
4190
|
const direct = props[key];
|
|
4277
4191
|
if (typeof direct === "string" && direct.length > 0) return direct;
|
|
@@ -4297,7 +4211,7 @@ var getMediaIDFromPathname = (pathname) => {
|
|
|
4297
4211
|
return id ? decodeURIComponent(id) : null;
|
|
4298
4212
|
};
|
|
4299
4213
|
function AdminStudioMediaItemView(props) {
|
|
4300
|
-
const mediaCollectionSlug =
|
|
4214
|
+
const mediaCollectionSlug = getPropString11(props, "mediaCollectionSlug", "media");
|
|
4301
4215
|
const adminBasePath = useAdminBasePath();
|
|
4302
4216
|
const mediaPath = resolveAdminPath(adminBasePath, "/media");
|
|
4303
4217
|
const mediaIDFromParams = useMemo11(() => getParam2(props.params, "id"), [props.params]);
|
|
@@ -4380,7 +4294,7 @@ function AdminStudioMediaItemView(props) {
|
|
|
4380
4294
|
setError(deleteError instanceof Error ? deleteError.message : "Failed to delete media item.");
|
|
4381
4295
|
}
|
|
4382
4296
|
};
|
|
4383
|
-
return /* @__PURE__ */
|
|
4297
|
+
return /* @__PURE__ */ jsx26(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs24(
|
|
4384
4298
|
AdminPage,
|
|
4385
4299
|
{
|
|
4386
4300
|
breadcrumbs: [
|
|
@@ -4391,10 +4305,10 @@ function AdminStudioMediaItemView(props) {
|
|
|
4391
4305
|
description: "Update metadata or remove the selected asset.",
|
|
4392
4306
|
title: "Media Asset",
|
|
4393
4307
|
children: [
|
|
4394
|
-
loading ? /* @__PURE__ */
|
|
4395
|
-
error ? /* @__PURE__ */
|
|
4396
|
-
savedMessage ? /* @__PURE__ */
|
|
4397
|
-
!loading && !error && doc && mediaID ? /* @__PURE__ */
|
|
4308
|
+
loading ? /* @__PURE__ */ jsx26("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
|
|
4309
|
+
error ? /* @__PURE__ */ jsx26("div", { className: "orion-admin-error", children: error }) : null,
|
|
4310
|
+
savedMessage ? /* @__PURE__ */ jsx26("div", { className: "orion-admin-success", children: savedMessage }) : null,
|
|
4311
|
+
!loading && !error && doc && mediaID ? /* @__PURE__ */ jsx26(
|
|
4398
4312
|
MediaDetailPanel,
|
|
4399
4313
|
{
|
|
4400
4314
|
alt: doc.alt,
|
|
@@ -4416,10 +4330,10 @@ function AdminStudioMediaItemView(props) {
|
|
|
4416
4330
|
}
|
|
4417
4331
|
|
|
4418
4332
|
// src/admin/components/studio/AdminStudioFormsView.tsx
|
|
4419
|
-
import
|
|
4333
|
+
import Link2 from "next/link";
|
|
4420
4334
|
import { useEffect as useEffect16, useMemo as useMemo12, useState as useState17 } from "react";
|
|
4421
4335
|
import { useAuth as useAuth6 } from "@payloadcms/ui";
|
|
4422
|
-
import { jsx as
|
|
4336
|
+
import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4423
4337
|
var FORM_TONES = [
|
|
4424
4338
|
{
|
|
4425
4339
|
accent: "var(--orion-cms-tone-1, var(--orion-cms-accent, var(--orion-admin-accent)))",
|
|
@@ -4471,7 +4385,7 @@ var isEditor2 = (user) => {
|
|
|
4471
4385
|
return typeof role === "string" && role === "editor";
|
|
4472
4386
|
};
|
|
4473
4387
|
var canReviewForms = (user) => isAdmin3(user) || isEditor2(user);
|
|
4474
|
-
var
|
|
4388
|
+
var getPropString12 = (props, key, fallback) => {
|
|
4475
4389
|
if (!props || typeof props !== "object") return fallback;
|
|
4476
4390
|
const direct = props[key];
|
|
4477
4391
|
if (typeof direct === "string" && direct.length > 0) return direct;
|
|
@@ -4631,19 +4545,19 @@ var loadCollection = async (slug, params) => {
|
|
|
4631
4545
|
const payload = await response.json();
|
|
4632
4546
|
return Array.isArray(payload.docs) ? payload.docs : [];
|
|
4633
4547
|
};
|
|
4634
|
-
var renderEmptyMessage = (message) => /* @__PURE__ */
|
|
4635
|
-
/* @__PURE__ */
|
|
4636
|
-
/* @__PURE__ */
|
|
4548
|
+
var renderEmptyMessage = (message) => /* @__PURE__ */ jsxs25("div", { className: "orion-admin-empty-state", children: [
|
|
4549
|
+
/* @__PURE__ */ jsx27("strong", { children: "No responses yet" }),
|
|
4550
|
+
/* @__PURE__ */ jsx27("span", { children: message })
|
|
4637
4551
|
] });
|
|
4638
4552
|
function AdminStudioFormsView(props) {
|
|
4639
4553
|
const { user } = useAuth6();
|
|
4640
|
-
const formsCollectionSlug =
|
|
4641
|
-
const formSubmissionsCollectionSlug =
|
|
4554
|
+
const formsCollectionSlug = getPropString12(props, "formsCollectionSlug", "forms");
|
|
4555
|
+
const formSubmissionsCollectionSlug = getPropString12(
|
|
4642
4556
|
props,
|
|
4643
4557
|
"formSubmissionsCollectionSlug",
|
|
4644
4558
|
"form-submissions"
|
|
4645
4559
|
);
|
|
4646
|
-
const formUploadsCollectionSlug =
|
|
4560
|
+
const formUploadsCollectionSlug = getPropString12(props, "formUploadsCollectionSlug", "form-uploads");
|
|
4647
4561
|
const adminBasePath = useAdminBasePath();
|
|
4648
4562
|
const rawFormsPath = resolveAdminPath(adminBasePath, `/collections/${formsCollectionSlug}`);
|
|
4649
4563
|
const rawSubmissionsPath = resolveAdminPath(
|
|
@@ -4719,7 +4633,7 @@ function AdminStudioFormsView(props) {
|
|
|
4719
4633
|
[forms, submissionsByForm]
|
|
4720
4634
|
);
|
|
4721
4635
|
if (!canReviewForms(user)) {
|
|
4722
|
-
return /* @__PURE__ */
|
|
4636
|
+
return /* @__PURE__ */ jsx27(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsx27(
|
|
4723
4637
|
AdminPage,
|
|
4724
4638
|
{
|
|
4725
4639
|
breadcrumbs: [
|
|
@@ -4728,14 +4642,14 @@ function AdminStudioFormsView(props) {
|
|
|
4728
4642
|
],
|
|
4729
4643
|
description: "You do not have access to this section.",
|
|
4730
4644
|
title: "Forms",
|
|
4731
|
-
children: /* @__PURE__ */
|
|
4732
|
-
/* @__PURE__ */
|
|
4733
|
-
/* @__PURE__ */
|
|
4645
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "orion-admin-card", children: [
|
|
4646
|
+
/* @__PURE__ */ jsx27("strong", { children: "Access denied" }),
|
|
4647
|
+
/* @__PURE__ */ jsx27("span", { children: "This section is restricted to editor and administrator accounts." })
|
|
4734
4648
|
] })
|
|
4735
4649
|
}
|
|
4736
4650
|
) });
|
|
4737
4651
|
}
|
|
4738
|
-
return /* @__PURE__ */
|
|
4652
|
+
return /* @__PURE__ */ jsx27(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs25(
|
|
4739
4653
|
AdminPage,
|
|
4740
4654
|
{
|
|
4741
4655
|
breadcrumbs: [
|
|
@@ -4745,30 +4659,30 @@ function AdminStudioFormsView(props) {
|
|
|
4745
4659
|
description: "Review live forms, recent responses, and uploaded files.",
|
|
4746
4660
|
title: "Forms",
|
|
4747
4661
|
children: [
|
|
4748
|
-
loading ? /* @__PURE__ */
|
|
4749
|
-
error ? /* @__PURE__ */
|
|
4750
|
-
!loading && !error ? /* @__PURE__ */
|
|
4751
|
-
/* @__PURE__ */
|
|
4752
|
-
/* @__PURE__ */
|
|
4753
|
-
/* @__PURE__ */
|
|
4754
|
-
/* @__PURE__ */
|
|
4755
|
-
/* @__PURE__ */
|
|
4662
|
+
loading ? /* @__PURE__ */ jsx27("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
|
|
4663
|
+
error ? /* @__PURE__ */ jsx27("div", { className: "orion-admin-error", children: error }) : null,
|
|
4664
|
+
!loading && !error ? /* @__PURE__ */ jsxs25("div", { className: "orion-admin-forms-dashboard", children: [
|
|
4665
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-forms-summary-grid", children: [
|
|
4666
|
+
/* @__PURE__ */ jsxs25("article", { className: "orion-admin-overview-stat", children: [
|
|
4667
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-overview-stat-label", children: "Configured forms" }),
|
|
4668
|
+
/* @__PURE__ */ jsx27("strong", { children: forms.length }),
|
|
4669
|
+
/* @__PURE__ */ jsx27("p", { children: "Published or draft forms currently available inside the CMS." })
|
|
4756
4670
|
] }),
|
|
4757
|
-
/* @__PURE__ */
|
|
4758
|
-
/* @__PURE__ */
|
|
4759
|
-
/* @__PURE__ */
|
|
4760
|
-
/* @__PURE__ */
|
|
4671
|
+
/* @__PURE__ */ jsxs25("article", { className: "orion-admin-overview-stat", children: [
|
|
4672
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-overview-stat-label", children: "Recent submissions" }),
|
|
4673
|
+
/* @__PURE__ */ jsx27("strong", { children: submissions.length }),
|
|
4674
|
+
/* @__PURE__ */ jsx27("p", { children: "Latest 200 responses collected across every form." })
|
|
4761
4675
|
] }),
|
|
4762
|
-
/* @__PURE__ */
|
|
4763
|
-
/* @__PURE__ */
|
|
4764
|
-
/* @__PURE__ */
|
|
4765
|
-
/* @__PURE__ */
|
|
4676
|
+
/* @__PURE__ */ jsxs25("article", { className: "orion-admin-overview-stat", children: [
|
|
4677
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-overview-stat-label", children: "Most active form" }),
|
|
4678
|
+
/* @__PURE__ */ jsx27("strong", { children: busiestForm && busiestForm.count > 0 ? busiestForm.title : "No activity yet" }),
|
|
4679
|
+
/* @__PURE__ */ jsx27("p", { children: busiestForm && busiestForm.count > 0 ? `${busiestForm.count} response${busiestForm.count === 1 ? "" : "s"} in this view.` : "Submissions will surface here once a form starts receiving traffic." })
|
|
4766
4680
|
] })
|
|
4767
4681
|
] }),
|
|
4768
|
-
forms.length === 0 ? /* @__PURE__ */
|
|
4769
|
-
/* @__PURE__ */
|
|
4770
|
-
/* @__PURE__ */
|
|
4771
|
-
] }) : /* @__PURE__ */
|
|
4682
|
+
forms.length === 0 ? /* @__PURE__ */ jsxs25("div", { className: "orion-admin-card", children: [
|
|
4683
|
+
/* @__PURE__ */ jsx27("strong", { children: "No forms found" }),
|
|
4684
|
+
/* @__PURE__ */ jsx27("span", { children: "Create a form in Payload to start collecting responses." })
|
|
4685
|
+
] }) : /* @__PURE__ */ jsx27("div", { className: "orion-admin-forms-board-list", children: forms.map((form) => {
|
|
4772
4686
|
const id = typeof form.id === "string" || typeof form.id === "number" ? String(form.id) : "";
|
|
4773
4687
|
if (!id) return null;
|
|
4774
4688
|
const title = typeof form.title === "string" && form.title.trim().length > 0 ? form.title : "Untitled Form";
|
|
@@ -4783,31 +4697,31 @@ function AdminStudioFormsView(props) {
|
|
|
4783
4697
|
const updatedMeta = form.updatedAt ? `Updated ${formatDate(form.updatedAt)}` : "Update time unavailable";
|
|
4784
4698
|
const toneStyle = getFormToneStyle(slug, title || id);
|
|
4785
4699
|
const isResponsePanelScrollable = formSubmissions.length > RESPONSE_SCROLL_THRESHOLD;
|
|
4786
|
-
return /* @__PURE__ */
|
|
4787
|
-
/* @__PURE__ */
|
|
4788
|
-
/* @__PURE__ */
|
|
4789
|
-
/* @__PURE__ */
|
|
4790
|
-
/* @__PURE__ */
|
|
4791
|
-
/* @__PURE__ */
|
|
4700
|
+
return /* @__PURE__ */ jsxs25("section", { className: "orion-admin-form-board", style: toneStyle, children: [
|
|
4701
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-form-board-header", children: [
|
|
4702
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-form-board-heading", children: [
|
|
4703
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-form-board-kicker-row", children: [
|
|
4704
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-form-board-kicker", children: slug || "No slug set" }),
|
|
4705
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-form-board-meta", children: updatedMeta })
|
|
4792
4706
|
] }),
|
|
4793
|
-
/* @__PURE__ */
|
|
4794
|
-
/* @__PURE__ */
|
|
4795
|
-
/* @__PURE__ */
|
|
4796
|
-
/* @__PURE__ */
|
|
4797
|
-
/* @__PURE__ */
|
|
4707
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-form-board-title-row", children: [
|
|
4708
|
+
/* @__PURE__ */ jsx27("div", { className: "orion-admin-form-board-mark", children: getInitials(title, slug) }),
|
|
4709
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-form-board-copy", children: [
|
|
4710
|
+
/* @__PURE__ */ jsx27("h2", { className: "orion-admin-form-board-title", children: title }),
|
|
4711
|
+
/* @__PURE__ */ jsx27("p", { className: "orion-admin-form-board-subtitle", children: latestResponse ? `Latest response ${latestResponseLabel}` : "Awaiting the first submission" })
|
|
4798
4712
|
] })
|
|
4799
4713
|
] })
|
|
4800
4714
|
] }),
|
|
4801
|
-
/* @__PURE__ */
|
|
4802
|
-
/* @__PURE__ */
|
|
4803
|
-
/* @__PURE__ */
|
|
4804
|
-
/* @__PURE__ */
|
|
4715
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-form-board-actions", children: [
|
|
4716
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-form-board-count", children: [
|
|
4717
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-form-board-count-value", children: formSubmissions.length }),
|
|
4718
|
+
/* @__PURE__ */ jsxs25("span", { className: "orion-admin-form-board-count-label", children: [
|
|
4805
4719
|
"response",
|
|
4806
4720
|
formSubmissions.length === 1 ? "" : "s"
|
|
4807
4721
|
] })
|
|
4808
4722
|
] }),
|
|
4809
|
-
/* @__PURE__ */
|
|
4810
|
-
|
|
4723
|
+
/* @__PURE__ */ jsx27(
|
|
4724
|
+
Link2,
|
|
4811
4725
|
{
|
|
4812
4726
|
className: "orion-admin-action-button orion-admin-action-button--soft",
|
|
4813
4727
|
href: `${rawFormsPath}/${id}`,
|
|
@@ -4816,35 +4730,35 @@ function AdminStudioFormsView(props) {
|
|
|
4816
4730
|
)
|
|
4817
4731
|
] })
|
|
4818
4732
|
] }),
|
|
4819
|
-
/* @__PURE__ */
|
|
4820
|
-
/* @__PURE__ */
|
|
4821
|
-
/* @__PURE__ */
|
|
4822
|
-
/* @__PURE__ */
|
|
4733
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-form-board-metrics", children: [
|
|
4734
|
+
/* @__PURE__ */ jsxs25("article", { className: "orion-admin-form-metric", children: [
|
|
4735
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-form-metric-label", children: "Workflow steps" }),
|
|
4736
|
+
/* @__PURE__ */ jsx27("strong", { className: "orion-admin-form-metric-value", children: stepCount })
|
|
4823
4737
|
] }),
|
|
4824
|
-
/* @__PURE__ */
|
|
4825
|
-
/* @__PURE__ */
|
|
4826
|
-
/* @__PURE__ */
|
|
4738
|
+
/* @__PURE__ */ jsxs25("article", { className: "orion-admin-form-metric", children: [
|
|
4739
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-form-metric-label", children: "Fields" }),
|
|
4740
|
+
/* @__PURE__ */ jsx27("strong", { className: "orion-admin-form-metric-value", children: fieldCount })
|
|
4827
4741
|
] }),
|
|
4828
|
-
/* @__PURE__ */
|
|
4829
|
-
/* @__PURE__ */
|
|
4830
|
-
/* @__PURE__ */
|
|
4742
|
+
/* @__PURE__ */ jsxs25("article", { className: "orion-admin-form-metric", children: [
|
|
4743
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-form-metric-label", children: "Submit button" }),
|
|
4744
|
+
/* @__PURE__ */ jsx27("strong", { className: "orion-admin-form-metric-value is-copy", children: submitLabel })
|
|
4831
4745
|
] }),
|
|
4832
|
-
/* @__PURE__ */
|
|
4833
|
-
/* @__PURE__ */
|
|
4834
|
-
/* @__PURE__ */
|
|
4746
|
+
/* @__PURE__ */ jsxs25("article", { className: "orion-admin-form-metric", children: [
|
|
4747
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-form-metric-label", children: "Latest response" }),
|
|
4748
|
+
/* @__PURE__ */ jsx27("strong", { className: "orion-admin-form-metric-value is-copy", children: latestResponseLabel })
|
|
4835
4749
|
] })
|
|
4836
4750
|
] }),
|
|
4837
|
-
/* @__PURE__ */
|
|
4838
|
-
/* @__PURE__ */
|
|
4839
|
-
/* @__PURE__ */
|
|
4840
|
-
/* @__PURE__ */
|
|
4841
|
-
/* @__PURE__ */
|
|
4751
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-form-response-panel", children: [
|
|
4752
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-form-response-panel-header", children: [
|
|
4753
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
4754
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-form-section-label", children: "Response stream" }),
|
|
4755
|
+
/* @__PURE__ */ jsx27("strong", { children: formSubmissions.length > 0 ? `${formSubmissions.length} recent submission${formSubmissions.length === 1 ? "" : "s"}` : "No responses yet" })
|
|
4842
4756
|
] }),
|
|
4843
|
-
isResponsePanelScrollable ? /* @__PURE__ */
|
|
4757
|
+
isResponsePanelScrollable ? /* @__PURE__ */ jsx27("span", { className: "orion-admin-form-panel-note", children: "Latest 3 visible. Scroll for older responses." }) : formSubmissions.length > 0 ? /* @__PURE__ */ jsx27("span", { className: "orion-admin-form-panel-note", children: "Showing all recent activity" }) : null
|
|
4844
4758
|
] }),
|
|
4845
4759
|
formSubmissions.length === 0 ? renderEmptyMessage(
|
|
4846
4760
|
"This form will start filling this lane as soon as the first submission arrives."
|
|
4847
|
-
) : /* @__PURE__ */
|
|
4761
|
+
) : /* @__PURE__ */ jsx27(
|
|
4848
4762
|
"div",
|
|
4849
4763
|
{
|
|
4850
4764
|
className: [
|
|
@@ -4868,33 +4782,33 @@ function AdminStudioFormsView(props) {
|
|
|
4868
4782
|
);
|
|
4869
4783
|
const visibleUploads = uploads.slice(0, 2);
|
|
4870
4784
|
const hiddenUploadCount = uploads.length - visibleUploads.length;
|
|
4871
|
-
return /* @__PURE__ */
|
|
4785
|
+
return /* @__PURE__ */ jsxs25(
|
|
4872
4786
|
"article",
|
|
4873
4787
|
{
|
|
4874
4788
|
className: "orion-admin-response-card",
|
|
4875
4789
|
children: [
|
|
4876
|
-
/* @__PURE__ */
|
|
4877
|
-
/* @__PURE__ */
|
|
4878
|
-
/* @__PURE__ */
|
|
4879
|
-
/* @__PURE__ */
|
|
4880
|
-
/* @__PURE__ */
|
|
4881
|
-
/* @__PURE__ */
|
|
4790
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-response-card-main", children: [
|
|
4791
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-response-card-top", children: [
|
|
4792
|
+
/* @__PURE__ */ jsx27("div", { className: "orion-admin-response-badge", children: getInitials(identity.name, identity.email, title) }),
|
|
4793
|
+
/* @__PURE__ */ jsxs25("div", { className: "orion-admin-response-heading", children: [
|
|
4794
|
+
/* @__PURE__ */ jsx27("strong", { children: primaryIdentity }),
|
|
4795
|
+
/* @__PURE__ */ jsx27("div", { className: "orion-admin-response-secondary", children: secondaryIdentity })
|
|
4882
4796
|
] }),
|
|
4883
|
-
/* @__PURE__ */
|
|
4797
|
+
/* @__PURE__ */ jsx27("div", { className: "orion-admin-response-date", children: formatDate(submission.submittedAt) })
|
|
4884
4798
|
] }),
|
|
4885
|
-
previewFields.length > 0 ? /* @__PURE__ */
|
|
4799
|
+
previewFields.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "orion-admin-response-chip-row", children: previewFields.map((field, index) => /* @__PURE__ */ jsxs25(
|
|
4886
4800
|
"div",
|
|
4887
4801
|
{
|
|
4888
4802
|
className: "orion-admin-response-chip",
|
|
4889
4803
|
children: [
|
|
4890
|
-
/* @__PURE__ */
|
|
4891
|
-
/* @__PURE__ */
|
|
4804
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-response-chip-label", children: field.label }),
|
|
4805
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-response-chip-value", children: field.value })
|
|
4892
4806
|
]
|
|
4893
4807
|
},
|
|
4894
4808
|
`${submissionID}-${field.label}-${index}`
|
|
4895
|
-
)) }) : /* @__PURE__ */
|
|
4896
|
-
uploads.length > 0 ? /* @__PURE__ */
|
|
4897
|
-
/* @__PURE__ */
|
|
4809
|
+
)) }) : /* @__PURE__ */ jsx27("div", { className: "orion-admin-response-empty", children: "No preview fields are available for this submission." }),
|
|
4810
|
+
uploads.length > 0 ? /* @__PURE__ */ jsxs25("div", { className: "orion-admin-response-upload-row", children: [
|
|
4811
|
+
/* @__PURE__ */ jsx27("span", { className: "orion-admin-upload-label", children: "Uploads" }),
|
|
4898
4812
|
visibleUploads.map((upload) => {
|
|
4899
4813
|
const uploadID = typeof upload.id === "string" || typeof upload.id === "number" ? String(upload.id) : "";
|
|
4900
4814
|
if (!uploadID) return null;
|
|
@@ -4908,8 +4822,8 @@ function AdminStudioFormsView(props) {
|
|
|
4908
4822
|
),
|
|
4909
4823
|
38
|
|
4910
4824
|
);
|
|
4911
|
-
return /* @__PURE__ */
|
|
4912
|
-
|
|
4825
|
+
return /* @__PURE__ */ jsx27(
|
|
4826
|
+
Link2,
|
|
4913
4827
|
{
|
|
4914
4828
|
className: "orion-admin-upload-chip",
|
|
4915
4829
|
href: `${rawUploadsPath}/${uploadID}`,
|
|
@@ -4918,15 +4832,15 @@ function AdminStudioFormsView(props) {
|
|
|
4918
4832
|
uploadID
|
|
4919
4833
|
);
|
|
4920
4834
|
}),
|
|
4921
|
-
hiddenUploadCount > 0 ? /* @__PURE__ */
|
|
4835
|
+
hiddenUploadCount > 0 ? /* @__PURE__ */ jsxs25("span", { className: "orion-admin-upload-chip is-passive", children: [
|
|
4922
4836
|
"+",
|
|
4923
4837
|
hiddenUploadCount,
|
|
4924
4838
|
" more"
|
|
4925
4839
|
] }) : null
|
|
4926
4840
|
] }) : null
|
|
4927
4841
|
] }),
|
|
4928
|
-
/* @__PURE__ */
|
|
4929
|
-
|
|
4842
|
+
/* @__PURE__ */ jsx27(
|
|
4843
|
+
Link2,
|
|
4930
4844
|
{
|
|
4931
4845
|
className: "orion-admin-action-button orion-admin-action-button--ghost",
|
|
4932
4846
|
href: `${rawSubmissionsPath}/${submissionID}`,
|
|
@@ -4952,7 +4866,7 @@ function AdminStudioFormsView(props) {
|
|
|
4952
4866
|
// src/admin/components/studio/AdminStudioToolsView.tsx
|
|
4953
4867
|
import { useEffect as useEffect17, useState as useState18 } from "react";
|
|
4954
4868
|
import { useAuth as useAuth7 } from "@payloadcms/ui";
|
|
4955
|
-
import { jsx as
|
|
4869
|
+
import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4956
4870
|
var userRoles = ["admin", "client", "editor"];
|
|
4957
4871
|
var isAdmin4 = (user) => {
|
|
4958
4872
|
if (!user || typeof user !== "object") return false;
|
|
@@ -4970,7 +4884,7 @@ function AdminStudioToolsView(props) {
|
|
|
4970
4884
|
const [createSubmitting, setCreateSubmitting] = useState18(false);
|
|
4971
4885
|
const [updatingUserID, setUpdatingUserID] = useState18(null);
|
|
4972
4886
|
if (!isAdmin4(user)) {
|
|
4973
|
-
return /* @__PURE__ */
|
|
4887
|
+
return /* @__PURE__ */ jsx28(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsx28(
|
|
4974
4888
|
AdminPage,
|
|
4975
4889
|
{
|
|
4976
4890
|
breadcrumbs: [
|
|
@@ -4979,9 +4893,9 @@ function AdminStudioToolsView(props) {
|
|
|
4979
4893
|
],
|
|
4980
4894
|
description: "You do not have access to this section.",
|
|
4981
4895
|
title: "Admin Tools",
|
|
4982
|
-
children: /* @__PURE__ */
|
|
4983
|
-
/* @__PURE__ */
|
|
4984
|
-
/* @__PURE__ */
|
|
4896
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "orion-admin-card", children: [
|
|
4897
|
+
/* @__PURE__ */ jsx28("strong", { children: "Access denied" }),
|
|
4898
|
+
/* @__PURE__ */ jsx28("span", { children: "This section is restricted to administrator accounts." })
|
|
4985
4899
|
] })
|
|
4986
4900
|
}
|
|
4987
4901
|
) });
|
|
@@ -5081,7 +4995,7 @@ function AdminStudioToolsView(props) {
|
|
|
5081
4995
|
setUpdatingUserID(null);
|
|
5082
4996
|
}
|
|
5083
4997
|
};
|
|
5084
|
-
return /* @__PURE__ */
|
|
4998
|
+
return /* @__PURE__ */ jsx28(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ jsxs26(
|
|
5085
4999
|
AdminPage,
|
|
5086
5000
|
{
|
|
5087
5001
|
breadcrumbs: [
|
|
@@ -5091,53 +5005,53 @@ function AdminStudioToolsView(props) {
|
|
|
5091
5005
|
description: "Manage users and fallback links to Payload native admin.",
|
|
5092
5006
|
title: "Admin Tools",
|
|
5093
5007
|
children: [
|
|
5094
|
-
/* @__PURE__ */
|
|
5095
|
-
error ? /* @__PURE__ */
|
|
5096
|
-
savedMessage ? /* @__PURE__ */
|
|
5097
|
-
/* @__PURE__ */
|
|
5098
|
-
/* @__PURE__ */
|
|
5099
|
-
/* @__PURE__ */
|
|
5008
|
+
/* @__PURE__ */ jsx28("div", { className: "orion-admin-inline-actions", style: { marginBottom: "1rem" }, children: /* @__PURE__ */ jsx28("a", { className: "orion-admin-action-button", href: "/admin-core", target: "_blank", children: "Open Payload Core Admin" }) }),
|
|
5009
|
+
error ? /* @__PURE__ */ jsx28("div", { className: "orion-admin-error", style: { marginBottom: "1rem" }, children: error }) : null,
|
|
5010
|
+
savedMessage ? /* @__PURE__ */ jsx28("div", { className: "orion-admin-success", style: { marginBottom: "1rem" }, children: savedMessage }) : null,
|
|
5011
|
+
/* @__PURE__ */ jsxs26("form", { className: "orion-admin-form", onSubmit: createUser, style: { marginBottom: "1rem" }, children: [
|
|
5012
|
+
/* @__PURE__ */ jsx28("strong", { children: "Create User" }),
|
|
5013
|
+
/* @__PURE__ */ jsxs26("label", { children: [
|
|
5100
5014
|
"Email",
|
|
5101
|
-
/* @__PURE__ */
|
|
5015
|
+
/* @__PURE__ */ jsx28("input", { name: "email", required: true, type: "email" })
|
|
5102
5016
|
] }),
|
|
5103
|
-
/* @__PURE__ */
|
|
5017
|
+
/* @__PURE__ */ jsxs26("label", { children: [
|
|
5104
5018
|
"Full Name",
|
|
5105
|
-
/* @__PURE__ */
|
|
5019
|
+
/* @__PURE__ */ jsx28("input", { name: "fullName", type: "text" })
|
|
5106
5020
|
] }),
|
|
5107
|
-
/* @__PURE__ */
|
|
5021
|
+
/* @__PURE__ */ jsxs26("label", { children: [
|
|
5108
5022
|
"Password",
|
|
5109
|
-
/* @__PURE__ */
|
|
5023
|
+
/* @__PURE__ */ jsx28("input", { name: "password", required: true, type: "password" })
|
|
5110
5024
|
] }),
|
|
5111
|
-
/* @__PURE__ */
|
|
5025
|
+
/* @__PURE__ */ jsxs26("label", { children: [
|
|
5112
5026
|
"Role",
|
|
5113
|
-
/* @__PURE__ */
|
|
5114
|
-
/* @__PURE__ */
|
|
5115
|
-
/* @__PURE__ */
|
|
5116
|
-
/* @__PURE__ */
|
|
5027
|
+
/* @__PURE__ */ jsxs26("select", { defaultValue: "editor", name: "role", children: [
|
|
5028
|
+
/* @__PURE__ */ jsx28("option", { value: "admin", children: "admin" }),
|
|
5029
|
+
/* @__PURE__ */ jsx28("option", { value: "editor", children: "editor" }),
|
|
5030
|
+
/* @__PURE__ */ jsx28("option", { value: "client", children: "client" })
|
|
5117
5031
|
] })
|
|
5118
5032
|
] }),
|
|
5119
|
-
/* @__PURE__ */
|
|
5033
|
+
/* @__PURE__ */ jsx28("button", { disabled: createSubmitting, type: "submit", children: createSubmitting ? "Creating..." : "Create User" })
|
|
5120
5034
|
] }),
|
|
5121
|
-
loading ? /* @__PURE__ */
|
|
5122
|
-
/* @__PURE__ */
|
|
5035
|
+
loading ? /* @__PURE__ */ jsx28("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
|
|
5036
|
+
/* @__PURE__ */ jsx28("div", { className: "orion-admin-list", children: docs.map((doc) => {
|
|
5123
5037
|
const id = typeof doc.id === "string" || typeof doc.id === "number" ? String(doc.id) : "";
|
|
5124
5038
|
if (!id) return null;
|
|
5125
5039
|
const email = typeof doc.email === "string" ? doc.email : `user-${id}`;
|
|
5126
5040
|
const fullName = typeof doc.fullName === "string" ? doc.fullName : "";
|
|
5127
5041
|
const currentRole = typeof doc.role === "string" ? normalizeRole(doc.role) : "editor";
|
|
5128
|
-
return /* @__PURE__ */
|
|
5129
|
-
/* @__PURE__ */
|
|
5130
|
-
/* @__PURE__ */
|
|
5131
|
-
/* @__PURE__ */
|
|
5042
|
+
return /* @__PURE__ */ jsxs26("div", { className: "orion-admin-list-item", children: [
|
|
5043
|
+
/* @__PURE__ */ jsxs26("div", { children: [
|
|
5044
|
+
/* @__PURE__ */ jsx28("strong", { children: email }),
|
|
5045
|
+
/* @__PURE__ */ jsx28("div", { className: "orion-admin-list-meta", children: fullName || "No full name set" })
|
|
5132
5046
|
] }),
|
|
5133
|
-
/* @__PURE__ */
|
|
5134
|
-
/* @__PURE__ */
|
|
5135
|
-
/* @__PURE__ */
|
|
5136
|
-
/* @__PURE__ */
|
|
5137
|
-
/* @__PURE__ */
|
|
5138
|
-
/* @__PURE__ */
|
|
5047
|
+
/* @__PURE__ */ jsxs26("form", { className: "orion-admin-inline-actions", onSubmit: updateUserRole, children: [
|
|
5048
|
+
/* @__PURE__ */ jsx28("input", { name: "id", type: "hidden", value: id }),
|
|
5049
|
+
/* @__PURE__ */ jsxs26("select", { defaultValue: currentRole, name: "role", children: [
|
|
5050
|
+
/* @__PURE__ */ jsx28("option", { value: "admin", children: "admin" }),
|
|
5051
|
+
/* @__PURE__ */ jsx28("option", { value: "editor", children: "editor" }),
|
|
5052
|
+
/* @__PURE__ */ jsx28("option", { value: "client", children: "client" })
|
|
5139
5053
|
] }),
|
|
5140
|
-
/* @__PURE__ */
|
|
5054
|
+
/* @__PURE__ */ jsx28("button", { disabled: updatingUserID === id, type: "submit", children: updatingUserID === id ? "Updating..." : "Update" })
|
|
5141
5055
|
] })
|
|
5142
5056
|
] }, id);
|
|
5143
5057
|
}) })
|
|
@@ -5148,14 +5062,14 @@ function AdminStudioToolsView(props) {
|
|
|
5148
5062
|
|
|
5149
5063
|
// src/admin/components/studio/OpenInStudioMenuItem.tsx
|
|
5150
5064
|
import { useDocumentInfo } from "@payloadcms/ui";
|
|
5151
|
-
import { jsx as
|
|
5065
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
5152
5066
|
function OpenInStudioMenuItem({ pagesPathBase = "/pages" }) {
|
|
5153
5067
|
const documentInfo = useDocumentInfo();
|
|
5154
5068
|
const id = documentInfo?.id;
|
|
5155
5069
|
if (!id) {
|
|
5156
5070
|
return null;
|
|
5157
5071
|
}
|
|
5158
|
-
return /* @__PURE__ */
|
|
5072
|
+
return /* @__PURE__ */ jsx29(
|
|
5159
5073
|
"a",
|
|
5160
5074
|
{
|
|
5161
5075
|
href: `${pagesPathBase}/${id}`,
|
|
@@ -5176,7 +5090,7 @@ function OpenInStudioMenuItem({ pagesPathBase = "/pages" }) {
|
|
|
5176
5090
|
// src/admin/components/studio/PageEditRedirectToStudio.tsx
|
|
5177
5091
|
import { useEffect as useEffect18 } from "react";
|
|
5178
5092
|
import { useDocumentInfo as useDocumentInfo2 } from "@payloadcms/ui";
|
|
5179
|
-
import { jsx as
|
|
5093
|
+
import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5180
5094
|
function PageEditRedirectToStudio({ pagesPathBase = "/pages" }) {
|
|
5181
5095
|
const documentInfo = useDocumentInfo2();
|
|
5182
5096
|
const id = documentInfo?.id;
|
|
@@ -5186,7 +5100,7 @@ function PageEditRedirectToStudio({ pagesPathBase = "/pages" }) {
|
|
|
5186
5100
|
}
|
|
5187
5101
|
window.location.replace(`${pagesPathBase}/${id}`);
|
|
5188
5102
|
}, [id, pagesPathBase]);
|
|
5189
|
-
return /* @__PURE__ */
|
|
5103
|
+
return /* @__PURE__ */ jsxs27(
|
|
5190
5104
|
"div",
|
|
5191
5105
|
{
|
|
5192
5106
|
style: {
|
|
@@ -5198,9 +5112,9 @@ function PageEditRedirectToStudio({ pagesPathBase = "/pages" }) {
|
|
|
5198
5112
|
minHeight: "50vh"
|
|
5199
5113
|
},
|
|
5200
5114
|
children: [
|
|
5201
|
-
/* @__PURE__ */
|
|
5202
|
-
/* @__PURE__ */
|
|
5203
|
-
id ? /* @__PURE__ */
|
|
5115
|
+
/* @__PURE__ */ jsx30("h2", { style: { margin: 0 }, children: "Opening Editor..." }),
|
|
5116
|
+
/* @__PURE__ */ jsx30("p", { style: { color: "var(--theme-elevation-600)", margin: 0 }, children: "Redirecting to the custom page editor." }),
|
|
5117
|
+
id ? /* @__PURE__ */ jsx30("a", { href: `${pagesPathBase}/${id}`, children: "Continue to Editor" }) : /* @__PURE__ */ jsx30("a", { href: pagesPathBase, children: "Open Pages" })
|
|
5204
5118
|
]
|
|
5205
5119
|
}
|
|
5206
5120
|
);
|
|
@@ -5209,7 +5123,7 @@ function PageEditRedirectToStudio({ pagesPathBase = "/pages" }) {
|
|
|
5209
5123
|
// src/admin/components/studio/StudioBackBreadcrumb.tsx
|
|
5210
5124
|
import { useEffect as useEffect19, useState as useState19 } from "react";
|
|
5211
5125
|
import { SetStepNav as SetStepNav5 } from "@payloadcms/ui";
|
|
5212
|
-
import { jsx as
|
|
5126
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
5213
5127
|
var toTitle = (slug) => slug.split("-").filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
5214
5128
|
var buildNav = (pathname, adminBasePath) => {
|
|
5215
5129
|
if (pathname.includes("/globals/")) {
|
|
@@ -5263,13 +5177,13 @@ function StudioBackBreadcrumb() {
|
|
|
5263
5177
|
}, []);
|
|
5264
5178
|
const nav = buildNav(pathname, adminBasePath);
|
|
5265
5179
|
if (!nav) return null;
|
|
5266
|
-
return /* @__PURE__ */
|
|
5180
|
+
return /* @__PURE__ */ jsx31(SetStepNav5, { nav });
|
|
5267
5181
|
}
|
|
5268
5182
|
|
|
5269
5183
|
// src/admin/components/studio/StudioContactFormRedirect.tsx
|
|
5270
5184
|
import { useEffect as useEffect20 } from "react";
|
|
5271
|
-
import { jsx as
|
|
5272
|
-
var
|
|
5185
|
+
import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5186
|
+
var getPropString13 = (props, key, fallback) => {
|
|
5273
5187
|
if (!props || typeof props !== "object") return fallback;
|
|
5274
5188
|
const direct = props[key];
|
|
5275
5189
|
if (typeof direct === "string" && direct.length > 0) return direct;
|
|
@@ -5282,13 +5196,13 @@ var getPropString14 = (props, key, fallback) => {
|
|
|
5282
5196
|
};
|
|
5283
5197
|
function StudioContactFormRedirect(props) {
|
|
5284
5198
|
const adminBasePath = useAdminBasePath();
|
|
5285
|
-
const studioContactFormPath =
|
|
5199
|
+
const studioContactFormPath = getPropString13(props, "studioContactFormPath", "/contact-form");
|
|
5286
5200
|
const targetPath = resolveAdminPath(adminBasePath, studioContactFormPath);
|
|
5287
5201
|
useEffect20(() => {
|
|
5288
5202
|
if (window.location.pathname === targetPath) return;
|
|
5289
5203
|
window.location.replace(targetPath);
|
|
5290
5204
|
}, [targetPath]);
|
|
5291
|
-
return /* @__PURE__ */
|
|
5205
|
+
return /* @__PURE__ */ jsxs28(
|
|
5292
5206
|
"div",
|
|
5293
5207
|
{
|
|
5294
5208
|
style: {
|
|
@@ -5301,8 +5215,8 @@ function StudioContactFormRedirect(props) {
|
|
|
5301
5215
|
minHeight: "40vh"
|
|
5302
5216
|
},
|
|
5303
5217
|
children: [
|
|
5304
|
-
/* @__PURE__ */
|
|
5305
|
-
/* @__PURE__ */
|
|
5218
|
+
/* @__PURE__ */ jsx32("h2", { style: { margin: 0 }, children: "Opening Contact Form Editor..." }),
|
|
5219
|
+
/* @__PURE__ */ jsx32("a", { href: targetPath, children: "Continue" })
|
|
5306
5220
|
]
|
|
5307
5221
|
}
|
|
5308
5222
|
);
|
|
@@ -5311,7 +5225,6 @@ export {
|
|
|
5311
5225
|
AdminLoginIntro,
|
|
5312
5226
|
AdminLoginPasswordToggle,
|
|
5313
5227
|
AdminStudioContactFormView,
|
|
5314
|
-
AdminStudioDashboard,
|
|
5315
5228
|
AdminStudioFooterGlobalView,
|
|
5316
5229
|
AdminStudioFormsView,
|
|
5317
5230
|
AdminStudioGlobalsView,
|