@sqrzro/admin 2.1.0-bz.11 → 2.1.0-bz.13
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/components/AppLayout/index.js +0 -1
- package/dist/components/Auth/index.d.ts +3 -3
- package/dist/components/Auth/index.js +2 -9
- package/dist/components/GridList/index.d.ts +2 -2
- package/dist/components/GridListItem/index.d.ts +1 -1
- package/dist/components/List/index.d.ts +4 -4
- package/dist/components/List/index.js +1 -2
- package/package.json +9 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare function Auth(
|
|
2
|
+
export interface AuthProps {
|
|
3
|
+
}
|
|
4
|
+
declare function Auth(): JSX.Element;
|
|
5
5
|
export default Auth;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
root: 'bg-slate-800 gap-8',
|
|
5
|
-
logo: 'mx-auto flex h-12 w-32 items-end',
|
|
6
|
-
panel: 'rounded bg-white p-8 shadow-lg',
|
|
7
|
-
title: 'text-lg font-semibold mb-4 leading-none',
|
|
8
|
-
};
|
|
9
|
-
function Auth(props) {
|
|
10
|
-
return _jsx(AuthComponent, { ...props, classNames: classNames });
|
|
2
|
+
function Auth() {
|
|
3
|
+
return _jsx("div", { children: "Auth" });
|
|
11
4
|
}
|
|
12
5
|
export default Auth;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ListProps } from '../List';
|
|
3
|
-
export type GridListProps<Item
|
|
4
|
-
declare function GridList<Item extends object
|
|
3
|
+
export type GridListProps<Item> = Omit<ListProps<Item>, 'renderItem'>;
|
|
4
|
+
declare function GridList<Item extends object>(props: GridListProps<Item>): React.ReactElement;
|
|
5
5
|
export default GridList;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ListObject } from '../ListItem';
|
|
3
|
-
declare function GridListItem({ actions, href, id, image, imageHref, meta, subtitle, title, }: Readonly<ListObject>): React.ReactElement;
|
|
3
|
+
declare function GridListItem({ actions: Actions, href, id, image, imageHref, meta, subtitle, title, }: Readonly<ListObject>): React.ReactElement;
|
|
4
4
|
export default GridListItem;
|
|
@@ -7,18 +7,18 @@ export interface ListComponentProps {
|
|
|
7
7
|
params?: Record<string, string>;
|
|
8
8
|
searchParams?: Record<string, string>;
|
|
9
9
|
}
|
|
10
|
-
export interface ListProps<Item
|
|
10
|
+
export interface ListProps<Item> {
|
|
11
11
|
actions?: ({ id }: {
|
|
12
12
|
readonly id: number;
|
|
13
13
|
}) => React.ReactElement;
|
|
14
14
|
columns?: number;
|
|
15
15
|
emptyMessageProps?: EmptyMessageProps;
|
|
16
16
|
filters?: FilterObject[];
|
|
17
|
-
fn: (params
|
|
17
|
+
fn: (params: Record<string, string>, searchParams: URLSearchParams) => Promise<Errorable<Item[]>>;
|
|
18
18
|
hasSearch?: boolean;
|
|
19
19
|
renderItem?: (props: ListObject) => React.ReactElement;
|
|
20
|
-
params?:
|
|
20
|
+
params?: Record<string, string>;
|
|
21
21
|
transformer?: (item: Item) => ListObject;
|
|
22
22
|
}
|
|
23
|
-
declare function List<Item extends object
|
|
23
|
+
declare function List<Item extends object>({ actions, columns, emptyMessageProps, filters, fn, hasSearch, params, renderItem, transformer, }: Readonly<ListProps<Item>>): Promise<React.ReactElement>;
|
|
24
24
|
export default List;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
'use server';
|
|
2
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { Fragment } from 'react';
|
|
4
3
|
import { EmptyMessage, tw } from '@sqrzro/components';
|
|
@@ -13,7 +12,7 @@ function defaultTransformer() {
|
|
|
13
12
|
}
|
|
14
13
|
async function List({ actions, columns, emptyMessageProps, filters, fn, hasSearch, params, renderItem = ListItem, transformer, }) {
|
|
15
14
|
const searchParams = new URLSearchParams(headers().get('x-search-params') || '');
|
|
16
|
-
const [response, error] = await fn(params, searchParams);
|
|
15
|
+
const [response, error] = await fn(params || {}, searchParams);
|
|
17
16
|
if (error) {
|
|
18
17
|
return _jsx("div", { children: "Error" });
|
|
19
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqrzro/admin",
|
|
3
|
-
"version": "2.1.0-bz.
|
|
3
|
+
"version": "2.1.0-bz.13",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "ISC",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"@sqrzro/components": "bz",
|
|
15
15
|
"@sqrzro/hooks": "bz",
|
|
16
16
|
"@sqrzro/interfaces": "bz",
|
|
17
|
-
"next": "^14.1.
|
|
18
|
-
"react": "
|
|
19
|
-
"react-dom": "
|
|
17
|
+
"next": "^14.1.3",
|
|
18
|
+
"react": "18.3.0-canary-98b8359f6-20240223",
|
|
19
|
+
"react-dom": "18.3.0-canary-98b8359f6-20240223"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@babel/core": "^7.
|
|
23
|
-
"@babel/preset-env": "^7.
|
|
22
|
+
"@babel/core": "^7.24.0",
|
|
23
|
+
"@babel/preset-env": "^7.24.0",
|
|
24
24
|
"@babel/preset-react": "^7.23.3",
|
|
25
25
|
"@babel/preset-typescript": "^7.23.3",
|
|
26
26
|
"@sqrzro/eslint-plugin": "bz",
|
|
@@ -41,17 +41,17 @@
|
|
|
41
41
|
"@types/bcrypt": "^5.0.2",
|
|
42
42
|
"@types/jest": "^29.5.12",
|
|
43
43
|
"@types/node": "18.14.6",
|
|
44
|
-
"@types/react": "^18.2.
|
|
44
|
+
"@types/react": "^18.2.64",
|
|
45
45
|
"babel-loader": "^8.3.0",
|
|
46
46
|
"concurrently": "^7.6.0",
|
|
47
|
-
"eslint": "^8.
|
|
47
|
+
"eslint": "^8.57.0",
|
|
48
48
|
"jest": "^29.7.0",
|
|
49
49
|
"mockdate": "^3.0.5",
|
|
50
50
|
"prettier": "^3.2.5",
|
|
51
51
|
"rimraf": "^4.4.1",
|
|
52
52
|
"storybook": "^7.6.17",
|
|
53
53
|
"tailwindcss": "^3.4.1",
|
|
54
|
-
"typescript": "^5.
|
|
54
|
+
"typescript": "^5.4.2"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "pnpm clean && tsc -p tsconfig.build.json",
|