@atlaskit/dynamic-table 14.2.3 → 14.4.0
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 +39 -0
- package/dist/cjs/components/Body.js +2 -2
- package/dist/cjs/components/LoadingContainer.js +1 -1
- package/dist/cjs/components/LoadingContainerAdvanced.js +4 -4
- package/dist/cjs/components/Stateful.js +5 -3
- package/dist/cjs/components/Stateless.js +6 -4
- package/dist/cjs/components/TableHead.js +1 -1
- package/dist/cjs/components/TableHeadCell.js +18 -48
- package/dist/cjs/components/TableRow.js +4 -1
- package/dist/cjs/components/managedPagination.js +1 -1
- package/dist/cjs/components/rankable/Body.js +2 -2
- package/dist/cjs/components/rankable/TableCell.js +5 -5
- package/dist/cjs/components/rankable/TableHeadCell.js +3 -5
- package/dist/cjs/components/rankable/TableRow.js +5 -5
- package/dist/cjs/hoc/withDimensions.js +3 -5
- package/dist/cjs/hoc/withSortedPageRows.js +4 -6
- package/dist/cjs/styled/DynamicTable.js +80 -50
- package/dist/cjs/styled/EmptyBody.js +23 -28
- package/dist/cjs/styled/LoadingContainer.js +41 -36
- package/dist/cjs/styled/LoadingContainerAdvanced.js +42 -36
- package/dist/cjs/styled/TableCell.js +21 -15
- package/dist/cjs/styled/TableHead.js +157 -45
- package/dist/cjs/styled/TableRow.js +36 -42
- package/dist/cjs/styled/constants.js +33 -118
- package/dist/cjs/styled/rankable/RowPlaceholder.js +11 -12
- package/dist/cjs/styled/rankable/TableCell.js +18 -27
- package/dist/cjs/styled/rankable/TableRow.js +32 -54
- package/dist/cjs/theme.js +33 -20
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Body.js +1 -1
- package/dist/es2019/components/LoadingContainerAdvanced.js +2 -4
- package/dist/es2019/components/Stateful.js +4 -2
- package/dist/es2019/components/Stateless.js +5 -3
- package/dist/es2019/components/TableHeadCell.js +18 -22
- package/dist/es2019/components/TableRow.js +4 -1
- package/dist/es2019/components/rankable/Body.js +1 -1
- package/dist/es2019/components/rankable/TableCell.js +4 -4
- package/dist/es2019/components/rankable/TableHeadCell.js +1 -3
- package/dist/es2019/components/rankable/TableRow.js +3 -3
- package/dist/es2019/hoc/withDimensions.js +2 -4
- package/dist/es2019/hoc/withSortedPageRows.js +2 -4
- package/dist/es2019/styled/DynamicTable.js +75 -27
- package/dist/es2019/styled/EmptyBody.js +21 -11
- package/dist/es2019/styled/LoadingContainer.js +39 -18
- package/dist/es2019/styled/LoadingContainerAdvanced.js +38 -20
- package/dist/es2019/styled/TableCell.js +20 -5
- package/dist/es2019/styled/TableHead.js +160 -33
- package/dist/es2019/styled/TableRow.js +34 -20
- package/dist/es2019/styled/constants.js +30 -88
- package/dist/es2019/styled/rankable/RowPlaceholder.js +10 -4
- package/dist/es2019/styled/rankable/TableCell.js +16 -9
- package/dist/es2019/styled/rankable/TableRow.js +32 -24
- package/dist/es2019/theme.js +25 -18
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/Body.js +2 -2
- package/dist/esm/components/LoadingContainer.js +1 -1
- package/dist/esm/components/LoadingContainerAdvanced.js +4 -4
- package/dist/esm/components/Stateful.js +5 -3
- package/dist/esm/components/Stateless.js +6 -4
- package/dist/esm/components/TableHead.js +1 -1
- package/dist/esm/components/TableHeadCell.js +19 -47
- package/dist/esm/components/TableRow.js +4 -1
- package/dist/esm/components/managedPagination.js +1 -1
- package/dist/esm/components/rankable/Body.js +2 -2
- package/dist/esm/components/rankable/TableCell.js +5 -5
- package/dist/esm/components/rankable/TableHeadCell.js +3 -5
- package/dist/esm/components/rankable/TableRow.js +5 -5
- package/dist/esm/hoc/withDimensions.js +3 -5
- package/dist/esm/hoc/withSortedPageRows.js +4 -6
- package/dist/esm/styled/DynamicTable.js +75 -46
- package/dist/esm/styled/EmptyBody.js +23 -26
- package/dist/esm/styled/LoadingContainer.js +40 -36
- package/dist/esm/styled/LoadingContainerAdvanced.js +41 -35
- package/dist/esm/styled/TableCell.js +21 -15
- package/dist/esm/styled/TableHead.js +152 -41
- package/dist/esm/styled/TableRow.js +38 -42
- package/dist/esm/styled/constants.js +28 -108
- package/dist/esm/styled/rankable/RowPlaceholder.js +12 -14
- package/dist/esm/styled/rankable/TableCell.js +18 -27
- package/dist/esm/styled/rankable/TableRow.js +33 -54
- package/dist/esm/theme.js +25 -18
- package/dist/esm/version.json +1 -1
- package/dist/types/components/Body.d.ts +22 -22
- package/dist/types/components/LoadingContainerAdvanced.d.ts +2 -2
- package/dist/types/components/Stateless.d.ts +3 -3
- package/dist/types/components/TableHeadCell.d.ts +4 -9
- package/dist/types/components/rankable/Body.d.ts +22 -22
- package/dist/types/components/rankable/TableHeadCell.d.ts +1 -1
- package/dist/types/components/rankable/TableRow.d.ts +3 -3
- package/dist/types/hoc/withDimensions.d.ts +2 -2
- package/dist/types/hoc/withSortedPageRows.d.ts +20 -20
- package/dist/types/styled/DynamicTable.d.ts +13 -6
- package/dist/types/styled/EmptyBody.d.ts +4 -3
- package/dist/types/styled/LoadingContainer.d.ts +8 -7
- package/dist/types/styled/LoadingContainerAdvanced.d.ts +5 -4
- package/dist/types/styled/TableCell.d.ts +3 -2
- package/dist/types/styled/TableHead.d.ts +8 -5
- package/dist/types/styled/TableRow.d.ts +7 -4
- package/dist/types/styled/constants.d.ts +13 -10
- package/dist/types/styled/rankable/RowPlaceholder.d.ts +3 -2
- package/dist/types/styled/rankable/TableCell.d.ts +8 -6
- package/dist/types/styled/rankable/TableRow.d.ts +9 -6
- package/dist/types/theme.d.ts +15 -9
- package/dist/types/types.d.ts +18 -6
- package/package.json +15 -9
|
@@ -8,13 +8,13 @@ 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
|
|
|
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; }
|
|
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
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
14
|
|
|
15
15
|
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
16
|
|
|
17
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
17
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
18
18
|
|
|
19
19
|
import React from 'react';
|
|
20
20
|
import { Draggable } from 'react-beautiful-dnd';
|
|
@@ -42,7 +42,7 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
|
|
|
42
42
|
return function (ref) {
|
|
43
43
|
innerRefFn(ref);
|
|
44
44
|
|
|
45
|
-
if (_this.props.innerRef) {
|
|
45
|
+
if (typeof _this.props.innerRef === 'function') {
|
|
46
46
|
_this.props.innerRef(ref);
|
|
47
47
|
}
|
|
48
48
|
};
|
|
@@ -78,12 +78,12 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
return /*#__PURE__*/React.createElement(Draggable, {
|
|
81
|
-
draggableId: key ||
|
|
81
|
+
draggableId: key || rowIndex.toString(),
|
|
82
82
|
index: rowIndex,
|
|
83
83
|
isDragDisabled: isRankingDisabled
|
|
84
84
|
}, function (provided, snapshot) {
|
|
85
85
|
return /*#__PURE__*/React.createElement(RankableTableBodyRow, _extends({}, restRowProps, provided.dragHandleProps, provided.draggableProps, {
|
|
86
|
-
|
|
86
|
+
ref: _this2.innerRef(provided.innerRef),
|
|
87
87
|
style: _objectSpread(_objectSpread({}, provided.draggableProps.style), inlineStyles),
|
|
88
88
|
isHighlighted: isHighlighted,
|
|
89
89
|
isRanking: isRanking,
|
|
@@ -9,14 +9,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
9
9
|
|
|
10
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); }; }
|
|
11
11
|
|
|
12
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
12
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
13
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
// Compute height and width of wrapped component before ranking
|
|
16
16
|
export default function withDimensions(WrappedComponent) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return _temp = /*#__PURE__*/function (_React$Component) {
|
|
17
|
+
return /*#__PURE__*/function (_React$Component) {
|
|
20
18
|
_inherits(WithDimensions, _React$Component);
|
|
21
19
|
|
|
22
20
|
var _super = _createSuper(WithDimensions);
|
|
@@ -91,5 +89,5 @@ export default function withDimensions(WrappedComponent) {
|
|
|
91
89
|
}]);
|
|
92
90
|
|
|
93
91
|
return WithDimensions;
|
|
94
|
-
}(React.Component)
|
|
92
|
+
}(React.Component);
|
|
95
93
|
}
|
|
@@ -9,13 +9,13 @@ 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
11
|
|
|
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; }
|
|
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
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
15
|
|
|
16
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); }; }
|
|
17
17
|
|
|
18
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
18
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
19
19
|
|
|
20
20
|
import React from 'react';
|
|
21
21
|
import { ASC } from '../internal/constants';
|
|
@@ -102,9 +102,7 @@ var getSortedRows = function getSortedRows(head, rows, sortKey, sortOrder) {
|
|
|
102
102
|
|
|
103
103
|
// get one page of data in table, sorting all rows previously
|
|
104
104
|
export default function withSortedPageRows(WrappedComponent) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return _temp = /*#__PURE__*/function (_React$Component) {
|
|
105
|
+
return /*#__PURE__*/function (_React$Component) {
|
|
108
106
|
_inherits(WithSortedPageRows, _React$Component);
|
|
109
107
|
|
|
110
108
|
var _super = _createSuper(WithSortedPageRows);
|
|
@@ -186,5 +184,5 @@ export default function withSortedPageRows(WrappedComponent) {
|
|
|
186
184
|
}]);
|
|
187
185
|
|
|
188
186
|
return WithSortedPageRows;
|
|
189
|
-
}(React.Component)
|
|
187
|
+
}(React.Component);
|
|
190
188
|
}
|
|
@@ -1,51 +1,80 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return data;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
return data;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function _templateObject() {
|
|
34
|
-
var data = _taggedTemplateLiteral(["\n ", ";\n border-collapse: collapse;\n width: 100%;\n"]);
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
import { forwardRef } from 'react';
|
|
7
|
+
import { css, jsx } from '@emotion/core';
|
|
8
|
+
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
9
|
+
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
10
|
+
import { row } from '../theme';
|
|
11
|
+
var gridSize = getGridSize();
|
|
12
|
+
// CSS vars for table row
|
|
13
|
+
// these are declared here to avoid being re-declared in each table row
|
|
14
|
+
export var tableRowCSSVars = {
|
|
15
|
+
CSS_VAR_HOVER_BACKGROUND: '--local-dynamic-table-hover-bg',
|
|
16
|
+
CSS_VAR_HIGHLIGHTED_BACKGROUND: '--local-dynamic-table-highlighted-bg',
|
|
17
|
+
CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND: '--local-dynamic-table-hover-highlighted-bg',
|
|
18
|
+
CSS_VAR_ROW_FOCUS_OUTLINE: '--local-dynamic-table-row-focus-outline'
|
|
19
|
+
};
|
|
20
|
+
var fixedSizeTableStyles = css({
|
|
21
|
+
tableLayout: 'fixed'
|
|
22
|
+
});
|
|
23
|
+
var tableStyles = css({
|
|
24
|
+
borderCollapse: 'collapse',
|
|
25
|
+
width: '100%'
|
|
26
|
+
});
|
|
27
|
+
export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
28
|
+
var _ref2;
|
|
35
29
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
var isFixedSize = _ref.isFixedSize,
|
|
31
|
+
children = _ref.children,
|
|
32
|
+
rest = _objectWithoutProperties(_ref, ["isFixedSize", "children"]);
|
|
39
33
|
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
var theme = useGlobalTheme();
|
|
35
|
+
return jsx("table", _extends({
|
|
36
|
+
style: (_ref2 = {}, _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND, row.hoverBackground({
|
|
37
|
+
theme: theme
|
|
38
|
+
})), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND, row.highlightedBackground({
|
|
39
|
+
theme: theme
|
|
40
|
+
})), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND, row.hoverHighlightedBackground({
|
|
41
|
+
theme: theme
|
|
42
|
+
})), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_ROW_FOCUS_OUTLINE, row.focusOutline({
|
|
43
|
+
theme: theme
|
|
44
|
+
})), _ref2),
|
|
45
|
+
css: [tableStyles, isFixedSize && fixedSizeTableStyles],
|
|
46
|
+
ref: ref
|
|
47
|
+
}, rest), children);
|
|
48
|
+
});
|
|
49
|
+
var captionStyles = css({
|
|
50
|
+
fontSize: '1.42857143em',
|
|
42
51
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
/* there is a bug in Safari: if element which creates a new stacking context
|
|
53
|
+
is a child of a table, table caption re-renders in bad wrong position
|
|
54
|
+
https://stackoverflow.com/questions/44009186/safari-bug-translating-table-row-group-using-gsap-make-caption-jump-to-bottom
|
|
55
|
+
*/
|
|
56
|
+
willChange: 'transform',
|
|
57
|
+
fontStyle: 'inherit',
|
|
58
|
+
fontWeight: 500,
|
|
59
|
+
letterSpacing: '-0.008em',
|
|
60
|
+
lineHeight: 1.2,
|
|
61
|
+
marginBottom: "".concat(gridSize, "px"),
|
|
62
|
+
marginTop: "".concat(gridSize * 3.5, "px"),
|
|
63
|
+
textAlign: 'left'
|
|
64
|
+
});
|
|
65
|
+
export var Caption = function Caption(_ref3) {
|
|
66
|
+
var children = _ref3.children;
|
|
67
|
+
return jsx("caption", {
|
|
68
|
+
css: captionStyles
|
|
69
|
+
}, children);
|
|
70
|
+
};
|
|
71
|
+
var paginationWrapperStyles = css({
|
|
72
|
+
display: 'flex',
|
|
73
|
+
justifyContent: 'center'
|
|
49
74
|
});
|
|
50
|
-
export var
|
|
51
|
-
|
|
75
|
+
export var PaginationWrapper = function PaginationWrapper(_ref4) {
|
|
76
|
+
var children = _ref4.children;
|
|
77
|
+
return jsx("div", {
|
|
78
|
+
css: paginationWrapperStyles
|
|
79
|
+
}, children);
|
|
80
|
+
};
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _templateObject2() {
|
|
4
|
-
var data = _taggedTemplateLiteral(["\n margin: auto;\n padding: 10px;\n text-align: center;\n width: 50%;\n"]);
|
|
5
|
-
|
|
6
|
-
_templateObject2 = function _templateObject2() {
|
|
7
|
-
return data;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
return data;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function _templateObject() {
|
|
14
|
-
var data = _taggedTemplateLiteral(["\n height: ", "px;\n"]);
|
|
15
|
-
|
|
16
|
-
_templateObject = function _templateObject() {
|
|
17
|
-
return data;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
return data;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
import styled from 'styled-components';
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/core';
|
|
24
3
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
4
|
+
var fixedHeightStyles = css({
|
|
5
|
+
height: "".concat(gridSize() * 18, "px")
|
|
6
|
+
});
|
|
7
|
+
export var EmptyViewWithFixedHeight = function EmptyViewWithFixedHeight(_ref) {
|
|
8
|
+
var children = _ref.children;
|
|
9
|
+
return jsx("div", {
|
|
10
|
+
css: fixedHeightStyles
|
|
11
|
+
}, children);
|
|
12
|
+
};
|
|
13
|
+
var emptyViewContainerStyles = css({
|
|
14
|
+
margin: 'auto',
|
|
15
|
+
padding: '10px',
|
|
16
|
+
textAlign: 'center',
|
|
17
|
+
width: '50%'
|
|
18
|
+
});
|
|
19
|
+
export var EmptyViewContainer = function EmptyViewContainer(_ref2) {
|
|
20
|
+
var children = _ref2.children;
|
|
21
|
+
return jsx("div", {
|
|
22
|
+
css: emptyViewContainerStyles
|
|
23
|
+
}, children);
|
|
24
|
+
};
|
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return p.contentsOpacity;
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { css, jsx } from '@emotion/core';
|
|
5
|
+
var CSS_VAR_CONTENTS_OPACITY = '--contents-opacity';
|
|
6
|
+
var containerStyles = css({
|
|
7
|
+
position: 'relative'
|
|
8
|
+
});
|
|
9
|
+
export var Container = function Container(_ref) {
|
|
10
|
+
var children = _ref.children;
|
|
11
|
+
return jsx("div", {
|
|
12
|
+
css: containerStyles
|
|
13
|
+
}, children);
|
|
14
|
+
};
|
|
15
|
+
var contentsContainerStyles = css({
|
|
16
|
+
pointerEvents: 'none',
|
|
17
|
+
opacity: "var(".concat(CSS_VAR_CONTENTS_OPACITY, ")")
|
|
18
|
+
});
|
|
19
|
+
export var ContentsContainer = function ContentsContainer(_ref2) {
|
|
20
|
+
var contentsOpacity = _ref2.contentsOpacity,
|
|
21
|
+
children = _ref2.children;
|
|
22
|
+
return jsx("div", {
|
|
23
|
+
style: _defineProperty({}, CSS_VAR_CONTENTS_OPACITY, contentsOpacity),
|
|
24
|
+
css: [contentsContainerStyles]
|
|
25
|
+
}, children);
|
|
26
|
+
};
|
|
27
|
+
var spinnerContainerStyles = css({
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
top: 0,
|
|
30
|
+
right: 0,
|
|
31
|
+
bottom: 0,
|
|
32
|
+
left: 0,
|
|
33
|
+
display: 'flex',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
justifyContent: 'center'
|
|
37
36
|
});
|
|
38
|
-
export var SpinnerContainer =
|
|
37
|
+
export var SpinnerContainer = function SpinnerContainer(_ref4) {
|
|
38
|
+
var children = _ref4.children;
|
|
39
|
+
return jsx("div", {
|
|
40
|
+
css: spinnerContainerStyles
|
|
41
|
+
}, children);
|
|
42
|
+
};
|
|
@@ -1,37 +1,43 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
_templateObject3 = function _templateObject3() {
|
|
7
|
-
return data;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
return data;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function _templateObject2() {
|
|
14
|
-
var data = _taggedTemplateLiteral(["\n pointer-events: none;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n"]);
|
|
15
|
-
|
|
16
|
-
_templateObject2 = function _templateObject2() {
|
|
17
|
-
return data;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
return data;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function _templateObject() {
|
|
24
|
-
var data = _taggedTemplateLiteral(["\n margin-bottom: ", "px;\n position: relative;\n"]);
|
|
25
|
-
|
|
26
|
-
_templateObject = function _templateObject() {
|
|
27
|
-
return data;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
return data;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
import styled from 'styled-components';
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { css, jsx } from '@emotion/core';
|
|
34
6
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
7
|
+
var containerStyles = css({
|
|
8
|
+
marginBottom: "".concat(gridSize() * 3, "px"),
|
|
9
|
+
position: 'relative'
|
|
10
|
+
});
|
|
11
|
+
export var Container = function Container(props) {
|
|
12
|
+
return jsx("div", _extends({
|
|
13
|
+
css: containerStyles
|
|
14
|
+
}, props));
|
|
15
|
+
};
|
|
16
|
+
var spinnerBackdropStyles = css({
|
|
17
|
+
pointerEvents: 'none',
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
top: 0,
|
|
20
|
+
right: 0,
|
|
21
|
+
bottom: 0,
|
|
22
|
+
left: 0,
|
|
23
|
+
display: 'flex',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center'
|
|
26
|
+
});
|
|
27
|
+
export var SpinnerBackdrop = function SpinnerBackdrop(_ref) {
|
|
28
|
+
var children = _ref.children;
|
|
29
|
+
return jsx("div", {
|
|
30
|
+
css: spinnerBackdropStyles
|
|
31
|
+
}, children);
|
|
32
|
+
};
|
|
33
|
+
var spinnerContainerStyles = css({
|
|
34
|
+
position: 'relative',
|
|
35
|
+
top: 0
|
|
36
|
+
});
|
|
37
|
+
export var SpinnerContainer = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
38
|
+
var children = _ref2.children;
|
|
39
|
+
return jsx("div", {
|
|
40
|
+
css: spinnerContainerStyles,
|
|
41
|
+
ref: ref
|
|
42
|
+
}, children);
|
|
43
|
+
});
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
/** @jsx jsx */
|
|
5
|
+
import { jsx } from '@emotion/core';
|
|
6
|
+
import { cellStyles, fixedSizeTruncateStyles, getTruncationStyleVars, overflowTruncateStyles, truncationWidthStyles } from './constants';
|
|
7
|
+
export var TableBodyCell = function TableBodyCell(_ref) {
|
|
8
|
+
var width = _ref.width,
|
|
9
|
+
isFixedSize = _ref.isFixedSize,
|
|
10
|
+
shouldTruncate = _ref.shouldTruncate,
|
|
11
|
+
innerRef = _ref.innerRef,
|
|
12
|
+
props = _objectWithoutProperties(_ref, ["width", "isFixedSize", "shouldTruncate", "innerRef"]);
|
|
5
13
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return truncateStyle(props);
|
|
17
|
-
}, cellStyle);
|
|
14
|
+
return jsx("td", _extends({
|
|
15
|
+
style: getTruncationStyleVars({
|
|
16
|
+
width: width
|
|
17
|
+
}),
|
|
18
|
+
css: [truncationWidthStyles, isFixedSize && shouldTruncate && fixedSizeTruncateStyles, isFixedSize && overflowTruncateStyles, cellStyles] // HOC withDimensions complains about the types but it is working fine
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
,
|
|
21
|
+
ref: innerRef
|
|
22
|
+
}, props));
|
|
23
|
+
};
|