@truedat/auth 7.5.10 → 7.5.12
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/auth",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.12",
|
|
4
4
|
"description": "Truedat Web Auth",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@testing-library/dom": "^10.4.0",
|
|
48
48
|
"@testing-library/jest-dom": "^6.6.3",
|
|
49
|
-
"@testing-library/react": "^16.
|
|
49
|
+
"@testing-library/react": "^16.3.0",
|
|
50
50
|
"@testing-library/user-event": "^14.6.1",
|
|
51
|
-
"@truedat/test": "7.5.
|
|
51
|
+
"@truedat/test": "7.5.12",
|
|
52
52
|
"identity-obj-proxy": "^3.0.0",
|
|
53
53
|
"jest": "^29.7.0",
|
|
54
54
|
"redux-saga-test-plan": "^4.0.6"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@apollo/client": "^3.13.
|
|
58
|
-
"@truedat/core": "7.5.
|
|
57
|
+
"@apollo/client": "^3.13.8",
|
|
58
|
+
"@truedat/core": "7.5.12",
|
|
59
59
|
"auth0-js": "^9.28.0",
|
|
60
|
-
"axios": "^1.
|
|
61
|
-
"graphql": "^16.
|
|
60
|
+
"axios": "^1.9.0",
|
|
61
|
+
"graphql": "^16.11.0",
|
|
62
62
|
"is-hotkey": "^0.2.0",
|
|
63
63
|
"is-url": "^1.2.4",
|
|
64
64
|
"jwt-decode": "^4.0.0",
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
"moment": "^2.30.1",
|
|
67
67
|
"path-to-regexp": "^8.2.0",
|
|
68
68
|
"prop-types": "^15.8.1",
|
|
69
|
-
"query-string": "^7.1.
|
|
70
|
-
"react": "^19.
|
|
69
|
+
"query-string": "^7.1.3",
|
|
70
|
+
"react": "^19.1.0",
|
|
71
71
|
"react-csv": "^2.2.2",
|
|
72
|
-
"react-dom": "^19.
|
|
72
|
+
"react-dom": "^19.1.0",
|
|
73
73
|
"react-dropzone": "^14.3.8",
|
|
74
|
-
"react-hook-form": "^7.
|
|
75
|
-
"react-intl": "^7.1.
|
|
74
|
+
"react-hook-form": "^7.56.4",
|
|
75
|
+
"react-intl": "^7.1.11",
|
|
76
76
|
"react-moment": "^1.1.3",
|
|
77
77
|
"react-redux": "^9.2.0",
|
|
78
|
-
"react-router": "^7.
|
|
78
|
+
"react-router": "^7.6.0",
|
|
79
79
|
"redux": "^5.0.1",
|
|
80
80
|
"redux-saga": "^1.3.0",
|
|
81
81
|
"redux-saga-routines": "^3.2.3",
|
|
@@ -85,5 +85,12 @@
|
|
|
85
85
|
"swr": "^2.3.3",
|
|
86
86
|
"validator": "^13.15.0"
|
|
87
87
|
},
|
|
88
|
-
"
|
|
88
|
+
"overrides": {
|
|
89
|
+
"jsdom": "26.0.0",
|
|
90
|
+
"superagent": "10.2.1"
|
|
91
|
+
},
|
|
92
|
+
"resolutions": {
|
|
93
|
+
"superagent@npm:^7.1.5": "10.2.1"
|
|
94
|
+
},
|
|
95
|
+
"gitHead": "1476061ceb9ed15e0bacec71e20d695a0cd57986"
|
|
89
96
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import {
|
|
3
|
-
import { connect } from "react-redux";
|
|
2
|
+
import { connect, useDispatch } from "react-redux";
|
|
4
3
|
import PropTypes from "prop-types";
|
|
5
4
|
import { Button, Icon } from "semantic-ui-react";
|
|
6
5
|
import { FormattedMessage } from "react-intl";
|
|
7
6
|
import { ConfirmModal, GroupActions } from "@truedat/core/components";
|
|
8
|
-
import { linkTo } from "@truedat/core/routes";
|
|
9
|
-
import {
|
|
7
|
+
import { linkTo, USERS } from "@truedat/core/routes";
|
|
8
|
+
import { Link, useNavigate } from "react-router";
|
|
9
|
+
import { deleteUser, fetchUsers } from "../routines";
|
|
10
10
|
|
|
11
|
-
const ModalDelete = ({
|
|
11
|
+
const ModalDelete = ({ handleDelete, id, name }) => (
|
|
12
12
|
<ConfirmModal
|
|
13
13
|
icon="trash"
|
|
14
14
|
trigger={
|
|
@@ -25,11 +25,20 @@ const ModalDelete = ({ deleteUser, id }) => (
|
|
|
25
25
|
values={{ name: <i>{name}</i> }}
|
|
26
26
|
/>
|
|
27
27
|
}
|
|
28
|
-
onConfirm={() =>
|
|
28
|
+
onConfirm={() => handleDelete({ id })}
|
|
29
29
|
/>
|
|
30
30
|
);
|
|
31
31
|
|
|
32
|
-
export const UserActions = ({ deleteUser, user: { id } }) => {
|
|
32
|
+
export const UserActions = ({ deleteUser, user: { id, name } }) => {
|
|
33
|
+
const navigate = useNavigate();
|
|
34
|
+
const dispatch = useDispatch();
|
|
35
|
+
|
|
36
|
+
const onConfirmDelete = async ({ id }) => {
|
|
37
|
+
await deleteUser({ id });
|
|
38
|
+
dispatch(fetchUsers());
|
|
39
|
+
navigate(USERS);
|
|
40
|
+
};
|
|
41
|
+
|
|
33
42
|
const generateAvailableActions = () => {
|
|
34
43
|
const actions = {
|
|
35
44
|
edit: true,
|
|
@@ -67,7 +76,7 @@ export const UserActions = ({ deleteUser, user: { id } }) => {
|
|
|
67
76
|
icon: "trash",
|
|
68
77
|
value: "delete",
|
|
69
78
|
as: ModalDelete,
|
|
70
|
-
|
|
79
|
+
handleDelete: onConfirmDelete,
|
|
71
80
|
id,
|
|
72
81
|
name,
|
|
73
82
|
selected: false,
|
|
@@ -22,7 +22,7 @@ describe("reducers: userRedirect", () => {
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
it("should handle the deleteUser.SUCCESS action", () => {
|
|
25
|
-
expect(userRedirect("foo", { type: deleteUser.SUCCESS })).toEqual("
|
|
25
|
+
expect(userRedirect("foo", { type: deleteUser.SUCCESS })).toEqual("foo");
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
it("should handle the updateUser.SUCCESS action", () => {
|