@bento-core/table 1.0.1-ccdihub.36 → 1.0.1-ccdihub.37
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 +14 -2
- package/package.json +1 -1
- package/src/TableView.js +23 -10
package/dist/TableView.js
CHANGED
|
@@ -12,6 +12,7 @@ var _CustomTblBody = _interopRequireDefault(require("./body/CustomTblBody"));
|
|
|
12
12
|
var _CustomToolbar = _interopRequireDefault(require("./toolbar/CustomToolbar"));
|
|
13
13
|
var _DisplayErrMsg = _interopRequireDefault(require("./errMsg/DisplayErrMsg"));
|
|
14
14
|
var _ExtendedView = _interopRequireDefault(require("./ExtendedView"));
|
|
15
|
+
var _DownloadButtonView = _interopRequireDefault(require("./toolbar/DownloadButtonView"));
|
|
15
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
17
|
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; }
|
|
17
18
|
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; }
|
|
@@ -32,6 +33,10 @@ const CustomTableContainer = props => {
|
|
|
32
33
|
component: _core.Paper
|
|
33
34
|
}, children));
|
|
34
35
|
};
|
|
36
|
+
const downloadAreaStyle = {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
borderBottom: '1px solid #8A7F7C'
|
|
39
|
+
};
|
|
35
40
|
const TableView = _ref => {
|
|
36
41
|
var _table$selectedRows, _table$selectedRows2;
|
|
37
42
|
let {
|
|
@@ -77,7 +82,10 @@ const TableView = _ref => {
|
|
|
77
82
|
}))), tableRows.length === 0 && /*#__PURE__*/_react.default.createElement(_DisplayErrMsg.default, {
|
|
78
83
|
customTheme: themeConfig.displayErr,
|
|
79
84
|
table: table
|
|
80
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
85
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
86
|
+
className: "downloadArea",
|
|
87
|
+
style: downloadAreaStyle
|
|
88
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomPagination.default, {
|
|
81
89
|
customTheme: themeConfig.tblPgn,
|
|
82
90
|
rowsPerPageOptions: [10, 25, 50, 100],
|
|
83
91
|
component: "div",
|
|
@@ -86,7 +94,11 @@ const TableView = _ref => {
|
|
|
86
94
|
page: table.page || 0,
|
|
87
95
|
onPageChange: onPageChange,
|
|
88
96
|
onRowsPerPageChange: onRowsPerPageChange
|
|
89
|
-
})
|
|
97
|
+
}), /*#__PURE__*/_react.default.createElement(_DownloadButtonView.default, {
|
|
98
|
+
count: table.totalRowCount || 0,
|
|
99
|
+
queryVariables: queryVariables,
|
|
100
|
+
table: table
|
|
101
|
+
})));
|
|
90
102
|
};
|
|
91
103
|
var _default = TableView;
|
|
92
104
|
exports.default = _default;
|
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.37",
|
|
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/TableView.js
CHANGED
|
@@ -12,6 +12,7 @@ import CustomTableBody from './body/CustomTblBody';
|
|
|
12
12
|
import CustomToolbar from './toolbar/CustomToolbar';
|
|
13
13
|
import DisplayErrMsg from './errMsg/DisplayErrMsg';
|
|
14
14
|
import ExtendedView from './ExtendedView';
|
|
15
|
+
import DownloadButton from './toolbar/DownloadButtonView';
|
|
15
16
|
|
|
16
17
|
const CustomTableContainer = (props) => {
|
|
17
18
|
const { children, customTheme } = props;
|
|
@@ -25,6 +26,11 @@ const CustomTableContainer = (props) => {
|
|
|
25
26
|
);
|
|
26
27
|
};
|
|
27
28
|
|
|
29
|
+
const downloadAreaStyle = {
|
|
30
|
+
display: 'flex',
|
|
31
|
+
borderBottom: '1px solid #8A7F7C',
|
|
32
|
+
};
|
|
33
|
+
|
|
28
34
|
const TableView = ({
|
|
29
35
|
tableRows = [],
|
|
30
36
|
table,
|
|
@@ -80,16 +86,23 @@ const TableView = ({
|
|
|
80
86
|
table={table}
|
|
81
87
|
/>
|
|
82
88
|
)}
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
<div className="downloadArea" style={downloadAreaStyle}>
|
|
90
|
+
<CustomPagination
|
|
91
|
+
customTheme={themeConfig.tblPgn}
|
|
92
|
+
rowsPerPageOptions={[10, 25, 50, 100]}
|
|
93
|
+
component="div"
|
|
94
|
+
count={table.totalRowCount || 0}
|
|
95
|
+
rowsPerPage={table.rowsPerPage || 10}
|
|
96
|
+
page={table.page || 0}
|
|
97
|
+
onPageChange={onPageChange}
|
|
98
|
+
onRowsPerPageChange={onRowsPerPageChange}
|
|
99
|
+
/>
|
|
100
|
+
<DownloadButton
|
|
101
|
+
count={table.totalRowCount || 0}
|
|
102
|
+
queryVariables={queryVariables}
|
|
103
|
+
table={table}
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
93
106
|
</>
|
|
94
107
|
);
|
|
95
108
|
|