@truedat/dd 5.12.3 → 5.12.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dd",
3
- "version": "5.12.3",
3
+ "version": "5.12.5",
4
4
  "description": "Truedat Web Data Dictionary",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -115,5 +115,5 @@
115
115
  "react-dom": ">= 16.8.6 < 17",
116
116
  "semantic-ui-react": ">= 2.0.3 < 2.2"
117
117
  },
118
- "gitHead": "51a25377a535c088db6127141f83ecf5b0269a0c"
118
+ "gitHead": "d4ada9bc4f5c168a1a911e51ae8e5b47a71d7855"
119
119
  }
@@ -29,7 +29,7 @@ export const StructuresDownloadOption = ({
29
29
  downloadStructures,
30
30
  hasFilterApplied,
31
31
  }) => {
32
- const { formatMessage } = useIntl();
32
+ const { formatMessage, locale } = useIntl();
33
33
  const headerLabels = _.flow(
34
34
  _.map((l) => [l, formatMessage({ id: `structures.props.${l}` })]),
35
35
  _.fromPairs
@@ -51,7 +51,7 @@ export const StructuresDownloadOption = ({
51
51
  )}
52
52
  </>
53
53
  }
54
- onClick={() => downloadStructures({ headerLabels })}
54
+ onClick={() => downloadStructures({ headerLabels, lang: locale })}
55
55
  disabled={isDisabled || structuresDownloading}
56
56
  />
57
57
  )
@@ -31,13 +31,15 @@ describe("sagas: downloadStructuresRequestSaga", () => {
31
31
 
32
32
  describe("sagas: downloadStructuresSaga", () => {
33
33
  const headerLabels = { name: "Name" };
34
- const payload = { headerLabels };
34
+ const lang = "es";
35
+ const payload = { headerLabels, lang: lang };
35
36
 
36
37
  const query = { filters: {} };
37
38
  const data = "SOME CSV DATA";
38
39
 
39
40
  const body = {
40
41
  header_labels: headerLabels,
42
+ lang: lang,
41
43
  structure_url_schema: "http://localhost/structures/:id",
42
44
  ...query,
43
45
  };
@@ -19,10 +19,13 @@ export function saveFile(data) {
19
19
  export function* downloadStructuresSaga({ payload }) {
20
20
  try {
21
21
  const headerLabels = _.propOr({}, "headerLabels")(payload);
22
+ const lang = _.propOr("es", "lang")(payload);
23
+
22
24
  const query = yield select(getPreviousStructureQuery);
23
25
  const body = {
24
26
  header_labels: headerLabels,
25
27
  structure_url_schema: getStructureUrlSchema(),
28
+ lang,
26
29
  ...query,
27
30
  };
28
31
  const url = API_DATA_STRUCTURES_CSV;