@bento-core/table 1.0.1-icdc.7 → 1.0.1-icdc.9
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/body/components/CheckBoxView.js +4 -1
- package/dist/body/components/DeleteCellView.js +1 -0
- package/dist/header/components/CheckBoxView.js +17 -1
- package/dist/pagination/CustomPagination.js +6 -0
- package/package.json +1 -1
- package/src/body/components/CheckBoxView.js +3 -0
- package/src/body/components/DeleteCellView.js +1 -0
- package/src/header/components/CheckBoxView.js +32 -14
- package/src/pagination/CustomPagination.js +6 -0
|
@@ -17,7 +17,10 @@ const CheckboxView = _ref => {
|
|
|
17
17
|
}, /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
18
18
|
disableRipple: true,
|
|
19
19
|
onClick: event => onRowSelectChange(event, row),
|
|
20
|
-
checked: row.isChecked
|
|
20
|
+
checked: row.isChecked,
|
|
21
|
+
inputProps: {
|
|
22
|
+
'aria-label': 'checkbox'
|
|
23
|
+
}
|
|
21
24
|
}));
|
|
22
25
|
};
|
|
23
26
|
var _default = CheckboxView;
|
|
@@ -19,6 +19,7 @@ const DeleteCellView = _ref => {
|
|
|
19
19
|
}, /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
20
20
|
disableRipple: true,
|
|
21
21
|
className: "del_row_btn",
|
|
22
|
+
"aria-label": "delete",
|
|
22
23
|
onClick: () => column.cellEventHandler(row)
|
|
23
24
|
}, /*#__PURE__*/_react.default.createElement(_icons.DeleteOutline, {
|
|
24
25
|
className: "del_row_btn_icon",
|
|
@@ -7,19 +7,35 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _core = require("@material-ui/core");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
const useStyles = (0, _core.makeStyles)({
|
|
11
|
+
label: {
|
|
12
|
+
opacity: '0'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
10
15
|
const CheckboxView = _ref => {
|
|
11
16
|
let {
|
|
12
17
|
includeSelectedIds,
|
|
13
18
|
toggleSelectAll,
|
|
14
19
|
Ids
|
|
15
20
|
} = _ref;
|
|
21
|
+
const {
|
|
22
|
+
label
|
|
23
|
+
} = useStyles();
|
|
16
24
|
return /*#__PURE__*/_react.default.createElement(_core.TableCell, {
|
|
17
|
-
padding: "checkbox"
|
|
25
|
+
padding: "checkbox",
|
|
26
|
+
component: "td"
|
|
18
27
|
}, /*#__PURE__*/_react.default.createElement(_core.FormControlLabel, {
|
|
28
|
+
label: "checkbox",
|
|
29
|
+
classes: {
|
|
30
|
+
label
|
|
31
|
+
},
|
|
19
32
|
control: /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
20
33
|
color: "primary",
|
|
21
34
|
indeterminate: includeSelectedIds,
|
|
22
35
|
checked: includeSelectedIds,
|
|
36
|
+
inputProps: {
|
|
37
|
+
'aria-label': 'checkbox'
|
|
38
|
+
},
|
|
23
39
|
onChange: event => toggleSelectAll(event, Ids, includeSelectedIds)
|
|
24
40
|
})
|
|
25
41
|
}));
|
|
@@ -55,6 +55,12 @@ const CustomPagination = _ref => {
|
|
|
55
55
|
}, /*#__PURE__*/_react.default.createElement(_core.TablePagination, {
|
|
56
56
|
rowsPerPageOptions: rowsPerPageOptions,
|
|
57
57
|
component: "div",
|
|
58
|
+
SelectProps: {
|
|
59
|
+
inputProps: {
|
|
60
|
+
title: 'checkbox',
|
|
61
|
+
'aria-label': 'checkbox'
|
|
62
|
+
}
|
|
63
|
+
},
|
|
58
64
|
count: count,
|
|
59
65
|
rowsPerPage: rowsPerPage,
|
|
60
66
|
page: page,
|
package/package.json
CHANGED
|
@@ -3,25 +3,43 @@ import {
|
|
|
3
3
|
TableCell,
|
|
4
4
|
Checkbox,
|
|
5
5
|
FormControlLabel,
|
|
6
|
+
makeStyles,
|
|
6
7
|
} from '@material-ui/core';
|
|
7
8
|
|
|
9
|
+
const useStyles = makeStyles({
|
|
10
|
+
label: {
|
|
11
|
+
opacity: '0',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
|
|
8
15
|
const CheckboxView = ({
|
|
9
16
|
includeSelectedIds,
|
|
10
17
|
toggleSelectAll,
|
|
11
18
|
Ids,
|
|
12
|
-
}) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
}) => {
|
|
20
|
+
const { label } = useStyles();
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<TableCell padding="checkbox" component="td">
|
|
24
|
+
<FormControlLabel
|
|
25
|
+
label="checkbox"
|
|
26
|
+
classes={{
|
|
27
|
+
label,
|
|
28
|
+
}}
|
|
29
|
+
control={(
|
|
30
|
+
<Checkbox
|
|
31
|
+
color="primary"
|
|
32
|
+
indeterminate={includeSelectedIds}
|
|
33
|
+
checked={includeSelectedIds}
|
|
34
|
+
inputProps={{
|
|
35
|
+
'aria-label': 'checkbox',
|
|
36
|
+
}}
|
|
37
|
+
onChange={(event) => toggleSelectAll(event, Ids, includeSelectedIds)}
|
|
38
|
+
/>
|
|
39
|
+
)}
|
|
40
|
+
/>
|
|
41
|
+
</TableCell>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
26
44
|
|
|
27
45
|
export default CheckboxView;
|
|
@@ -45,6 +45,12 @@ const CustomPagination = ({
|
|
|
45
45
|
<TablePagination
|
|
46
46
|
rowsPerPageOptions={rowsPerPageOptions}
|
|
47
47
|
component="div"
|
|
48
|
+
SelectProps={{
|
|
49
|
+
inputProps: {
|
|
50
|
+
title: 'checkbox',
|
|
51
|
+
'aria-label': 'checkbox',
|
|
52
|
+
},
|
|
53
|
+
}}
|
|
48
54
|
count={count}
|
|
49
55
|
rowsPerPage={rowsPerPage}
|
|
50
56
|
page={page}
|