@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.
- package/CHANGELOG.md +25 -0
- package/README.md +2 -2
- package/dist/cjs/components/Stateful.js +26 -0
- package/dist/cjs/components/Stateless.js +2 -2
- package/dist/cjs/components/TableHead.js +5 -2
- package/dist/cjs/components/TableHeadCell.js +3 -1
- package/dist/cjs/components/TableRow.js +5 -2
- package/dist/cjs/components/{managedPagination.js → managed-pagination.js} +0 -0
- package/dist/cjs/components/rankable/TableCell.js +3 -1
- package/dist/cjs/components/rankable/TableHeadCell.js +3 -1
- package/dist/cjs/components/rankable/TableRow.js +5 -3
- package/dist/cjs/hoc/withSortedPageRows.js +5 -3
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/internal/constants.js +1 -5
- package/dist/cjs/internal/helpers.js +1 -1
- package/dist/cjs/styled/DynamicTable.js +3 -3
- package/dist/cjs/styled/EmptyBody.js +1 -1
- package/dist/cjs/styled/TableCell.js +3 -2
- package/dist/cjs/styled/TableHead.js +13 -12
- package/dist/cjs/styled/TableRow.js +6 -8
- package/dist/cjs/styled/constants.js +2 -2
- package/dist/cjs/styled/rankable/TableCell.js +2 -2
- package/dist/cjs/styled/rankable/TableRow.js +5 -7
- package/dist/cjs/theme.js +19 -21
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Stateful.js +27 -0
- package/dist/es2019/components/Stateless.js +2 -2
- package/dist/es2019/components/{managedPagination.js → managed-pagination.js} +0 -0
- package/dist/es2019/internal/constants.js +0 -2
- package/dist/es2019/styled/TableHead.js +5 -6
- package/dist/es2019/styled/TableRow.js +4 -5
- package/dist/es2019/styled/constants.js +1 -1
- package/dist/es2019/styled/rankable/TableRow.js +3 -4
- package/dist/es2019/theme.js +18 -19
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/Stateful.js +26 -0
- package/dist/esm/components/Stateless.js +2 -2
- package/dist/esm/components/TableHead.js +4 -2
- package/dist/esm/components/TableHeadCell.js +2 -1
- package/dist/esm/components/TableRow.js +4 -2
- package/dist/esm/components/{managedPagination.js → managed-pagination.js} +0 -0
- package/dist/esm/components/rankable/TableCell.js +2 -1
- package/dist/esm/components/rankable/TableHeadCell.js +2 -1
- package/dist/esm/components/rankable/TableRow.js +4 -3
- package/dist/esm/hoc/withSortedPageRows.js +4 -3
- package/dist/esm/internal/constants.js +0 -2
- package/dist/esm/styled/DynamicTable.js +2 -1
- package/dist/esm/styled/TableCell.js +2 -1
- package/dist/esm/styled/TableHead.js +11 -10
- package/dist/esm/styled/TableRow.js +6 -6
- package/dist/esm/styled/constants.js +1 -1
- package/dist/esm/styled/rankable/TableCell.js +2 -1
- package/dist/esm/styled/rankable/TableRow.js +5 -5
- package/dist/esm/theme.js +18 -19
- package/dist/esm/version.json +1 -1
- package/dist/types/components/LoadingContainer.d.ts +3 -3
- package/dist/types/components/LoadingContainerAdvanced.d.ts +1 -1
- package/dist/types/components/Stateful.d.ts +26 -0
- package/dist/types/components/TableRow.d.ts +1 -0
- package/dist/types/components/{managedPagination.d.ts → managed-pagination.d.ts} +4 -7
- package/dist/types/internal/constants.d.ts +0 -2
- package/dist/types/styled/constants.d.ts +1 -1
- package/dist/types/types.d.ts +74 -35
- 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.
|
|
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: (
|
|
30
|
-
dark: (
|
|
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: (
|
|
34
|
-
dark: (
|
|
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: (
|
|
38
|
-
dark: (
|
|
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: (
|
|
45
|
-
dark: (
|
|
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: (
|
|
49
|
-
dark: (
|
|
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: (
|
|
53
|
-
dark: (
|
|
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: (
|
|
57
|
-
dark: (
|
|
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: (
|
|
64
|
-
dark: (
|
|
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: (
|
|
68
|
-
dark: (
|
|
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;
|
package/dist/cjs/version.json
CHANGED
|
@@ -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 './
|
|
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.
|
|
16
|
+
const packageVersion = "14.4.4";
|
|
17
17
|
|
|
18
18
|
function toggleSortOrder(currentSortOrder) {
|
|
19
19
|
switch (currentSortOrder) {
|
|
File without changes
|
|
@@ -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 ${
|
|
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:
|
|
41
|
+
color: `var(--ds-text-lowEmphasis, ${`var(${CSS_VAR_TEXT_COLOR})`})`,
|
|
43
42
|
'&:focus': {
|
|
44
|
-
outline: `solid 2px ${
|
|
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:
|
|
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 ${
|
|
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:
|
|
15
|
+
backgroundColor: `var(--ds-background-transparentNeutral-hover, ${`var(${cssVars.CSS_VAR_HOVER_BACKGROUND})`})`
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
18
|
const rowHighlightedBackgroundStyles = css({
|
|
20
|
-
backgroundColor:
|
|
19
|
+
backgroundColor: `var(--ds-background-selected-resting, ${`var(${cssVars.CSS_VAR_HIGHLIGHTED_BACKGROUND})`})`,
|
|
21
20
|
'&:hover': {
|
|
22
|
-
backgroundColor:
|
|
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(({
|
|
@@ -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 =
|
|
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:
|
|
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:
|
|
25
|
+
outlineColor: `var(--ds-border-focus, ${B100})`
|
|
27
26
|
},
|
|
28
27
|
outlineWidth: '2px'
|
|
29
28
|
});
|
package/dist/es2019/theme.js
CHANGED
|
@@ -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:
|
|
13
|
-
dark:
|
|
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:
|
|
17
|
-
dark:
|
|
15
|
+
light: `var(--ds-text-lowEmphasis, ${colors.N300})`,
|
|
16
|
+
dark: `var(--ds-text-lowEmphasis, ${colors.DN300})`
|
|
18
17
|
}),
|
|
19
18
|
hoverColor: themed({
|
|
20
|
-
light:
|
|
21
|
-
dark:
|
|
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:
|
|
27
|
-
dark:
|
|
25
|
+
light: `var(--ds-border-focus, ${colors.B100})`,
|
|
26
|
+
dark: `var(--ds-border-focus, ${colors.B100})`
|
|
28
27
|
}),
|
|
29
28
|
highlightedBackground: themed({
|
|
30
|
-
light:
|
|
31
|
-
dark:
|
|
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:
|
|
35
|
-
dark:
|
|
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:
|
|
39
|
-
dark:
|
|
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:
|
|
45
|
-
dark:
|
|
43
|
+
light: `var(--ds-border-neutral, ${colors.N40})`,
|
|
44
|
+
dark: `var(--ds-border-neutral, ${colors.DN50})`
|
|
46
45
|
}),
|
|
47
46
|
textColor: themed({
|
|
48
|
-
light:
|
|
49
|
-
dark:
|
|
47
|
+
light: `var(--ds-text-lowEmphasis, ${colors.N300})`,
|
|
48
|
+
dark: `var(--ds-text-lowEmphasis, ${colors.DN300})`
|
|
50
49
|
})
|
|
51
50
|
};
|
package/dist/es2019/version.json
CHANGED
|
@@ -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 './
|
|
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.
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
27
|
+
restCellProps = _objectWithoutProperties(cell, _excluded2);
|
|
26
28
|
|
|
27
29
|
var _ref2 = (head || {
|
|
28
30
|
cells: []
|
|
File without changes
|
|
@@ -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,
|
|
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,
|
|
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);
|
|
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]
|
|
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,
|
|
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);
|
|
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]
|
|
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,
|
|
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,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,
|
|
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,
|
|
13
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
14
|
|
|
14
15
|
return jsx("td", _extends({
|
|
15
16
|
style: getTruncationStyleVars({
|