@bento-core/table 1.0.1-ccdihub.120 → 1.0.1-ccdihub.121

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.
@@ -38,7 +38,7 @@ const CustomTableBody = _ref => {
38
38
  });
39
39
  return /*#__PURE__*/_react.default.createElement(_core.ThemeProvider, {
40
40
  theme: themeConfig
41
- }, /*#__PURE__*/_react.default.createElement(_core.TableBody, null, rows.map(row => /*#__PURE__*/_react.default.createElement(_core.TableRow, null, displayColunms.map(column => {
41
+ }, /*#__PURE__*/_react.default.createElement(_core.TableBody, null, rows.map((row, rowIndex) => /*#__PURE__*/_react.default.createElement(_core.TableRow, null, displayColunms.map(column => {
42
42
  const {
43
43
  cellType
44
44
  } = column;
@@ -53,6 +53,7 @@ const CustomTableBody = _ref => {
53
53
  return /*#__PURE__*/_react.default.createElement(_DisplayBodyCell.default, {
54
54
  column: column,
55
55
  row: row,
56
+ rowIndex: rowIndex,
56
57
  themeConfig: themeConfig,
57
58
  navigation: navigation
58
59
  });
@@ -10,6 +10,7 @@ var _Types = require("../util/Types");
10
10
  var _CustomLinkView = _interopRequireDefault(require("./components/CustomLinkView"));
11
11
  var _DataFormatView = _interopRequireDefault(require("./components/DataFormatView"));
12
12
  var _CPIView = _interopRequireDefault(require("./components/CPIView"));
13
+ var _CPIMappingView = _interopRequireDefault(require("./components/CPIMappingView"));
13
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
15
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
16
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -41,6 +42,7 @@ const ViewCell = _ref2 => {
41
42
  let {
42
43
  column,
43
44
  row,
45
+ rowIndex,
44
46
  themeConfig,
45
47
  navigation
46
48
  } = _ref2;
@@ -70,6 +72,14 @@ const ViewCell = _ref2 => {
70
72
  themeConfig: themeConfig,
71
73
  navigation: navigation
72
74
  });
75
+ case _Types.cellTypes.CPI_MAPPING:
76
+ return /*#__PURE__*/_react.default.createElement(_CPIMappingView.default, {
77
+ row: row,
78
+ column: column,
79
+ rowIndex: rowIndex,
80
+ themeConfig: themeConfig,
81
+ navigation: navigation
82
+ });
73
83
  default:
74
84
  return /*#__PURE__*/_react.default.createElement(_core.Typography, null, row[column.dataField]);
75
85
  }
@@ -78,6 +88,7 @@ const DisplayCell = _ref3 => {
78
88
  let {
79
89
  row,
80
90
  column,
91
+ rowIndex,
81
92
  themeConfig,
82
93
  navigation
83
94
  } = _ref3;
@@ -86,6 +97,7 @@ const DisplayCell = _ref3 => {
86
97
  }, /*#__PURE__*/_react.default.createElement(ViewCell, {
87
98
  row: row,
88
99
  column: column,
100
+ rowIndex: rowIndex,
89
101
  themeConfig: themeConfig,
90
102
  navigation: navigation
91
103
  }));
@@ -0,0 +1,221 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _core = require("@material-ui/core");
9
+ var _Types = require("../../util/Types");
10
+ var _CPI_Icon_Single = _interopRequireDefault(require("./assets/CPI_Icon_Single.svg"));
11
+ var _CPI_Icon_Multi = _interopRequireDefault(require("./assets/CPI_Icon_Multi.svg"));
12
+ var _CPI_Icon_Study = _interopRequireDefault(require("./assets/CPI_Icon_Study.svg"));
13
+ var _CPI_Icon_Dataset = _interopRequireDefault(require("./assets/CPI_Icon_Dataset.svg"));
14
+ var _CPIModal = _interopRequireDefault(require("./CPIModal"));
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ 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); }
17
+ 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; }
18
+ /**
19
+ * CPI Mapping component - displays different icons based on domain_category
20
+ */
21
+
22
+ const CPIMappingView = _ref => {
23
+ let {
24
+ row,
25
+ themeConfig,
26
+ navigation,
27
+ rowIndex
28
+ } = _ref;
29
+ const useStyles = (0, _core.makeStyles)(() => ({
30
+ arrow: {
31
+ '&:before': {
32
+ border: '1px solid black'
33
+ },
34
+ color: 'white'
35
+ },
36
+ tooltip: {
37
+ backgroundColor: 'white',
38
+ border: '1px solid black',
39
+ color: 'black',
40
+ fontFamily: 'Poppins',
41
+ fontWeight: 400,
42
+ fontStyle: 'Regular',
43
+ fontSize: '13px',
44
+ lineHeight: '17.5px',
45
+ letterSpacing: '-0.01em',
46
+ padding: '10px'
47
+ }
48
+ }));
49
+ const classes = useStyles();
50
+ const [modalOpen, setModalOpen] = (0, _react.useState)(false);
51
+ const cpiData = row.cpi_data ? row.cpi_data : [];
52
+
53
+ // Filter ALL CPI data by data_type for tooltip logic
54
+ const internalData = cpiData.filter(e => e.data_type === 'internal');
55
+ const externalData = cpiData.filter(e => e.data_type === 'external');
56
+
57
+ // Group CPI data by domain_category
58
+ const organizationalData = cpiData.filter(e => e.domain_category === 'organizational_identifier');
59
+ const datasetData = cpiData.filter(e => e.domain_category === 'dataset');
60
+ const studyData = cpiData.filter(e => e.domain_category === 'study');
61
+ const handleModalOpen = () => {
62
+ setModalOpen(true);
63
+ };
64
+ const handleModalClose = () => {
65
+ setModalOpen(false);
66
+ };
67
+ const button = {
68
+ color: '#07679C',
69
+ textDecoration: 'underline',
70
+ fontWeight: 700,
71
+ cursor: 'pointer',
72
+ padding: 0,
73
+ marginLeft: '3px'
74
+ };
75
+ const italicText = {
76
+ fontFamily: 'Poppins',
77
+ fontWeight: 400,
78
+ fontStyle: 'italic',
79
+ fontSize: '13px',
80
+ lineHeight: '19px',
81
+ letterSpacing: '-0.01em'
82
+ };
83
+ const iconContainer = {
84
+ display: 'flex',
85
+ alignItems: 'center',
86
+ justifyContent: 'flex-start',
87
+ gap: '24px',
88
+ width: '150px'
89
+ };
90
+ const icon = {
91
+ position: 'relative',
92
+ cursor: 'pointer',
93
+ display: 'inline-block'
94
+ };
95
+ const badgeContainer = {
96
+ position: 'relative',
97
+ display: 'inline-block'
98
+ };
99
+
100
+ // Determine row background color based on index (even rows are gray)
101
+ const isEvenRow = rowIndex !== undefined && rowIndex % 2 === 1;
102
+ const rowBackgroundColor = isEvenRow ? '#f4f5f5' : 'white';
103
+ const getBadgeStyle = (count, iconType) => {
104
+ let rightOffset = '-8px';
105
+ let bottomOffset = '0.5px';
106
+ let boxShadow = 'none';
107
+ if (iconType === 'organizational' && count === 1) {
108
+ rightOffset = '-6px';
109
+ bottomOffset = '0.5px';
110
+ } else if (iconType === 'organizational') {
111
+ // Multi organizational icon - no box shadow needed
112
+ rightOffset = '-8px';
113
+ boxShadow = 'none';
114
+ } else {
115
+ // Dataset and Study icons need gap
116
+ boxShadow = "0 0 0 2px ".concat(rowBackgroundColor);
117
+ }
118
+ return {
119
+ position: 'absolute',
120
+ right: rightOffset,
121
+ bottom: bottomOffset,
122
+ backgroundColor: 'white',
123
+ border: '1.5px solid #07679C',
124
+ borderRadius: '4px',
125
+ minWidth: '12px',
126
+ height: '12px',
127
+ display: 'flex',
128
+ alignItems: 'center',
129
+ justifyContent: 'center',
130
+ padding: '2px 3px',
131
+ fontSize: '8px',
132
+ fontWeight: 700,
133
+ fontStyle: 'normal',
134
+ lineHeight: '16px',
135
+ letterSpacing: '-0.02em',
136
+ color: '#07679C',
137
+ fontFamily: 'Open Sans',
138
+ boxShadow
139
+ };
140
+ };
141
+ const renderIcon = (iconSrc, count, iconType) => {
142
+ if (count === 0) return null;
143
+ let tooltipContent;
144
+
145
+ // Same tooltip logic for all icon types
146
+ if (externalData.length === 1 && internalData.length === 0) {
147
+ tooltipContent = /*#__PURE__*/_react.default.createElement("div", null, "dbGaP identifier mapped in the CCDI Participant Index (CPI) is available", /*#__PURE__*/_react.default.createElement("span", {
148
+ role: "button",
149
+ onClick: handleModalOpen,
150
+ tabIndex: 0,
151
+ style: button
152
+ }, "here."));
153
+ } else if (externalData.length > 1 && internalData.length === 0) {
154
+ tooltipContent = /*#__PURE__*/_react.default.createElement("div", null, "Multiple alternative identifiers mapped in the CCDI Participant Index (CPI) are available", /*#__PURE__*/_react.default.createElement("span", {
155
+ role: "button",
156
+ onClick: handleModalOpen,
157
+ tabIndex: 0,
158
+ style: button
159
+ }, "here."));
160
+ } else {
161
+ // Has internal identifiers
162
+ tooltipContent = /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
163
+ style: {
164
+ marginBottom: '6px'
165
+ }
166
+ }, "This participant has more than one identifier in CCDI Hub studies:"), internalData.map(e => /*#__PURE__*/_react.default.createElement("div", {
167
+ key: e.associated_id,
168
+ style: italicText
169
+ }, "".concat(e.associated_id, ", ").concat(e.repository_of_synonym_id))), /*#__PURE__*/_react.default.createElement("div", {
170
+ style: {
171
+ marginTop: '6px'
172
+ }
173
+ }, "Additional alternative identifiers mapped in the CCDI Participant Index (CPI) for this participant are available", /*#__PURE__*/_react.default.createElement("span", {
174
+ role: "button",
175
+ onClick: handleModalOpen,
176
+ tabIndex: 0,
177
+ style: button
178
+ }, "here.")));
179
+ }
180
+ return /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
181
+ key: "".concat(iconType, "-tooltip"),
182
+ interactive: true,
183
+ placement: "top",
184
+ classes: {
185
+ arrow: classes.arrow,
186
+ tooltip: classes.tooltip
187
+ },
188
+ arrow: true,
189
+ title: tooltipContent
190
+ }, /*#__PURE__*/_react.default.createElement("span", {
191
+ style: icon
192
+ }, /*#__PURE__*/_react.default.createElement("span", {
193
+ style: badgeContainer
194
+ }, /*#__PURE__*/_react.default.createElement("img", {
195
+ src: iconSrc,
196
+ height: 21,
197
+ width: 23,
198
+ alt: "cpi-".concat(iconType, "-icon")
199
+ }), /*#__PURE__*/_react.default.createElement("span", {
200
+ style: getBadgeStyle(count, iconType)
201
+ }, count))));
202
+ };
203
+ const getOrganizationalIcon = count => count === 1 ? _CPI_Icon_Single.default : _CPI_Icon_Multi.default;
204
+ if (!cpiData.length) {
205
+ return /*#__PURE__*/_react.default.createElement(_core.Typography, null);
206
+ }
207
+ return /*#__PURE__*/_react.default.createElement(_core.Typography, {
208
+ className: _Types.cellTypes.CPI_MAPPING
209
+ }, /*#__PURE__*/_react.default.createElement(_CPIModal.default, {
210
+ key: "".concat(row.id, "-").concat(row.participant_id),
211
+ row: row,
212
+ open: modalOpen,
213
+ onClose: handleModalClose,
214
+ themeConfig: themeConfig,
215
+ navigation: navigation
216
+ }), /*#__PURE__*/_react.default.createElement("div", {
217
+ style: iconContainer
218
+ }, organizationalData.length > 0 && renderIcon(getOrganizationalIcon(organizationalData.length), organizationalData.length, 'organizational'), datasetData.length > 0 && renderIcon(_CPI_Icon_Dataset.default, datasetData.length, 'dataset'), studyData.length > 0 && renderIcon(_CPI_Icon_Study.default, studyData.length, 'study')));
219
+ };
220
+ var _default = CPIMappingView;
221
+ exports.default = _default;
@@ -0,0 +1,6 @@
1
+ <svg width="18" height="23" viewBox="0 0 18 23" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M17.5136 1.7276C17.9317 2.03935 18 2.2645 18 2.36841C18 2.47666 17.9275 2.69748 17.5136 3.00922C17.1083 3.31231 16.4769 3.61107 15.6407 3.87519C13.9725 4.3991 11.626 4.73682 9.00213 4.73682C6.37829 4.73682 4.03176 4.40343 2.36359 3.87519C1.52738 3.61107 0.895947 3.31231 0.490637 3.00922C0.0725288 2.69748 0.00426674 2.47233 0.00426674 2.36841C0.00426674 2.2645 0.0725288 2.04367 0.490637 1.7276C0.895947 1.42451 1.52738 1.12575 2.36359 0.861634C4.03176 0.337726 6.37829 0 9.00213 0C11.626 0 13.9682 0.333396 15.6364 0.861634C16.4726 1.12575 17.1041 1.42451 17.5094 1.7276H17.5136Z" fill="#07679C"/>
3
+ <path d="M1.96682 5.16535C3.79711 5.74121 6.28443 6.0876 8.99787 6.0876C11.7113 6.0876 14.1986 5.74121 16.0289 5.16535C16.7926 4.92721 17.4624 4.64144 18 4.30371V8.11828C18 8.22653 17.9275 8.44735 17.5136 8.75909C17.1083 9.06218 16.4769 9.36094 15.6407 9.62506C13.9725 10.149 11.626 10.4867 9.00213 10.4867C6.37829 10.4867 4.03603 10.1533 2.36359 9.62506C1.52738 9.36094 0.895947 9.06218 0.490637 8.75909C0.0725288 8.44735 0.00426674 8.2222 0.00426674 8.11828V4.30371C0.537569 4.64144 1.21166 4.92721 1.97108 5.16535H1.96682ZM3.8867 9.1661C4.54373 9.1661 5.07703 8.62487 5.07703 7.95808C5.07703 7.29129 4.54373 6.75006 3.8867 6.75006C3.22968 6.75006 2.69637 7.29129 2.69637 7.95808C2.69637 8.62487 3.22968 9.1661 3.8867 9.1661Z" fill="#07679C"/>
4
+ <path d="M1.96718 10.9153C3.79747 11.4912 6.28479 11.8376 8.99823 11.8376C11.7117 11.8376 14.2033 11.4912 16.0293 10.9153C16.7887 10.6772 17.4628 10.3914 17.9961 10.0537V14.206C17.9961 14.3099 17.9278 14.5307 17.5097 14.8468C17.1044 15.1499 16.473 15.4487 15.6368 15.7128C13.9686 16.2367 11.6221 16.5744 8.99823 16.5744C6.37438 16.5744 4.02785 16.241 2.35969 15.7128C1.52347 15.4487 0.89204 15.1499 0.486731 14.8468C0.0686226 14.5351 0.000360489 14.3099 0.000360489 14.206V10.0537C0.533663 10.3914 1.20775 10.6772 1.96718 10.9153ZM3.88706 15.1109C4.54409 15.1109 5.07739 14.5697 5.07739 13.9029C5.07739 13.2361 4.54409 12.6949 3.88706 12.6949C3.23003 12.6949 2.69673 13.2361 2.69673 13.9029C2.69673 14.5697 3.23003 15.1109 3.88706 15.1109Z" fill="#07679C"/>
5
+ <path d="M1.96718 17.0076C3.79747 17.5835 6.28479 17.9299 8.99823 17.9299C11.7117 17.9299 14.199 17.5835 16.0293 17.0076C16.7887 16.7695 17.4628 16.4837 17.9961 16.146V20.636C17.9961 20.7399 17.9278 20.9608 17.5097 21.2768C17.1044 21.5799 16.473 21.8787 15.6368 22.1428C13.9686 22.6667 11.6221 23.0044 8.99823 23.0044C6.37438 23.0044 4.03212 22.671 2.35969 22.1428C1.52347 21.8787 0.89204 21.5799 0.486731 21.2768C0.0686226 20.9651 0.000360489 20.7399 0.000360489 20.636V16.146C0.533663 16.4837 1.20775 16.7695 1.96718 17.0076ZM3.88706 21.056C4.54409 21.056 5.07739 20.5148 5.07739 19.848C5.07739 19.1812 4.54409 18.64 3.88706 18.64C3.23003 18.64 2.69673 19.1812 2.69673 19.848C2.69673 20.5148 3.23003 21.056 3.88706 21.056Z" fill="#07679C"/>
6
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg width="34" height="24" viewBox="0 0 34 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6.19604 5.80258L13.3023 7.24812H13.4423C13.7924 7.24812 14.0724 6.99515 14.1424 6.63376C14.2125 6.23624 13.9674 5.83872 13.5823 5.76644L6.47609 4.3209C6.09102 4.24862 5.70596 4.50159 5.63594 4.89912C5.56593 5.33278 5.81098 5.7303 6.19604 5.80258Z" fill="#07679C"/>
3
+ <path d="M6.19604 9.48861L13.3023 10.9342H13.4423C13.7924 10.9342 14.0724 10.6812 14.1424 10.3198C14.2125 9.92228 13.9674 9.52475 13.5823 9.45247L6.47609 8.00694C6.09102 7.93466 5.70596 8.18763 5.63594 8.58515C5.56593 8.98267 5.81098 9.3802 6.19604 9.48861Z" fill="#07679C"/>
4
+ <path d="M6.19604 13.1385L13.3023 14.5841H13.4423C13.7924 14.5841 14.0724 14.3311 14.1424 13.9697C14.2125 13.5722 13.9674 13.1747 13.5823 13.1024L6.47609 11.6568C6.09102 11.5846 5.70596 11.8375 5.63594 12.2351C5.56593 12.6687 5.81098 13.0662 6.19604 13.1385Z" fill="#07679C"/>
5
+ <path d="M6.19604 16.8246L13.3023 18.2701H13.4423C13.7924 18.2701 14.0724 18.0171 14.1424 17.6557C14.2125 17.2582 13.9674 16.8607 13.5823 16.7884L6.47609 15.3429C6.09102 15.2706 5.70596 15.5236 5.63594 15.9211C5.56593 16.3548 5.81098 16.7523 6.19604 16.8246Z" fill="#07679C"/>
6
+ <path d="M19.8132 7.24803H19.9532L27.0595 5.80249C27.4445 5.73022 27.7246 5.33269 27.6196 4.93517C27.5496 4.53765 27.1645 4.24854 26.7794 4.35695L19.6732 5.80249C19.2881 5.87477 19.0081 6.27229 19.1131 6.66982C19.1831 6.99506 19.4631 7.24803 19.8132 7.24803Z" fill="#07679C"/>
7
+ <path d="M19.8132 14.5845H19.9532L27.0595 13.1389C27.4445 13.0666 27.7246 12.6691 27.6196 12.2716C27.5496 11.8741 27.1645 11.585 26.7794 11.6934L19.6732 13.1389C19.2881 13.2112 19.0081 13.6087 19.1131 14.0062C19.1831 14.3676 19.4631 14.5845 19.8132 14.5845Z" fill="#07679C"/>
8
+ <path d="M19.8132 10.9341H19.9532L27.0595 9.48853C27.4445 9.41625 27.7246 9.01873 27.6196 8.62121C27.5496 8.22368 27.1645 7.93457 26.7794 8.04299L19.6732 9.48853C19.2881 9.56081 19.0081 9.95833 19.1131 10.3559C19.1831 10.6811 19.4631 10.9341 19.8132 10.9341Z" fill="#07679C"/>
9
+ <path d="M26.7794 15.3433L19.6732 16.7888C19.2881 16.8611 19.0081 17.2586 19.1131 17.6562C19.1831 18.0176 19.4981 18.2705 19.8132 18.2705H19.9532L27.0595 16.825C27.4445 16.7527 27.7246 16.3552 27.6196 15.9577C27.5496 15.524 27.1645 15.271 26.7794 15.3433Z" fill="#07679C"/>
10
+ <path d="M30.8404 2.98385V2.73088C30.8404 1.89969 30.4904 1.10464 29.8603 0.562567C29.2302 0.0204891 28.425 -0.196342 27.6199 -0.0156494L16.873 2.15266C16.6979 2.1888 16.5579 2.1888 16.3829 2.15266L5.63599 -0.0156494C4.83085 -0.196342 4.02571 0.0204891 3.3956 0.562567C2.76549 1.10464 2.41543 1.86355 2.41543 2.73088V2.98385C1.08519 3.1284 0 4.28483 0 5.73037V20.2942C0 21.8481 1.22522 23.0768 2.69548 23.0768H30.5254C32.0306 23.0768 33.2209 21.812 33.2209 20.2942V5.73037C33.2559 4.28483 32.1707 3.1284 30.8404 2.98385ZM27.8999 1.46603C28.285 1.39375 28.635 1.50217 28.9501 1.719C29.2302 1.97197 29.4052 2.33335 29.4052 2.73088V17.9452C29.4052 18.5595 28.9851 19.1016 28.39 19.21L17.3631 21.4506V3.5982L27.8999 1.46603ZM3.88569 2.73088C3.88569 2.33335 4.06072 1.97197 4.34076 1.719C4.5508 1.53831 4.83085 1.42989 5.14591 1.42989C5.21592 1.42989 5.32094 1.42989 5.39095 1.46603L15.9278 3.5982V21.4506L4.90086 19.21C4.30576 19.1016 3.88569 18.5595 3.88569 17.9452V2.73088Z" fill="#07679C"/>
11
+ </svg>
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.notIncludedCellStyle = exports.headerTypes = exports.dataFormatTypes = exports.cellTypes = exports.cellStyles = exports.actionCellTypes = exports.TRANSFORM = exports.STUDY_DOWNLOAD = exports.MODAL = exports.LINK = exports.FORMAT_DATA_CELLS = exports.FORMAT_DATA = exports.FORMAT_BYTES = exports.EXPAND = exports.DISPLAY = exports.DELETE = exports.DEFAULT = exports.DBGAP = exports.ComponentTypes = exports.CUSTOM_ELEM = exports.CPI = exports.CHECKBOX = void 0;
6
+ exports.notIncludedCellStyle = exports.headerTypes = exports.dataFormatTypes = exports.cellTypes = exports.cellStyles = exports.actionCellTypes = exports.TRANSFORM = exports.STUDY_DOWNLOAD = exports.MODAL = exports.LINK = exports.FORMAT_DATA_CELLS = exports.FORMAT_DATA = exports.FORMAT_BYTES = exports.EXPAND = exports.EXCLUDE_FROM_DOWNLOAD = exports.DISPLAY = exports.DELETE = exports.DEFAULT = exports.DBGAP = exports.ComponentTypes = exports.CUSTOM_ELEM = exports.CPI_MAPPING = exports.CPI = exports.CHECKBOX = void 0;
7
7
  const CHECKBOX = 'CHECKBOX';
8
8
  exports.CHECKBOX = CHECKBOX;
9
9
  const DELETE = 'DELETE';
@@ -20,6 +20,8 @@ const FORMAT_DATA = 'FORMAT_DATA';
20
20
  exports.FORMAT_DATA = FORMAT_DATA;
21
21
  const CPI = 'CPI';
22
22
  exports.CPI = CPI;
23
+ const CPI_MAPPING = 'CPI_MAPPING';
24
+ exports.CPI_MAPPING = CPI_MAPPING;
23
25
  const FORMAT_BYTES = 'FORMAT_BYTES';
24
26
  exports.FORMAT_BYTES = FORMAT_BYTES;
25
27
  const TRANSFORM = 'TRANSFORM';
@@ -32,6 +34,8 @@ const DBGAP = 'DBGAP';
32
34
  exports.DBGAP = DBGAP;
33
35
  const MODAL = 'MODAL';
34
36
  exports.MODAL = MODAL;
37
+ const EXCLUDE_FROM_DOWNLOAD = 'EXCLUDE_FROM_DOWNLOAD';
38
+ exports.EXCLUDE_FROM_DOWNLOAD = EXCLUDE_FROM_DOWNLOAD;
35
39
  const cellTypes = {
36
40
  CUSTOM_ELEM,
37
41
  LINK,
@@ -40,7 +44,8 @@ const cellTypes = {
40
44
  DELETE,
41
45
  DEFAULT,
42
46
  FORMAT_DATA,
43
- CPI
47
+ CPI,
48
+ CPI_MAPPING
44
49
  };
45
50
  exports.cellTypes = cellTypes;
46
51
  const cellStyles = {
@@ -48,12 +53,13 @@ const cellStyles = {
48
53
  EXPAND,
49
54
  DBGAP,
50
55
  STUDY_DOWNLOAD,
51
- MODAL
56
+ MODAL,
57
+ EXCLUDE_FROM_DOWNLOAD
52
58
  };
53
59
  exports.cellStyles = cellStyles;
54
60
  const actionCellTypes = [CHECKBOX, DELETE];
55
61
  exports.actionCellTypes = actionCellTypes;
56
- const notIncludedCellStyle = [STUDY_DOWNLOAD];
62
+ const notIncludedCellStyle = [STUDY_DOWNLOAD, EXCLUDE_FROM_DOWNLOAD];
57
63
  exports.notIncludedCellStyle = notIncludedCellStyle;
58
64
  const FORMAT_DATA_CELLS = [FORMAT_BYTES];
59
65
  exports.FORMAT_DATA_CELLS = FORMAT_DATA_CELLS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-ccdihub.120",
3
+ "version": "1.0.1-ccdihub.121",
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",
@@ -32,7 +32,7 @@ const CustomTableBody = ({
32
32
  <ThemeProvider theme={themeConfig}>
33
33
  <TableBody>
34
34
  {rows
35
- .map((row) => (
35
+ .map((row, rowIndex) => (
36
36
  <TableRow>
37
37
  {
38
38
  displayColunms.map((column) => {
@@ -51,6 +51,7 @@ const CustomTableBody = ({
51
51
  <DisplayCell
52
52
  column={column}
53
53
  row={row}
54
+ rowIndex={rowIndex}
54
55
  themeConfig={themeConfig}
55
56
  navigation={navigation}
56
57
  />
@@ -7,6 +7,7 @@ import { cellTypes } from '../util/Types';
7
7
  import CustomLinkView from './components/CustomLinkView';
8
8
  import DataFormatView from './components/DataFormatView';
9
9
  import CPIView from './components/CPIView';
10
+ import CPIMappingView from './components/CPIMappingView';
10
11
 
11
12
  /**
12
13
  * Custom Column reneder
@@ -30,6 +31,7 @@ const CustomComponent = ({
30
31
  const ViewCell = ({
31
32
  column,
32
33
  row,
34
+ rowIndex,
33
35
  themeConfig,
34
36
  navigation,
35
37
  }) => {
@@ -65,6 +67,16 @@ const ViewCell = ({
65
67
  navigation={navigation}
66
68
  />
67
69
  );
70
+ case cellTypes.CPI_MAPPING:
71
+ return (
72
+ <CPIMappingView
73
+ row={row}
74
+ column={column}
75
+ rowIndex={rowIndex}
76
+ themeConfig={themeConfig}
77
+ navigation={navigation}
78
+ />
79
+ );
68
80
  default:
69
81
  return (
70
82
  <Typography>
@@ -77,6 +89,7 @@ const ViewCell = ({
77
89
  const DisplayCell = ({
78
90
  row,
79
91
  column,
92
+ rowIndex,
80
93
  themeConfig,
81
94
  navigation,
82
95
  }) => (
@@ -84,6 +97,7 @@ const DisplayCell = ({
84
97
  <ViewCell
85
98
  row={row}
86
99
  column={column}
100
+ rowIndex={rowIndex}
87
101
  themeConfig={themeConfig}
88
102
  navigation={navigation}
89
103
  />
@@ -0,0 +1,260 @@
1
+ import React, { useState } from 'react';
2
+ import {
3
+ Typography,
4
+ Tooltip,
5
+ makeStyles,
6
+ } from '@material-ui/core';
7
+ import { cellTypes } from '../../util/Types';
8
+ import cpiIconSingle from './assets/CPI_Icon_Single.svg';
9
+ import cpiIconMulti from './assets/CPI_Icon_Multi.svg';
10
+ import cpiIconStudy from './assets/CPI_Icon_Study.svg';
11
+ import cpiIconDataset from './assets/CPI_Icon_Dataset.svg';
12
+ import CPIModal from './CPIModal';
13
+
14
+ /**
15
+ * CPI Mapping component - displays different icons based on domain_category
16
+ */
17
+
18
+ const CPIMappingView = ({
19
+ row,
20
+ themeConfig,
21
+ navigation,
22
+ rowIndex,
23
+ }) => {
24
+ const useStyles = makeStyles(() => ({
25
+ arrow: {
26
+ '&:before': {
27
+ border: '1px solid black',
28
+ },
29
+ color: 'white',
30
+ },
31
+ tooltip: {
32
+ backgroundColor: 'white',
33
+ border: '1px solid black',
34
+ color: 'black',
35
+ fontFamily: 'Poppins',
36
+ fontWeight: 400,
37
+ fontStyle: 'Regular',
38
+ fontSize: '13px',
39
+ lineHeight: '17.5px',
40
+ letterSpacing: '-0.01em',
41
+ padding: '10px',
42
+ },
43
+ }));
44
+
45
+ const classes = useStyles();
46
+
47
+ const [modalOpen, setModalOpen] = useState(false);
48
+ const cpiData = row.cpi_data ? row.cpi_data : [];
49
+
50
+ // Filter ALL CPI data by data_type for tooltip logic
51
+ const internalData = cpiData.filter((e) => e.data_type === 'internal');
52
+ const externalData = cpiData.filter((e) => e.data_type === 'external');
53
+
54
+ // Group CPI data by domain_category
55
+ const organizationalData = cpiData.filter((e) => e.domain_category === 'organizational_identifier');
56
+ const datasetData = cpiData.filter((e) => e.domain_category === 'dataset');
57
+ const studyData = cpiData.filter((e) => e.domain_category === 'study');
58
+
59
+ const handleModalOpen = () => {
60
+ setModalOpen(true);
61
+ };
62
+
63
+ const handleModalClose = () => {
64
+ setModalOpen(false);
65
+ };
66
+
67
+ const button = {
68
+ color: '#07679C',
69
+ textDecoration: 'underline',
70
+ fontWeight: 700,
71
+ cursor: 'pointer',
72
+ padding: 0,
73
+ marginLeft: '3px',
74
+ };
75
+
76
+ const italicText = {
77
+ fontFamily: 'Poppins',
78
+ fontWeight: 400,
79
+ fontStyle: 'italic',
80
+ fontSize: '13px',
81
+ lineHeight: '19px',
82
+ letterSpacing: '-0.01em',
83
+ };
84
+
85
+ const iconContainer = {
86
+ display: 'flex',
87
+ alignItems: 'center',
88
+ justifyContent: 'flex-start',
89
+ gap: '24px',
90
+ width: '150px',
91
+ };
92
+
93
+ const icon = {
94
+ position: 'relative',
95
+ cursor: 'pointer',
96
+ display: 'inline-block',
97
+ };
98
+
99
+ const badgeContainer = {
100
+ position: 'relative',
101
+ display: 'inline-block',
102
+ };
103
+
104
+ // Determine row background color based on index (even rows are gray)
105
+ const isEvenRow = rowIndex !== undefined && rowIndex % 2 === 1;
106
+ const rowBackgroundColor = isEvenRow ? '#f4f5f5' : 'white';
107
+
108
+ const getBadgeStyle = (count, iconType) => {
109
+ let rightOffset = '-8px';
110
+ let bottomOffset = '0.5px';
111
+ let boxShadow = 'none';
112
+
113
+ if (iconType === 'organizational' && count === 1) {
114
+ rightOffset = '-6px';
115
+ bottomOffset = '0.5px';
116
+ } else if (iconType === 'organizational') {
117
+ // Multi organizational icon - no box shadow needed
118
+ rightOffset = '-8px';
119
+ boxShadow = 'none';
120
+ } else {
121
+ // Dataset and Study icons need gap
122
+ boxShadow = `0 0 0 2px ${rowBackgroundColor}`;
123
+ }
124
+
125
+ return {
126
+ position: 'absolute',
127
+ right: rightOffset,
128
+ bottom: bottomOffset,
129
+ backgroundColor: 'white',
130
+ border: '1.5px solid #07679C',
131
+ borderRadius: '4px',
132
+ minWidth: '12px',
133
+ height: '12px',
134
+ display: 'flex',
135
+ alignItems: 'center',
136
+ justifyContent: 'center',
137
+ padding: '2px 3px',
138
+ fontSize: '8px',
139
+ fontWeight: 700,
140
+ fontStyle: 'normal',
141
+ lineHeight: '16px',
142
+ letterSpacing: '-0.02em',
143
+ color: '#07679C',
144
+ fontFamily: 'Open Sans',
145
+ boxShadow,
146
+ };
147
+ };
148
+
149
+ const renderIcon = (iconSrc, count, iconType) => {
150
+ if (count === 0) return null;
151
+
152
+ let tooltipContent;
153
+
154
+ // Same tooltip logic for all icon types
155
+ if (externalData.length === 1 && internalData.length === 0) {
156
+ tooltipContent = (
157
+ <div>
158
+ dbGaP identifier mapped in the CCDI Participant Index (CPI) is available
159
+ <span role="button" onClick={handleModalOpen} tabIndex={0} style={button}>
160
+ here.
161
+ </span>
162
+ </div>
163
+ );
164
+ } else if (externalData.length > 1 && internalData.length === 0) {
165
+ tooltipContent = (
166
+ <div>
167
+ Multiple alternative identifiers mapped in the CCDI Participant Index (CPI) are available
168
+ <span role="button" onClick={handleModalOpen} tabIndex={0} style={button}>
169
+ here.
170
+ </span>
171
+ </div>
172
+ );
173
+ } else {
174
+ // Has internal identifiers
175
+ tooltipContent = (
176
+ <div>
177
+ <div style={{ marginBottom: '6px' }}>
178
+ This participant has more than one identifier in CCDI Hub studies:
179
+ </div>
180
+ {internalData.map((e) => (
181
+ <div key={e.associated_id} style={italicText}>
182
+ {`${e.associated_id}, ${e.repository_of_synonym_id}`}
183
+ </div>
184
+ ))}
185
+ <div style={{ marginTop: '6px' }}>
186
+ Additional alternative identifiers mapped in the
187
+ CCDI Participant Index (CPI) for this participant are available
188
+ <span role="button" onClick={handleModalOpen} tabIndex={0} style={button}>
189
+ here.
190
+ </span>
191
+ </div>
192
+ </div>
193
+ );
194
+ }
195
+
196
+ return (
197
+ <Tooltip
198
+ key={`${iconType}-tooltip`}
199
+ interactive
200
+ placement="top"
201
+ classes={{
202
+ arrow: classes.arrow,
203
+ tooltip: classes.tooltip,
204
+ }}
205
+ arrow
206
+ title={tooltipContent}
207
+ >
208
+ <span style={icon}>
209
+ <span style={badgeContainer}>
210
+ <img
211
+ src={iconSrc}
212
+ height={21}
213
+ width={23}
214
+ alt={`cpi-${iconType}-icon`}
215
+ />
216
+ <span style={getBadgeStyle(count, iconType)}>{count}</span>
217
+ </span>
218
+ </span>
219
+ </Tooltip>
220
+ );
221
+ };
222
+
223
+ const getOrganizationalIcon = (count) => (count === 1 ? cpiIconSingle : cpiIconMulti);
224
+
225
+ if (!cpiData.length) {
226
+ return <Typography />;
227
+ }
228
+
229
+ return (
230
+ <Typography className={cellTypes.CPI_MAPPING}>
231
+ <CPIModal
232
+ key={`${row.id}-${row.participant_id}`}
233
+ row={row}
234
+ open={modalOpen}
235
+ onClose={handleModalClose}
236
+ themeConfig={themeConfig}
237
+ navigation={navigation}
238
+ />
239
+ <div style={iconContainer}>
240
+ {organizationalData.length > 0 && renderIcon(
241
+ getOrganizationalIcon(organizationalData.length),
242
+ organizationalData.length,
243
+ 'organizational',
244
+ )}
245
+ {datasetData.length > 0 && renderIcon(
246
+ cpiIconDataset,
247
+ datasetData.length,
248
+ 'dataset',
249
+ )}
250
+ {studyData.length > 0 && renderIcon(
251
+ cpiIconStudy,
252
+ studyData.length,
253
+ 'study',
254
+ )}
255
+ </div>
256
+ </Typography>
257
+ );
258
+ };
259
+
260
+ export default CPIMappingView;
@@ -0,0 +1,6 @@
1
+ <svg width="18" height="23" viewBox="0 0 18 23" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M17.5136 1.7276C17.9317 2.03935 18 2.2645 18 2.36841C18 2.47666 17.9275 2.69748 17.5136 3.00922C17.1083 3.31231 16.4769 3.61107 15.6407 3.87519C13.9725 4.3991 11.626 4.73682 9.00213 4.73682C6.37829 4.73682 4.03176 4.40343 2.36359 3.87519C1.52738 3.61107 0.895947 3.31231 0.490637 3.00922C0.0725288 2.69748 0.00426674 2.47233 0.00426674 2.36841C0.00426674 2.2645 0.0725288 2.04367 0.490637 1.7276C0.895947 1.42451 1.52738 1.12575 2.36359 0.861634C4.03176 0.337726 6.37829 0 9.00213 0C11.626 0 13.9682 0.333396 15.6364 0.861634C16.4726 1.12575 17.1041 1.42451 17.5094 1.7276H17.5136Z" fill="#07679C"/>
3
+ <path d="M1.96682 5.16535C3.79711 5.74121 6.28443 6.0876 8.99787 6.0876C11.7113 6.0876 14.1986 5.74121 16.0289 5.16535C16.7926 4.92721 17.4624 4.64144 18 4.30371V8.11828C18 8.22653 17.9275 8.44735 17.5136 8.75909C17.1083 9.06218 16.4769 9.36094 15.6407 9.62506C13.9725 10.149 11.626 10.4867 9.00213 10.4867C6.37829 10.4867 4.03603 10.1533 2.36359 9.62506C1.52738 9.36094 0.895947 9.06218 0.490637 8.75909C0.0725288 8.44735 0.00426674 8.2222 0.00426674 8.11828V4.30371C0.537569 4.64144 1.21166 4.92721 1.97108 5.16535H1.96682ZM3.8867 9.1661C4.54373 9.1661 5.07703 8.62487 5.07703 7.95808C5.07703 7.29129 4.54373 6.75006 3.8867 6.75006C3.22968 6.75006 2.69637 7.29129 2.69637 7.95808C2.69637 8.62487 3.22968 9.1661 3.8867 9.1661Z" fill="#07679C"/>
4
+ <path d="M1.96718 10.9153C3.79747 11.4912 6.28479 11.8376 8.99823 11.8376C11.7117 11.8376 14.2033 11.4912 16.0293 10.9153C16.7887 10.6772 17.4628 10.3914 17.9961 10.0537V14.206C17.9961 14.3099 17.9278 14.5307 17.5097 14.8468C17.1044 15.1499 16.473 15.4487 15.6368 15.7128C13.9686 16.2367 11.6221 16.5744 8.99823 16.5744C6.37438 16.5744 4.02785 16.241 2.35969 15.7128C1.52347 15.4487 0.89204 15.1499 0.486731 14.8468C0.0686226 14.5351 0.000360489 14.3099 0.000360489 14.206V10.0537C0.533663 10.3914 1.20775 10.6772 1.96718 10.9153ZM3.88706 15.1109C4.54409 15.1109 5.07739 14.5697 5.07739 13.9029C5.07739 13.2361 4.54409 12.6949 3.88706 12.6949C3.23003 12.6949 2.69673 13.2361 2.69673 13.9029C2.69673 14.5697 3.23003 15.1109 3.88706 15.1109Z" fill="#07679C"/>
5
+ <path d="M1.96718 17.0076C3.79747 17.5835 6.28479 17.9299 8.99823 17.9299C11.7117 17.9299 14.199 17.5835 16.0293 17.0076C16.7887 16.7695 17.4628 16.4837 17.9961 16.146V20.636C17.9961 20.7399 17.9278 20.9608 17.5097 21.2768C17.1044 21.5799 16.473 21.8787 15.6368 22.1428C13.9686 22.6667 11.6221 23.0044 8.99823 23.0044C6.37438 23.0044 4.03212 22.671 2.35969 22.1428C1.52347 21.8787 0.89204 21.5799 0.486731 21.2768C0.0686226 20.9651 0.000360489 20.7399 0.000360489 20.636V16.146C0.533663 16.4837 1.20775 16.7695 1.96718 17.0076ZM3.88706 21.056C4.54409 21.056 5.07739 20.5148 5.07739 19.848C5.07739 19.1812 4.54409 18.64 3.88706 18.64C3.23003 18.64 2.69673 19.1812 2.69673 19.848C2.69673 20.5148 3.23003 21.056 3.88706 21.056Z" fill="#07679C"/>
6
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg width="34" height="24" viewBox="0 0 34 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6.19604 5.80258L13.3023 7.24812H13.4423C13.7924 7.24812 14.0724 6.99515 14.1424 6.63376C14.2125 6.23624 13.9674 5.83872 13.5823 5.76644L6.47609 4.3209C6.09102 4.24862 5.70596 4.50159 5.63594 4.89912C5.56593 5.33278 5.81098 5.7303 6.19604 5.80258Z" fill="#07679C"/>
3
+ <path d="M6.19604 9.48861L13.3023 10.9342H13.4423C13.7924 10.9342 14.0724 10.6812 14.1424 10.3198C14.2125 9.92228 13.9674 9.52475 13.5823 9.45247L6.47609 8.00694C6.09102 7.93466 5.70596 8.18763 5.63594 8.58515C5.56593 8.98267 5.81098 9.3802 6.19604 9.48861Z" fill="#07679C"/>
4
+ <path d="M6.19604 13.1385L13.3023 14.5841H13.4423C13.7924 14.5841 14.0724 14.3311 14.1424 13.9697C14.2125 13.5722 13.9674 13.1747 13.5823 13.1024L6.47609 11.6568C6.09102 11.5846 5.70596 11.8375 5.63594 12.2351C5.56593 12.6687 5.81098 13.0662 6.19604 13.1385Z" fill="#07679C"/>
5
+ <path d="M6.19604 16.8246L13.3023 18.2701H13.4423C13.7924 18.2701 14.0724 18.0171 14.1424 17.6557C14.2125 17.2582 13.9674 16.8607 13.5823 16.7884L6.47609 15.3429C6.09102 15.2706 5.70596 15.5236 5.63594 15.9211C5.56593 16.3548 5.81098 16.7523 6.19604 16.8246Z" fill="#07679C"/>
6
+ <path d="M19.8132 7.24803H19.9532L27.0595 5.80249C27.4445 5.73022 27.7246 5.33269 27.6196 4.93517C27.5496 4.53765 27.1645 4.24854 26.7794 4.35695L19.6732 5.80249C19.2881 5.87477 19.0081 6.27229 19.1131 6.66982C19.1831 6.99506 19.4631 7.24803 19.8132 7.24803Z" fill="#07679C"/>
7
+ <path d="M19.8132 14.5845H19.9532L27.0595 13.1389C27.4445 13.0666 27.7246 12.6691 27.6196 12.2716C27.5496 11.8741 27.1645 11.585 26.7794 11.6934L19.6732 13.1389C19.2881 13.2112 19.0081 13.6087 19.1131 14.0062C19.1831 14.3676 19.4631 14.5845 19.8132 14.5845Z" fill="#07679C"/>
8
+ <path d="M19.8132 10.9341H19.9532L27.0595 9.48853C27.4445 9.41625 27.7246 9.01873 27.6196 8.62121C27.5496 8.22368 27.1645 7.93457 26.7794 8.04299L19.6732 9.48853C19.2881 9.56081 19.0081 9.95833 19.1131 10.3559C19.1831 10.6811 19.4631 10.9341 19.8132 10.9341Z" fill="#07679C"/>
9
+ <path d="M26.7794 15.3433L19.6732 16.7888C19.2881 16.8611 19.0081 17.2586 19.1131 17.6562C19.1831 18.0176 19.4981 18.2705 19.8132 18.2705H19.9532L27.0595 16.825C27.4445 16.7527 27.7246 16.3552 27.6196 15.9577C27.5496 15.524 27.1645 15.271 26.7794 15.3433Z" fill="#07679C"/>
10
+ <path d="M30.8404 2.98385V2.73088C30.8404 1.89969 30.4904 1.10464 29.8603 0.562567C29.2302 0.0204891 28.425 -0.196342 27.6199 -0.0156494L16.873 2.15266C16.6979 2.1888 16.5579 2.1888 16.3829 2.15266L5.63599 -0.0156494C4.83085 -0.196342 4.02571 0.0204891 3.3956 0.562567C2.76549 1.10464 2.41543 1.86355 2.41543 2.73088V2.98385C1.08519 3.1284 0 4.28483 0 5.73037V20.2942C0 21.8481 1.22522 23.0768 2.69548 23.0768H30.5254C32.0306 23.0768 33.2209 21.812 33.2209 20.2942V5.73037C33.2559 4.28483 32.1707 3.1284 30.8404 2.98385ZM27.8999 1.46603C28.285 1.39375 28.635 1.50217 28.9501 1.719C29.2302 1.97197 29.4052 2.33335 29.4052 2.73088V17.9452C29.4052 18.5595 28.9851 19.1016 28.39 19.21L17.3631 21.4506V3.5982L27.8999 1.46603ZM3.88569 2.73088C3.88569 2.33335 4.06072 1.97197 4.34076 1.719C4.5508 1.53831 4.83085 1.42989 5.14591 1.42989C5.21592 1.42989 5.32094 1.42989 5.39095 1.46603L15.9278 3.5982V21.4506L4.90086 19.21C4.30576 19.1016 3.88569 18.5595 3.88569 17.9452V2.73088Z" fill="#07679C"/>
11
+ </svg>
package/src/util/Types.js CHANGED
@@ -6,12 +6,14 @@ export const DISPLAY = 'DISPLAY';
6
6
  export const DEFAULT = 'DEFAULT';
7
7
  export const FORMAT_DATA = 'FORMAT_DATA';
8
8
  export const CPI = 'CPI';
9
+ export const CPI_MAPPING = 'CPI_MAPPING';
9
10
  export const FORMAT_BYTES = 'FORMAT_BYTES';
10
11
  export const TRANSFORM = 'TRANSFORM';
11
12
  export const STUDY_DOWNLOAD = 'STUDY_DOWNLOAD';
12
13
  export const EXPAND = 'EXPAND';
13
14
  export const DBGAP = 'DBGAP';
14
15
  export const MODAL = 'MODAL';
16
+ export const EXCLUDE_FROM_DOWNLOAD = 'EXCLUDE_FROM_DOWNLOAD';
15
17
 
16
18
  export const cellTypes = {
17
19
  CUSTOM_ELEM,
@@ -22,6 +24,7 @@ export const cellTypes = {
22
24
  DEFAULT,
23
25
  FORMAT_DATA,
24
26
  CPI,
27
+ CPI_MAPPING,
25
28
  };
26
29
 
27
30
  export const cellStyles = {
@@ -30,11 +33,12 @@ export const cellStyles = {
30
33
  DBGAP,
31
34
  STUDY_DOWNLOAD,
32
35
  MODAL,
36
+ EXCLUDE_FROM_DOWNLOAD,
33
37
  };
34
38
 
35
39
  export const actionCellTypes = [CHECKBOX, DELETE];
36
40
 
37
- export const notIncludedCellStyle = [STUDY_DOWNLOAD];
41
+ export const notIncludedCellStyle = [STUDY_DOWNLOAD, EXCLUDE_FROM_DOWNLOAD];
38
42
 
39
43
  export const FORMAT_DATA_CELLS = [FORMAT_BYTES];
40
44