@bento-core/table 1.0.1-ins.15 → 1.0.1-ins.17

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/index.js CHANGED
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "TableView", {
15
15
  return _TableView.default;
16
16
  }
17
17
  });
18
+ Object.defineProperty(exports, "cellStyles", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _Types.cellStyles;
22
+ }
23
+ });
18
24
  Object.defineProperty(exports, "cellTypes", {
19
25
  enumerable: true,
20
26
  get: function get() {
@@ -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.actionCellTypes = 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 = 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';
@@ -24,6 +24,8 @@ const FORMAT_DATA = 'FORMAT_DATA';
24
24
  exports.FORMAT_DATA = FORMAT_DATA;
25
25
  const FORMAT_BYTES = 'FORMAT_BYTES';
26
26
  exports.FORMAT_BYTES = FORMAT_BYTES;
27
+ const TRANSFORM = 'TRANSFORM';
28
+ exports.TRANSFORM = TRANSFORM;
27
29
  const cellTypes = {
28
30
  CUSTOM_ELEM,
29
31
  LINK,
@@ -36,6 +38,10 @@ const cellTypes = {
36
38
  FORMAT_DATA
37
39
  };
38
40
  exports.cellTypes = cellTypes;
41
+ const cellStyles = {
42
+ TRANSFORM
43
+ };
44
+ exports.cellStyles = cellStyles;
39
45
  const actionCellTypes = [CHECKBOX, DELETE];
40
46
  exports.actionCellTypes = actionCellTypes;
41
47
  const FORMAT_DATA_CELLS = [FORMAT_BYTES];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-ins.15",
3
+ "version": "1.0.1-ins.17",
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/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export { default as TableView } from './TableView';
2
2
  export {
3
3
  cellTypes,
4
+ cellStyles,
4
5
  headerTypes,
5
6
  ComponentTypes,
6
7
  dataFormatTypes,
@@ -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
@@ -8,6 +8,7 @@ export const DISPLAY = 'DISPLAY';
8
8
  export const DEFAULT = 'DEFAULT';
9
9
  export const FORMAT_DATA = 'FORMAT_DATA';
10
10
  export const FORMAT_BYTES = 'FORMAT_BYTES';
11
+ export const TRANSFORM = 'TRANSFORM';
11
12
 
12
13
  export const cellTypes = {
13
14
  CUSTOM_ELEM,
@@ -21,6 +22,10 @@ export const cellTypes = {
21
22
  FORMAT_DATA,
22
23
  };
23
24
 
25
+ export const cellStyles = {
26
+ TRANSFORM,
27
+ };
28
+
24
29
  export const actionCellTypes = [CHECKBOX, DELETE];
25
30
 
26
31
  export const FORMAT_DATA_CELLS = [FORMAT_BYTES];