@bento-core/table 1.0.0-c3dc.31 → 1.0.0-c3dc.33
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/DefaultThemConfig.js +12 -3
- package/dist/ExtendedView.js +9 -8
- package/dist/TableView.js +28 -8
- package/dist/toolbar/DownloadButtonView.js +27 -17
- package/dist/toolbar/ManageColumnView.js +272 -40
- package/dist/toolbar/assets/Hidden_Column.svg +4 -0
- package/dist/toolbar/assets/Search_Icon.svg +3 -0
- package/dist/toolbar/assets/View_Columns.svg +6 -0
- package/package.json +1 -1
- package/src/DefaultThemConfig.js +12 -3
- package/src/ExtendedView.js +24 -20
- package/src/TableView.js +90 -64
- package/src/toolbar/DownloadButtonView.js +21 -17
- package/src/toolbar/ManageColumnView.js +287 -63
- package/src/toolbar/assets/Hidden_Column.svg +4 -0
- package/src/toolbar/assets/Search_Icon.svg +3 -0
- package/src/toolbar/assets/View_Columns.svg +6 -0
|
@@ -30,7 +30,13 @@ const defaultTheme = () => ({
|
|
|
30
30
|
MuiList: {
|
|
31
31
|
root: {
|
|
32
32
|
'&.viewColumnList': {
|
|
33
|
-
|
|
33
|
+
paddingLeft: '19.5px'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
padding: {
|
|
37
|
+
'&.viewColumnList': {
|
|
38
|
+
paddingTop: '0px',
|
|
39
|
+
paddingBottom: '0px'
|
|
34
40
|
}
|
|
35
41
|
}
|
|
36
42
|
},
|
|
@@ -58,8 +64,11 @@ const defaultTheme = () => ({
|
|
|
58
64
|
},
|
|
59
65
|
MuiSvgIcon: {
|
|
60
66
|
root: {
|
|
61
|
-
'&.
|
|
62
|
-
|
|
67
|
+
'&.checkBox': {
|
|
68
|
+
padding: '0px 5px 0px 0px',
|
|
69
|
+
position: 'absolute',
|
|
70
|
+
top: '0px',
|
|
71
|
+
left: '-10px'
|
|
63
72
|
}
|
|
64
73
|
}
|
|
65
74
|
}
|
package/dist/ExtendedView.js
CHANGED
|
@@ -19,15 +19,15 @@ 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 {
|
|
26
26
|
table,
|
|
27
27
|
onColumnViewChange,
|
|
28
|
+
onAllColumnViewChange,
|
|
28
29
|
onRowsPerPageChange,
|
|
29
30
|
onPageChange,
|
|
30
|
-
numSelected = 0,
|
|
31
31
|
customTheme,
|
|
32
32
|
queryVariables
|
|
33
33
|
} = _ref;
|
|
@@ -48,11 +48,7 @@ const ExtendedView = _ref => {
|
|
|
48
48
|
});
|
|
49
49
|
return /*#__PURE__*/_react.default.createElement(_core.ThemeProvider, {
|
|
50
50
|
theme: themeConfig
|
|
51
|
-
},
|
|
52
|
-
table: table,
|
|
53
|
-
manageViewColumns: manageViewColumns,
|
|
54
|
-
onColumnViewChange: onColumnViewChange
|
|
55
|
-
}), pagination && /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
}, pagination && /*#__PURE__*/_react.default.createElement("div", {
|
|
56
52
|
className: "downloadArea",
|
|
57
53
|
style: table.paginationCustomStyle && table.paginationCustomStyle.topPagination ? table.paginationCustomStyle.topPagination : downloadAreaStyle
|
|
58
54
|
}, table.showSearchBox && /*#__PURE__*/_react.default.createElement(table.SearchBox, null), /*#__PURE__*/_react.default.createElement(_CustomPagination.default, {
|
|
@@ -66,7 +62,12 @@ const ExtendedView = _ref => {
|
|
|
66
62
|
onRowsPerPageChange: onRowsPerPageChange,
|
|
67
63
|
queryVariables: queryVariables,
|
|
68
64
|
table: table
|
|
69
|
-
}),
|
|
65
|
+
}), manageViewColumns && /*#__PURE__*/_react.default.createElement(_ManageColumnView.default, {
|
|
66
|
+
table: table,
|
|
67
|
+
manageViewColumns: manageViewColumns,
|
|
68
|
+
onColumnViewChange: onColumnViewChange,
|
|
69
|
+
onAllColumnViewChange: onAllColumnViewChange
|
|
70
|
+
}), download && /*#__PURE__*/_react.default.createElement(_DownloadButtonView.default, {
|
|
70
71
|
count: table.totalRowCount || 0,
|
|
71
72
|
queryVariables: queryVariables,
|
|
72
73
|
table: table,
|
package/dist/TableView.js
CHANGED
|
@@ -11,8 +11,10 @@ var _CustomPagination = _interopRequireDefault(require("./pagination/CustomPagin
|
|
|
11
11
|
var _CustomTblBody = _interopRequireDefault(require("./body/CustomTblBody"));
|
|
12
12
|
var _CustomToolbar = _interopRequireDefault(require("./toolbar/CustomToolbar"));
|
|
13
13
|
var _DownloadButtonView = _interopRequireDefault(require("./toolbar/DownloadButtonView"));
|
|
14
|
+
var _ManageColumnView = _interopRequireDefault(require("./toolbar/ManageColumnView"));
|
|
14
15
|
var _DisplayErrMsg = _interopRequireDefault(require("./errMsg/DisplayErrMsg"));
|
|
15
16
|
var _ExtendedView = _interopRequireDefault(require("./ExtendedView"));
|
|
17
|
+
var _DefaultThemConfig = _interopRequireDefault(require("./DefaultThemConfig"));
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
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; }
|
|
18
20
|
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; }
|
|
@@ -36,7 +38,7 @@ const CustomTableContainer = props => {
|
|
|
36
38
|
const downloadAreaStyle = {
|
|
37
39
|
display: 'flex',
|
|
38
40
|
borderTop: '1px solid #8A7F7C',
|
|
39
|
-
paddingRight: '
|
|
41
|
+
paddingRight: '48px'
|
|
40
42
|
};
|
|
41
43
|
const cartDownloadAreaStyle = {
|
|
42
44
|
display: 'flex',
|
|
@@ -45,7 +47,7 @@ const cartDownloadAreaStyle = {
|
|
|
45
47
|
paddingRight: '40px'
|
|
46
48
|
};
|
|
47
49
|
const TableView = _ref => {
|
|
48
|
-
var _table$selectedRows
|
|
50
|
+
var _table$selectedRows;
|
|
49
51
|
let {
|
|
50
52
|
tableRows = [],
|
|
51
53
|
table,
|
|
@@ -56,19 +58,28 @@ const TableView = _ref => {
|
|
|
56
58
|
totalRowCount,
|
|
57
59
|
onSortByColumn,
|
|
58
60
|
onColumnViewChange,
|
|
61
|
+
onAllColumnViewChange,
|
|
59
62
|
themeConfig = {},
|
|
60
63
|
queryVariables
|
|
61
64
|
} = _ref;
|
|
65
|
+
const {
|
|
66
|
+
extendedViewConfig
|
|
67
|
+
} = table;
|
|
68
|
+
const {
|
|
69
|
+
manageViewColumns = false,
|
|
70
|
+
download = false,
|
|
71
|
+
downloadButtonConfig
|
|
72
|
+
} = extendedViewConfig;
|
|
62
73
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ExtendedView.default, {
|
|
63
74
|
table: table,
|
|
64
75
|
onColumnViewChange: onColumnViewChange,
|
|
76
|
+
onAllColumnViewChange: onAllColumnViewChange,
|
|
65
77
|
onRowsPerPageChange: onRowsPerPageChange,
|
|
66
78
|
onPageChange: onPageChange,
|
|
67
|
-
numSelected: (table === null || table === void 0 ? void 0 : (_table$selectedRows = table.selectedRows) === null || _table$selectedRows === void 0 ? void 0 : _table$selectedRows.length) || 0,
|
|
68
79
|
customTheme: themeConfig.extendedView,
|
|
69
80
|
queryVariables: queryVariables
|
|
70
81
|
}), /*#__PURE__*/_react.default.createElement(_CustomToolbar.default, {
|
|
71
|
-
numSelected: (table === null || table === void 0 ? void 0 : (_table$
|
|
82
|
+
numSelected: (table === null || table === void 0 ? void 0 : (_table$selectedRows = table.selectedRows) === null || _table$selectedRows === void 0 ? void 0 : _table$selectedRows.length) || 0,
|
|
72
83
|
table: table,
|
|
73
84
|
onColumnViewChange: onColumnViewChange,
|
|
74
85
|
customTheme: themeConfig.toolbar
|
|
@@ -89,7 +100,11 @@ const TableView = _ref => {
|
|
|
89
100
|
}))), tableRows.length === 0 && /*#__PURE__*/_react.default.createElement(_DisplayErrMsg.default, {
|
|
90
101
|
customTheme: themeConfig.displayErr,
|
|
91
102
|
table: table
|
|
92
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
103
|
+
}), /*#__PURE__*/_react.default.createElement(_core.ThemeProvider, {
|
|
104
|
+
theme: (0, _core.createTheme)({
|
|
105
|
+
overrides: _objectSpread(_objectSpread({}, (0, _DefaultThemConfig.default)()), themeConfig.extendedView)
|
|
106
|
+
})
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
93
108
|
className: "downloadArea",
|
|
94
109
|
style: table.paginationAPIField === 'filesInList' ? cartDownloadAreaStyle : table.paginationCustomStyle && table.paginationCustomStyle.bottomPagination ? table.paginationCustomStyle.bottomPagination : downloadAreaStyle
|
|
95
110
|
}, /*#__PURE__*/_react.default.createElement(_CustomPagination.default, {
|
|
@@ -101,12 +116,17 @@ const TableView = _ref => {
|
|
|
101
116
|
page: table.page || 0,
|
|
102
117
|
onPageChange: onPageChange,
|
|
103
118
|
onRowsPerPageChange: onRowsPerPageChange
|
|
104
|
-
}),
|
|
119
|
+
}), manageViewColumns && /*#__PURE__*/_react.default.createElement(_ManageColumnView.default, {
|
|
120
|
+
table: table,
|
|
121
|
+
manageViewColumns: manageViewColumns,
|
|
122
|
+
onColumnViewChange: onColumnViewChange,
|
|
123
|
+
onAllColumnViewChange: onAllColumnViewChange
|
|
124
|
+
}), download && /*#__PURE__*/_react.default.createElement(_DownloadButtonView.default, {
|
|
105
125
|
count: table.totalRowCount || 0,
|
|
106
126
|
queryVariables: queryVariables,
|
|
107
127
|
table: table,
|
|
108
|
-
buttonConfig:
|
|
109
|
-
})));
|
|
128
|
+
buttonConfig: downloadButtonConfig
|
|
129
|
+
}))));
|
|
110
130
|
};
|
|
111
131
|
var _default = TableView;
|
|
112
132
|
exports.default = _default;
|
|
@@ -36,7 +36,7 @@ const DownloadButton = _ref => {
|
|
|
36
36
|
const useOutsideAlerter = ref => {
|
|
37
37
|
(0, _react.useEffect)(() => {
|
|
38
38
|
function handleClickOutside(event) {
|
|
39
|
-
if (
|
|
39
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
40
40
|
setListDisplay('none');
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -44,7 +44,7 @@ const DownloadButton = _ref => {
|
|
|
44
44
|
return () => {
|
|
45
45
|
document.removeEventListener('mousedown', handleClickOutside);
|
|
46
46
|
};
|
|
47
|
-
}, [
|
|
47
|
+
}, []);
|
|
48
48
|
};
|
|
49
49
|
useOutsideAlerter(dropdownSelection);
|
|
50
50
|
if (table.paginationAPIField === 'filesInList') {
|
|
@@ -220,25 +220,24 @@ const DownloadButton = _ref => {
|
|
|
220
220
|
};
|
|
221
221
|
const useStyles = (0, _core.makeStyles)({
|
|
222
222
|
dropdown: {
|
|
223
|
-
width: '
|
|
224
|
-
height: '
|
|
225
|
-
marginTop: '8px',
|
|
223
|
+
width: '48px',
|
|
224
|
+
height: '36px',
|
|
226
225
|
paddingLeft: '5px',
|
|
227
|
-
border: '0.75px solid #606060',
|
|
226
|
+
border: listDisplay === 'none' ? '0.75px solid #606060' : '1.5px solid #5666BD',
|
|
228
227
|
borderRadius: '5px',
|
|
229
228
|
display: 'inline-block',
|
|
230
229
|
position: 'relative',
|
|
231
|
-
|
|
230
|
+
margin: '5px 0px'
|
|
232
231
|
},
|
|
233
232
|
dropdownList: {
|
|
234
233
|
display: 'block',
|
|
235
234
|
position: 'absolute',
|
|
236
235
|
width: '60px',
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
top: '38px',
|
|
237
|
+
left: '-13.5px',
|
|
239
238
|
overflow: 'auto',
|
|
240
|
-
zIndex: '
|
|
241
|
-
border: '1.5px solid #
|
|
239
|
+
zIndex: '11',
|
|
240
|
+
border: '1.5px solid #5666BD',
|
|
242
241
|
borderRadius: '5px',
|
|
243
242
|
background: '#ffffff'
|
|
244
243
|
},
|
|
@@ -249,37 +248,48 @@ const DownloadButton = _ref => {
|
|
|
249
248
|
fontWeight: 400,
|
|
250
249
|
lineHeight: '21px',
|
|
251
250
|
'&:hover': {
|
|
252
|
-
background: '#
|
|
251
|
+
background: '#C9CFF4',
|
|
253
252
|
cursor: 'pointer'
|
|
254
253
|
}
|
|
255
254
|
},
|
|
256
255
|
arrowdownIcon: {
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
fill: '#606060',
|
|
257
|
+
marginTop: '2px',
|
|
258
|
+
width: '20px',
|
|
259
|
+
height: '20px'
|
|
259
260
|
},
|
|
260
261
|
arrowdownIconDisabled: {
|
|
261
262
|
marginLeft: '5px',
|
|
262
263
|
fill: '#00000042'
|
|
264
|
+
},
|
|
265
|
+
tooltip: {
|
|
266
|
+
marginTop: '5px'
|
|
263
267
|
}
|
|
264
268
|
});
|
|
265
269
|
const classes = useStyles();
|
|
266
270
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
271
|
+
ref: dropdownSelection,
|
|
267
272
|
className: classes.dropdown,
|
|
268
273
|
style: isDownloading ? {
|
|
269
274
|
cursor: 'wait'
|
|
270
275
|
} : {}
|
|
271
276
|
}, /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
272
|
-
title: isDownloading ? 'Download in progress...' : table.downloadButtonTooltipText || 'Download filtered results'
|
|
277
|
+
title: isDownloading ? 'Download in progress...' : table.downloadButtonTooltipText || 'Download filtered results',
|
|
278
|
+
className: classes.tooltip
|
|
273
279
|
}, count !== 0 ? /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
274
280
|
onClick: handleClickButton,
|
|
275
281
|
style: {
|
|
276
|
-
padding: '0'
|
|
282
|
+
padding: '0',
|
|
283
|
+
backgroundColor: 'transparent'
|
|
277
284
|
},
|
|
278
285
|
disabled: isDownloading
|
|
279
286
|
}, /*#__PURE__*/_react.default.createElement(_icons.CloudDownload, null), /*#__PURE__*/_react.default.createElement(_KeyboardArrowDownOutlined.default, {
|
|
280
287
|
className: classes.arrowdownIcon
|
|
281
288
|
})) : /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
282
|
-
disabled: true
|
|
289
|
+
disabled: true,
|
|
290
|
+
style: {
|
|
291
|
+
backgroundColor: 'transparent'
|
|
292
|
+
}
|
|
283
293
|
}, /*#__PURE__*/_react.default.createElement(_icons.CloudDownload, null), /*#__PURE__*/_react.default.createElement(_KeyboardArrowDownOutlined.default, {
|
|
284
294
|
className: classes.arrowdownIconDisabled
|
|
285
295
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -7,77 +7,289 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _core = require("@material-ui/core");
|
|
9
9
|
var _icons = require("@material-ui/icons");
|
|
10
|
+
var _KeyboardArrowDownOutlined = _interopRequireDefault(require("@material-ui/icons/KeyboardArrowDownOutlined"));
|
|
10
11
|
var _Types = require("../util/Types");
|
|
12
|
+
var _View_Columns = _interopRequireDefault(require("./assets/View_Columns.svg"));
|
|
13
|
+
var _Hidden_Column = _interopRequireDefault(require("./assets/Hidden_Column.svg"));
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
15
|
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); }
|
|
12
16
|
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; }
|
|
17
|
+
// Height threshold to trigger scrolling behavior
|
|
18
|
+
const SCROLL_THRESHOLD_HEIGHT = 400;
|
|
19
|
+
// Maximum height of scrollable content area when scroll is needed
|
|
20
|
+
const SCROLLABLE_MAX_HEIGHT = '253px';
|
|
13
21
|
const ManageColumnView = _ref => {
|
|
14
22
|
let {
|
|
15
23
|
table,
|
|
16
24
|
onColumnViewChange,
|
|
17
|
-
|
|
25
|
+
onAllColumnViewChange,
|
|
26
|
+
manageViewColumns,
|
|
27
|
+
classes
|
|
18
28
|
} = _ref;
|
|
19
29
|
if (!manageViewColumns) {
|
|
20
30
|
return null;
|
|
21
31
|
}
|
|
22
|
-
const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
23
|
-
const handleClick = event => {
|
|
24
|
-
setAnchorEl(event.currentTarget);
|
|
25
|
-
};
|
|
26
|
-
const handleClose = () => setAnchorEl(null);
|
|
27
|
-
const open = Boolean(anchorEl);
|
|
28
32
|
const {
|
|
29
33
|
columns
|
|
30
34
|
} = table;
|
|
31
|
-
const
|
|
32
|
-
|
|
35
|
+
const [listDisplay, setListDisplay] = (0, _react.useState)('none');
|
|
36
|
+
const [selectAll, setSelectAll] = (0, _react.useState)(false);
|
|
37
|
+
const [needsScroll, setNeedsScroll] = (0, _react.useState)(false);
|
|
38
|
+
const viewColumns = columns.filter(col => col.role === _Types.cellTypes.DISPLAY && col.disableInManageView !== true);
|
|
39
|
+
const dropdownSelection = (0, _react.useRef)(null);
|
|
40
|
+
const formGroupRef = (0, _react.useRef)(null);
|
|
41
|
+
const handleClose = () => {
|
|
42
|
+
setListDisplay('none');
|
|
43
|
+
};
|
|
44
|
+
const handleClickButton = () => {
|
|
45
|
+
if (listDisplay === 'none') {
|
|
46
|
+
setListDisplay('block');
|
|
47
|
+
} else {
|
|
48
|
+
setListDisplay('none');
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const useOutsideAlerter = ref => {
|
|
52
|
+
(0, _react.useEffect)(() => {
|
|
53
|
+
function handleClickOutside(event) {
|
|
54
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
55
|
+
setListDisplay('none');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
59
|
+
return () => {
|
|
60
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
61
|
+
};
|
|
62
|
+
}, []);
|
|
63
|
+
};
|
|
64
|
+
useOutsideAlerter(dropdownSelection);
|
|
65
|
+
const handleSelectAll = () => {
|
|
66
|
+
setSelectAll(!selectAll);
|
|
67
|
+
onAllColumnViewChange(!selectAll);
|
|
68
|
+
};
|
|
69
|
+
(0, _react.useEffect)(() => {
|
|
70
|
+
if (formGroupRef.current && listDisplay === 'block') {
|
|
71
|
+
const contentHeight = formGroupRef.current.scrollHeight;
|
|
72
|
+
setNeedsScroll(contentHeight > SCROLL_THRESHOLD_HEIGHT);
|
|
73
|
+
}
|
|
74
|
+
}, [viewColumns, listDisplay]);
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
+
ref: dropdownSelection,
|
|
77
|
+
className: listDisplay === 'none' ? classes.columnDropdown : classes.columnDropdownActive
|
|
78
|
+
}, /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
79
|
+
title: "Columns may be hidden"
|
|
80
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
81
|
+
src: _Hidden_Column.default,
|
|
82
|
+
alt: "hiddenColumnsIcon",
|
|
83
|
+
className: classes.displayColumnIcon
|
|
84
|
+
})), /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
33
85
|
title: manageViewColumns.title
|
|
34
86
|
}, /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
35
87
|
variant: "contained",
|
|
36
|
-
onClick:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
88
|
+
onClick: handleClickButton,
|
|
89
|
+
className: classes.viewColumnsButton
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
91
|
+
src: _View_Columns.default,
|
|
92
|
+
alt: "viewColumnsIcon"
|
|
93
|
+
}), /*#__PURE__*/_react.default.createElement(_KeyboardArrowDownOutlined.default, {
|
|
94
|
+
className: classes.arrowDownIcon
|
|
95
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
+
className: listDisplay === 'none' ? classes.dropdownListHidden : classes.dropdownListVisible
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
98
|
+
className: classes.dropdownHeader
|
|
45
99
|
}, /*#__PURE__*/_react.default.createElement(_core.Typography, {
|
|
46
100
|
variant: "caption",
|
|
47
|
-
className:
|
|
101
|
+
className: classes.titleText
|
|
48
102
|
}, manageViewColumns.title), /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
49
103
|
onClick: handleClose,
|
|
50
|
-
className:
|
|
51
|
-
}, /*#__PURE__*/_react.default.createElement(_icons.Close, null)), /*#__PURE__*/_react.default.createElement(_core.List, {
|
|
52
|
-
className: "viewColumnList"
|
|
53
|
-
|
|
104
|
+
className: classes.closeIconButton
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.Close, null))), /*#__PURE__*/_react.default.createElement(_core.List, {
|
|
106
|
+
className: "viewColumnList",
|
|
107
|
+
id: "dropdownListItemTitle"
|
|
108
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
109
|
+
ref: formGroupRef,
|
|
110
|
+
className: classes.formGroup,
|
|
111
|
+
style: needsScroll ? {
|
|
112
|
+
maxHeight: SCROLLABLE_MAX_HEIGHT
|
|
113
|
+
} : {}
|
|
114
|
+
}, viewColumns.map((column, index) => /*#__PURE__*/_react.default.createElement(_core.ListItem, {
|
|
54
115
|
width: 1,
|
|
55
|
-
className: "viewColumnListItem"
|
|
56
|
-
|
|
57
|
-
|
|
116
|
+
className: "viewColumnListItem",
|
|
117
|
+
id: "dropdownListItem-".concat(index)
|
|
118
|
+
}, /*#__PURE__*/_react.default.createElement(_core.FormControlLabel, {
|
|
119
|
+
control: /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
120
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.CheckBoxOutlineBlank, {
|
|
121
|
+
style: {
|
|
122
|
+
fontSize: 18
|
|
123
|
+
},
|
|
124
|
+
className: "checkBoxIcon"
|
|
125
|
+
}),
|
|
126
|
+
onClick: () => onColumnViewChange(column),
|
|
127
|
+
checked: column.display,
|
|
128
|
+
id: "dropdownListItemCheckbox-".concat(index),
|
|
129
|
+
checkedIcon: /*#__PURE__*/_react.default.createElement(_icons.CheckBox, {
|
|
130
|
+
style: {
|
|
131
|
+
fontSize: 18,
|
|
132
|
+
color: column.hideable ? 'rgba(109, 95, 91, 1)' : 'rgba(109, 95, 91, 0.38)'
|
|
133
|
+
},
|
|
134
|
+
className: "checkBoxIcon"
|
|
135
|
+
}),
|
|
136
|
+
disableRipple: true,
|
|
137
|
+
color: "secondary",
|
|
138
|
+
className: "checkBox",
|
|
139
|
+
disabled: !column.hideable,
|
|
58
140
|
style: {
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
className: "checkBoxIcon"
|
|
141
|
+
paddingTop: 0
|
|
142
|
+
}
|
|
62
143
|
}),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
144
|
+
disabled: !column.hideable,
|
|
145
|
+
label: /*#__PURE__*/_react.default.createElement(_core.Typography, {
|
|
146
|
+
id: "dropdownListItemLabel-".concat(index),
|
|
147
|
+
className: classes.textStyle
|
|
148
|
+
}, column.header),
|
|
149
|
+
id: "dropdownListItem-".concat(index, "-label"),
|
|
150
|
+
className: classes.checkboxItemLabel
|
|
151
|
+
})))), /*#__PURE__*/_react.default.createElement(_core.Divider, {
|
|
152
|
+
className: classes.dividerStyle
|
|
153
|
+
}), /*#__PURE__*/_react.default.createElement(_core.ListItem, {
|
|
154
|
+
width: 1,
|
|
155
|
+
className: "viewColumnListItem"
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_core.FormControlLabel, {
|
|
157
|
+
control: /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
158
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.CheckBoxOutlineBlank, {
|
|
159
|
+
style: {
|
|
160
|
+
fontSize: 18
|
|
161
|
+
},
|
|
162
|
+
className: "checkBoxIcon"
|
|
163
|
+
}),
|
|
164
|
+
onClick: () => handleSelectAll(),
|
|
165
|
+
checked: selectAll,
|
|
166
|
+
id: "dropdownListItem-all",
|
|
167
|
+
checkedIcon: /*#__PURE__*/_react.default.createElement(_icons.CheckBox, {
|
|
168
|
+
style: {
|
|
169
|
+
fontSize: 18,
|
|
170
|
+
color: 'rgba(109, 95, 91, 1)'
|
|
171
|
+
},
|
|
172
|
+
className: "checkBoxIcon"
|
|
173
|
+
}),
|
|
174
|
+
disableRipple: true,
|
|
175
|
+
color: "secondary",
|
|
176
|
+
className: "checkBox",
|
|
66
177
|
style: {
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
className: "checkBoxIcon"
|
|
178
|
+
paddingTop: 0
|
|
179
|
+
}
|
|
70
180
|
}),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
181
|
+
label: /*#__PURE__*/_react.default.createElement(_core.Typography, {
|
|
182
|
+
id: "dropdownListItem-all-label",
|
|
183
|
+
className: classes.textStyle
|
|
184
|
+
}, selectAll ? 'Deselect All' : 'Select All'),
|
|
185
|
+
id: "dropdownListItem-all-label",
|
|
186
|
+
className: classes.checkboxItemLabel,
|
|
187
|
+
style: {
|
|
188
|
+
padding: '2px 0px'
|
|
189
|
+
}
|
|
190
|
+
})))));
|
|
75
191
|
};
|
|
76
192
|
const styles = () => ({
|
|
77
193
|
root: {
|
|
78
194
|
padding: '16px 24px 16px 24px',
|
|
79
195
|
fontFamily: 'Roboto'
|
|
80
196
|
},
|
|
197
|
+
displayColumnIcon: {
|
|
198
|
+
position: 'absolute',
|
|
199
|
+
right: '35px',
|
|
200
|
+
bottom: '23px'
|
|
201
|
+
},
|
|
202
|
+
columnDropdown: {
|
|
203
|
+
width: '48px',
|
|
204
|
+
height: '36px',
|
|
205
|
+
paddingLeft: '5px',
|
|
206
|
+
border: '0.5px solid #606060',
|
|
207
|
+
borderRadius: '5px',
|
|
208
|
+
display: 'inline-flex',
|
|
209
|
+
position: 'relative',
|
|
210
|
+
padding: '0px 0px 0px 5px',
|
|
211
|
+
margin: '5px 11px 5px 1px'
|
|
212
|
+
},
|
|
213
|
+
columnDropdownActive: {
|
|
214
|
+
width: '48px',
|
|
215
|
+
height: '36px',
|
|
216
|
+
border: '1.5px solid #5666BD',
|
|
217
|
+
borderRadius: '5px',
|
|
218
|
+
display: 'inline-flex',
|
|
219
|
+
position: 'relative',
|
|
220
|
+
padding: '0px 0px 0px 5px',
|
|
221
|
+
margin: '5px 10px 5px 0px'
|
|
222
|
+
},
|
|
223
|
+
viewColumnsButton: {
|
|
224
|
+
marginTop: '6px',
|
|
225
|
+
height: '24px',
|
|
226
|
+
backgroundColor: 'transparent'
|
|
227
|
+
},
|
|
228
|
+
arrowDownIcon: {
|
|
229
|
+
fill: '#606060',
|
|
230
|
+
width: '20px',
|
|
231
|
+
height: '20px'
|
|
232
|
+
},
|
|
233
|
+
dropdownListHidden: {
|
|
234
|
+
position: 'absolute',
|
|
235
|
+
width: '230px',
|
|
236
|
+
marginTop: '38px',
|
|
237
|
+
marginLeft: '-188px',
|
|
238
|
+
zIndex: '11',
|
|
239
|
+
border: '1.5px solid #5666BD',
|
|
240
|
+
borderRadius: '5px',
|
|
241
|
+
background: '#ffffff',
|
|
242
|
+
display: 'none'
|
|
243
|
+
},
|
|
244
|
+
dropdownListVisible: {
|
|
245
|
+
position: 'absolute',
|
|
246
|
+
width: '230px',
|
|
247
|
+
marginTop: '38px',
|
|
248
|
+
marginLeft: '-188px',
|
|
249
|
+
zIndex: '11',
|
|
250
|
+
border: '1.5px solid #5666BD',
|
|
251
|
+
borderRadius: '5px',
|
|
252
|
+
background: '#ffffff',
|
|
253
|
+
display: 'block',
|
|
254
|
+
maxHeight: '473px'
|
|
255
|
+
},
|
|
256
|
+
dropdownHeader: {
|
|
257
|
+
display: 'flex',
|
|
258
|
+
alignItems: 'center',
|
|
259
|
+
justifyContent: 'space-between',
|
|
260
|
+
padding: '16px 15px 0px 21px'
|
|
261
|
+
},
|
|
262
|
+
titleText: {
|
|
263
|
+
fontFamily: 'Poppins',
|
|
264
|
+
fontWeight: '400',
|
|
265
|
+
fontSize: '14px',
|
|
266
|
+
lineHeight: '100%',
|
|
267
|
+
color: '#000000'
|
|
268
|
+
},
|
|
269
|
+
closeIconButton: {
|
|
270
|
+
scale: '0.75',
|
|
271
|
+
bottom: '14.5px',
|
|
272
|
+
left: '12.5px'
|
|
273
|
+
},
|
|
274
|
+
checkboxItemLabel: {
|
|
275
|
+
marginLeft: '0px !important'
|
|
276
|
+
},
|
|
277
|
+
textStyle: {
|
|
278
|
+
fontFamily: 'Poppins',
|
|
279
|
+
fontSize: '14px',
|
|
280
|
+
fontWeight: '400',
|
|
281
|
+
marginBottom: '3px',
|
|
282
|
+
lineHeight: '15px'
|
|
283
|
+
},
|
|
284
|
+
dividerStyle: {
|
|
285
|
+
backgroundColor: '#375F9A',
|
|
286
|
+
marginTop: '5px',
|
|
287
|
+
marginBottom: '5px',
|
|
288
|
+
width: 'calc(100% + 20px)',
|
|
289
|
+
position: 'relative',
|
|
290
|
+
left: '-10px',
|
|
291
|
+
height: '0.5px'
|
|
292
|
+
},
|
|
81
293
|
title: {
|
|
82
294
|
marginRight: '24px',
|
|
83
295
|
fontSize: '14px',
|
|
@@ -86,7 +298,20 @@ const styles = () => ({
|
|
|
86
298
|
fontWeight: 500
|
|
87
299
|
},
|
|
88
300
|
formGroup: {
|
|
89
|
-
marginTop: '8px'
|
|
301
|
+
marginTop: '8px',
|
|
302
|
+
overflowY: 'auto',
|
|
303
|
+
overflowX: 'hidden',
|
|
304
|
+
'&::-webkit-scrollbar': {
|
|
305
|
+
width: '6px'
|
|
306
|
+
},
|
|
307
|
+
'&::-webkit-scrollbar-track': {
|
|
308
|
+
background: 'transparent',
|
|
309
|
+
borderRadius: '5px'
|
|
310
|
+
},
|
|
311
|
+
'&::-webkit-scrollbar-thumb': {
|
|
312
|
+
backgroundColor: '#707070',
|
|
313
|
+
borderRadius: '5px'
|
|
314
|
+
}
|
|
90
315
|
},
|
|
91
316
|
formControl: {},
|
|
92
317
|
checkbox: {
|
|
@@ -103,6 +328,13 @@ const styles = () => ({
|
|
|
103
328
|
label: {
|
|
104
329
|
fontSize: '15px',
|
|
105
330
|
marginLeft: '8px'
|
|
331
|
+
},
|
|
332
|
+
viewColumnListItem: {
|
|
333
|
+
height: '18px'
|
|
334
|
+
},
|
|
335
|
+
formControlLabel: {
|
|
336
|
+
marginLeft: '13px',
|
|
337
|
+
position: 'relative'
|
|
106
338
|
}
|
|
107
339
|
});
|
|
108
340
|
var _default = (0, _core.withStyles)(styles)(ManageColumnView);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="10" y="0.928786" width="12.2783" height="12.2783" rx="2.5" transform="rotate(45 10 0.928786)" fill="#FFEB13" stroke="black"/>
|
|
3
|
+
<path d="M9.99994 7.14529C9.74072 7.14529 9.52354 7.06575 9.3484 6.90667C9.18026 6.74068 9.09619 6.53664 9.09619 6.29457C9.09619 6.05249 9.18026 5.85192 9.3484 5.69284C9.52354 5.52684 9.74072 5.44385 9.99994 5.44385C10.2592 5.44385 10.4728 5.52684 10.641 5.69284C10.8161 5.85192 10.9037 6.05249 10.9037 6.29457C10.9037 6.53664 10.8161 6.74068 10.641 6.90667C10.4728 7.06575 10.2592 7.14529 9.99994 7.14529ZM10.725 7.83001V13.5776H9.25382V7.83001H10.725Z" fill="black"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M6.4134 1C3.43007 1 1 3.43007 1 6.4134C1 9.39672 3.43007 11.8268 6.4134 11.8268C7.71072 11.8268 8.90214 11.3661 9.83589 10.6014L13.0681 13.8336C13.118 13.8855 13.1777 13.927 13.2438 13.9556C13.3099 13.9841 13.3811 13.9992 13.4531 14C13.5251 14.0007 13.5966 13.9871 13.6632 13.9598C13.7299 13.9326 13.7905 13.8924 13.8414 13.8414C13.8924 13.7905 13.9326 13.7299 13.9598 13.6632C13.9871 13.5966 14.0007 13.5251 14 13.4531C13.9992 13.3811 13.9841 13.3099 13.9556 13.2438C13.927 13.1777 13.8855 13.118 13.8336 13.0681L10.6014 9.83589C11.3661 8.90214 11.8268 7.71072 11.8268 6.4134C11.8268 3.43007 9.39672 1 6.4134 1ZM6.4134 2.08268C8.8116 2.08268 10.7441 4.0152 10.7441 6.4134C10.7441 8.8116 8.8116 10.7441 6.4134 10.7441C4.0152 10.7441 2.08268 8.8116 2.08268 6.4134C2.08268 4.0152 4.0152 2.08268 6.4134 2.08268Z" fill="#4D889E" stroke="#4D889E"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="20" height="18" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M2.88892 1.40607H17.1116C17.6636 1.40633 18.1116 1.85394 18.1116 2.40607V15.5936C18.1116 16.1457 17.6636 16.5933 17.1116 16.5936H2.88892C2.33663 16.5936 1.88892 16.1459 1.88892 15.5936V2.40607C1.88892 1.85378 2.33663 1.40607 2.88892 1.40607Z" fill="white" stroke="#606060" stroke-width="2"/>
|
|
3
|
+
<line x1="1.79956" y1="6.08969" x2="19.1106" y2="6.08969" stroke="#606060" stroke-width="2"/>
|
|
4
|
+
<line x1="13.2661" y1="7.09055" x2="13.2661" y2="17.5941" stroke="#606060" stroke-width="2"/>
|
|
5
|
+
<line x1="7.6936" y1="7.0903" x2="7.6936" y2="17.5939" stroke="#606060" stroke-width="2"/>
|
|
6
|
+
</svg>
|
package/package.json
CHANGED