@bento-core/table 1.0.1-ccdihub.37 → 1.0.1-ccdihub.39

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.
@@ -18,7 +18,8 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
18
18
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
19
  const downloadAreaStyle = {
20
20
  display: 'flex',
21
- borderTop: '1px solid #8A7F7C'
21
+ borderTop: '1px solid #8A7F7C',
22
+ paddingRight: '41px'
22
23
  };
23
24
  const ExtendedView = _ref => {
24
25
  let {
package/dist/TableView.js CHANGED
@@ -35,7 +35,8 @@ const CustomTableContainer = props => {
35
35
  };
36
36
  const downloadAreaStyle = {
37
37
  display: 'flex',
38
- borderBottom: '1px solid #8A7F7C'
38
+ borderBottom: '1px solid #8A7F7C',
39
+ paddingRight: '41px'
39
40
  };
40
41
  const TableView = _ref => {
41
42
  var _table$selectedRows, _table$selectedRows2;
@@ -18,8 +18,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
18
18
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
19
  const downloadButtonStyle = {
20
20
  color: '#d1d2d3',
21
- marginTop: '7px',
22
- marginRight: '41px'
21
+ marginTop: '7px'
23
22
  };
24
23
  const DownloadButton = _ref => {
25
24
  let {
@@ -27,6 +26,9 @@ const DownloadButton = _ref => {
27
26
  queryVariables,
28
27
  table
29
28
  } = _ref;
29
+ if (table.downloadable !== undefined && !table.downloadable) {
30
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
31
+ }
30
32
  if (count === 0) {
31
33
  return /*#__PURE__*/_react.default.createElement(_icons.CloudDownload, {
32
34
  className: "disableButton",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-ccdihub.37",
3
+ "version": "1.0.1-ccdihub.39",
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",
@@ -12,6 +12,7 @@ import DownloadButton from './toolbar/DownloadButtonView';
12
12
  const downloadAreaStyle = {
13
13
  display: 'flex',
14
14
  borderTop: '1px solid #8A7F7C',
15
+ paddingRight: '41px',
15
16
  };
16
17
 
17
18
  const ExtendedView = ({
package/src/TableView.js CHANGED
@@ -29,6 +29,7 @@ const CustomTableContainer = (props) => {
29
29
  const downloadAreaStyle = {
30
30
  display: 'flex',
31
31
  borderBottom: '1px solid #8A7F7C',
32
+ paddingRight: '41px',
32
33
  };
33
34
 
34
35
  const TableView = ({
@@ -10,7 +10,6 @@ import { downloadJson } from '../util/downloadTable';
10
10
  const downloadButtonStyle = {
11
11
  color: '#d1d2d3',
12
12
  marginTop: '7px',
13
- marginRight: '41px',
14
13
  };
15
14
 
16
15
  const DownloadButton = ({
@@ -18,6 +17,9 @@ const DownloadButton = ({
18
17
  queryVariables,
19
18
  table,
20
19
  }) => {
20
+ if (table.downloadable !== undefined && !table.downloadable) {
21
+ return <></>;
22
+ }
21
23
  if (count === 0) {
22
24
  return <CloudDownload className="disableButton" style={downloadButtonStyle} />;
23
25
  }