@atlaskit/dynamic-table 15.2.0 → 16.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/cjs/components/rankable/body.js +4 -4
- package/dist/cjs/components/rankable/table-row.js +2 -2
- package/dist/cjs/components/stateless.js +2 -2
- package/dist/es2019/components/rankable/body.js +2 -2
- package/dist/es2019/components/rankable/table-row.js +1 -1
- package/dist/es2019/components/stateless.js +2 -2
- package/dist/esm/components/rankable/body.js +2 -2
- package/dist/esm/components/rankable/table-row.js +1 -1
- package/dist/esm/components/stateless.js +2 -2
- package/dist/types/components/rankable/body.d.ts +1 -1
- package/dist/types-ts4.5/components/rankable/body.d.ts +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/dynamic-table
|
|
2
2
|
|
|
3
|
+
## 16.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#151641](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151641)
|
|
8
|
+
[`d212954f3fb10`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d212954f3fb10) -
|
|
9
|
+
Updated header styles introduced in v15.1.0 are now default and no longer behind a feature flag.
|
|
10
|
+
|
|
11
|
+
## 16.0.0
|
|
12
|
+
|
|
13
|
+
### Major Changes
|
|
14
|
+
|
|
15
|
+
- [#150464](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150464)
|
|
16
|
+
[`b813bd74ede6d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b813bd74ede6d) -
|
|
17
|
+
Migrates usage of react-beautiful-dnd to pragmatic-dnd using the interop-layer from PDND. There
|
|
18
|
+
are no breaking changes however there may be minor behavioural and visual chagnes as a result
|
|
19
|
+
since the experiences are fundamentally different.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 15.2.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
@@ -14,7 +14,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
14
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
var
|
|
17
|
+
var _pragmaticDragAndDropReactBeautifulDndMigration = require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");
|
|
18
18
|
var _withSortedPageRows = _interopRequireDefault(require("../../hoc/with-sorted-page-rows"));
|
|
19
19
|
var _tableRow = _interopRequireDefault(require("./table-row"));
|
|
20
20
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
@@ -87,10 +87,10 @@ var RankableBody = exports.RankableBody = /*#__PURE__*/function (_React$Componen
|
|
|
87
87
|
isRankingDisabled = _this$props2.isRankingDisabled,
|
|
88
88
|
testId = _this$props2.testId,
|
|
89
89
|
forwardedRef = _this$props2.forwardedRef;
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_pragmaticDragAndDropReactBeautifulDndMigration.DragDropContext, {
|
|
91
91
|
onBeforeDragStart: this.onBeforeDragStart,
|
|
92
92
|
onDragEnd: this.onDragEnd
|
|
93
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
93
|
+
}, /*#__PURE__*/_react.default.createElement(_pragmaticDragAndDropReactBeautifulDndMigration.Droppable, {
|
|
94
94
|
droppableId: "dynamic-table-droppable",
|
|
95
95
|
isDropDisabled: isRankingDisabled
|
|
96
96
|
}, function (provided) {
|
|
@@ -114,7 +114,7 @@ var RankableBody = exports.RankableBody = /*#__PURE__*/function (_React$Componen
|
|
|
114
114
|
row: row,
|
|
115
115
|
isRankingDisabled: isRankingDisabled,
|
|
116
116
|
isHighlighted: !!highlightedRowIndex && (typeof highlightedRowIndex === 'number' ? highlightedRowIndex === rowIndex : highlightedRowIndex.indexOf(rowIndex) > -1),
|
|
117
|
-
testId: testId && "".concat(testId, "--rankable--table--row")
|
|
117
|
+
testId: testId && "".concat(testId, "--").concat(row.key, "--rankable--table--row")
|
|
118
118
|
});
|
|
119
119
|
}), provided.placeholder);
|
|
120
120
|
}));
|
|
@@ -15,7 +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
|
|
18
|
+
var _pragmaticDragAndDropReactBeautifulDndMigration = require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");
|
|
19
19
|
var _withDimensions = _interopRequireDefault(require("../../hoc/with-dimensions"));
|
|
20
20
|
var _helpers = require("../../internal/helpers");
|
|
21
21
|
var _tableRow = require("../../styled/rankable/table-row");
|
|
@@ -69,7 +69,7 @@ var RankableTableRow = exports.RankableTableRow = /*#__PURE__*/function (_React$
|
|
|
69
69
|
if (typeof key !== 'string' && !isRankingDisabled) {
|
|
70
70
|
throw new Error('dynamic-table: ranking is not possible because table row does not have a key. Add the key to the row or disable ranking.');
|
|
71
71
|
}
|
|
72
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement(_pragmaticDragAndDropReactBeautifulDndMigration.Draggable, {
|
|
73
73
|
draggableId: key || rowIndex.toString(),
|
|
74
74
|
index: rowIndex,
|
|
75
75
|
isDragDisabled: isRankingDisabled
|
|
@@ -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: "
|
|
89
|
+
packageVersion: "16.1.0"
|
|
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: "
|
|
96
|
+
packageVersion: "16.1.0"
|
|
97
97
|
});
|
|
98
98
|
(0, _react.useEffect)(function () {
|
|
99
99
|
(0, _helpers.validateSortKey)(sortKey, head);
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
|
|
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
|
-
import { DragDropContext, Droppable } from 'react-beautiful-dnd';
|
|
7
|
+
import { DragDropContext, Droppable } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration';
|
|
8
8
|
import withSortedPageRows from '../../hoc/with-sorted-page-rows';
|
|
9
9
|
import TableRow from './table-row';
|
|
10
10
|
// computes destination of ranking
|
|
@@ -105,7 +105,7 @@ export class RankableBody extends React.Component {
|
|
|
105
105
|
row: row,
|
|
106
106
|
isRankingDisabled: isRankingDisabled,
|
|
107
107
|
isHighlighted: !!highlightedRowIndex && (typeof highlightedRowIndex === 'number' ? highlightedRowIndex === rowIndex : highlightedRowIndex.indexOf(rowIndex) > -1),
|
|
108
|
-
testId: testId && `${testId}--rankable--table--row`
|
|
108
|
+
testId: testId && `${testId}--${row.key}--rankable--table--row`
|
|
109
109
|
})), provided.placeholder)));
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
|
|
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
|
-
import { Draggable } from 'react-beautiful-dnd';
|
|
7
|
+
import { Draggable } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration';
|
|
8
8
|
import withDimensions from '../../hoc/with-dimensions';
|
|
9
9
|
import { inlineStylesIfRanking } from '../../internal/helpers';
|
|
10
10
|
import { RankableTableBodyRow } from '../../styled/rankable/table-row';
|
|
@@ -60,14 +60,14 @@ const DynamicTable = ({
|
|
|
60
60
|
action: 'sorted',
|
|
61
61
|
componentName: 'dynamicTable',
|
|
62
62
|
packageName: "@atlaskit/dynamic-table",
|
|
63
|
-
packageVersion: "
|
|
63
|
+
packageVersion: "16.1.0"
|
|
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: "
|
|
70
|
+
packageVersion: "16.1.0"
|
|
71
71
|
});
|
|
72
72
|
useEffect(() => {
|
|
73
73
|
validateSortKey(sortKey, head);
|
|
@@ -12,7 +12,7 @@ import React from 'react';
|
|
|
12
12
|
|
|
13
13
|
// Allowing existing usage of non Pragmatic drag and drop solution
|
|
14
14
|
// eslint-disable-next-line @atlaskit/design-system/no-unsupported-drag-and-drop-libraries
|
|
15
|
-
import { DragDropContext, Droppable } from 'react-beautiful-dnd';
|
|
15
|
+
import { DragDropContext, Droppable } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration';
|
|
16
16
|
import withSortedPageRows from '../../hoc/with-sorted-page-rows';
|
|
17
17
|
import TableRow from './table-row';
|
|
18
18
|
// computes destination of ranking
|
|
@@ -109,7 +109,7 @@ export var RankableBody = /*#__PURE__*/function (_React$Component) {
|
|
|
109
109
|
row: row,
|
|
110
110
|
isRankingDisabled: isRankingDisabled,
|
|
111
111
|
isHighlighted: !!highlightedRowIndex && (typeof highlightedRowIndex === 'number' ? highlightedRowIndex === rowIndex : highlightedRowIndex.indexOf(rowIndex) > -1),
|
|
112
|
-
testId: testId && "".concat(testId, "--rankable--table--row")
|
|
112
|
+
testId: testId && "".concat(testId, "--").concat(row.key, "--rankable--table--row")
|
|
113
113
|
});
|
|
114
114
|
}), provided.placeholder);
|
|
115
115
|
}));
|
|
@@ -16,7 +16,7 @@ import React from 'react';
|
|
|
16
16
|
|
|
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
|
-
import { Draggable } from 'react-beautiful-dnd';
|
|
19
|
+
import { Draggable } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration';
|
|
20
20
|
import withDimensions from '../../hoc/with-dimensions';
|
|
21
21
|
import { inlineStylesIfRanking } from '../../internal/helpers';
|
|
22
22
|
import { RankableTableBodyRow } from '../../styled/rankable/table-row';
|
|
@@ -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: "
|
|
79
|
+
packageVersion: "16.1.0"
|
|
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: "
|
|
86
|
+
packageVersion: "16.1.0"
|
|
87
87
|
});
|
|
88
88
|
useEffect(function () {
|
|
89
89
|
validateSortKey(sortKey, head);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type DragStart, type DropResult } from 'react-beautiful-dnd';
|
|
2
|
+
import { type DragStart, type DropResult } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration';
|
|
3
3
|
import { type WithSortedPageRowsProps } from '../../hoc/with-sorted-page-rows';
|
|
4
4
|
import { type HeadType, type RankEnd, type RankStart } from '../../types';
|
|
5
5
|
export interface RankableBodyProps extends WithSortedPageRowsProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type DragStart, type DropResult } from 'react-beautiful-dnd';
|
|
2
|
+
import { type DragStart, type DropResult } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration';
|
|
3
3
|
import { type WithSortedPageRowsProps } from '../../hoc/with-sorted-page-rows';
|
|
4
4
|
import { type HeadType, type RankEnd, type RankStart } from '../../types';
|
|
5
5
|
export interface RankableBodyProps extends WithSortedPageRowsProps {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dynamic-table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.1.0",
|
|
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/"
|
|
@@ -38,8 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
41
|
-
"@atlaskit/ds-lib": "^3.
|
|
41
|
+
"@atlaskit/ds-lib": "^3.1.0",
|
|
42
42
|
"@atlaskit/pagination": "^14.9.0",
|
|
43
|
+
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration": "^1.2.1",
|
|
43
44
|
"@atlaskit/spinner": "^16.3.0",
|
|
44
45
|
"@atlaskit/theme": "^13.0.0",
|
|
45
46
|
"@atlaskit/tokens": "^2.0.0",
|