@bento-core/table 1.0.1-ccdihub.89 → 1.0.1-ccdihub.90
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.
- package/dist/ExtendedView.js +2 -8
- package/dist/TableView.js +5 -9
- package/dist/body/CustomTblBody.js +2 -4
- package/dist/body/DisplayBodyCell.js +4 -8
- package/dist/body/components/CPIModal.js +15 -156
- package/dist/body/components/CPIView.js +4 -6
- package/dist/body/components/CustomLinkView.js +1 -1
- package/dist/header/CustomTblHeader.js +3 -5
- package/dist/pagination/CustomPagination.js +2 -7
- package/package.json +2 -8
- package/src/ExtendedView.js +6 -15
- package/src/TableView.js +5 -11
- package/src/body/CustomTblBody.js +0 -2
- package/src/body/DisplayBodyCell.js +0 -4
- package/src/body/components/CPIModal.js +12 -165
- package/src/body/components/CPIView.js +2 -10
- package/src/body/components/CustomLinkView.js +1 -1
- package/src/header/CustomTblHeader.js +1 -6
- package/src/pagination/CustomPagination.js +0 -2
- package/dist/body/components/assets/Cart_Icon.svg +0 -3
- package/dist/body/components/assets/Question_Icon.svg +0 -4
- package/dist/wrapper/WrapperService.js +0 -36
- package/dist/wrapper/components/AddFiles.js +0 -63
- package/dist/wrapper/components/AddToCartDialog/AddToCartDialogAlertView.js +0 -35
- package/dist/wrapper/components/AddToCartDialog/AddToCartDialogController.js +0 -36
- package/dist/wrapper/components/AddToCartDialog/AddToCartDialogView.js +0 -43
- package/dist/wrapper/components/CPIFilesView/CPIFilesView.js +0 -178
- package/dist/wrapper/components/ReduxAddFile.js +0 -27
- package/dist/wrapper/components/Snackbar/Snackbar.js +0 -40
- package/dist/wrapper/components/Snackbar/SnackbarRedux.js +0 -16
- package/dist/wrapper/components/Snackbar/SuccessOutlined.js +0 -17
- package/dist/wrapper/components/TextFieldView.js +0 -37
- package/dist/wrapper/components/TooltipView.js +0 -40
- package/src/body/components/assets/Cart_Icon.svg +0 -3
- package/src/body/components/assets/Question_Icon.svg +0 -4
- package/src/wrapper/WrapperService.js +0 -25
- package/src/wrapper/components/AddFiles.js +0 -62
- package/src/wrapper/components/AddToCartDialog/AddToCartDialogAlertView.js +0 -37
- package/src/wrapper/components/AddToCartDialog/AddToCartDialogController.js +0 -32
- package/src/wrapper/components/AddToCartDialog/AddToCartDialogView.js +0 -57
- package/src/wrapper/components/CPIFilesView/CPIFilesView.js +0 -190
- package/src/wrapper/components/ReduxAddFile.js +0 -20
- package/src/wrapper/components/Snackbar/Snackbar.js +0 -43
- package/src/wrapper/components/Snackbar/SnackbarRedux.js +0 -11
- package/src/wrapper/components/Snackbar/SuccessOutlined.js +0 -10
- package/src/wrapper/components/TextFieldView.js +0 -32
- package/src/wrapper/components/TooltipView.js +0 -35
package/dist/ExtendedView.js
CHANGED
|
@@ -21,11 +21,6 @@ const downloadAreaStyle = {
|
|
|
21
21
|
borderTop: '1px solid #8A7F7C',
|
|
22
22
|
paddingRight: '41px'
|
|
23
23
|
};
|
|
24
|
-
const exportAreaStyle = {
|
|
25
|
-
display: 'flex',
|
|
26
|
-
marginTop: '20px',
|
|
27
|
-
paddingRight: '41px'
|
|
28
|
-
};
|
|
29
24
|
const ExtendedView = _ref => {
|
|
30
25
|
let {
|
|
31
26
|
table,
|
|
@@ -42,7 +37,6 @@ const ExtendedView = _ref => {
|
|
|
42
37
|
return null;
|
|
43
38
|
}
|
|
44
39
|
const {
|
|
45
|
-
hasExport = true,
|
|
46
40
|
manageViewColumns = false,
|
|
47
41
|
pagination = false
|
|
48
42
|
} = extendedViewConfig;
|
|
@@ -53,7 +47,7 @@ const ExtendedView = _ref => {
|
|
|
53
47
|
theme: themeConfig
|
|
54
48
|
}, pagination && /*#__PURE__*/_react.default.createElement("div", {
|
|
55
49
|
className: "downloadArea",
|
|
56
|
-
style:
|
|
50
|
+
style: downloadAreaStyle
|
|
57
51
|
}, /*#__PURE__*/_react.default.createElement(_CustomPagination.default, {
|
|
58
52
|
customTheme: customTheme.tblTopPgn,
|
|
59
53
|
rowsPerPageOptions: [10, 25, 50, 100],
|
|
@@ -65,7 +59,7 @@ const ExtendedView = _ref => {
|
|
|
65
59
|
onRowsPerPageChange: onRowsPerPageChange,
|
|
66
60
|
queryVariables: queryVariables,
|
|
67
61
|
table: table
|
|
68
|
-
}),
|
|
62
|
+
}), /*#__PURE__*/_react.default.createElement(_DownloadButtonView.default, {
|
|
69
63
|
count: table.totalRowCount || 0,
|
|
70
64
|
queryVariables: queryVariables,
|
|
71
65
|
table: table
|
package/dist/TableView.js
CHANGED
|
@@ -71,8 +71,7 @@ const TableView = _ref => {
|
|
|
71
71
|
onSortByColumn,
|
|
72
72
|
onColumnViewChange,
|
|
73
73
|
themeConfig = {},
|
|
74
|
-
queryVariables
|
|
75
|
-
navigation
|
|
74
|
+
queryVariables
|
|
76
75
|
} = _ref;
|
|
77
76
|
(0, _react.useEffect)(() => {
|
|
78
77
|
const tableContainer = document.getElementById('tableContainer');
|
|
@@ -95,8 +94,7 @@ const TableView = _ref => {
|
|
|
95
94
|
extendedViewConfig
|
|
96
95
|
} = table;
|
|
97
96
|
const {
|
|
98
|
-
manageViewColumns = false
|
|
99
|
-
hasExport = true
|
|
97
|
+
manageViewColumns = false
|
|
100
98
|
} = extendedViewConfig;
|
|
101
99
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ExtendedView.default, {
|
|
102
100
|
table: table,
|
|
@@ -124,8 +122,7 @@ const TableView = _ref => {
|
|
|
124
122
|
customTheme: themeConfig.tblBody,
|
|
125
123
|
rows: tableRows,
|
|
126
124
|
table: table,
|
|
127
|
-
onRowSelectChange: onRowSelectChange
|
|
128
|
-
navigation: navigation
|
|
125
|
+
onRowSelectChange: onRowSelectChange
|
|
129
126
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
130
127
|
id: "addScrollContainer",
|
|
131
128
|
style: addScrollContainerStyle
|
|
@@ -145,9 +142,8 @@ const TableView = _ref => {
|
|
|
145
142
|
rowsPerPage: table.rowsPerPage || 10,
|
|
146
143
|
page: table.page || 0,
|
|
147
144
|
onPageChange: onPageChange,
|
|
148
|
-
onRowsPerPageChange: onRowsPerPageChange
|
|
149
|
-
|
|
150
|
-
}), hasExport && /*#__PURE__*/_react.default.createElement(_DownloadButtonView.default, {
|
|
145
|
+
onRowsPerPageChange: onRowsPerPageChange
|
|
146
|
+
}), /*#__PURE__*/_react.default.createElement(_DownloadButtonView.default, {
|
|
151
147
|
count: table.totalRowCount || 0,
|
|
152
148
|
queryVariables: queryVariables,
|
|
153
149
|
table: table
|
|
@@ -26,8 +26,7 @@ const CustomTableBody = _ref => {
|
|
|
26
26
|
rows = [],
|
|
27
27
|
table,
|
|
28
28
|
onRowSelectChange,
|
|
29
|
-
customTheme = {}
|
|
30
|
-
navigation
|
|
29
|
+
customTheme = {}
|
|
31
30
|
} = _ref;
|
|
32
31
|
const {
|
|
33
32
|
columns
|
|
@@ -53,8 +52,7 @@ const CustomTableBody = _ref => {
|
|
|
53
52
|
return /*#__PURE__*/_react.default.createElement(_DisplayBodyCell.default, {
|
|
54
53
|
column: column,
|
|
55
54
|
row: row,
|
|
56
|
-
themeConfig: themeConfig
|
|
57
|
-
navigation: navigation
|
|
55
|
+
themeConfig: themeConfig
|
|
58
56
|
});
|
|
59
57
|
})))));
|
|
60
58
|
};
|
|
@@ -41,8 +41,7 @@ const ViewCell = _ref2 => {
|
|
|
41
41
|
let {
|
|
42
42
|
column,
|
|
43
43
|
row,
|
|
44
|
-
themeConfig
|
|
45
|
-
navigation
|
|
44
|
+
themeConfig
|
|
46
45
|
} = _ref2;
|
|
47
46
|
const {
|
|
48
47
|
cellType
|
|
@@ -67,8 +66,7 @@ const ViewCell = _ref2 => {
|
|
|
67
66
|
return /*#__PURE__*/_react.default.createElement(_CPIView.default, {
|
|
68
67
|
row: row,
|
|
69
68
|
column: column,
|
|
70
|
-
themeConfig: themeConfig
|
|
71
|
-
navigation: navigation
|
|
69
|
+
themeConfig: themeConfig
|
|
72
70
|
});
|
|
73
71
|
default:
|
|
74
72
|
return /*#__PURE__*/_react.default.createElement(_core.Typography, null, row[column.dataField]);
|
|
@@ -78,16 +76,14 @@ const DisplayCell = _ref3 => {
|
|
|
78
76
|
let {
|
|
79
77
|
row,
|
|
80
78
|
column,
|
|
81
|
-
themeConfig
|
|
82
|
-
navigation
|
|
79
|
+
themeConfig
|
|
83
80
|
} = _ref3;
|
|
84
81
|
return /*#__PURE__*/_react.default.createElement(_core.TableCell, {
|
|
85
82
|
className: column.dataField
|
|
86
83
|
}, /*#__PURE__*/_react.default.createElement(ViewCell, {
|
|
87
84
|
row: row,
|
|
88
85
|
column: column,
|
|
89
|
-
themeConfig: themeConfig
|
|
90
|
-
navigation: navigation
|
|
86
|
+
themeConfig: themeConfig
|
|
91
87
|
}));
|
|
92
88
|
};
|
|
93
89
|
var _default = DisplayCell;
|
|
@@ -5,39 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactRouterDom = require("react-router-dom");
|
|
9
8
|
var _core = require("@material-ui/core");
|
|
10
9
|
var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
|
|
11
10
|
var _styles = require("@material-ui/core/styles");
|
|
12
11
|
var _ModalStyle = _interopRequireDefault(require("./ModalStyle"));
|
|
13
12
|
var _CustomCell = _interopRequireDefault(require("../../header/CustomCell"));
|
|
14
|
-
var _ReduxAddFile = _interopRequireDefault(require("../../wrapper/components/ReduxAddFile"));
|
|
15
|
-
var _Question_Icon = _interopRequireDefault(require("./assets/Question_Icon.svg"));
|
|
16
|
-
var _Cart_Icon = _interopRequireDefault(require("./assets/Cart_Icon.svg"));
|
|
17
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
14
|
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); }
|
|
19
15
|
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; }
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
alt: 'tooltipIcon',
|
|
25
|
-
Participants: 'Click button to add all files associated with the filtered row(s).',
|
|
26
|
-
arrow: true,
|
|
27
|
-
styles: {
|
|
28
|
-
border: '#03A383 1px solid'
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
const tooltipContent = {
|
|
32
|
-
tooltipText: 'Click button to add all selected files associated with this participant to the cart.',
|
|
33
|
-
icon: _Question_Icon.default,
|
|
34
|
-
alt: 'tooltipIcon',
|
|
35
|
-
Participants: 'Click button to add files associated with the selected row(s).',
|
|
36
|
-
arrow: true,
|
|
37
|
-
styles: {
|
|
38
|
-
border: '#03A383 1px solid'
|
|
39
|
-
}
|
|
40
|
-
};
|
|
16
|
+
// import CustomTableBody from '../../body/CustomTblBody';
|
|
17
|
+
|
|
18
|
+
// import TableHeader from '../../header/CustomTblHeader';
|
|
19
|
+
|
|
41
20
|
const CustomTableContainer = props => {
|
|
42
21
|
const {
|
|
43
22
|
children,
|
|
@@ -45,7 +24,7 @@ const CustomTableContainer = props => {
|
|
|
45
24
|
className
|
|
46
25
|
} = props;
|
|
47
26
|
const tableStyle = {
|
|
48
|
-
height: '
|
|
27
|
+
height: '470px',
|
|
49
28
|
overflowX: 'hidden'
|
|
50
29
|
};
|
|
51
30
|
return /*#__PURE__*/_react.default.createElement(_core.ThemeProvider, {
|
|
@@ -71,32 +50,6 @@ const CPIModal = _ref => {
|
|
|
71
50
|
const result = row.cpi_data;
|
|
72
51
|
return result;
|
|
73
52
|
});
|
|
74
|
-
const [selectedIds, setIds] = (0, _react.useState)([]);
|
|
75
|
-
const [selectAll, setSelectAll] = (0, _react.useState)(false);
|
|
76
|
-
const wrapperConfig = {
|
|
77
|
-
container: 'buttons',
|
|
78
|
-
size: 'xl',
|
|
79
|
-
clsName: 'container_header',
|
|
80
|
-
items: [{
|
|
81
|
-
participantIds: data,
|
|
82
|
-
title: 'ADD ALL FILES FOR PARTICIPANT',
|
|
83
|
-
clsName: 'add_all_button',
|
|
84
|
-
role: 'ADD_ALL_FILES',
|
|
85
|
-
btnType: 'ADD_ALL_FILES',
|
|
86
|
-
tooltipCofig: tooltipContentAddAll,
|
|
87
|
-
conditional: false,
|
|
88
|
-
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
|
-
}, {
|
|
90
|
-
participantIds: selectedIds,
|
|
91
|
-
title: 'ADD SELECTED FILES FOR PARTICIPANT',
|
|
92
|
-
clsName: 'add_selected_button',
|
|
93
|
-
role: 'ADD_SELECTED_FILES',
|
|
94
|
-
btnType: 'ADD_SELECTED_FILES',
|
|
95
|
-
tooltipCofig: tooltipContent,
|
|
96
|
-
conditional: true,
|
|
97
|
-
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
|
-
}]
|
|
99
|
-
};
|
|
100
53
|
const sortingData = (column, newOrder) => {
|
|
101
54
|
const sortedData = data.sort((a, b) => a[column].localeCompare(b[column]));
|
|
102
55
|
if (newOrder === 'desc') {
|
|
@@ -104,29 +57,6 @@ const CPIModal = _ref => {
|
|
|
104
57
|
}
|
|
105
58
|
return sortedData;
|
|
106
59
|
};
|
|
107
|
-
const handleSelectAll = () => {
|
|
108
|
-
if (selectAll) {
|
|
109
|
-
setSelectAll(false);
|
|
110
|
-
setIds([]);
|
|
111
|
-
} else {
|
|
112
|
-
setSelectAll(true);
|
|
113
|
-
let toAdd = [];
|
|
114
|
-
data.forEach(e => {
|
|
115
|
-
if (e.data_type === 'internal' && e.p_id) {
|
|
116
|
-
toAdd = toAdd.concat(e.p_id);
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
setIds(toAdd);
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
const handleSelect = id => {
|
|
123
|
-
if (selectedIds.indexOf(id) !== -1) {
|
|
124
|
-
setIds(selectedIds.filter(e => e !== id));
|
|
125
|
-
} else {
|
|
126
|
-
const toAdd = selectedIds.concat(id);
|
|
127
|
-
setIds(toAdd);
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
60
|
const handleSortByColumn = (column, order) => {
|
|
131
61
|
const newOrder = order === 'asc' && sortBy === column ? 'desc' : 'asc';
|
|
132
62
|
const newData = sortingData(column, newOrder);
|
|
@@ -134,43 +64,6 @@ const CPIModal = _ref => {
|
|
|
134
64
|
setSortBy(column);
|
|
135
65
|
setSortOrder(newOrder);
|
|
136
66
|
};
|
|
137
|
-
const buttonContainer = {
|
|
138
|
-
display: 'flex',
|
|
139
|
-
justifyContent: 'center',
|
|
140
|
-
padding: '10px'
|
|
141
|
-
};
|
|
142
|
-
const addAllFilesButton = {
|
|
143
|
-
width: '174px',
|
|
144
|
-
height: '41px',
|
|
145
|
-
borderRadius: '5px',
|
|
146
|
-
backgroundColor: '#536D70',
|
|
147
|
-
fontFamily: 'Poppins',
|
|
148
|
-
fontWeight: '600',
|
|
149
|
-
fontSize: '12px',
|
|
150
|
-
color: 'white',
|
|
151
|
-
lineHeight: '14px'
|
|
152
|
-
};
|
|
153
|
-
const addSelectedFilesButton = {
|
|
154
|
-
width: '174px',
|
|
155
|
-
height: '41px',
|
|
156
|
-
borderRadius: '5px',
|
|
157
|
-
backgroundColor: selectedIds.length ? '#2A6E93' : '#B3D6EA',
|
|
158
|
-
fontFamily: 'Poppins',
|
|
159
|
-
fontWeight: '600',
|
|
160
|
-
fontSize: '12px',
|
|
161
|
-
color: 'white',
|
|
162
|
-
lineHeight: '14px'
|
|
163
|
-
};
|
|
164
|
-
const goToCartButton = {
|
|
165
|
-
width: '174px',
|
|
166
|
-
height: '41px',
|
|
167
|
-
borderRadius: '5px',
|
|
168
|
-
backgroundColor: '#5666BD',
|
|
169
|
-
fontFamily: 'Poppins',
|
|
170
|
-
fontWeight: '600',
|
|
171
|
-
fontSize: '12px',
|
|
172
|
-
color: 'white'
|
|
173
|
-
};
|
|
174
67
|
const modalBody = {
|
|
175
68
|
position: 'absolute',
|
|
176
69
|
top: '5%',
|
|
@@ -206,13 +99,18 @@ const CPIModal = _ref => {
|
|
|
206
99
|
fontFamily: 'Nunito',
|
|
207
100
|
fontSize: '16px',
|
|
208
101
|
fontWeight: '400',
|
|
209
|
-
|
|
102
|
+
padding: '45px',
|
|
103
|
+
paddingLeft: '35px',
|
|
104
|
+
paddingRight: '20px'
|
|
210
105
|
};
|
|
211
106
|
const link = {
|
|
212
107
|
color: '#7D267E',
|
|
213
108
|
fontFamily: 'Nunito',
|
|
214
109
|
fontSize: '16px',
|
|
215
|
-
fontWeight: '700'
|
|
110
|
+
fontWeight: '700',
|
|
111
|
+
position: 'relative',
|
|
112
|
+
top: '11.5px',
|
|
113
|
+
right: '39px'
|
|
216
114
|
};
|
|
217
115
|
const modalTitle = {
|
|
218
116
|
fontFamily: 'Poppins',
|
|
@@ -286,17 +184,7 @@ const CPIModal = _ref => {
|
|
|
286
184
|
}, "".concat(data.length, " mapped identifiers")), /*#__PURE__*/_react.default.createElement(CustomTableContainer, {
|
|
287
185
|
className: classes.tableContainer,
|
|
288
186
|
themeConfig: themeConfig
|
|
289
|
-
}, /*#__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(
|
|
290
|
-
padding: "checkbox"
|
|
291
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
292
|
-
style: {
|
|
293
|
-
display: 'none'
|
|
294
|
-
}
|
|
295
|
-
}, "Select all"), /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
296
|
-
color: "primary",
|
|
297
|
-
checked: selectAll,
|
|
298
|
-
onChange: () => handleSelectAll()
|
|
299
|
-
})), displayColumns.map(column => /*#__PURE__*/_react.default.createElement(_CustomCell.default, {
|
|
187
|
+
}, /*#__PURE__*/_react.default.createElement(_core.Table, null, /*#__PURE__*/_react.default.createElement(_core.TableHead, null, /*#__PURE__*/_react.default.createElement(_core.TableRow, null, displayColumns.map(column => /*#__PURE__*/_react.default.createElement(_CustomCell.default, {
|
|
300
188
|
column: column,
|
|
301
189
|
sortBy: sortBy,
|
|
302
190
|
sortOrder: sortOrder,
|
|
@@ -306,18 +194,7 @@ const CPIModal = _ref => {
|
|
|
306
194
|
paddingRight: '3px',
|
|
307
195
|
fontWeight: '700'
|
|
308
196
|
}
|
|
309
|
-
})))), /*#__PURE__*/_react.default.createElement(_core.TableBody, {
|
|
310
|
-
style: {
|
|
311
|
-
borderBottom: '3px solid rgb(147, 147, 147)'
|
|
312
|
-
}
|
|
313
|
-
}, data.map(currRow => /*#__PURE__*/_react.default.createElement(_core.TableRow, null, /*#__PURE__*/_react.default.createElement(_core.TableCell, {
|
|
314
|
-
padding: "checkbox"
|
|
315
|
-
}, /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
316
|
-
color: "#2A6E93",
|
|
317
|
-
checked: selectedIds.includes(currRow.p_id),
|
|
318
|
-
disabled: currRow.data_type === 'external',
|
|
319
|
-
onChange: () => handleSelect(currRow.p_id)
|
|
320
|
-
})), displayColumns.map(column => column.dataField !== 'data_location' ? /*#__PURE__*/_react.default.createElement(_core.TableCell, {
|
|
197
|
+
})))), /*#__PURE__*/_react.default.createElement(_core.TableBody, null, data.map(currRow => /*#__PURE__*/_react.default.createElement(_core.TableRow, null, displayColumns.map(column => column.dataField !== 'data_location' ? /*#__PURE__*/_react.default.createElement(_core.TableCell, {
|
|
321
198
|
style: cell
|
|
322
199
|
}, currRow[column.dataField]) : /*#__PURE__*/_react.default.createElement(_core.TableCell, {
|
|
323
200
|
style: cellLast
|
|
@@ -326,27 +203,9 @@ const CPIModal = _ref => {
|
|
|
326
203
|
target: "_blank",
|
|
327
204
|
rel: "noopener noreferrer"
|
|
328
205
|
}, currRow[column.dataField])))))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
329
|
-
style: buttonContainer
|
|
330
|
-
}, /*#__PURE__*/_react.default.createElement(_ReduxAddFile.default, _extends({}, wrapperConfig.items[0], {
|
|
331
|
-
buttonStyle: addAllFilesButton,
|
|
332
|
-
rowID: row.id
|
|
333
|
-
})), /*#__PURE__*/_react.default.createElement(_ReduxAddFile.default, _extends({}, wrapperConfig.items[1], {
|
|
334
|
-
buttonStyle: addSelectedFilesButton,
|
|
335
|
-
rowID: row.id
|
|
336
|
-
})), /*#__PURE__*/_react.default.createElement(_reactRouterDom.NavLink, {
|
|
337
|
-
to: "/fileCentricCart"
|
|
338
|
-
}, /*#__PURE__*/_react.default.createElement(_core.Button, {
|
|
339
|
-
style: goToCartButton
|
|
340
|
-
}, "GO TO CART", /*#__PURE__*/_react.default.createElement("img", {
|
|
341
|
-
src: _Cart_Icon.default,
|
|
342
|
-
alt: "cart",
|
|
343
|
-
style: {
|
|
344
|
-
paddingLeft: '30px'
|
|
345
|
-
}
|
|
346
|
-
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
347
206
|
className: "footer",
|
|
348
207
|
style: footer
|
|
349
|
-
}, "
|
|
208
|
+
}, "All CPI 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\xA0", /*#__PURE__*/_react.default.createElement("a", {
|
|
350
209
|
style: link,
|
|
351
210
|
href: "https://participantindex-docs.ccdi.cancer.gov/",
|
|
352
211
|
target: "_blank",
|
|
@@ -20,8 +20,7 @@ const CPIView = _ref => {
|
|
|
20
20
|
let {
|
|
21
21
|
column,
|
|
22
22
|
row,
|
|
23
|
-
themeConfig
|
|
24
|
-
navigation
|
|
23
|
+
themeConfig
|
|
25
24
|
} = _ref;
|
|
26
25
|
const useStyles = (0, _core.makeStyles)(() => ({
|
|
27
26
|
arrow: {
|
|
@@ -71,8 +70,7 @@ const CPIView = _ref => {
|
|
|
71
70
|
row: row,
|
|
72
71
|
open: modalOpen,
|
|
73
72
|
onClose: handleModalClose,
|
|
74
|
-
themeConfig: themeConfig
|
|
75
|
-
navigation: navigation
|
|
73
|
+
themeConfig: themeConfig
|
|
76
74
|
}), /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
77
75
|
interactive: true,
|
|
78
76
|
placement: "top",
|
|
@@ -89,7 +87,7 @@ const CPIView = _ref => {
|
|
|
89
87
|
arrow: classes.arrow,
|
|
90
88
|
tooltip: classes.tooltip
|
|
91
89
|
},
|
|
92
|
-
title: externalData.length && internalData.length === 0 ? /*#__PURE__*/_react.default.createElement("div", null, "All
|
|
90
|
+
title: externalData.length && internalData.length === 0 ? /*#__PURE__*/_react.default.createElement("div", null, "All mapped identifiers in the CCDI Participant Index (CPI) are available", /*#__PURE__*/_react.default.createElement("span", {
|
|
93
91
|
role: "button",
|
|
94
92
|
onClick: handleModalOpen,
|
|
95
93
|
tabIndex: 0,
|
|
@@ -98,7 +96,7 @@ const CPIView = _ref => {
|
|
|
98
96
|
style: {
|
|
99
97
|
marginBottom: '3px'
|
|
100
98
|
}
|
|
101
|
-
}, "Identifier mapped in CCDI Hub:"), internalData.map(e => /*#__PURE__*/_react.default.createElement("div", null, "".concat(e.associated_id, ", ").concat(e.repository_of_synonym_id))), /*#__PURE__*/_react.default.createElement("p", null, "All
|
|
99
|
+
}, "Identifier mapped in CCDI Hub:"), internalData.map(e => /*#__PURE__*/_react.default.createElement("div", null, "".concat(e.associated_id, ", ").concat(e.repository_of_synonym_id))), /*#__PURE__*/_react.default.createElement("p", null, "All mapped identifiers in the CCDI Participant Index (CPI) are available", /*#__PURE__*/_react.default.createElement("span", {
|
|
102
100
|
role: "button",
|
|
103
101
|
onClick: handleModalOpen,
|
|
104
102
|
tabIndex: 0,
|
|
@@ -20,7 +20,7 @@ const CustomLinkView = _ref => {
|
|
|
20
20
|
rootPath,
|
|
21
21
|
pathParams
|
|
22
22
|
} = column === null || column === void 0 ? void 0 : column.linkAttr;
|
|
23
|
-
const url = pathParams.map(attr => "".concat(rootPath, "/").concat(row[attr]));
|
|
23
|
+
const url = pathParams.map(attr => "#".concat(rootPath, "/").concat(row[attr]));
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement(_core.Link, {
|
|
25
25
|
href: url,
|
|
26
26
|
className: _Types.cellTypes.LINK
|
|
@@ -67,11 +67,9 @@ const CustomTableHeader = _ref => {
|
|
|
67
67
|
sortBy: sortBy,
|
|
68
68
|
sortOrder: sortOrder,
|
|
69
69
|
toggleSort: () => sortByColumn(column.dataField, sortOrder),
|
|
70
|
-
style: {
|
|
71
|
-
minWidth:
|
|
72
|
-
|
|
73
|
-
textWrapMode: 'nowrap'
|
|
74
|
-
}
|
|
70
|
+
style: column.dataField === 'participant_id' ? {
|
|
71
|
+
minWidth: '230px'
|
|
72
|
+
} : {}
|
|
75
73
|
});
|
|
76
74
|
}))));
|
|
77
75
|
};
|
|
@@ -47,8 +47,7 @@ const CustomPagination = _ref => {
|
|
|
47
47
|
page,
|
|
48
48
|
onPageChange,
|
|
49
49
|
onRowsPerPageChange,
|
|
50
|
-
customTheme = {}
|
|
51
|
-
hasExport = true
|
|
50
|
+
customTheme = {}
|
|
52
51
|
} = _ref;
|
|
53
52
|
return /*#__PURE__*/_react.default.createElement(_core.ThemeProvider, {
|
|
54
53
|
theme: (0, _core.createTheme)({
|
|
@@ -75,11 +74,7 @@ const CustomPagination = _ref => {
|
|
|
75
74
|
inputProps: {
|
|
76
75
|
'aria-label': 'Selection dropdown for displaying the number of results per page'
|
|
77
76
|
}
|
|
78
|
-
}
|
|
79
|
-
style: !hasExport ? {
|
|
80
|
-
position: 'relative',
|
|
81
|
-
left: '50px'
|
|
82
|
-
} : {}
|
|
77
|
+
}
|
|
83
78
|
}));
|
|
84
79
|
};
|
|
85
80
|
CustomPagination.propTypes = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bento-core/table",
|
|
3
|
-
"version": "1.0.1-ccdihub.
|
|
3
|
+
"version": "1.0.1-ccdihub.90",
|
|
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",
|
|
@@ -29,13 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/CBIIT/bento-frontend#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@apollo/client": "^3.8.3"
|
|
33
|
-
"@bento-core/cart": "^1.0.1-ccdihub.9",
|
|
34
|
-
"@bento-core/tool-tip": "^1.0.0",
|
|
35
|
-
"@bento-core/util": "^1.0.1-ccdihub.1",
|
|
36
|
-
"clsx": "^2.1.1",
|
|
37
|
-
"graphql-tag": "^2.12.6",
|
|
38
|
-
"react-router-dom": "^5.1.2"
|
|
32
|
+
"@apollo/client": "^3.8.3"
|
|
39
33
|
},
|
|
40
34
|
"devDependencies": {},
|
|
41
35
|
"description": ""
|
package/src/ExtendedView.js
CHANGED
|
@@ -14,12 +14,6 @@ const downloadAreaStyle = {
|
|
|
14
14
|
paddingRight: '41px',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
const exportAreaStyle = {
|
|
18
|
-
display: 'flex',
|
|
19
|
-
marginTop: '20px',
|
|
20
|
-
paddingRight: '41px',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
17
|
const ExtendedView = ({
|
|
24
18
|
table,
|
|
25
19
|
onColumnViewChange,
|
|
@@ -33,7 +27,6 @@ const ExtendedView = ({
|
|
|
33
27
|
return null;
|
|
34
28
|
}
|
|
35
29
|
const {
|
|
36
|
-
hasExport = true,
|
|
37
30
|
manageViewColumns = false,
|
|
38
31
|
pagination = false,
|
|
39
32
|
} = extendedViewConfig;
|
|
@@ -50,7 +43,7 @@ const ExtendedView = ({
|
|
|
50
43
|
)} */}
|
|
51
44
|
{
|
|
52
45
|
(pagination) && (
|
|
53
|
-
<div className="downloadArea" style={
|
|
46
|
+
<div className="downloadArea" style={downloadAreaStyle}>
|
|
54
47
|
<CustomPagination
|
|
55
48
|
customTheme={customTheme.tblTopPgn}
|
|
56
49
|
rowsPerPageOptions={[10, 25, 50, 100]}
|
|
@@ -63,13 +56,11 @@ const ExtendedView = ({
|
|
|
63
56
|
queryVariables={queryVariables}
|
|
64
57
|
table={table}
|
|
65
58
|
/>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/>
|
|
72
|
-
)}
|
|
59
|
+
<DownloadButton
|
|
60
|
+
count={table.totalRowCount || 0}
|
|
61
|
+
queryVariables={queryVariables}
|
|
62
|
+
table={table}
|
|
63
|
+
/>
|
|
73
64
|
<ManageColumnView
|
|
74
65
|
table={table}
|
|
75
66
|
manageViewColumns={manageViewColumns}
|
package/src/TableView.js
CHANGED
|
@@ -64,7 +64,6 @@ const TableView = ({
|
|
|
64
64
|
onColumnViewChange,
|
|
65
65
|
themeConfig = {},
|
|
66
66
|
queryVariables,
|
|
67
|
-
navigation,
|
|
68
67
|
}) => {
|
|
69
68
|
useEffect(() => {
|
|
70
69
|
const tableContainer = document.getElementById('tableContainer');
|
|
@@ -86,7 +85,6 @@ const TableView = ({
|
|
|
86
85
|
const { extendedViewConfig } = table;
|
|
87
86
|
const {
|
|
88
87
|
manageViewColumns = false,
|
|
89
|
-
hasExport = true,
|
|
90
88
|
} = extendedViewConfig;
|
|
91
89
|
return (
|
|
92
90
|
<>
|
|
@@ -122,7 +120,6 @@ const TableView = ({
|
|
|
122
120
|
rows={tableRows}
|
|
123
121
|
table={table}
|
|
124
122
|
onRowSelectChange={onRowSelectChange}
|
|
125
|
-
navigation={navigation}
|
|
126
123
|
/>
|
|
127
124
|
</Table>
|
|
128
125
|
</CustomTableContainer>
|
|
@@ -145,15 +142,12 @@ const TableView = ({
|
|
|
145
142
|
page={table.page || 0}
|
|
146
143
|
onPageChange={onPageChange}
|
|
147
144
|
onRowsPerPageChange={onRowsPerPageChange}
|
|
148
|
-
hasExport={hasExport}
|
|
149
145
|
/>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
/>
|
|
156
|
-
)}
|
|
146
|
+
<DownloadButton
|
|
147
|
+
count={table.totalRowCount || 0}
|
|
148
|
+
queryVariables={queryVariables}
|
|
149
|
+
table={table}
|
|
150
|
+
/>
|
|
157
151
|
<ManageColumnView
|
|
158
152
|
table={table}
|
|
159
153
|
manageViewColumns={manageViewColumns}
|
|
@@ -22,7 +22,6 @@ const CustomTableBody = ({
|
|
|
22
22
|
table,
|
|
23
23
|
onRowSelectChange,
|
|
24
24
|
customTheme = {},
|
|
25
|
-
navigation,
|
|
26
25
|
}) => {
|
|
27
26
|
const { columns } = table;
|
|
28
27
|
const displayColunms = columns.filter((col) => col.display);
|
|
@@ -52,7 +51,6 @@ const CustomTableBody = ({
|
|
|
52
51
|
column={column}
|
|
53
52
|
row={row}
|
|
54
53
|
themeConfig={themeConfig}
|
|
55
|
-
navigation={navigation}
|
|
56
54
|
/>
|
|
57
55
|
);
|
|
58
56
|
})
|
|
@@ -31,7 +31,6 @@ const ViewCell = ({
|
|
|
31
31
|
column,
|
|
32
32
|
row,
|
|
33
33
|
themeConfig,
|
|
34
|
-
navigation,
|
|
35
34
|
}) => {
|
|
36
35
|
const { cellType } = column;
|
|
37
36
|
switch (cellType) {
|
|
@@ -62,7 +61,6 @@ const ViewCell = ({
|
|
|
62
61
|
row={row}
|
|
63
62
|
column={column}
|
|
64
63
|
themeConfig={themeConfig}
|
|
65
|
-
navigation={navigation}
|
|
66
64
|
/>
|
|
67
65
|
);
|
|
68
66
|
default:
|
|
@@ -78,14 +76,12 @@ const DisplayCell = ({
|
|
|
78
76
|
row,
|
|
79
77
|
column,
|
|
80
78
|
themeConfig,
|
|
81
|
-
navigation,
|
|
82
79
|
}) => (
|
|
83
80
|
<TableCell className={column.dataField}>
|
|
84
81
|
<ViewCell
|
|
85
82
|
row={row}
|
|
86
83
|
column={column}
|
|
87
84
|
themeConfig={themeConfig}
|
|
88
|
-
navigation={navigation}
|
|
89
85
|
/>
|
|
90
86
|
</TableCell>
|
|
91
87
|
);
|