@firecms/user_management 3.0.0-canary.289 → 3.0.0-canary.290
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/index.es.js +48 -33
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +48 -33
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/src/components/roles/RolesDetailsForm.tsx +1 -1
- package/src/components/users/UserDetailsForm.tsx +1 -1
- package/src/components/users/UsersView.tsx +11 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firecms/user_management",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-canary.
|
|
4
|
+
"version": "3.0.0-canary.290",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"types": "./dist/index.d.ts",
|
|
30
30
|
"source": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@firecms/core": "^3.0.0-canary.
|
|
33
|
-
"@firecms/formex": "^3.0.0-canary.
|
|
34
|
-
"@firecms/ui": "^3.0.0-canary.
|
|
32
|
+
"@firecms/core": "^3.0.0-canary.290",
|
|
33
|
+
"@firecms/formex": "^3.0.0-canary.290",
|
|
34
|
+
"@firecms/ui": "^3.0.0-canary.290",
|
|
35
35
|
"date-fns": "^3.6.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"@types/react": "^18.3.24",
|
|
44
44
|
"@types/react-dom": "^18.3.7",
|
|
45
45
|
"babel-plugin-react-compiler": "^19.0.0-beta-af1b7da-20250417",
|
|
46
|
-
"eslint-plugin-react-compiler": "^19.
|
|
47
|
-
"typescript": "^5.9.
|
|
48
|
-
"vite": "^7.
|
|
46
|
+
"eslint-plugin-react-compiler": "^19.1.0-rc.2",
|
|
47
|
+
"typescript": "^5.9.3",
|
|
48
|
+
"vite": "^7.2.4"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"dev": "vite",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"src",
|
|
58
58
|
"bin"
|
|
59
59
|
],
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "80538231810a133e5b3cba8a8d4b47ec6e5619f8"
|
|
61
61
|
}
|
|
@@ -148,7 +148,7 @@ export function RolesDetailsForm({
|
|
|
148
148
|
</DialogTitle>
|
|
149
149
|
<DialogContent className="flex-grow">
|
|
150
150
|
|
|
151
|
-
<div className={"grid grid-cols-12 gap-
|
|
151
|
+
<div className={"grid grid-cols-12 gap-4"}>
|
|
152
152
|
|
|
153
153
|
<div className={"col-span-12 md:col-span-8"}>
|
|
154
154
|
<TextField
|
|
@@ -146,7 +146,7 @@ export function UserDetailsForm({
|
|
|
146
146
|
</DialogTitle>
|
|
147
147
|
<DialogContent className="h-full flex-grow">
|
|
148
148
|
|
|
149
|
-
<div className={"grid grid-cols-12 gap-
|
|
149
|
+
<div className={"grid grid-cols-12 gap-4"}>
|
|
150
150
|
|
|
151
151
|
<div className={"col-span-12"}>
|
|
152
152
|
<TextField
|
|
@@ -8,8 +8,9 @@ import { User } from "@firecms/core";
|
|
|
8
8
|
|
|
9
9
|
export const UsersView = function UsersView({ children }: { children?: React.ReactNode }) {
|
|
10
10
|
|
|
11
|
-
const [dialogOpen, setDialogOpen] = useState<boolean>();
|
|
11
|
+
const [dialogOpen, setDialogOpen] = useState<boolean>(false);
|
|
12
12
|
const [selectedUser, setSelectedUser] = useState<User | undefined>();
|
|
13
|
+
const [newFormKey, setNewFormKey] = useState<number>(0);
|
|
13
14
|
|
|
14
15
|
const { users } = useUserManagement();
|
|
15
16
|
|
|
@@ -23,6 +24,12 @@ export const UsersView = function UsersView({ children }: { children?: React.Rea
|
|
|
23
24
|
setSelectedUser(undefined);
|
|
24
25
|
}, []);
|
|
25
26
|
|
|
27
|
+
const handleAddUser = useCallback(() => {
|
|
28
|
+
setSelectedUser(undefined);
|
|
29
|
+
setNewFormKey(k => k + 1);
|
|
30
|
+
setDialogOpen(true);
|
|
31
|
+
}, []);
|
|
32
|
+
|
|
26
33
|
return (
|
|
27
34
|
<Container className="w-full flex flex-col py-4 gap-4" maxWidth={"6xl"}>
|
|
28
35
|
|
|
@@ -38,7 +45,7 @@ export const UsersView = function UsersView({ children }: { children?: React.Rea
|
|
|
38
45
|
<Button
|
|
39
46
|
size={"large"}
|
|
40
47
|
startIcon={<AddIcon/>}
|
|
41
|
-
onClick={
|
|
48
|
+
onClick={handleAddUser}>
|
|
42
49
|
Add user
|
|
43
50
|
</Button>
|
|
44
51
|
</div>
|
|
@@ -46,8 +53,8 @@ export const UsersView = function UsersView({ children }: { children?: React.Rea
|
|
|
46
53
|
<UsersTable onUserClicked={onUserClicked}/>
|
|
47
54
|
|
|
48
55
|
<UserDetailsForm
|
|
49
|
-
key={selectedUser?.uid ??
|
|
50
|
-
open={dialogOpen
|
|
56
|
+
key={selectedUser?.uid ?? `new-${newFormKey}`}
|
|
57
|
+
open={dialogOpen}
|
|
51
58
|
user={selectedUser}
|
|
52
59
|
handleClose={handleClose}/>
|
|
53
60
|
|