@bento-core/table 1.0.1-ccdihub.29 → 1.0.1-ccdihub.30

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.
@@ -60,8 +60,7 @@ const ExtendedView = _ref => {
60
60
  onPageChange: onPageChange,
61
61
  onRowsPerPageChange: onRowsPerPageChange,
62
62
  queryVariables: queryVariables,
63
- table: table,
64
- download: download
63
+ table: table
65
64
  }));
66
65
  };
67
66
  var _default = ExtendedView;
@@ -55,8 +55,7 @@ const CustomPagination = _ref => {
55
55
  onRowsPerPageChange,
56
56
  customTheme = {},
57
57
  queryVariables,
58
- table,
59
- download
58
+ table
60
59
  } = _ref;
61
60
  return /*#__PURE__*/_react.default.createElement(_core.ThemeProvider, {
62
61
  theme: (0, _core.createTheme)({
@@ -82,8 +81,7 @@ const CustomPagination = _ref => {
82
81
  }), /*#__PURE__*/_react.default.createElement(_DownloadButton.default, {
83
82
  count: count,
84
83
  queryVariables: queryVariables,
85
- table: table,
86
- download: download
84
+ table: table
87
85
  })));
88
86
  };
89
87
  CustomPagination.propTypes = {
@@ -24,23 +24,21 @@ const DownloadButton = _ref => {
24
24
  let {
25
25
  count,
26
26
  queryVariables,
27
- table,
28
- download
27
+ table
29
28
  } = _ref;
30
29
  if (count === 0) {
31
30
  return /*#__PURE__*/_react.default.createElement(_icons.CloudDownload, {
32
31
  style: downloadButtonStyle
33
32
  });
34
33
  }
35
- const {
36
- downloadFileName
37
- } = download;
38
34
  const client = (0, _client.useApolloClient)();
35
+ const downloadFile = 'CCDI Inventory';
39
36
  async function downloadSCSVFile() {
40
37
  const {
41
38
  query,
42
39
  paginationAPIField
43
40
  } = table;
41
+ const downloadFileName = downloadFile.concat(paginationAPIField.replace('Overview', ''), ' download');
44
42
  const result = await client.query({
45
43
  query,
46
44
  variables: _objectSpread(_objectSpread({}, queryVariables), {}, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-ccdihub.29",
3
+ "version": "1.0.1-ccdihub.30",
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",
@@ -56,7 +56,6 @@ const ExtendedView = ({
56
56
  onRowsPerPageChange={onRowsPerPageChange}
57
57
  queryVariables={queryVariables}
58
58
  table={table}
59
- download={download}
60
59
  />
61
60
  )
62
61
  }
@@ -50,7 +50,6 @@ const CustomPagination = ({
50
50
  customTheme = {},
51
51
  queryVariables,
52
52
  table,
53
- download,
54
53
  }) => (
55
54
  <ThemeProvider theme={createTheme({ overrides: { ...defaultTheme, ...customTheme } })}>
56
55
  <div className="downloadArea" style={downloadAreaStyle}>
@@ -71,7 +70,6 @@ const CustomPagination = ({
71
70
  count={count}
72
71
  queryVariables={queryVariables}
73
72
  table={table}
74
- download={download}
75
73
  />
76
74
  </div>
77
75
  </ThemeProvider>
@@ -16,24 +16,23 @@ const DownloadButton = ({
16
16
  count,
17
17
  queryVariables,
18
18
  table,
19
- download,
20
19
  }) => {
21
20
  if (count === 0) {
22
21
  return <CloudDownload style={downloadButtonStyle} />;
23
22
  }
24
23
 
25
- const {
26
- downloadFileName,
27
- } = download;
28
-
29
24
  const client = useApolloClient();
30
25
 
26
+ const downloadFile = 'CCDI Inventory';
27
+
31
28
  async function downloadSCSVFile() {
32
29
  const {
33
30
  query,
34
31
  paginationAPIField,
35
32
  } = table;
36
33
 
34
+ const downloadFileName = downloadFile.concat(paginationAPIField.replace('Overview', ''), ' download');
35
+
37
36
  const result = await client.query({
38
37
  query,
39
38
  variables: {