@bento-core/table 1.0.1-ccdihub.91 → 1.0.1-ccdihub.93
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
CHANGED
|
@@ -19,7 +19,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
19
19
|
const downloadAreaStyle = {
|
|
20
20
|
display: 'flex',
|
|
21
21
|
borderTop: '1px solid #8A7F7C',
|
|
22
|
-
paddingRight: '
|
|
22
|
+
paddingRight: '48px'
|
|
23
23
|
};
|
|
24
24
|
const ExtendedView = _ref => {
|
|
25
25
|
let {
|
|
@@ -115,7 +115,7 @@ const DownloadButton = _ref => {
|
|
|
115
115
|
width: '48px',
|
|
116
116
|
height: '36px',
|
|
117
117
|
paddingLeft: '5px',
|
|
118
|
-
border: '0.75px solid #606060',
|
|
118
|
+
border: "".concat(listDisplay === 'none' ? '0.75px solid #606060' : '1.5px solid #5666BD'),
|
|
119
119
|
borderRadius: '5px',
|
|
120
120
|
display: 'inline-block',
|
|
121
121
|
position: 'relative',
|
|
@@ -125,11 +125,11 @@ const DownloadButton = _ref => {
|
|
|
125
125
|
display: 'block',
|
|
126
126
|
position: 'absolute',
|
|
127
127
|
width: '60px',
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
top: '38px',
|
|
129
|
+
left: '-13.5px',
|
|
130
130
|
overflow: 'auto',
|
|
131
131
|
zIndex: '5',
|
|
132
|
-
border: '1.5px solid #
|
|
132
|
+
border: '1.5px solid #5666BD',
|
|
133
133
|
borderRadius: '5px',
|
|
134
134
|
background: '#ffffff'
|
|
135
135
|
},
|
|
@@ -140,13 +140,15 @@ const DownloadButton = _ref => {
|
|
|
140
140
|
fontWeight: 400,
|
|
141
141
|
lineHeight: '21px',
|
|
142
142
|
'&:hover': {
|
|
143
|
-
background: '#
|
|
143
|
+
background: '#C9CFF4',
|
|
144
144
|
cursor: 'pointer'
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
147
|
arrowdownIcon: {
|
|
148
148
|
fill: '#606060',
|
|
149
|
-
marginTop: '2px'
|
|
149
|
+
marginTop: '2px',
|
|
150
|
+
width: '20px',
|
|
151
|
+
height: '20px'
|
|
150
152
|
},
|
|
151
153
|
arrowdownIconDisabled: {
|
|
152
154
|
marginLeft: '5px',
|
|
@@ -163,11 +165,17 @@ const DownloadButton = _ref => {
|
|
|
163
165
|
title: "Download filtered results",
|
|
164
166
|
className: classes.tooltip
|
|
165
167
|
}, count !== 0 ? /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
166
|
-
onClick: handleClickButton
|
|
168
|
+
onClick: handleClickButton,
|
|
169
|
+
style: {
|
|
170
|
+
backgroundColor: 'transparent'
|
|
171
|
+
}
|
|
167
172
|
}, /*#__PURE__*/_react.default.createElement(_icons.CloudDownload, null), /*#__PURE__*/_react.default.createElement(_KeyboardArrowDownOutlined.default, {
|
|
168
173
|
className: classes.arrowdownIcon
|
|
169
174
|
})) : /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
170
|
-
disabled: true
|
|
175
|
+
disabled: true,
|
|
176
|
+
style: {
|
|
177
|
+
backgroundColor: 'transparent'
|
|
178
|
+
}
|
|
171
179
|
}, /*#__PURE__*/_react.default.createElement(_icons.CloudDownload, null), /*#__PURE__*/_react.default.createElement(_KeyboardArrowDownOutlined.default, {
|
|
172
180
|
className: classes.arrowdownIconDisabled
|
|
173
181
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -27,13 +27,35 @@ const ManageColumnView = _ref => {
|
|
|
27
27
|
const {
|
|
28
28
|
columns
|
|
29
29
|
} = table;
|
|
30
|
-
const [
|
|
30
|
+
const [listDisplay, setListDisplay] = (0, _react.useState)('none');
|
|
31
31
|
const [selectAll, setSelectAll] = (0, _react.useState)(false);
|
|
32
32
|
const viewColumns = columns.filter(col => col.role === _Types.cellTypes.DISPLAY);
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
const dropdownSelection = (0, _react.useRef)(null);
|
|
34
|
+
const handleClose = () => {
|
|
35
|
+
setListDisplay('none');
|
|
35
36
|
};
|
|
36
|
-
const
|
|
37
|
+
const handleClickButton = () => {
|
|
38
|
+
if (listDisplay === 'none') {
|
|
39
|
+
setListDisplay('block');
|
|
40
|
+
} else {
|
|
41
|
+
setListDisplay('none');
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const useOutsideAlerter = ref => {
|
|
45
|
+
(0, _react.useEffect)(() => {
|
|
46
|
+
function handleClickOutside(event) {
|
|
47
|
+
console.log(event.target);
|
|
48
|
+
if (!(event.target.getAttribute('id') && event.target.getAttribute('id').includes('dropdownListItem')) && !(event.target.getAttribute('class') && event.target.getAttribute('class').includes('MuiFormControlLabel'))) {
|
|
49
|
+
setListDisplay('none');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
53
|
+
return () => {
|
|
54
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
55
|
+
};
|
|
56
|
+
}, [ref]);
|
|
57
|
+
};
|
|
58
|
+
useOutsideAlerter(dropdownSelection);
|
|
37
59
|
const handleSelectAll = () => {
|
|
38
60
|
const state = selectAll;
|
|
39
61
|
setSelectAll(!selectAll);
|
|
@@ -43,7 +65,7 @@ const ManageColumnView = _ref => {
|
|
|
43
65
|
width: '48px',
|
|
44
66
|
height: '36px',
|
|
45
67
|
paddingLeft: '5px',
|
|
46
|
-
border: '0.75px solid #606060',
|
|
68
|
+
border: "".concat(listDisplay === 'none' ? '0.75px solid #606060' : '1.5px solid #5666BD'),
|
|
47
69
|
borderRadius: '5px',
|
|
48
70
|
display: 'inline-flex',
|
|
49
71
|
position: 'relative',
|
|
@@ -51,20 +73,47 @@ const ManageColumnView = _ref => {
|
|
|
51
73
|
marginRight: '7px'
|
|
52
74
|
};
|
|
53
75
|
const displayColumnStyle = {
|
|
54
|
-
position: '
|
|
55
|
-
right: '
|
|
56
|
-
bottom: '
|
|
57
|
-
scale: '0.5'
|
|
76
|
+
position: 'absolute',
|
|
77
|
+
right: '35px',
|
|
78
|
+
bottom: '23px'
|
|
58
79
|
};
|
|
59
80
|
const viewColumnsStyle = {
|
|
60
81
|
marginTop: '6px',
|
|
61
82
|
height: '24px',
|
|
62
|
-
|
|
83
|
+
backgroundColor: 'transparent'
|
|
84
|
+
};
|
|
85
|
+
const dropdownList = {
|
|
86
|
+
position: 'absolute',
|
|
87
|
+
width: '230px',
|
|
88
|
+
marginTop: '38px',
|
|
89
|
+
marginLeft: '-188px',
|
|
90
|
+
overflow: 'auto',
|
|
91
|
+
zIndex: '11',
|
|
92
|
+
border: '1.5px solid #5666BD',
|
|
93
|
+
borderRadius: '5px',
|
|
94
|
+
background: '#ffffff',
|
|
95
|
+
display: listDisplay
|
|
96
|
+
};
|
|
97
|
+
const titleStyle = {
|
|
98
|
+
fontFamily: 'Poppins',
|
|
99
|
+
fontWeight: '400',
|
|
100
|
+
fontSize: '14px',
|
|
101
|
+
display: 'flex',
|
|
102
|
+
position: 'relative',
|
|
103
|
+
top: '15px',
|
|
104
|
+
left: '1px',
|
|
105
|
+
color: '#000000'
|
|
106
|
+
};
|
|
107
|
+
const textStyle = {
|
|
108
|
+
fontFamily: 'Poppins',
|
|
109
|
+
fontSize: '14px',
|
|
110
|
+
fontWeight: '400'
|
|
63
111
|
};
|
|
64
112
|
const arrowdownIcon = {
|
|
65
|
-
fill: '#606060'
|
|
113
|
+
fill: '#606060',
|
|
114
|
+
width: '20px',
|
|
115
|
+
height: '20px'
|
|
66
116
|
};
|
|
67
|
-
const open = Boolean(anchorEl);
|
|
68
117
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
69
118
|
style: columnDropdown
|
|
70
119
|
}, /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
@@ -77,35 +126,34 @@ const ManageColumnView = _ref => {
|
|
|
77
126
|
title: manageViewColumns.title
|
|
78
127
|
}, /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
79
128
|
variant: "contained",
|
|
80
|
-
onClick:
|
|
129
|
+
onClick: handleClickButton,
|
|
81
130
|
style: viewColumnsStyle
|
|
82
131
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
83
132
|
src: _View_Columns.default,
|
|
84
133
|
alt: "viewColumnsIcon"
|
|
85
134
|
}), /*#__PURE__*/_react.default.createElement(_KeyboardArrowDownOutlined.default, {
|
|
86
135
|
style: arrowdownIcon
|
|
87
|
-
}))), /*#__PURE__*/_react.default.createElement(
|
|
88
|
-
|
|
89
|
-
anchorEl: anchorEl,
|
|
90
|
-
onClose: handleClose,
|
|
91
|
-
anchorOrigin: {
|
|
92
|
-
vertical: 'bottom',
|
|
93
|
-
horizontal: 'left'
|
|
94
|
-
}
|
|
136
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
137
|
+
style: dropdownList
|
|
95
138
|
}, /*#__PURE__*/_react.default.createElement(_core.Typography, {
|
|
96
139
|
variant: "caption",
|
|
97
|
-
className: "viewColumnText"
|
|
140
|
+
className: "viewColumnText",
|
|
141
|
+
style: titleStyle
|
|
98
142
|
}, manageViewColumns.title), /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
99
143
|
onClick: handleClose,
|
|
100
144
|
className: "closeIcon",
|
|
101
145
|
style: {
|
|
102
|
-
float: 'right'
|
|
146
|
+
float: 'right',
|
|
147
|
+
bottom: '20px',
|
|
148
|
+
scale: '0.75'
|
|
103
149
|
}
|
|
104
150
|
}, /*#__PURE__*/_react.default.createElement(_icons.Close, null)), /*#__PURE__*/_react.default.createElement(_core.List, {
|
|
105
|
-
className: "viewColumnList"
|
|
106
|
-
|
|
151
|
+
className: "viewColumnList",
|
|
152
|
+
id: "dropdownListItemTitle"
|
|
153
|
+
}, viewColumns.map((column, index) => /*#__PURE__*/_react.default.createElement(_core.ListItem, {
|
|
107
154
|
width: 1,
|
|
108
|
-
className: "viewColumnListItem"
|
|
155
|
+
className: "viewColumnListItem",
|
|
156
|
+
id: "dropdownListItem-".concat(index)
|
|
109
157
|
}, /*#__PURE__*/_react.default.createElement(_core.FormControlLabel, {
|
|
110
158
|
control: /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
111
159
|
icon: /*#__PURE__*/_react.default.createElement(_icons.CheckBoxOutlineBlank, {
|
|
@@ -116,10 +164,11 @@ const ManageColumnView = _ref => {
|
|
|
116
164
|
}),
|
|
117
165
|
onClick: () => onColumnViewChange(column),
|
|
118
166
|
checked: column.display,
|
|
167
|
+
id: "dropdownListItemCheckbox-".concat(index),
|
|
119
168
|
checkedIcon: /*#__PURE__*/_react.default.createElement(_icons.CheckBox, {
|
|
120
169
|
style: {
|
|
121
170
|
fontSize: 18,
|
|
122
|
-
color: column.hideable ? 'rgba(
|
|
171
|
+
color: column.hideable ? 'rgba(109, 95, 91, 1)' : 'rgba(109, 95, 91, 0.38)'
|
|
123
172
|
},
|
|
124
173
|
className: "checkBoxIcon"
|
|
125
174
|
}),
|
|
@@ -129,7 +178,11 @@ const ManageColumnView = _ref => {
|
|
|
129
178
|
disabled: !column.hideable
|
|
130
179
|
}),
|
|
131
180
|
disabled: !column.hideable,
|
|
132
|
-
label:
|
|
181
|
+
label: /*#__PURE__*/_react.default.createElement(_core.Typography, {
|
|
182
|
+
id: "dropdownListItemLabel-".concat(index),
|
|
183
|
+
style: textStyle
|
|
184
|
+
}, column.header),
|
|
185
|
+
id: "dropdownListItem-".concat(index, "-label")
|
|
133
186
|
}))), /*#__PURE__*/_react.default.createElement(_core.Divider, {
|
|
134
187
|
style: {
|
|
135
188
|
color: '#375F9A',
|
|
@@ -138,7 +191,10 @@ const ManageColumnView = _ref => {
|
|
|
138
191
|
}
|
|
139
192
|
}), /*#__PURE__*/_react.default.createElement(_core.ListItem, {
|
|
140
193
|
width: 1,
|
|
141
|
-
className: "viewColumnListItem"
|
|
194
|
+
className: "viewColumnListItem",
|
|
195
|
+
style: {
|
|
196
|
+
height: '20px'
|
|
197
|
+
}
|
|
142
198
|
}, /*#__PURE__*/_react.default.createElement(_core.FormControlLabel, {
|
|
143
199
|
control: /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
144
200
|
icon: /*#__PURE__*/_react.default.createElement(_icons.CheckBoxOutlineBlank, {
|
|
@@ -149,10 +205,11 @@ const ManageColumnView = _ref => {
|
|
|
149
205
|
}),
|
|
150
206
|
onClick: () => handleSelectAll(),
|
|
151
207
|
checked: selectAll,
|
|
208
|
+
id: "dropdownListItem-all",
|
|
152
209
|
checkedIcon: /*#__PURE__*/_react.default.createElement(_icons.CheckBox, {
|
|
153
210
|
style: {
|
|
154
211
|
fontSize: 18,
|
|
155
|
-
color: 'rgba(
|
|
212
|
+
color: 'rgba(109, 95, 91, 1)'
|
|
156
213
|
},
|
|
157
214
|
className: "checkBoxIcon"
|
|
158
215
|
}),
|
|
@@ -160,7 +217,11 @@ const ManageColumnView = _ref => {
|
|
|
160
217
|
color: "secondary",
|
|
161
218
|
className: "checkBox"
|
|
162
219
|
}),
|
|
163
|
-
label:
|
|
220
|
+
label: /*#__PURE__*/_react.default.createElement(_core.Typography, {
|
|
221
|
+
id: "dropdownListItem-all-label",
|
|
222
|
+
style: textStyle
|
|
223
|
+
}, selectAll ? 'Deselect All' : 'Select All'),
|
|
224
|
+
id: "dropdownListItem-all-label"
|
|
164
225
|
})))));
|
|
165
226
|
};
|
|
166
227
|
const styles = () => ({
|
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.93",
|
|
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",
|
package/src/ExtendedView.js
CHANGED
|
@@ -123,7 +123,7 @@ const DownloadButton = ({
|
|
|
123
123
|
width: '48px',
|
|
124
124
|
height: '36px',
|
|
125
125
|
paddingLeft: '5px',
|
|
126
|
-
border: '0.75px solid #606060'
|
|
126
|
+
border: `${listDisplay === 'none' ? '0.75px solid #606060' : '1.5px solid #5666BD'}`,
|
|
127
127
|
borderRadius: '5px',
|
|
128
128
|
display: 'inline-block',
|
|
129
129
|
position: 'relative',
|
|
@@ -133,11 +133,11 @@ const DownloadButton = ({
|
|
|
133
133
|
display: 'block',
|
|
134
134
|
position: 'absolute',
|
|
135
135
|
width: '60px',
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
top: '38px',
|
|
137
|
+
left: '-13.5px',
|
|
138
138
|
overflow: 'auto',
|
|
139
139
|
zIndex: '5',
|
|
140
|
-
border: '1.5px solid #
|
|
140
|
+
border: '1.5px solid #5666BD',
|
|
141
141
|
borderRadius: '5px',
|
|
142
142
|
background: '#ffffff',
|
|
143
143
|
},
|
|
@@ -148,13 +148,15 @@ const DownloadButton = ({
|
|
|
148
148
|
fontWeight: 400,
|
|
149
149
|
lineHeight: '21px',
|
|
150
150
|
'&:hover': {
|
|
151
|
-
background: '#
|
|
151
|
+
background: '#C9CFF4',
|
|
152
152
|
cursor: 'pointer',
|
|
153
153
|
},
|
|
154
154
|
},
|
|
155
155
|
arrowdownIcon: {
|
|
156
156
|
fill: '#606060',
|
|
157
157
|
marginTop: '2px',
|
|
158
|
+
width: '20px',
|
|
159
|
+
height: '20px',
|
|
158
160
|
},
|
|
159
161
|
arrowdownIconDisabled: {
|
|
160
162
|
marginLeft: '5px',
|
|
@@ -173,13 +175,13 @@ const DownloadButton = ({
|
|
|
173
175
|
{
|
|
174
176
|
count !== 0
|
|
175
177
|
? (
|
|
176
|
-
<IconButton onClick={handleClickButton}>
|
|
178
|
+
<IconButton onClick={handleClickButton} style={{ backgroundColor: 'transparent' }}>
|
|
177
179
|
<CloudDownload />
|
|
178
180
|
<KeyboardArrowDownOutlinedIcon className={classes.arrowdownIcon} />
|
|
179
181
|
</IconButton>
|
|
180
182
|
)
|
|
181
183
|
: (
|
|
182
|
-
<IconButton disabled>
|
|
184
|
+
<IconButton disabled style={{ backgroundColor: 'transparent' }}>
|
|
183
185
|
<CloudDownload />
|
|
184
186
|
<KeyboardArrowDownOutlinedIcon className={classes.arrowdownIconDisabled} />
|
|
185
187
|
</IconButton>
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Checkbox,
|
|
4
4
|
FormControlLabel,
|
|
5
5
|
IconButton,
|
|
6
6
|
List,
|
|
7
7
|
ListItem,
|
|
8
|
-
Popover,
|
|
9
8
|
Tooltip,
|
|
10
9
|
Typography,
|
|
11
10
|
withStyles,
|
|
@@ -31,16 +30,42 @@ const ManageColumnView = ({
|
|
|
31
30
|
return null;
|
|
32
31
|
}
|
|
33
32
|
const { columns } = table;
|
|
34
|
-
const [
|
|
33
|
+
const [listDisplay, setListDisplay] = useState('none');
|
|
35
34
|
const [selectAll, setSelectAll] = useState(false);
|
|
36
35
|
|
|
37
36
|
const viewColumns = columns.filter((col) => col.role === cellTypes.DISPLAY);
|
|
38
37
|
|
|
39
|
-
const
|
|
40
|
-
|
|
38
|
+
const dropdownSelection = useRef(null);
|
|
39
|
+
|
|
40
|
+
const handleClose = () => {
|
|
41
|
+
setListDisplay('none');
|
|
41
42
|
};
|
|
42
43
|
|
|
43
|
-
const
|
|
44
|
+
const handleClickButton = () => {
|
|
45
|
+
if (listDisplay === 'none') {
|
|
46
|
+
setListDisplay('block');
|
|
47
|
+
} else {
|
|
48
|
+
setListDisplay('none');
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const useOutsideAlerter = (ref) => {
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
function handleClickOutside(event) {
|
|
55
|
+
console.log(event.target);
|
|
56
|
+
if (!(event.target.getAttribute('id') && event.target.getAttribute('id').includes('dropdownListItem'))
|
|
57
|
+
&& !(event.target.getAttribute('class') && event.target.getAttribute('class').includes('MuiFormControlLabel'))
|
|
58
|
+
) {
|
|
59
|
+
setListDisplay('none');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
63
|
+
return () => {
|
|
64
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
65
|
+
};
|
|
66
|
+
}, [ref]);
|
|
67
|
+
};
|
|
68
|
+
useOutsideAlerter(dropdownSelection);
|
|
44
69
|
|
|
45
70
|
const handleSelectAll = () => {
|
|
46
71
|
const state = selectAll;
|
|
@@ -52,7 +77,7 @@ const ManageColumnView = ({
|
|
|
52
77
|
width: '48px',
|
|
53
78
|
height: '36px',
|
|
54
79
|
paddingLeft: '5px',
|
|
55
|
-
border: '0.75px solid #606060'
|
|
80
|
+
border: `${listDisplay === 'none' ? '0.75px solid #606060' : '1.5px solid #5666BD'}`,
|
|
56
81
|
borderRadius: '5px',
|
|
57
82
|
display: 'inline-flex',
|
|
58
83
|
position: 'relative',
|
|
@@ -61,58 +86,80 @@ const ManageColumnView = ({
|
|
|
61
86
|
};
|
|
62
87
|
|
|
63
88
|
const displayColumnStyle = {
|
|
64
|
-
position: '
|
|
65
|
-
right: '
|
|
66
|
-
bottom: '
|
|
67
|
-
scale: '0.5',
|
|
89
|
+
position: 'absolute',
|
|
90
|
+
right: '35px',
|
|
91
|
+
bottom: '23px',
|
|
68
92
|
};
|
|
69
93
|
|
|
70
94
|
const viewColumnsStyle = {
|
|
71
95
|
marginTop: '6px',
|
|
72
96
|
height: '24px',
|
|
73
|
-
|
|
97
|
+
backgroundColor: 'transparent',
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const dropdownList = {
|
|
101
|
+
position: 'absolute',
|
|
102
|
+
width: '230px',
|
|
103
|
+
marginTop: '38px',
|
|
104
|
+
marginLeft: '-188px',
|
|
105
|
+
overflow: 'auto',
|
|
106
|
+
zIndex: '11',
|
|
107
|
+
border: '1.5px solid #5666BD',
|
|
108
|
+
borderRadius: '5px',
|
|
109
|
+
background: '#ffffff',
|
|
110
|
+
display: listDisplay,
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const titleStyle = {
|
|
114
|
+
fontFamily: 'Poppins',
|
|
115
|
+
fontWeight: '400',
|
|
116
|
+
fontSize: '14px',
|
|
117
|
+
display: 'flex',
|
|
118
|
+
position: 'relative',
|
|
119
|
+
top: '15px',
|
|
120
|
+
left: '1px',
|
|
121
|
+
color: '#000000',
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const textStyle = {
|
|
125
|
+
fontFamily: 'Poppins',
|
|
126
|
+
fontSize: '14px',
|
|
127
|
+
fontWeight: '400',
|
|
74
128
|
};
|
|
75
129
|
|
|
76
130
|
const arrowdownIcon = {
|
|
77
131
|
fill: '#606060',
|
|
132
|
+
width: '20px',
|
|
133
|
+
height: '20px',
|
|
78
134
|
};
|
|
79
|
-
|
|
80
|
-
const open = Boolean(anchorEl);
|
|
81
135
|
return (
|
|
82
136
|
<div style={columnDropdown}>
|
|
83
137
|
<Tooltip title="Columns may be hidden">
|
|
84
138
|
<img src={hiddenColumnsIcon} alt="hiddenColumnsIcon" style={displayColumnStyle} />
|
|
85
139
|
</Tooltip>
|
|
86
140
|
<Tooltip title={manageViewColumns.title}>
|
|
87
|
-
<IconButton variant="contained" onClick={
|
|
141
|
+
<IconButton variant="contained" onClick={handleClickButton} style={viewColumnsStyle}>
|
|
88
142
|
<img src={viewColumnsIcon} alt="viewColumnsIcon" />
|
|
89
143
|
<KeyboardArrowDownOutlinedIcon style={arrowdownIcon} />
|
|
90
144
|
</IconButton>
|
|
91
145
|
</Tooltip>
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
anchorEl={anchorEl}
|
|
95
|
-
onClose={handleClose}
|
|
96
|
-
anchorOrigin={{
|
|
97
|
-
vertical: 'bottom',
|
|
98
|
-
horizontal: 'left',
|
|
99
|
-
}}
|
|
100
|
-
>
|
|
101
|
-
<Typography variant="caption" className="viewColumnText">
|
|
146
|
+
<div style={dropdownList}>
|
|
147
|
+
<Typography variant="caption" className="viewColumnText" style={titleStyle}>
|
|
102
148
|
{manageViewColumns.title}
|
|
103
149
|
</Typography>
|
|
104
150
|
<IconButton
|
|
105
151
|
onClick={handleClose}
|
|
106
152
|
className="closeIcon"
|
|
107
|
-
style={{ float: 'right' }}
|
|
153
|
+
style={{ float: 'right', bottom: '20px', scale: '0.75' }}
|
|
108
154
|
>
|
|
109
155
|
<Close />
|
|
110
156
|
</IconButton>
|
|
111
|
-
<List className="viewColumnList">
|
|
112
|
-
{viewColumns.map((column) => (
|
|
157
|
+
<List className="viewColumnList" id="dropdownListItemTitle">
|
|
158
|
+
{viewColumns.map((column, index) => (
|
|
113
159
|
<ListItem
|
|
114
160
|
width={1}
|
|
115
161
|
className="viewColumnListItem"
|
|
162
|
+
id={`dropdownListItem-${index}`}
|
|
116
163
|
>
|
|
117
164
|
<FormControlLabel
|
|
118
165
|
control={(
|
|
@@ -125,11 +172,12 @@ const ManageColumnView = ({
|
|
|
125
172
|
)}
|
|
126
173
|
onClick={() => onColumnViewChange(column)}
|
|
127
174
|
checked={column.display}
|
|
175
|
+
id={`dropdownListItemCheckbox-${index}`}
|
|
128
176
|
checkedIcon={(
|
|
129
177
|
<CheckBoxIcon
|
|
130
178
|
style={{
|
|
131
179
|
fontSize: 18,
|
|
132
|
-
color: column.hideable ? 'rgba(
|
|
180
|
+
color: column.hideable ? 'rgba(109, 95, 91, 1)' : 'rgba(109, 95, 91, 0.38)',
|
|
133
181
|
}}
|
|
134
182
|
className="checkBoxIcon"
|
|
135
183
|
/>
|
|
@@ -141,7 +189,8 @@ const ManageColumnView = ({
|
|
|
141
189
|
/>
|
|
142
190
|
)}
|
|
143
191
|
disabled={!column.hideable}
|
|
144
|
-
label={column.header}
|
|
192
|
+
label={<Typography id={`dropdownListItemLabel-${index}`} style={textStyle}>{column.header}</Typography>}
|
|
193
|
+
id={`dropdownListItem-${index}-label`}
|
|
145
194
|
/>
|
|
146
195
|
</ListItem>
|
|
147
196
|
))}
|
|
@@ -149,6 +198,7 @@ const ManageColumnView = ({
|
|
|
149
198
|
<ListItem
|
|
150
199
|
width={1}
|
|
151
200
|
className="viewColumnListItem"
|
|
201
|
+
style={{ height: '20px' }}
|
|
152
202
|
>
|
|
153
203
|
<FormControlLabel
|
|
154
204
|
control={(
|
|
@@ -161,11 +211,12 @@ const ManageColumnView = ({
|
|
|
161
211
|
)}
|
|
162
212
|
onClick={() => handleSelectAll()}
|
|
163
213
|
checked={selectAll}
|
|
214
|
+
id="dropdownListItem-all"
|
|
164
215
|
checkedIcon={(
|
|
165
216
|
<CheckBoxIcon
|
|
166
217
|
style={{
|
|
167
218
|
fontSize: 18,
|
|
168
|
-
color: 'rgba(
|
|
219
|
+
color: 'rgba(109, 95, 91, 1)',
|
|
169
220
|
}}
|
|
170
221
|
className="checkBoxIcon"
|
|
171
222
|
/>
|
|
@@ -175,11 +226,16 @@ const ManageColumnView = ({
|
|
|
175
226
|
className="checkBox"
|
|
176
227
|
/>
|
|
177
228
|
)}
|
|
178
|
-
label={
|
|
229
|
+
label={(
|
|
230
|
+
<Typography id="dropdownListItem-all-label" style={textStyle}>
|
|
231
|
+
{selectAll ? 'Deselect All' : 'Select All'}
|
|
232
|
+
</Typography>
|
|
233
|
+
)}
|
|
234
|
+
id="dropdownListItem-all-label"
|
|
179
235
|
/>
|
|
180
236
|
</ListItem>
|
|
181
237
|
</List>
|
|
182
|
-
</
|
|
238
|
+
</div>
|
|
183
239
|
</div>
|
|
184
240
|
);
|
|
185
241
|
};
|