@bento-core/table 1.0.1-ccdihub.72 → 1.0.1-ccdihub.74

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.
@@ -62,7 +62,7 @@ const DownloadButton = _ref => {
62
62
  query,
63
63
  variables: _objectSpread(_objectSpread({}, queryVariables), {}, {
64
64
  page: 0,
65
- first: 10000,
65
+ first: 200000,
66
66
  order_by: table.sortBy,
67
67
  sort_direction: table.sortOrder
68
68
  })
@@ -83,7 +83,7 @@ const DownloadButton = _ref => {
83
83
  query,
84
84
  variables: _objectSpread(_objectSpread({}, queryVariables), {}, {
85
85
  page: 0,
86
- first: 10000,
86
+ first: 200000,
87
87
  order_by: table.sortBy,
88
88
  sort_direction: table.sortOrder
89
89
  })
@@ -151,26 +151,20 @@ function downloadJson(tableData, table, downloadFileName) {
151
151
  let survivalStatus = entry.last_known_survival_status;
152
152
  let sampleId = entry.sample_id;
153
153
  let dataCategory = entry.data_category;
154
- if (!survivalStatus || survivalStatus === '[]') {
155
- survivalStatus = '';
156
- } else if (survivalStatus.toString().charAt(0) === '[' && survivalStatus.toString().charAt(survivalStatus.toString().length - 1) === ']') {
154
+ const toReturn = _objectSpread({}, entry);
155
+ if (survivalStatus && survivalStatus.toString().charAt(0) === '[' && survivalStatus.toString().charAt(survivalStatus.toString().length - 1) === ']') {
157
156
  survivalStatus = survivalStatus.toString().substring(1, survivalStatus.length - 1);
157
+ toReturn['Last Known Survival Status'] = survivalStatus;
158
158
  }
159
- if (!sampleId || sampleId === '[]') {
160
- sampleId = '';
161
- } else if (sampleId.toString().charAt(0) === '[' && sampleId.toString().charAt(sampleId.toString().length - 1) === ']') {
159
+ if (sampleId && sampleId.toString().charAt(0) === '[' && sampleId.toString().charAt(sampleId.toString().length - 1) === ']') {
162
160
  sampleId = sampleId.toString().substring(1, sampleId.length - 1);
161
+ toReturn['Sample Id'] = sampleId;
163
162
  }
164
- if (!dataCategory || dataCategory === '[]') {
165
- dataCategory = '';
166
- } else if (dataCategory.toString().charAt(0) === '[' && dataCategory.toString().charAt(dataCategory.toString().length - 1) === ']') {
163
+ if (dataCategory && dataCategory.toString().charAt(0) === '[' && dataCategory.toString().charAt(dataCategory.toString().length - 1) === ']') {
167
164
  dataCategory = dataCategory.toString().substring(1, dataCategory.length - 1);
165
+ toReturn['Data Category'] = dataCategory;
168
166
  }
169
- return _objectSpread(_objectSpread({}, entry), {}, {
170
- last_known_survival_status: survivalStatus,
171
- sample_id: sampleId,
172
- data_category: dataCategory
173
- });
167
+ return toReturn;
174
168
  });
175
169
  filterColumns.forEach(column => {
176
170
  formatDataVal = JSON.parse(JSON.stringify(formatDataVal).split("\"".concat(column.dataField, "\":")).join("\"".concat(column.header, "\":")));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-ccdihub.72",
3
+ "version": "1.0.1-ccdihub.74",
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",
@@ -61,7 +61,7 @@ const DownloadButton = ({
61
61
  variables: {
62
62
  ...queryVariables,
63
63
  page: 0,
64
- first: 10000,
64
+ first: 200000,
65
65
  order_by: table.sortBy,
66
66
  sort_direction: table.sortOrder,
67
67
  },
@@ -86,7 +86,7 @@ const DownloadButton = ({
86
86
  variables: {
87
87
  ...queryVariables,
88
88
  page: 0,
89
- first: 10000,
89
+ first: 200000,
90
90
  order_by: table.sortBy,
91
91
  sort_direction: table.sortOrder,
92
92
  },
@@ -100,30 +100,21 @@ export function downloadJson(tableData, table, downloadFileName) {
100
100
  let survivalStatus = entry.last_known_survival_status;
101
101
  let sampleId = entry.sample_id;
102
102
  let dataCategory = entry.data_category;
103
+ const toReturn = { ...entry };
103
104
 
104
- if (!survivalStatus || survivalStatus === '[]') {
105
- survivalStatus = '';
106
- } else if (survivalStatus.toString().charAt(0) === '[' && survivalStatus.toString().charAt(survivalStatus.toString().length - 1) === ']') {
105
+ if (survivalStatus && survivalStatus.toString().charAt(0) === '[' && survivalStatus.toString().charAt(survivalStatus.toString().length - 1) === ']') {
107
106
  survivalStatus = survivalStatus.toString().substring(1, survivalStatus.length - 1);
107
+ toReturn['Last Known Survival Status'] = survivalStatus;
108
108
  }
109
-
110
- if (!sampleId || sampleId === '[]') {
111
- sampleId = '';
112
- } else if (sampleId.toString().charAt(0) === '[' && sampleId.toString().charAt(sampleId.toString().length - 1) === ']') {
109
+ if (sampleId && sampleId.toString().charAt(0) === '[' && sampleId.toString().charAt(sampleId.toString().length - 1) === ']') {
113
110
  sampleId = sampleId.toString().substring(1, sampleId.length - 1);
111
+ toReturn['Sample Id'] = sampleId;
114
112
  }
115
-
116
- if (!dataCategory || dataCategory === '[]') {
117
- dataCategory = '';
118
- } else if (dataCategory.toString().charAt(0) === '[' && dataCategory.toString().charAt(dataCategory.toString().length - 1) === ']') {
113
+ if (dataCategory && dataCategory.toString().charAt(0) === '[' && dataCategory.toString().charAt(dataCategory.toString().length - 1) === ']') {
119
114
  dataCategory = dataCategory.toString().substring(1, dataCategory.length - 1);
115
+ toReturn['Data Category'] = dataCategory;
120
116
  }
121
- return {
122
- ...entry,
123
- last_known_survival_status: survivalStatus,
124
- sample_id: sampleId,
125
- data_category: dataCategory,
126
- };
117
+ return toReturn;
127
118
  });
128
119
  filterColumns.forEach((column) => {
129
120
  formatDataVal = JSON.parse(