@bento-core/table 0.2.0 → 0.3.0
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 +1 -1
- package/dist/body/ActionBodyCell.js +1 -1
- package/dist/body/DefaultThemConfig.js +1 -1
- package/dist/header/ActionHeaderCell.js +0 -1
- package/dist/header/CustomCell.js +23 -5
- package/dist/header/CustomTblHeader.js +0 -2
- package/dist/header/DefaultThemConfig.js +1 -2
- package/dist/header/components/DeleteCellView.js +1 -0
- package/dist/toolbar/ManageColumnView.js +0 -1
- package/dist/util/Dataformat.js +1 -0
- package/dist/util/Types.js +10 -10
- package/package.json +8 -7
- package/src/ExtendedView.js +28 -28
- package/src/body/ActionBodyCell.js +3 -3
- package/src/body/CustomTblBody.js +2 -0
- package/src/body/DefaultThemConfig.js +1 -1
- package/src/body/DisplayBodyCell.js +0 -1
- package/src/body/components/DataFormatView.js +2 -2
- package/src/header/ActionHeaderCell.js +3 -4
- package/src/header/CustomCell.js +23 -5
- package/src/header/CustomTblHeader.js +3 -4
- package/src/header/DefaultThemConfig.js +0 -1
- package/src/header/components/DeleteCellView.js +1 -0
- package/src/toolbar/DownloadButtonView.js +6 -9
- package/src/toolbar/ManageColumnView.js +2 -3
- package/src/util/Dataformat.js +1 -1
- package/src/util/Types.js +11 -11
package/dist/ExtendedView.js
CHANGED
|
@@ -50,7 +50,7 @@ const ExtendedView = _ref => {
|
|
|
50
50
|
manageViewColumns: manageViewColumns,
|
|
51
51
|
onColumnViewChange: onColumnViewChange
|
|
52
52
|
})), pagination && /*#__PURE__*/_react.default.createElement(_CustomPagination.default, {
|
|
53
|
-
customTheme:
|
|
53
|
+
customTheme: customTheme.tblTopPgn,
|
|
54
54
|
rowsPerPageOptions: [10, 25, 50, 100],
|
|
55
55
|
component: "div",
|
|
56
56
|
count: table.totalRowCount || 0,
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _core = require("@material-ui/core");
|
|
8
9
|
var _CheckBoxView = _interopRequireDefault(require("./components/CheckBoxView"));
|
|
9
10
|
var _DeleteCellView = _interopRequireDefault(require("./components/DeleteCellView"));
|
|
10
|
-
var _core = require("@material-ui/core");
|
|
11
11
|
var _Types = require("../util/Types");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
const ActionCell = _ref => {
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _core = require("@material-ui/core");
|
|
9
8
|
var _Types = require("../util/Types");
|
|
10
9
|
var _CheckBoxView = _interopRequireDefault(require("./components/CheckBoxView"));
|
|
11
10
|
var _DeleteCellView = _interopRequireDefault(require("./components/DeleteCellView"));
|
|
@@ -4,12 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _TableCell = _interopRequireDefault(require("@material-ui/core/TableCell"));
|
|
9
9
|
var _TableSortLabel = _interopRequireDefault(require("@material-ui/core/TableSortLabel"));
|
|
10
10
|
var _Tooltip = _interopRequireDefault(require("@material-ui/core/Tooltip"));
|
|
11
11
|
var _Types = require("../util/Types");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
13
15
|
/**
|
|
14
16
|
*
|
|
15
17
|
* @returns default/Link/Custom view
|
|
@@ -29,14 +31,30 @@ const CustomHeaderCell = _ref => {
|
|
|
29
31
|
headerType,
|
|
30
32
|
customColHeaderRender
|
|
31
33
|
} = column;
|
|
32
|
-
const Tooltip =
|
|
34
|
+
const Tooltip = (0, _react.useCallback)(_ref2 => {
|
|
35
|
+
let {
|
|
36
|
+
children
|
|
37
|
+
} = _ref2;
|
|
38
|
+
// return custom tooltips
|
|
39
|
+
if (components.Tooltip) {
|
|
40
|
+
const CustomToolTip = components.Tooltip;
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(CustomToolTip, null, children);
|
|
42
|
+
}
|
|
43
|
+
// return default tooltip
|
|
44
|
+
if (tooltipText) {
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
46
|
+
id: "header-tooltip",
|
|
47
|
+
title: tooltipText
|
|
48
|
+
}, children);
|
|
49
|
+
}
|
|
50
|
+
// return default view
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
|
|
52
|
+
}, []);
|
|
33
53
|
return /*#__PURE__*/_react.default.createElement(_TableCell.default, {
|
|
34
54
|
scope: "col",
|
|
35
55
|
active: sortBy === dataField,
|
|
36
56
|
direction: sortOrder
|
|
37
|
-
}, /*#__PURE__*/_react.default.createElement(Tooltip, {
|
|
38
|
-
title: tooltipText
|
|
39
|
-
}, /*#__PURE__*/_react.default.createElement(_TableSortLabel.default, {
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement(Tooltip, null, /*#__PURE__*/_react.default.createElement(_TableSortLabel.default, {
|
|
40
58
|
active: sortBy === dataField,
|
|
41
59
|
hideSortIcon: sortBy !== dataField,
|
|
42
60
|
direction: sortBy === dataField ? sortOrder : 'asc',
|
|
@@ -10,8 +10,6 @@ var _core = require("@material-ui/core");
|
|
|
10
10
|
var _CustomCell = _interopRequireDefault(require("./CustomCell"));
|
|
11
11
|
var _DefaultThemConfig = _interopRequireDefault(require("./DefaultThemConfig"));
|
|
12
12
|
var _Types = require("../util/Types");
|
|
13
|
-
var _CheckBoxView = _interopRequireDefault(require("./components/CheckBoxView"));
|
|
14
|
-
var _DeleteCellView = _interopRequireDefault(require("./components/DeleteCellView"));
|
|
15
13
|
var _ActionHeaderCell = _interopRequireDefault(require("./ActionHeaderCell"));
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
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; }
|
|
@@ -27,6 +27,7 @@ const DeleteCellView = _ref => {
|
|
|
27
27
|
}, /*#__PURE__*/_react.default.createElement(_core.Typography, {
|
|
28
28
|
className: "del_all_row_text"
|
|
29
29
|
}, "Remove"), /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
30
|
+
id: "del_all_row_tooltip",
|
|
30
31
|
className: "del_all_row_tooltip",
|
|
31
32
|
title: TooltipContent(),
|
|
32
33
|
renderComponent: TooltipContent()
|
|
@@ -12,7 +12,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
12
12
|
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; }
|
|
13
13
|
const ManageColumnView = _ref => {
|
|
14
14
|
let {
|
|
15
|
-
classes,
|
|
16
15
|
table,
|
|
17
16
|
onColumnViewChange,
|
|
18
17
|
manageViewColumns
|
package/dist/util/Dataformat.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.formatBytes = formatBytes;
|
|
7
|
+
/* eslint-disable import/prefer-default-export */
|
|
7
8
|
function formatBytes(bytes) {
|
|
8
9
|
let decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
9
10
|
if (bytes === 0) return '0 Bytes';
|
package/dist/util/Types.js
CHANGED
|
@@ -21,13 +21,13 @@ exports.FORMAT_DATA = FORMAT_DATA;
|
|
|
21
21
|
const FORMAT_BYTES = 'FORMAT_BYTES';
|
|
22
22
|
exports.FORMAT_BYTES = FORMAT_BYTES;
|
|
23
23
|
const cellTypes = {
|
|
24
|
-
CUSTOM_ELEM
|
|
25
|
-
LINK
|
|
26
|
-
DISPLAY
|
|
27
|
-
CHECKBOX
|
|
28
|
-
DELETE
|
|
29
|
-
DEFAULT
|
|
30
|
-
FORMAT_DATA
|
|
24
|
+
CUSTOM_ELEM,
|
|
25
|
+
LINK,
|
|
26
|
+
DISPLAY,
|
|
27
|
+
CHECKBOX,
|
|
28
|
+
DELETE,
|
|
29
|
+
DEFAULT,
|
|
30
|
+
FORMAT_DATA
|
|
31
31
|
};
|
|
32
32
|
exports.cellTypes = cellTypes;
|
|
33
33
|
const actionCellTypes = [CHECKBOX, DELETE];
|
|
@@ -39,9 +39,9 @@ const dataFormatTypes = {
|
|
|
39
39
|
};
|
|
40
40
|
exports.dataFormatTypes = dataFormatTypes;
|
|
41
41
|
const headerTypes = {
|
|
42
|
-
CUSTOM_ELEM
|
|
43
|
-
DELETE
|
|
44
|
-
DEFAULT
|
|
42
|
+
CUSTOM_ELEM,
|
|
43
|
+
DELETE,
|
|
44
|
+
DEFAULT
|
|
45
45
|
};
|
|
46
46
|
exports.headerTypes = headerTypes;
|
|
47
47
|
const ComponentTypes = {
|
package/package.json
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bento-core/table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "rm -rf dist && NODE_ENV=production BABEL_ENV=es babel src --out-dir dist --copy-files",
|
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
+
"build": "npm run lint && rm -rf dist && NODE_ENV=production BABEL_ENV=es babel src --out-dir dist --copy-files",
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
+
"lint": "eslint src"
|
|
9
10
|
},
|
|
10
11
|
"repository": "https://github.com/CBIIT/bento-frontend",
|
|
11
12
|
"publishConfig": {
|
|
12
13
|
"access": "public"
|
|
13
14
|
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"@material-ui/core": "^4.12.4"
|
|
16
|
-
},
|
|
17
15
|
"peerDependencies": {
|
|
16
|
+
"@material-ui/core": "^4.12.4",
|
|
17
|
+
"@material-ui/icons": "^4.9.1",
|
|
18
|
+
"prop-types": "^15.7.2",
|
|
18
19
|
"react": "^17.0.2",
|
|
19
20
|
"react-dom": "^17.0.0",
|
|
20
21
|
"react-redux": "^7.2.1"
|
|
21
22
|
},
|
|
22
23
|
"author": "CTOS Bento Team",
|
|
23
24
|
"license": "ISC",
|
|
24
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "9b75062e5092b403db02b167870ea4331361c26f"
|
|
25
26
|
}
|
package/src/ExtendedView.js
CHANGED
|
@@ -17,35 +17,35 @@ const ExtendedView = ({
|
|
|
17
17
|
numSelected = 0,
|
|
18
18
|
customTheme,
|
|
19
19
|
}) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
const { extendedViewConfig } = table;
|
|
21
|
+
if (!extendedViewConfig) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
const {
|
|
25
|
+
download = false,
|
|
26
|
+
manageViewColumns = false,
|
|
27
|
+
pagination = false,
|
|
28
|
+
} = extendedViewConfig;
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
const themeConfig = createTheme({ overrides: { ...defaultTheme(), ...customTheme } });
|
|
31
|
+
return (
|
|
32
|
+
<ThemeProvider theme={themeConfig}>
|
|
33
|
+
{(numSelected === 0 && (download || manageViewColumns)) && (
|
|
34
|
+
<Toolbar className="downloadColumnView">
|
|
35
|
+
<DownloadButton
|
|
36
|
+
download={download}
|
|
37
|
+
/>
|
|
38
|
+
<ManageColumnView
|
|
39
|
+
table={table}
|
|
40
|
+
manageViewColumns={manageViewColumns}
|
|
41
|
+
onColumnViewChange={onColumnViewChange}
|
|
42
|
+
/>
|
|
43
|
+
</Toolbar>
|
|
44
|
+
)}
|
|
45
|
+
{
|
|
46
46
|
(pagination) && (
|
|
47
47
|
<CustomPagination
|
|
48
|
-
customTheme={
|
|
48
|
+
customTheme={customTheme.tblTopPgn}
|
|
49
49
|
rowsPerPageOptions={[10, 25, 50, 100]}
|
|
50
50
|
component="div"
|
|
51
51
|
count={table.totalRowCount || 0}
|
|
@@ -56,8 +56,8 @@ const ExtendedView = ({
|
|
|
56
56
|
/>
|
|
57
57
|
)
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
</ThemeProvider>
|
|
60
|
+
);
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
export default ExtendedView;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Typography } from '@material-ui/core';
|
|
2
3
|
import CheckboxView from './components/CheckBoxView';
|
|
3
4
|
import DeleteCellView from './components/DeleteCellView';
|
|
4
|
-
import { Typography } from '@material-ui/core';
|
|
5
5
|
import { cellTypes } from '../util/Types';
|
|
6
6
|
|
|
7
7
|
const ActionCell = ({
|
|
@@ -17,7 +17,7 @@ const ActionCell = ({
|
|
|
17
17
|
row={row}
|
|
18
18
|
onRowSelectChange={onRowSelectChange}
|
|
19
19
|
/>
|
|
20
|
-
)
|
|
20
|
+
);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
if (cellTypes.DELETE === cellType) {
|
|
@@ -34,6 +34,6 @@ const ActionCell = ({
|
|
|
34
34
|
{row[column.dataField]}
|
|
35
35
|
</Typography>
|
|
36
36
|
);
|
|
37
|
-
}
|
|
37
|
+
};
|
|
38
38
|
|
|
39
39
|
export default ActionCell;
|
|
@@ -12,8 +12,8 @@ const CellView = ({
|
|
|
12
12
|
row,
|
|
13
13
|
}) => {
|
|
14
14
|
const { dataFormatType } = column;
|
|
15
|
-
const value = row[column?.dataField]
|
|
16
|
-
switch(dataFormatType) {
|
|
15
|
+
const value = row[column?.dataField];
|
|
16
|
+
switch (dataFormatType) {
|
|
17
17
|
case dataFormatTypes.FORMAT_BYTES:
|
|
18
18
|
return (
|
|
19
19
|
<Typography>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Typography } from '@material-ui/core';
|
|
3
2
|
import { cellTypes } from '../util/Types';
|
|
4
3
|
import CheckboxView from './components/CheckBoxView';
|
|
5
4
|
import DeleteCellView from './components/DeleteCellView';
|
|
@@ -21,7 +20,7 @@ const ActionHeaderCell = ({
|
|
|
21
20
|
toggleSelectAll={toggleSelectAll}
|
|
22
21
|
Ids={Ids}
|
|
23
22
|
/>
|
|
24
|
-
)
|
|
23
|
+
);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
if (cellTypes.DELETE === cellType) {
|
|
@@ -33,10 +32,10 @@ const ActionHeaderCell = ({
|
|
|
33
32
|
/>
|
|
34
33
|
);
|
|
35
34
|
}
|
|
36
|
-
|
|
35
|
+
|
|
37
36
|
return (
|
|
38
37
|
<></>
|
|
39
38
|
);
|
|
40
|
-
}
|
|
39
|
+
};
|
|
41
40
|
|
|
42
41
|
export default ActionHeaderCell;
|
package/src/header/CustomCell.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
2
|
import TableCell from '@material-ui/core/TableCell';
|
|
3
3
|
import TableSortLabel from '@material-ui/core/TableSortLabel';
|
|
4
4
|
import MuiTooltip from '@material-ui/core/Tooltip';
|
|
@@ -23,7 +23,27 @@ const CustomHeaderCell = ({
|
|
|
23
23
|
customColHeaderRender,
|
|
24
24
|
} = column;
|
|
25
25
|
|
|
26
|
-
const Tooltip =
|
|
26
|
+
const Tooltip = useCallback(({ children }) => {
|
|
27
|
+
// return custom tooltips
|
|
28
|
+
if (components.Tooltip) {
|
|
29
|
+
const CustomToolTip = components.Tooltip;
|
|
30
|
+
return (
|
|
31
|
+
<CustomToolTip>
|
|
32
|
+
{children}
|
|
33
|
+
</CustomToolTip>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
// return default tooltip
|
|
37
|
+
if (tooltipText) {
|
|
38
|
+
return (
|
|
39
|
+
<MuiTooltip id="header-tooltip" title={tooltipText}>
|
|
40
|
+
{children}
|
|
41
|
+
</MuiTooltip>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
// return default view
|
|
45
|
+
return <>{children}</>;
|
|
46
|
+
}, []);
|
|
27
47
|
|
|
28
48
|
return (
|
|
29
49
|
<TableCell
|
|
@@ -31,9 +51,7 @@ const CustomHeaderCell = ({
|
|
|
31
51
|
active={sortBy === dataField}
|
|
32
52
|
direction={sortOrder}
|
|
33
53
|
>
|
|
34
|
-
<Tooltip
|
|
35
|
-
title={tooltipText}
|
|
36
|
-
>
|
|
54
|
+
<Tooltip>
|
|
37
55
|
<TableSortLabel
|
|
38
56
|
active={sortBy === dataField}
|
|
39
57
|
hideSortIcon={sortBy !== dataField}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable react/forbid-prop-types */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import {
|
|
@@ -9,9 +10,7 @@ import {
|
|
|
9
10
|
import HeaderCell from './CustomCell';
|
|
10
11
|
// import { getClsName, tableCls } from '../util/ClassNames';
|
|
11
12
|
import defaultTheme from './DefaultThemConfig';
|
|
12
|
-
import { actionCellTypes
|
|
13
|
-
import CheckboxView from './components/CheckBoxView';
|
|
14
|
-
import DeleteCellView from './components/DeleteCellView';
|
|
13
|
+
import { actionCellTypes } from '../util/Types';
|
|
15
14
|
import ActionHeaderCell from './ActionHeaderCell';
|
|
16
15
|
|
|
17
16
|
const CustomTableHeader = ({
|
|
@@ -57,7 +56,7 @@ const CustomTableHeader = ({
|
|
|
57
56
|
count={count}
|
|
58
57
|
column={column}
|
|
59
58
|
/>
|
|
60
|
-
)
|
|
59
|
+
);
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
return (
|
|
@@ -3,27 +3,24 @@ import {
|
|
|
3
3
|
IconButton,
|
|
4
4
|
Tooltip,
|
|
5
5
|
} from '@material-ui/core';
|
|
6
|
-
import {
|
|
7
|
-
CloudDownload,
|
|
8
|
-
} from '@material-ui/icons';
|
|
6
|
+
import { CloudDownload } from '@material-ui/icons';
|
|
9
7
|
|
|
10
8
|
const DownloadButton = ({
|
|
11
|
-
download
|
|
9
|
+
download,
|
|
12
10
|
}) => {
|
|
13
11
|
if (!download) {
|
|
14
12
|
return null;
|
|
15
13
|
}
|
|
16
|
-
|
|
14
|
+
|
|
17
15
|
return (
|
|
18
16
|
<>
|
|
19
17
|
<Tooltip title={download.downloadCsv}>
|
|
20
|
-
<IconButton
|
|
21
|
-
>
|
|
18
|
+
<IconButton>
|
|
22
19
|
<CloudDownload />
|
|
23
20
|
</IconButton>
|
|
24
21
|
</Tooltip>
|
|
25
22
|
</>
|
|
26
|
-
)
|
|
27
|
-
}
|
|
23
|
+
);
|
|
24
|
+
};
|
|
28
25
|
|
|
29
26
|
export default DownloadButton;
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
import { cellTypes } from '../util/Types';
|
|
19
19
|
|
|
20
20
|
const ManageColumnView = ({
|
|
21
|
-
classes,
|
|
22
21
|
table,
|
|
23
22
|
onColumnViewChange,
|
|
24
23
|
manageViewColumns,
|
|
@@ -69,12 +68,12 @@ const ManageColumnView = ({
|
|
|
69
68
|
className="viewColumnListItem"
|
|
70
69
|
>
|
|
71
70
|
<Checkbox
|
|
72
|
-
icon={
|
|
71
|
+
icon={(
|
|
73
72
|
<CheckBoxBlankIcon
|
|
74
73
|
style={{ fontSize: 18 }}
|
|
75
74
|
className="checkBoxIcon"
|
|
76
75
|
/>
|
|
77
|
-
}
|
|
76
|
+
)}
|
|
78
77
|
onClick={() => onColumnViewChange(column)}
|
|
79
78
|
checked={column.display}
|
|
80
79
|
checkedIcon={(
|
package/src/util/Dataformat.js
CHANGED
package/src/util/Types.js
CHANGED
|
@@ -8,13 +8,13 @@ export const FORMAT_DATA = 'FORMAT_DATA';
|
|
|
8
8
|
export const FORMAT_BYTES = 'FORMAT_BYTES';
|
|
9
9
|
|
|
10
10
|
export const cellTypes = {
|
|
11
|
-
CUSTOM_ELEM
|
|
12
|
-
LINK
|
|
13
|
-
DISPLAY
|
|
14
|
-
CHECKBOX
|
|
15
|
-
DELETE
|
|
16
|
-
DEFAULT
|
|
17
|
-
FORMAT_DATA
|
|
11
|
+
CUSTOM_ELEM,
|
|
12
|
+
LINK,
|
|
13
|
+
DISPLAY,
|
|
14
|
+
CHECKBOX,
|
|
15
|
+
DELETE,
|
|
16
|
+
DEFAULT,
|
|
17
|
+
FORMAT_DATA,
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export const actionCellTypes = [CHECKBOX, DELETE];
|
|
@@ -23,12 +23,12 @@ export const FORMAT_DATA_CELLS = [FORMAT_BYTES];
|
|
|
23
23
|
|
|
24
24
|
export const dataFormatTypes = {
|
|
25
25
|
FORMAT_BYTES: 'FORMAT_BYTES',
|
|
26
|
-
}
|
|
26
|
+
};
|
|
27
27
|
|
|
28
28
|
export const headerTypes = {
|
|
29
|
-
CUSTOM_ELEM
|
|
30
|
-
DELETE
|
|
31
|
-
DEFAULT
|
|
29
|
+
CUSTOM_ELEM,
|
|
30
|
+
DELETE,
|
|
31
|
+
DEFAULT,
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export const ComponentTypes = {
|