@bento-core/table 1.0.1-ccdihub.62 → 1.0.1-ccdihub.63

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.
@@ -128,7 +128,8 @@ function downloadJson(tableData, table, downloadFileName) {
128
128
  } = _ref6;
129
129
  return !_Types.actionCellTypes.includes(cellType);
130
130
  });
131
- const formatDataVal = (0, _Dataformat.formatColumnValues)(filterColumns, tableData);
131
+ let formatDataVal = (0, _Dataformat.formatColumnValues)(filterColumns, tableData);
132
+ formatDataVal = JSON.parse(JSON.stringify(formatDataVal).split('"participant_age_at_collection":').join('"participant_age_at_collection_(days)":'));
132
133
  const jsonse = JSON.stringify(formatDataVal);
133
134
  const exportData = new Blob([jsonse], {
134
135
  type: 'application/json'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-ccdihub.62",
3
+ "version": "1.0.1-ccdihub.63",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "build": "npm run lint && cross-env-shell rm -rf dist && NODE_ENV=production BABEL_ENV=es babel src --out-dir dist --copy-files",
@@ -86,7 +86,8 @@ export function downloadCSV(tableData, table, downloadFileName) {
86
86
  export function downloadJson(tableData, table, downloadFileName) {
87
87
  const { columns = [] } = table;
88
88
  const filterColumns = columns.filter(({ cellType }) => !actionCellTypes.includes(cellType));
89
- const formatDataVal = formatColumnValues(filterColumns, tableData);
89
+ let formatDataVal = formatColumnValues(filterColumns, tableData);
90
+ formatDataVal = JSON.parse(JSON.stringify(formatDataVal).split('"participant_age_at_collection":').join('"participant_age_at_collection_(days)":'));
90
91
  const jsonse = JSON.stringify(formatDataVal);
91
92
  const exportData = new Blob([jsonse], { type: 'application/json' });
92
93
  const JsonURL = window.URL.createObjectURL(exportData);