@truedat/ai 7.5.3 → 7.5.5
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 +4 -4
- package/src/components/__tests__/TranslationModal.spec.js +0 -22
- package/src/components/actions/ActionActions.js +3 -3
- package/src/components/actions/__tests__/__snapshots__/Action.spec.js.snap +1 -1
- package/src/components/actions/__tests__/__snapshots__/ActionActions.spec.js.snap +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/ai",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.5",
|
|
4
4
|
"description": "Truedat Web Artificial Intelligence package",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/react-hooks": "^8.0.1",
|
|
37
37
|
"@testing-library/user-event": "^13.2.1",
|
|
38
|
-
"@truedat/test": "7.5.
|
|
38
|
+
"@truedat/test": "7.5.5",
|
|
39
39
|
"babel-jest": "^28.1.0",
|
|
40
40
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
41
41
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
]
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@truedat/core": "7.5.
|
|
88
|
+
"@truedat/core": "7.5.5",
|
|
89
89
|
"prop-types": "^15.8.1",
|
|
90
90
|
"react-hook-form": "^7.45.4",
|
|
91
91
|
"react-intl": "^5.20.10",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"react-dom": ">= 16.8.6 < 17",
|
|
98
98
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "2a4343b3b2837540358b57d3d647408ab292aa21"
|
|
101
101
|
}
|
|
@@ -302,28 +302,6 @@ describe("TranslationModal", () => {
|
|
|
302
302
|
});
|
|
303
303
|
});
|
|
304
304
|
|
|
305
|
-
it.skip("handles translation error", async () => {
|
|
306
|
-
jest.resetAllMocks();
|
|
307
|
-
jest.mock("@truedat/ai/hooks/useTranslations", () => ({
|
|
308
|
-
useRequestTranslation: jest.fn(() => ({
|
|
309
|
-
trigger: jest.fn(() => Promise.reject(new Error("Translation error"))),
|
|
310
|
-
})),
|
|
311
|
-
}));
|
|
312
|
-
|
|
313
|
-
const { getByText, getByRole } = render(
|
|
314
|
-
<TranslationModal {...props} />,
|
|
315
|
-
renderOpts
|
|
316
|
-
);
|
|
317
|
-
|
|
318
|
-
await act(async () => {
|
|
319
|
-
fireEvent.click(getByRole("button", { name: /Request Translation/i }));
|
|
320
|
-
});
|
|
321
|
-
|
|
322
|
-
await waitFor(() => {
|
|
323
|
-
expect(getByText("Translation Error")).toBeInTheDocument();
|
|
324
|
-
});
|
|
325
|
-
});
|
|
326
|
-
|
|
327
305
|
it("applies translation and closes modal", async () => {
|
|
328
306
|
const { getByRole } = render(<TranslationModal {...props} />, renderOpts);
|
|
329
307
|
|
|
@@ -4,7 +4,7 @@ import { useIntl } from "react-intl";
|
|
|
4
4
|
import { Link } from "react-router-dom";
|
|
5
5
|
import { linkTo, ACTIONS } from "@truedat/core/routes";
|
|
6
6
|
import { useHistory } from "react-router-dom";
|
|
7
|
-
import { Button } from "semantic-ui-react";
|
|
7
|
+
import { Button, Icon } from "semantic-ui-react";
|
|
8
8
|
import { ConfirmModal, GroupActions } from "@truedat/core/components";
|
|
9
9
|
import { useActionDelete, useActionSetActive } from "../../hooks/useActions";
|
|
10
10
|
|
|
@@ -47,7 +47,7 @@ export const ConfirmDeleteModal = ({ handleDelete, name, id }) => {
|
|
|
47
47
|
icon="trash"
|
|
48
48
|
trigger={
|
|
49
49
|
<Button
|
|
50
|
-
icon="trash"
|
|
50
|
+
icon={<Icon name="trash alternate outline" color="red" />}
|
|
51
51
|
content={formatMessage({ id: "ai.actions.actions.delete" })}
|
|
52
52
|
/>
|
|
53
53
|
}
|
|
@@ -114,7 +114,7 @@ export const ActionActions = ({ action, actionMutate }) => {
|
|
|
114
114
|
};
|
|
115
115
|
const remove = {
|
|
116
116
|
key: "delete",
|
|
117
|
-
icon: "trash",
|
|
117
|
+
icon: "trash alternate outline",
|
|
118
118
|
value: "delete",
|
|
119
119
|
as: ConfirmDeleteModal,
|
|
120
120
|
handleDelete: onConfirmDelete,
|