@orion-studios/payload-studio 0.6.0-beta.6 → 0.6.0-beta.8
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 +1 -0
- package/dist/admin/client.d.ts +1 -0
- package/dist/admin/client.js +1489 -662
- package/dist/admin/client.mjs +1337 -511
- package/dist/admin/index.d.mts +1 -2
- package/dist/admin/index.d.ts +1 -2
- package/dist/admin/index.js +1 -1413
- package/dist/admin/index.mjs +2 -4
- package/dist/admin-app/index.mjs +4 -4
- package/dist/chunk-5FNTVRCR.mjs +910 -0
- package/dist/{chunk-EHUE4LCT.mjs → chunk-RKTIFEUY.mjs} +33 -3
- package/dist/chunk-W2UOCJDX.mjs +32 -0
- package/dist/{index-DEkV-sMs.d.mts → index-DyMmaRfI.d.mts} +2 -7
- package/dist/{index-bbA3HSxa.d.ts → index-QPDAedIX.d.ts} +2 -7
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +63 -1429
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunk-NTXOLLDC.mjs +0 -2280
- package/dist/chunk-Z6L5K5MH.mjs +0 -64
package/dist/chunk-Z6L5K5MH.mjs
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// src/admin-app/routeRegistry.ts
|
|
2
|
-
var adminNavIcons = [
|
|
3
|
-
"dashboard",
|
|
4
|
-
"pages",
|
|
5
|
-
"forms",
|
|
6
|
-
"globals",
|
|
7
|
-
"media",
|
|
8
|
-
"tools",
|
|
9
|
-
"account",
|
|
10
|
-
"analytics"
|
|
11
|
-
];
|
|
12
|
-
var roleCanAccessNav = (role, item) => {
|
|
13
|
-
if (!item.roles || item.roles.length === 0) {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
if (!role) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
return item.roles.includes(role);
|
|
20
|
-
};
|
|
21
|
-
var navItemIsActive = (pathname, item) => {
|
|
22
|
-
if (item.href === "/admin") {
|
|
23
|
-
return pathname === "/admin";
|
|
24
|
-
}
|
|
25
|
-
return item.matchPrefixes.some((prefix) => pathname.startsWith(prefix));
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
// src/admin-app/components/AdminBreadcrumbs.tsx
|
|
29
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
30
|
-
function AdminBreadcrumbs({ items }) {
|
|
31
|
-
return /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", className: "orion-admin-breadcrumbs", children: items.map((item, index) => {
|
|
32
|
-
const isLast = index === items.length - 1;
|
|
33
|
-
return /* @__PURE__ */ jsxs("span", { children: [
|
|
34
|
-
item.href && !isLast ? /* @__PURE__ */ jsx("a", { href: item.href, children: item.label }) : /* @__PURE__ */ jsx("span", { children: item.label }),
|
|
35
|
-
!isLast ? /* @__PURE__ */ jsx("span", { className: "orion-admin-breadcrumb-sep", children: "/" }) : null
|
|
36
|
-
] }, `${item.label}-${index}`);
|
|
37
|
-
}) });
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// src/admin-app/components/AdminPage.tsx
|
|
41
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
42
|
-
function AdminPage({ title, description, breadcrumbs, actions, children }) {
|
|
43
|
-
return /* @__PURE__ */ jsxs2("div", { className: "orion-admin-page", children: [
|
|
44
|
-
/* @__PURE__ */ jsxs2("div", { className: "orion-admin-page-header", children: [
|
|
45
|
-
/* @__PURE__ */ jsx2(AdminBreadcrumbs, { items: breadcrumbs }),
|
|
46
|
-
/* @__PURE__ */ jsxs2("div", { className: "orion-admin-page-title-row", children: [
|
|
47
|
-
/* @__PURE__ */ jsxs2("div", { children: [
|
|
48
|
-
/* @__PURE__ */ jsx2("h1", { children: title }),
|
|
49
|
-
description ? /* @__PURE__ */ jsx2("p", { children: description }) : null
|
|
50
|
-
] }),
|
|
51
|
-
actions ? /* @__PURE__ */ jsx2("div", { className: "orion-admin-page-actions", children: actions }) : null
|
|
52
|
-
] })
|
|
53
|
-
] }),
|
|
54
|
-
/* @__PURE__ */ jsx2("div", { className: "orion-admin-page-content", children })
|
|
55
|
-
] });
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export {
|
|
59
|
-
adminNavIcons,
|
|
60
|
-
roleCanAccessNav,
|
|
61
|
-
navItemIsActive,
|
|
62
|
-
AdminBreadcrumbs,
|
|
63
|
-
AdminPage
|
|
64
|
-
};
|