@atlaskit/dynamic-table 14.4.0 → 14.4.4

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/components/Stateful.js +26 -0
  4. package/dist/cjs/components/Stateless.js +2 -2
  5. package/dist/cjs/components/TableHead.js +5 -2
  6. package/dist/cjs/components/TableHeadCell.js +3 -1
  7. package/dist/cjs/components/TableRow.js +5 -2
  8. package/dist/cjs/components/{managedPagination.js → managed-pagination.js} +0 -0
  9. package/dist/cjs/components/rankable/TableCell.js +3 -1
  10. package/dist/cjs/components/rankable/TableHeadCell.js +3 -1
  11. package/dist/cjs/components/rankable/TableRow.js +5 -3
  12. package/dist/cjs/hoc/withSortedPageRows.js +5 -3
  13. package/dist/cjs/index.js +4 -4
  14. package/dist/cjs/internal/constants.js +1 -5
  15. package/dist/cjs/internal/helpers.js +1 -1
  16. package/dist/cjs/styled/DynamicTable.js +3 -3
  17. package/dist/cjs/styled/EmptyBody.js +1 -1
  18. package/dist/cjs/styled/TableCell.js +3 -2
  19. package/dist/cjs/styled/TableHead.js +13 -12
  20. package/dist/cjs/styled/TableRow.js +6 -8
  21. package/dist/cjs/styled/constants.js +2 -2
  22. package/dist/cjs/styled/rankable/TableCell.js +2 -2
  23. package/dist/cjs/styled/rankable/TableRow.js +5 -7
  24. package/dist/cjs/theme.js +19 -21
  25. package/dist/cjs/version.json +1 -1
  26. package/dist/es2019/components/Stateful.js +27 -0
  27. package/dist/es2019/components/Stateless.js +2 -2
  28. package/dist/es2019/components/{managedPagination.js → managed-pagination.js} +0 -0
  29. package/dist/es2019/internal/constants.js +0 -2
  30. package/dist/es2019/styled/TableHead.js +5 -6
  31. package/dist/es2019/styled/TableRow.js +4 -5
  32. package/dist/es2019/styled/constants.js +1 -1
  33. package/dist/es2019/styled/rankable/TableRow.js +3 -4
  34. package/dist/es2019/theme.js +18 -19
  35. package/dist/es2019/version.json +1 -1
  36. package/dist/esm/components/Stateful.js +26 -0
  37. package/dist/esm/components/Stateless.js +2 -2
  38. package/dist/esm/components/TableHead.js +4 -2
  39. package/dist/esm/components/TableHeadCell.js +2 -1
  40. package/dist/esm/components/TableRow.js +4 -2
  41. package/dist/esm/components/{managedPagination.js → managed-pagination.js} +0 -0
  42. package/dist/esm/components/rankable/TableCell.js +2 -1
  43. package/dist/esm/components/rankable/TableHeadCell.js +2 -1
  44. package/dist/esm/components/rankable/TableRow.js +4 -3
  45. package/dist/esm/hoc/withSortedPageRows.js +4 -3
  46. package/dist/esm/internal/constants.js +0 -2
  47. package/dist/esm/styled/DynamicTable.js +2 -1
  48. package/dist/esm/styled/TableCell.js +2 -1
  49. package/dist/esm/styled/TableHead.js +11 -10
  50. package/dist/esm/styled/TableRow.js +6 -6
  51. package/dist/esm/styled/constants.js +1 -1
  52. package/dist/esm/styled/rankable/TableCell.js +2 -1
  53. package/dist/esm/styled/rankable/TableRow.js +5 -5
  54. package/dist/esm/theme.js +18 -19
  55. package/dist/esm/version.json +1 -1
  56. package/dist/types/components/LoadingContainer.d.ts +3 -3
  57. package/dist/types/components/LoadingContainerAdvanced.d.ts +1 -1
  58. package/dist/types/components/Stateful.d.ts +26 -0
  59. package/dist/types/components/TableRow.d.ts +1 -0
  60. package/dist/types/components/{managedPagination.d.ts → managed-pagination.d.ts} +4 -7
  61. package/dist/types/internal/constants.d.ts +0 -2
  62. package/dist/types/styled/constants.d.ts +1 -1
  63. package/dist/types/types.d.ts +74 -35
  64. package/package.json +13 -10
package/dist/cjs/theme.js CHANGED
@@ -5,14 +5,12 @@ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.head = exports.row = exports.arrow = exports.MSThemeColors = void 0;
8
+ exports.row = exports.head = exports.arrow = exports.MSThemeColors = void 0;
9
9
 
10
10
  var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
11
11
 
12
12
  var _components = require("@atlaskit/theme/components");
13
13
 
14
- var _tokens = require("@atlaskit/tokens");
15
-
16
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
15
 
18
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -26,46 +24,46 @@ var MSThemeColors = {
26
24
  exports.MSThemeColors = MSThemeColors;
27
25
  var arrow = {
28
26
  defaultColor: (0, _components.themed)({
29
- light: (0, _tokens.token)('color.background.subtleNeutral.resting', colors.N40),
30
- dark: (0, _tokens.token)('color.background.subtleNeutral.resting', colors.DN40)
27
+ light: "var(--ds-background-subtleNeutral-resting, ".concat(colors.N40, ")"),
28
+ dark: "var(--ds-background-subtleNeutral-resting, ".concat(colors.DN40, ")")
31
29
  }),
32
30
  selectedColor: (0, _components.themed)({
33
- light: (0, _tokens.token)('color.text.lowEmphasis', colors.N300),
34
- dark: (0, _tokens.token)('color.text.lowEmphasis', colors.DN300)
31
+ light: "var(--ds-text-lowEmphasis, ".concat(colors.N300, ")"),
32
+ dark: "var(--ds-text-lowEmphasis, ".concat(colors.DN300, ")")
35
33
  }),
36
34
  hoverColor: (0, _components.themed)({
37
- light: (0, _tokens.token)('color.background.subtleNeutral.pressed', colors.N60),
38
- dark: (0, _tokens.token)('color.background.subtleNeutral.pressed', colors.DN60)
35
+ light: "var(--ds-background-subtleNeutral-pressed, ".concat(colors.N60, ")"),
36
+ dark: "var(--ds-background-subtleNeutral-pressed, ".concat(colors.DN60, ")")
39
37
  })
40
38
  };
41
39
  exports.arrow = arrow;
42
40
  var row = {
43
41
  focusOutline: (0, _components.themed)({
44
- light: (0, _tokens.token)('color.border.focus', colors.B100),
45
- dark: (0, _tokens.token)('color.border.focus', colors.B100)
42
+ light: "var(--ds-border-focus, ".concat(colors.B100, ")"),
43
+ dark: "var(--ds-border-focus, ".concat(colors.B100, ")")
46
44
  }),
47
45
  highlightedBackground: (0, _components.themed)({
48
- light: (0, _tokens.token)('color.background.selected.resting', colors.B50),
49
- dark: (0, _tokens.token)('color.background.selected.resting', colors.DN50)
46
+ light: "var(--ds-background-selected-resting, ".concat(colors.B50, ")"),
47
+ dark: "var(--ds-background-selected-resting, ".concat(colors.DN50, ")")
50
48
  }),
51
49
  hoverBackground: (0, _components.themed)({
52
- light: (0, _tokens.token)('color.background.subtleBorderedNeutral.resting', colors.N10),
53
- dark: (0, _tokens.token)('color.background.subtleBorderedNeutral.resting', colors.DN40)
50
+ light: "var(--ds-background-subtleBorderedNeutral-resting, ".concat(colors.N10, ")"),
51
+ dark: "var(--ds-background-subtleBorderedNeutral-resting, ".concat(colors.DN40, ")")
54
52
  }),
55
53
  hoverHighlightedBackground: (0, _components.themed)({
56
- light: (0, _tokens.token)('color.background.selected.hover', colors.B75),
57
- dark: (0, _tokens.token)('color.background.selected.hover', colors.DN60)
54
+ light: "var(--ds-background-selected-hover, ".concat(colors.B75, ")"),
55
+ dark: "var(--ds-background-selected-hover, ".concat(colors.DN60, ")")
58
56
  })
59
57
  };
60
58
  exports.row = row;
61
59
  var head = {
62
60
  borderColor: (0, _components.themed)({
63
- light: (0, _tokens.token)('color.border.neutral', colors.N40),
64
- dark: (0, _tokens.token)('color.border.neutral', colors.DN50)
61
+ light: "var(--ds-border-neutral, ".concat(colors.N40, ")"),
62
+ dark: "var(--ds-border-neutral, ".concat(colors.DN50, ")")
65
63
  }),
66
64
  textColor: (0, _components.themed)({
67
- light: (0, _tokens.token)('color.text.lowEmphasis', colors.N300),
68
- dark: (0, _tokens.token)('color.text.lowEmphasis', colors.DN300)
65
+ light: "var(--ds-text-lowEmphasis, ".concat(colors.N300, ")"),
66
+ dark: "var(--ds-text-lowEmphasis, ".concat(colors.DN300, ")")
69
67
  })
70
68
  };
71
69
  exports.head = head;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dynamic-table",
3
- "version": "14.4.0",
3
+ "version": "14.4.4",
4
4
  "sideEffects": false
5
5
  }
@@ -2,6 +2,33 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import { reorderRows } from '../internal/helpers';
4
4
  import DynamicTableStateless from './Stateless';
5
+
6
+ /**
7
+ * __Dynamic Table__
8
+ *
9
+ * A table displays rows of data with built-in pagination, sorting, and re-ordering functionality.
10
+ *
11
+ * - [Examples](https://atlaskit.atlassian.com/packages/design-system/dynamic-table)
12
+ * - [Code](https://bitbucket.org/atlassian/atlassian-frontend/packages/design-system/dynamic-table)
13
+ *
14
+ * @example
15
+ * ```jsx
16
+ * import DynamicTable from '@atlaskit/dynamic-table';
17
+ *
18
+ * export default function TableUncontrolled() {
19
+ * return (
20
+ * <DynamicTable
21
+ * head={head}
22
+ * rows={rows}
23
+ * rowsPerPage={10}
24
+ * defaultPage={1}
25
+ * loadingSpinnerSize="large"
26
+ * isLoading={false}
27
+ * />
28
+ * );
29
+ * }
30
+ * ```
31
+ */
5
32
  export default class DynamicTable extends React.Component {
6
33
  constructor(...args) {
7
34
  super(...args);
@@ -9,11 +9,11 @@ import { EmptyViewContainer, EmptyViewWithFixedHeight } from '../styled/EmptyBod
9
9
  import Body from './Body';
10
10
  import LoadingContainer from './LoadingContainer';
11
11
  import LoadingContainerAdvanced from './LoadingContainerAdvanced';
12
- import ManagedPagination from './managedPagination';
12
+ import ManagedPagination from './managed-pagination';
13
13
  import RankableTableBody from './rankable/Body';
14
14
  import TableHead from './TableHead';
15
15
  const packageName = "@atlaskit/dynamic-table";
16
- const packageVersion = "14.4.0";
16
+ const packageVersion = "14.4.4";
17
17
 
18
18
  function toggleSortOrder(currentSortOrder) {
19
19
  switch (currentSortOrder) {
@@ -1,7 +1,5 @@
1
1
  export const ASC = 'ASC';
2
2
  export const DESC = 'DESC';
3
3
  export const SMALL = 'small';
4
- export const MEDIUM = 'medium';
5
4
  export const LARGE = 'large';
6
- export const XLARGE = 'xlarge';
7
5
  export const LOADING_CONTENTS_OPACITY = 0.22;
@@ -6,7 +6,6 @@ import { css, jsx } from '@emotion/core';
6
6
  import { B100, N30A } from '@atlaskit/theme/colors';
7
7
  import { useGlobalTheme } from '@atlaskit/theme/components';
8
8
  import { gridSize as getGridSize } from '@atlaskit/theme/constants';
9
- import { token } from '@atlaskit/tokens';
10
9
  import { ASC, DESC } from '../internal/constants';
11
10
  import { arrow, head, MSThemeColors } from '../theme';
12
11
  import { cellStyles, fixedSizeTruncateStyles, getTruncationStyleVars, overflowTruncateStyles, truncationWidthStyles } from './constants';
@@ -17,9 +16,9 @@ const rankingStyles = css({
17
16
  });
18
17
 
19
18
  const getHeadStyles = theme => css({
20
- borderBottom: `2px solid ${token('color.border.neutral', head.borderColor({
19
+ borderBottom: `2px solid ${`var(--ds-border-neutral, ${head.borderColor({
21
20
  theme
22
- }))}`
21
+ })})`}`
23
22
  });
24
23
 
25
24
  export const Head = ({
@@ -39,9 +38,9 @@ const headCellStyles = css([cellStyles, {
39
38
  position: 'relative',
40
39
  textAlign: 'left',
41
40
  verticalAlign: 'top',
42
- color: token('color.text.lowEmphasis', `var(${CSS_VAR_TEXT_COLOR})`),
41
+ color: `var(--ds-text-lowEmphasis, ${`var(${CSS_VAR_TEXT_COLOR})`})`,
43
42
  '&:focus': {
44
- outline: `solid 2px ${token('color.border.focus', B100)}`
43
+ outline: `solid 2px ${`var(--ds-border-focus, ${B100})`}`
45
44
  }
46
45
  }]); // this needs to be made static: https://product-fabric.atlassian.net/browse/DSP-2011
47
46
 
@@ -129,7 +128,7 @@ export const getArrowStyles = (isSortable, sortOrder, theme) => {
129
128
  const onClickStyles = css({
130
129
  '&:hover': {
131
130
  cursor: 'pointer',
132
- backgroundColor: token('color.background.subtleNeutral.hover', N30A)
131
+ backgroundColor: `var(--ds-background-subtleNeutral-hover, ${N30A})`
133
132
  }
134
133
  });
135
134
  export const HeadCell = /*#__PURE__*/forwardRef(({
@@ -3,23 +3,22 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  /** @jsx jsx */
4
4
  import { forwardRef } from 'react';
5
5
  import { css, jsx } from '@emotion/core';
6
- import { token } from '@atlaskit/tokens';
7
6
  import { tableRowCSSVars as cssVars } from './DynamicTable';
8
7
  const rowStyles = css({
9
8
  '&:focus': {
10
- outline: `2px solid ${token('color.border.focus', `var(${cssVars.CSS_VAR_HOVER_BACKGROUND})`)}`,
9
+ outline: `2px solid ${`var(--ds-border-focus, ${`var(${cssVars.CSS_VAR_HOVER_BACKGROUND})`})`}`,
11
10
  outlineOffset: `-2px`
12
11
  }
13
12
  });
14
13
  const rowBackgroundStyles = css({
15
14
  '&:hover': {
16
- backgroundColor: token('color.background.transparentNeutral.hover', `var(${cssVars.CSS_VAR_HOVER_BACKGROUND})`)
15
+ backgroundColor: `var(--ds-background-transparentNeutral-hover, ${`var(${cssVars.CSS_VAR_HOVER_BACKGROUND})`})`
17
16
  }
18
17
  });
19
18
  const rowHighlightedBackgroundStyles = css({
20
- backgroundColor: token('color.background.selected.resting', `var(${cssVars.CSS_VAR_HIGHLIGHTED_BACKGROUND})`),
19
+ backgroundColor: `var(--ds-background-selected-resting, ${`var(${cssVars.CSS_VAR_HIGHLIGHTED_BACKGROUND})`})`,
21
20
  '&:hover': {
22
- backgroundColor: token('color.background.selected.hover', `var(${cssVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND})`)
21
+ backgroundColor: `var(--ds-background-selected-hover, ${`var(${cssVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND})`})`
23
22
  }
24
23
  });
25
24
  export const TableBodyRow = /*#__PURE__*/forwardRef(({
@@ -16,7 +16,7 @@ export const getTruncationStyleVars = ({
16
16
  width
17
17
  }) => {
18
18
  return {
19
- [CSS_VAR_WIDTH]: `${width}%`
19
+ [CSS_VAR_WIDTH]: typeof width !== 'undefined' ? `${width}%` : undefined
20
20
  };
21
21
  };
22
22
  export const cellStyles = css({
@@ -4,26 +4,25 @@ import _extends from "@babel/runtime/helpers/extends";
4
4
  import { forwardRef } from 'react';
5
5
  import { css, jsx } from '@emotion/core';
6
6
  import { B100, N20, N50A, N60A } from '@atlaskit/theme/colors';
7
- import { token } from '@atlaskit/tokens';
8
7
  import { TableBodyRow } from '../TableRow';
9
8
  const rankingStyles = css({
10
9
  display: 'block'
11
10
  });
12
- const elevationStyle = token('shadow.overlay', `0 20px 32px -8px ${N50A}, 0 0 1px ${N60A}`);
11
+ const elevationStyle = `var(--ds-overlay, ${`0 20px 32px -8px ${N50A}, 0 0 1px ${N60A}`})`;
13
12
  /**
14
13
  * TODO: Pass the props here to get particular theme for the table
15
14
  * Skipping it for now as it may impact migration as util-shared-styles does not support this feature
16
15
  */
17
16
 
18
17
  const rankingItemStyles = css({
19
- backgroundColor: token('color.background.subtleNeutral.resting', N20),
18
+ backgroundColor: `var(--ds-background-subtleNeutral-resting, ${N20})`,
20
19
  boxShadow: elevationStyle,
21
20
  borderRadius: '2px'
22
21
  });
23
22
  const draggableStyles = css({
24
23
  '&:focus': {
25
24
  outlineStyle: 'solid',
26
- outlineColor: token('color.border.focus', B100)
25
+ outlineColor: `var(--ds-border-focus, ${B100})`
27
26
  },
28
27
  outlineWidth: '2px'
29
28
  });
@@ -1,6 +1,5 @@
1
1
  import * as colors from '@atlaskit/theme/colors';
2
2
  import { themed } from '@atlaskit/theme/components';
3
- import { token } from '@atlaskit/tokens';
4
3
  export const MSThemeColors = {
5
4
  Background: 'Canvas',
6
5
  Text: 'CanvasText',
@@ -9,43 +8,43 @@ export const MSThemeColors = {
9
8
  };
10
9
  export const arrow = {
11
10
  defaultColor: themed({
12
- light: token('color.background.subtleNeutral.resting', colors.N40),
13
- dark: token('color.background.subtleNeutral.resting', colors.DN40)
11
+ light: `var(--ds-background-subtleNeutral-resting, ${colors.N40})`,
12
+ dark: `var(--ds-background-subtleNeutral-resting, ${colors.DN40})`
14
13
  }),
15
14
  selectedColor: themed({
16
- light: token('color.text.lowEmphasis', colors.N300),
17
- dark: token('color.text.lowEmphasis', colors.DN300)
15
+ light: `var(--ds-text-lowEmphasis, ${colors.N300})`,
16
+ dark: `var(--ds-text-lowEmphasis, ${colors.DN300})`
18
17
  }),
19
18
  hoverColor: themed({
20
- light: token('color.background.subtleNeutral.pressed', colors.N60),
21
- dark: token('color.background.subtleNeutral.pressed', colors.DN60)
19
+ light: `var(--ds-background-subtleNeutral-pressed, ${colors.N60})`,
20
+ dark: `var(--ds-background-subtleNeutral-pressed, ${colors.DN60})`
22
21
  })
23
22
  };
24
23
  export const row = {
25
24
  focusOutline: themed({
26
- light: token('color.border.focus', colors.B100),
27
- dark: token('color.border.focus', colors.B100)
25
+ light: `var(--ds-border-focus, ${colors.B100})`,
26
+ dark: `var(--ds-border-focus, ${colors.B100})`
28
27
  }),
29
28
  highlightedBackground: themed({
30
- light: token('color.background.selected.resting', colors.B50),
31
- dark: token('color.background.selected.resting', colors.DN50)
29
+ light: `var(--ds-background-selected-resting, ${colors.B50})`,
30
+ dark: `var(--ds-background-selected-resting, ${colors.DN50})`
32
31
  }),
33
32
  hoverBackground: themed({
34
- light: token('color.background.subtleBorderedNeutral.resting', colors.N10),
35
- dark: token('color.background.subtleBorderedNeutral.resting', colors.DN40)
33
+ light: `var(--ds-background-subtleBorderedNeutral-resting, ${colors.N10})`,
34
+ dark: `var(--ds-background-subtleBorderedNeutral-resting, ${colors.DN40})`
36
35
  }),
37
36
  hoverHighlightedBackground: themed({
38
- light: token('color.background.selected.hover', colors.B75),
39
- dark: token('color.background.selected.hover', colors.DN60)
37
+ light: `var(--ds-background-selected-hover, ${colors.B75})`,
38
+ dark: `var(--ds-background-selected-hover, ${colors.DN60})`
40
39
  })
41
40
  };
42
41
  export const head = {
43
42
  borderColor: themed({
44
- light: token('color.border.neutral', colors.N40),
45
- dark: token('color.border.neutral', colors.DN50)
43
+ light: `var(--ds-border-neutral, ${colors.N40})`,
44
+ dark: `var(--ds-border-neutral, ${colors.DN50})`
46
45
  }),
47
46
  textColor: themed({
48
- light: token('color.text.lowEmphasis', colors.N300),
49
- dark: token('color.text.lowEmphasis', colors.DN300)
47
+ light: `var(--ds-text-lowEmphasis, ${colors.N300})`,
48
+ dark: `var(--ds-text-lowEmphasis, ${colors.DN300})`
50
49
  })
51
50
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dynamic-table",
3
- "version": "14.4.0",
3
+ "version": "14.4.4",
4
4
  "sideEffects": false
5
5
  }
@@ -14,6 +14,32 @@ import React from 'react';
14
14
  import { reorderRows } from '../internal/helpers';
15
15
  import DynamicTableStateless from './Stateless';
16
16
 
17
+ /**
18
+ * __Dynamic Table__
19
+ *
20
+ * A table displays rows of data with built-in pagination, sorting, and re-ordering functionality.
21
+ *
22
+ * - [Examples](https://atlaskit.atlassian.com/packages/design-system/dynamic-table)
23
+ * - [Code](https://bitbucket.org/atlassian/atlassian-frontend/packages/design-system/dynamic-table)
24
+ *
25
+ * @example
26
+ * ```jsx
27
+ * import DynamicTable from '@atlaskit/dynamic-table';
28
+ *
29
+ * export default function TableUncontrolled() {
30
+ * return (
31
+ * <DynamicTable
32
+ * head={head}
33
+ * rows={rows}
34
+ * rowsPerPage={10}
35
+ * defaultPage={1}
36
+ * loadingSpinnerSize="large"
37
+ * isLoading={false}
38
+ * />
39
+ * );
40
+ * }
41
+ * ```
42
+ */
17
43
  var DynamicTable = /*#__PURE__*/function (_React$Component) {
18
44
  _inherits(DynamicTable, _React$Component);
19
45
 
@@ -20,11 +20,11 @@ import { EmptyViewContainer, EmptyViewWithFixedHeight } from '../styled/EmptyBod
20
20
  import Body from './Body';
21
21
  import LoadingContainer from './LoadingContainer';
22
22
  import LoadingContainerAdvanced from './LoadingContainerAdvanced';
23
- import ManagedPagination from './managedPagination';
23
+ import ManagedPagination from './managed-pagination';
24
24
  import RankableTableBody from './rankable/Body';
25
25
  import TableHead from './TableHead';
26
26
  var packageName = "@atlaskit/dynamic-table";
27
- var packageVersion = "14.4.0";
27
+ var packageVersion = "14.4.4";
28
28
 
29
29
  function toggleSortOrder(currentSortOrder) {
30
30
  switch (currentSortOrder) {
@@ -7,6 +7,8 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
7
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
+ var _excluded = ["cells"],
11
+ _excluded2 = ["isSortable", "key"];
10
12
 
11
13
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
14
 
@@ -75,7 +77,7 @@ var TableHead = /*#__PURE__*/function (_React$Component) {
75
77
  var HeadCellComponent = isRankable ? RankableHeadCell : HeadCell;
76
78
 
77
79
  var cells = head.cells,
78
- rest = _objectWithoutProperties(head, ["cells"]);
80
+ rest = _objectWithoutProperties(head, _excluded);
79
81
 
80
82
  return /*#__PURE__*/React.createElement(Head, _extends({}, rest, {
81
83
  isRanking: isRanking,
@@ -83,7 +85,7 @@ var TableHead = /*#__PURE__*/function (_React$Component) {
83
85
  }), /*#__PURE__*/React.createElement("tr", null, cells.map(function (cell, index) {
84
86
  var isSortable = cell.isSortable,
85
87
  key = cell.key,
86
- restCellProps = _objectWithoutProperties(cell, ["isSortable", "key"]);
88
+ restCellProps = _objectWithoutProperties(cell, _excluded2);
87
89
 
88
90
  return /*#__PURE__*/React.createElement(HeadCellComponent, _extends({
89
91
  isFixedSize: isFixedSize,
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["content", "inlineStyles", "testId", "isRanking", "innerRef", "isSortable"];
3
4
  import React from 'react';
4
5
  import { HeadCell } from '../styled/TableHead';
5
6
 
@@ -10,7 +11,7 @@ var TableHeadCell = function TableHeadCell(_ref) {
10
11
  isRanking = _ref.isRanking,
11
12
  innerRef = _ref.innerRef,
12
13
  isSortable = _ref.isSortable,
13
- rest = _objectWithoutProperties(_ref, ["content", "inlineStyles", "testId", "isRanking", "innerRef", "isSortable"]);
14
+ rest = _objectWithoutProperties(_ref, _excluded);
14
15
 
15
16
  return /*#__PURE__*/React.createElement(HeadCell, _extends({
16
17
  style: inlineStyles,
@@ -1,5 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["cells"],
4
+ _excluded2 = ["content"];
3
5
  import React from 'react';
4
6
  import { TableBodyCell } from '../styled/TableCell';
5
7
  import { TableBodyRow } from '../styled/TableRow';
@@ -12,7 +14,7 @@ var Row = function Row(_ref) {
12
14
  isHighlighted = _ref.isHighlighted;
13
15
 
14
16
  var cells = row.cells,
15
- restRowProps = _objectWithoutProperties(row, ["cells"]);
17
+ restRowProps = _objectWithoutProperties(row, _excluded);
16
18
 
17
19
  return /*#__PURE__*/React.createElement(TableBodyRow, _extends({}, restRowProps, {
18
20
  isHighlighted: isHighlighted
@@ -22,7 +24,7 @@ var Row = function Row(_ref) {
22
24
  "data-testid": testId && "".concat(testId, "--row-").concat(restRowProps.key)
23
25
  }), cells.map(function (cell, cellIndex) {
24
26
  var content = cell.content,
25
- restCellProps = _objectWithoutProperties(cell, ["content"]);
27
+ restCellProps = _objectWithoutProperties(cell, _excluded2);
26
28
 
27
29
  var _ref2 = (head || {
28
30
  cells: []
@@ -5,6 +5,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
5
5
  import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
+ var _excluded = ["content"];
8
9
 
9
10
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
11
 
@@ -37,7 +38,7 @@ export var RankableTableCell = /*#__PURE__*/function (_React$Component) {
37
38
  innerRef = _this$props.innerRef;
38
39
 
39
40
  var content = cell.content,
40
- restCellProps = _objectWithoutProperties(cell, ["content"]);
41
+ restCellProps = _objectWithoutProperties(cell, _excluded);
41
42
 
42
43
  var _ref = head || {},
43
44
  shouldTruncate = _ref.shouldTruncate,
@@ -5,6 +5,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
5
5
  import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
+ var _excluded = ["isRanking", "refHeight", "refWidth"];
8
9
 
9
10
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
11
 
@@ -33,7 +34,7 @@ var RankableTableHeadCell = /*#__PURE__*/function (_React$Component) {
33
34
  isRanking = _this$props.isRanking,
34
35
  refHeight = _this$props.refHeight,
35
36
  refWidth = _this$props.refWidth,
36
- restProps = _objectWithoutProperties(_this$props, ["isRanking", "refHeight", "refWidth"]);
37
+ restProps = _objectWithoutProperties(_this$props, _excluded);
37
38
 
38
39
  var inlineStyles = inlineStylesIfRanking(isRanking, refWidth);
39
40
  return /*#__PURE__*/React.createElement(HeadCell, _extends({
@@ -7,10 +7,11 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
7
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
+ var _excluded = ["cells", "key"];
10
11
 
11
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
12
+ 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; }
12
13
 
13
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
14
+ 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; }
14
15
 
15
16
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
16
17
 
@@ -69,7 +70,7 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
69
70
 
70
71
  var cells = row.cells,
71
72
  key = row.key,
72
- restRowProps = _objectWithoutProperties(row, ["cells", "key"]);
73
+ restRowProps = _objectWithoutProperties(row, _excluded);
73
74
 
74
75
  var inlineStyles = inlineStylesIfRanking(isRanking, refWidth);
75
76
 
@@ -8,10 +8,11 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
10
  import _typeof from "@babel/runtime/helpers/typeof";
11
+ var _excluded = ["rows", "head", "sortKey", "sortOrder", "rowsPerPage", "page"];
11
12
 
12
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
13
+ 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; }
13
14
 
14
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
15
+ 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; }
15
16
 
16
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
17
18
 
@@ -147,7 +148,7 @@ export default function withSortedPageRows(WrappedComponent) {
147
148
  sortOrder = _this$props.sortOrder,
148
149
  rowsPerPage = _this$props.rowsPerPage,
149
150
  page = _this$props.page,
150
- restProps = _objectWithoutProperties(_this$props, ["rows", "head", "sortKey", "sortOrder", "rowsPerPage", "page"]);
151
+ restProps = _objectWithoutProperties(_this$props, _excluded);
151
152
 
152
153
  return /*#__PURE__*/React.createElement(WrappedComponent //@ts-expect-error TODO Fix legit TypeScript 3.9.6 improved inference error
153
154
  , _extends({
@@ -1,7 +1,5 @@
1
1
  export var ASC = 'ASC';
2
2
  export var DESC = 'DESC';
3
3
  export var SMALL = 'small';
4
- export var MEDIUM = 'medium';
5
4
  export var LARGE = 'large';
6
- export var XLARGE = 'xlarge';
7
5
  export var LOADING_CONTENTS_OPACITY = 0.22;
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
+ var _excluded = ["isFixedSize", "children"];
4
5
 
5
6
  /** @jsx jsx */
6
7
  import { forwardRef } from 'react';
@@ -29,7 +30,7 @@ export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
29
30
 
30
31
  var isFixedSize = _ref.isFixedSize,
31
32
  children = _ref.children,
32
- rest = _objectWithoutProperties(_ref, ["isFixedSize", "children"]);
33
+ rest = _objectWithoutProperties(_ref, _excluded);
33
34
 
34
35
  var theme = useGlobalTheme();
35
36
  return jsx("table", _extends({
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["width", "isFixedSize", "shouldTruncate", "innerRef"];
3
4
 
4
5
  /** @jsx jsx */
5
6
  import { jsx } from '@emotion/core';
@@ -9,7 +10,7 @@ export var TableBodyCell = function TableBodyCell(_ref) {
9
10
  isFixedSize = _ref.isFixedSize,
10
11
  shouldTruncate = _ref.shouldTruncate,
11
12
  innerRef = _ref.innerRef,
12
- props = _objectWithoutProperties(_ref, ["width", "isFixedSize", "shouldTruncate", "innerRef"]);
13
+ props = _objectWithoutProperties(_ref, _excluded);
13
14
 
14
15
  return jsx("td", _extends({
15
16
  style: getTruncationStyleVars({