@atlaskit/dynamic-table 14.11.7 → 14.11.9

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/dynamic-table
2
2
 
3
+ ## 14.11.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 14.11.8
10
+
11
+ ### Patch Changes
12
+
13
+ - [#42646](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42646) [`97c42c39867`](https://bitbucket.org/atlassian/atlassian-frontend/commits/97c42c39867) - Fix screen reader announcements for table row
14
+
3
15
  ## 14.11.7
4
16
 
5
17
  ### Patch Changes
@@ -18,7 +18,8 @@ var _reactBeautifulDnd = require("react-beautiful-dnd");
18
18
  var _withSortedPageRows = _interopRequireDefault(require("../../hoc/with-sorted-page-rows"));
19
19
  var _tableRow = _interopRequireDefault(require("./table-row"));
20
20
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
21
- 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; } }
21
+ 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; } } // Allowing existing usage of non Pragmatic drag and drop solution
22
+ // eslint-disable-next-line @atlaskit/design-system/no-unsupported-drag-and-drop-libraries
22
23
  // computes destination of ranking
23
24
  // - if drag was cancelled returns undefined
24
25
  // - if drag was finished, returns new position and after/before key
@@ -24,7 +24,8 @@ var _excluded = ["cells", "key", "isHighlighted"];
24
24
  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; }
25
25
  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; }
26
26
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
27
- 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; } }
27
+ 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; } } // Allowing existing usage of non Pragmatic drag and drop solution
28
+ // eslint-disable-next-line @atlaskit/design-system/no-unsupported-drag-and-drop-libraries
28
29
  var RankableTableRow = exports.RankableTableRow = /*#__PURE__*/function (_React$Component) {
29
30
  (0, _inherits2.default)(RankableTableRow, _React$Component);
30
31
  var _super = _createSuper(RankableTableRow);
@@ -72,7 +73,11 @@ var RankableTableRow = exports.RankableTableRow = /*#__PURE__*/function (_React$
72
73
  index: rowIndex,
73
74
  isDragDisabled: isRankingDisabled
74
75
  }, function (provided, snapshot) {
76
+ var _provided$dragHandleP;
75
77
  return /*#__PURE__*/_react.default.createElement(_tableRow.RankableTableBodyRow, (0, _extends2.default)({}, restRowProps, provided.dragHandleProps, provided.draggableProps, {
78
+ // It is necessary to prevent the passing of aria-labelledby
79
+ "aria-labelledby": undefined,
80
+ "aria-describedby": (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP['aria-labelledby'],
76
81
  ref: _this2.innerRef(provided.innerRef),
77
82
  style: _objectSpread(_objectSpread({}, provided.draggableProps.style), inlineStyles),
78
83
  isHighlighted: isHighlighted || isRowHighlighted,
@@ -29,7 +29,7 @@ var _tableHead = _interopRequireDefault(require("./table-head"));
29
29
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
30
30
  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; } }
31
31
  var packageName = "@atlaskit/dynamic-table";
32
- var packageVersion = "14.11.7";
32
+ var packageVersion = "14.11.9";
33
33
  function toggleSortOrder(currentSortOrder) {
34
34
  switch (currentSortOrder) {
35
35
  case _constants.DESC:
@@ -1,6 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import React from 'react';
4
+
5
+ // Allowing existing usage of non Pragmatic drag and drop solution
6
+ // eslint-disable-next-line @atlaskit/design-system/no-unsupported-drag-and-drop-libraries
4
7
  import { DragDropContext, Droppable } from 'react-beautiful-dnd';
5
8
  import withSortedPageRows from '../../hoc/with-sorted-page-rows';
6
9
  import TableRow from './table-row';
@@ -1,6 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import React from 'react';
4
+
5
+ // Allowing existing usage of non Pragmatic drag and drop solution
6
+ // eslint-disable-next-line @atlaskit/design-system/no-unsupported-drag-and-drop-libraries
4
7
  import { Draggable } from 'react-beautiful-dnd';
5
8
  import withDimensions from '../../hoc/with-dimensions';
6
9
  import { inlineStylesIfRanking } from '../../internal/helpers';
@@ -43,29 +46,35 @@ export class RankableTableRow extends React.Component {
43
46
  draggableId: key || rowIndex.toString(),
44
47
  index: rowIndex,
45
48
  isDragDisabled: isRankingDisabled
46
- }, (provided, snapshot) => /*#__PURE__*/React.createElement(RankableTableBodyRow, _extends({}, restRowProps, provided.dragHandleProps, provided.draggableProps, {
47
- ref: this.innerRef(provided.innerRef),
48
- style: {
49
- ...provided.draggableProps.style,
50
- ...inlineStyles
51
- },
52
- isHighlighted: isHighlighted || isRowHighlighted,
53
- isRanking: isRanking,
54
- isRankingItem: snapshot.isDragging,
55
- testId: testId && `${testId}--rankable--table--body--row`
56
- }), cells.map((cell, cellIndex) => {
57
- const headCell = (head || {
58
- cells: []
59
- }).cells[cellIndex];
60
- return /*#__PURE__*/React.createElement(TableCell, {
61
- head: headCell,
62
- cell: cell,
49
+ }, (provided, snapshot) => {
50
+ var _provided$dragHandleP;
51
+ return /*#__PURE__*/React.createElement(RankableTableBodyRow, _extends({}, restRowProps, provided.dragHandleProps, provided.draggableProps, {
52
+ // It is necessary to prevent the passing of aria-labelledby
53
+ "aria-labelledby": undefined,
54
+ "aria-describedby": (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP['aria-labelledby'],
55
+ ref: this.innerRef(provided.innerRef),
56
+ style: {
57
+ ...provided.draggableProps.style,
58
+ ...inlineStyles
59
+ },
60
+ isHighlighted: isHighlighted || isRowHighlighted,
63
61
  isRanking: isRanking,
64
- key: cell.key || cellIndex,
65
- isFixedSize: isFixedSize,
66
- testId: testId
67
- });
68
- })));
62
+ isRankingItem: snapshot.isDragging,
63
+ testId: testId && `${testId}--rankable--table--body--row`
64
+ }), cells.map((cell, cellIndex) => {
65
+ const headCell = (head || {
66
+ cells: []
67
+ }).cells[cellIndex];
68
+ return /*#__PURE__*/React.createElement(TableCell, {
69
+ head: headCell,
70
+ cell: cell,
71
+ isRanking: isRanking,
72
+ key: cell.key || cellIndex,
73
+ isFixedSize: isFixedSize,
74
+ testId: testId
75
+ });
76
+ }));
77
+ });
69
78
  }
70
79
  }
71
80
  export default withDimensions(RankableTableRow);
@@ -14,7 +14,7 @@ import ManagedPagination from './managed-pagination';
14
14
  import RankableTableBody from './rankable/body';
15
15
  import TableHead from './table-head';
16
16
  const packageName = "@atlaskit/dynamic-table";
17
- const packageVersion = "14.11.7";
17
+ const packageVersion = "14.11.9";
18
18
  function toggleSortOrder(currentSortOrder) {
19
19
  switch (currentSortOrder) {
20
20
  case DESC:
@@ -9,6 +9,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
9
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
10
  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; } }
11
11
  import React from 'react';
12
+
13
+ // Allowing existing usage of non Pragmatic drag and drop solution
14
+ // eslint-disable-next-line @atlaskit/design-system/no-unsupported-drag-and-drop-libraries
12
15
  import { DragDropContext, Droppable } from 'react-beautiful-dnd';
13
16
  import withSortedPageRows from '../../hoc/with-sorted-page-rows';
14
17
  import TableRow from './table-row';
@@ -13,6 +13,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
13
13
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
14
14
  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; } }
15
15
  import React from 'react';
16
+
17
+ // Allowing existing usage of non Pragmatic drag and drop solution
18
+ // eslint-disable-next-line @atlaskit/design-system/no-unsupported-drag-and-drop-libraries
16
19
  import { Draggable } from 'react-beautiful-dnd';
17
20
  import withDimensions from '../../hoc/with-dimensions';
18
21
  import { inlineStylesIfRanking } from '../../internal/helpers';
@@ -65,7 +68,11 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
65
68
  index: rowIndex,
66
69
  isDragDisabled: isRankingDisabled
67
70
  }, function (provided, snapshot) {
71
+ var _provided$dragHandleP;
68
72
  return /*#__PURE__*/React.createElement(RankableTableBodyRow, _extends({}, restRowProps, provided.dragHandleProps, provided.draggableProps, {
73
+ // It is necessary to prevent the passing of aria-labelledby
74
+ "aria-labelledby": undefined,
75
+ "aria-describedby": (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP['aria-labelledby'],
69
76
  ref: _this2.innerRef(provided.innerRef),
70
77
  style: _objectSpread(_objectSpread({}, provided.draggableProps.style), inlineStyles),
71
78
  isHighlighted: isHighlighted || isRowHighlighted,
@@ -22,7 +22,7 @@ import ManagedPagination from './managed-pagination';
22
22
  import RankableTableBody from './rankable/body';
23
23
  import TableHead from './table-head';
24
24
  var packageName = "@atlaskit/dynamic-table";
25
- var packageVersion = "14.11.7";
25
+ var packageVersion = "14.11.9";
26
26
  function toggleSortOrder(currentSortOrder) {
27
27
  switch (currentSortOrder) {
28
28
  case DESC:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/dynamic-table",
3
- "version": "14.11.7",
3
+ "version": "14.11.9",
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/"
@@ -39,9 +39,9 @@
39
39
  "@atlaskit/analytics-next": "^9.1.0",
40
40
  "@atlaskit/ds-lib": "^2.2.0",
41
41
  "@atlaskit/pagination": "^14.4.0",
42
- "@atlaskit/spinner": "^15.6.0",
42
+ "@atlaskit/spinner": "^16.0.0",
43
43
  "@atlaskit/theme": "^12.6.0",
44
- "@atlaskit/tokens": "^1.26.0",
44
+ "@atlaskit/tokens": "^1.28.0",
45
45
  "@babel/runtime": "^7.0.0",
46
46
  "@emotion/react": "^11.7.1",
47
47
  "react-beautiful-dnd": "^12.1.1"
@@ -52,6 +52,7 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@af/accessibility-testing": "*",
55
+ "@af/integration-testing": "*",
55
56
  "@atlaskit/ssr": "*",
56
57
  "@atlaskit/visual-regression": "*",
57
58
  "@atlaskit/webdriver-runner": "*",
@@ -80,4 +81,4 @@
80
81
  }
81
82
  },
82
83
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
83
- }
84
+ }