@atlaskit/dynamic-table 16.1.3 → 16.1.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 +6 -0
- package/dist/cjs/components/body.js +5 -7
- package/dist/cjs/components/error-boundary.js +5 -7
- package/dist/cjs/components/loading-container-advanced.js +19 -22
- package/dist/cjs/components/loading-container.js +5 -7
- package/dist/cjs/components/managed-pagination.js +6 -9
- package/dist/cjs/components/rankable/body.js +7 -10
- package/dist/cjs/components/rankable/table-cell.js +5 -7
- package/dist/cjs/components/rankable/table-head-cell.js +5 -7
- package/dist/cjs/components/rankable/table-row.js +6 -9
- package/dist/cjs/components/stateful.js +10 -13
- package/dist/cjs/components/stateless.js +2 -2
- package/dist/cjs/components/table-head.js +5 -7
- package/dist/cjs/hoc/with-dimensions.js +8 -11
- package/dist/cjs/hoc/with-sorted-page-rows.js +6 -9
- package/dist/cjs/styled/dynamic-table.js +1 -2
- package/dist/es2019/components/stateless.js +2 -2
- package/dist/esm/components/body.js +5 -7
- package/dist/esm/components/error-boundary.js +5 -7
- package/dist/esm/components/loading-container-advanced.js +19 -22
- package/dist/esm/components/loading-container.js +5 -7
- package/dist/esm/components/managed-pagination.js +6 -9
- package/dist/esm/components/rankable/body.js +7 -10
- package/dist/esm/components/rankable/table-cell.js +5 -7
- package/dist/esm/components/rankable/table-head-cell.js +5 -7
- package/dist/esm/components/rankable/table-row.js +6 -9
- package/dist/esm/components/stateful.js +10 -13
- package/dist/esm/components/stateless.js +2 -2
- package/dist/esm/components/table-head.js +5 -7
- package/dist/esm/hoc/with-dimensions.js +8 -11
- package/dist/esm/hoc/with-sorted-page-rows.js +6 -9
- package/dist/esm/styled/dynamic-table.js +1 -2
- package/package.json +7 -7
|
@@ -9,9 +9,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _helpers = require("../internal/helpers");
|
|
17
17
|
var _tableHead = require("../styled/table-head");
|
|
@@ -19,16 +19,15 @@ var _tableHeadCell = _interopRequireDefault(require("./rankable/table-head-cell"
|
|
|
19
19
|
var _tableHeadCell2 = _interopRequireDefault(require("./table-head-cell"));
|
|
20
20
|
var _excluded = ["cells"],
|
|
21
21
|
_excluded2 = ["colSpan", "content", "isSortable", "key", "shouldTruncate", "testId", "width"];
|
|
22
|
-
function
|
|
22
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
23
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
24
|
var TableHead = /*#__PURE__*/function (_React$Component) {
|
|
25
|
-
(0, _inherits2.default)(TableHead, _React$Component);
|
|
26
|
-
var _super = _createSuper(TableHead);
|
|
27
25
|
function TableHead() {
|
|
28
26
|
(0, _classCallCheck2.default)(this, TableHead);
|
|
29
|
-
return
|
|
27
|
+
return _callSuper(this, TableHead, arguments);
|
|
30
28
|
}
|
|
31
|
-
(0,
|
|
29
|
+
(0, _inherits2.default)(TableHead, _React$Component);
|
|
30
|
+
return (0, _createClass2.default)(TableHead, [{
|
|
32
31
|
key: "UNSAFE_componentWillMount",
|
|
33
32
|
value: function UNSAFE_componentWillMount() {
|
|
34
33
|
(0, _helpers.validateSortKey)(this.props.sortKey, this.props.head);
|
|
@@ -91,6 +90,5 @@ var TableHead = /*#__PURE__*/function (_React$Component) {
|
|
|
91
90
|
})));
|
|
92
91
|
}
|
|
93
92
|
}]);
|
|
94
|
-
return TableHead;
|
|
95
93
|
}(_react.default.Component); // eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
96
94
|
var _default = exports.default = TableHead;
|
|
@@ -8,36 +8,33 @@ exports.default = withDimensions;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
15
|
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
function
|
|
16
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
18
17
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
18
|
// Compute height and width of wrapped component before ranking
|
|
20
19
|
function withDimensions(WrappedComponent) {
|
|
21
20
|
return /*#__PURE__*/function (_React$Component) {
|
|
22
|
-
(0, _inherits2.default)(WithDimensions, _React$Component);
|
|
23
|
-
var _super = _createSuper(WithDimensions);
|
|
24
21
|
function WithDimensions() {
|
|
25
22
|
var _this;
|
|
26
23
|
(0, _classCallCheck2.default)(this, WithDimensions);
|
|
27
24
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
28
25
|
args[_key] = arguments[_key];
|
|
29
26
|
}
|
|
30
|
-
_this =
|
|
31
|
-
(0, _defineProperty2.default)(
|
|
27
|
+
_this = _callSuper(this, WithDimensions, [].concat(args));
|
|
28
|
+
(0, _defineProperty2.default)(_this, "state", {
|
|
32
29
|
refWidth: 0,
|
|
33
30
|
refHeight: 0
|
|
34
31
|
});
|
|
35
|
-
(0, _defineProperty2.default)(
|
|
32
|
+
(0, _defineProperty2.default)(_this, "innerRef", function (ref) {
|
|
36
33
|
if (ref && !_this.props.isRanking) {
|
|
37
34
|
_this.ref = ref;
|
|
38
35
|
}
|
|
39
36
|
});
|
|
40
|
-
(0, _defineProperty2.default)(
|
|
37
|
+
(0, _defineProperty2.default)(_this, "updateDimensions", function () {
|
|
41
38
|
if (!_this.ref) {
|
|
42
39
|
return;
|
|
43
40
|
}
|
|
@@ -53,7 +50,8 @@ function withDimensions(WrappedComponent) {
|
|
|
53
50
|
});
|
|
54
51
|
return _this;
|
|
55
52
|
}
|
|
56
|
-
(0,
|
|
53
|
+
(0, _inherits2.default)(WithDimensions, _React$Component);
|
|
54
|
+
return (0, _createClass2.default)(WithDimensions, [{
|
|
57
55
|
key: "UNSAFE_componentWillReceiveProps",
|
|
58
56
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
59
57
|
var wasRanking = this.props.isRanking;
|
|
@@ -79,6 +77,5 @@ function withDimensions(WrappedComponent) {
|
|
|
79
77
|
}, this.props));
|
|
80
78
|
}
|
|
81
79
|
}]);
|
|
82
|
-
return WithDimensions;
|
|
83
80
|
}(_react.default.Component);
|
|
84
81
|
}
|
|
@@ -9,10 +9,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
16
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
16
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
18
17
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -21,7 +20,7 @@ var _helpers = require("../internal/helpers");
|
|
|
21
20
|
var _excluded = ["rows", "head", "sortKey", "sortOrder", "rowsPerPage", "page", "forwardedRef"];
|
|
22
21
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
22
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
-
function
|
|
23
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
25
24
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
26
25
|
var getSortingCellValue = function getSortingCellValue(cells, head, sortKey) {
|
|
27
26
|
for (var i = 0; i < cells.length; i++) {
|
|
@@ -95,21 +94,20 @@ var getSortedRows = function getSortedRows(head, rows, sortKey, sortOrder) {
|
|
|
95
94
|
// get one page of data in table, sorting all rows previously
|
|
96
95
|
function withSortedPageRows(WrappedComponent) {
|
|
97
96
|
var WithSortedPageRows = /*#__PURE__*/function (_React$Component) {
|
|
98
|
-
(0, _inherits2.default)(WithSortedPageRows, _React$Component);
|
|
99
|
-
var _super = _createSuper(WithSortedPageRows);
|
|
100
97
|
function WithSortedPageRows() {
|
|
101
98
|
var _this;
|
|
102
99
|
(0, _classCallCheck2.default)(this, WithSortedPageRows);
|
|
103
100
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
104
101
|
args[_key] = arguments[_key];
|
|
105
102
|
}
|
|
106
|
-
_this =
|
|
107
|
-
(0, _defineProperty2.default)(
|
|
103
|
+
_this = _callSuper(this, WithSortedPageRows, [].concat(args));
|
|
104
|
+
(0, _defineProperty2.default)(_this, "state", {
|
|
108
105
|
pageRows: []
|
|
109
106
|
});
|
|
110
107
|
return _this;
|
|
111
108
|
}
|
|
112
|
-
(0,
|
|
109
|
+
(0, _inherits2.default)(WithSortedPageRows, _React$Component);
|
|
110
|
+
return (0, _createClass2.default)(WithSortedPageRows, [{
|
|
113
111
|
key: "componentDidMount",
|
|
114
112
|
value: function componentDidMount() {
|
|
115
113
|
this.props.onPageRowsUpdate && this.props.onPageRowsUpdate(this.state.pageRows);
|
|
@@ -167,7 +165,6 @@ function withSortedPageRows(WrappedComponent) {
|
|
|
167
165
|
});
|
|
168
166
|
}
|
|
169
167
|
}]);
|
|
170
|
-
return WithSortedPageRows;
|
|
171
168
|
}(_react.default.Component);
|
|
172
169
|
return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
173
170
|
return /*#__PURE__*/_react.default.createElement(WithSortedPageRows, (0, _extends2.default)({}, props, {
|
|
@@ -39,7 +39,6 @@ var bodyBorder = (0, _react2.css)({
|
|
|
39
39
|
borderBlockEnd: "2px solid ".concat(_theme.tableBorder.borderColor)
|
|
40
40
|
});
|
|
41
41
|
var Table = exports.Table = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
42
|
-
var _ref2;
|
|
43
42
|
var isFixedSize = _ref.isFixedSize,
|
|
44
43
|
hasDataRow = _ref.hasDataRow,
|
|
45
44
|
children = _ref.children,
|
|
@@ -48,7 +47,7 @@ var Table = exports.Table = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
|
48
47
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
49
48
|
return (0, _react2.jsx)("table", (0, _extends2.default)({
|
|
50
49
|
inert: isLoading ? '' : undefined,
|
|
51
|
-
style: (
|
|
50
|
+
style: (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND, _theme.row.hoverBackground), tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND, _theme.row.highlightedBackground), tableRowCSSVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND, _theme.row.hoverHighlightedBackground), tableRowCSSVars.CSS_VAR_ROW_FOCUS_OUTLINE, _theme.row.focusOutline),
|
|
52
51
|
css: [tableStyles, isFixedSize && fixedSizeTableStyles, hasDataRow && bodyBorder],
|
|
53
52
|
ref: ref
|
|
54
53
|
}, rest, {
|
|
@@ -60,14 +60,14 @@ const DynamicTable = ({
|
|
|
60
60
|
action: 'sorted',
|
|
61
61
|
componentName: 'dynamicTable',
|
|
62
62
|
packageName: "@atlaskit/dynamic-table",
|
|
63
|
-
packageVersion: "16.1.
|
|
63
|
+
packageVersion: "16.1.4"
|
|
64
64
|
});
|
|
65
65
|
const onRankEnd = usePlatformLeafEventHandler({
|
|
66
66
|
fn: providedOnRankEnd,
|
|
67
67
|
action: 'ranked',
|
|
68
68
|
componentName: 'dynamicTable',
|
|
69
69
|
packageName: "@atlaskit/dynamic-table",
|
|
70
|
-
packageVersion: "16.1.
|
|
70
|
+
packageVersion: "16.1.4"
|
|
71
71
|
});
|
|
72
72
|
useEffect(() => {
|
|
73
73
|
validateSortKey(sortKey, head);
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import withSortedPageRows from '../hoc/with-sorted-page-rows';
|
|
11
11
|
import TableRow from './table-row';
|
|
12
12
|
var BodyComponent = /*#__PURE__*/function (_React$Component) {
|
|
13
|
-
_inherits(BodyComponent, _React$Component);
|
|
14
|
-
var _super = _createSuper(BodyComponent);
|
|
15
13
|
function BodyComponent() {
|
|
16
14
|
_classCallCheck(this, BodyComponent);
|
|
17
|
-
return
|
|
15
|
+
return _callSuper(this, BodyComponent, arguments);
|
|
18
16
|
}
|
|
19
|
-
|
|
17
|
+
_inherits(BodyComponent, _React$Component);
|
|
18
|
+
return _createClass(BodyComponent, [{
|
|
20
19
|
key: "render",
|
|
21
20
|
value: function render() {
|
|
22
21
|
var _this$props = this.props,
|
|
@@ -41,7 +40,6 @@ var BodyComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
41
40
|
}));
|
|
42
41
|
}
|
|
43
42
|
}]);
|
|
44
|
-
return BodyComponent;
|
|
45
43
|
}(React.Component);
|
|
46
44
|
var Body = withSortedPageRows( /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
47
45
|
return /*#__PURE__*/React.createElement(BodyComponent, _extends({}, props, {
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
10
|
-
_inherits(ErrorBoundary, _React$Component);
|
|
11
|
-
var _super = _createSuper(ErrorBoundary);
|
|
12
10
|
function ErrorBoundary(props) {
|
|
13
11
|
var _this;
|
|
14
12
|
_classCallCheck(this, ErrorBoundary);
|
|
15
|
-
_this =
|
|
13
|
+
_this = _callSuper(this, ErrorBoundary, [props]);
|
|
16
14
|
_this.state = {
|
|
17
15
|
hasError: false
|
|
18
16
|
};
|
|
19
17
|
return _this;
|
|
20
18
|
}
|
|
21
|
-
|
|
19
|
+
_inherits(ErrorBoundary, _React$Component);
|
|
20
|
+
return _createClass(ErrorBoundary, [{
|
|
22
21
|
key: "render",
|
|
23
22
|
value: function render() {
|
|
24
23
|
if (this.state.hasError) {
|
|
@@ -36,5 +35,4 @@ export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
36
35
|
};
|
|
37
36
|
}
|
|
38
37
|
}]);
|
|
39
|
-
return ErrorBoundary;
|
|
40
38
|
}(React.Component);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
/* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
|
|
12
11
|
import React from 'react';
|
|
@@ -14,32 +13,30 @@ import Spinner from '@atlaskit/spinner';
|
|
|
14
13
|
import { LARGE, LOADING_CONTENTS_OPACITY } from '../internal/constants';
|
|
15
14
|
import { Container, SpinnerBackdrop, SpinnerContainer } from '../styled/loading-container-advanced';
|
|
16
15
|
var LoadingContainerAdvanced = /*#__PURE__*/function (_React$Component) {
|
|
17
|
-
_inherits(LoadingContainerAdvanced, _React$Component);
|
|
18
|
-
var _super = _createSuper(LoadingContainerAdvanced);
|
|
19
16
|
function LoadingContainerAdvanced() {
|
|
20
17
|
var _this;
|
|
21
18
|
_classCallCheck(this, LoadingContainerAdvanced);
|
|
22
19
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
20
|
args[_key] = arguments[_key];
|
|
24
21
|
}
|
|
25
|
-
_this =
|
|
26
|
-
_defineProperty(
|
|
27
|
-
_defineProperty(
|
|
28
|
-
_defineProperty(
|
|
22
|
+
_this = _callSuper(this, LoadingContainerAdvanced, [].concat(args));
|
|
23
|
+
_defineProperty(_this, "spinnerRef", /*#__PURE__*/React.createRef());
|
|
24
|
+
_defineProperty(_this, "containerRef", /*#__PURE__*/React.createRef());
|
|
25
|
+
_defineProperty(_this, "componentDidMount", function () {
|
|
29
26
|
if (_this.props.isLoading && _this.hasTargetNode()) {
|
|
30
27
|
_this.attachListeners();
|
|
31
28
|
_this.updateTargetAppearance();
|
|
32
29
|
_this.updateSpinnerPosition();
|
|
33
30
|
}
|
|
34
31
|
});
|
|
35
|
-
_defineProperty(
|
|
32
|
+
_defineProperty(_this, "UNSAFE_componentWillReceiveProps", function (nextProps) {
|
|
36
33
|
if (!nextProps.isLoading || !_this.hasTargetNode(nextProps)) {
|
|
37
34
|
_this.detachListeners();
|
|
38
35
|
} else if (!_this.props.isLoading) {
|
|
39
36
|
_this.attachListeners();
|
|
40
37
|
}
|
|
41
38
|
});
|
|
42
|
-
_defineProperty(
|
|
39
|
+
_defineProperty(_this, "componentDidUpdate", function () {
|
|
43
40
|
if (_this.hasTargetNode()) {
|
|
44
41
|
_this.updateTargetAppearance();
|
|
45
42
|
if (_this.props.isLoading) {
|
|
@@ -47,19 +44,19 @@ var LoadingContainerAdvanced = /*#__PURE__*/function (_React$Component) {
|
|
|
47
44
|
}
|
|
48
45
|
}
|
|
49
46
|
});
|
|
50
|
-
_defineProperty(
|
|
47
|
+
_defineProperty(_this, "componentWillUnmount", function () {
|
|
51
48
|
_this.detachListeners();
|
|
52
49
|
});
|
|
53
|
-
_defineProperty(
|
|
50
|
+
_defineProperty(_this, "getTargetNode", function () {
|
|
54
51
|
var nextProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.props;
|
|
55
52
|
var targetRef = nextProps.targetRef;
|
|
56
53
|
var target = targetRef === null || targetRef === void 0 ? void 0 : targetRef();
|
|
57
54
|
return target || _this.containerRef.current;
|
|
58
55
|
});
|
|
59
|
-
_defineProperty(
|
|
56
|
+
_defineProperty(_this, "hasTargetNode", function (nextProps) {
|
|
60
57
|
return !!_this.getTargetNode(nextProps);
|
|
61
58
|
});
|
|
62
|
-
_defineProperty(
|
|
59
|
+
_defineProperty(_this, "isVerticallyVisible", function (elementRect, viewportHeight) {
|
|
63
60
|
var top = elementRect.top,
|
|
64
61
|
bottom = elementRect.bottom;
|
|
65
62
|
if (bottom <= 0) {
|
|
@@ -67,22 +64,22 @@ var LoadingContainerAdvanced = /*#__PURE__*/function (_React$Component) {
|
|
|
67
64
|
}
|
|
68
65
|
return top < viewportHeight;
|
|
69
66
|
});
|
|
70
|
-
_defineProperty(
|
|
67
|
+
_defineProperty(_this, "isFullyVerticallyVisible", function (elementRect, viewportHeight) {
|
|
71
68
|
var top = elementRect.top,
|
|
72
69
|
bottom = elementRect.bottom;
|
|
73
70
|
return top >= 0 && bottom <= viewportHeight;
|
|
74
71
|
});
|
|
75
|
-
_defineProperty(
|
|
72
|
+
_defineProperty(_this, "handleResize", function () {
|
|
76
73
|
_this.updateSpinnerPosition();
|
|
77
74
|
});
|
|
78
|
-
_defineProperty(
|
|
75
|
+
_defineProperty(_this, "handleScroll", function () {
|
|
79
76
|
_this.updateSpinnerPosition();
|
|
80
77
|
});
|
|
81
|
-
_defineProperty(
|
|
78
|
+
_defineProperty(_this, "translateSpinner", function (spinnerNode, transformY, isFixed) {
|
|
82
79
|
spinnerNode.style.position = isFixed ? 'fixed' : '';
|
|
83
80
|
spinnerNode.style.transform = transformY !== 0 ? "translate3d(0, ".concat(transformY, "px, 0)") : '';
|
|
84
81
|
});
|
|
85
|
-
_defineProperty(
|
|
82
|
+
_defineProperty(_this, "updateTargetAppearance", function () {
|
|
86
83
|
var targetNode = _this.getTargetNode();
|
|
87
84
|
var _this$props = _this.props,
|
|
88
85
|
isLoading = _this$props.isLoading,
|
|
@@ -94,7 +91,8 @@ var LoadingContainerAdvanced = /*#__PURE__*/function (_React$Component) {
|
|
|
94
91
|
});
|
|
95
92
|
return _this;
|
|
96
93
|
}
|
|
97
|
-
|
|
94
|
+
_inherits(LoadingContainerAdvanced, _React$Component);
|
|
95
|
+
return _createClass(LoadingContainerAdvanced, [{
|
|
98
96
|
key: "attachListeners",
|
|
99
97
|
value: function attachListeners() {
|
|
100
98
|
window.addEventListener('scroll', this.handleScroll);
|
|
@@ -187,7 +185,6 @@ var LoadingContainerAdvanced = /*#__PURE__*/function (_React$Component) {
|
|
|
187
185
|
}))));
|
|
188
186
|
}
|
|
189
187
|
}]);
|
|
190
|
-
return LoadingContainerAdvanced;
|
|
191
188
|
}(React.Component);
|
|
192
189
|
_defineProperty(LoadingContainerAdvanced, "defaultProps", {
|
|
193
190
|
isLoading: true,
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import Spinner from '@atlaskit/spinner';
|
|
11
11
|
import { LARGE, LOADING_CONTENTS_OPACITY } from '../internal/constants';
|
|
12
12
|
import { Container, ContentsContainer, SpinnerContainer } from '../styled/loading-container';
|
|
13
13
|
var LoadingContainer = /*#__PURE__*/function (_React$Component) {
|
|
14
|
-
_inherits(LoadingContainer, _React$Component);
|
|
15
|
-
var _super = _createSuper(LoadingContainer);
|
|
16
14
|
function LoadingContainer() {
|
|
17
15
|
_classCallCheck(this, LoadingContainer);
|
|
18
|
-
return
|
|
16
|
+
return _callSuper(this, LoadingContainer, arguments);
|
|
19
17
|
}
|
|
20
|
-
|
|
18
|
+
_inherits(LoadingContainer, _React$Component);
|
|
19
|
+
return _createClass(LoadingContainer, [{
|
|
21
20
|
key: "render",
|
|
22
21
|
value: function render() {
|
|
23
22
|
var _this$props = this.props,
|
|
@@ -41,7 +40,6 @@ var LoadingContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
41
40
|
})));
|
|
42
41
|
}
|
|
43
42
|
}]);
|
|
44
|
-
return LoadingContainer;
|
|
45
43
|
}(React.Component);
|
|
46
44
|
_defineProperty(LoadingContainer, "defaultProps", {
|
|
47
45
|
isLoading: true,
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
import React from 'react';
|
|
12
11
|
import Pagination from '@atlaskit/pagination';
|
|
13
12
|
var ManagedPagination = /*#__PURE__*/function (_React$Component) {
|
|
14
|
-
_inherits(ManagedPagination, _React$Component);
|
|
15
|
-
var _super = _createSuper(ManagedPagination);
|
|
16
13
|
function ManagedPagination() {
|
|
17
14
|
var _this;
|
|
18
15
|
_classCallCheck(this, ManagedPagination);
|
|
19
16
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
20
17
|
args[_key] = arguments[_key];
|
|
21
18
|
}
|
|
22
|
-
_this =
|
|
23
|
-
_defineProperty(
|
|
19
|
+
_this = _callSuper(this, ManagedPagination, [].concat(args));
|
|
20
|
+
_defineProperty(_this, "onChange", function (_event, newValue, analyticsEvent) {
|
|
24
21
|
_this.props.onChange(newValue, analyticsEvent);
|
|
25
22
|
});
|
|
26
23
|
return _this;
|
|
27
24
|
}
|
|
28
|
-
|
|
25
|
+
_inherits(ManagedPagination, _React$Component);
|
|
26
|
+
return _createClass(ManagedPagination, [{
|
|
29
27
|
key: "render",
|
|
30
28
|
value: function render() {
|
|
31
29
|
var _this$props = this.props,
|
|
@@ -54,6 +52,5 @@ var ManagedPagination = /*#__PURE__*/function (_React$Component) {
|
|
|
54
52
|
});
|
|
55
53
|
}
|
|
56
54
|
}]);
|
|
57
|
-
return ManagedPagination;
|
|
58
55
|
}(React.Component);
|
|
59
56
|
export { ManagedPagination as default };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
import React from 'react';
|
|
12
11
|
|
|
@@ -36,16 +35,14 @@ var computeRankDestination = function computeRankDestination(result, pageRows) {
|
|
|
36
35
|
return undefined;
|
|
37
36
|
};
|
|
38
37
|
export var RankableBody = /*#__PURE__*/function (_React$Component) {
|
|
39
|
-
_inherits(RankableBody, _React$Component);
|
|
40
|
-
var _super = _createSuper(RankableBody);
|
|
41
38
|
function RankableBody() {
|
|
42
39
|
var _this;
|
|
43
40
|
_classCallCheck(this, RankableBody);
|
|
44
41
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
45
42
|
args[_key] = arguments[_key];
|
|
46
43
|
}
|
|
47
|
-
_this =
|
|
48
|
-
_defineProperty(
|
|
44
|
+
_this = _callSuper(this, RankableBody, [].concat(args));
|
|
45
|
+
_defineProperty(_this, "onBeforeDragStart", function (dragStart) {
|
|
49
46
|
var key = dragStart.draggableId,
|
|
50
47
|
index = dragStart.source.index;
|
|
51
48
|
var rankStartProps = {
|
|
@@ -54,7 +51,7 @@ export var RankableBody = /*#__PURE__*/function (_React$Component) {
|
|
|
54
51
|
};
|
|
55
52
|
_this.props.onRankStart(rankStartProps);
|
|
56
53
|
});
|
|
57
|
-
_defineProperty(
|
|
54
|
+
_defineProperty(_this, "onDragEnd", function (result) {
|
|
58
55
|
var _this$props = _this.props,
|
|
59
56
|
pageRows = _this$props.pageRows,
|
|
60
57
|
onRankEnd = _this$props.onRankEnd;
|
|
@@ -70,7 +67,8 @@ export var RankableBody = /*#__PURE__*/function (_React$Component) {
|
|
|
70
67
|
});
|
|
71
68
|
return _this;
|
|
72
69
|
}
|
|
73
|
-
|
|
70
|
+
_inherits(RankableBody, _React$Component);
|
|
71
|
+
return _createClass(RankableBody, [{
|
|
74
72
|
key: "render",
|
|
75
73
|
value: function render() {
|
|
76
74
|
var _this$props2 = this.props,
|
|
@@ -115,7 +113,6 @@ export var RankableBody = /*#__PURE__*/function (_React$Component) {
|
|
|
115
113
|
}));
|
|
116
114
|
}
|
|
117
115
|
}]);
|
|
118
|
-
return RankableBody;
|
|
119
116
|
}(React.Component);
|
|
120
117
|
|
|
121
118
|
// eslint-disable-next-line import/no-anonymous-default-export
|
|
@@ -2,24 +2,23 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
8
|
var _excluded = ["content", "testId"];
|
|
9
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import withDimensions from '../../hoc/with-dimensions';
|
|
13
13
|
import { inlineStylesIfRanking } from '../../internal/helpers';
|
|
14
14
|
import { RankableTableBodyCell } from '../../styled/rankable/table-cell';
|
|
15
15
|
export var RankableTableCell = /*#__PURE__*/function (_React$Component) {
|
|
16
|
-
_inherits(RankableTableCell, _React$Component);
|
|
17
|
-
var _super = _createSuper(RankableTableCell);
|
|
18
16
|
function RankableTableCell() {
|
|
19
17
|
_classCallCheck(this, RankableTableCell);
|
|
20
|
-
return
|
|
18
|
+
return _callSuper(this, RankableTableCell, arguments);
|
|
21
19
|
}
|
|
22
|
-
|
|
20
|
+
_inherits(RankableTableCell, _React$Component);
|
|
21
|
+
return _createClass(RankableTableCell, [{
|
|
23
22
|
key: "render",
|
|
24
23
|
value: function render() {
|
|
25
24
|
var _this$props = this.props,
|
|
@@ -53,7 +52,6 @@ export var RankableTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
53
52
|
}), content);
|
|
54
53
|
}
|
|
55
54
|
}]);
|
|
56
|
-
return RankableTableCell;
|
|
57
55
|
}(React.Component);
|
|
58
56
|
|
|
59
57
|
// eslint-disable-next-line import/no-anonymous-default-export
|
|
@@ -2,24 +2,23 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
8
|
var _excluded = ["isRanking", "refHeight", "refWidth"];
|
|
9
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import withDimensions from '../../hoc/with-dimensions';
|
|
13
13
|
import { inlineStylesIfRanking } from '../../internal/helpers';
|
|
14
14
|
import HeadCell from '../table-head-cell';
|
|
15
15
|
var RankableTableHeadCellComponent = /*#__PURE__*/function (_React$Component) {
|
|
16
|
-
_inherits(RankableTableHeadCellComponent, _React$Component);
|
|
17
|
-
var _super = _createSuper(RankableTableHeadCellComponent);
|
|
18
16
|
function RankableTableHeadCellComponent() {
|
|
19
17
|
_classCallCheck(this, RankableTableHeadCellComponent);
|
|
20
|
-
return
|
|
18
|
+
return _callSuper(this, RankableTableHeadCellComponent, arguments);
|
|
21
19
|
}
|
|
22
|
-
|
|
20
|
+
_inherits(RankableTableHeadCellComponent, _React$Component);
|
|
21
|
+
return _createClass(RankableTableHeadCellComponent, [{
|
|
23
22
|
key: "render",
|
|
24
23
|
value: function render() {
|
|
25
24
|
var _this$props = this.props,
|
|
@@ -33,7 +32,6 @@ var RankableTableHeadCellComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
33
32
|
}, restProps));
|
|
34
33
|
}
|
|
35
34
|
}]);
|
|
36
|
-
return RankableTableHeadCellComponent;
|
|
37
35
|
}(React.Component);
|
|
38
36
|
var RankableTableHeadCell = withDimensions(RankableTableHeadCellComponent);
|
|
39
37
|
|