@sqrzro/admin 4.0.0-alpha.5 → 4.0.0-alpha.7
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.
|
@@ -2,7 +2,8 @@ import type { AdminConfig, User } from '../../utility/interfaces';
|
|
|
2
2
|
interface AdminAppLayoutProps {
|
|
3
3
|
readonly children: React.ReactNode;
|
|
4
4
|
readonly config?: AdminConfig;
|
|
5
|
+
readonly logo?: React.ReactNode;
|
|
5
6
|
readonly userFn?: () => Promise<User>;
|
|
6
7
|
}
|
|
7
|
-
declare function AdminAppLayout({ children, config, userFn }: AdminAppLayoutProps): React.ReactElement;
|
|
8
|
+
declare function AdminAppLayout({ children, config, logo, userFn, }: AdminAppLayoutProps): React.ReactElement;
|
|
8
9
|
export default AdminAppLayout;
|
|
@@ -3,7 +3,7 @@ import { Suspense } from 'react';
|
|
|
3
3
|
import { Link } from '@sqrzro/ui/components';
|
|
4
4
|
import { AppNavigation } from '@sqrzro/ui/navigation';
|
|
5
5
|
import MePanel from '../MePanel';
|
|
6
|
-
function AdminAppLayout({ children, config, userFn }) {
|
|
7
|
-
return (_jsxs("div", { className: "flex flex-1 flex-col", children: [_jsx("header", { className: "bg-slate-800", children: _jsxs("div", { className: "flex h-16 items-center border-b border-slate-700 px-4", children: [
|
|
6
|
+
function AdminAppLayout({ children, config, logo, userFn, }) {
|
|
7
|
+
return (_jsxs("div", { className: "flex flex-1 flex-col", children: [_jsx("header", { className: "bg-slate-800", children: _jsxs("div", { className: "flex h-16 items-center border-b border-slate-700 px-4", children: [_jsxs(Link, { className: "h-9 w-9", href: "/", children: [logo, _jsx("span", { className: "sr-only", children: config?.app.name })] }), _jsx(AppNavigation, { data: config?.navigation || [] }), _jsx(Suspense, { children: _jsx(MePanel, { userFn: userFn }) })] }) }), _jsx("main", { className: "@container mb-10 block flex flex-1 flex-col", children: children })] }));
|
|
8
8
|
}
|
|
9
9
|
export default AdminAppLayout;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { PageProps } from '@sqrzro/ui/components';
|
|
2
2
|
import { NextLayoutProps } from '@sqrzro/ui/utility';
|
|
3
|
-
|
|
3
|
+
type Fn = (...args: any[]) => Promise<any>;
|
|
4
|
+
export type AdminLayoutProps<T extends Fn | undefined = undefined> = Omit<PageProps<T>, 'children' | 'pageProps' | 'template'> & {
|
|
4
5
|
readonly layoutProps: NextLayoutProps;
|
|
5
6
|
};
|
|
6
|
-
declare function AdminLayout<T>(props: Readonly<AdminLayoutProps<T>>): React.ReactElement;
|
|
7
|
+
declare function AdminLayout<T extends Fn | undefined = undefined>(props: Readonly<AdminLayoutProps<T>>): React.ReactElement;
|
|
7
8
|
export default AdminLayout;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PageProps } from '@sqrzro/ui/components';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Fn = (...args: any[]) => Promise<any>;
|
|
3
|
+
export type AdminPageProps<T extends Fn | undefined = undefined> = Omit<PageProps<T>, 'template'>;
|
|
4
|
+
declare function AdminPage<T extends Fn | undefined = undefined>(props: Readonly<AdminPageProps<T>>): React.ReactElement;
|
|
4
5
|
export default AdminPage;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqrzro/admin",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.7",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "ISC",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"next": "^16.1.6",
|
|
13
13
|
"react": "^19.2.4",
|
|
14
14
|
"react-dom": "^19.2.1",
|
|
15
|
-
"@sqrzro/auth": "^4.0.0-alpha.
|
|
16
|
-
"@sqrzro/ui": "^4.0.0-alpha.
|
|
15
|
+
"@sqrzro/auth": "^4.0.0-alpha.11",
|
|
16
|
+
"@sqrzro/ui": "^4.0.0-alpha.24"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/react": "^19.2.7",
|