@bento-core/table 1.0.1-ccdihub.42 → 1.0.1-ccdihub.43

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.
@@ -47,7 +47,7 @@ const DownloadButton = _ref => {
47
47
  query,
48
48
  variables: _objectSpread(_objectSpread({}, queryVariables), {}, {
49
49
  page: 0,
50
- first: 25000
50
+ first: 10000
51
51
  })
52
52
  }).then(response => {
53
53
  if (paginationAPIField && response && response.data) {
@@ -43,8 +43,16 @@ function convertToCSV(jsonse, keysToInclude, header) {
43
43
  let line = '';
44
44
  keysToInclude.map(keyName => {
45
45
  if (line !== '') line += ',';
46
+ console.log('keyname!!!!!', keyName);
47
+ console.log('entry!!!!!', entry[keyName]);
46
48
  if (keyName === 'file_size') {
47
49
  line += entry[keyName] !== null ? "\"".concat((0, _Dataformat.formatBytes)(entry[keyName]), "\"") : ' ';
50
+ } else if (keyName === 'age_at_diagnosis' || keyName === 'participant_age_at_collection') {
51
+ if (entry[keyName] === -999) {
52
+ line += 'Not Reported';
53
+ } else {
54
+ line += entry[keyName] !== null ? "\"".concat(entry[keyName], "\"") : ' ';
55
+ }
48
56
  } else {
49
57
  line += entry[keyName] !== null ? "\"".concat(entry[keyName], "\"") : ' ';
50
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-ccdihub.42",
3
+ "version": "1.0.1-ccdihub.43",
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",
@@ -41,7 +41,7 @@ const DownloadButton = ({
41
41
  variables: {
42
42
  ...queryVariables,
43
43
  page: 0,
44
- first: 25000,
44
+ first: 10000,
45
45
  },
46
46
  })
47
47
  .then((response) => {
@@ -35,8 +35,16 @@ export function convertToCSV(jsonse, keysToInclude, header) {
35
35
  let line = '';
36
36
  keysToInclude.map((keyName) => {
37
37
  if (line !== '') line += ',';
38
+ console.log('keyname!!!!!', keyName);
39
+ console.log('entry!!!!!', entry[keyName]);
38
40
  if (keyName === 'file_size') {
39
41
  line += entry[keyName] !== null ? `"${formatBytes(entry[keyName])}"` : ' ';
42
+ } else if (keyName === 'age_at_diagnosis' || keyName === 'participant_age_at_collection') {
43
+ if (entry[keyName] === -999) {
44
+ line += 'Not Reported';
45
+ } else {
46
+ line += entry[keyName] !== null ? `"${entry[keyName]}"` : ' ';
47
+ }
40
48
  } else {
41
49
  line += entry[keyName] !== null ? `"${entry[keyName]}"` : ' ';
42
50
  }