@bento-core/table 1.0.0-c3dc.19 → 1.0.0-c3dc.20
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/TableView.js
CHANGED
|
@@ -10,6 +10,7 @@ var _CustomTblHeader = _interopRequireDefault(require("./header/CustomTblHeader"
|
|
|
10
10
|
var _CustomPagination = _interopRequireDefault(require("./pagination/CustomPagination"));
|
|
11
11
|
var _CustomTblBody = _interopRequireDefault(require("./body/CustomTblBody"));
|
|
12
12
|
var _CustomToolbar = _interopRequireDefault(require("./toolbar/CustomToolbar"));
|
|
13
|
+
var _DownloadButtonView = _interopRequireDefault(require("./toolbar/DownloadButtonView"));
|
|
13
14
|
var _DisplayErrMsg = _interopRequireDefault(require("./errMsg/DisplayErrMsg"));
|
|
14
15
|
var _ExtendedView = _interopRequireDefault(require("./ExtendedView"));
|
|
15
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -100,6 +101,11 @@ const TableView = _ref => {
|
|
|
100
101
|
page: table.page || 0,
|
|
101
102
|
onPageChange: onPageChange,
|
|
102
103
|
onRowsPerPageChange: onRowsPerPageChange
|
|
104
|
+
}), table.showDownloadIcon !== false && /*#__PURE__*/_react.default.createElement(_DownloadButtonView.default, {
|
|
105
|
+
count: table.totalRowCount || 0,
|
|
106
|
+
queryVariables: queryVariables,
|
|
107
|
+
table: table,
|
|
108
|
+
buttonConfig: table.extendedViewConfig.downloadButtonConfig
|
|
103
109
|
})));
|
|
104
110
|
};
|
|
105
111
|
var _default = TableView;
|
|
@@ -66,12 +66,13 @@ const CustomPagination = _ref => {
|
|
|
66
66
|
rowsPerPage,
|
|
67
67
|
page,
|
|
68
68
|
onPageChange,
|
|
69
|
-
onRowsPerPageChange
|
|
69
|
+
onRowsPerPageChange,
|
|
70
|
+
customTheme = {}
|
|
70
71
|
} = _ref;
|
|
71
72
|
const classes = useStyles();
|
|
72
73
|
return /*#__PURE__*/_react.default.createElement(_core.ThemeProvider, {
|
|
73
74
|
theme: (0, _core.createMuiTheme)({
|
|
74
|
-
overrides: _objectSpread({}, defaultTheme.overrides)
|
|
75
|
+
overrides: _objectSpread(_objectSpread({}, defaultTheme.overrides), customTheme)
|
|
75
76
|
})
|
|
76
77
|
}, /*#__PURE__*/_react.default.createElement(_core.TablePagination, {
|
|
77
78
|
labelRowsPerPage: "Results per Page:",
|
|
@@ -145,7 +145,7 @@ const DownloadButton = _ref => {
|
|
|
145
145
|
marginTop: '3px',
|
|
146
146
|
marginLeft: '-5px',
|
|
147
147
|
overflow: 'auto',
|
|
148
|
-
zIndex: '
|
|
148
|
+
zIndex: '20',
|
|
149
149
|
border: '1.5px solid #41545E',
|
|
150
150
|
borderRadius: '5px',
|
|
151
151
|
background: '#ffffff'
|
|
@@ -176,7 +176,10 @@ const DownloadButton = _ref => {
|
|
|
176
176
|
}, /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
177
177
|
title: table.downloadButtonTooltipText || 'Download filtered results'
|
|
178
178
|
}, count !== 0 ? /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
179
|
-
onClick: handleClickButton
|
|
179
|
+
onClick: handleClickButton,
|
|
180
|
+
style: {
|
|
181
|
+
padding: '0'
|
|
182
|
+
}
|
|
180
183
|
}, /*#__PURE__*/_react.default.createElement(_icons.CloudDownload, null), /*#__PURE__*/_react.default.createElement(_KeyboardArrowDownOutlined.default, {
|
|
181
184
|
className: classes.arrowdownIcon
|
|
182
185
|
})) : /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
package/package.json
CHANGED
package/src/TableView.js
CHANGED
|
@@ -10,6 +10,7 @@ import TableHeader from './header/CustomTblHeader';
|
|
|
10
10
|
import CustomPagination from './pagination/CustomPagination';
|
|
11
11
|
import CustomTableBody from './body/CustomTblBody';
|
|
12
12
|
import CustomToolbar from './toolbar/CustomToolbar';
|
|
13
|
+
import DownloadButton from './toolbar/DownloadButtonView';
|
|
13
14
|
import DisplayErrMsg from './errMsg/DisplayErrMsg';
|
|
14
15
|
import ExtendedView from './ExtendedView';
|
|
15
16
|
|
|
@@ -104,6 +105,15 @@ const TableView = ({
|
|
|
104
105
|
onPageChange={onPageChange}
|
|
105
106
|
onRowsPerPageChange={onRowsPerPageChange}
|
|
106
107
|
/>
|
|
108
|
+
{table.showDownloadIcon !== false
|
|
109
|
+
&& (
|
|
110
|
+
<DownloadButton
|
|
111
|
+
count={table.totalRowCount || 0}
|
|
112
|
+
queryVariables={queryVariables}
|
|
113
|
+
table={table}
|
|
114
|
+
buttonConfig={table.extendedViewConfig.downloadButtonConfig}
|
|
115
|
+
/>
|
|
116
|
+
)}
|
|
107
117
|
</div>
|
|
108
118
|
</>
|
|
109
119
|
);
|
|
@@ -62,11 +62,12 @@ const CustomPagination = ({
|
|
|
62
62
|
page,
|
|
63
63
|
onPageChange,
|
|
64
64
|
onRowsPerPageChange,
|
|
65
|
+
customTheme = {},
|
|
65
66
|
}) => {
|
|
66
67
|
const classes = useStyles();
|
|
67
68
|
return (
|
|
68
69
|
<ThemeProvider
|
|
69
|
-
theme={createMuiTheme({ overrides: { ...defaultTheme.overrides } })}
|
|
70
|
+
theme={createMuiTheme({ overrides: { ...defaultTheme.overrides, ...customTheme } })}
|
|
70
71
|
>
|
|
71
72
|
<TablePagination
|
|
72
73
|
labelRowsPerPage="Results per Page:"
|
|
@@ -156,7 +156,7 @@ const DownloadButton = ({
|
|
|
156
156
|
marginTop: '3px',
|
|
157
157
|
marginLeft: '-5px',
|
|
158
158
|
overflow: 'auto',
|
|
159
|
-
zIndex: '
|
|
159
|
+
zIndex: '20',
|
|
160
160
|
border: '1.5px solid #41545E',
|
|
161
161
|
borderRadius: '5px',
|
|
162
162
|
background: '#ffffff',
|
|
@@ -191,7 +191,7 @@ const DownloadButton = ({
|
|
|
191
191
|
{
|
|
192
192
|
count !== 0
|
|
193
193
|
? (
|
|
194
|
-
<IconButton onClick={handleClickButton}>
|
|
194
|
+
<IconButton onClick={handleClickButton} style={{ padding: '0' }}>
|
|
195
195
|
<CloudDownload />
|
|
196
196
|
<KeyboardArrowDownOutlinedIcon className={classes.arrowdownIcon} />
|
|
197
197
|
</IconButton>
|