@truedat/dq 5.14.0 → 5.15.0

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/dq",
3
- "version": "5.14.0",
3
+ "version": "5.15.0",
4
4
  "description": "Truedat Web Data Quality Module",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -92,8 +92,8 @@
92
92
  },
93
93
  "dependencies": {
94
94
  "@apollo/client": "^3.7.1",
95
- "@truedat/core": "5.14.0",
96
- "@truedat/df": "5.14.0",
95
+ "@truedat/core": "5.15.0",
96
+ "@truedat/df": "5.15.0",
97
97
  "decode-uri-component": "^0.2.2",
98
98
  "graphql": "^15.5.3",
99
99
  "moment": "^2.29.4",
@@ -118,5 +118,5 @@
118
118
  "react-dom": ">= 16.8.6 < 17",
119
119
  "semantic-ui-react": ">= 2.0.3 < 2.2"
120
120
  },
121
- "gitHead": "f1e5448ad078ffe2eece70dabf785f2dc295f0e9"
121
+ "gitHead": "93bcd66804df32821aa0d563b863774554a39047"
122
122
  }
@@ -18,7 +18,7 @@ export const ImplementationsUploadButton = ({
18
18
  uploadImplementations,
19
19
  loading,
20
20
  }) => {
21
- const { formatMessage } = useIntl();
21
+ const { formatMessage, locale } = useIntl();
22
22
  const extraAction = {
23
23
  key: "yesWithAutoPublish",
24
24
  primary: true,
@@ -29,6 +29,7 @@ export const ImplementationsUploadButton = ({
29
29
  return uploadImplementations({
30
30
  action: "upload",
31
31
  formData,
32
+ lang: locale,
32
33
  ...uploadAction,
33
34
  });
34
35
  },
@@ -58,6 +59,7 @@ export const ImplementationsUploadButton = ({
58
59
  return uploadImplementations({
59
60
  action: "upload",
60
61
  formData,
62
+ lang: locale,
61
63
  ...uploadAction,
62
64
  });
63
65
  }}
@@ -13,7 +13,7 @@ const uploadAction = {
13
13
  };
14
14
 
15
15
  export const RulesUploadButton = ({ uploadRules, loading }) => {
16
- const { formatMessage } = useIntl();
16
+ const { formatMessage, locale } = useIntl();
17
17
  return (
18
18
  <UploadModal
19
19
  icon="upload"
@@ -39,6 +39,7 @@ export const RulesUploadButton = ({ uploadRules, loading }) => {
39
39
  uploadRules({
40
40
  action: "upload",
41
41
  data,
42
+ lang: locale,
42
43
  ...uploadAction,
43
44
  })
44
45
  }
@@ -82,6 +82,7 @@ describe("<ImplementationsUploadButton />", () => {
82
82
  expect(uploadImplementationsMock).toHaveBeenCalledWith({
83
83
  action: "upload",
84
84
  formData,
85
+ lang: "en",
85
86
  href: "/api/rule_implementations/upload",
86
87
  method: "POST",
87
88
  });
@@ -125,6 +126,7 @@ describe("<ImplementationsUploadButton />", () => {
125
126
  expect(uploadImplementationsMock).toHaveBeenCalledWith({
126
127
  action: "upload",
127
128
  formData,
129
+ lang: "en",
128
130
  href: "/api/rule_implementations/upload",
129
131
  method: "POST",
130
132
  });
@@ -129,7 +129,7 @@ export const RuleImplementationForm = ({
129
129
 
130
130
  const validSegments = () => _.every(_.negate(_.isEmpty))(segments);
131
131
 
132
- const validDataSet = () => areStructuresComplete();
132
+ const validDataView = () => areStructuresComplete();
133
133
 
134
134
  const areStructuresComplete = () =>
135
135
  !_.isEmpty(structures) &&
@@ -150,7 +150,7 @@ export const RuleImplementationForm = ({
150
150
  icon: "info",
151
151
  isValid: () => validInformation(),
152
152
  },
153
- { name: "dataset", icon: "database", isValid: () => validDataSet() },
153
+ { name: "dataset", icon: "database", isValid: () => validDataView() },
154
154
  {
155
155
  name: "populations",
156
156
  icon: "user",
@@ -28,7 +28,7 @@ describe("sagas: uploadImplementationsRequestsSaga", () => {
28
28
  });
29
29
 
30
30
  describe("sagas: uploadImplementationsSaga", () => {
31
- const body = { implementations: "content" };
31
+ const body = new FormData();
32
32
  const payload = { formData: body };
33
33
 
34
34
  it("should put a access action when a response is returned", () => {
@@ -25,7 +25,7 @@ describe("sagas: uploadRulesRequestsSaga", () => {
25
25
  });
26
26
 
27
27
  describe("sagas: uploadRulesSaga", () => {
28
- const body = { rules: "content" };
28
+ const body = new FormData();
29
29
  const payload = { data: body };
30
30
  const data = { message: [1, 2] };
31
31
  it("should put a access action when a response is returned", () => {
@@ -5,7 +5,8 @@ import { API_RULE_IMPLEMENTATIONS_UPLOAD } from "../api";
5
5
 
6
6
  export function* uploadImplementationsSaga({ payload }) {
7
7
  try {
8
- const { formData: body } = payload;
8
+ const { formData: body, lang } = payload;
9
+ body.append("lang", lang);
9
10
  yield put(uploadImplementations.request());
10
11
  const { data } = yield call(
11
12
  apiJsonPost,
@@ -5,7 +5,8 @@ import { API_RULES_UPLOAD } from "../api";
5
5
 
6
6
  export function* uploadRulesSaga({ payload }) {
7
7
  try {
8
- const { data: body } = payload;
8
+ const { data: body, lang } = payload;
9
+ body.append("lang", lang);
9
10
  yield put(uploadRules.request());
10
11
  const { data } = yield call(
11
12
  apiJsonPost,