@atlaskit/dynamic-table 16.1.2 → 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.
Files changed (34) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/components/body.js +5 -7
  3. package/dist/cjs/components/error-boundary.js +5 -7
  4. package/dist/cjs/components/loading-container-advanced.js +19 -22
  5. package/dist/cjs/components/loading-container.js +5 -7
  6. package/dist/cjs/components/managed-pagination.js +6 -9
  7. package/dist/cjs/components/rankable/body.js +7 -10
  8. package/dist/cjs/components/rankable/table-cell.js +5 -7
  9. package/dist/cjs/components/rankable/table-head-cell.js +5 -7
  10. package/dist/cjs/components/rankable/table-row.js +17 -11
  11. package/dist/cjs/components/stateful.js +10 -13
  12. package/dist/cjs/components/stateless.js +2 -2
  13. package/dist/cjs/components/table-head.js +5 -7
  14. package/dist/cjs/hoc/with-dimensions.js +8 -11
  15. package/dist/cjs/hoc/with-sorted-page-rows.js +6 -9
  16. package/dist/cjs/styled/dynamic-table.js +1 -2
  17. package/dist/es2019/components/rankable/table-row.js +11 -3
  18. package/dist/es2019/components/stateless.js +2 -2
  19. package/dist/esm/components/body.js +5 -7
  20. package/dist/esm/components/error-boundary.js +5 -7
  21. package/dist/esm/components/loading-container-advanced.js +19 -22
  22. package/dist/esm/components/loading-container.js +5 -7
  23. package/dist/esm/components/managed-pagination.js +6 -9
  24. package/dist/esm/components/rankable/body.js +7 -10
  25. package/dist/esm/components/rankable/table-cell.js +5 -7
  26. package/dist/esm/components/rankable/table-head-cell.js +5 -7
  27. package/dist/esm/components/rankable/table-row.js +17 -12
  28. package/dist/esm/components/stateful.js +10 -13
  29. package/dist/esm/components/stateless.js +2 -2
  30. package/dist/esm/components/table-head.js +5 -7
  31. package/dist/esm/hoc/with-dimensions.js +8 -11
  32. package/dist/esm/hoc/with-sorted-page-rows.js +6 -9
  33. package/dist/esm/styled/dynamic-table.js +1 -2
  34. package/package.json +15 -7
@@ -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 _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
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 _super.apply(this, arguments);
18
+ return _callSuper(this, RankableTableHeadCellComponent, arguments);
21
19
  }
22
- _createClass(RankableTableHeadCellComponent, [{
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
 
@@ -2,18 +2,17 @@ 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 _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
6
- import _inherits from "@babel/runtime/helpers/inherits";
7
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
+ import _inherits from "@babel/runtime/helpers/inherits";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
9
  var _excluded = ["cells", "testId", "key", "isHighlighted"];
11
10
  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; }
12
11
  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) { _defineProperty(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; }
13
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
12
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
14
13
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
15
14
  import React from 'react';
16
-
15
+ import { fg } from '@atlaskit/platform-feature-flags';
17
16
  // Allowing existing usage of non Pragmatic drag and drop solution
18
17
  // eslint-disable-next-line @atlaskit/design-system/no-unsupported-drag-and-drop-libraries
19
18
  import { Draggable } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration';
@@ -22,16 +21,14 @@ import { inlineStylesIfRanking } from '../../internal/helpers';
22
21
  import { RankableTableBodyRow } from '../../styled/rankable/table-row';
23
22
  import TableCell from './table-cell';
24
23
  export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
25
- _inherits(RankableTableRow, _React$Component);
26
- var _super = _createSuper(RankableTableRow);
27
24
  function RankableTableRow() {
28
25
  var _this;
29
26
  _classCallCheck(this, RankableTableRow);
30
27
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
31
28
  args[_key] = arguments[_key];
32
29
  }
33
- _this = _super.call.apply(_super, [this].concat(args));
34
- _defineProperty(_assertThisInitialized(_this), "innerRef", function (innerRefFn) {
30
+ _this = _callSuper(this, RankableTableRow, [].concat(args));
31
+ _defineProperty(_this, "innerRef", function (innerRefFn) {
35
32
  return function (ref) {
36
33
  innerRefFn(ref);
37
34
  if (typeof _this.props.innerRef === 'function') {
@@ -41,7 +38,8 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
41
38
  });
42
39
  return _this;
43
40
  }
44
- _createClass(RankableTableRow, [{
41
+ _inherits(RankableTableRow, _React$Component);
42
+ return _createClass(RankableTableRow, [{
45
43
  key: "render",
46
44
  value: function render() {
47
45
  var _this2 = this;
@@ -69,13 +67,21 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
69
67
  index: rowIndex,
70
68
  isDragDisabled: isRankingDisabled
71
69
  }, function (provided, snapshot) {
72
- var _provided$dragHandleP;
70
+ var _provided$dragHandleP, _provided$dragHandleP2;
73
71
  return /*#__PURE__*/React.createElement(RankableTableBodyRow, _extends({}, restRowProps, provided.dragHandleProps, provided.draggableProps, {
72
+ /**
73
+ * `provided.dragHandleProps` provides `role="button"` which we don't want to apply to table rows.
74
+ *
75
+ * Providing `role="button"` is the RBD 13 behavior which the migration layer emulates.
76
+ * Previously we used RBD 12 which did not provide a role to the drag handle.
77
+ */
78
+ role: fg('platform_design_system_dynamic_table_row_role') ? undefined : (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP.role
74
79
  // It is necessary to prevent the passing of aria-labelledby
80
+ ,
75
81
  "aria-labelledby": undefined
76
82
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
77
83
  ,
78
- "aria-describedby": (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP['aria-describedby'],
84
+ "aria-describedby": (_provided$dragHandleP2 = provided.dragHandleProps) === null || _provided$dragHandleP2 === void 0 ? void 0 : _provided$dragHandleP2['aria-describedby'],
79
85
  ref: _this2.innerRef(provided.innerRef)
80
86
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
81
87
  ,
@@ -100,7 +106,6 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
100
106
  });
101
107
  }
102
108
  }]);
103
- return RankableTableRow;
104
109
  }(React.Component);
105
110
 
106
111
  // eslint-disable-next-line import/no-anonymous-default-export
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  import React from 'react';
11
10
  import noop from '@atlaskit/ds-lib/noop';
@@ -38,22 +37,20 @@ import DynamicTableStateless from './stateless';
38
37
  * ```
39
38
  */
40
39
  var DynamicTable = /*#__PURE__*/function (_React$Component) {
41
- _inherits(DynamicTable, _React$Component);
42
- var _super = _createSuper(DynamicTable);
43
40
  function DynamicTable() {
44
41
  var _this;
45
42
  _classCallCheck(this, DynamicTable);
46
43
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
47
44
  args[_key] = arguments[_key];
48
45
  }
49
- _this = _super.call.apply(_super, [this].concat(args));
50
- _defineProperty(_assertThisInitialized(_this), "state", {
46
+ _this = _callSuper(this, DynamicTable, [].concat(args));
47
+ _defineProperty(_this, "state", {
51
48
  page: _this.props.defaultPage,
52
49
  sortKey: _this.props.defaultSortKey,
53
50
  sortOrder: _this.props.defaultSortOrder,
54
51
  rows: _this.props.rows
55
52
  });
56
- _defineProperty(_assertThisInitialized(_this), "onSetPageHandler", function (page, analyticsEvent) {
53
+ _defineProperty(_this, "onSetPageHandler", function (page, analyticsEvent) {
57
54
  var onSetPage = _this.props.onSetPage;
58
55
  if (onSetPage) {
59
56
  onSetPage(page, analyticsEvent);
@@ -62,7 +59,7 @@ var DynamicTable = /*#__PURE__*/function (_React$Component) {
62
59
  });
63
60
  }
64
61
  });
65
- _defineProperty(_assertThisInitialized(_this), "onSortHandler", function (_ref, analyticsEvent) {
62
+ _defineProperty(_this, "onSortHandler", function (_ref, analyticsEvent) {
66
63
  var key = _ref.key,
67
64
  item = _ref.item,
68
65
  sortOrder = _ref.sortOrder;
@@ -79,12 +76,12 @@ var DynamicTable = /*#__PURE__*/function (_React$Component) {
79
76
  });
80
77
  }
81
78
  });
82
- _defineProperty(_assertThisInitialized(_this), "onRankEndIfExistsHandler", function (params) {
79
+ _defineProperty(_this, "onRankEndIfExistsHandler", function (params) {
83
80
  if (_this.props.onRankEnd) {
84
81
  _this.props.onRankEnd(params);
85
82
  }
86
83
  });
87
- _defineProperty(_assertThisInitialized(_this), "onRankEndHandler", function (params) {
84
+ _defineProperty(_this, "onRankEndHandler", function (params) {
88
85
  var destination = params.destination;
89
86
  var _this$state = _this.state,
90
87
  rows = _this$state.rows,
@@ -102,7 +99,8 @@ var DynamicTable = /*#__PURE__*/function (_React$Component) {
102
99
  });
103
100
  return _this;
104
101
  }
105
- _createClass(DynamicTable, [{
102
+ _inherits(DynamicTable, _React$Component);
103
+ return _createClass(DynamicTable, [{
106
104
  key: "UNSAFE_componentWillReceiveProps",
107
105
  value: function UNSAFE_componentWillReceiveProps(newProps) {
108
106
  var sortKey = newProps.sortKey || this.state.sortKey;
@@ -167,7 +165,6 @@ var DynamicTable = /*#__PURE__*/function (_React$Component) {
167
165
  });
168
166
  }
169
167
  }]);
170
- return DynamicTable;
171
168
  }(React.Component);
172
169
  _defineProperty(DynamicTable, "defaultProps", {
173
170
  defaultPage: 1,
@@ -76,14 +76,14 @@ var DynamicTable = function DynamicTable(_ref) {
76
76
  action: 'sorted',
77
77
  componentName: 'dynamicTable',
78
78
  packageName: "@atlaskit/dynamic-table",
79
- packageVersion: "16.1.2"
79
+ packageVersion: "16.1.4"
80
80
  });
81
81
  var onRankEnd = usePlatformLeafEventHandler({
82
82
  fn: providedOnRankEnd,
83
83
  action: 'ranked',
84
84
  componentName: 'dynamicTable',
85
85
  packageName: "@atlaskit/dynamic-table",
86
- packageVersion: "16.1.2"
86
+ packageVersion: "16.1.4"
87
87
  });
88
88
  useEffect(function () {
89
89
  validateSortKey(sortKey, head);
@@ -2,12 +2,12 @@ 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 = ["cells"],
9
9
  _excluded2 = ["colSpan", "content", "isSortable", "key", "shouldTruncate", "testId", "width"];
10
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
10
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  import React from 'react';
13
13
  import { validateSortKey } from '../internal/helpers';
@@ -15,13 +15,12 @@ import { Head } from '../styled/table-head';
15
15
  import RankableHeadCell from './rankable/table-head-cell';
16
16
  import HeadCell from './table-head-cell';
17
17
  var TableHead = /*#__PURE__*/function (_React$Component) {
18
- _inherits(TableHead, _React$Component);
19
- var _super = _createSuper(TableHead);
20
18
  function TableHead() {
21
19
  _classCallCheck(this, TableHead);
22
- return _super.apply(this, arguments);
20
+ return _callSuper(this, TableHead, arguments);
23
21
  }
24
- _createClass(TableHead, [{
22
+ _inherits(TableHead, _React$Component);
23
+ return _createClass(TableHead, [{
25
24
  key: "UNSAFE_componentWillMount",
26
25
  value: function UNSAFE_componentWillMount() {
27
26
  validateSortKey(this.props.sortKey, this.props.head);
@@ -84,6 +83,5 @@ var TableHead = /*#__PURE__*/function (_React$Component) {
84
83
  })));
85
84
  }
86
85
  }]);
87
- return TableHead;
88
86
  }(React.Component); // eslint-disable-next-line @repo/internal/react/require-jsdoc
89
87
  export default TableHead;
@@ -1,36 +1,33 @@
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 _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
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
  // Compute height and width of wrapped component before ranking
13
12
  export default function withDimensions(WrappedComponent) {
14
13
  return /*#__PURE__*/function (_React$Component) {
15
- _inherits(WithDimensions, _React$Component);
16
- var _super = _createSuper(WithDimensions);
17
14
  function WithDimensions() {
18
15
  var _this;
19
16
  _classCallCheck(this, WithDimensions);
20
17
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
21
18
  args[_key] = arguments[_key];
22
19
  }
23
- _this = _super.call.apply(_super, [this].concat(args));
24
- _defineProperty(_assertThisInitialized(_this), "state", {
20
+ _this = _callSuper(this, WithDimensions, [].concat(args));
21
+ _defineProperty(_this, "state", {
25
22
  refWidth: 0,
26
23
  refHeight: 0
27
24
  });
28
- _defineProperty(_assertThisInitialized(_this), "innerRef", function (ref) {
25
+ _defineProperty(_this, "innerRef", function (ref) {
29
26
  if (ref && !_this.props.isRanking) {
30
27
  _this.ref = ref;
31
28
  }
32
29
  });
33
- _defineProperty(_assertThisInitialized(_this), "updateDimensions", function () {
30
+ _defineProperty(_this, "updateDimensions", function () {
34
31
  if (!_this.ref) {
35
32
  return;
36
33
  }
@@ -46,7 +43,8 @@ export default function withDimensions(WrappedComponent) {
46
43
  });
47
44
  return _this;
48
45
  }
49
- _createClass(WithDimensions, [{
46
+ _inherits(WithDimensions, _React$Component);
47
+ return _createClass(WithDimensions, [{
50
48
  key: "UNSAFE_componentWillReceiveProps",
51
49
  value: function UNSAFE_componentWillReceiveProps(nextProps) {
52
50
  var wasRanking = this.props.isRanking;
@@ -72,6 +70,5 @@ export default function withDimensions(WrappedComponent) {
72
70
  }, this.props));
73
71
  }
74
72
  }]);
75
- return WithDimensions;
76
73
  }(React.Component);
77
74
  }
@@ -2,16 +2,15 @@ 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 _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
6
- import _inherits from "@babel/runtime/helpers/inherits";
7
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
+ import _inherits from "@babel/runtime/helpers/inherits";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
9
  import _typeof from "@babel/runtime/helpers/typeof";
11
10
  var _excluded = ["rows", "head", "sortKey", "sortOrder", "rowsPerPage", "page", "forwardedRef"];
12
11
  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; }
13
12
  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) { _defineProperty(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; }
14
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
13
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
15
14
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
16
15
  import React from 'react';
17
16
  import { ASC } from '../internal/constants';
@@ -88,21 +87,20 @@ var getSortedRows = function getSortedRows(head, rows, sortKey, sortOrder) {
88
87
  // get one page of data in table, sorting all rows previously
89
88
  export default function withSortedPageRows(WrappedComponent) {
90
89
  var WithSortedPageRows = /*#__PURE__*/function (_React$Component) {
91
- _inherits(WithSortedPageRows, _React$Component);
92
- var _super = _createSuper(WithSortedPageRows);
93
90
  function WithSortedPageRows() {
94
91
  var _this;
95
92
  _classCallCheck(this, WithSortedPageRows);
96
93
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
97
94
  args[_key] = arguments[_key];
98
95
  }
99
- _this = _super.call.apply(_super, [this].concat(args));
100
- _defineProperty(_assertThisInitialized(_this), "state", {
96
+ _this = _callSuper(this, WithSortedPageRows, [].concat(args));
97
+ _defineProperty(_this, "state", {
101
98
  pageRows: []
102
99
  });
103
100
  return _this;
104
101
  }
105
- _createClass(WithSortedPageRows, [{
102
+ _inherits(WithSortedPageRows, _React$Component);
103
+ return _createClass(WithSortedPageRows, [{
106
104
  key: "componentDidMount",
107
105
  value: function componentDidMount() {
108
106
  this.props.onPageRowsUpdate && this.props.onPageRowsUpdate(this.state.pageRows);
@@ -160,7 +158,6 @@ export default function withSortedPageRows(WrappedComponent) {
160
158
  });
161
159
  }
162
160
  }]);
163
- return WithSortedPageRows;
164
161
  }(React.Component);
165
162
  return /*#__PURE__*/React.forwardRef(function (props, ref) {
166
163
  return /*#__PURE__*/React.createElement(WithSortedPageRows, _extends({}, props, {
@@ -33,7 +33,6 @@ var bodyBorder = css({
33
33
  borderBlockEnd: "2px solid ".concat(tableBorder.borderColor)
34
34
  });
35
35
  export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
36
- var _ref2;
37
36
  var isFixedSize = _ref.isFixedSize,
38
37
  hasDataRow = _ref.hasDataRow,
39
38
  children = _ref.children,
@@ -42,7 +41,7 @@ export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
42
41
  rest = _objectWithoutProperties(_ref, _excluded);
43
42
  return jsx("table", _extends({
44
43
  inert: isLoading ? '' : undefined,
45
- style: (_ref2 = {}, _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND, row.hoverBackground), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND, row.highlightedBackground), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND, row.hoverHighlightedBackground), _defineProperty(_ref2, tableRowCSSVars.CSS_VAR_ROW_FOCUS_OUTLINE, row.focusOutline), _ref2),
44
+ style: _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, tableRowCSSVars.CSS_VAR_HOVER_BACKGROUND, row.hoverBackground), tableRowCSSVars.CSS_VAR_HIGHLIGHTED_BACKGROUND, row.highlightedBackground), tableRowCSSVars.CSS_VAR_HOVER_HIGHLIGHTED_BACKGROUND, row.hoverHighlightedBackground), tableRowCSSVars.CSS_VAR_ROW_FOCUS_OUTLINE, row.focusOutline),
46
45
  css: [tableStyles, isFixedSize && fixedSizeTableStyles, hasDataRow && bodyBorder],
47
46
  ref: ref
48
47
  }, rest, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/dynamic-table",
3
- "version": "16.1.2",
3
+ "version": "16.1.4",
4
4
  "description": "A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,18 +34,19 @@
34
34
  "team": "Design System Team",
35
35
  "website": {
36
36
  "name": "Dynamic table",
37
- "category": "Components"
37
+ "category": "Text and data display"
38
38
  },
39
39
  "runReact18": true
40
40
  },
41
41
  "dependencies": {
42
- "@atlaskit/analytics-next": "^10.1.0",
43
- "@atlaskit/ds-lib": "^3.2.0",
44
- "@atlaskit/pagination": "^14.9.0",
45
- "@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration": "^1.2.1",
42
+ "@atlaskit/analytics-next": "^10.2.0",
43
+ "@atlaskit/ds-lib": "^3.3.0",
44
+ "@atlaskit/pagination": "^15.0.0",
45
+ "@atlaskit/platform-feature-flags": "^0.3.0",
46
+ "@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration": "^1.3.0",
46
47
  "@atlaskit/spinner": "^16.3.0",
47
48
  "@atlaskit/theme": "^14.0.0",
48
- "@atlaskit/tokens": "^2.2.0",
49
+ "@atlaskit/tokens": "^2.4.0",
49
50
  "@babel/runtime": "^7.0.0",
50
51
  "@emotion/react": "^11.7.1",
51
52
  "react-beautiful-dnd": "^12.2.0"
@@ -58,6 +59,8 @@
58
59
  "@af/accessibility-testing": "*",
59
60
  "@af/integration-testing": "*",
60
61
  "@af/visual-regression": "*",
62
+ "@atlaskit/button": "*",
63
+ "@atlaskit/link": "*",
61
64
  "@atlaskit/ssr": "*",
62
65
  "@atlaskit/toggle": "^13.4.0",
63
66
  "@atlaskit/visual-regression": "*",
@@ -84,5 +87,10 @@
84
87
  "emotion"
85
88
  ]
86
89
  }
90
+ },
91
+ "platform-feature-flags": {
92
+ "platform_design_system_dynamic_table_row_role": {
93
+ "type": "boolean"
94
+ }
87
95
  }
88
96
  }