@atlaskit/dynamic-table 14.18.2 → 14.18.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 +14 -0
- package/dist/cjs/components/body.js +13 -10
- package/dist/cjs/components/rankable/body.js +1 -1
- package/dist/cjs/components/rankable/table-cell.js +1 -1
- package/dist/cjs/components/rankable/table-head-cell.js +11 -8
- package/dist/cjs/components/rankable/table-row.js +4 -2
- package/dist/cjs/components/stateless.js +13 -3
- package/dist/cjs/styled/constants.js +4 -4
- package/dist/cjs/styled/dynamic-table.js +1 -1
- package/dist/cjs/styled/empty-body.js +1 -1
- package/dist/cjs/styled/loading-container-advanced.js +1 -1
- package/dist/cjs/styled/loading-container.js +1 -1
- package/dist/cjs/styled/rankable/table-cell.js +1 -1
- package/dist/cjs/styled/rankable/table-row.js +1 -1
- package/dist/cjs/styled/table-cell.js +1 -1
- package/dist/cjs/styled/table-head.js +1 -1
- package/dist/cjs/styled/table-row.js +1 -1
- package/dist/es2019/components/body.js +7 -4
- package/dist/es2019/components/rankable/body.js +2 -0
- package/dist/es2019/components/rankable/table-cell.js +2 -0
- package/dist/es2019/components/rankable/table-head-cell.js +5 -2
- package/dist/es2019/components/rankable/table-row.js +5 -1
- package/dist/es2019/components/stateless.js +13 -3
- package/dist/es2019/styled/constants.js +4 -4
- package/dist/es2019/styled/dynamic-table.js +1 -1
- package/dist/es2019/styled/empty-body.js +1 -1
- package/dist/es2019/styled/loading-container-advanced.js +1 -1
- package/dist/es2019/styled/loading-container.js +1 -1
- package/dist/es2019/styled/rankable/table-cell.js +1 -1
- package/dist/es2019/styled/rankable/table-row.js +1 -1
- package/dist/es2019/styled/table-cell.js +1 -1
- package/dist/es2019/styled/table-head.js +1 -1
- package/dist/es2019/styled/table-row.js +1 -1
- package/dist/esm/components/body.js +13 -10
- package/dist/esm/components/rankable/body.js +2 -0
- package/dist/esm/components/rankable/table-cell.js +2 -0
- package/dist/esm/components/rankable/table-head-cell.js +11 -8
- package/dist/esm/components/rankable/table-row.js +5 -1
- package/dist/esm/components/stateless.js +13 -3
- package/dist/esm/styled/constants.js +4 -4
- package/dist/esm/styled/dynamic-table.js +1 -1
- package/dist/esm/styled/empty-body.js +1 -1
- package/dist/esm/styled/loading-container-advanced.js +1 -1
- package/dist/esm/styled/loading-container.js +1 -1
- package/dist/esm/styled/rankable/table-cell.js +1 -1
- package/dist/esm/styled/rankable/table-row.js +1 -1
- package/dist/esm/styled/table-cell.js +1 -1
- package/dist/esm/styled/table-head.js +1 -1
- package/dist/esm/styled/table-row.js +1 -1
- package/dist/types/components/body.d.ts +2 -2
- package/dist/types/components/rankable/table-head-cell.d.ts +2 -2
- package/dist/types/components/stateless.d.ts +10 -2
- package/dist/types/components/table-head-cell.d.ts +2 -2
- package/dist/types/hoc/with-dimensions.d.ts +2 -2
- package/dist/types/styled/constants.d.ts +2 -2
- package/dist/types/styled/dynamic-table.d.ts +1 -1
- package/dist/types/styled/empty-body.d.ts +1 -1
- package/dist/types/styled/loading-container-advanced.d.ts +1 -1
- package/dist/types/styled/loading-container.d.ts +1 -1
- package/dist/types/styled/rankable/table-cell.d.ts +1 -1
- package/dist/types/styled/rankable/table-row.d.ts +1 -1
- package/dist/types/styled/table-cell.d.ts +1 -1
- package/dist/types/styled/table-head.d.ts +1 -1
- package/dist/types/styled/table-row.d.ts +1 -1
- package/dist/types-ts4.5/components/body.d.ts +2 -2
- package/dist/types-ts4.5/components/rankable/table-head-cell.d.ts +2 -2
- package/dist/types-ts4.5/components/stateless.d.ts +10 -2
- package/dist/types-ts4.5/components/table-head-cell.d.ts +2 -2
- package/dist/types-ts4.5/hoc/with-dimensions.d.ts +2 -2
- package/dist/types-ts4.5/styled/constants.d.ts +2 -2
- package/dist/types-ts4.5/styled/dynamic-table.d.ts +1 -1
- package/dist/types-ts4.5/styled/empty-body.d.ts +1 -1
- package/dist/types-ts4.5/styled/loading-container-advanced.d.ts +1 -1
- package/dist/types-ts4.5/styled/loading-container.d.ts +1 -1
- package/dist/types-ts4.5/styled/rankable/table-cell.d.ts +1 -1
- package/dist/types-ts4.5/styled/rankable/table-row.d.ts +1 -1
- package/dist/types-ts4.5/styled/table-cell.d.ts +1 -1
- package/dist/types-ts4.5/styled/table-head.d.ts +1 -1
- package/dist/types-ts4.5/styled/table-row.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/dynamic-table
|
|
2
2
|
|
|
3
|
+
## 14.18.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 14.18.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#120049](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/120049)
|
|
14
|
+
[`77504ff274f72`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/77504ff274f72) -
|
|
15
|
+
DSP-19576: Assign names to anonymous default exports
|
|
16
|
+
|
|
3
17
|
## 14.18.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -16,14 +16,14 @@ var _withSortedPageRows = _interopRequireDefault(require("../hoc/with-sorted-pag
|
|
|
16
16
|
var _tableRow = _interopRequireDefault(require("./table-row"));
|
|
17
17
|
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); }; }
|
|
18
18
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
var
|
|
20
|
-
(0, _inherits2.default)(
|
|
21
|
-
var _super = _createSuper(
|
|
22
|
-
function
|
|
23
|
-
(0, _classCallCheck2.default)(this,
|
|
19
|
+
var BodyComponent = /*#__PURE__*/function (_React$Component) {
|
|
20
|
+
(0, _inherits2.default)(BodyComponent, _React$Component);
|
|
21
|
+
var _super = _createSuper(BodyComponent);
|
|
22
|
+
function BodyComponent() {
|
|
23
|
+
(0, _classCallCheck2.default)(this, BodyComponent);
|
|
24
24
|
return _super.apply(this, arguments);
|
|
25
25
|
}
|
|
26
|
-
(0, _createClass2.default)(
|
|
26
|
+
(0, _createClass2.default)(BodyComponent, [{
|
|
27
27
|
key: "render",
|
|
28
28
|
value: function render() {
|
|
29
29
|
var _this$props = this.props,
|
|
@@ -48,10 +48,13 @@ var Body = /*#__PURE__*/function (_React$Component) {
|
|
|
48
48
|
}));
|
|
49
49
|
}
|
|
50
50
|
}]);
|
|
51
|
-
return
|
|
51
|
+
return BodyComponent;
|
|
52
52
|
}(_react.default.Component);
|
|
53
|
-
var
|
|
54
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
53
|
+
var Body = (0, _withSortedPageRows.default)( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(BodyComponent, (0, _extends2.default)({}, props, {
|
|
55
55
|
forwardedRef: ref
|
|
56
56
|
}));
|
|
57
|
-
}));
|
|
57
|
+
}));
|
|
58
|
+
|
|
59
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
60
|
+
var _default = exports.default = Body;
|
|
@@ -121,7 +121,7 @@ var RankableBody = exports.RankableBody = /*#__PURE__*/function (_React$Componen
|
|
|
121
121
|
}
|
|
122
122
|
}]);
|
|
123
123
|
return RankableBody;
|
|
124
|
-
}(_react.default.Component);
|
|
124
|
+
}(_react.default.Component); // eslint-disable-next-line import/no-anonymous-default-export
|
|
125
125
|
var _default = exports.default = (0, _withSortedPageRows.default)( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
126
126
|
return /*#__PURE__*/_react.default.createElement(RankableBody, (0, _extends2.default)({}, props, {
|
|
127
127
|
forwardedRef: ref
|
|
@@ -61,5 +61,5 @@ var RankableTableCell = exports.RankableTableCell = /*#__PURE__*/function (_Reac
|
|
|
61
61
|
}
|
|
62
62
|
}]);
|
|
63
63
|
return RankableTableCell;
|
|
64
|
-
}(_react.default.Component);
|
|
64
|
+
}(_react.default.Component); // eslint-disable-next-line import/no-anonymous-default-export
|
|
65
65
|
var _default = exports.default = (0, _withDimensions.default)(RankableTableCell);
|
|
@@ -19,14 +19,14 @@ var _tableHeadCell = _interopRequireDefault(require("../table-head-cell"));
|
|
|
19
19
|
var _excluded = ["isRanking", "refHeight", "refWidth"];
|
|
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
21
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
|
-
var
|
|
23
|
-
(0, _inherits2.default)(
|
|
24
|
-
var _super = _createSuper(
|
|
25
|
-
function
|
|
26
|
-
(0, _classCallCheck2.default)(this,
|
|
22
|
+
var RankableTableHeadCellComponent = /*#__PURE__*/function (_React$Component) {
|
|
23
|
+
(0, _inherits2.default)(RankableTableHeadCellComponent, _React$Component);
|
|
24
|
+
var _super = _createSuper(RankableTableHeadCellComponent);
|
|
25
|
+
function RankableTableHeadCellComponent() {
|
|
26
|
+
(0, _classCallCheck2.default)(this, RankableTableHeadCellComponent);
|
|
27
27
|
return _super.apply(this, arguments);
|
|
28
28
|
}
|
|
29
|
-
(0, _createClass2.default)(
|
|
29
|
+
(0, _createClass2.default)(RankableTableHeadCellComponent, [{
|
|
30
30
|
key: "render",
|
|
31
31
|
value: function render() {
|
|
32
32
|
var _this$props = this.props,
|
|
@@ -40,6 +40,9 @@ var RankableTableHeadCell = /*#__PURE__*/function (_React$Component) {
|
|
|
40
40
|
}, restProps));
|
|
41
41
|
}
|
|
42
42
|
}]);
|
|
43
|
-
return
|
|
43
|
+
return RankableTableHeadCellComponent;
|
|
44
44
|
}(_react.default.Component);
|
|
45
|
-
var
|
|
45
|
+
var RankableTableHeadCell = (0, _withDimensions.default)(RankableTableHeadCellComponent);
|
|
46
|
+
|
|
47
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
48
|
+
var _default = exports.default = RankableTableHeadCell;
|
|
@@ -77,7 +77,9 @@ var RankableTableRow = exports.RankableTableRow = /*#__PURE__*/function (_React$
|
|
|
77
77
|
var _provided$dragHandleP;
|
|
78
78
|
return /*#__PURE__*/_react.default.createElement(_tableRow.RankableTableBodyRow, (0, _extends2.default)({}, restRowProps, provided.dragHandleProps, provided.draggableProps, {
|
|
79
79
|
// It is necessary to prevent the passing of aria-labelledby
|
|
80
|
-
"aria-labelledby": undefined
|
|
80
|
+
"aria-labelledby": undefined
|
|
81
|
+
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
82
|
+
,
|
|
81
83
|
"aria-describedby": (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP['aria-describedby'],
|
|
82
84
|
ref: _this2.innerRef(provided.innerRef)
|
|
83
85
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -104,5 +106,5 @@ var RankableTableRow = exports.RankableTableRow = /*#__PURE__*/function (_React$
|
|
|
104
106
|
}
|
|
105
107
|
}]);
|
|
106
108
|
return RankableTableRow;
|
|
107
|
-
}(_react.default.Component);
|
|
109
|
+
}(_react.default.Component); // eslint-disable-next-line import/no-anonymous-default-export
|
|
108
110
|
var _default = exports.default = (0, _withDimensions.default)(RankableTableRow);
|
|
@@ -35,7 +35,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
35
35
|
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); }; }
|
|
36
36
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
37
37
|
var packageName = "@atlaskit/dynamic-table";
|
|
38
|
-
var packageVersion = "14.18.
|
|
38
|
+
var packageVersion = "14.18.4";
|
|
39
39
|
function toggleSortOrder(currentSortOrder) {
|
|
40
40
|
switch (currentSortOrder) {
|
|
41
41
|
case _constants.DESC:
|
|
@@ -327,7 +327,16 @@ var TableBody = /*#__PURE__*/(0, _react.forwardRef)(function TableBody(_ref, ref
|
|
|
327
327
|
})))) : nonRankableBody;
|
|
328
328
|
});
|
|
329
329
|
var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
|
|
330
|
-
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* __Dynamic table stateless__
|
|
333
|
+
*
|
|
334
|
+
* A stateless table that requires consumers to manage the sorting, drag and drop, and pagination.
|
|
335
|
+
*
|
|
336
|
+
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/dynamic-table)
|
|
337
|
+
* - [Code](https://bitbucket.org/atlassian/atlassian-frontend/packages/design-system/dynamic-table)
|
|
338
|
+
*/
|
|
339
|
+
var DynamicTableStateless = (0, _analyticsNext.withAnalyticsContext)({
|
|
331
340
|
componentName: 'dynamicTable',
|
|
332
341
|
packageName: packageName,
|
|
333
342
|
packageVersion: packageVersion
|
|
@@ -350,4 +359,5 @@ var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
|
350
359
|
packageVersion: packageVersion
|
|
351
360
|
}
|
|
352
361
|
})
|
|
353
|
-
})(DynamicTable));
|
|
362
|
+
})(DynamicTable));
|
|
363
|
+
var _default = exports.default = DynamicTableStateless;
|
|
@@ -10,18 +10,18 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
11
|
|
|
12
12
|
var CSS_VAR_WIDTH = '--local-dynamic-table-width';
|
|
13
|
-
// eslint-disable-next-line @atlaskit/
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
14
14
|
var truncationWidthStyles = exports.truncationWidthStyles = (0, _react.css)({
|
|
15
15
|
width: "var(".concat(CSS_VAR_WIDTH, ")")
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
// eslint-disable-next-line @atlaskit/
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
19
19
|
var fixedSizeTruncateStyles = exports.fixedSizeTruncateStyles = (0, _react.css)({
|
|
20
20
|
textOverflow: 'ellipsis',
|
|
21
21
|
whiteSpace: 'nowrap'
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
// eslint-disable-next-line @atlaskit/
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
25
25
|
var overflowTruncateStyles = exports.overflowTruncateStyles = (0, _react.css)({
|
|
26
26
|
overflow: 'hidden'
|
|
27
27
|
});
|
|
@@ -30,7 +30,7 @@ var getTruncationStyleVars = exports.getTruncationStyleVars = function getTrunca
|
|
|
30
30
|
return typeof width !== 'undefined' ? (0, _defineProperty2.default)({}, CSS_VAR_WIDTH, "".concat(width, "%")) : undefined;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
// eslint-disable-next-line @atlaskit/
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
34
34
|
var cellStyles = exports.cellStyles = (0, _react.css)({
|
|
35
35
|
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-100, 8px)"),
|
|
36
36
|
border: 'none',
|
|
@@ -16,8 +16,8 @@ var _excluded = ["isFixedSize", "hasDataRow", "children", "testId", "isLoading"]
|
|
|
16
16
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
17
17
|
/**
|
|
18
18
|
* @jsxRuntime classic
|
|
19
|
+
* @jsx jsx
|
|
19
20
|
*/
|
|
20
|
-
/** @jsx jsx */
|
|
21
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
22
|
// CSS vars for table row
|
|
23
23
|
// these are declared here to avoid being re-declared in each table row
|
|
@@ -8,8 +8,8 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
9
9
|
/**
|
|
10
10
|
* @jsxRuntime classic
|
|
11
|
+
* @jsx jsx
|
|
11
12
|
*/
|
|
12
|
-
/** @jsx jsx */
|
|
13
13
|
|
|
14
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
15
|
|
|
@@ -13,8 +13,8 @@ var _excluded = ["children", "testId"];
|
|
|
13
13
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
14
14
|
/**
|
|
15
15
|
* @jsxRuntime classic
|
|
16
|
+
* @jsx jsx
|
|
16
17
|
*/
|
|
17
|
-
/** @jsx jsx */
|
|
18
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
19
|
var containerStyles = (0, _react2.css)({
|
|
20
20
|
position: 'relative',
|
|
@@ -10,8 +10,8 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
11
11
|
/**
|
|
12
12
|
* @jsxRuntime classic
|
|
13
|
+
* @jsx jsx
|
|
13
14
|
*/
|
|
14
|
-
/** @jsx jsx */
|
|
15
15
|
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
17
|
|
|
@@ -12,8 +12,8 @@ var _tableCell = require("../table-cell");
|
|
|
12
12
|
var _excluded = ["isRanking", "innerRef"];
|
|
13
13
|
/**
|
|
14
14
|
* @jsxRuntime classic
|
|
15
|
+
* @jsx jsx
|
|
15
16
|
*/
|
|
16
|
-
/** @jsx jsx */
|
|
17
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
18
|
var rankingStyles = (0, _react.css)({
|
|
19
19
|
boxSizing: 'border-box'
|
|
@@ -14,8 +14,8 @@ var _tableRow = require("../table-row");
|
|
|
14
14
|
var _excluded = ["isRanking", "isRankingItem", "testId"];
|
|
15
15
|
/**
|
|
16
16
|
* @jsxRuntime classic
|
|
17
|
+
* @jsx jsx
|
|
17
18
|
*/
|
|
18
|
-
/** @jsx jsx */
|
|
19
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
20
20
|
var rankingStyles = (0, _react2.css)({
|
|
21
21
|
display: 'block'
|
|
@@ -12,8 +12,8 @@ var _constants = require("./constants");
|
|
|
12
12
|
var _excluded = ["width", "isFixedSize", "shouldTruncate", "innerRef"];
|
|
13
13
|
/**
|
|
14
14
|
* @jsxRuntime classic
|
|
15
|
+
* @jsx jsx
|
|
15
16
|
*/
|
|
16
|
-
/** @jsx jsx */
|
|
17
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
18
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
19
19
|
var TableBodyCell = exports.TableBodyCell = function TableBodyCell(_ref) {
|
|
@@ -20,8 +20,8 @@ var _excluded = ["isRanking", "testId"],
|
|
|
20
20
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
21
21
|
/**
|
|
22
22
|
* @jsxRuntime classic
|
|
23
|
+
* @jsx jsx
|
|
23
24
|
*/
|
|
24
|
-
/** @jsx jsx */
|
|
25
25
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
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; }
|
|
27
27
|
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; }
|
|
@@ -13,8 +13,8 @@ var _dynamicTable = require("./dynamic-table");
|
|
|
13
13
|
var _excluded = ["isHighlighted", "children", "style", "testId"];
|
|
14
14
|
/**
|
|
15
15
|
* @jsxRuntime classic
|
|
16
|
+
* @jsx jsx
|
|
16
17
|
*/
|
|
17
|
-
/** @jsx jsx */
|
|
18
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
19
|
var rowStyles = (0, _react2.css)({
|
|
20
20
|
backgroundColor: "var(--ds-background-neutral-subtle, transparent)",
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import withSortedPageRows from '../hoc/with-sorted-page-rows';
|
|
4
4
|
import TableRow from './table-row';
|
|
5
|
-
class
|
|
5
|
+
class BodyComponent extends React.Component {
|
|
6
6
|
render() {
|
|
7
7
|
const {
|
|
8
8
|
pageRows,
|
|
@@ -25,8 +25,11 @@ class Body extends React.Component {
|
|
|
25
25
|
})));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
return /*#__PURE__*/React.createElement(
|
|
28
|
+
const Body = withSortedPageRows( /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
29
|
+
return /*#__PURE__*/React.createElement(BodyComponent, _extends({}, props, {
|
|
30
30
|
forwardedRef: ref
|
|
31
31
|
}));
|
|
32
|
-
}));
|
|
32
|
+
}));
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
35
|
+
export default Body;
|
|
@@ -109,6 +109,8 @@ export class RankableBody extends React.Component {
|
|
|
109
109
|
})), provided.placeholder)));
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
+
|
|
113
|
+
// eslint-disable-next-line import/no-anonymous-default-export
|
|
112
114
|
export default withSortedPageRows( /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
113
115
|
return /*#__PURE__*/React.createElement(RankableBody, _extends({}, props, {
|
|
114
116
|
forwardedRef: ref
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import withDimensions from '../../hoc/with-dimensions';
|
|
4
4
|
import { inlineStylesIfRanking } from '../../internal/helpers';
|
|
5
5
|
import HeadCell from '../table-head-cell';
|
|
6
|
-
class
|
|
6
|
+
class RankableTableHeadCellComponent extends React.Component {
|
|
7
7
|
render() {
|
|
8
8
|
const {
|
|
9
9
|
isRanking,
|
|
@@ -17,4 +17,7 @@ class RankableTableHeadCell extends React.Component {
|
|
|
17
17
|
}, restProps));
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
const RankableTableHeadCell = withDimensions(RankableTableHeadCellComponent);
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
23
|
+
export default RankableTableHeadCell;
|
|
@@ -51,7 +51,9 @@ export class RankableTableRow extends React.Component {
|
|
|
51
51
|
var _provided$dragHandleP;
|
|
52
52
|
return /*#__PURE__*/React.createElement(RankableTableBodyRow, _extends({}, restRowProps, provided.dragHandleProps, provided.draggableProps, {
|
|
53
53
|
// It is necessary to prevent the passing of aria-labelledby
|
|
54
|
-
"aria-labelledby": undefined
|
|
54
|
+
"aria-labelledby": undefined
|
|
55
|
+
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
56
|
+
,
|
|
55
57
|
"aria-describedby": (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP['aria-describedby'],
|
|
56
58
|
ref: this.innerRef(provided.innerRef)
|
|
57
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -80,4 +82,6 @@ export class RankableTableRow extends React.Component {
|
|
|
80
82
|
});
|
|
81
83
|
}
|
|
82
84
|
}
|
|
85
|
+
|
|
86
|
+
// eslint-disable-next-line import/no-anonymous-default-export
|
|
83
87
|
export default withDimensions(RankableTableRow);
|
|
@@ -14,7 +14,7 @@ import LoadingContainerAdvanced from './loading-container-advanced';
|
|
|
14
14
|
import ManagedPagination from './managed-pagination';
|
|
15
15
|
import TableHead from './table-head';
|
|
16
16
|
const packageName = "@atlaskit/dynamic-table";
|
|
17
|
-
const packageVersion = "14.18.
|
|
17
|
+
const packageVersion = "14.18.4";
|
|
18
18
|
function toggleSortOrder(currentSortOrder) {
|
|
19
19
|
switch (currentSortOrder) {
|
|
20
20
|
case DESC:
|
|
@@ -287,7 +287,16 @@ const TableBody = /*#__PURE__*/forwardRef(function TableBody({
|
|
|
287
287
|
});
|
|
288
288
|
export { DynamicTable as DynamicTableWithoutAnalytics };
|
|
289
289
|
const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
290
|
-
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* __Dynamic table stateless__
|
|
293
|
+
*
|
|
294
|
+
* A stateless table that requires consumers to manage the sorting, drag and drop, and pagination.
|
|
295
|
+
*
|
|
296
|
+
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/dynamic-table)
|
|
297
|
+
* - [Code](https://bitbucket.org/atlassian/atlassian-frontend/packages/design-system/dynamic-table)
|
|
298
|
+
*/
|
|
299
|
+
const DynamicTableStateless = withAnalyticsContext({
|
|
291
300
|
componentName: 'dynamicTable',
|
|
292
301
|
packageName,
|
|
293
302
|
packageVersion
|
|
@@ -310,4 +319,5 @@ export default withAnalyticsContext({
|
|
|
310
319
|
packageVersion
|
|
311
320
|
}
|
|
312
321
|
})
|
|
313
|
-
})(DynamicTable));
|
|
322
|
+
})(DynamicTable));
|
|
323
|
+
export default DynamicTableStateless;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
const CSS_VAR_WIDTH = '--local-dynamic-table-width';
|
|
4
|
-
// eslint-disable-next-line @atlaskit/
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
5
|
export const truncationWidthStyles = css({
|
|
6
6
|
width: `var(${CSS_VAR_WIDTH})`
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
// eslint-disable-next-line @atlaskit/
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
10
10
|
export const fixedSizeTruncateStyles = css({
|
|
11
11
|
textOverflow: 'ellipsis',
|
|
12
12
|
whiteSpace: 'nowrap'
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
// eslint-disable-next-line @atlaskit/
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
16
16
|
export const overflowTruncateStyles = css({
|
|
17
17
|
overflow: 'hidden'
|
|
18
18
|
});
|
|
@@ -22,7 +22,7 @@ export const getTruncationStyleVars = ({
|
|
|
22
22
|
[CSS_VAR_WIDTH]: `${width}%`
|
|
23
23
|
} : undefined;
|
|
24
24
|
|
|
25
|
-
// eslint-disable-next-line @atlaskit/
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
26
26
|
export const cellStyles = css({
|
|
27
27
|
padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-100, 8px)"}`,
|
|
28
28
|
border: 'none',
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
3
3
|
/**
|
|
4
4
|
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
5
6
|
*/
|
|
6
|
-
/** @jsx jsx */
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
2
2
|
/**
|
|
3
3
|
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
4
5
|
*/
|
|
5
|
-
/** @jsx jsx */
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
3
3
|
/**
|
|
4
4
|
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
5
6
|
*/
|
|
6
|
-
/** @jsx jsx */
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
2
2
|
/**
|
|
3
3
|
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
4
5
|
*/
|
|
5
|
-
/** @jsx jsx */
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/**
|
|
3
3
|
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
4
5
|
*/
|
|
5
|
-
/** @jsx jsx */
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
3
3
|
/**
|
|
4
4
|
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
5
6
|
*/
|
|
6
|
-
/** @jsx jsx */
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -9,14 +9,14 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import withSortedPageRows from '../hoc/with-sorted-page-rows';
|
|
11
11
|
import TableRow from './table-row';
|
|
12
|
-
var
|
|
13
|
-
_inherits(
|
|
14
|
-
var _super = _createSuper(
|
|
15
|
-
function
|
|
16
|
-
_classCallCheck(this,
|
|
12
|
+
var BodyComponent = /*#__PURE__*/function (_React$Component) {
|
|
13
|
+
_inherits(BodyComponent, _React$Component);
|
|
14
|
+
var _super = _createSuper(BodyComponent);
|
|
15
|
+
function BodyComponent() {
|
|
16
|
+
_classCallCheck(this, BodyComponent);
|
|
17
17
|
return _super.apply(this, arguments);
|
|
18
18
|
}
|
|
19
|
-
_createClass(
|
|
19
|
+
_createClass(BodyComponent, [{
|
|
20
20
|
key: "render",
|
|
21
21
|
value: function render() {
|
|
22
22
|
var _this$props = this.props,
|
|
@@ -41,10 +41,13 @@ var Body = /*#__PURE__*/function (_React$Component) {
|
|
|
41
41
|
}));
|
|
42
42
|
}
|
|
43
43
|
}]);
|
|
44
|
-
return
|
|
44
|
+
return BodyComponent;
|
|
45
45
|
}(React.Component);
|
|
46
|
-
|
|
47
|
-
return /*#__PURE__*/React.createElement(
|
|
46
|
+
var Body = withSortedPageRows( /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
47
|
+
return /*#__PURE__*/React.createElement(BodyComponent, _extends({}, props, {
|
|
48
48
|
forwardedRef: ref
|
|
49
49
|
}));
|
|
50
|
-
}));
|
|
50
|
+
}));
|
|
51
|
+
|
|
52
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
53
|
+
export default Body;
|
|
@@ -117,6 +117,8 @@ export var RankableBody = /*#__PURE__*/function (_React$Component) {
|
|
|
117
117
|
}]);
|
|
118
118
|
return RankableBody;
|
|
119
119
|
}(React.Component);
|
|
120
|
+
|
|
121
|
+
// eslint-disable-next-line import/no-anonymous-default-export
|
|
120
122
|
export default withSortedPageRows( /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
121
123
|
return /*#__PURE__*/React.createElement(RankableBody, _extends({}, props, {
|
|
122
124
|
forwardedRef: ref
|
|
@@ -12,14 +12,14 @@ 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
|
-
var
|
|
16
|
-
_inherits(
|
|
17
|
-
var _super = _createSuper(
|
|
18
|
-
function
|
|
19
|
-
_classCallCheck(this,
|
|
15
|
+
var RankableTableHeadCellComponent = /*#__PURE__*/function (_React$Component) {
|
|
16
|
+
_inherits(RankableTableHeadCellComponent, _React$Component);
|
|
17
|
+
var _super = _createSuper(RankableTableHeadCellComponent);
|
|
18
|
+
function RankableTableHeadCellComponent() {
|
|
19
|
+
_classCallCheck(this, RankableTableHeadCellComponent);
|
|
20
20
|
return _super.apply(this, arguments);
|
|
21
21
|
}
|
|
22
|
-
_createClass(
|
|
22
|
+
_createClass(RankableTableHeadCellComponent, [{
|
|
23
23
|
key: "render",
|
|
24
24
|
value: function render() {
|
|
25
25
|
var _this$props = this.props,
|
|
@@ -33,6 +33,9 @@ var RankableTableHeadCell = /*#__PURE__*/function (_React$Component) {
|
|
|
33
33
|
}, restProps));
|
|
34
34
|
}
|
|
35
35
|
}]);
|
|
36
|
-
return
|
|
36
|
+
return RankableTableHeadCellComponent;
|
|
37
37
|
}(React.Component);
|
|
38
|
-
|
|
38
|
+
var RankableTableHeadCell = withDimensions(RankableTableHeadCellComponent);
|
|
39
|
+
|
|
40
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
41
|
+
export default RankableTableHeadCell;
|