@bento-core/table 1.0.1-ccdihub.107 → 1.0.1-ccdihub.109

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.
@@ -52,7 +52,7 @@ const ExtendedView = _ref => {
52
52
  style: downloadAreaStyle
53
53
  }, /*#__PURE__*/_react.default.createElement(_CustomPagination.default, {
54
54
  customTheme: customTheme.tblTopPgn,
55
- rowsPerPageOptions: [10, 25, 50, 100],
55
+ rowsPerPageOptions: table.rowsPerPageOptions || [10, 25, 50, 100],
56
56
  component: "div",
57
57
  count: table.totalRowCount || 0,
58
58
  rowsPerPage: table.rowsPerPage || 10,
package/dist/TableView.js CHANGED
@@ -152,7 +152,7 @@ const TableView = _ref => {
152
152
  style: getPaginationStyle(table, hasExport)
153
153
  }, /*#__PURE__*/_react.default.createElement(_CustomPagination.default, {
154
154
  customTheme: themeConfig.tblPgn,
155
- rowsPerPageOptions: [10, 25, 50, 100],
155
+ rowsPerPageOptions: table.rowsPerPageOptions || [10, 25, 50, 100],
156
156
  component: "div",
157
157
  count: table.totalRowCount || 0,
158
158
  rowsPerPage: table.rowsPerPage || 10,
@@ -7,48 +7,204 @@ exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _core = require("@material-ui/core");
9
9
  var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
10
+ var _ExpandMore = _interopRequireDefault(require("@material-ui/icons/ExpandMore"));
11
+ var _ExpandLess = _interopRequireDefault(require("@material-ui/icons/ExpandLess"));
10
12
  var _styles = require("@material-ui/core/styles");
11
13
  var _ModalStyle = _interopRequireDefault(require("./ModalStyle"));
12
14
  var _CustomCell = _interopRequireDefault(require("../../header/CustomCell"));
13
15
  var _ReduxAddFile = _interopRequireDefault(require("../../wrapper/components/ReduxAddFile"));
14
16
  var _Question_Icon = _interopRequireDefault(require("./assets/Question_Icon.svg"));
15
- var _Cart_Icon = _interopRequireDefault(require("./assets/Cart_Icon.svg"));
17
+ var _download = _interopRequireDefault(require("./assets/download.svg"));
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
21
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
20
- const tooltipContentAddAll = {
21
- tooltipText: 'Click button to add all Hub files associated with this participant to the cart.',
22
- icon: _Question_Icon.default,
23
- alt: 'tooltipIcon',
24
- Participants: 'Click button to add all files associated with the filtered row(s).',
25
- arrow: true,
26
- styles: {
27
- border: '#03A383 1px solid'
28
- }
29
- };
30
- const tooltipContent = {
31
- tooltipText: 'Click button to add all selected files associated with this participant to the cart.',
32
- icon: _Question_Icon.default,
33
- alt: 'tooltipIcon',
34
- Participants: 'Click button to add files associated with the selected row(s).',
35
- arrow: true,
36
- styles: {
37
- border: '#03A383 1px solid'
22
+ const useStyles = (0, _styles.makeStyles)(() => ({
23
+ button: {
24
+ width: '189px',
25
+ height: '41px',
26
+ alignSelf: 'end',
27
+ color: '#FFFFFF',
28
+ backgroundColor: '#2A6E93',
29
+ borderColor: '#2A6E93',
30
+ fontFamily: 'Poppins',
31
+ fontWeight: '600',
32
+ fontSize: '12px',
33
+ lineHeight: '13px',
34
+ display: 'flex',
35
+ justifyContent: 'flex-start',
36
+ alignItems: 'center',
37
+ padding: '0 12px',
38
+ borderRadius: '5px',
39
+ transition: 'border-radius 0.2s ease-in-out',
40
+ textAlign: 'left',
41
+ '&:hover': {
42
+ backgroundColor: '#245A7A'
43
+ },
44
+ '& .MuiButton-label': {
45
+ display: 'flex',
46
+ justifyContent: 'space-between',
47
+ alignItems: 'center',
48
+ width: '100%'
49
+ }
50
+ },
51
+ buttonOpen: {
52
+ borderBottomLeftRadius: '0',
53
+ borderBottomRightRadius: '0'
54
+ },
55
+ dropdownContainer: {
56
+ position: 'relative',
57
+ display: 'flex',
58
+ flexDirection: 'column',
59
+ alignItems: 'flex-end'
60
+ },
61
+ dropdown: {
62
+ position: 'absolute',
63
+ top: '100%',
64
+ right: 0,
65
+ zIndex: 10000,
66
+ marginTop: '-1px',
67
+ backgroundColor: 'white',
68
+ border: '1px solid #07679C',
69
+ borderTop: 'none',
70
+ borderRadius: '0 0 5px 5px',
71
+ boxShadow: '0px 4px 12px rgba(0, 0, 0, 0.15)',
72
+ minWidth: '189px',
73
+ width: '189px',
74
+ transformOrigin: 'top',
75
+ animation: '$slideDown 0.2s ease-out'
76
+ },
77
+ '@keyframes slideDown': {
78
+ '0%': {
79
+ opacity: 0,
80
+ transform: 'translateY(-10px)'
81
+ },
82
+ '100%': {
83
+ opacity: 1,
84
+ transform: 'translateY(0)'
85
+ }
86
+ },
87
+ dropdownList: {
88
+ padding: 0,
89
+ margin: 0
90
+ },
91
+ dropdownItem: {
92
+ borderBottom: '1px solid #07679C',
93
+ padding: '0',
94
+ height: '41px',
95
+ minHeight: '41px',
96
+ display: 'flex',
97
+ alignItems: 'center',
98
+ '&:first-child': {
99
+ borderTop: '1px solid #07679C'
100
+ },
101
+ '&:last-child': {
102
+ borderBottom: 'none'
103
+ },
104
+ '&:hover': {
105
+ backgroundColor: '#DEE4EC'
106
+ },
107
+ '&:active': {
108
+ backgroundColor: '#e9ecef'
109
+ },
110
+ '&:not(:last-child)': {
111
+ borderBottom: '1px solid #07679C'
112
+ },
113
+ '& > div': {
114
+ width: '100%',
115
+ display: 'flex',
116
+ alignItems: 'center',
117
+ height: '100%'
118
+ },
119
+ '& button': {
120
+ width: '100% !important',
121
+ height: '41px !important',
122
+ borderRadius: '0 !important',
123
+ backgroundColor: 'transparent !important',
124
+ color: '#343434 !important',
125
+ fontFamily: 'Poppins !important',
126
+ fontWeight: '500 !important',
127
+ fontStyle: 'Medium !important',
128
+ fontSize: '12px !important',
129
+ lineHeight: '13px !important',
130
+ letterSpacing: '-0.02em !important',
131
+ textTransform: 'uppercase !important',
132
+ textAlign: 'left !important',
133
+ justifyContent: 'flex-start !important',
134
+ padding: '0 12px !important',
135
+ border: 'none !important',
136
+ boxShadow: 'none !important',
137
+ display: 'flex !important',
138
+ alignItems: 'center !important',
139
+ verticalAlign: 'middle !important',
140
+ '&:hover': {
141
+ backgroundColor: 'transparent !important'
142
+ }
143
+ }
144
+ },
145
+ dropdownItemText: {
146
+ '& .MuiListItemText-primary': {
147
+ fontFamily: 'Poppins',
148
+ fontWeight: '600',
149
+ fontSize: '12px',
150
+ color: '#07679C',
151
+ textTransform: 'uppercase',
152
+ letterSpacing: '0.5px'
153
+ }
154
+ },
155
+ questionIcon: {
156
+ width: '10px',
157
+ height: '10px',
158
+ position: 'absolute',
159
+ top: '3px',
160
+ right: '-12px',
161
+ cursor: 'pointer',
162
+ zIndex: 1
163
+ },
164
+ tooltipContent: {
165
+ fontFamily: 'Poppins',
166
+ fontWeight: 400,
167
+ fontStyle: 'Regular',
168
+ fontSize: '13px',
169
+ lineHeight: '17.5px',
170
+ letterSpacing: '-0.01em',
171
+ color: '#000000',
172
+ backgroundColor: '#FFFFFF',
173
+ border: '0.5px solid #000000',
174
+ borderRadius: '4px',
175
+ padding: '12px',
176
+ maxWidth: '400px'
177
+ },
178
+ tooltipIcon: {
179
+ width: '16px',
180
+ height: '11px',
181
+ marginRight: '8px',
182
+ verticalAlign: 'middle'
183
+ },
184
+ customTooltip: {
185
+ backgroundColor: '#FFFFFF !important',
186
+ color: '#000000 !important',
187
+ border: '0.5px solid #000000 !important',
188
+ borderRadius: '4px !important',
189
+ padding: '0 !important',
190
+ boxShadow: 'none !important',
191
+ '& .MuiTooltip-arrow': {
192
+ color: '#000000 !important'
193
+ }
38
194
  }
39
- };
195
+ }));
40
196
  const CustomTableContainer = props => {
41
197
  const {
42
198
  children,
43
- themeConfig,
44
199
  className
45
200
  } = props;
46
201
  const tableStyle = {
47
- height: '425px',
202
+ height: '450px',
48
203
  overflowX: 'hidden'
49
204
  };
205
+ const defaultTheme = (0, _styles.createTheme)();
50
206
  return /*#__PURE__*/_react.default.createElement(_core.ThemeProvider, {
51
- theme: themeConfig
207
+ theme: defaultTheme
52
208
  }, /*#__PURE__*/_react.default.createElement(_core.TableContainer, {
53
209
  className: className,
54
210
  id: "tableContainer",
@@ -58,21 +214,115 @@ const CustomTableContainer = props => {
58
214
  };
59
215
  const CPIModal = _ref => {
60
216
  let {
61
- classes,
62
217
  open,
63
218
  onClose,
64
- row,
65
- themeConfig = {},
66
- navigation
219
+ row
67
220
  } = _ref;
221
+ const classes = useStyles();
68
222
  // const [sortBy, setSortBy] = useState('associated_id');
69
223
  // const [sortOrder, setSortOrder] = useState('asc');
70
224
  const [data, setData] = (0, _react.useState)(row.cpi_data);
71
225
  const [selectedIds, setIds] = (0, _react.useState)([]);
72
226
  const [selectAll, setSelectAll] = (0, _react.useState)(false);
227
+ const [dropdownOpen, setDropdownOpen] = (0, _react.useState)(false);
228
+ const dropdownRef = (0, _react.useRef)(null);
229
+ const participantId = row.participant_id;
230
+ const studyId = row.study_id;
73
231
  (0, _react.useEffect)(() => {
74
232
  setData(row.cpi_data);
75
233
  }, [row]);
234
+ const handleDropdownToggle = () => {
235
+ setDropdownOpen(!dropdownOpen);
236
+ };
237
+ const displayColumns = [{
238
+ dataField: 'associated_id',
239
+ header: 'Participant ID',
240
+ // tooltipText: 'sort',
241
+ sortable: false
242
+ }, {
243
+ dataField: 'repository_of_synonym_id',
244
+ header: 'Name',
245
+ // tooltipText: 'sort',
246
+ sortable: false
247
+ }, {
248
+ dataField: 'domain_description',
249
+ header: 'Description',
250
+ // tooltipText: 'sort',
251
+ sortable: false
252
+ }, {
253
+ dataField: 'domain_category',
254
+ header: 'Category',
255
+ // tooltipText: 'sort',
256
+ sortable: false
257
+ }, {
258
+ dataField: 'data_location',
259
+ header: 'Location',
260
+ // tooltipText: 'sort',
261
+ sortable: false
262
+ }];
263
+ const handleDownloadCSV = () => {
264
+ // Define CSV column order (different from table display order)
265
+ const csvColumnOrder = [{
266
+ dataField: 'repository_of_synonym_id',
267
+ header: 'repository_of_synonym_id'
268
+ }, {
269
+ dataField: 'associated_id',
270
+ header: 'associated_id'
271
+ }, {
272
+ dataField: 'domain_description',
273
+ header: 'domain_description'
274
+ }, {
275
+ dataField: 'domain_category',
276
+ header: 'domain_category'
277
+ }, {
278
+ dataField: 'data_location',
279
+ header: 'data_location'
280
+ }];
281
+
282
+ // Get the table data using CSV column order
283
+ const csvData = data.map(dataRow => csvColumnOrder.map(column => {
284
+ const value = dataRow[column.dataField];
285
+ // Escape commas and quotes in CSV
286
+ if (typeof value === 'string' && (value.includes(',') || value.includes('"') || value.includes('\n'))) {
287
+ return "\"".concat(value.replace(/"/g, '""'), "\"");
288
+ }
289
+ return value || '';
290
+ }));
291
+
292
+ // Create CSV headers using CSV column order
293
+ const headers = csvColumnOrder.map(column => column.header).join(',');
294
+
295
+ // Create CSV content
296
+ const csvContent = [headers, ...csvData.map(csvRow => csvRow.join(','))].join('\n');
297
+
298
+ // Create and download the file
299
+ const blob = new Blob([csvContent], {
300
+ type: 'text/csv;charset=utf-8;'
301
+ });
302
+ const link = document.createElement('a');
303
+ const url = URL.createObjectURL(blob);
304
+ link.setAttribute('href', url);
305
+ link.setAttribute('download', "alternative_identifiers_".concat(participantId, "_").concat(studyId, ".csv"));
306
+ link.style.visibility = 'hidden';
307
+ document.body.appendChild(link);
308
+ link.click();
309
+ document.body.removeChild(link);
310
+ };
311
+
312
+ // Close dropdown when clicking outside
313
+ (0, _react.useEffect)(() => {
314
+ const handleClickOutside = event => {
315
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
316
+ setDropdownOpen(false);
317
+ }
318
+ };
319
+ if (dropdownOpen) {
320
+ document.addEventListener('mousedown', handleClickOutside);
321
+ }
322
+ return () => {
323
+ document.removeEventListener('mousedown', handleClickOutside);
324
+ };
325
+ }, [dropdownOpen]);
76
326
  const wrapperConfig = {
77
327
  container: 'buttons',
78
328
  size: 'xl',
@@ -83,7 +333,6 @@ const CPIModal = _ref => {
83
333
  clsName: 'add_all_button',
84
334
  role: 'ADD_ALL_FILES',
85
335
  btnType: 'ADD_ALL_FILES',
86
- tooltipCofig: tooltipContentAddAll,
87
336
  conditional: false,
88
337
  alertMessage: 'The cart is limited to 200,000 files. Please narrow the search criteria or remove some files from the cart to add more.'
89
338
  }, {
@@ -92,8 +341,8 @@ const CPIModal = _ref => {
92
341
  clsName: 'add_selected_button',
93
342
  role: 'ADD_SELECTED_FILES',
94
343
  btnType: 'ADD_SELECTED_FILES',
95
- tooltipCofig: tooltipContent,
96
344
  conditional: true,
345
+ disabled: selectedIds.length === 0,
97
346
  alertMessage: 'The cart is limited to 200,000 files. Please narrow the search criteria or remove some files from the cart to add more.'
98
347
  }]
99
348
  };
@@ -141,7 +390,9 @@ const CPIModal = _ref => {
141
390
  const buttonContainer = {
142
391
  display: 'flex',
143
392
  justifyContent: 'center',
144
- padding: '10px'
393
+ alignItems: 'center',
394
+ padding: '10px',
395
+ gap: '20px'
145
396
  };
146
397
  const addAllFilesButton = {
147
398
  width: '174px',
@@ -162,8 +413,10 @@ const CPIModal = _ref => {
162
413
  fontFamily: 'Poppins',
163
414
  fontWeight: '600',
164
415
  fontSize: '12px',
165
- color: 'white',
166
- lineHeight: '14px'
416
+ color: selectedIds.length ? 'white' : '#666666',
417
+ lineHeight: '14px',
418
+ opacity: selectedIds.length ? 1 : 0.6,
419
+ cursor: selectedIds.length ? 'pointer' : 'not-allowed'
167
420
  };
168
421
  const goToCartButton = {
169
422
  width: '174px',
@@ -175,6 +428,30 @@ const CPIModal = _ref => {
175
428
  fontSize: '12px',
176
429
  color: 'white'
177
430
  };
431
+ const downloadAltIdsButton = {
432
+ width: '189px',
433
+ height: '41px',
434
+ borderRadius: '5px',
435
+ backgroundColor: '#5A7C84',
436
+ fontFamily: 'Poppins',
437
+ fontWeight: '600',
438
+ fontSize: '12px',
439
+ color: 'white',
440
+ textTransform: 'uppercase',
441
+ border: 'none'
442
+ };
443
+ const viewInExploreButton = {
444
+ width: '189px',
445
+ height: '41px',
446
+ borderRadius: '5px',
447
+ backgroundColor: '#2A5C75',
448
+ fontFamily: 'Poppins',
449
+ fontWeight: '600',
450
+ fontSize: '12px',
451
+ color: 'white',
452
+ textTransform: 'uppercase',
453
+ border: 'none'
454
+ };
178
455
  const modalBody = {
179
456
  position: 'absolute',
180
457
  top: '5%',
@@ -184,7 +461,7 @@ const CPIModal = _ref => {
184
461
  background: '#FFFFFF',
185
462
  border: '1px solid #505050',
186
463
  borderRadius: '40px',
187
- overflow: 'hidden'
464
+ overflow: 'visible'
188
465
  };
189
466
  const header = {
190
467
  display: 'flex',
@@ -205,16 +482,16 @@ const CPIModal = _ref => {
205
482
  display: 'flex',
206
483
  justifyContent: 'center',
207
484
  alignItems: 'center',
208
- height: '55px',
485
+ height: '50px',
209
486
  color: '#7D267E',
210
487
  fontFamily: 'Nunito',
211
488
  fontSize: '16px',
212
489
  fontWeight: '400',
213
- padding: '35px 25px 40px 30px',
490
+ padding: '0 25px',
214
491
  borderTop: '1px solid #505050',
215
- textAlign: 'center' // Add this to center the text
492
+ textAlign: 'center',
493
+ lineHeight: '30px'
216
494
  };
217
-
218
495
  const link = {
219
496
  color: '#7D267E',
220
497
  fontFamily: 'Nunito',
@@ -245,39 +522,25 @@ const CPIModal = _ref => {
245
522
  height: '51px',
246
523
  paddingLeft: '16px'
247
524
  };
248
- const participantId = row.participant_id;
249
- const displayColumns = [{
250
- dataField: 'associated_id',
251
- header: 'Participant ID',
252
- // tooltipText: 'sort',
253
- sortable: false
254
- }, {
255
- dataField: 'repository_of_synonym_id',
256
- header: 'Name',
257
- // tooltipText: 'sort',
258
- sortable: false
259
- }, {
260
- dataField: 'domain_description',
261
- header: 'Description',
262
- // tooltipText: 'sort',
263
- sortable: false
264
- }, {
265
- dataField: 'domain_category',
266
- header: 'Category',
267
- // tooltipText: 'sort',
268
- sortable: false
269
- }, {
270
- dataField: 'data_location',
271
- header: 'Location',
272
- // tooltipText: 'sort',
273
- sortable: false
274
- }];
525
+ const tableContainer = {
526
+ '&::-webkit-scrollbar': {
527
+ width: '6px',
528
+ borderWidth: '0px 1px 1px 1px',
529
+ borderStyle: 'solid',
530
+ borderColor: '#B0B0B0'
531
+ },
532
+ '&::-webkit-scrollbar-track': {
533
+ backgroundColor: '#CECECE'
534
+ },
535
+ '&::-webkit-scrollbar-thumb': {
536
+ backgroundColor: '#003F74'
537
+ }
538
+ };
275
539
  return /*#__PURE__*/_react.default.createElement(_core.Modal, {
276
540
  open: open,
277
541
  onClose: onClose,
278
542
  "aria-labelledby": "".concat(row.id, "-modal")
279
543
  }, /*#__PURE__*/_react.default.createElement(_core.Box, {
280
- className: classes.modalBody,
281
544
  style: modalBody
282
545
  }, /*#__PURE__*/_react.default.createElement("div", {
283
546
  className: "header",
@@ -286,7 +549,7 @@ const CPIModal = _ref => {
286
549
  id: "modal-modal-title",
287
550
  className: "modalTitle",
288
551
  style: modalTitle
289
- }, "Participant ID ".concat(participantId, " : CPI Mappings")), /*#__PURE__*/_react.default.createElement(_core.IconButton, {
552
+ }, "Alternative Identifiers for Participant ".concat(participantId, " in ").concat(studyId)), /*#__PURE__*/_react.default.createElement(_core.IconButton, {
290
553
  "aria-label": "close",
291
554
  onClick: onClose,
292
555
  className: "closeButton",
@@ -297,8 +560,7 @@ const CPIModal = _ref => {
297
560
  className: "container",
298
561
  style: countContainer
299
562
  }, "".concat(data.length, " mapped identifiers")), /*#__PURE__*/_react.default.createElement(CustomTableContainer, {
300
- className: classes.tableContainer,
301
- themeConfig: themeConfig
563
+ style: tableContainer
302
564
  }, /*#__PURE__*/_react.default.createElement(_core.Table, null, /*#__PURE__*/_react.default.createElement(_core.TableHead, null, /*#__PURE__*/_react.default.createElement(_core.TableRow, null, /*#__PURE__*/_react.default.createElement(_core.TableCell, {
303
565
  padding: "checkbox"
304
566
  }, /*#__PURE__*/_react.default.createElement("span", {
@@ -341,25 +603,109 @@ const CPIModal = _ref => {
341
603
  rel: "noopener noreferrer"
342
604
  }, currRow[column.dataField])))))))), /*#__PURE__*/_react.default.createElement("div", {
343
605
  style: buttonContainer
606
+ }, /*#__PURE__*/_react.default.createElement("div", {
607
+ style: {
608
+ display: 'flex',
609
+ alignItems: 'center',
610
+ position: 'relative'
611
+ }
612
+ }, /*#__PURE__*/_react.default.createElement(_core.Button, {
613
+ style: downloadAltIdsButton,
614
+ onClick: handleDownloadCSV,
615
+ disableRipple: true
616
+ }, /*#__PURE__*/_react.default.createElement("div", {
617
+ style: {
618
+ textAlign: 'center',
619
+ lineHeight: '1.2'
620
+ }
621
+ }, /*#__PURE__*/_react.default.createElement("div", null, "DOWNLOAD"), /*#__PURE__*/_react.default.createElement("div", null, "ALTERNATIVE IDS"))), /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
622
+ title: /*#__PURE__*/_react.default.createElement("div", {
623
+ className: classes.tooltipContent
624
+ }, /*#__PURE__*/_react.default.createElement("div", {
625
+ style: {
626
+ marginBottom: '8px'
627
+ }
628
+ }, "Clicking on DOWNLOAD ALTERNATIVE IDS will download the available alternative identifiers for this Participant."), /*#__PURE__*/_react.default.createElement("div", {
629
+ style: {
630
+ marginBottom: '8px'
631
+ }
632
+ }, "CPI mappings are also available for each study as part of the downloadable study manifest. Follow these steps to download all alternative identifiers for a study:"), /*#__PURE__*/_react.default.createElement("div", {
633
+ style: {
634
+ paddingLeft: '16px'
635
+ }
636
+ }, /*#__PURE__*/_react.default.createElement("div", {
637
+ style: {
638
+ marginBottom: '4px'
639
+ }
640
+ }, "1. Go to the Explore Dashboard"), /*#__PURE__*/_react.default.createElement("div", {
641
+ style: {
642
+ marginBottom: '4px'
643
+ }
644
+ }, "2. Go to the Studies Tab of the Table"), /*#__PURE__*/_react.default.createElement("div", {
645
+ style: {
646
+ marginBottom: '4px'
647
+ }
648
+ }, "3. Click on the icon", ' ', /*#__PURE__*/_react.default.createElement("img", {
649
+ src: _download.default,
650
+ alt: "Download",
651
+ style: {
652
+ width: '12px',
653
+ height: '8px',
654
+ margin: '0 4px',
655
+ verticalAlign: 'middle'
656
+ }
657
+ }), ' ', "in the Manifest column to download the Manifest."), /*#__PURE__*/_react.default.createElement("div", null, "4. Open the downloaded Manifest and go to the \"alternative identifiers\" tab"))),
658
+ placement: "top",
659
+ arrow: true,
660
+ classes: {
661
+ tooltip: classes.customTooltip
662
+ }
663
+ }, /*#__PURE__*/_react.default.createElement("img", {
664
+ src: _Question_Icon.default,
665
+ alt: "Help",
666
+ className: classes.questionIcon
667
+ }))), /*#__PURE__*/_react.default.createElement(_core.Button, {
668
+ style: viewInExploreButton,
669
+ onClick: () => {
670
+ window.location.href = "/explore?p_id=".concat(participantId, "&dbgap_accession=").concat(studyId);
671
+ },
672
+ disableRipple: true
673
+ }, "VIEW IN EXPLORE"), /*#__PURE__*/_react.default.createElement("div", {
674
+ className: classes.dropdownContainer,
675
+ ref: dropdownRef
676
+ }, /*#__PURE__*/_react.default.createElement(_core.Button, {
677
+ variant: "outlined",
678
+ className: "".concat(classes.button, " ").concat(dropdownOpen ? classes.buttonOpen : ''),
679
+ onClick: handleDropdownToggle,
680
+ disableRipple: true
681
+ }, /*#__PURE__*/_react.default.createElement("span", null, "ADD TO OR GO TO CART"), dropdownOpen ? /*#__PURE__*/_react.default.createElement(_ExpandLess.default, null) : /*#__PURE__*/_react.default.createElement(_ExpandMore.default, null)), dropdownOpen && /*#__PURE__*/_react.default.createElement("div", {
682
+ className: classes.dropdown
683
+ }, /*#__PURE__*/_react.default.createElement("div", {
684
+ className: classes.dropdownList
685
+ }, /*#__PURE__*/_react.default.createElement("div", {
686
+ className: classes.dropdownItem
344
687
  }, /*#__PURE__*/_react.default.createElement(_ReduxAddFile.default, _extends({}, wrapperConfig.items[0], {
345
688
  buttonStyle: addAllFilesButton,
346
689
  rowID: row.id
347
- })), /*#__PURE__*/_react.default.createElement(_ReduxAddFile.default, _extends({}, wrapperConfig.items[1], {
690
+ }))), /*#__PURE__*/_react.default.createElement("div", {
691
+ className: classes.dropdownItem
692
+ }, /*#__PURE__*/_react.default.createElement(_ReduxAddFile.default, _extends({}, wrapperConfig.items[1], {
348
693
  buttonStyle: addSelectedFilesButton,
349
- rowID: row.id
350
- })), /*#__PURE__*/_react.default.createElement(_core.Button, {
351
- style: goToCartButton,
352
- onClick: () => navigation('/fileCentricCart')
353
- }, "GO TO CART", /*#__PURE__*/_react.default.createElement("img", {
354
- src: _Cart_Icon.default,
355
- alt: "cart",
356
- style: {
357
- paddingLeft: '30px'
358
- }
694
+ rowID: row.id,
695
+ disabled: selectedIds.length === 0
359
696
  }))), /*#__PURE__*/_react.default.createElement("div", {
697
+ className: classes.dropdownItem
698
+ }, /*#__PURE__*/_react.default.createElement(_core.Button, {
699
+ style: goToCartButton,
700
+ onClick: () => {
701
+ window.location.href = '/#/fileCentricCart';
702
+ setDropdownOpen(false);
703
+ },
704
+ disableRipple: true
705
+ }, "GO TO CART")))))), /*#__PURE__*/_react.default.createElement("div", {
360
706
  className: "footer",
361
707
  style: footer
362
- }, /*#__PURE__*/_react.default.createElement("span", null, "Public participant ID mappings for a given study can be found in the \"synonyms\" tab of the downloadable manifest, available under the \"Studies\" tab in the Explore Dashboard. For more information about CPI, click", ' ', /*#__PURE__*/_react.default.createElement("a", {
708
+ }, /*#__PURE__*/_react.default.createElement("span", null, "For more information about CPI, click", ' ', /*#__PURE__*/_react.default.createElement("a", {
363
709
  style: link,
364
710
  href: "https://participantindex-docs.ccdi.cancer.gov/",
365
711
  target: "_blank",