@bento-core/table 1.0.1-ins.16 → 1.0.1-ins.18

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.
@@ -44,7 +44,9 @@ const DownloadButton = _ref => {
44
44
  query,
45
45
  variables: _objectSpread(_objectSpread({}, queryVariables), {}, {
46
46
  page: 0,
47
- first: 10000
47
+ first: 10000,
48
+ sort_direction: table.sortBy,
49
+ order_by: table.sortOrder
48
50
  })
49
51
  }).then(response => {
50
52
  if (paginationAPIField && response && response.data) {
@@ -56,7 +58,7 @@ const DownloadButton = _ref => {
56
58
  }
57
59
  const downloadTableCSV = (0, _react.useCallback)(() => {
58
60
  downloadSCSVFile();
59
- }, [queryVariables]);
61
+ }, [queryVariables, table]);
60
62
  return /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
61
63
  title: "Download Full Table As CSV"
62
64
  }, /*#__PURE__*/_react.default.createElement(_core.IconButton, {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.headerTypes = exports.dataFormatTypes = exports.cellTypes = exports.cellStyles = exports.actionCellTypes = exports.TRANSFORM = exports.LINK = exports.FORMAT_DATA_CELLS = exports.FORMAT_DATA = exports.FORMAT_BYTES = exports.EXTERNAL_LINK = exports.DISPLAY = exports.DELETE = exports.DEFAULT = exports.ComponentTypes = exports.CUSTOM_ELEM = exports.CONDITIONAL_EXTERNAL_LINK = exports.CHECKBOX = void 0;
6
+ exports.headerTypes = exports.dataFormatTypes = exports.cellTypes = exports.cellStyles = exports.actionCellTypes = exports.TRANSFORM_LINK = exports.TRANSFORM = exports.LINK = exports.FORMAT_DATA_CELLS = exports.FORMAT_DATA = exports.FORMAT_BYTES = exports.EXTERNAL_LINK = exports.DISPLAY = exports.DELETE = exports.DEFAULT = exports.ComponentTypes = exports.CUSTOM_ELEM = exports.CONDITIONAL_EXTERNAL_LINK = exports.CHECKBOX = void 0;
7
7
  const CHECKBOX = 'CHECKBOX';
8
8
  exports.CHECKBOX = CHECKBOX;
9
9
  const DELETE = 'DELETE';
@@ -26,6 +26,8 @@ const FORMAT_BYTES = 'FORMAT_BYTES';
26
26
  exports.FORMAT_BYTES = FORMAT_BYTES;
27
27
  const TRANSFORM = 'TRANSFORM';
28
28
  exports.TRANSFORM = TRANSFORM;
29
+ const TRANSFORM_LINK = 'TRANSFORM_LINK';
30
+ exports.TRANSFORM_LINK = TRANSFORM_LINK;
29
31
  const cellTypes = {
30
32
  CUSTOM_ELEM,
31
33
  LINK,
@@ -39,7 +41,8 @@ const cellTypes = {
39
41
  };
40
42
  exports.cellTypes = cellTypes;
41
43
  const cellStyles = {
42
- TRANSFORM
44
+ TRANSFORM,
45
+ TRANSFORM_LINK
43
46
  };
44
47
  exports.cellStyles = cellStyles;
45
48
  const actionCellTypes = [CHECKBOX, DELETE];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-ins.16",
3
+ "version": "1.0.1-ins.18",
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",
@@ -39,6 +39,8 @@ const DownloadButton = ({
39
39
  ...queryVariables,
40
40
  page: 0,
41
41
  first: 10000,
42
+ sort_direction: table.sortBy,
43
+ order_by: table.sortOrder,
42
44
  },
43
45
  })
44
46
  .then((response) => {
@@ -52,7 +54,7 @@ const DownloadButton = ({
52
54
 
53
55
  const downloadTableCSV = useCallback(() => {
54
56
  downloadSCSVFile();
55
- }, [queryVariables]);
57
+ }, [queryVariables, table]);
56
58
 
57
59
  return (
58
60
  <Tooltip title="Download Full Table As CSV">
package/src/util/Types.js CHANGED
@@ -9,6 +9,7 @@ export const DEFAULT = 'DEFAULT';
9
9
  export const FORMAT_DATA = 'FORMAT_DATA';
10
10
  export const FORMAT_BYTES = 'FORMAT_BYTES';
11
11
  export const TRANSFORM = 'TRANSFORM';
12
+ export const TRANSFORM_LINK = 'TRANSFORM_LINK';
12
13
 
13
14
  export const cellTypes = {
14
15
  CUSTOM_ELEM,
@@ -24,6 +25,7 @@ export const cellTypes = {
24
25
 
25
26
  export const cellStyles = {
26
27
  TRANSFORM,
28
+ TRANSFORM_LINK,
27
29
  };
28
30
 
29
31
  export const actionCellTypes = [CHECKBOX, DELETE];