@atlaskit/dynamic-table 16.1.2 → 16.1.3
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 +9 -0
- package/dist/cjs/components/rankable/table-row.js +11 -2
- package/dist/cjs/components/stateless.js +2 -2
- package/dist/es2019/components/rankable/table-row.js +11 -3
- package/dist/es2019/components/stateless.js +2 -2
- package/dist/esm/components/rankable/table-row.js +11 -3
- package/dist/esm/components/stateless.js +2 -2
- package/package.json +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/dynamic-table
|
|
2
2
|
|
|
3
|
+
## 16.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#163993](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/163993)
|
|
8
|
+
[`d3922e72aa0e6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d3922e72aa0e6) -
|
|
9
|
+
[ux] Rankable table rows no longer have `role="button"` applied
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 16.1.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -15,6 +15,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
15
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
var _react = _interopRequireDefault(require("react"));
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
19
|
var _pragmaticDragAndDropReactBeautifulDndMigration = require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");
|
|
19
20
|
var _withDimensions = _interopRequireDefault(require("../../hoc/with-dimensions"));
|
|
20
21
|
var _helpers = require("../../internal/helpers");
|
|
@@ -74,13 +75,21 @@ var RankableTableRow = exports.RankableTableRow = /*#__PURE__*/function (_React$
|
|
|
74
75
|
index: rowIndex,
|
|
75
76
|
isDragDisabled: isRankingDisabled
|
|
76
77
|
}, function (provided, snapshot) {
|
|
77
|
-
var _provided$dragHandleP;
|
|
78
|
+
var _provided$dragHandleP, _provided$dragHandleP2;
|
|
78
79
|
return /*#__PURE__*/_react.default.createElement(_tableRow.RankableTableBodyRow, (0, _extends2.default)({}, restRowProps, provided.dragHandleProps, provided.draggableProps, {
|
|
80
|
+
/**
|
|
81
|
+
* `provided.dragHandleProps` provides `role="button"` which we don't want to apply to table rows.
|
|
82
|
+
*
|
|
83
|
+
* Providing `role="button"` is the RBD 13 behavior which the migration layer emulates.
|
|
84
|
+
* Previously we used RBD 12 which did not provide a role to the drag handle.
|
|
85
|
+
*/
|
|
86
|
+
role: (0, _platformFeatureFlags.fg)('platform_design_system_dynamic_table_row_role') ? undefined : (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP.role
|
|
79
87
|
// It is necessary to prevent the passing of aria-labelledby
|
|
88
|
+
,
|
|
80
89
|
"aria-labelledby": undefined
|
|
81
90
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
82
91
|
,
|
|
83
|
-
"aria-describedby": (_provided$
|
|
92
|
+
"aria-describedby": (_provided$dragHandleP2 = provided.dragHandleProps) === null || _provided$dragHandleP2 === void 0 ? void 0 : _provided$dragHandleP2['aria-describedby'],
|
|
84
93
|
ref: _this2.innerRef(provided.innerRef)
|
|
85
94
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
86
95
|
,
|
|
@@ -86,14 +86,14 @@ var DynamicTable = function DynamicTable(_ref) {
|
|
|
86
86
|
action: 'sorted',
|
|
87
87
|
componentName: 'dynamicTable',
|
|
88
88
|
packageName: "@atlaskit/dynamic-table",
|
|
89
|
-
packageVersion: "16.1.
|
|
89
|
+
packageVersion: "16.1.3"
|
|
90
90
|
});
|
|
91
91
|
var onRankEnd = (0, _analyticsNext.usePlatformLeafEventHandler)({
|
|
92
92
|
fn: providedOnRankEnd,
|
|
93
93
|
action: 'ranked',
|
|
94
94
|
componentName: 'dynamicTable',
|
|
95
95
|
packageName: "@atlaskit/dynamic-table",
|
|
96
|
-
packageVersion: "16.1.
|
|
96
|
+
packageVersion: "16.1.3"
|
|
97
97
|
});
|
|
98
98
|
(0, _react.useEffect)(function () {
|
|
99
99
|
(0, _helpers.validateSortKey)(sortKey, head);
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
// Allowing existing usage of non Pragmatic drag and drop solution
|
|
6
6
|
// eslint-disable-next-line @atlaskit/design-system/no-unsupported-drag-and-drop-libraries
|
|
7
7
|
import { Draggable } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration';
|
|
@@ -48,13 +48,21 @@ export class RankableTableRow extends React.Component {
|
|
|
48
48
|
index: rowIndex,
|
|
49
49
|
isDragDisabled: isRankingDisabled
|
|
50
50
|
}, (provided, snapshot) => {
|
|
51
|
-
var _provided$dragHandleP;
|
|
51
|
+
var _provided$dragHandleP, _provided$dragHandleP2;
|
|
52
52
|
return /*#__PURE__*/React.createElement(RankableTableBodyRow, _extends({}, restRowProps, provided.dragHandleProps, provided.draggableProps, {
|
|
53
|
+
/**
|
|
54
|
+
* `provided.dragHandleProps` provides `role="button"` which we don't want to apply to table rows.
|
|
55
|
+
*
|
|
56
|
+
* Providing `role="button"` is the RBD 13 behavior which the migration layer emulates.
|
|
57
|
+
* Previously we used RBD 12 which did not provide a role to the drag handle.
|
|
58
|
+
*/
|
|
59
|
+
role: fg('platform_design_system_dynamic_table_row_role') ? undefined : (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP.role
|
|
53
60
|
// It is necessary to prevent the passing of aria-labelledby
|
|
61
|
+
,
|
|
54
62
|
"aria-labelledby": undefined
|
|
55
63
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
56
64
|
,
|
|
57
|
-
"aria-describedby": (_provided$
|
|
65
|
+
"aria-describedby": (_provided$dragHandleP2 = provided.dragHandleProps) === null || _provided$dragHandleP2 === void 0 ? void 0 : _provided$dragHandleP2['aria-describedby'],
|
|
58
66
|
ref: this.innerRef(provided.innerRef)
|
|
59
67
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
60
68
|
,
|
|
@@ -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.3"
|
|
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.3"
|
|
71
71
|
});
|
|
72
72
|
useEffect(() => {
|
|
73
73
|
validateSortKey(sortKey, head);
|
|
@@ -13,7 +13,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
13
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); }; }
|
|
14
14
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
15
|
import React from 'react';
|
|
16
|
-
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
// Allowing existing usage of non Pragmatic drag and drop solution
|
|
18
18
|
// eslint-disable-next-line @atlaskit/design-system/no-unsupported-drag-and-drop-libraries
|
|
19
19
|
import { Draggable } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration';
|
|
@@ -69,13 +69,21 @@ export var RankableTableRow = /*#__PURE__*/function (_React$Component) {
|
|
|
69
69
|
index: rowIndex,
|
|
70
70
|
isDragDisabled: isRankingDisabled
|
|
71
71
|
}, function (provided, snapshot) {
|
|
72
|
-
var _provided$dragHandleP;
|
|
72
|
+
var _provided$dragHandleP, _provided$dragHandleP2;
|
|
73
73
|
return /*#__PURE__*/React.createElement(RankableTableBodyRow, _extends({}, restRowProps, provided.dragHandleProps, provided.draggableProps, {
|
|
74
|
+
/**
|
|
75
|
+
* `provided.dragHandleProps` provides `role="button"` which we don't want to apply to table rows.
|
|
76
|
+
*
|
|
77
|
+
* Providing `role="button"` is the RBD 13 behavior which the migration layer emulates.
|
|
78
|
+
* Previously we used RBD 12 which did not provide a role to the drag handle.
|
|
79
|
+
*/
|
|
80
|
+
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
81
|
// It is necessary to prevent the passing of aria-labelledby
|
|
82
|
+
,
|
|
75
83
|
"aria-labelledby": undefined
|
|
76
84
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
77
85
|
,
|
|
78
|
-
"aria-describedby": (_provided$
|
|
86
|
+
"aria-describedby": (_provided$dragHandleP2 = provided.dragHandleProps) === null || _provided$dragHandleP2 === void 0 ? void 0 : _provided$dragHandleP2['aria-describedby'],
|
|
79
87
|
ref: _this2.innerRef(provided.innerRef)
|
|
80
88
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
81
89
|
,
|
|
@@ -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.
|
|
79
|
+
packageVersion: "16.1.3"
|
|
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.
|
|
86
|
+
packageVersion: "16.1.3"
|
|
87
87
|
});
|
|
88
88
|
useEffect(function () {
|
|
89
89
|
validateSortKey(sortKey, head);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dynamic-table",
|
|
3
|
-
"version": "16.1.
|
|
3
|
+
"version": "16.1.3",
|
|
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/"
|
|
@@ -42,10 +42,11 @@
|
|
|
42
42
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
43
43
|
"@atlaskit/ds-lib": "^3.2.0",
|
|
44
44
|
"@atlaskit/pagination": "^14.9.0",
|
|
45
|
+
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
45
46
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration": "^1.2.1",
|
|
46
47
|
"@atlaskit/spinner": "^16.3.0",
|
|
47
48
|
"@atlaskit/theme": "^14.0.0",
|
|
48
|
-
"@atlaskit/tokens": "^2.
|
|
49
|
+
"@atlaskit/tokens": "^2.3.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
|
}
|